diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..24f1210 --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +# Xcode +.DS_Store +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +*.xcworkspace +!default.xcworkspace +xcuserdata +profile +*.moved-aside +DerivedData +.idea/ \ No newline at end of file diff --git a/GTL/.svn/all-wcprops b/GTL/.svn/all-wcprops new file mode 100644 index 0000000..65a7c86 --- /dev/null +++ b/GTL/.svn/all-wcprops @@ -0,0 +1,5 @@ +K 25 +svn:wc:ra_dav:version-url +V 23 +/svn/!svn/ver/249/trunk +END diff --git a/GTL/.svn/entries b/GTL/.svn/entries new file mode 100644 index 0000000..77f8ee3 --- /dev/null +++ b/GTL/.svn/entries @@ -0,0 +1,34 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-12-06T21:45:46.693811Z +249 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +Source +dir + +Examples +dir + diff --git a/GTL/Examples/.svn/all-wcprops b/GTL/Examples/.svn/all-wcprops new file mode 100644 index 0000000..8017da8 --- /dev/null +++ b/GTL/Examples/.svn/all-wcprops @@ -0,0 +1,5 @@ +K 25 +svn:wc:ra_dav:version-url +V 32 +/svn/!svn/ver/234/trunk/Examples +END diff --git a/GTL/Examples/.svn/entries b/GTL/Examples/.svn/entries new file mode 100644 index 0000000..4d7ed17 --- /dev/null +++ b/GTL/Examples/.svn/entries @@ -0,0 +1,55 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-11T00:45:57.082798Z +234 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +BooksSample +dir + +BloggerSample +dir + +PlusSample +dir + +TasksSample +dir + +ShoppingSample +dir + +DriveSample +dir + +CalendarSample +dir + +LatitudeSample +dir + +URLShortenerSample +dir + diff --git a/GTL/Examples/BloggerSample/.svn/all-wcprops b/GTL/Examples/BloggerSample/.svn/all-wcprops new file mode 100644 index 0000000..7d96ab7 --- /dev/null +++ b/GTL/Examples/BloggerSample/.svn/all-wcprops @@ -0,0 +1,53 @@ +K 25 +svn:wc:ra_dav:version-url +V 46 +/svn/!svn/ver/172/trunk/Examples/BloggerSample +END +main.m +K 25 +svn:wc:ra_dav:version-url +V 53 +/svn/!svn/ver/172/trunk/Examples/BloggerSample/main.m +END +BloggerSampleAppController.m +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/172/trunk/Examples/BloggerSample/BloggerSampleAppController.m +END +Info.plist +K 25 +svn:wc:ra_dav:version-url +V 57 +/svn/!svn/ver/172/trunk/Examples/BloggerSample/Info.plist +END +BloggerSampleWindowController.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/172/trunk/Examples/BloggerSample/BloggerSampleWindowController.h +END +BloggerSampleWindowController.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/172/trunk/Examples/BloggerSample/BloggerSampleWindowController.m +END +README.txt +K 25 +svn:wc:ra_dav:version-url +V 57 +/svn/!svn/ver/172/trunk/Examples/BloggerSample/README.txt +END +buildStripHeaders +K 25 +svn:wc:ra_dav:version-url +V 64 +/svn/!svn/ver/172/trunk/Examples/BloggerSample/buildStripHeaders +END +BloggerSampleAppController.h +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/172/trunk/Examples/BloggerSample/BloggerSampleAppController.h +END diff --git a/GTL/Examples/BloggerSample/.svn/entries b/GTL/Examples/BloggerSample/.svn/entries new file mode 100644 index 0000000..3829df2 --- /dev/null +++ b/GTL/Examples/BloggerSample/.svn/entries @@ -0,0 +1,306 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/BloggerSample +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +BloggerSample.xcodeproj +dir + +main.m +file + + + + +2012-12-09T08:42:33.000000Z +afe8dc1cb080fe86d720faebacf134a1 +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +736 + +BloggerSampleAppController.m +file + + + + +2012-12-09T08:42:33.000000Z +99c3cf8e31864e7d24c6b3b753e644e7 +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1092 + +Info.plist +file + + + + +2012-12-09T08:42:33.000000Z +00ea1a1d4d72ce10e0ec504a456f5969 +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +838 + +BloggerSampleWindowController.h +file + + + + +2012-12-09T08:42:33.000000Z +eb44eaf6b7dfce9275e96ed0df3139f5 +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2636 + +BloggerSampleWindowController.m +file + + + + +2012-12-09T08:42:33.000000Z +f8e0d3d4c5a5e9abd8950706e7f4b832 +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +21928 + +README.txt +file + + + + +2012-12-09T08:42:33.000000Z +0a3374a462b2cff6dcd19d0caf28958a +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +109 + +buildStripHeaders +file + + + + +2012-12-09T08:42:33.000000Z +38b5302dc0e4a662c40b288306a2f6ac +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +454 + +English.lproj +dir + +BloggerSampleAppController.h +file + + + + +2012-12-09T08:42:33.000000Z +76b3887e50f1bdce296f82b5332f2654 +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +716 + diff --git a/GTL/Examples/BloggerSample/.svn/prop-base/buildStripHeaders.svn-base b/GTL/Examples/BloggerSample/.svn/prop-base/buildStripHeaders.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/GTL/Examples/BloggerSample/.svn/prop-base/buildStripHeaders.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/GTL/Examples/BloggerSample/.svn/text-base/BloggerSampleAppController.h.svn-base b/GTL/Examples/BloggerSample/.svn/text-base/BloggerSampleAppController.h.svn-base new file mode 100644 index 0000000..e1d470f --- /dev/null +++ b/GTL/Examples/BloggerSample/.svn/text-base/BloggerSampleAppController.h.svn-base @@ -0,0 +1,23 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// BloggerSampleAppController.h +// + +#import + +@interface BloggerSampleAppController : NSObject +@end diff --git a/GTL/Examples/BloggerSample/.svn/text-base/BloggerSampleAppController.m.svn-base b/GTL/Examples/BloggerSample/.svn/text-base/BloggerSampleAppController.m.svn-base new file mode 100644 index 0000000..3a56c02 --- /dev/null +++ b/GTL/Examples/BloggerSample/.svn/text-base/BloggerSampleAppController.m.svn-base @@ -0,0 +1,35 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// BloggerSampleAppController.m +// + +#import "BloggerSampleAppController.h" +#import "BloggerSampleWindowController.h" + +@implementation BloggerSampleAppController + +- (void)applicationWillFinishLaunching:(NSNotification *)notification { + BloggerSampleWindowController* windowController + = [BloggerSampleWindowController sharedWindowController]; + [windowController showWindow:self]; +} + +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { + return YES; +} + +@end diff --git a/GTL/Examples/BloggerSample/.svn/text-base/BloggerSampleWindowController.h.svn-base b/GTL/Examples/BloggerSample/.svn/text-base/BloggerSampleWindowController.h.svn-base new file mode 100644 index 0000000..d520eb2 --- /dev/null +++ b/GTL/Examples/BloggerSample/.svn/text-base/BloggerSampleWindowController.h.svn-base @@ -0,0 +1,88 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// BloggerSampleWindowController.h +// + +#import + +#import "GTLBlogger.h" +#import "GTL/GTMOAuth2WindowController.h" + +@interface BloggerSampleWindowController : NSWindowController { + @private + IBOutlet NSTextField *signedInField_; + IBOutlet NSButton *signedInButton_; + + IBOutlet NSTableView *blogListTable_; + IBOutlet NSProgressIndicator *blogListProgressIndicator_; + IBOutlet NSTextView *blogListResultTextView_; + IBOutlet NSButton *blogListCancelButton_; + + IBOutlet NSTableView *postListTable_; + IBOutlet NSProgressIndicator *postListProgressIndicator_; + IBOutlet NSTextView *postListResultTextView_; + IBOutlet NSButton *postListCancelButton_; + + IBOutlet NSTextField *postTitleField_; + IBOutlet NSTextField *postBodyField_; + + IBOutlet NSButton *addPostButton_; + IBOutlet NSButton *updatePostButton_; + IBOutlet NSButton *deletePostButton_; + IBOutlet NSButton *deleteAllPostsButton_; + + // Client ID Sheet outlets (Not needed for real apps) + IBOutlet NSButton *clientIDButton_; + IBOutlet NSTextField *clientIDRequiredTextField_; + IBOutlet NSWindow *clientIDSheet_; + IBOutlet NSTextField *clientIDField_; + IBOutlet NSTextField *clientSecretField_; + + + GTLBloggerBlogList *blogList_; + GTLServiceTicket *blogListTicket_; + NSError *blogListFetchError_; + + GTLBloggerPostList *postList_; + GTLServiceTicket *postListTicket_; + NSError *postListFetchError_; + + GTLServiceTicket *editPostTicket_; +} + ++ (BloggerSampleWindowController *)sharedWindowController; + +- (IBAction)signInClicked:(id)sender; + +- (IBAction)getBlogListClicked:(id)sender; + +- (IBAction)cancelBlogFetchClicked:(id)sender; +- (IBAction)cancelPostFetchClicked:(id)sender; + +- (IBAction)addPostClicked:(id)sender; +- (IBAction)updatePostClicked:(id)sender; +- (IBAction)deletePostClicked:(id)sender; +- (IBAction)deleteAllPostsClicked:(id)sender; + +- (IBAction)APIConsoleClicked:(id)sender; +- (IBAction)loggingCheckboxClicked:(id)sender; + +// Client ID sheet +- (IBAction)clientIDClicked:(id)sender; +- (IBAction)clientIDDoneClicked:(id)sender; + +@end diff --git a/GTL/Examples/BloggerSample/.svn/text-base/BloggerSampleWindowController.m.svn-base b/GTL/Examples/BloggerSample/.svn/text-base/BloggerSampleWindowController.m.svn-base new file mode 100644 index 0000000..bb546e5 --- /dev/null +++ b/GTL/Examples/BloggerSample/.svn/text-base/BloggerSampleWindowController.m.svn-base @@ -0,0 +1,699 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// BloggerSampleWindowController.m +// + +#import "BloggerSampleWindowController.h" + +#import "GTL/GTLUtilities.h" +#import "GTL/GTMHTTPFetcherLogging.h" + +@interface BloggerSampleWindowController () + +@property (readonly) GTLServiceBlogger *bloggerService; + +@property (retain) GTLBloggerBlogList *blogList; +@property (retain) GTLServiceTicket *blogListTicket; +@property (retain) NSError *blogListFetchError; + +@property (retain) GTLBloggerPostList *postList; +@property (retain) GTLServiceTicket *postListTicket; +@property (retain) NSError *postListFetchError; + +@property (retain) GTLServiceTicket *editPostTicket; + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel; + +- (void)updateUI; +- (void)displayAlert:(NSString *)title format:(NSString *)format, ...; + +- (void)fetchBlogList; +- (void)fetchPostListForSelectedBlog; + +- (GTLBloggerBlog *)selectedBlog; + +@end + +// Keychain item name for saving the user's authentication information +NSString *const kKeychainItemName = @"BloggerSample: Google Blogger"; + +@implementation BloggerSampleWindowController + +@synthesize blogList = blogList_, + blogListTicket = blogListTicket_, + blogListFetchError = blogListFetchError_, + postList = postList_, + postListTicket = postListTicket_, + postListFetchError = postListFetchError_, + editPostTicket = editPostTicket_; + ++ (BloggerSampleWindowController *)sharedWindowController { + static BloggerSampleWindowController* gWindowController = nil; + if (!gWindowController) { + gWindowController = [[BloggerSampleWindowController alloc] init]; + } + return gWindowController; +} + +- (id)init { + return [self initWithWindowNibName:@"BloggerSampleWindow"]; +} + +- (void)awakeFromNib { + // Load the OAuth token from the keychain, if it was previously saved. + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + GTMOAuth2Authentication *auth; + auth = [GTMOAuth2WindowController authForGoogleFromKeychainForName:kKeychainItemName + clientID:clientID + clientSecret:clientSecret]; + self.bloggerService.authorizer = auth; + + // Set the result text fields to have a distinctive color and mono-spaced font + [blogListResultTextView_ setTextColor:[NSColor darkGrayColor]]; + [postListResultTextView_ setTextColor:[NSColor darkGrayColor]]; + + NSFont *resultTextFont = [NSFont fontWithName:@"Monaco" size:9]; + [blogListResultTextView_ setFont:resultTextFont]; + [postListResultTextView_ setFont:resultTextFont]; + + [self updateUI]; +} + +- (void)dealloc { + [blogList_ release]; + [blogListTicket_ release]; + [blogListFetchError_ release]; + + [postList_ release]; + [postListTicket_ release]; + [postListFetchError_ release]; + + [editPostTicket_ release]; + + [super dealloc]; +} + +#pragma mark - + +- (NSString *)signedInUsername { + // Get the email address of the signed-in user. + GTMOAuth2Authentication *auth = self.bloggerService.authorizer; + BOOL isSignedIn = auth.canAuthorize; + if (isSignedIn) { + return auth.userEmail; + } else { + return nil; + } +} + +- (BOOL)isSignedIn { + NSString *name = [self signedInUsername]; + return (name != nil); +} + +#pragma mark IBActions + +- (IBAction)signInClicked:(id)sender { + if (![self isSignedIn]) { + // Sign in + [self runSigninThenInvokeSelector:@selector(updateUI)]; + } else { + // Sign out + GTLServiceBlogger *service = self.bloggerService; + + [GTMOAuth2WindowController removeAuthFromKeychainForName:kKeychainItemName]; + service.authorizer = nil; + [self updateUI]; + } +} + +- (IBAction)getBlogListClicked:(id)sender { + if (![self isSignedIn]) { + [self runSigninThenInvokeSelector:@selector(fetchBlogList)]; + } else { + [self fetchBlogList]; + } +} + +- (IBAction)cancelBlogFetchClicked:(id)sender { + [self.blogListTicket cancelTicket]; + self.blogListTicket = nil; + + [self updateUI]; +} + +- (IBAction)cancelPostFetchClicked:(id)sender { + [self.postListTicket cancelTicket]; + self.postListTicket = nil; + + [self.editPostTicket cancelTicket]; + self.editPostTicket = nil; + + [self updateUI]; +} + +- (IBAction)addPostClicked:(id)sender { + [self addAPost]; +} + +- (IBAction)updatePostClicked:(id)sender { + [self updateSelectedPost]; +} + +- (IBAction)deletePostClicked:(id)sender { + GTLBloggerPost *selectedPost = [self selectedPost]; + + NSBeginAlertSheet(@"Delete", nil, @"Cancel", nil, + [self window], self, + @selector(deletePostSheetDidEnd:returnCode:contextInfo:), + nil, nil, @"Delete \"%@\"?", selectedPost.title); +} + +- (void)deletePostSheetDidEnd:(NSWindow *)sheet + returnCode:(int)returnCode + contextInfo:(void *)contextInfo { + if (returnCode == NSAlertDefaultReturn) { + [self deleteSelectedPost]; + } +} + +- (IBAction)deleteAllPostsClicked:(id)sender { + GTLBloggerBlog *selectedBlog = [self selectedBlog]; + + NSBeginAlertSheet(@"Delete", nil, @"Cancel", nil, + [self window], self, + @selector(deleteAllPostsSheetDidEnd:returnCode:contextInfo:), + nil, nil, @"Permanently delete ALL posts for blog \"%@\"?", + selectedBlog.name); +} + +- (void)deleteAllPostsSheetDidEnd:(NSWindow *)sheet + returnCode:(int)returnCode + contextInfo:(void *)contextInfo { + if (returnCode == NSAlertDefaultReturn) { + [self deleteAllPosts]; + } +} + +- (IBAction)APIConsoleClicked:(id)sender { + NSURL *url = [NSURL URLWithString:@"https://code.google.com/apis/console"]; + [[NSWorkspace sharedWorkspace] openURL:url]; +} + +- (IBAction)loggingCheckboxClicked:(id)sender { + [GTMHTTPFetcher setLoggingEnabled:[sender state]]; +} + +#pragma mark - + +// Get a service object with the current username/password +// +// A "service" object handles networking tasks. Service objects +// contain user authentication information as well as networking +// state information (such as cookies and the "last modified" date for +// fetched data.) + +- (GTLServiceBlogger *)bloggerService { + static GTLServiceBlogger *service = nil; + + if (!service) { + service = [[GTLServiceBlogger alloc] init]; + + // Have the service object set tickets to fetch consecutive pages + // of the feed so we do not need to manually fetch them. + service.shouldFetchNextPages = YES; + + // Have the service object set tickets to retry temporary error conditions + // automatically. + service.retryEnabled = YES; + } + return service; +} + +- (GTLBloggerBlog *)selectedBlog { + int rowIndex = [blogListTable_ selectedRow]; + if (rowIndex > -1) { + GTLBloggerBlog *item = [self.blogList itemAtIndex:rowIndex]; + return item; + } + return nil; +} + +- (GTLBloggerPost *)selectedPost { + int rowIndex = [postListTable_ selectedRow]; + if (rowIndex > -1) { + GTLBloggerPost *item = [self.postList itemAtIndex:rowIndex]; + return item; + } + return nil; +} + +- (void)setPostEditFieldsFromSelectedPost { + GTLBloggerPost *selectedPost = [self selectedPost]; + if (selectedPost) { + [postTitleField_ setStringValue:selectedPost.title]; + [postBodyField_ setStringValue:selectedPost.content]; + } else { + [postTitleField_ setStringValue:@""]; + [postBodyField_ setStringValue:@""]; + } +} + +- (void)clearPostEditFields { + [postTitleField_ setStringValue:@""]; + [postBodyField_ setStringValue:@""]; +} + +#pragma mark Fetch Blog List + +- (void)fetchBlogList { + self.blogList = nil; + self.blogListFetchError = nil; + + GTLServiceBlogger *service = self.bloggerService; + + GTLQueryBlogger *query = [GTLQueryBlogger queryForBlogsListByUserWithUserId:@"self"]; + + self.blogListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + GTLBloggerBlogList *blogList, NSError *error) { + // Callback + self.blogList = blogList; + self.blogListFetchError = error; + self.blogListTicket = nil; + + [self updateUI]; + }]; + + [self updateUI]; +} + +#pragma mark Fetch Blog Post List + +- (void)fetchPostListForSelectedBlog { + GTLServiceBlogger *service = self.bloggerService; + + GTLBloggerBlog *selectedBlog = [self selectedBlog]; + NSString *blogID = [selectedBlog.identifier stringValue]; + GTLQueryBlogger *query = [GTLQueryBlogger queryForPostsListWithBlogId:blogID]; + + self.postListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + GTLBloggerPostList *postList, NSError *error) { + // Callback + self.postList = postList; + self.postListFetchError = error; + self.postListTicket = nil; + + [self setPostEditFieldsFromSelectedPost]; + [self updateUI]; + }]; + + [self updateUI]; +} + +#pragma mark Add a Post + +- (void)addAPost { + GTLServiceBlogger *service = self.bloggerService; + + GTLBloggerBlog *selectedBlog = [self selectedBlog]; + NSString *blogID = [selectedBlog.identifier stringValue]; + + + GTLBloggerPost *newPost = [GTLBloggerPost object]; + newPost.title = [postTitleField_ stringValue]; + newPost.content = [postBodyField_ stringValue]; + + + GTLQueryBlogger *query = [GTLQueryBlogger queryForPostsInsertWithObject:newPost + blogId:blogID]; + self.editPostTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + GTLBloggerPost *post, NSError *error) { + // Callback + self.editPostTicket = nil; + if (error == nil) { + [self displayAlert:@"Post Added" + format:@"Added \"%@\"", post.title]; + [self clearPostEditFields]; + [self updateUI]; + [self fetchPostListForSelectedBlog]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; +} + +#pragma mark Update a Post + +- (void)updateSelectedPost { + GTLBloggerPost *selectedPost = [self selectedPost]; + if (selectedPost) { + GTLServiceBlogger *service = self.bloggerService; + + GTLBloggerBlog *selectedBlog = [self selectedBlog]; + NSString *blogID = [selectedBlog.identifier stringValue]; + NSString *postID = [selectedPost.identifier stringValue]; + NSString *oldTitle = selectedPost.title; + + GTLBloggerPost *patchObject = [GTLBloggerPost object]; + patchObject.title = [postTitleField_ stringValue]; + patchObject.content = [postBodyField_ stringValue]; + + + GTLQueryBlogger *query = [GTLQueryBlogger queryForPostsPatchWithObject:patchObject + blogId:blogID + postId:postID]; + self.editPostTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + GTLBloggerPostList *postList, NSError *error) { + // Callback + self.editPostTicket = nil; + if (error == nil) { + [self displayAlert:@"Post Updated" + format:@"Updated \"%@\"", oldTitle]; + [self clearPostEditFields]; + [self updateUI]; + [self fetchPostListForSelectedBlog]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + } +} + +#pragma mark Delete a Post + +- (void)deleteSelectedPost { + GTLBloggerPost *selectedPost = [self selectedPost]; + if (selectedPost) { + GTLServiceBlogger *service = self.bloggerService; + + GTLBloggerBlog *selectedBlog = [self selectedBlog]; + NSString *blogID = [selectedBlog.identifier stringValue]; + NSString *postID = [selectedPost.identifier stringValue]; + + GTLQueryBlogger *query = [GTLQueryBlogger queryForPostsDeleteWithBlogId:blogID + postId:postID]; + self.editPostTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id unusedObj, NSError *error) { + // Callback + self.editPostTicket = nil; + if (error == nil) { + [self displayAlert:@"Post Deleted" + format:@"Deleted \"%@\"", selectedPost.title]; + [self updateUI]; + [self setPostEditFieldsFromSelectedPost]; + [self fetchPostListForSelectedBlog]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + } +} + +#pragma mark Delete All Posts + +- (void)deleteAllPosts { + GTLBloggerBlog *selectedBlog = [self selectedBlog]; + NSString *blogID = [selectedBlog.identifier stringValue]; + + // Make a batch with a delete query for every post in the blog. + // + // http://code.google.com/p/google-api-objectivec-client/wiki/Introduction#Batch_Operations + + GTLBatchQuery *batchQuery = [GTLBatchQuery batchQuery]; + for (GTLBloggerPost *post in self.postList) { + NSString *postID = [post.identifier stringValue]; + GTLQueryBlogger *query = [GTLQueryBlogger queryForPostsDeleteWithBlogId:blogID + postId:postID]; + [batchQuery addQuery:query]; + } + + GTLServiceBlogger *service = self.bloggerService; + self.editPostTicket = [service executeQuery:batchQuery + completionHandler:^(GTLServiceTicket *ticket, + GTLBatchResult *batchResult, NSError *error) { + // Callback + self.editPostTicket = nil; + if (error == nil) { + // Execute succeeded: step through the query successes + // and failures in the result. + NSDictionary *successes = batchResult.successes; + NSDictionary *failures = batchResult.failures; + + [self displayAlert:@"Delete All Complete" + format:@"Deleted %u posts (%u errors)", + [successes count], [failures count]]; + + [self fetchPostListForSelectedBlog]; + } else { + // Here, error is non-nil so execute failed: no success or failure + // results were obtained from the server. + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; +} + +#pragma mark Sign In + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel { + // Applications should have client ID and client secret strings + // hardcoded into the source, but the sample application asks the + // developer for the strings. + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + if ([clientID length] == 0 || [clientSecret length] == 0) { + // Remind the developer that client ID and client secret are needed + [clientIDButton_ performSelector:@selector(performClick:) + withObject:self + afterDelay:0.5]; + return; + } + + // Show the OAuth 2 sign-in controller + NSBundle *frameworkBundle = [NSBundle bundleForClass:[GTMOAuth2WindowController class]]; + GTMOAuth2WindowController *windowController; + windowController = [GTMOAuth2WindowController controllerWithScope:kGTLAuthScopeBlogger + clientID:clientID + clientSecret:clientSecret + keychainItemName:kKeychainItemName + resourceBundle:frameworkBundle]; + + [windowController signInSheetModalForWindow:[self window] + completionHandler:^(GTMOAuth2Authentication *auth, + NSError *error) { + // Callback + if (error == nil) { + self.bloggerService.authorizer = auth; + if (signInDoneSel) { + [self performSelector:signInDoneSel]; + } + } else { + self.blogListFetchError = error; + [self updateUI]; + } + }]; +} + +#pragma mark UI + +- (void)updateUI { + BOOL isSignedIn = [self isSignedIn]; + NSString *username = [self signedInUsername]; + [signedInButton_ setTitle:(isSignedIn ? @"Sign Out" : @"Sign In")]; + [signedInField_ setStringValue:(isSignedIn ? username : @"No")]; + + // + // Blog list table + // + [blogListTable_ reloadData]; + + if (self.blogListTicket != nil) { + [blogListProgressIndicator_ startAnimation:self]; + [blogListCancelButton_ setEnabled:YES]; + } else { + [blogListProgressIndicator_ stopAnimation:self]; + [blogListCancelButton_ setEnabled:NO]; + } + + // Get the description of the selected item, or the feed fetch error. + NSString *resultStr = @""; + + if (self.blogListFetchError) { + // Display the error. + resultStr = [self.blogListFetchError description]; + } else { + // Display the selected item. + GTLBloggerBlog *item = [self selectedBlog]; + if (item) { + resultStr = [item description]; + } + } + [blogListResultTextView_ setString:resultStr]; + + // + // Blog post table + // + [postListTable_ reloadData]; + + if (self.postListTicket != nil || self.editPostTicket != nil) { + [postListProgressIndicator_ startAnimation:self]; + [postListCancelButton_ setEnabled:YES]; + } else { + [postListProgressIndicator_ stopAnimation:self]; + [postListCancelButton_ setEnabled:NO]; + } + + // Get the description of the selected item, or the feed fetch error. + resultStr = @""; + + if (self.postListFetchError) { + // Display the error. + resultStr = [self.postListFetchError description]; + } else { + // Display the selected item. + GTLBloggerPost *item = [self selectedPost]; + if (item) { + resultStr = [item description]; + } + } + [postListResultTextView_ setString:resultStr]; + + // Enable buttons. + BOOL isBlogSelected = ([self selectedBlog] != nil); + BOOL isPostSelected = ([self selectedPost] != nil); + + BOOL hasTitleEditText = ([[postTitleField_ stringValue] length] > 0); + BOOL hasBodyEditText = ([[postBodyField_ stringValue] length] > 0); + BOOL hasAllEditText = hasTitleEditText && hasBodyEditText; + + [addPostButton_ setEnabled:(isBlogSelected && hasAllEditText)]; + [updatePostButton_ setEnabled:(isPostSelected && hasAllEditText)]; + [deletePostButton_ setEnabled:isPostSelected]; + [deleteAllPostsButton_ setEnabled:isBlogSelected]; + + [postTitleField_ setEnabled:isBlogSelected]; + [postBodyField_ setEnabled:isBlogSelected]; + + // Show or hide the text indicating that the client ID or client secret are + // needed. + BOOL hasClientIDStrings = [[clientIDField_ stringValue] length] > 0 + && [[clientSecretField_ stringValue] length] > 0; + [clientIDRequiredTextField_ setHidden:hasClientIDStrings]; +} + +- (void)displayAlert:(NSString *)title format:(NSString *)format, ... { + NSString *result = format; + if (format) { + va_list argList; + va_start(argList, format); + result = [[[NSString alloc] initWithFormat:format + arguments:argList] autorelease]; + va_end(argList); + } + NSBeginAlertSheet(title, nil, nil, nil, [self window], nil, nil, + nil, nil, result); +} + +#pragma mark Client ID Sheet + +// Client ID and Client Secret Sheet +// +// Sample apps need this sheet to ask for the client ID and client secret +// strings. +// +// Your application will just hardcode the client ID and client secret strings +// into the source rather than ask the user for them. +// +// The string values are obtained from the API Console, +// https://code.google.com/apis/console + +- (IBAction)clientIDClicked:(id)sender { + // Show the sheet for developers to enter their client ID and client secret + [NSApp beginSheet:clientIDSheet_ + modalForWindow:[self window] + modalDelegate:self + didEndSelector:@selector(clientIDSheetDidEnd:returnCode:contextInfo:) + contextInfo:NULL]; +} + +- (IBAction)clientIDDoneClicked:(id)sender { + [NSApp endSheet:clientIDSheet_ returnCode:NSOKButton]; +} + +- (void)clientIDSheetDidEnd:(NSWindow *)sheet + returnCode:(NSInteger)returnCode + contextInfo:(void *)contextInfo { + [sheet orderOut:self]; + [self updateUI]; +} + +#pragma mark Text field delegate methods + +- (void)controlTextDidChange:(NSNotification *)note { + [self updateUI]; // enable and disable buttons +} + +#pragma mark TableView delegate and data source methods + +- (void)tableViewSelectionDidChange:(NSNotification *)notification { + // The blog selection changed. + if ([notification object] == blogListTable_) { + [self fetchPostListForSelectedBlog]; + } else { + [self setPostEditFieldsFromSelectedPost]; + [self updateUI]; + } +} + +- (int)numberOfRowsInTableView:(NSTableView *)tableView { + if (tableView == blogListTable_) { + return [self.blogList.items count]; + } else { + return [self.postList.items count]; + } +} + +- (id)tableView:(NSTableView *)tableView +objectValueForTableColumn:(NSTableColumn *)tableColumn + row:(int)row { + if (tableView == blogListTable_) { + GTLBloggerBlog *item = [self.blogList itemAtIndex:row]; + NSString *title = item.name; + return title; + } else { + GTLBloggerPost *item = [self.postList itemAtIndex:row]; + NSString *title = item.title; + return title; + } +} + +@end diff --git a/GTL/Examples/BloggerSample/.svn/text-base/Info.plist.svn-base b/GTL/Examples/BloggerSample/.svn/text-base/Info.plist.svn-base new file mode 100644 index 0000000..d34b6c7 --- /dev/null +++ b/GTL/Examples/BloggerSample/.svn/text-base/Info.plist.svn-base @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.example.BloggerSample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/GTL/Examples/BloggerSample/.svn/text-base/README.txt.svn-base b/GTL/Examples/BloggerSample/.svn/text-base/README.txt.svn-base new file mode 100644 index 0000000..ff257a0 --- /dev/null +++ b/GTL/Examples/BloggerSample/.svn/text-base/README.txt.svn-base @@ -0,0 +1 @@ +This sample should automatically build and copy over the GTL.framework as part of the build-and-run process. diff --git a/GTL/Examples/BloggerSample/.svn/text-base/buildStripHeaders.svn-base b/GTL/Examples/BloggerSample/.svn/text-base/buildStripHeaders.svn-base new file mode 100644 index 0000000..0238ef2 --- /dev/null +++ b/GTL/Examples/BloggerSample/.svn/text-base/buildStripHeaders.svn-base @@ -0,0 +1,17 @@ +#!/bin/sh +# +# buildStripHeaders +# +# Remove header files from the built copy of the framework inside our +# application. + +# Strip "*.h" files +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname '*.h' -delete + +# Strip "Headers" links +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type l -delete + +# Strip "Headers" directories +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type d -prune -delete + + diff --git a/GTL/Examples/BloggerSample/.svn/text-base/main.m.svn-base b/GTL/Examples/BloggerSample/.svn/text-base/main.m.svn-base new file mode 100644 index 0000000..44680b9 --- /dev/null +++ b/GTL/Examples/BloggerSample/.svn/text-base/main.m.svn-base @@ -0,0 +1,24 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// main.m +// + +#import + +int main(int argc, char *argv[]) { + return NSApplicationMain(argc, (const char **) argv); +} diff --git a/GTL/Examples/BloggerSample/BloggerSample.xcodeproj/.svn/all-wcprops b/GTL/Examples/BloggerSample/BloggerSample.xcodeproj/.svn/all-wcprops new file mode 100644 index 0000000..4e9d0df --- /dev/null +++ b/GTL/Examples/BloggerSample/BloggerSample.xcodeproj/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/172/trunk/Examples/BloggerSample/BloggerSample.xcodeproj +END +project.pbxproj +K 25 +svn:wc:ra_dav:version-url +V 86 +/svn/!svn/ver/172/trunk/Examples/BloggerSample/BloggerSample.xcodeproj/project.pbxproj +END diff --git a/GTL/Examples/BloggerSample/BloggerSample.xcodeproj/.svn/entries b/GTL/Examples/BloggerSample/BloggerSample.xcodeproj/.svn/entries new file mode 100644 index 0000000..a35b8c1 --- /dev/null +++ b/GTL/Examples/BloggerSample/BloggerSample.xcodeproj/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/BloggerSample/BloggerSample.xcodeproj +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +project.pbxproj +file + + + + +2012-12-09T08:42:33.000000Z +6a45be1fc33acff3ba84d8681bd7b357 +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +27257 + diff --git a/GTL/Examples/BloggerSample/BloggerSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base b/GTL/Examples/BloggerSample/BloggerSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base new file mode 100644 index 0000000..6b06b10 --- /dev/null +++ b/GTL/Examples/BloggerSample/BloggerSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base @@ -0,0 +1,544 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F22A2141186315400FFBAB6 /* WebKit.framework */; }; + 4F2445C8121F0D2900FEE1DA /* GTL.framework in Copy GTL Framework */ = {isa = PBXBuildFile; fileRef = 4F2445BE121F0CF600FEE1DA /* GTL.framework */; }; + 4F2445C9121F0D2C00FEE1DA /* GTL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F2445BE121F0CF600FEE1DA /* GTL.framework */; }; + 4F9A73431578159900D7D1B5 /* BloggerSampleAppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F9A73401578159900D7D1B5 /* BloggerSampleAppController.m */; }; + 4F9A73441578159900D7D1B5 /* BloggerSampleWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F9A73421578159900D7D1B5 /* BloggerSampleWindowController.m */; }; + 4FA544A3134E93EE00068326 /* BloggerSampleWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA544A1134E93EE00068326 /* BloggerSampleWindow.xib */; }; + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */; }; + 4FAB9B5C157951EF000529A7 /* GTLBloggerBlog.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB9B45157951EF000529A7 /* GTLBloggerBlog.m */; }; + 4FAB9B5D157951EF000529A7 /* GTLBloggerBlogList.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB9B47157951EF000529A7 /* GTLBloggerBlogList.m */; }; + 4FAB9B5E157951EF000529A7 /* GTLBloggerComment.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB9B49157951EF000529A7 /* GTLBloggerComment.m */; }; + 4FAB9B5F157951EF000529A7 /* GTLBloggerCommentList.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB9B4B157951EF000529A7 /* GTLBloggerCommentList.m */; }; + 4FAB9B60157951EF000529A7 /* GTLBloggerConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB9B4D157951EF000529A7 /* GTLBloggerConstants.m */; }; + 4FAB9B61157951EF000529A7 /* GTLBloggerPage.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB9B4F157951EF000529A7 /* GTLBloggerPage.m */; }; + 4FAB9B62157951EF000529A7 /* GTLBloggerPageList.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB9B51157951EF000529A7 /* GTLBloggerPageList.m */; }; + 4FAB9B63157951EF000529A7 /* GTLBloggerPost.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB9B53157951EF000529A7 /* GTLBloggerPost.m */; }; + 4FAB9B64157951EF000529A7 /* GTLBloggerPostList.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB9B55157951EF000529A7 /* GTLBloggerPostList.m */; }; + 4FAB9B65157951EF000529A7 /* GTLBloggerUser.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB9B57157951EF000529A7 /* GTLBloggerUser.m */; }; + 4FAB9B66157951EF000529A7 /* GTLQueryBlogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB9B59157951EF000529A7 /* GTLQueryBlogger.m */; }; + 4FAB9B67157951EF000529A7 /* GTLServiceBlogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB9B5B157951EF000529A7 /* GTLServiceBlogger.m */; }; + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4F2445BD121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F38F6A60B66E91D00B24B81; + remoteInfo = GTLFramework; + }; + 4F2445BF121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027C11A4CA2F00BEB470; + remoteInfo = GTLTouchStaticLib; + }; + 4F2445C1121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027D11A4CA2F00BEB470; + remoteInfo = GTLUnitTests; + }; + 4F2445C3121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F1AD9020B71603F00DC0485; + remoteInfo = DevelopmentTestTool; + }; + 4F72439E12233FAF001A4AD0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 4F38F6A50B66E91D00B24B81; + remoteInfo = GTLFramework; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 4F38F8970B66FAB700B24B81 /* Copy GTL Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4F2445C8121F0D2900FEE1DA /* GTL.framework in Copy GTL Framework */, + ); + name = "Copy GTL Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 4F22A2141186315400FFBAB6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; + 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GTL.xcodeproj; path = ../../Source/GTL.xcodeproj; sourceTree = SOURCE_ROOT; }; + 4F9A733F1578159900D7D1B5 /* BloggerSampleAppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = BloggerSampleAppController.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 4F9A73401578159900D7D1B5 /* BloggerSampleAppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = BloggerSampleAppController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 4F9A73411578159900D7D1B5 /* BloggerSampleWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = BloggerSampleWindowController.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 4F9A73421578159900D7D1B5 /* BloggerSampleWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = BloggerSampleWindowController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 4FA544A2134E93EE00068326 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/BloggerSampleWindow.xib; sourceTree = ""; }; + 4FA6F3D21034AEC400C5DFA5 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; + 4FAB9B43157951EF000529A7 /* GTLBlogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBlogger.h; sourceTree = ""; }; + 4FAB9B44157951EF000529A7 /* GTLBloggerBlog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBloggerBlog.h; sourceTree = ""; }; + 4FAB9B45157951EF000529A7 /* GTLBloggerBlog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBloggerBlog.m; sourceTree = ""; }; + 4FAB9B46157951EF000529A7 /* GTLBloggerBlogList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBloggerBlogList.h; sourceTree = ""; }; + 4FAB9B47157951EF000529A7 /* GTLBloggerBlogList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBloggerBlogList.m; sourceTree = ""; }; + 4FAB9B48157951EF000529A7 /* GTLBloggerComment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBloggerComment.h; sourceTree = ""; }; + 4FAB9B49157951EF000529A7 /* GTLBloggerComment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBloggerComment.m; sourceTree = ""; }; + 4FAB9B4A157951EF000529A7 /* GTLBloggerCommentList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBloggerCommentList.h; sourceTree = ""; }; + 4FAB9B4B157951EF000529A7 /* GTLBloggerCommentList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBloggerCommentList.m; sourceTree = ""; }; + 4FAB9B4C157951EF000529A7 /* GTLBloggerConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBloggerConstants.h; sourceTree = ""; }; + 4FAB9B4D157951EF000529A7 /* GTLBloggerConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBloggerConstants.m; sourceTree = ""; }; + 4FAB9B4E157951EF000529A7 /* GTLBloggerPage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBloggerPage.h; sourceTree = ""; }; + 4FAB9B4F157951EF000529A7 /* GTLBloggerPage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBloggerPage.m; sourceTree = ""; }; + 4FAB9B50157951EF000529A7 /* GTLBloggerPageList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBloggerPageList.h; sourceTree = ""; }; + 4FAB9B51157951EF000529A7 /* GTLBloggerPageList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBloggerPageList.m; sourceTree = ""; }; + 4FAB9B52157951EF000529A7 /* GTLBloggerPost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBloggerPost.h; sourceTree = ""; }; + 4FAB9B53157951EF000529A7 /* GTLBloggerPost.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBloggerPost.m; sourceTree = ""; }; + 4FAB9B54157951EF000529A7 /* GTLBloggerPostList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBloggerPostList.h; sourceTree = ""; }; + 4FAB9B55157951EF000529A7 /* GTLBloggerPostList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBloggerPostList.m; sourceTree = ""; }; + 4FAB9B56157951EF000529A7 /* GTLBloggerUser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBloggerUser.h; sourceTree = ""; }; + 4FAB9B57157951EF000529A7 /* GTLBloggerUser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBloggerUser.m; sourceTree = ""; }; + 4FAB9B58157951EF000529A7 /* GTLQueryBlogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLQueryBlogger.h; sourceTree = ""; }; + 4FAB9B59157951EF000529A7 /* GTLQueryBlogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLQueryBlogger.m; sourceTree = ""; }; + 4FAB9B5A157951EF000529A7 /* GTLServiceBlogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLServiceBlogger.h; sourceTree = ""; }; + 4FAB9B5B157951EF000529A7 /* GTLServiceBlogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLServiceBlogger.m; sourceTree = ""; }; + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = buildStripHeaders; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 8D1107320486CEB800E47090 /* BloggerSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BloggerSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F2445C9121F0D2C00FEE1DA /* GTL.framework in Frameworks */, + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 4F9A733F1578159900D7D1B5 /* BloggerSampleAppController.h */, + 4F9A73401578159900D7D1B5 /* BloggerSampleAppController.m */, + 4F9A73411578159900D7D1B5 /* BloggerSampleWindowController.h */, + 4F9A73421578159900D7D1B5 /* BloggerSampleWindowController.m */, + ); + name = Classes; + sourceTree = ""; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 4F22A2141186315400FFBAB6 /* WebKit.framework */, + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* BloggerSample.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CalendarSample */ = { + isa = PBXGroup; + children = ( + 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */, + 080E96DDFE201D6D7F000001 /* Classes */, + 4FB25385138C3F9E00B5C1AE /* API Services */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CalendarSample; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 4FA544A1134E93EE00068326 /* BloggerSampleWindow.xib */, + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */, + 8D1107310486CEB800E47090 /* Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4F2445B7121F0CF600FEE1DA /* Products */ = { + isa = PBXGroup; + children = ( + 4F2445BE121F0CF600FEE1DA /* GTL.framework */, + 4F2445C0121F0CF600FEE1DA /* libGTLTouchStaticLib.a */, + 4F2445C2121F0CF600FEE1DA /* GTLUnitTests.octest */, + 4F2445C4121F0CF600FEE1DA /* DevelopmentTestTool */, + ); + name = Products; + sourceTree = ""; + }; + 4FAB9B42157951EF000529A7 /* Generated */ = { + isa = PBXGroup; + children = ( + 4FAB9B43157951EF000529A7 /* GTLBlogger.h */, + 4FAB9B44157951EF000529A7 /* GTLBloggerBlog.h */, + 4FAB9B45157951EF000529A7 /* GTLBloggerBlog.m */, + 4FAB9B46157951EF000529A7 /* GTLBloggerBlogList.h */, + 4FAB9B47157951EF000529A7 /* GTLBloggerBlogList.m */, + 4FAB9B48157951EF000529A7 /* GTLBloggerComment.h */, + 4FAB9B49157951EF000529A7 /* GTLBloggerComment.m */, + 4FAB9B4A157951EF000529A7 /* GTLBloggerCommentList.h */, + 4FAB9B4B157951EF000529A7 /* GTLBloggerCommentList.m */, + 4FAB9B4C157951EF000529A7 /* GTLBloggerConstants.h */, + 4FAB9B4D157951EF000529A7 /* GTLBloggerConstants.m */, + 4FAB9B4E157951EF000529A7 /* GTLBloggerPage.h */, + 4FAB9B4F157951EF000529A7 /* GTLBloggerPage.m */, + 4FAB9B50157951EF000529A7 /* GTLBloggerPageList.h */, + 4FAB9B51157951EF000529A7 /* GTLBloggerPageList.m */, + 4FAB9B52157951EF000529A7 /* GTLBloggerPost.h */, + 4FAB9B53157951EF000529A7 /* GTLBloggerPost.m */, + 4FAB9B54157951EF000529A7 /* GTLBloggerPostList.h */, + 4FAB9B55157951EF000529A7 /* GTLBloggerPostList.m */, + 4FAB9B56157951EF000529A7 /* GTLBloggerUser.h */, + 4FAB9B57157951EF000529A7 /* GTLBloggerUser.m */, + 4FAB9B58157951EF000529A7 /* GTLQueryBlogger.h */, + 4FAB9B59157951EF000529A7 /* GTLQueryBlogger.m */, + 4FAB9B5A157951EF000529A7 /* GTLServiceBlogger.h */, + 4FAB9B5B157951EF000529A7 /* GTLServiceBlogger.m */, + ); + name = Generated; + path = ../../Source/Services/Blogger/Generated; + sourceTree = ""; + }; + 4FB25385138C3F9E00B5C1AE /* API Services */ = { + isa = PBXGroup; + children = ( + 4FAB9B42157951EF000529A7 /* Generated */, + ); + name = "API Services"; + sourceTree = ""; + }; + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */ = { + isa = PBXGroup; + children = ( + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */, + ); + name = "Build Scripts"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* BloggerSample */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "BloggerSample" */; + buildPhases = ( + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + 4F38F8970B66FAB700B24B81 /* Copy GTL Framework */, + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */, + ); + buildRules = ( + ); + dependencies = ( + 4F72439F12233FAF001A4AD0 /* PBXTargetDependency */, + ); + name = BloggerSample; + productInstallPath = "$(HOME)/Applications"; + productName = CalendarSample; + productReference = 8D1107320486CEB800E47090 /* BloggerSample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "BloggerSample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CalendarSample */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 4F2445B7121F0CF600FEE1DA /* Products */; + ProjectRef = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* BloggerSample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 4F2445BE121F0CF600FEE1DA /* GTL.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = GTL.framework; + remoteRef = 4F2445BD121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C0121F0CF600FEE1DA /* libGTLTouchStaticLib.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libGTLTouchStaticLib.a; + remoteRef = 4F2445BF121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C2121F0CF600FEE1DA /* GTLUnitTests.octest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = GTLUnitTests.octest; + remoteRef = 4F2445C1121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C4121F0CF600FEE1DA /* DevelopmentTestTool */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = DevelopmentTestTool; + remoteRef = 4F2445C3121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */, + 4FA544A3134E93EE00068326 /* BloggerSampleWindow.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Strip Headers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ./buildStripHeaders; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072D0486CEB800E47090 /* main.m in Sources */, + 4F9A73431578159900D7D1B5 /* BloggerSampleAppController.m in Sources */, + 4F9A73441578159900D7D1B5 /* BloggerSampleWindowController.m in Sources */, + 4FAB9B5C157951EF000529A7 /* GTLBloggerBlog.m in Sources */, + 4FAB9B5D157951EF000529A7 /* GTLBloggerBlogList.m in Sources */, + 4FAB9B5E157951EF000529A7 /* GTLBloggerComment.m in Sources */, + 4FAB9B5F157951EF000529A7 /* GTLBloggerCommentList.m in Sources */, + 4FAB9B60157951EF000529A7 /* GTLBloggerConstants.m in Sources */, + 4FAB9B61157951EF000529A7 /* GTLBloggerPage.m in Sources */, + 4FAB9B62157951EF000529A7 /* GTLBloggerPageList.m in Sources */, + 4FAB9B63157951EF000529A7 /* GTLBloggerPost.m in Sources */, + 4FAB9B64157951EF000529A7 /* GTLBloggerPostList.m in Sources */, + 4FAB9B65157951EF000529A7 /* GTLBloggerUser.m in Sources */, + 4FAB9B66157951EF000529A7 /* GTLQueryBlogger.m in Sources */, + 4FAB9B67157951EF000529A7 /* GTLServiceBlogger.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 4F72439F12233FAF001A4AD0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = GTLFramework; + targetProxy = 4F72439E12233FAF001A4AD0 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C165DFE840E0CC02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 4FA544A1134E93EE00068326 /* BloggerSampleWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 4FA544A2134E93EE00068326 /* English */, + ); + name = BloggerSampleWindow.xib; + sourceTree = ""; + }; + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 4FA6F3D21034AEC400C5DFA5 /* English */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + INFOPLIST_FILE = Info.plist; + PRODUCT_NAME = BloggerSample; + RUN_CLANG_STATIC_ANALYZER = YES; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + INFOPLIST_FILE = Info.plist; + PRODUCT_NAME = BloggerSample; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = ( + "-DGTL_BUILT_AS_FRAMEWORK=1", + "-DDEBUG=1", + ); + RUN_CLANG_STATIC_ANALYZER = YES; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DGTL_BUILT_AS_FRAMEWORK=1"; + RUN_CLANG_STATIC_ANALYZER = YES; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "BloggerSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "BloggerSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/GTL/Examples/BloggerSample/BloggerSample.xcodeproj/project.pbxproj b/GTL/Examples/BloggerSample/BloggerSample.xcodeproj/project.pbxproj new file mode 100644 index 0000000..6b06b10 --- /dev/null +++ b/GTL/Examples/BloggerSample/BloggerSample.xcodeproj/project.pbxproj @@ -0,0 +1,544 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F22A2141186315400FFBAB6 /* WebKit.framework */; }; + 4F2445C8121F0D2900FEE1DA /* GTL.framework in Copy GTL Framework */ = {isa = PBXBuildFile; fileRef = 4F2445BE121F0CF600FEE1DA /* GTL.framework */; }; + 4F2445C9121F0D2C00FEE1DA /* GTL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F2445BE121F0CF600FEE1DA /* GTL.framework */; }; + 4F9A73431578159900D7D1B5 /* BloggerSampleAppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F9A73401578159900D7D1B5 /* BloggerSampleAppController.m */; }; + 4F9A73441578159900D7D1B5 /* BloggerSampleWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F9A73421578159900D7D1B5 /* BloggerSampleWindowController.m */; }; + 4FA544A3134E93EE00068326 /* BloggerSampleWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA544A1134E93EE00068326 /* BloggerSampleWindow.xib */; }; + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */; }; + 4FAB9B5C157951EF000529A7 /* GTLBloggerBlog.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB9B45157951EF000529A7 /* GTLBloggerBlog.m */; }; + 4FAB9B5D157951EF000529A7 /* GTLBloggerBlogList.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB9B47157951EF000529A7 /* GTLBloggerBlogList.m */; }; + 4FAB9B5E157951EF000529A7 /* GTLBloggerComment.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB9B49157951EF000529A7 /* GTLBloggerComment.m */; }; + 4FAB9B5F157951EF000529A7 /* GTLBloggerCommentList.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB9B4B157951EF000529A7 /* GTLBloggerCommentList.m */; }; + 4FAB9B60157951EF000529A7 /* GTLBloggerConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB9B4D157951EF000529A7 /* GTLBloggerConstants.m */; }; + 4FAB9B61157951EF000529A7 /* GTLBloggerPage.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB9B4F157951EF000529A7 /* GTLBloggerPage.m */; }; + 4FAB9B62157951EF000529A7 /* GTLBloggerPageList.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB9B51157951EF000529A7 /* GTLBloggerPageList.m */; }; + 4FAB9B63157951EF000529A7 /* GTLBloggerPost.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB9B53157951EF000529A7 /* GTLBloggerPost.m */; }; + 4FAB9B64157951EF000529A7 /* GTLBloggerPostList.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB9B55157951EF000529A7 /* GTLBloggerPostList.m */; }; + 4FAB9B65157951EF000529A7 /* GTLBloggerUser.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB9B57157951EF000529A7 /* GTLBloggerUser.m */; }; + 4FAB9B66157951EF000529A7 /* GTLQueryBlogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB9B59157951EF000529A7 /* GTLQueryBlogger.m */; }; + 4FAB9B67157951EF000529A7 /* GTLServiceBlogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB9B5B157951EF000529A7 /* GTLServiceBlogger.m */; }; + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4F2445BD121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F38F6A60B66E91D00B24B81; + remoteInfo = GTLFramework; + }; + 4F2445BF121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027C11A4CA2F00BEB470; + remoteInfo = GTLTouchStaticLib; + }; + 4F2445C1121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027D11A4CA2F00BEB470; + remoteInfo = GTLUnitTests; + }; + 4F2445C3121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F1AD9020B71603F00DC0485; + remoteInfo = DevelopmentTestTool; + }; + 4F72439E12233FAF001A4AD0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 4F38F6A50B66E91D00B24B81; + remoteInfo = GTLFramework; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 4F38F8970B66FAB700B24B81 /* Copy GTL Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4F2445C8121F0D2900FEE1DA /* GTL.framework in Copy GTL Framework */, + ); + name = "Copy GTL Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 4F22A2141186315400FFBAB6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; + 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GTL.xcodeproj; path = ../../Source/GTL.xcodeproj; sourceTree = SOURCE_ROOT; }; + 4F9A733F1578159900D7D1B5 /* BloggerSampleAppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = BloggerSampleAppController.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 4F9A73401578159900D7D1B5 /* BloggerSampleAppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = BloggerSampleAppController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 4F9A73411578159900D7D1B5 /* BloggerSampleWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = BloggerSampleWindowController.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 4F9A73421578159900D7D1B5 /* BloggerSampleWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = BloggerSampleWindowController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 4FA544A2134E93EE00068326 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/BloggerSampleWindow.xib; sourceTree = ""; }; + 4FA6F3D21034AEC400C5DFA5 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; + 4FAB9B43157951EF000529A7 /* GTLBlogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBlogger.h; sourceTree = ""; }; + 4FAB9B44157951EF000529A7 /* GTLBloggerBlog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBloggerBlog.h; sourceTree = ""; }; + 4FAB9B45157951EF000529A7 /* GTLBloggerBlog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBloggerBlog.m; sourceTree = ""; }; + 4FAB9B46157951EF000529A7 /* GTLBloggerBlogList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBloggerBlogList.h; sourceTree = ""; }; + 4FAB9B47157951EF000529A7 /* GTLBloggerBlogList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBloggerBlogList.m; sourceTree = ""; }; + 4FAB9B48157951EF000529A7 /* GTLBloggerComment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBloggerComment.h; sourceTree = ""; }; + 4FAB9B49157951EF000529A7 /* GTLBloggerComment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBloggerComment.m; sourceTree = ""; }; + 4FAB9B4A157951EF000529A7 /* GTLBloggerCommentList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBloggerCommentList.h; sourceTree = ""; }; + 4FAB9B4B157951EF000529A7 /* GTLBloggerCommentList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBloggerCommentList.m; sourceTree = ""; }; + 4FAB9B4C157951EF000529A7 /* GTLBloggerConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBloggerConstants.h; sourceTree = ""; }; + 4FAB9B4D157951EF000529A7 /* GTLBloggerConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBloggerConstants.m; sourceTree = ""; }; + 4FAB9B4E157951EF000529A7 /* GTLBloggerPage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBloggerPage.h; sourceTree = ""; }; + 4FAB9B4F157951EF000529A7 /* GTLBloggerPage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBloggerPage.m; sourceTree = ""; }; + 4FAB9B50157951EF000529A7 /* GTLBloggerPageList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBloggerPageList.h; sourceTree = ""; }; + 4FAB9B51157951EF000529A7 /* GTLBloggerPageList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBloggerPageList.m; sourceTree = ""; }; + 4FAB9B52157951EF000529A7 /* GTLBloggerPost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBloggerPost.h; sourceTree = ""; }; + 4FAB9B53157951EF000529A7 /* GTLBloggerPost.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBloggerPost.m; sourceTree = ""; }; + 4FAB9B54157951EF000529A7 /* GTLBloggerPostList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBloggerPostList.h; sourceTree = ""; }; + 4FAB9B55157951EF000529A7 /* GTLBloggerPostList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBloggerPostList.m; sourceTree = ""; }; + 4FAB9B56157951EF000529A7 /* GTLBloggerUser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBloggerUser.h; sourceTree = ""; }; + 4FAB9B57157951EF000529A7 /* GTLBloggerUser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBloggerUser.m; sourceTree = ""; }; + 4FAB9B58157951EF000529A7 /* GTLQueryBlogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLQueryBlogger.h; sourceTree = ""; }; + 4FAB9B59157951EF000529A7 /* GTLQueryBlogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLQueryBlogger.m; sourceTree = ""; }; + 4FAB9B5A157951EF000529A7 /* GTLServiceBlogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLServiceBlogger.h; sourceTree = ""; }; + 4FAB9B5B157951EF000529A7 /* GTLServiceBlogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLServiceBlogger.m; sourceTree = ""; }; + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = buildStripHeaders; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 8D1107320486CEB800E47090 /* BloggerSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BloggerSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F2445C9121F0D2C00FEE1DA /* GTL.framework in Frameworks */, + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 4F9A733F1578159900D7D1B5 /* BloggerSampleAppController.h */, + 4F9A73401578159900D7D1B5 /* BloggerSampleAppController.m */, + 4F9A73411578159900D7D1B5 /* BloggerSampleWindowController.h */, + 4F9A73421578159900D7D1B5 /* BloggerSampleWindowController.m */, + ); + name = Classes; + sourceTree = ""; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 4F22A2141186315400FFBAB6 /* WebKit.framework */, + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* BloggerSample.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CalendarSample */ = { + isa = PBXGroup; + children = ( + 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */, + 080E96DDFE201D6D7F000001 /* Classes */, + 4FB25385138C3F9E00B5C1AE /* API Services */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CalendarSample; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 4FA544A1134E93EE00068326 /* BloggerSampleWindow.xib */, + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */, + 8D1107310486CEB800E47090 /* Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4F2445B7121F0CF600FEE1DA /* Products */ = { + isa = PBXGroup; + children = ( + 4F2445BE121F0CF600FEE1DA /* GTL.framework */, + 4F2445C0121F0CF600FEE1DA /* libGTLTouchStaticLib.a */, + 4F2445C2121F0CF600FEE1DA /* GTLUnitTests.octest */, + 4F2445C4121F0CF600FEE1DA /* DevelopmentTestTool */, + ); + name = Products; + sourceTree = ""; + }; + 4FAB9B42157951EF000529A7 /* Generated */ = { + isa = PBXGroup; + children = ( + 4FAB9B43157951EF000529A7 /* GTLBlogger.h */, + 4FAB9B44157951EF000529A7 /* GTLBloggerBlog.h */, + 4FAB9B45157951EF000529A7 /* GTLBloggerBlog.m */, + 4FAB9B46157951EF000529A7 /* GTLBloggerBlogList.h */, + 4FAB9B47157951EF000529A7 /* GTLBloggerBlogList.m */, + 4FAB9B48157951EF000529A7 /* GTLBloggerComment.h */, + 4FAB9B49157951EF000529A7 /* GTLBloggerComment.m */, + 4FAB9B4A157951EF000529A7 /* GTLBloggerCommentList.h */, + 4FAB9B4B157951EF000529A7 /* GTLBloggerCommentList.m */, + 4FAB9B4C157951EF000529A7 /* GTLBloggerConstants.h */, + 4FAB9B4D157951EF000529A7 /* GTLBloggerConstants.m */, + 4FAB9B4E157951EF000529A7 /* GTLBloggerPage.h */, + 4FAB9B4F157951EF000529A7 /* GTLBloggerPage.m */, + 4FAB9B50157951EF000529A7 /* GTLBloggerPageList.h */, + 4FAB9B51157951EF000529A7 /* GTLBloggerPageList.m */, + 4FAB9B52157951EF000529A7 /* GTLBloggerPost.h */, + 4FAB9B53157951EF000529A7 /* GTLBloggerPost.m */, + 4FAB9B54157951EF000529A7 /* GTLBloggerPostList.h */, + 4FAB9B55157951EF000529A7 /* GTLBloggerPostList.m */, + 4FAB9B56157951EF000529A7 /* GTLBloggerUser.h */, + 4FAB9B57157951EF000529A7 /* GTLBloggerUser.m */, + 4FAB9B58157951EF000529A7 /* GTLQueryBlogger.h */, + 4FAB9B59157951EF000529A7 /* GTLQueryBlogger.m */, + 4FAB9B5A157951EF000529A7 /* GTLServiceBlogger.h */, + 4FAB9B5B157951EF000529A7 /* GTLServiceBlogger.m */, + ); + name = Generated; + path = ../../Source/Services/Blogger/Generated; + sourceTree = ""; + }; + 4FB25385138C3F9E00B5C1AE /* API Services */ = { + isa = PBXGroup; + children = ( + 4FAB9B42157951EF000529A7 /* Generated */, + ); + name = "API Services"; + sourceTree = ""; + }; + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */ = { + isa = PBXGroup; + children = ( + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */, + ); + name = "Build Scripts"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* BloggerSample */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "BloggerSample" */; + buildPhases = ( + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + 4F38F8970B66FAB700B24B81 /* Copy GTL Framework */, + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */, + ); + buildRules = ( + ); + dependencies = ( + 4F72439F12233FAF001A4AD0 /* PBXTargetDependency */, + ); + name = BloggerSample; + productInstallPath = "$(HOME)/Applications"; + productName = CalendarSample; + productReference = 8D1107320486CEB800E47090 /* BloggerSample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "BloggerSample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CalendarSample */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 4F2445B7121F0CF600FEE1DA /* Products */; + ProjectRef = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* BloggerSample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 4F2445BE121F0CF600FEE1DA /* GTL.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = GTL.framework; + remoteRef = 4F2445BD121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C0121F0CF600FEE1DA /* libGTLTouchStaticLib.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libGTLTouchStaticLib.a; + remoteRef = 4F2445BF121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C2121F0CF600FEE1DA /* GTLUnitTests.octest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = GTLUnitTests.octest; + remoteRef = 4F2445C1121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C4121F0CF600FEE1DA /* DevelopmentTestTool */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = DevelopmentTestTool; + remoteRef = 4F2445C3121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */, + 4FA544A3134E93EE00068326 /* BloggerSampleWindow.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Strip Headers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ./buildStripHeaders; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072D0486CEB800E47090 /* main.m in Sources */, + 4F9A73431578159900D7D1B5 /* BloggerSampleAppController.m in Sources */, + 4F9A73441578159900D7D1B5 /* BloggerSampleWindowController.m in Sources */, + 4FAB9B5C157951EF000529A7 /* GTLBloggerBlog.m in Sources */, + 4FAB9B5D157951EF000529A7 /* GTLBloggerBlogList.m in Sources */, + 4FAB9B5E157951EF000529A7 /* GTLBloggerComment.m in Sources */, + 4FAB9B5F157951EF000529A7 /* GTLBloggerCommentList.m in Sources */, + 4FAB9B60157951EF000529A7 /* GTLBloggerConstants.m in Sources */, + 4FAB9B61157951EF000529A7 /* GTLBloggerPage.m in Sources */, + 4FAB9B62157951EF000529A7 /* GTLBloggerPageList.m in Sources */, + 4FAB9B63157951EF000529A7 /* GTLBloggerPost.m in Sources */, + 4FAB9B64157951EF000529A7 /* GTLBloggerPostList.m in Sources */, + 4FAB9B65157951EF000529A7 /* GTLBloggerUser.m in Sources */, + 4FAB9B66157951EF000529A7 /* GTLQueryBlogger.m in Sources */, + 4FAB9B67157951EF000529A7 /* GTLServiceBlogger.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 4F72439F12233FAF001A4AD0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = GTLFramework; + targetProxy = 4F72439E12233FAF001A4AD0 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C165DFE840E0CC02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 4FA544A1134E93EE00068326 /* BloggerSampleWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 4FA544A2134E93EE00068326 /* English */, + ); + name = BloggerSampleWindow.xib; + sourceTree = ""; + }; + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 4FA6F3D21034AEC400C5DFA5 /* English */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + INFOPLIST_FILE = Info.plist; + PRODUCT_NAME = BloggerSample; + RUN_CLANG_STATIC_ANALYZER = YES; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + INFOPLIST_FILE = Info.plist; + PRODUCT_NAME = BloggerSample; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = ( + "-DGTL_BUILT_AS_FRAMEWORK=1", + "-DDEBUG=1", + ); + RUN_CLANG_STATIC_ANALYZER = YES; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DGTL_BUILT_AS_FRAMEWORK=1"; + RUN_CLANG_STATIC_ANALYZER = YES; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "BloggerSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "BloggerSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/GTL/Examples/BloggerSample/BloggerSampleAppController.h b/GTL/Examples/BloggerSample/BloggerSampleAppController.h new file mode 100644 index 0000000..e1d470f --- /dev/null +++ b/GTL/Examples/BloggerSample/BloggerSampleAppController.h @@ -0,0 +1,23 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// BloggerSampleAppController.h +// + +#import + +@interface BloggerSampleAppController : NSObject +@end diff --git a/GTL/Examples/BloggerSample/BloggerSampleAppController.m b/GTL/Examples/BloggerSample/BloggerSampleAppController.m new file mode 100644 index 0000000..3a56c02 --- /dev/null +++ b/GTL/Examples/BloggerSample/BloggerSampleAppController.m @@ -0,0 +1,35 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// BloggerSampleAppController.m +// + +#import "BloggerSampleAppController.h" +#import "BloggerSampleWindowController.h" + +@implementation BloggerSampleAppController + +- (void)applicationWillFinishLaunching:(NSNotification *)notification { + BloggerSampleWindowController* windowController + = [BloggerSampleWindowController sharedWindowController]; + [windowController showWindow:self]; +} + +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { + return YES; +} + +@end diff --git a/GTL/Examples/BloggerSample/BloggerSampleWindowController.h b/GTL/Examples/BloggerSample/BloggerSampleWindowController.h new file mode 100644 index 0000000..d520eb2 --- /dev/null +++ b/GTL/Examples/BloggerSample/BloggerSampleWindowController.h @@ -0,0 +1,88 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// BloggerSampleWindowController.h +// + +#import + +#import "GTLBlogger.h" +#import "GTL/GTMOAuth2WindowController.h" + +@interface BloggerSampleWindowController : NSWindowController { + @private + IBOutlet NSTextField *signedInField_; + IBOutlet NSButton *signedInButton_; + + IBOutlet NSTableView *blogListTable_; + IBOutlet NSProgressIndicator *blogListProgressIndicator_; + IBOutlet NSTextView *blogListResultTextView_; + IBOutlet NSButton *blogListCancelButton_; + + IBOutlet NSTableView *postListTable_; + IBOutlet NSProgressIndicator *postListProgressIndicator_; + IBOutlet NSTextView *postListResultTextView_; + IBOutlet NSButton *postListCancelButton_; + + IBOutlet NSTextField *postTitleField_; + IBOutlet NSTextField *postBodyField_; + + IBOutlet NSButton *addPostButton_; + IBOutlet NSButton *updatePostButton_; + IBOutlet NSButton *deletePostButton_; + IBOutlet NSButton *deleteAllPostsButton_; + + // Client ID Sheet outlets (Not needed for real apps) + IBOutlet NSButton *clientIDButton_; + IBOutlet NSTextField *clientIDRequiredTextField_; + IBOutlet NSWindow *clientIDSheet_; + IBOutlet NSTextField *clientIDField_; + IBOutlet NSTextField *clientSecretField_; + + + GTLBloggerBlogList *blogList_; + GTLServiceTicket *blogListTicket_; + NSError *blogListFetchError_; + + GTLBloggerPostList *postList_; + GTLServiceTicket *postListTicket_; + NSError *postListFetchError_; + + GTLServiceTicket *editPostTicket_; +} + ++ (BloggerSampleWindowController *)sharedWindowController; + +- (IBAction)signInClicked:(id)sender; + +- (IBAction)getBlogListClicked:(id)sender; + +- (IBAction)cancelBlogFetchClicked:(id)sender; +- (IBAction)cancelPostFetchClicked:(id)sender; + +- (IBAction)addPostClicked:(id)sender; +- (IBAction)updatePostClicked:(id)sender; +- (IBAction)deletePostClicked:(id)sender; +- (IBAction)deleteAllPostsClicked:(id)sender; + +- (IBAction)APIConsoleClicked:(id)sender; +- (IBAction)loggingCheckboxClicked:(id)sender; + +// Client ID sheet +- (IBAction)clientIDClicked:(id)sender; +- (IBAction)clientIDDoneClicked:(id)sender; + +@end diff --git a/GTL/Examples/BloggerSample/BloggerSampleWindowController.m b/GTL/Examples/BloggerSample/BloggerSampleWindowController.m new file mode 100644 index 0000000..bb546e5 --- /dev/null +++ b/GTL/Examples/BloggerSample/BloggerSampleWindowController.m @@ -0,0 +1,699 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// BloggerSampleWindowController.m +// + +#import "BloggerSampleWindowController.h" + +#import "GTL/GTLUtilities.h" +#import "GTL/GTMHTTPFetcherLogging.h" + +@interface BloggerSampleWindowController () + +@property (readonly) GTLServiceBlogger *bloggerService; + +@property (retain) GTLBloggerBlogList *blogList; +@property (retain) GTLServiceTicket *blogListTicket; +@property (retain) NSError *blogListFetchError; + +@property (retain) GTLBloggerPostList *postList; +@property (retain) GTLServiceTicket *postListTicket; +@property (retain) NSError *postListFetchError; + +@property (retain) GTLServiceTicket *editPostTicket; + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel; + +- (void)updateUI; +- (void)displayAlert:(NSString *)title format:(NSString *)format, ...; + +- (void)fetchBlogList; +- (void)fetchPostListForSelectedBlog; + +- (GTLBloggerBlog *)selectedBlog; + +@end + +// Keychain item name for saving the user's authentication information +NSString *const kKeychainItemName = @"BloggerSample: Google Blogger"; + +@implementation BloggerSampleWindowController + +@synthesize blogList = blogList_, + blogListTicket = blogListTicket_, + blogListFetchError = blogListFetchError_, + postList = postList_, + postListTicket = postListTicket_, + postListFetchError = postListFetchError_, + editPostTicket = editPostTicket_; + ++ (BloggerSampleWindowController *)sharedWindowController { + static BloggerSampleWindowController* gWindowController = nil; + if (!gWindowController) { + gWindowController = [[BloggerSampleWindowController alloc] init]; + } + return gWindowController; +} + +- (id)init { + return [self initWithWindowNibName:@"BloggerSampleWindow"]; +} + +- (void)awakeFromNib { + // Load the OAuth token from the keychain, if it was previously saved. + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + GTMOAuth2Authentication *auth; + auth = [GTMOAuth2WindowController authForGoogleFromKeychainForName:kKeychainItemName + clientID:clientID + clientSecret:clientSecret]; + self.bloggerService.authorizer = auth; + + // Set the result text fields to have a distinctive color and mono-spaced font + [blogListResultTextView_ setTextColor:[NSColor darkGrayColor]]; + [postListResultTextView_ setTextColor:[NSColor darkGrayColor]]; + + NSFont *resultTextFont = [NSFont fontWithName:@"Monaco" size:9]; + [blogListResultTextView_ setFont:resultTextFont]; + [postListResultTextView_ setFont:resultTextFont]; + + [self updateUI]; +} + +- (void)dealloc { + [blogList_ release]; + [blogListTicket_ release]; + [blogListFetchError_ release]; + + [postList_ release]; + [postListTicket_ release]; + [postListFetchError_ release]; + + [editPostTicket_ release]; + + [super dealloc]; +} + +#pragma mark - + +- (NSString *)signedInUsername { + // Get the email address of the signed-in user. + GTMOAuth2Authentication *auth = self.bloggerService.authorizer; + BOOL isSignedIn = auth.canAuthorize; + if (isSignedIn) { + return auth.userEmail; + } else { + return nil; + } +} + +- (BOOL)isSignedIn { + NSString *name = [self signedInUsername]; + return (name != nil); +} + +#pragma mark IBActions + +- (IBAction)signInClicked:(id)sender { + if (![self isSignedIn]) { + // Sign in + [self runSigninThenInvokeSelector:@selector(updateUI)]; + } else { + // Sign out + GTLServiceBlogger *service = self.bloggerService; + + [GTMOAuth2WindowController removeAuthFromKeychainForName:kKeychainItemName]; + service.authorizer = nil; + [self updateUI]; + } +} + +- (IBAction)getBlogListClicked:(id)sender { + if (![self isSignedIn]) { + [self runSigninThenInvokeSelector:@selector(fetchBlogList)]; + } else { + [self fetchBlogList]; + } +} + +- (IBAction)cancelBlogFetchClicked:(id)sender { + [self.blogListTicket cancelTicket]; + self.blogListTicket = nil; + + [self updateUI]; +} + +- (IBAction)cancelPostFetchClicked:(id)sender { + [self.postListTicket cancelTicket]; + self.postListTicket = nil; + + [self.editPostTicket cancelTicket]; + self.editPostTicket = nil; + + [self updateUI]; +} + +- (IBAction)addPostClicked:(id)sender { + [self addAPost]; +} + +- (IBAction)updatePostClicked:(id)sender { + [self updateSelectedPost]; +} + +- (IBAction)deletePostClicked:(id)sender { + GTLBloggerPost *selectedPost = [self selectedPost]; + + NSBeginAlertSheet(@"Delete", nil, @"Cancel", nil, + [self window], self, + @selector(deletePostSheetDidEnd:returnCode:contextInfo:), + nil, nil, @"Delete \"%@\"?", selectedPost.title); +} + +- (void)deletePostSheetDidEnd:(NSWindow *)sheet + returnCode:(int)returnCode + contextInfo:(void *)contextInfo { + if (returnCode == NSAlertDefaultReturn) { + [self deleteSelectedPost]; + } +} + +- (IBAction)deleteAllPostsClicked:(id)sender { + GTLBloggerBlog *selectedBlog = [self selectedBlog]; + + NSBeginAlertSheet(@"Delete", nil, @"Cancel", nil, + [self window], self, + @selector(deleteAllPostsSheetDidEnd:returnCode:contextInfo:), + nil, nil, @"Permanently delete ALL posts for blog \"%@\"?", + selectedBlog.name); +} + +- (void)deleteAllPostsSheetDidEnd:(NSWindow *)sheet + returnCode:(int)returnCode + contextInfo:(void *)contextInfo { + if (returnCode == NSAlertDefaultReturn) { + [self deleteAllPosts]; + } +} + +- (IBAction)APIConsoleClicked:(id)sender { + NSURL *url = [NSURL URLWithString:@"https://code.google.com/apis/console"]; + [[NSWorkspace sharedWorkspace] openURL:url]; +} + +- (IBAction)loggingCheckboxClicked:(id)sender { + [GTMHTTPFetcher setLoggingEnabled:[sender state]]; +} + +#pragma mark - + +// Get a service object with the current username/password +// +// A "service" object handles networking tasks. Service objects +// contain user authentication information as well as networking +// state information (such as cookies and the "last modified" date for +// fetched data.) + +- (GTLServiceBlogger *)bloggerService { + static GTLServiceBlogger *service = nil; + + if (!service) { + service = [[GTLServiceBlogger alloc] init]; + + // Have the service object set tickets to fetch consecutive pages + // of the feed so we do not need to manually fetch them. + service.shouldFetchNextPages = YES; + + // Have the service object set tickets to retry temporary error conditions + // automatically. + service.retryEnabled = YES; + } + return service; +} + +- (GTLBloggerBlog *)selectedBlog { + int rowIndex = [blogListTable_ selectedRow]; + if (rowIndex > -1) { + GTLBloggerBlog *item = [self.blogList itemAtIndex:rowIndex]; + return item; + } + return nil; +} + +- (GTLBloggerPost *)selectedPost { + int rowIndex = [postListTable_ selectedRow]; + if (rowIndex > -1) { + GTLBloggerPost *item = [self.postList itemAtIndex:rowIndex]; + return item; + } + return nil; +} + +- (void)setPostEditFieldsFromSelectedPost { + GTLBloggerPost *selectedPost = [self selectedPost]; + if (selectedPost) { + [postTitleField_ setStringValue:selectedPost.title]; + [postBodyField_ setStringValue:selectedPost.content]; + } else { + [postTitleField_ setStringValue:@""]; + [postBodyField_ setStringValue:@""]; + } +} + +- (void)clearPostEditFields { + [postTitleField_ setStringValue:@""]; + [postBodyField_ setStringValue:@""]; +} + +#pragma mark Fetch Blog List + +- (void)fetchBlogList { + self.blogList = nil; + self.blogListFetchError = nil; + + GTLServiceBlogger *service = self.bloggerService; + + GTLQueryBlogger *query = [GTLQueryBlogger queryForBlogsListByUserWithUserId:@"self"]; + + self.blogListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + GTLBloggerBlogList *blogList, NSError *error) { + // Callback + self.blogList = blogList; + self.blogListFetchError = error; + self.blogListTicket = nil; + + [self updateUI]; + }]; + + [self updateUI]; +} + +#pragma mark Fetch Blog Post List + +- (void)fetchPostListForSelectedBlog { + GTLServiceBlogger *service = self.bloggerService; + + GTLBloggerBlog *selectedBlog = [self selectedBlog]; + NSString *blogID = [selectedBlog.identifier stringValue]; + GTLQueryBlogger *query = [GTLQueryBlogger queryForPostsListWithBlogId:blogID]; + + self.postListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + GTLBloggerPostList *postList, NSError *error) { + // Callback + self.postList = postList; + self.postListFetchError = error; + self.postListTicket = nil; + + [self setPostEditFieldsFromSelectedPost]; + [self updateUI]; + }]; + + [self updateUI]; +} + +#pragma mark Add a Post + +- (void)addAPost { + GTLServiceBlogger *service = self.bloggerService; + + GTLBloggerBlog *selectedBlog = [self selectedBlog]; + NSString *blogID = [selectedBlog.identifier stringValue]; + + + GTLBloggerPost *newPost = [GTLBloggerPost object]; + newPost.title = [postTitleField_ stringValue]; + newPost.content = [postBodyField_ stringValue]; + + + GTLQueryBlogger *query = [GTLQueryBlogger queryForPostsInsertWithObject:newPost + blogId:blogID]; + self.editPostTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + GTLBloggerPost *post, NSError *error) { + // Callback + self.editPostTicket = nil; + if (error == nil) { + [self displayAlert:@"Post Added" + format:@"Added \"%@\"", post.title]; + [self clearPostEditFields]; + [self updateUI]; + [self fetchPostListForSelectedBlog]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; +} + +#pragma mark Update a Post + +- (void)updateSelectedPost { + GTLBloggerPost *selectedPost = [self selectedPost]; + if (selectedPost) { + GTLServiceBlogger *service = self.bloggerService; + + GTLBloggerBlog *selectedBlog = [self selectedBlog]; + NSString *blogID = [selectedBlog.identifier stringValue]; + NSString *postID = [selectedPost.identifier stringValue]; + NSString *oldTitle = selectedPost.title; + + GTLBloggerPost *patchObject = [GTLBloggerPost object]; + patchObject.title = [postTitleField_ stringValue]; + patchObject.content = [postBodyField_ stringValue]; + + + GTLQueryBlogger *query = [GTLQueryBlogger queryForPostsPatchWithObject:patchObject + blogId:blogID + postId:postID]; + self.editPostTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + GTLBloggerPostList *postList, NSError *error) { + // Callback + self.editPostTicket = nil; + if (error == nil) { + [self displayAlert:@"Post Updated" + format:@"Updated \"%@\"", oldTitle]; + [self clearPostEditFields]; + [self updateUI]; + [self fetchPostListForSelectedBlog]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + } +} + +#pragma mark Delete a Post + +- (void)deleteSelectedPost { + GTLBloggerPost *selectedPost = [self selectedPost]; + if (selectedPost) { + GTLServiceBlogger *service = self.bloggerService; + + GTLBloggerBlog *selectedBlog = [self selectedBlog]; + NSString *blogID = [selectedBlog.identifier stringValue]; + NSString *postID = [selectedPost.identifier stringValue]; + + GTLQueryBlogger *query = [GTLQueryBlogger queryForPostsDeleteWithBlogId:blogID + postId:postID]; + self.editPostTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id unusedObj, NSError *error) { + // Callback + self.editPostTicket = nil; + if (error == nil) { + [self displayAlert:@"Post Deleted" + format:@"Deleted \"%@\"", selectedPost.title]; + [self updateUI]; + [self setPostEditFieldsFromSelectedPost]; + [self fetchPostListForSelectedBlog]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + } +} + +#pragma mark Delete All Posts + +- (void)deleteAllPosts { + GTLBloggerBlog *selectedBlog = [self selectedBlog]; + NSString *blogID = [selectedBlog.identifier stringValue]; + + // Make a batch with a delete query for every post in the blog. + // + // http://code.google.com/p/google-api-objectivec-client/wiki/Introduction#Batch_Operations + + GTLBatchQuery *batchQuery = [GTLBatchQuery batchQuery]; + for (GTLBloggerPost *post in self.postList) { + NSString *postID = [post.identifier stringValue]; + GTLQueryBlogger *query = [GTLQueryBlogger queryForPostsDeleteWithBlogId:blogID + postId:postID]; + [batchQuery addQuery:query]; + } + + GTLServiceBlogger *service = self.bloggerService; + self.editPostTicket = [service executeQuery:batchQuery + completionHandler:^(GTLServiceTicket *ticket, + GTLBatchResult *batchResult, NSError *error) { + // Callback + self.editPostTicket = nil; + if (error == nil) { + // Execute succeeded: step through the query successes + // and failures in the result. + NSDictionary *successes = batchResult.successes; + NSDictionary *failures = batchResult.failures; + + [self displayAlert:@"Delete All Complete" + format:@"Deleted %u posts (%u errors)", + [successes count], [failures count]]; + + [self fetchPostListForSelectedBlog]; + } else { + // Here, error is non-nil so execute failed: no success or failure + // results were obtained from the server. + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; +} + +#pragma mark Sign In + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel { + // Applications should have client ID and client secret strings + // hardcoded into the source, but the sample application asks the + // developer for the strings. + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + if ([clientID length] == 0 || [clientSecret length] == 0) { + // Remind the developer that client ID and client secret are needed + [clientIDButton_ performSelector:@selector(performClick:) + withObject:self + afterDelay:0.5]; + return; + } + + // Show the OAuth 2 sign-in controller + NSBundle *frameworkBundle = [NSBundle bundleForClass:[GTMOAuth2WindowController class]]; + GTMOAuth2WindowController *windowController; + windowController = [GTMOAuth2WindowController controllerWithScope:kGTLAuthScopeBlogger + clientID:clientID + clientSecret:clientSecret + keychainItemName:kKeychainItemName + resourceBundle:frameworkBundle]; + + [windowController signInSheetModalForWindow:[self window] + completionHandler:^(GTMOAuth2Authentication *auth, + NSError *error) { + // Callback + if (error == nil) { + self.bloggerService.authorizer = auth; + if (signInDoneSel) { + [self performSelector:signInDoneSel]; + } + } else { + self.blogListFetchError = error; + [self updateUI]; + } + }]; +} + +#pragma mark UI + +- (void)updateUI { + BOOL isSignedIn = [self isSignedIn]; + NSString *username = [self signedInUsername]; + [signedInButton_ setTitle:(isSignedIn ? @"Sign Out" : @"Sign In")]; + [signedInField_ setStringValue:(isSignedIn ? username : @"No")]; + + // + // Blog list table + // + [blogListTable_ reloadData]; + + if (self.blogListTicket != nil) { + [blogListProgressIndicator_ startAnimation:self]; + [blogListCancelButton_ setEnabled:YES]; + } else { + [blogListProgressIndicator_ stopAnimation:self]; + [blogListCancelButton_ setEnabled:NO]; + } + + // Get the description of the selected item, or the feed fetch error. + NSString *resultStr = @""; + + if (self.blogListFetchError) { + // Display the error. + resultStr = [self.blogListFetchError description]; + } else { + // Display the selected item. + GTLBloggerBlog *item = [self selectedBlog]; + if (item) { + resultStr = [item description]; + } + } + [blogListResultTextView_ setString:resultStr]; + + // + // Blog post table + // + [postListTable_ reloadData]; + + if (self.postListTicket != nil || self.editPostTicket != nil) { + [postListProgressIndicator_ startAnimation:self]; + [postListCancelButton_ setEnabled:YES]; + } else { + [postListProgressIndicator_ stopAnimation:self]; + [postListCancelButton_ setEnabled:NO]; + } + + // Get the description of the selected item, or the feed fetch error. + resultStr = @""; + + if (self.postListFetchError) { + // Display the error. + resultStr = [self.postListFetchError description]; + } else { + // Display the selected item. + GTLBloggerPost *item = [self selectedPost]; + if (item) { + resultStr = [item description]; + } + } + [postListResultTextView_ setString:resultStr]; + + // Enable buttons. + BOOL isBlogSelected = ([self selectedBlog] != nil); + BOOL isPostSelected = ([self selectedPost] != nil); + + BOOL hasTitleEditText = ([[postTitleField_ stringValue] length] > 0); + BOOL hasBodyEditText = ([[postBodyField_ stringValue] length] > 0); + BOOL hasAllEditText = hasTitleEditText && hasBodyEditText; + + [addPostButton_ setEnabled:(isBlogSelected && hasAllEditText)]; + [updatePostButton_ setEnabled:(isPostSelected && hasAllEditText)]; + [deletePostButton_ setEnabled:isPostSelected]; + [deleteAllPostsButton_ setEnabled:isBlogSelected]; + + [postTitleField_ setEnabled:isBlogSelected]; + [postBodyField_ setEnabled:isBlogSelected]; + + // Show or hide the text indicating that the client ID or client secret are + // needed. + BOOL hasClientIDStrings = [[clientIDField_ stringValue] length] > 0 + && [[clientSecretField_ stringValue] length] > 0; + [clientIDRequiredTextField_ setHidden:hasClientIDStrings]; +} + +- (void)displayAlert:(NSString *)title format:(NSString *)format, ... { + NSString *result = format; + if (format) { + va_list argList; + va_start(argList, format); + result = [[[NSString alloc] initWithFormat:format + arguments:argList] autorelease]; + va_end(argList); + } + NSBeginAlertSheet(title, nil, nil, nil, [self window], nil, nil, + nil, nil, result); +} + +#pragma mark Client ID Sheet + +// Client ID and Client Secret Sheet +// +// Sample apps need this sheet to ask for the client ID and client secret +// strings. +// +// Your application will just hardcode the client ID and client secret strings +// into the source rather than ask the user for them. +// +// The string values are obtained from the API Console, +// https://code.google.com/apis/console + +- (IBAction)clientIDClicked:(id)sender { + // Show the sheet for developers to enter their client ID and client secret + [NSApp beginSheet:clientIDSheet_ + modalForWindow:[self window] + modalDelegate:self + didEndSelector:@selector(clientIDSheetDidEnd:returnCode:contextInfo:) + contextInfo:NULL]; +} + +- (IBAction)clientIDDoneClicked:(id)sender { + [NSApp endSheet:clientIDSheet_ returnCode:NSOKButton]; +} + +- (void)clientIDSheetDidEnd:(NSWindow *)sheet + returnCode:(NSInteger)returnCode + contextInfo:(void *)contextInfo { + [sheet orderOut:self]; + [self updateUI]; +} + +#pragma mark Text field delegate methods + +- (void)controlTextDidChange:(NSNotification *)note { + [self updateUI]; // enable and disable buttons +} + +#pragma mark TableView delegate and data source methods + +- (void)tableViewSelectionDidChange:(NSNotification *)notification { + // The blog selection changed. + if ([notification object] == blogListTable_) { + [self fetchPostListForSelectedBlog]; + } else { + [self setPostEditFieldsFromSelectedPost]; + [self updateUI]; + } +} + +- (int)numberOfRowsInTableView:(NSTableView *)tableView { + if (tableView == blogListTable_) { + return [self.blogList.items count]; + } else { + return [self.postList.items count]; + } +} + +- (id)tableView:(NSTableView *)tableView +objectValueForTableColumn:(NSTableColumn *)tableColumn + row:(int)row { + if (tableView == blogListTable_) { + GTLBloggerBlog *item = [self.blogList itemAtIndex:row]; + NSString *title = item.name; + return title; + } else { + GTLBloggerPost *item = [self.postList itemAtIndex:row]; + NSString *title = item.title; + return title; + } +} + +@end diff --git a/GTL/Examples/BloggerSample/English.lproj/.svn/all-wcprops b/GTL/Examples/BloggerSample/English.lproj/.svn/all-wcprops new file mode 100644 index 0000000..8a5df4c --- /dev/null +++ b/GTL/Examples/BloggerSample/English.lproj/.svn/all-wcprops @@ -0,0 +1,23 @@ +K 25 +svn:wc:ra_dav:version-url +V 60 +/svn/!svn/ver/172/trunk/Examples/BloggerSample/English.lproj +END +InfoPlist.strings +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/172/trunk/Examples/BloggerSample/English.lproj/InfoPlist.strings +END +MainMenu.xib +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/!svn/ver/172/trunk/Examples/BloggerSample/English.lproj/MainMenu.xib +END +BloggerSampleWindow.xib +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/!svn/ver/172/trunk/Examples/BloggerSample/English.lproj/BloggerSampleWindow.xib +END diff --git a/GTL/Examples/BloggerSample/English.lproj/.svn/entries b/GTL/Examples/BloggerSample/English.lproj/.svn/entries new file mode 100644 index 0000000..6a812df --- /dev/null +++ b/GTL/Examples/BloggerSample/English.lproj/.svn/entries @@ -0,0 +1,130 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/BloggerSample/English.lproj +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +InfoPlist.strings +file + + + + +2012-12-09T08:42:33.000000Z +a7eb38b67a917064132a2b4d70f185f5 +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +95 + +MainMenu.xib +file + + + + +2012-12-09T08:42:33.000000Z +827f312e3cdc476e6e1f798d0d04ec12 +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +66293 + +BloggerSampleWindow.xib +file + + + + +2012-12-09T08:42:33.000000Z +c1eb67fc61d35f68ae970b08fb2b204f +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +124779 + diff --git a/GTL/Examples/BloggerSample/English.lproj/.svn/text-base/BloggerSampleWindow.xib.svn-base b/GTL/Examples/BloggerSample/English.lproj/.svn/text-base/BloggerSampleWindow.xib.svn-base new file mode 100644 index 0000000..fe28134 --- /dev/null +++ b/GTL/Examples/BloggerSample/English.lproj/.svn/text-base/BloggerSampleWindow.xib.svn-base @@ -0,0 +1,2840 @@ + + + + 1070 + 11E53 + 2182 + 1138.47 + 569.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2182 + + + YES + NSTableColumn + NSScroller + NSSplitView + NSButton + NSTextFieldCell + NSScrollView + NSButtonCell + NSProgressIndicator + NSTableView + NSCustomObject + NSTextView + NSView + NSWindowTemplate + NSTextField + NSUserDefaultsController + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + BloggerSampleWindowController + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{16, 600}, {539, 549}} + 1886912512 + Sample App + + NSWindow + + + View + + + {539, 493} + + + 256 + + YES + + + 265 + {{401, 475}, {120, 32}} + + + + YES + + 67239424 + 134217728 + Get Blog List + + LucidaGrande + 13 + 1044 + + + -2038284033 + 1 + + LucidaGrande + 13 + 16 + + + DQ + 200 + 25 + + + + + 1289 + + {{434, 452}, {16, 16}} + + + + 28938 + 100 + + + + 289 + {{393, 18}, {128, 18}} + + + YES + + 67239424 + 131072 + Log http to desktop + + LucidaGrande + 11 + 3100 + + + 1211912703 + 2 + + NSImage + NSSwitch + + + NSSwitch + + + + 200 + 25 + + + + + 264 + {{17, 279}, {35, 14}} + + + YES + + 67239424 + 272760832 + Title + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 265 + {{467, 450}, {53, 16}} + + + + YES + + 67239424 + 134479872 + Cancel + + LucidaGrande + 9 + 3614 + + + -2038284033 + 1 + + LucidaGrande + 9 + 16 + + + + 200 + 25 + + + + + 264 + {{93, 485}, {71, 17}} + + + + YES + + 67239424 + 272629760 + Signed In: + + + + + + + + + 266 + {{166, 485}, {247, 17}} + + + + YES + + 67239424 + 272629760 + No + + + + + + + + + 268 + {{18, 478}, {72, 28}} + + + + YES + + 67239424 + 134348800 + Sign Out + + + -2038284033 + 129 + + + 200 + 25 + + + + + 266 + {{20, 244}, {398, 17}} + + + YES + + 67239424 + 272629760 + Posts + + + + + + + + + 265 + {{467, 242}, {53, 16}} + + + + YES + + 67239424 + 134479872 + Cancel + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 1289 + + {{444, 243}, {16, 16}} + + + + 28938 + 100 + + + + 268 + {{18, 505}, {83, 28}} + + + + YES + + -2080244224 + 134348800 + Client ID... + + + -2038284033 + 129 + + + 200 + 25 + + + + + 264 + {{105, 512}, {178, 14}} + + + + YES + + 67239424 + 272760832 + Client ID and Secret Required + + + + + + + + + 268 + {{20, 452}, {398, 17}} + + + + YES + + 67239424 + 272629760 + Blogs + + + + + + + + + 266 + + YES + + + 2304 + + YES + + + 2322 + {497, 14} + + + + + + + + results + + + YES + + YES + NSColor + NSFont + + + YES + + 1 + MC40NTEwODY5NCAwLjEwNDE0NTEyIDAuMDgyODYwMjE2AA + + + Geneva + 10 + 16 + + + + + + + YES + + + 6 + + + + 497 + 1 + + + 67119969 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + 1 + MCAwIDEAA + + + + + + + 1 + + 6 + {996, 10000000} + {463, 0} + + + + {{1, 1}, {497, 56}} + + + + + + + {4, 5} + + 79691776 + + YES + + YES + + + + file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff + + + + + 3 + MCAwAA + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{20, 301}, {499, 58}} + + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + + 266 + + YES + + + 2304 + + YES + + + 256 + {497, 74} + + + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 494 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + + + + 337772096 + 2048 + + + + 6 + System + controlBackgroundColor + + + + + 3 + YES + + + + 3 + 2 + + 3 + MQA + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + 37748736 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {497, 74}} + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 68}} + + + + + _doScroller: + 0.35789470000000001 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + + + 1 + + _doScroller: + 0.99047620000000003 + + + {{20, 368}, {499, 76}} + + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 289 + {{283, 70}, {42, 16}} + + + + YES + + 67239424 + 134479872 + Add + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 289 + {{392, 70}, {52, 16}} + + + + YES + + 67239424 + 134479872 + Delete + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 289 + {{331, 70}, {55, 16}} + + + + YES + + 67239424 + 134479872 + Update + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 290 + {{57, 69}, {214, 19}} + + + + YES + + -1804468671 + 272761856 + + + + YES + + 6 + System + textBackgroundColor + + + + 6 + System + textColor + + + + + + + 292 + {{17, 72}, {35, 14}} + + + + YES + + 67239424 + 272760832 + Title + + + + + + + + + 289 + {{450, 70}, {66, 16}} + + + YES + + 67239424 + 134479872 + Delete All + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 290 + {{57, 42}, {458, 19}} + + + YES + + -1804468671 + 272761856 + + + + YES + + + + + + + 292 + {{17, 44}, {35, 14}} + + + YES + + 67239424 + 272760832 + Body + + + + + + + + + 274 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 256 + {497, 69} + + + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 494 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + + + 337772096 + 2048 + + + + + + 3 + YES + + + + 3 + 2 + + + 17 + 37748736 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {497, 69}} + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 68}} + + + + + _doScroller: + 0.35789470000000001 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + + + 1 + + _doScroller: + 0.99047620000000003 + + + {499, 71} + + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 290 + + YES + + + 2304 + + YES + + + 2322 + {497, 14} + + + + + + + + results + + + + + + YES + + + 6 + + + + 497 + 1 + + + 67119969 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + + + + + + 1 + + 6 + {996, 10000000} + {463, 0} + + + + {{1, 1}, {497, 56}} + + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{0, 81}, {499, 58}} + + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + {{20, 96}, {499, 139}} + + + 3 + + + {539, 549} + + + + + {{0, 0}, {1920, 1178}} + {539, 515} + {10000000000000, 10000000000000} + YES + + + YES + + + 3 + 2 + {{235, 275}, {458, 284}} + 611844096 + Client ID Sheet + NSWindow + + + + + 256 + + YES + + + 266 + {{118, 143}, {320, 22}} + + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 143}, {63, 17}} + + + YES + + 68288064 + 272630784 + Client ID: + + + + + + + + + 266 + {{118, 112}, {320, 22}} + + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 117}, {88, 17}} + + + YES + + 68288064 + 272630784 + Client Secret: + + + + + + + + + 268 + {{342, 78}, {74, 22}} + + + YES + + 67239424 + 134348800 + API Console + + + -2038284033 + 134 + + + 200 + 25 + + + + + 268 + {{17, 82}, {316, 17}} + + + YES + + 68288064 + 272630784 + Client ID and Client Secret are obtained from the + + + + + + + + + 268 + {{17, 204}, {424, 34}} + + + YES + + 67239424 + 138412032 + Each application should have a client ID and client secret hardcoded into the source. + + + + + + + + + 268 + {{348, 12}, {96, 32}} + + YES + + 67239424 + 134217728 + Done + + + -2038284033 + 129 + + DQ + 200 + 25 + + + + {458, 284} + + + {{0, 0}, {1920, 1178}} + {10000000000000, 10000000000000} + YES + + + + + YES + + + window + + + + 16 + + + + loggingCheckboxClicked: + + + + 600 + + + + APIConsoleClicked: + + + + 925 + + + + clientIDClicked: + + + + 931 + + + + clientIDDoneClicked: + + + + 932 + + + + signedInField_ + + + + 1062 + + + + signedInButton_ + + + + 1063 + + + + clientIDButton_ + + + + 1087 + + + + clientIDRequiredTextField_ + + + + 1088 + + + + clientIDSheet_ + + + + 1089 + + + + clientIDField_ + + + + 1090 + + + + clientSecretField_ + + + + 1091 + + + + getBlogListClicked: + + + + 1100 + + + + signInClicked: + + + + 1101 + + + + blogListButton_ + + + + 1102 + + + + blogListTable_ + + + + 1107 + + + + blogListProgressIndicator_ + + + + 1108 + + + + blogListResultTextView_ + + + + 1109 + + + + blogListCancelButton_ + + + + 1110 + + + + postListProgressIndicator_ + + + + 1114 + + + + postListCancelButton_ + + + + 1116 + + + + cancelBlogFetchClicked: + + + + 1130 + + + + cancelPostFetchClicked: + + + + 1131 + + + + addPostClicked: + + + + 1133 + + + + updatePostClicked: + + + + 1134 + + + + deletePostClicked: + + + + 1135 + + + + deleteAllPostsClicked: + + + + 1137 + + + + postTitleField_ + + + + 1138 + + + + postBodyField_ + + + + 1139 + + + + addPostButton_ + + + + 1140 + + + + updatePostButton_ + + + + 1141 + + + + deletePostButton_ + + + + 1142 + + + + deleteAllPostsButton_ + + + + 1143 + + + + postListTable_ + + + + 1113 + + + + postListResultTextView_ + + + + 1115 + + + + delegate + + + + 15 + + + + dataSource + + + + 588 + + + + delegate + + + + 589 + + + + value: values.clientID + + + + + + value: values.clientID + value + values.clientID + + NSContinuouslyUpdatesValue + + + 2 + + + 940 + + + + value: values.clientSecret + + + + + + value: values.clientSecret + value + values.clientSecret + + NSContinuouslyUpdatesValue + + + 2 + + + 939 + + + + delegate + + + + 989 + + + + delegate + + + + 1098 + + + + dataSource + + + + 1099 + + + + delegate + + + + 1119 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 5 + + + YES + + + + Window + + + 6 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 17 + + + YES + + + + + + 40 + + + + + 139 + + + YES + + + + + + 657 + + + YES + + + + + + 44 + + + Shared Defaults + + + 744 + + + + + 746 + + + + + 754 + + + + + 796 + + + YES + + + + + + 797 + + + + + 828 + + + YES + + + + + + 829 + + + YES + + + + + + 830 + + + YES + + + + + + 831 + + + + + 832 + + + + + 833 + + + + + 861 + + + YES + + + + + + 862 + + + + + 863 + + + + + 900 + + + YES + + + + + + 901 + + + YES + + + + + + + + + + + + + 902 + + + YES + + + + + + 903 + + + YES + + + + + + 904 + + + YES + + + + + + 905 + + + YES + + + + + + 906 + + + YES + + + + + + 907 + + + YES + + + + + + 908 + + + YES + + + + + + 909 + + + + + 910 + + + + + 911 + + + + + 912 + + + + + 913 + + + + + 914 + + + + + 915 + + + + + 920 + + + YES + + + + + + 921 + + + + + 929 + + + YES + + + + + + 930 + + + + + 933 + + + YES + + + + + + 934 + + + + + 859 + + + YES + + + + + + 860 + + + + + 965 + + + YES + + + + + + 966 + + + + + 80 + + + YES + + + + + + + + 81 + + + + + 762 + + + + + 763 + + + + + 24 + + + YES + + + + + + + + 25 + + + YES + + + + + + 760 + + + + + 761 + + + + + 26 + + + YES + + + + + + 758 + + + + + 976 + + + YES + + + + + + 977 + + + YES + + + + + + 978 + + + YES + + + + + + 979 + + + YES + + + + + + 980 + + + YES + + + + + + 981 + + + + + 982 + + + + + 983 + + + + + 984 + + + + + 985 + + + + + 1029 + + + YES + + + + + + 1030 + + + + + 1117 + + + YES + + + + + + 1118 + + + + + 1120 + + + YES + + + + + + 1121 + + + + + 1144 + + + YES + + + + + + + 1092 + + + YES + + + + + + + + 1095 + + + YES + + + + + + 1094 + + + + + 1093 + + + + + 1096 + + + YES + + + + + + 1097 + + + + + 849 + + + YES + + + + + + + + 856 + + + + + 857 + + + + + 858 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 1029.IBPluginDependency + 1030.IBPluginDependency + 1092.IBPluginDependency + 1093.IBPluginDependency + 1093.IBShouldRemoveOnLegacySave + 1094.IBPluginDependency + 1094.IBShouldRemoveOnLegacySave + 1095.IBPluginDependency + 1096.IBPluginDependency + 1097.IBPluginDependency + 1097.IBShouldRemoveOnLegacySave + 1117.IBPluginDependency + 1118.IBPluginDependency + 1120.IBPluginDependency + 1121.IBPluginDependency + 1144.IBPluginDependency + 139.IBPluginDependency + 17.IBPluginDependency + 24.IBPluginDependency + 25.IBPluginDependency + 26.IBPluginDependency + 40.IBPluginDependency + 44.IBPluginDependency + 5.IBPluginDependency + 5.IBWindowTemplateEditedContentRect + 6.IBPluginDependency + 657.IBPluginDependency + 744.IBPluginDependency + 746.IBPluginDependency + 754.IBPluginDependency + 758.IBPluginDependency + 758.IBShouldRemoveOnLegacySave + 760.IBPluginDependency + 760.IBShouldRemoveOnLegacySave + 761.IBPluginDependency + 761.IBShouldRemoveOnLegacySave + 762.IBPluginDependency + 762.IBShouldRemoveOnLegacySave + 763.IBPluginDependency + 763.IBShouldRemoveOnLegacySave + 796.IBPluginDependency + 797.IBPluginDependency + 80.IBPluginDependency + 81.IBPluginDependency + 828.IBPluginDependency + 829.IBPluginDependency + 830.IBPluginDependency + 831.IBPluginDependency + 832.IBPluginDependency + 833.IBPluginDependency + 849.IBPluginDependency + 856.IBPluginDependency + 857.IBPluginDependency + 857.IBShouldRemoveOnLegacySave + 858.IBPluginDependency + 858.IBShouldRemoveOnLegacySave + 859.IBPluginDependency + 860.IBPluginDependency + 861.IBPluginDependency + 862.IBPluginDependency + 863.IBPluginDependency + 900.IBPluginDependency + 900.IBWindowTemplateEditedContentRect + 900.NSWindowTemplate.visibleAtLaunch + 901.IBPluginDependency + 902.IBPluginDependency + 903.IBPluginDependency + 904.IBPluginDependency + 905.IBPluginDependency + 906.IBPluginDependency + 907.IBPluginDependency + 908.IBPluginDependency + 909.IBPluginDependency + 910.IBPluginDependency + 911.IBPluginDependency + 912.IBPluginDependency + 913.IBPluginDependency + 914.IBPluginDependency + 915.IBPluginDependency + 920.IBPluginDependency + 921.IBPluginDependency + 929.IBPluginDependency + 930.IBPluginDependency + 933.IBPluginDependency + 934.IBPluginDependency + 965.IBPluginDependency + 966.IBPluginDependency + 976.IBPluginDependency + 977.IBPluginDependency + 978.IBPluginDependency + 979.IBPluginDependency + 980.IBPluginDependency + 981.IBPluginDependency + 982.IBPluginDependency + 983.IBPluginDependency + 984.IBPluginDependency + 985.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{37, 470}, {539, 538}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{319, 856}, {458, 284}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 1144 + + + + YES + + BloggerSampleWindowController + NSWindowController + + YES + + YES + APIConsoleClicked: + addPostClicked: + cancelBlogFetchClicked: + cancelPostFetchClicked: + clientIDClicked: + clientIDDoneClicked: + deleteAllPostsClicked: + deletePostClicked: + getBlogListClicked: + loggingCheckboxClicked: + signInClicked: + updatePostClicked: + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + APIConsoleClicked: + addPostClicked: + cancelBlogFetchClicked: + cancelPostFetchClicked: + clientIDClicked: + clientIDDoneClicked: + deleteAllPostsClicked: + deletePostClicked: + getBlogListClicked: + loggingCheckboxClicked: + signInClicked: + updatePostClicked: + + + YES + + APIConsoleClicked: + id + + + addPostClicked: + id + + + cancelBlogFetchClicked: + id + + + cancelPostFetchClicked: + id + + + clientIDClicked: + id + + + clientIDDoneClicked: + id + + + deleteAllPostsClicked: + id + + + deletePostClicked: + id + + + getBlogListClicked: + id + + + loggingCheckboxClicked: + id + + + signInClicked: + id + + + updatePostClicked: + id + + + + + YES + + YES + addPostButton_ + blogListCancelButton_ + blogListProgressIndicator_ + blogListResultTextView_ + blogListTable_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + deleteAllPostsButton_ + deletePostButton_ + postBodyField_ + postListCancelButton_ + postListProgressIndicator_ + postListResultTextView_ + postListTable_ + postTitleField_ + signedInButton_ + signedInField_ + updatePostButton_ + + + YES + NSButton + NSButton + NSProgressIndicator + NSTextView + NSTableView + NSButton + NSTextField + NSTextField + NSWindow + NSTextField + NSButton + NSButton + NSTextField + NSButton + NSProgressIndicator + NSTextView + NSTableView + NSTextField + NSButton + NSTextField + NSButton + + + + YES + + YES + addPostButton_ + blogListCancelButton_ + blogListProgressIndicator_ + blogListResultTextView_ + blogListTable_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + deleteAllPostsButton_ + deletePostButton_ + postBodyField_ + postListCancelButton_ + postListProgressIndicator_ + postListResultTextView_ + postListTable_ + postTitleField_ + signedInButton_ + signedInField_ + updatePostButton_ + + + YES + + addPostButton_ + NSButton + + + blogListCancelButton_ + NSButton + + + blogListProgressIndicator_ + NSProgressIndicator + + + blogListResultTextView_ + NSTextView + + + blogListTable_ + NSTableView + + + clientIDButton_ + NSButton + + + clientIDField_ + NSTextField + + + clientIDRequiredTextField_ + NSTextField + + + clientIDSheet_ + NSWindow + + + clientSecretField_ + NSTextField + + + deleteAllPostsButton_ + NSButton + + + deletePostButton_ + NSButton + + + postBodyField_ + NSTextField + + + postListCancelButton_ + NSButton + + + postListProgressIndicator_ + NSProgressIndicator + + + postListResultTextView_ + NSTextView + + + postListTable_ + NSTableView + + + postTitleField_ + NSTextField + + + signedInButton_ + NSButton + + + signedInField_ + NSTextField + + + updatePostButton_ + NSButton + + + + + IBProjectSource + ./Classes/BloggerSampleWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + NSSwitch + {15, 15} + + + diff --git a/GTL/Examples/BloggerSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base b/GTL/Examples/BloggerSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base new file mode 100644 index 0000000..07a8a81 --- /dev/null +++ b/GTL/Examples/BloggerSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "© Google Inc. 2012"; diff --git a/GTL/Examples/BloggerSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base b/GTL/Examples/BloggerSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base new file mode 100644 index 0000000..8833a5c --- /dev/null +++ b/GTL/Examples/BloggerSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base @@ -0,0 +1,1548 @@ + + + + 1050 + 11E53 + 2182 + 1138.47 + 569.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2182 + + + YES + NSMenu + NSMenuItem + NSCustomObject + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + NSApplication + + + FirstResponder + + + NSApplication + + + MainMenu + + YES + + + SampleApp + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + SampleApp + + YES + + + About the Sample + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + + Services + + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + + File + + + YES + + + New + n + 1048576 + 2147483647 + + + + + + Open... + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + + Open Recent + + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + Save As… + S + 1048576 + 2147483647 + + + + + + Revert + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup… + P + 1048576 + 2147483647 + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + + Edit + + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + + Find + + + YES + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1048576 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling + + 1048576 + 2147483647 + + + submenuAction: + + Spelling + + YES + + + Spelling… + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling as You Type + + 1048576 + 2147483647 + + + + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + + Window + + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + Help + + YES + + + Help + ? + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + BloggerSampleAppController + + + + + YES + + + delegate + + + + 225 + + + + terminate: + + + + 139 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + hideOtherApplications: + + + + 146 + + + + hide: + + + + 152 + + + + unhideAllApplications: + + + + 153 + + + + delegate + + + + 223 + + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + showHelp: + + + + 122 + + + + clearRecentDocuments: + + + + 127 + + + + cut: + + + + 175 + + + + paste: + + + + 176 + + + + redo: + + + + 178 + + + + selectAll: + + + + 179 + + + + undo: + + + + 180 + + + + copy: + + + + 181 + + + + showGuessPanel: + + + + 188 + + + + checkSpelling: + + + + 190 + + + + toggleContinuousSpellChecking: + + + + 192 + + + + performClose: + + + + 193 + + + + delete: + + + + 195 + + + + performZoom: + + + + 198 + + + + performFindPanelAction: + + + + 199 + + + + performFindPanelAction: + + + + 200 + + + + performFindPanelAction: + + + + 201 + + + + performFindPanelAction: + + + + 202 + + + + centerSelectionInVisibleArea: + + + + 203 + + + + pasteAsPlainText: + + + + 205 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + MainMenu + + + 19 + + + YES + + + + + + 24 + + + YES + + + + + + + + + 5 + + + + + 23 + + + + + 92 + + + + + 197 + + + + + 56 + + + YES + + + + + + 57 + + + YES + + + + + + + + + + + + + + + + 58 + + + + + 129 + + + + + 131 + + + YES + + + + + + 130 + + + + + 134 + + + + + 136 + + + + + 143 + + + + + 144 + + + + + 145 + + + + + 149 + + + + + 150 + + + + + 196 + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + + + + + + + + 72 + + + + + 73 + + + + + 74 + + + + + 75 + + + + + 77 + + + + + 78 + + + + + 79 + + + + + 80 + + + + + 82 + + + + + 112 + + + + + 124 + + + YES + + + + + + 125 + + + YES + + + + + + 126 + + + + + 103 + + + YES + + + + + + 106 + + + YES + + + + + + 111 + + + + + 163 + + + YES + + + + + + 169 + + + YES + + + + + + + + + + + + + + + + + 156 + + + + + 157 + + + + + 158 + + + + + 160 + + + + + 164 + + + + + 168 + + + YES + + + + + + 159 + + + YES + + + + + + + + + + 154 + + + + + 155 + + + + + 161 + + + + + 162 + + + + + 167 + + + + + 171 + + + + + 172 + + + + + 173 + + + + + 174 + + + + + 184 + + + YES + + + + + + 185 + + + YES + + + + + + + + 187 + + + + + 189 + + + + + 191 + + + + + 204 + + + + + 222 + + + BuzzSampleAppController + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 103.IBPluginDependency + 106.IBPluginDependency + 111.IBPluginDependency + 112.IBPluginDependency + 124.IBPluginDependency + 125.IBPluginDependency + 126.IBPluginDependency + 129.IBPluginDependency + 130.IBPluginDependency + 131.IBPluginDependency + 134.IBPluginDependency + 136.IBPluginDependency + 143.IBPluginDependency + 144.IBPluginDependency + 145.IBPluginDependency + 149.IBPluginDependency + 150.IBPluginDependency + 154.IBPluginDependency + 155.IBPluginDependency + 156.IBPluginDependency + 157.IBPluginDependency + 158.IBPluginDependency + 159.IBPluginDependency + 160.IBPluginDependency + 161.IBPluginDependency + 162.IBPluginDependency + 163.IBPluginDependency + 164.IBPluginDependency + 167.IBPluginDependency + 168.IBPluginDependency + 169.IBPluginDependency + 171.IBPluginDependency + 172.IBPluginDependency + 173.IBPluginDependency + 174.IBPluginDependency + 184.IBPluginDependency + 185.IBPluginDependency + 187.IBPluginDependency + 189.IBPluginDependency + 19.IBPluginDependency + 191.IBPluginDependency + 196.IBPluginDependency + 197.IBPluginDependency + 204.IBPluginDependency + 222.IBPluginDependency + 23.IBPluginDependency + 24.IBPluginDependency + 29.IBPluginDependency + 5.IBPluginDependency + 56.IBPluginDependency + 57.IBPluginDependency + 58.IBPluginDependency + 72.IBPluginDependency + 73.IBPluginDependency + 74.IBPluginDependency + 75.IBPluginDependency + 77.IBPluginDependency + 78.IBPluginDependency + 79.IBPluginDependency + 80.IBPluginDependency + 81.IBPluginDependency + 82.IBPluginDependency + 83.IBPluginDependency + 92.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 227 + + + + YES + + BloggerSampleAppController + NSObject + + IBProjectSource + ./Classes/BloggerSampleAppController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {11, 11} + {10, 3} + + + + diff --git a/GTL/Examples/BloggerSample/English.lproj/BloggerSampleWindow.xib b/GTL/Examples/BloggerSample/English.lproj/BloggerSampleWindow.xib new file mode 100644 index 0000000..fe28134 --- /dev/null +++ b/GTL/Examples/BloggerSample/English.lproj/BloggerSampleWindow.xib @@ -0,0 +1,2840 @@ + + + + 1070 + 11E53 + 2182 + 1138.47 + 569.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2182 + + + YES + NSTableColumn + NSScroller + NSSplitView + NSButton + NSTextFieldCell + NSScrollView + NSButtonCell + NSProgressIndicator + NSTableView + NSCustomObject + NSTextView + NSView + NSWindowTemplate + NSTextField + NSUserDefaultsController + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + BloggerSampleWindowController + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{16, 600}, {539, 549}} + 1886912512 + Sample App + + NSWindow + + + View + + + {539, 493} + + + 256 + + YES + + + 265 + {{401, 475}, {120, 32}} + + + + YES + + 67239424 + 134217728 + Get Blog List + + LucidaGrande + 13 + 1044 + + + -2038284033 + 1 + + LucidaGrande + 13 + 16 + + + DQ + 200 + 25 + + + + + 1289 + + {{434, 452}, {16, 16}} + + + + 28938 + 100 + + + + 289 + {{393, 18}, {128, 18}} + + + YES + + 67239424 + 131072 + Log http to desktop + + LucidaGrande + 11 + 3100 + + + 1211912703 + 2 + + NSImage + NSSwitch + + + NSSwitch + + + + 200 + 25 + + + + + 264 + {{17, 279}, {35, 14}} + + + YES + + 67239424 + 272760832 + Title + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 265 + {{467, 450}, {53, 16}} + + + + YES + + 67239424 + 134479872 + Cancel + + LucidaGrande + 9 + 3614 + + + -2038284033 + 1 + + LucidaGrande + 9 + 16 + + + + 200 + 25 + + + + + 264 + {{93, 485}, {71, 17}} + + + + YES + + 67239424 + 272629760 + Signed In: + + + + + + + + + 266 + {{166, 485}, {247, 17}} + + + + YES + + 67239424 + 272629760 + No + + + + + + + + + 268 + {{18, 478}, {72, 28}} + + + + YES + + 67239424 + 134348800 + Sign Out + + + -2038284033 + 129 + + + 200 + 25 + + + + + 266 + {{20, 244}, {398, 17}} + + + YES + + 67239424 + 272629760 + Posts + + + + + + + + + 265 + {{467, 242}, {53, 16}} + + + + YES + + 67239424 + 134479872 + Cancel + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 1289 + + {{444, 243}, {16, 16}} + + + + 28938 + 100 + + + + 268 + {{18, 505}, {83, 28}} + + + + YES + + -2080244224 + 134348800 + Client ID... + + + -2038284033 + 129 + + + 200 + 25 + + + + + 264 + {{105, 512}, {178, 14}} + + + + YES + + 67239424 + 272760832 + Client ID and Secret Required + + + + + + + + + 268 + {{20, 452}, {398, 17}} + + + + YES + + 67239424 + 272629760 + Blogs + + + + + + + + + 266 + + YES + + + 2304 + + YES + + + 2322 + {497, 14} + + + + + + + + results + + + YES + + YES + NSColor + NSFont + + + YES + + 1 + MC40NTEwODY5NCAwLjEwNDE0NTEyIDAuMDgyODYwMjE2AA + + + Geneva + 10 + 16 + + + + + + + YES + + + 6 + + + + 497 + 1 + + + 67119969 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + 1 + MCAwIDEAA + + + + + + + 1 + + 6 + {996, 10000000} + {463, 0} + + + + {{1, 1}, {497, 56}} + + + + + + + {4, 5} + + 79691776 + + YES + + YES + + + + file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff + + + + + 3 + MCAwAA + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{20, 301}, {499, 58}} + + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + + 266 + + YES + + + 2304 + + YES + + + 256 + {497, 74} + + + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 494 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + + + + 337772096 + 2048 + + + + 6 + System + controlBackgroundColor + + + + + 3 + YES + + + + 3 + 2 + + 3 + MQA + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + 37748736 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {497, 74}} + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 68}} + + + + + _doScroller: + 0.35789470000000001 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + + + 1 + + _doScroller: + 0.99047620000000003 + + + {{20, 368}, {499, 76}} + + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 289 + {{283, 70}, {42, 16}} + + + + YES + + 67239424 + 134479872 + Add + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 289 + {{392, 70}, {52, 16}} + + + + YES + + 67239424 + 134479872 + Delete + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 289 + {{331, 70}, {55, 16}} + + + + YES + + 67239424 + 134479872 + Update + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 290 + {{57, 69}, {214, 19}} + + + + YES + + -1804468671 + 272761856 + + + + YES + + 6 + System + textBackgroundColor + + + + 6 + System + textColor + + + + + + + 292 + {{17, 72}, {35, 14}} + + + + YES + + 67239424 + 272760832 + Title + + + + + + + + + 289 + {{450, 70}, {66, 16}} + + + YES + + 67239424 + 134479872 + Delete All + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 290 + {{57, 42}, {458, 19}} + + + YES + + -1804468671 + 272761856 + + + + YES + + + + + + + 292 + {{17, 44}, {35, 14}} + + + YES + + 67239424 + 272760832 + Body + + + + + + + + + 274 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 256 + {497, 69} + + + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 494 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + + + 337772096 + 2048 + + + + + + 3 + YES + + + + 3 + 2 + + + 17 + 37748736 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {497, 69}} + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 68}} + + + + + _doScroller: + 0.35789470000000001 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + + + 1 + + _doScroller: + 0.99047620000000003 + + + {499, 71} + + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 290 + + YES + + + 2304 + + YES + + + 2322 + {497, 14} + + + + + + + + results + + + + + + YES + + + 6 + + + + 497 + 1 + + + 67119969 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + + + + + + 1 + + 6 + {996, 10000000} + {463, 0} + + + + {{1, 1}, {497, 56}} + + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{0, 81}, {499, 58}} + + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + {{20, 96}, {499, 139}} + + + 3 + + + {539, 549} + + + + + {{0, 0}, {1920, 1178}} + {539, 515} + {10000000000000, 10000000000000} + YES + + + YES + + + 3 + 2 + {{235, 275}, {458, 284}} + 611844096 + Client ID Sheet + NSWindow + + + + + 256 + + YES + + + 266 + {{118, 143}, {320, 22}} + + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 143}, {63, 17}} + + + YES + + 68288064 + 272630784 + Client ID: + + + + + + + + + 266 + {{118, 112}, {320, 22}} + + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 117}, {88, 17}} + + + YES + + 68288064 + 272630784 + Client Secret: + + + + + + + + + 268 + {{342, 78}, {74, 22}} + + + YES + + 67239424 + 134348800 + API Console + + + -2038284033 + 134 + + + 200 + 25 + + + + + 268 + {{17, 82}, {316, 17}} + + + YES + + 68288064 + 272630784 + Client ID and Client Secret are obtained from the + + + + + + + + + 268 + {{17, 204}, {424, 34}} + + + YES + + 67239424 + 138412032 + Each application should have a client ID and client secret hardcoded into the source. + + + + + + + + + 268 + {{348, 12}, {96, 32}} + + YES + + 67239424 + 134217728 + Done + + + -2038284033 + 129 + + DQ + 200 + 25 + + + + {458, 284} + + + {{0, 0}, {1920, 1178}} + {10000000000000, 10000000000000} + YES + + + + + YES + + + window + + + + 16 + + + + loggingCheckboxClicked: + + + + 600 + + + + APIConsoleClicked: + + + + 925 + + + + clientIDClicked: + + + + 931 + + + + clientIDDoneClicked: + + + + 932 + + + + signedInField_ + + + + 1062 + + + + signedInButton_ + + + + 1063 + + + + clientIDButton_ + + + + 1087 + + + + clientIDRequiredTextField_ + + + + 1088 + + + + clientIDSheet_ + + + + 1089 + + + + clientIDField_ + + + + 1090 + + + + clientSecretField_ + + + + 1091 + + + + getBlogListClicked: + + + + 1100 + + + + signInClicked: + + + + 1101 + + + + blogListButton_ + + + + 1102 + + + + blogListTable_ + + + + 1107 + + + + blogListProgressIndicator_ + + + + 1108 + + + + blogListResultTextView_ + + + + 1109 + + + + blogListCancelButton_ + + + + 1110 + + + + postListProgressIndicator_ + + + + 1114 + + + + postListCancelButton_ + + + + 1116 + + + + cancelBlogFetchClicked: + + + + 1130 + + + + cancelPostFetchClicked: + + + + 1131 + + + + addPostClicked: + + + + 1133 + + + + updatePostClicked: + + + + 1134 + + + + deletePostClicked: + + + + 1135 + + + + deleteAllPostsClicked: + + + + 1137 + + + + postTitleField_ + + + + 1138 + + + + postBodyField_ + + + + 1139 + + + + addPostButton_ + + + + 1140 + + + + updatePostButton_ + + + + 1141 + + + + deletePostButton_ + + + + 1142 + + + + deleteAllPostsButton_ + + + + 1143 + + + + postListTable_ + + + + 1113 + + + + postListResultTextView_ + + + + 1115 + + + + delegate + + + + 15 + + + + dataSource + + + + 588 + + + + delegate + + + + 589 + + + + value: values.clientID + + + + + + value: values.clientID + value + values.clientID + + NSContinuouslyUpdatesValue + + + 2 + + + 940 + + + + value: values.clientSecret + + + + + + value: values.clientSecret + value + values.clientSecret + + NSContinuouslyUpdatesValue + + + 2 + + + 939 + + + + delegate + + + + 989 + + + + delegate + + + + 1098 + + + + dataSource + + + + 1099 + + + + delegate + + + + 1119 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 5 + + + YES + + + + Window + + + 6 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 17 + + + YES + + + + + + 40 + + + + + 139 + + + YES + + + + + + 657 + + + YES + + + + + + 44 + + + Shared Defaults + + + 744 + + + + + 746 + + + + + 754 + + + + + 796 + + + YES + + + + + + 797 + + + + + 828 + + + YES + + + + + + 829 + + + YES + + + + + + 830 + + + YES + + + + + + 831 + + + + + 832 + + + + + 833 + + + + + 861 + + + YES + + + + + + 862 + + + + + 863 + + + + + 900 + + + YES + + + + + + 901 + + + YES + + + + + + + + + + + + + 902 + + + YES + + + + + + 903 + + + YES + + + + + + 904 + + + YES + + + + + + 905 + + + YES + + + + + + 906 + + + YES + + + + + + 907 + + + YES + + + + + + 908 + + + YES + + + + + + 909 + + + + + 910 + + + + + 911 + + + + + 912 + + + + + 913 + + + + + 914 + + + + + 915 + + + + + 920 + + + YES + + + + + + 921 + + + + + 929 + + + YES + + + + + + 930 + + + + + 933 + + + YES + + + + + + 934 + + + + + 859 + + + YES + + + + + + 860 + + + + + 965 + + + YES + + + + + + 966 + + + + + 80 + + + YES + + + + + + + + 81 + + + + + 762 + + + + + 763 + + + + + 24 + + + YES + + + + + + + + 25 + + + YES + + + + + + 760 + + + + + 761 + + + + + 26 + + + YES + + + + + + 758 + + + + + 976 + + + YES + + + + + + 977 + + + YES + + + + + + 978 + + + YES + + + + + + 979 + + + YES + + + + + + 980 + + + YES + + + + + + 981 + + + + + 982 + + + + + 983 + + + + + 984 + + + + + 985 + + + + + 1029 + + + YES + + + + + + 1030 + + + + + 1117 + + + YES + + + + + + 1118 + + + + + 1120 + + + YES + + + + + + 1121 + + + + + 1144 + + + YES + + + + + + + 1092 + + + YES + + + + + + + + 1095 + + + YES + + + + + + 1094 + + + + + 1093 + + + + + 1096 + + + YES + + + + + + 1097 + + + + + 849 + + + YES + + + + + + + + 856 + + + + + 857 + + + + + 858 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 1029.IBPluginDependency + 1030.IBPluginDependency + 1092.IBPluginDependency + 1093.IBPluginDependency + 1093.IBShouldRemoveOnLegacySave + 1094.IBPluginDependency + 1094.IBShouldRemoveOnLegacySave + 1095.IBPluginDependency + 1096.IBPluginDependency + 1097.IBPluginDependency + 1097.IBShouldRemoveOnLegacySave + 1117.IBPluginDependency + 1118.IBPluginDependency + 1120.IBPluginDependency + 1121.IBPluginDependency + 1144.IBPluginDependency + 139.IBPluginDependency + 17.IBPluginDependency + 24.IBPluginDependency + 25.IBPluginDependency + 26.IBPluginDependency + 40.IBPluginDependency + 44.IBPluginDependency + 5.IBPluginDependency + 5.IBWindowTemplateEditedContentRect + 6.IBPluginDependency + 657.IBPluginDependency + 744.IBPluginDependency + 746.IBPluginDependency + 754.IBPluginDependency + 758.IBPluginDependency + 758.IBShouldRemoveOnLegacySave + 760.IBPluginDependency + 760.IBShouldRemoveOnLegacySave + 761.IBPluginDependency + 761.IBShouldRemoveOnLegacySave + 762.IBPluginDependency + 762.IBShouldRemoveOnLegacySave + 763.IBPluginDependency + 763.IBShouldRemoveOnLegacySave + 796.IBPluginDependency + 797.IBPluginDependency + 80.IBPluginDependency + 81.IBPluginDependency + 828.IBPluginDependency + 829.IBPluginDependency + 830.IBPluginDependency + 831.IBPluginDependency + 832.IBPluginDependency + 833.IBPluginDependency + 849.IBPluginDependency + 856.IBPluginDependency + 857.IBPluginDependency + 857.IBShouldRemoveOnLegacySave + 858.IBPluginDependency + 858.IBShouldRemoveOnLegacySave + 859.IBPluginDependency + 860.IBPluginDependency + 861.IBPluginDependency + 862.IBPluginDependency + 863.IBPluginDependency + 900.IBPluginDependency + 900.IBWindowTemplateEditedContentRect + 900.NSWindowTemplate.visibleAtLaunch + 901.IBPluginDependency + 902.IBPluginDependency + 903.IBPluginDependency + 904.IBPluginDependency + 905.IBPluginDependency + 906.IBPluginDependency + 907.IBPluginDependency + 908.IBPluginDependency + 909.IBPluginDependency + 910.IBPluginDependency + 911.IBPluginDependency + 912.IBPluginDependency + 913.IBPluginDependency + 914.IBPluginDependency + 915.IBPluginDependency + 920.IBPluginDependency + 921.IBPluginDependency + 929.IBPluginDependency + 930.IBPluginDependency + 933.IBPluginDependency + 934.IBPluginDependency + 965.IBPluginDependency + 966.IBPluginDependency + 976.IBPluginDependency + 977.IBPluginDependency + 978.IBPluginDependency + 979.IBPluginDependency + 980.IBPluginDependency + 981.IBPluginDependency + 982.IBPluginDependency + 983.IBPluginDependency + 984.IBPluginDependency + 985.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{37, 470}, {539, 538}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{319, 856}, {458, 284}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 1144 + + + + YES + + BloggerSampleWindowController + NSWindowController + + YES + + YES + APIConsoleClicked: + addPostClicked: + cancelBlogFetchClicked: + cancelPostFetchClicked: + clientIDClicked: + clientIDDoneClicked: + deleteAllPostsClicked: + deletePostClicked: + getBlogListClicked: + loggingCheckboxClicked: + signInClicked: + updatePostClicked: + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + APIConsoleClicked: + addPostClicked: + cancelBlogFetchClicked: + cancelPostFetchClicked: + clientIDClicked: + clientIDDoneClicked: + deleteAllPostsClicked: + deletePostClicked: + getBlogListClicked: + loggingCheckboxClicked: + signInClicked: + updatePostClicked: + + + YES + + APIConsoleClicked: + id + + + addPostClicked: + id + + + cancelBlogFetchClicked: + id + + + cancelPostFetchClicked: + id + + + clientIDClicked: + id + + + clientIDDoneClicked: + id + + + deleteAllPostsClicked: + id + + + deletePostClicked: + id + + + getBlogListClicked: + id + + + loggingCheckboxClicked: + id + + + signInClicked: + id + + + updatePostClicked: + id + + + + + YES + + YES + addPostButton_ + blogListCancelButton_ + blogListProgressIndicator_ + blogListResultTextView_ + blogListTable_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + deleteAllPostsButton_ + deletePostButton_ + postBodyField_ + postListCancelButton_ + postListProgressIndicator_ + postListResultTextView_ + postListTable_ + postTitleField_ + signedInButton_ + signedInField_ + updatePostButton_ + + + YES + NSButton + NSButton + NSProgressIndicator + NSTextView + NSTableView + NSButton + NSTextField + NSTextField + NSWindow + NSTextField + NSButton + NSButton + NSTextField + NSButton + NSProgressIndicator + NSTextView + NSTableView + NSTextField + NSButton + NSTextField + NSButton + + + + YES + + YES + addPostButton_ + blogListCancelButton_ + blogListProgressIndicator_ + blogListResultTextView_ + blogListTable_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + deleteAllPostsButton_ + deletePostButton_ + postBodyField_ + postListCancelButton_ + postListProgressIndicator_ + postListResultTextView_ + postListTable_ + postTitleField_ + signedInButton_ + signedInField_ + updatePostButton_ + + + YES + + addPostButton_ + NSButton + + + blogListCancelButton_ + NSButton + + + blogListProgressIndicator_ + NSProgressIndicator + + + blogListResultTextView_ + NSTextView + + + blogListTable_ + NSTableView + + + clientIDButton_ + NSButton + + + clientIDField_ + NSTextField + + + clientIDRequiredTextField_ + NSTextField + + + clientIDSheet_ + NSWindow + + + clientSecretField_ + NSTextField + + + deleteAllPostsButton_ + NSButton + + + deletePostButton_ + NSButton + + + postBodyField_ + NSTextField + + + postListCancelButton_ + NSButton + + + postListProgressIndicator_ + NSProgressIndicator + + + postListResultTextView_ + NSTextView + + + postListTable_ + NSTableView + + + postTitleField_ + NSTextField + + + signedInButton_ + NSButton + + + signedInField_ + NSTextField + + + updatePostButton_ + NSButton + + + + + IBProjectSource + ./Classes/BloggerSampleWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + NSSwitch + {15, 15} + + + diff --git a/GTL/Examples/BloggerSample/English.lproj/InfoPlist.strings b/GTL/Examples/BloggerSample/English.lproj/InfoPlist.strings new file mode 100644 index 0000000..07a8a81 --- /dev/null +++ b/GTL/Examples/BloggerSample/English.lproj/InfoPlist.strings @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "© Google Inc. 2012"; diff --git a/GTL/Examples/BloggerSample/English.lproj/MainMenu.xib b/GTL/Examples/BloggerSample/English.lproj/MainMenu.xib new file mode 100644 index 0000000..8833a5c --- /dev/null +++ b/GTL/Examples/BloggerSample/English.lproj/MainMenu.xib @@ -0,0 +1,1548 @@ + + + + 1050 + 11E53 + 2182 + 1138.47 + 569.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2182 + + + YES + NSMenu + NSMenuItem + NSCustomObject + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + NSApplication + + + FirstResponder + + + NSApplication + + + MainMenu + + YES + + + SampleApp + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + SampleApp + + YES + + + About the Sample + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + + Services + + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + + File + + + YES + + + New + n + 1048576 + 2147483647 + + + + + + Open... + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + + Open Recent + + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + Save As… + S + 1048576 + 2147483647 + + + + + + Revert + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup… + P + 1048576 + 2147483647 + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + + Edit + + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + + Find + + + YES + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1048576 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling + + 1048576 + 2147483647 + + + submenuAction: + + Spelling + + YES + + + Spelling… + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling as You Type + + 1048576 + 2147483647 + + + + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + + Window + + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + Help + + YES + + + Help + ? + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + BloggerSampleAppController + + + + + YES + + + delegate + + + + 225 + + + + terminate: + + + + 139 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + hideOtherApplications: + + + + 146 + + + + hide: + + + + 152 + + + + unhideAllApplications: + + + + 153 + + + + delegate + + + + 223 + + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + showHelp: + + + + 122 + + + + clearRecentDocuments: + + + + 127 + + + + cut: + + + + 175 + + + + paste: + + + + 176 + + + + redo: + + + + 178 + + + + selectAll: + + + + 179 + + + + undo: + + + + 180 + + + + copy: + + + + 181 + + + + showGuessPanel: + + + + 188 + + + + checkSpelling: + + + + 190 + + + + toggleContinuousSpellChecking: + + + + 192 + + + + performClose: + + + + 193 + + + + delete: + + + + 195 + + + + performZoom: + + + + 198 + + + + performFindPanelAction: + + + + 199 + + + + performFindPanelAction: + + + + 200 + + + + performFindPanelAction: + + + + 201 + + + + performFindPanelAction: + + + + 202 + + + + centerSelectionInVisibleArea: + + + + 203 + + + + pasteAsPlainText: + + + + 205 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + MainMenu + + + 19 + + + YES + + + + + + 24 + + + YES + + + + + + + + + 5 + + + + + 23 + + + + + 92 + + + + + 197 + + + + + 56 + + + YES + + + + + + 57 + + + YES + + + + + + + + + + + + + + + + 58 + + + + + 129 + + + + + 131 + + + YES + + + + + + 130 + + + + + 134 + + + + + 136 + + + + + 143 + + + + + 144 + + + + + 145 + + + + + 149 + + + + + 150 + + + + + 196 + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + + + + + + + + 72 + + + + + 73 + + + + + 74 + + + + + 75 + + + + + 77 + + + + + 78 + + + + + 79 + + + + + 80 + + + + + 82 + + + + + 112 + + + + + 124 + + + YES + + + + + + 125 + + + YES + + + + + + 126 + + + + + 103 + + + YES + + + + + + 106 + + + YES + + + + + + 111 + + + + + 163 + + + YES + + + + + + 169 + + + YES + + + + + + + + + + + + + + + + + 156 + + + + + 157 + + + + + 158 + + + + + 160 + + + + + 164 + + + + + 168 + + + YES + + + + + + 159 + + + YES + + + + + + + + + + 154 + + + + + 155 + + + + + 161 + + + + + 162 + + + + + 167 + + + + + 171 + + + + + 172 + + + + + 173 + + + + + 174 + + + + + 184 + + + YES + + + + + + 185 + + + YES + + + + + + + + 187 + + + + + 189 + + + + + 191 + + + + + 204 + + + + + 222 + + + BuzzSampleAppController + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 103.IBPluginDependency + 106.IBPluginDependency + 111.IBPluginDependency + 112.IBPluginDependency + 124.IBPluginDependency + 125.IBPluginDependency + 126.IBPluginDependency + 129.IBPluginDependency + 130.IBPluginDependency + 131.IBPluginDependency + 134.IBPluginDependency + 136.IBPluginDependency + 143.IBPluginDependency + 144.IBPluginDependency + 145.IBPluginDependency + 149.IBPluginDependency + 150.IBPluginDependency + 154.IBPluginDependency + 155.IBPluginDependency + 156.IBPluginDependency + 157.IBPluginDependency + 158.IBPluginDependency + 159.IBPluginDependency + 160.IBPluginDependency + 161.IBPluginDependency + 162.IBPluginDependency + 163.IBPluginDependency + 164.IBPluginDependency + 167.IBPluginDependency + 168.IBPluginDependency + 169.IBPluginDependency + 171.IBPluginDependency + 172.IBPluginDependency + 173.IBPluginDependency + 174.IBPluginDependency + 184.IBPluginDependency + 185.IBPluginDependency + 187.IBPluginDependency + 189.IBPluginDependency + 19.IBPluginDependency + 191.IBPluginDependency + 196.IBPluginDependency + 197.IBPluginDependency + 204.IBPluginDependency + 222.IBPluginDependency + 23.IBPluginDependency + 24.IBPluginDependency + 29.IBPluginDependency + 5.IBPluginDependency + 56.IBPluginDependency + 57.IBPluginDependency + 58.IBPluginDependency + 72.IBPluginDependency + 73.IBPluginDependency + 74.IBPluginDependency + 75.IBPluginDependency + 77.IBPluginDependency + 78.IBPluginDependency + 79.IBPluginDependency + 80.IBPluginDependency + 81.IBPluginDependency + 82.IBPluginDependency + 83.IBPluginDependency + 92.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 227 + + + + YES + + BloggerSampleAppController + NSObject + + IBProjectSource + ./Classes/BloggerSampleAppController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {11, 11} + {10, 3} + + + + diff --git a/GTL/Examples/BloggerSample/Info.plist b/GTL/Examples/BloggerSample/Info.plist new file mode 100644 index 0000000..d34b6c7 --- /dev/null +++ b/GTL/Examples/BloggerSample/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.example.BloggerSample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/GTL/Examples/BloggerSample/README.txt b/GTL/Examples/BloggerSample/README.txt new file mode 100644 index 0000000..ff257a0 --- /dev/null +++ b/GTL/Examples/BloggerSample/README.txt @@ -0,0 +1 @@ +This sample should automatically build and copy over the GTL.framework as part of the build-and-run process. diff --git a/GTL/Examples/BloggerSample/buildStripHeaders b/GTL/Examples/BloggerSample/buildStripHeaders new file mode 100755 index 0000000..0238ef2 --- /dev/null +++ b/GTL/Examples/BloggerSample/buildStripHeaders @@ -0,0 +1,17 @@ +#!/bin/sh +# +# buildStripHeaders +# +# Remove header files from the built copy of the framework inside our +# application. + +# Strip "*.h" files +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname '*.h' -delete + +# Strip "Headers" links +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type l -delete + +# Strip "Headers" directories +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type d -prune -delete + + diff --git a/GTL/Examples/BloggerSample/main.m b/GTL/Examples/BloggerSample/main.m new file mode 100644 index 0000000..44680b9 --- /dev/null +++ b/GTL/Examples/BloggerSample/main.m @@ -0,0 +1,24 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// main.m +// + +#import + +int main(int argc, char *argv[]) { + return NSApplicationMain(argc, (const char **) argv); +} diff --git a/GTL/Examples/BooksSample/.svn/all-wcprops b/GTL/Examples/BooksSample/.svn/all-wcprops new file mode 100644 index 0000000..67a7d7a --- /dev/null +++ b/GTL/Examples/BooksSample/.svn/all-wcprops @@ -0,0 +1,53 @@ +K 25 +svn:wc:ra_dav:version-url +V 44 +/svn/!svn/ver/169/trunk/Examples/BooksSample +END +main.m +K 25 +svn:wc:ra_dav:version-url +V 50 +/svn/!svn/ver/23/trunk/Examples/BooksSample/main.m +END +BooksSampleAppController.m +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/23/trunk/Examples/BooksSample/BooksSampleAppController.m +END +BooksSampleWindowController.h +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/!svn/ver/23/trunk/Examples/BooksSample/BooksSampleWindowController.h +END +Info.plist +K 25 +svn:wc:ra_dav:version-url +V 54 +/svn/!svn/ver/23/trunk/Examples/BooksSample/Info.plist +END +BooksSampleWindowController.m +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/169/trunk/Examples/BooksSample/BooksSampleWindowController.m +END +BooksSampleAppController.h +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/23/trunk/Examples/BooksSample/BooksSampleAppController.h +END +README.txt +K 25 +svn:wc:ra_dav:version-url +V 54 +/svn/!svn/ver/23/trunk/Examples/BooksSample/README.txt +END +buildStripHeaders +K 25 +svn:wc:ra_dav:version-url +V 61 +/svn/!svn/ver/23/trunk/Examples/BooksSample/buildStripHeaders +END diff --git a/GTL/Examples/BooksSample/.svn/entries b/GTL/Examples/BooksSample/.svn/entries new file mode 100644 index 0000000..205b004 --- /dev/null +++ b/GTL/Examples/BooksSample/.svn/entries @@ -0,0 +1,306 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/BooksSample +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-06-19T21:52:36.704909Z +169 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +main.m +file + + + + +2012-12-09T08:42:33.000000Z +246a89353f2c5021dce7384b100ff0fe +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +736 + +BooksSampleAppController.m +file + + + + +2012-12-09T08:42:33.000000Z +fb40c021c1f61ceac05ec9041d4538a9 +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1080 + +BooksSampleWindowController.h +file + + + + +2012-12-09T08:42:33.000000Z +0817229b7e610d17bd2cc56dbb9fd644 +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2855 + +Info.plist +file + + + + +2012-12-09T08:42:33.000000Z +566200b694a227006c2f9bfda7d628b3 +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +836 + +BooksSampleWindowController.m +file + + + + +2012-12-09T08:42:33.000000Z +0cfa10320cee844fa22f2db6de8ccd16 +2012-06-19T21:52:36.704909Z +169 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +27797 + +BooksSampleAppController.h +file + + + + +2012-12-09T08:42:33.000000Z +6f3e464183ca0b017b402aec4d2b0a95 +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +712 + +BooksSample.xcodeproj +dir + +README.txt +file + + + + +2012-12-09T08:42:33.000000Z +0a3374a462b2cff6dcd19d0caf28958a +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +109 + +buildStripHeaders +file + + + + +2012-12-09T08:42:33.000000Z +38b5302dc0e4a662c40b288306a2f6ac +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +454 + +English.lproj +dir + diff --git a/GTL/Examples/BooksSample/.svn/prop-base/buildStripHeaders.svn-base b/GTL/Examples/BooksSample/.svn/prop-base/buildStripHeaders.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/GTL/Examples/BooksSample/.svn/prop-base/buildStripHeaders.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/GTL/Examples/BooksSample/.svn/text-base/BooksSampleAppController.h.svn-base b/GTL/Examples/BooksSample/.svn/text-base/BooksSampleAppController.h.svn-base new file mode 100644 index 0000000..827321d --- /dev/null +++ b/GTL/Examples/BooksSample/.svn/text-base/BooksSampleAppController.h.svn-base @@ -0,0 +1,23 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// BooksSampleAppController.h +// + +#import + +@interface BooksSampleAppController : NSObject +@end diff --git a/GTL/Examples/BooksSample/.svn/text-base/BooksSampleAppController.m.svn-base b/GTL/Examples/BooksSample/.svn/text-base/BooksSampleAppController.m.svn-base new file mode 100644 index 0000000..e9291ec --- /dev/null +++ b/GTL/Examples/BooksSample/.svn/text-base/BooksSampleAppController.m.svn-base @@ -0,0 +1,35 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// BooksSampleAppController.m +// + +#import "BooksSampleAppController.h" +#import "BooksSampleWindowController.h" + +@implementation BooksSampleAppController + +- (void)applicationWillFinishLaunching:(NSNotification *)notification { + BooksSampleWindowController* windowController + = [BooksSampleWindowController sharedWindowController]; + [windowController showWindow:self]; +} + +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { + return YES; +} + +@end diff --git a/GTL/Examples/BooksSample/.svn/text-base/BooksSampleWindowController.h.svn-base b/GTL/Examples/BooksSample/.svn/text-base/BooksSampleWindowController.h.svn-base new file mode 100644 index 0000000..f74a5d4 --- /dev/null +++ b/GTL/Examples/BooksSample/.svn/text-base/BooksSampleWindowController.h.svn-base @@ -0,0 +1,95 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// BooksSampleWindowController.h +// + +#import + +#import "GTLBooks.h" +#import "GTL/GTMOAuth2WindowController.h" + +@interface BooksSampleWindowController : NSWindowController { + @private + IBOutlet NSTextField *signedInField_; + IBOutlet NSButton *signedInButton_; + + IBOutlet NSTextField *keywordsField_; + IBOutlet NSButton *searchButton_; + + IBOutlet NSButton *addToMyLibraryButton_; + IBOutlet NSButton *publicVolumesCancelButton_; + + IBOutlet NSTableView *publicVolumesTable_; + IBOutlet NSProgressIndicator *publicVolumesProgressIndicator_; + IBOutlet NSTextView *publicVolumesResultTextView_; + IBOutlet NSImageView *publicVolumesImageView_; + + IBOutlet NSButton *fetchMyLibraryButton_; + IBOutlet NSPopUpButton *myBookshelvesPopup_; + IBOutlet NSButton *myLibraryCancelButton_; + + IBOutlet NSTableView *myVolumesTable_; + IBOutlet NSProgressIndicator *myVolumesProgressIndicator_; + IBOutlet NSTextView *myVolumesResultTextView_; + IBOutlet NSImageView *myVolumesImageView_; + + IBOutlet NSButton *removeButton_; + IBOutlet NSButton *removeAllButton_; + + IBOutlet NSButton *clientIDButton_; + IBOutlet NSTextField *clientIDRequiredTextField_; + IBOutlet NSWindow *clientIDSheet_; + IBOutlet NSTextField *clientIDField_; + IBOutlet NSTextField *clientSecretField_; + + GTLBooksVolumes *publicVolumes_; + GTLServiceTicket *publicVolumesTicket_; + NSError *publicVolumesFetchError_; + + GTLBooksBookshelves *bookshelves_; + GTLServiceTicket *bookshelvesTicket_; + + GTLBooksVolumes *myVolumes_; + GTLServiceTicket *myVolumesTicket_; + NSError *myVolumesFetchError_; + + GTLServiceTicket *editMyVolumeTicket_; +} + ++ (BooksSampleWindowController *)sharedWindowController; + +- (IBAction)signInClicked:(id)sender; + +- (IBAction)searchClicked:(id)sender; + +- (IBAction)cancelSearchClicked:(id)sender; + +- (IBAction)fetchMyVolumesClicked:(id)sender; +- (IBAction)cancelMyVolumesFetchClicked:(id)sender; + +- (IBAction)addToMyLibraryClicked:(id)sender; +- (IBAction)removeFromMyLibraryClicked:(id)sender; +- (IBAction)removeAllFromMyLibraryClicked:(id)sender; + +- (IBAction)APIConsoleClicked:(id)sender; +- (IBAction)loggingCheckboxClicked:(id)sender; + +// Client ID sheet +- (IBAction)clientIDClicked:(id)sender; +- (IBAction)clientIDDoneClicked:(id)sender; + +@end diff --git a/GTL/Examples/BooksSample/.svn/text-base/BooksSampleWindowController.m.svn-base b/GTL/Examples/BooksSample/.svn/text-base/BooksSampleWindowController.m.svn-base new file mode 100644 index 0000000..776bb97 --- /dev/null +++ b/GTL/Examples/BooksSample/.svn/text-base/BooksSampleWindowController.m.svn-base @@ -0,0 +1,796 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// BooksSampleWindowController.m +// + +#import "BooksSampleWindowController.h" + +#import "GTL/GTMHTTPFetcherLogging.h" + +@interface BooksSampleWindowController () + +@property (nonatomic, readonly) GTLServiceBooks *booksService; + +@property (nonatomic, retain) GTLBooksVolumes *publicVolumes; +@property (nonatomic, retain) GTLServiceTicket *publicVolumesTicket; +@property (nonatomic, retain) NSError *publicVolumesFetchError; + +@property (nonatomic, retain) GTLBooksBookshelves *bookshelves; +@property (nonatomic, retain) GTLServiceTicket *bookshelvesTicket; + +@property (nonatomic, retain) GTLBooksVolumes *myVolumes; +@property (nonatomic, retain) GTLServiceTicket *myVolumesTicket; +@property (nonatomic, retain) NSError *myVolumesFetchError; + +@property (nonatomic, retain) GTLServiceTicket *editMyVolumeTicket; + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel; + +- (void)updateUI; +- (void)updateBookshelvesPopup; +- (void)displayAlert:(NSString *)title format:(NSString *)format, ...; + +- (void)searchVolumes; +- (void)fetchMyBookshelvesThenInvokeSelector:(SEL)sel; +- (void)fetchMyVolumes; + +- (void)addSelectedPublicVolume; +- (void)removeMyVolume; +- (void)removeAllMyVolumes; + +- (GTLBooksVolume *)selectedPublicVolume; +- (GTLBooksVolume *)selectedMyVolume; +- (GTLBooksBookshelf *)selectedBookshelf; +@end + + +NSString *const kKeychainItemName = @"Books Sample: Google Books"; + +@implementation BooksSampleWindowController + +@synthesize publicVolumes = publicVolumes_, + publicVolumesTicket = publicVolumesTicket_, + publicVolumesFetchError = publicVolumesFetchError_, + bookshelves = bookshelves_, + bookshelvesTicket = bookshelvesTicket_, + myVolumes = myVolumes_, + myVolumesTicket = myVolumesTicket_, + myVolumesFetchError = myVolumesFetchError_, + editMyVolumeTicket = editMyVolumeTicket_; + ++ (BooksSampleWindowController *)sharedWindowController { + static BooksSampleWindowController* gWindowController = nil; + if (!gWindowController) { + gWindowController = [[BooksSampleWindowController alloc] init]; + } + return gWindowController; +} + +- (id)init { + return [self initWithWindowNibName:@"BooksSampleWindow"]; +} + +- (void)awakeFromNib { + // Load the OAuth token from the keychain, if it was previously saved + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + GTMOAuth2Authentication *auth; + auth = [GTMOAuth2WindowController authForGoogleFromKeychainForName:kKeychainItemName + clientID:clientID + clientSecret:clientSecret]; + self.booksService.authorizer = auth; + + // Set the result text fields to have a distinctive color and mono-spaced font + [publicVolumesResultTextView_ setTextColor:[NSColor darkGrayColor]]; + [myVolumesResultTextView_ setTextColor:[NSColor darkGrayColor]]; + + NSFont *resultTextFont = [NSFont fontWithName:@"Monaco" size:9]; + [publicVolumesResultTextView_ setFont:resultTextFont]; + [myVolumesResultTextView_ setFont:resultTextFont]; + + [self updateUI]; +} + +- (void)dealloc { + self.publicVolumes = nil; + self.publicVolumesTicket = nil; + self.publicVolumesFetchError = nil; + + self.bookshelves = nil; + self.bookshelvesTicket = nil; + + self.myVolumes = nil; + self.myVolumesTicket = nil; + self.myVolumesFetchError = nil; + + self.editMyVolumeTicket = nil; + + [super dealloc]; +} + +#pragma mark - + +- (NSString *)signedInUsername { + GTMOAuth2Authentication *auth = self.booksService.authorizer; + BOOL isSignedIn = auth.canAuthorize; + if (isSignedIn) { + return auth.userEmail; + } else { + return nil; + } +} + +- (BOOL)isSignedIn { + NSString *name = [self signedInUsername]; + return (name != nil); +} + +#pragma mark IBActions + +- (IBAction)signInClicked:(id)sender { + if (![self isSignedIn]) { + // Sign in + [self runSigninThenInvokeSelector:@selector(updateUI)]; + } else { + // Sign out + GTLServiceBooks *service = self.booksService; + + [GTMOAuth2WindowController removeAuthFromKeychainForName:kKeychainItemName]; + service.authorizer = nil; + [self updateUI]; + } +} + +- (IBAction)searchClicked:(id)sender { + [self searchVolumes]; +} + +- (IBAction)cancelSearchClicked:(id)sender { + [self.publicVolumesTicket cancelTicket]; + self.publicVolumesTicket = nil; + + [self updateUI]; +} + +- (IBAction)fetchMyVolumesClicked:(id)sender { + if (![self isSignedIn]) { + [self runSigninThenInvokeSelector:@selector(fetchMyVolumes)]; + } else { + [self fetchMyVolumes]; + } +} + +- (IBAction)cancelMyVolumesFetchClicked:(id)sender { + [self.publicVolumesTicket cancelTicket]; + self.publicVolumesTicket = nil; + + [self.editMyVolumeTicket cancelTicket]; + self.editMyVolumeTicket = nil; + + [self updateUI]; +} + +- (IBAction)addToMyLibraryClicked:(id)sender { + [self addSelectedPublicVolume]; +}; + +- (IBAction)removeFromMyLibraryClicked:(id)sender { + [self removeMyVolume]; +}; + +- (IBAction)removeAllFromMyLibraryClicked:(id)sender { + // Make the user confirm that the all books on the shelf should be deleted + GTLBooksBookshelf *shelf = [self selectedBookshelf]; + NSBeginAlertSheet(@"Delete All", @"Delete", @"Cancel", nil, + [self window], self, + @selector(deleteAllSheetDidEnd:returnCode:contextInfo:), + nil, nil, @"Delete %@ volumes for shelf \"%@\"?", + shelf.volumeCount, shelf.title); +}; + +- (void)deleteAllSheetDidEnd:(NSWindow *)sheet + returnCode:(int)returnCode + contextInfo:(void *)contextInfo { + if (returnCode == NSAlertDefaultReturn) { + [self removeAllMyVolumes]; + } +} + + +- (IBAction)APIConsoleClicked:(id)sender { + NSURL *url = [NSURL URLWithString:@"https://code.google.com/apis/console"]; + [[NSWorkspace sharedWorkspace] openURL:url]; +} + +- (IBAction)loggingCheckboxClicked:(id)sender { + [GTMHTTPFetcher setLoggingEnabled:[sender state]]; +} + +#pragma mark - + +// get a service object with the current username/password +// +// A "service" object handles networking tasks. Service objects +// contain user authentication information as well as networking +// state information (such as cookies and the "last modified" date for +// fetched data.) + +- (GTLServiceBooks *)booksService { + + static GTLServiceBooks* service = nil; + + if (!service) { + service = [[GTLServiceBooks alloc] init]; + + // Have the service object set tickets to fetch consecutive pages + // of the object so we do not need to manually fetch them + service.shouldFetchNextPages = YES; + + // Have the service object set tickets to retry temporary error conditions + // automatically + service.retryEnabled = YES; + } + return service; +} + +- (GTLBooksVolume *)selectedPublicVolume { + int rowIndex = [publicVolumesTable_ selectedRow]; + if (rowIndex > -1) { + GTLBooksVolume *item = [self.publicVolumes itemAtIndex:rowIndex]; + return item; + } + return nil; +} + +- (GTLBooksVolume *)selectedMyVolume { + int rowIndex = [myVolumesTable_ selectedRow]; + if (rowIndex > -1) { + GTLBooksVolume *item = [self.myVolumes itemAtIndex:rowIndex]; + return item; + } + return nil; +} + +- (GTLBooksBookshelf *)selectedBookshelf { + NSMenuItem *menuItem = [myBookshelvesPopup_ selectedItem]; + GTLBooksBookshelf *shelf = [menuItem representedObject]; + return shelf; +} + +#pragma mark Search Public Volumes + +- (void)searchVolumes { + self.publicVolumes = nil; + self.publicVolumesFetchError = nil; + + NSString *text = [keywordsField_ stringValue]; + GTLQueryBooks *query = [GTLQueryBooks queryForVolumesListWithQ:text]; + + // The Books API currently requires that search queries not have an + // authorization header (b/4445456) + query.shouldSkipAuthorization = YES; + + // Note: setting the APIKey on the service object may give a higher + // server quota when executing unauthorized queries + GTLServiceBooks *service = self.booksService; + self.publicVolumesTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id object, NSError *error) { + // callback + self.publicVolumes = object; + self.publicVolumesFetchError = error; + self.publicVolumesTicket = nil; + + [self updateUI]; + }]; + [self updateUI]; +} + +#pragma mark Fetch Bookshelves + +- (void)fetchMyBookshelvesThenInvokeSelector:(SEL)sel { + self.bookshelves = nil; + self.myVolumesFetchError = nil; + + GTLQueryBooks *query = [GTLQueryBooks queryForMylibraryBookshelvesList]; + + GTLServiceBooks *service = self.booksService; + self.bookshelvesTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id object, NSError *error) { + // callback + self.bookshelves = object; + self.myVolumesFetchError = error; + self.bookshelvesTicket = nil; + + if (error == nil) { + // load the pop-up menu + [self updateBookshelvesPopup]; + if (sel) { + [self performSelector:sel]; + } + } + + [self updateUI]; + }]; + [self updateUI]; +} + +- (void)updateBookshelvesPopup { + NSInteger index = [myBookshelvesPopup_ indexOfSelectedItem]; + NSMenu *menu = [myBookshelvesPopup_ menu]; + [menu removeAllItems]; + + for (GTLBooksBookshelf *shelf in self.bookshelves) { + // Make a pop-up menu item including the bookshelf name and + // the number of books + NSString *title = [NSString stringWithFormat:@"%@ (%@)", + shelf.title, shelf.volumeCount]; + + NSMenuItem *menuItem = [menu addItemWithTitle:title + action:@selector(bookshelfPopupChanged:) + keyEquivalent:@""]; + [menuItem setTarget:self]; + + // Save this bookshelf in the menu item + [menuItem setRepresentedObject:shelf]; + } + [myBookshelvesPopup_ selectItemAtIndex:index]; +} + +- (void)bookshelfPopupChanged:(id)sender { + [self fetchMyVolumes]; +} + +#pragma mark Fetch My Volumes + +- (void)fetchMyVolumes { + GTLBooksBookshelves *bookshelves = self.bookshelves; + if (bookshelves == nil) { + // Before we fetch volumes, fetch the list of bookshelves so we can + // know which shelf of volumes to fetch + [self fetchMyBookshelvesThenInvokeSelector:@selector(fetchMyVolumes)]; + return; + } + + self.myVolumes = nil; + self.myVolumesFetchError = nil; + + GTLBooksBookshelf *shelf = [self selectedBookshelf]; + + // per b/4444470 bookshelf ID should be a string type, not a number + NSString *shelfID = [shelf.identifier stringValue]; + + GTLQueryBooks *query = [GTLQueryBooks queryForMylibraryBookshelvesVolumesListWithShelf:shelfID]; + + GTLServiceBooks *service = self.booksService; + self.myVolumesTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id object, NSError *error) { + // callback + self.myVolumes = object; + self.myVolumesFetchError = error; + self.myVolumesTicket = nil; + + [self updateUI]; + }]; + [self updateUI]; +} + +#pragma mark Add Selected Public Volume To My Volumes + +- (void)addSelectedPublicVolume { + GTLBooksVolume *selectedVolume = [self selectedPublicVolume]; + if (selectedVolume) { + // per b/4444470 bookshelf ID should be a string type, not a number + GTLBooksBookshelf *shelf = [self selectedBookshelf]; + NSString *shelfID = [shelf.identifier stringValue]; + + NSString *volumeID = selectedVolume.identifier; + GTLQueryBooks *query = [GTLQueryBooks queryForMylibraryBookshelvesAddVolumeWithShelf:shelfID + volumeId:volumeID]; + GTLServiceBooks *service = self.booksService; + self.myVolumesTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id object, NSError *error) { + // callback + self.myVolumesTicket = nil; + + if (error == nil) { + [self displayAlert:@"Volume Added" + format:@"Added \"%@\" to shelf \"%@\"", + selectedVolume.volumeInfo.title, shelf.title]; + + // Refresh the bookshelf count and the volume list + self.bookshelves = nil; + [self fetchMyVolumes]; + } else { + [self displayAlert:@"Add Failed" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; + } +} + +#pragma mark Remove My Volume + +- (void)removeMyVolume { + GTLBooksVolume *selectedVolume = [self selectedMyVolume]; + if (selectedVolume) { + // per b/4444470 bookshelf ID should be a string type, not a number + GTLBooksBookshelf *shelf = [self selectedBookshelf]; + NSString *shelfID = [shelf.identifier stringValue]; + + NSString *volumeID = selectedVolume.identifier; + GTLQueryBooks *query = [GTLQueryBooks queryForMylibraryBookshelvesRemoveVolumeWithShelf:shelfID + volumeId:volumeID]; + GTLServiceBooks *service = self.booksService; + self.myVolumesTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id object, NSError *error) { + // callback + self.myVolumesTicket = nil; + + if (error == nil) { + [self displayAlert:@"Volume Removed" + format:@"Removed \"%@\" from shelf \"%@\"", + selectedVolume.volumeInfo.title, shelf.title]; + + // Refresh the bookshelf count and the volume list + self.bookshelves = nil; + [self fetchMyVolumes]; + } else { + [self displayAlert:@"Remove Failed" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; + } +} + +#pragma mark Remove My Volume + +- (void)removeAllMyVolumes { + // per b/4444470 bookshelf ID should be a string type, not a number + GTLBooksBookshelf *shelf = [self selectedBookshelf]; + NSString *shelfID = [shelf.identifier stringValue]; + + GTLBatchQuery *batchQuery = [GTLBatchQuery batchQuery]; + + for (GTLBooksVolume *volume in self.myVolumes) { + NSString *volumeID = volume.identifier; + GTLQueryBooks *query = [GTLQueryBooks queryForMylibraryBookshelvesRemoveVolumeWithShelf:shelfID + volumeId:volumeID]; + [batchQuery addQuery:query]; + } + + GTLServiceBooks *service = self.booksService; + self.myVolumesTicket = [service executeQuery:batchQuery + completionHandler:^(GTLServiceTicket *ticket, + id object, NSError *error) { + // callback + self.myVolumesTicket = nil; + + if (error == nil) { + // execution succeeded + GTLBatchResult *batchResults = (GTLBatchResult *)object; + + NSDictionary *successes = batchResults.successes; + NSDictionary *failures = batchResults.failures; + + NSUInteger numberRemoved = [successes count]; + NSUInteger numberFailed = [failures count]; + + [self displayAlert:@"Volumes Removed" + format:@"Removed %lu of %lu from shelf \"%@\"", + numberRemoved, numberRemoved + numberFailed, + shelf.title]; + + // Refresh the bookshelf count and the volume list + self.bookshelves = nil; + [self fetchMyVolumes]; + } else { + // execution failed + [self displayAlert:@"Remove Failed" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; +} + +#pragma mark Sign In + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel { + // Applications should have client ID and client secret strings + // hardcoded into the source, but the sample application asks the + // developer for the strings + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + if ([clientID length] == 0 || [clientSecret length] == 0) { + // Remind the developer that client ID and client secret are needed + [clientIDButton_ performSelector:@selector(performClick:) + withObject:self + afterDelay:0.5]; + return; + } + + // Show the OAuth 2 sign-in controller + NSBundle *frameworkBundle = [NSBundle bundleForClass:[GTMOAuth2WindowController class]]; + GTMOAuth2WindowController *windowController; + windowController = [GTMOAuth2WindowController controllerWithScope:@"https://www.googleapis.com/auth/books" + clientID:clientID + clientSecret:clientSecret + keychainItemName:kKeychainItemName + resourceBundle:frameworkBundle]; + [windowController signInSheetModalForWindow:[self window] + completionHandler:^(GTMOAuth2Authentication *auth, + NSError *error) { + // callback + if (error == nil) { + self.booksService.authorizer = auth; + if (signInDoneSel) { + [self performSelector:signInDoneSel]; + } + } else { + self.myVolumesFetchError = error; + [self updateUI]; + } + }]; +} + +#pragma mark UI + +- (void)fetchURLString:(NSString *)newImageURLStr + staticURLString:(NSString **)priorURLString + forImageView:(NSImageView *)imageView + volume:(GTLBooksVolume *)volume { + // Common code to fetch an image for an NSImageView + if (!GTL_AreEqualOrBothNil(newImageURLStr, *priorURLString)) { + // The URL has changed since the previous fetch; save the new URL string + // in the static + *priorURLString = newImageURLStr; + + [imageView setImage:nil]; + + if (newImageURLStr) { + // Use an http fetcher to retrieve the image data + GTMHTTPFetcherService *fetcherService = self.booksService.fetcherService; + GTMHTTPFetcher *fetcher = [fetcherService fetcherWithURLString:newImageURLStr]; + + // Book image URLs are not https so they can't be authorized + fetcher.authorizer = nil; + [fetcher setCommentWithFormat:@"image for volume \"%@\"", + volume.volumeInfo.title]; + + [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { + // callback + if (error == nil) { + NSImage *image = [[[NSImage alloc] initWithData:data] autorelease]; + [imageView setImage:image]; + } else { + NSLog(@"Error %@ loading image %@", error, newImageURLStr); + } + }]; + } + } +} + +- (void)updatePublicVolumeImage { + static NSString* priorImageURLStr = nil; + + GTLBooksVolume *volume = [self selectedPublicVolume]; + NSString *imageURLStr = volume.volumeInfo.imageLinks.thumbnail; + + [self fetchURLString:imageURLStr + staticURLString:&priorImageURLStr + forImageView:publicVolumesImageView_ + volume:volume]; +} + +- (void)updateMyVolumeImage { + static NSString* priorImageURLStr = nil; + + GTLBooksVolume *volume = [self selectedMyVolume]; + NSString *imageURLStr = volume.volumeInfo.imageLinks.thumbnail; + + [self fetchURLString:imageURLStr + staticURLString:&priorImageURLStr + forImageView:myVolumesImageView_ + volume:volume]; +} + +- (void)updateUI { + BOOL isSignedIn = [self isSignedIn]; + NSString *username = [self signedInUsername]; + [signedInButton_ setTitle:(isSignedIn ? @"Sign Out" : @"Sign In")]; + [signedInField_ setStringValue:(isSignedIn ? username : @"No")]; + + // + // Public Volumes table + // + + [publicVolumesTable_ reloadData]; + + if (self.publicVolumesTicket) { + [publicVolumesProgressIndicator_ startAnimation:self]; + } else { + [publicVolumesProgressIndicator_ stopAnimation:self]; + } + + // Get the description of the selected item, or the fetch error + NSString *resultStr = @""; + + if (self.publicVolumesFetchError) { + // Display the error + resultStr = [self.publicVolumesFetchError description]; + } else { + // Display the selected item + GTLBooksVolume *item = [self selectedPublicVolume]; + if (item) { + resultStr = [item description]; + } + } + [publicVolumesResultTextView_ setString:resultStr]; + + [self updatePublicVolumeImage]; + + // + // My Volumes table + // + + [myVolumesTable_ reloadData]; + + if (self.myVolumesTicket) { + [myVolumesProgressIndicator_ startAnimation:self]; + } else { + [myVolumesProgressIndicator_ stopAnimation:self]; + } + + // Get the description of the selected item, or the fetch error + resultStr = @""; + + if (self.myVolumesFetchError) { + // Display the error + resultStr = [self.myVolumesFetchError description]; + } else { + // Display the selected item + GTLBooksVolume *item = [self selectedMyVolume]; + if (item) { + resultStr = [item description]; + } + } + [myVolumesResultTextView_ setString:resultStr]; + + [self updateMyVolumeImage]; + + // Enable buttons + BOOL hasSearchTerms = ([[keywordsField_ stringValue] length] > 0); + BOOL isFetchingPublicVolumes = (self.publicVolumesTicket != nil); + [searchButton_ setEnabled:(hasSearchTerms && !isFetchingPublicVolumes)]; + [publicVolumesCancelButton_ setEnabled:isFetchingPublicVolumes]; + + BOOL isFetchingMyVolumes = (self.myVolumesTicket != nil + || self.editMyVolumeTicket != nil); + [fetchMyLibraryButton_ setEnabled:(isSignedIn && !isFetchingMyVolumes)]; + [myLibraryCancelButton_ setEnabled:isFetchingMyVolumes]; + + BOOL hasMyLibrary = (self.myVolumes != nil); + BOOL isPublicLibraryVolumeSelected = ([self selectedPublicVolume] != nil); + [addToMyLibraryButton_ setEnabled:(isPublicLibraryVolumeSelected && hasMyLibrary)]; + + BOOL isMyLibraryVolumeSelected = ([self selectedMyVolume] != nil); + [removeButton_ setEnabled:isMyLibraryVolumeSelected]; + + BOOL hasMyLibraryVolumes = ([self.myVolumes.items count] > 0); + [removeAllButton_ setEnabled:hasMyLibraryVolumes]; + + BOOL hasBookshelves = (self.bookshelves != nil); + [myBookshelvesPopup_ setEnabled:hasBookshelves]; + + // Show or hide the text indicating that the client ID or client secret are + // needed + BOOL hasClientIDStrings = [[clientIDField_ stringValue] length] > 0 + && [[clientSecretField_ stringValue] length] > 0; + [clientIDRequiredTextField_ setHidden:hasClientIDStrings]; +} + +- (void)displayAlert:(NSString *)title format:(NSString *)format, ... { + NSString *result = format; + if (format) { + va_list argList; + va_start(argList, format); + result = [[[NSString alloc] initWithFormat:format + arguments:argList] autorelease]; + va_end(argList); + } + NSBeginAlertSheet(title, nil, nil, nil, [self window], nil, nil, + nil, nil, @"%@", result); +} + +#pragma mark Client ID Sheet + +// Client ID and Client Secret Sheet +// +// Sample apps need this sheet to ask for the client ID and client secret +// strings +// +// Your application will just hardcode the client ID and client secret strings +// into the source rather than ask the user for them. +// +// The string values are obtained from the API Console, +// https://code.google.com/apis/console + +- (IBAction)clientIDClicked:(id)sender { + // Show the sheet for developers to enter their client ID and client secret + [NSApp beginSheet:clientIDSheet_ + modalForWindow:[self window] + modalDelegate:self + didEndSelector:@selector(clientIDSheetDidEnd:returnCode:contextInfo:) + contextInfo:NULL]; +} + +- (IBAction)clientIDDoneClicked:(id)sender { + [NSApp endSheet:clientIDSheet_ returnCode:NSOKButton]; +} + +- (void)clientIDSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { + [sheet orderOut:self]; + [self updateUI]; +} + +#pragma mark Text field delegate methods + +- (void)controlTextDidChange:(NSNotification *)note { + [self updateUI]; // enable and disable buttons +} + +#pragma mark TableView delegate and data source methods + +- (void)tableViewSelectionDidChange:(NSNotification *)notification { + [self updateUI]; +} + +// Table view data source methods +- (int)numberOfRowsInTableView:(NSTableView *)tableView { + if (tableView == publicVolumesTable_) { + return [self.publicVolumes.items count]; + } else { + return [self.myVolumes.items count]; + } +} + +- (id)tableView:(NSTableView *)tableView +objectValueForTableColumn:(NSTableColumn *)tableColumn + row:(int)row { + NSArray *items; + if (tableView == publicVolumesTable_) { + items = self.publicVolumes.items; + } else { + items = self.myVolumes.items; + } + GTLBooksVolume *item = [items objectAtIndex:row]; + NSString *title = item.volumeInfo.title; + return title; +} + +@end diff --git a/GTL/Examples/BooksSample/.svn/text-base/Info.plist.svn-base b/GTL/Examples/BooksSample/.svn/text-base/Info.plist.svn-base new file mode 100644 index 0000000..8a98221 --- /dev/null +++ b/GTL/Examples/BooksSample/.svn/text-base/Info.plist.svn-base @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.example.BooksSample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/GTL/Examples/BooksSample/.svn/text-base/README.txt.svn-base b/GTL/Examples/BooksSample/.svn/text-base/README.txt.svn-base new file mode 100644 index 0000000..ff257a0 --- /dev/null +++ b/GTL/Examples/BooksSample/.svn/text-base/README.txt.svn-base @@ -0,0 +1 @@ +This sample should automatically build and copy over the GTL.framework as part of the build-and-run process. diff --git a/GTL/Examples/BooksSample/.svn/text-base/buildStripHeaders.svn-base b/GTL/Examples/BooksSample/.svn/text-base/buildStripHeaders.svn-base new file mode 100644 index 0000000..0238ef2 --- /dev/null +++ b/GTL/Examples/BooksSample/.svn/text-base/buildStripHeaders.svn-base @@ -0,0 +1,17 @@ +#!/bin/sh +# +# buildStripHeaders +# +# Remove header files from the built copy of the framework inside our +# application. + +# Strip "*.h" files +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname '*.h' -delete + +# Strip "Headers" links +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type l -delete + +# Strip "Headers" directories +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type d -prune -delete + + diff --git a/GTL/Examples/BooksSample/.svn/text-base/main.m.svn-base b/GTL/Examples/BooksSample/.svn/text-base/main.m.svn-base new file mode 100644 index 0000000..3e35dea --- /dev/null +++ b/GTL/Examples/BooksSample/.svn/text-base/main.m.svn-base @@ -0,0 +1,25 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// main.m +// + +#import + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **) argv); +} diff --git a/GTL/Examples/BooksSample/BooksSample.xcodeproj/.svn/all-wcprops b/GTL/Examples/BooksSample/BooksSample.xcodeproj/.svn/all-wcprops new file mode 100644 index 0000000..1f848ac --- /dev/null +++ b/GTL/Examples/BooksSample/BooksSample.xcodeproj/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 66 +/svn/!svn/ver/154/trunk/Examples/BooksSample/BooksSample.xcodeproj +END +project.pbxproj +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/154/trunk/Examples/BooksSample/BooksSample.xcodeproj/project.pbxproj +END diff --git a/GTL/Examples/BooksSample/BooksSample.xcodeproj/.svn/entries b/GTL/Examples/BooksSample/BooksSample.xcodeproj/.svn/entries new file mode 100644 index 0000000..c1735c8 --- /dev/null +++ b/GTL/Examples/BooksSample/BooksSample.xcodeproj/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/BooksSample/BooksSample.xcodeproj +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +project.pbxproj +file + + + + +2012-12-09T08:42:33.000000Z +0c26872f3905f78295e7a33b95ee0ee0 +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +36001 + diff --git a/GTL/Examples/BooksSample/BooksSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base b/GTL/Examples/BooksSample/BooksSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base new file mode 100644 index 0000000..96157a7 --- /dev/null +++ b/GTL/Examples/BooksSample/BooksSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base @@ -0,0 +1,626 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F22A2141186315400FFBAB6 /* WebKit.framework */; }; + 4F2445C8121F0D2900FEE1DA /* GTL.framework in Copy GTL Framework */ = {isa = PBXBuildFile; fileRef = 4F2445BE121F0CF600FEE1DA /* GTL.framework */; }; + 4F2445C9121F0D2C00FEE1DA /* GTL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F2445BE121F0CF600FEE1DA /* GTL.framework */; }; + 4F82A5140FCDFECC00C477D4 /* BooksSampleAppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F82A5100FCDFECC00C477D4 /* BooksSampleAppController.m */; }; + 4F82A5150FCDFECC00C477D4 /* BooksSampleWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F82A5120FCDFECC00C477D4 /* BooksSampleWindowController.m */; }; + 4FA6F3D31034AEC400C5DFA5 /* BooksSampleWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA6F3CF1034AEC400C5DFA5 /* BooksSampleWindow.xib */; }; + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */; }; + 4FEF0738155C441B00507BF2 /* GTLBooksAnnotation.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF070B155C441B00507BF2 /* GTLBooksAnnotation.m */; }; + 4FEF0739155C441B00507BF2 /* GTLBooksAnnotationdata.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF070D155C441B00507BF2 /* GTLBooksAnnotationdata.m */; }; + 4FEF073A155C441B00507BF2 /* GTLBooksAnnotations.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF070F155C441B00507BF2 /* GTLBooksAnnotations.m */; }; + 4FEF073B155C441B00507BF2 /* GTLBooksAnnotationsdata.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0711155C441B00507BF2 /* GTLBooksAnnotationsdata.m */; }; + 4FEF073C155C441B00507BF2 /* GTLBooksAnnotationsRange.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0713155C441B00507BF2 /* GTLBooksAnnotationsRange.m */; }; + 4FEF073D155C441B00507BF2 /* GTLBooksBookshelf.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0715155C441B00507BF2 /* GTLBooksBookshelf.m */; }; + 4FEF073E155C441B00507BF2 /* GTLBooksBookshelves.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0717155C441B00507BF2 /* GTLBooksBookshelves.m */; }; + 4FEF073F155C441B00507BF2 /* GTLBooksConcurrentAccessRestriction.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0719155C441B00507BF2 /* GTLBooksConcurrentAccessRestriction.m */; }; + 4FEF0740155C441B00507BF2 /* GTLBooksConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF071B155C441B00507BF2 /* GTLBooksConstants.m */; }; + 4FEF0741155C441B00507BF2 /* GTLBooksDownloadAccesses.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF071D155C441B00507BF2 /* GTLBooksDownloadAccesses.m */; }; + 4FEF0742155C441B00507BF2 /* GTLBooksDownloadAccessRestriction.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF071F155C441B00507BF2 /* GTLBooksDownloadAccessRestriction.m */; }; + 4FEF0743155C441B00507BF2 /* GTLBooksLayerGeoData.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0721155C441B00507BF2 /* GTLBooksLayerGeoData.m */; }; + 4FEF0744155C441B00507BF2 /* GTLBooksLayersummaries.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0723155C441B00507BF2 /* GTLBooksLayersummaries.m */; }; + 4FEF0745155C441B00507BF2 /* GTLBooksLayersummary.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0725155C441B00507BF2 /* GTLBooksLayersummary.m */; }; + 4FEF0746155C441B00507BF2 /* GTLBooksReadingPosition.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0727155C441B00507BF2 /* GTLBooksReadingPosition.m */; }; + 4FEF0747155C441B00507BF2 /* GTLBooksRequestAccess.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0729155C441B00507BF2 /* GTLBooksRequestAccess.m */; }; + 4FEF0748155C441B00507BF2 /* GTLBooksReview.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF072B155C441B00507BF2 /* GTLBooksReview.m */; }; + 4FEF0749155C441B00507BF2 /* GTLBooksVolume.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF072D155C441B00507BF2 /* GTLBooksVolume.m */; }; + 4FEF074A155C441B00507BF2 /* GTLBooksVolumeannotation.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF072F155C441B00507BF2 /* GTLBooksVolumeannotation.m */; }; + 4FEF074B155C441B00507BF2 /* GTLBooksVolumeannotations.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0731155C441B00507BF2 /* GTLBooksVolumeannotations.m */; }; + 4FEF074C155C441B00507BF2 /* GTLBooksVolumes.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0733155C441B00507BF2 /* GTLBooksVolumes.m */; }; + 4FEF074D155C441B00507BF2 /* GTLQueryBooks.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0735155C441B00507BF2 /* GTLQueryBooks.m */; }; + 4FEF074E155C441B00507BF2 /* GTLServiceBooks.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0737155C441B00507BF2 /* GTLServiceBooks.m */; }; + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4F2445BD121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F38F6A60B66E91D00B24B81; + remoteInfo = GTLFramework; + }; + 4F2445BF121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027C11A4CA2F00BEB470; + remoteInfo = GTLTouchStaticLib; + }; + 4F2445C1121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027D11A4CA2F00BEB470; + remoteInfo = GTLUnitTests; + }; + 4F2445C3121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F1AD9020B71603F00DC0485; + remoteInfo = DevelopmentTestTool; + }; + 4F72439E12233FAF001A4AD0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 4F38F6A50B66E91D00B24B81; + remoteInfo = GTLFramework; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 4F38F8970B66FAB700B24B81 /* Copy GTL Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4F2445C8121F0D2900FEE1DA /* GTL.framework in Copy GTL Framework */, + ); + name = "Copy GTL Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 4F22A2141186315400FFBAB6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; + 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GTL.xcodeproj; path = ../../Source/GTL.xcodeproj; sourceTree = SOURCE_ROOT; }; + 4F82A5100FCDFECC00C477D4 /* BooksSampleAppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BooksSampleAppController.m; sourceTree = ""; }; + 4F82A5110FCDFECC00C477D4 /* BooksSampleAppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BooksSampleAppController.h; sourceTree = ""; }; + 4F82A5120FCDFECC00C477D4 /* BooksSampleWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BooksSampleWindowController.m; sourceTree = ""; }; + 4F82A5130FCDFECC00C477D4 /* BooksSampleWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BooksSampleWindowController.h; sourceTree = ""; }; + 4FA6F3D01034AEC400C5DFA5 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/BooksSampleWindow.xib; sourceTree = ""; }; + 4FA6F3D21034AEC400C5DFA5 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = buildStripHeaders; sourceTree = ""; }; + 4FEF0709155C441B00507BF2 /* GTLBooks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooks.h; sourceTree = ""; }; + 4FEF070A155C441B00507BF2 /* GTLBooksAnnotation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksAnnotation.h; sourceTree = ""; }; + 4FEF070B155C441B00507BF2 /* GTLBooksAnnotation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksAnnotation.m; sourceTree = ""; }; + 4FEF070C155C441B00507BF2 /* GTLBooksAnnotationdata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksAnnotationdata.h; sourceTree = ""; }; + 4FEF070D155C441B00507BF2 /* GTLBooksAnnotationdata.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksAnnotationdata.m; sourceTree = ""; }; + 4FEF070E155C441B00507BF2 /* GTLBooksAnnotations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksAnnotations.h; sourceTree = ""; }; + 4FEF070F155C441B00507BF2 /* GTLBooksAnnotations.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksAnnotations.m; sourceTree = ""; }; + 4FEF0710155C441B00507BF2 /* GTLBooksAnnotationsdata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksAnnotationsdata.h; sourceTree = ""; }; + 4FEF0711155C441B00507BF2 /* GTLBooksAnnotationsdata.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksAnnotationsdata.m; sourceTree = ""; }; + 4FEF0712155C441B00507BF2 /* GTLBooksAnnotationsRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksAnnotationsRange.h; sourceTree = ""; }; + 4FEF0713155C441B00507BF2 /* GTLBooksAnnotationsRange.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksAnnotationsRange.m; sourceTree = ""; }; + 4FEF0714155C441B00507BF2 /* GTLBooksBookshelf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksBookshelf.h; sourceTree = ""; }; + 4FEF0715155C441B00507BF2 /* GTLBooksBookshelf.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksBookshelf.m; sourceTree = ""; }; + 4FEF0716155C441B00507BF2 /* GTLBooksBookshelves.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksBookshelves.h; sourceTree = ""; }; + 4FEF0717155C441B00507BF2 /* GTLBooksBookshelves.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksBookshelves.m; sourceTree = ""; }; + 4FEF0718155C441B00507BF2 /* GTLBooksConcurrentAccessRestriction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksConcurrentAccessRestriction.h; sourceTree = ""; }; + 4FEF0719155C441B00507BF2 /* GTLBooksConcurrentAccessRestriction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksConcurrentAccessRestriction.m; sourceTree = ""; }; + 4FEF071A155C441B00507BF2 /* GTLBooksConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksConstants.h; sourceTree = ""; }; + 4FEF071B155C441B00507BF2 /* GTLBooksConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksConstants.m; sourceTree = ""; }; + 4FEF071C155C441B00507BF2 /* GTLBooksDownloadAccesses.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksDownloadAccesses.h; sourceTree = ""; }; + 4FEF071D155C441B00507BF2 /* GTLBooksDownloadAccesses.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksDownloadAccesses.m; sourceTree = ""; }; + 4FEF071E155C441B00507BF2 /* GTLBooksDownloadAccessRestriction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksDownloadAccessRestriction.h; sourceTree = ""; }; + 4FEF071F155C441B00507BF2 /* GTLBooksDownloadAccessRestriction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksDownloadAccessRestriction.m; sourceTree = ""; }; + 4FEF0720155C441B00507BF2 /* GTLBooksLayerGeoData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksLayerGeoData.h; sourceTree = ""; }; + 4FEF0721155C441B00507BF2 /* GTLBooksLayerGeoData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksLayerGeoData.m; sourceTree = ""; }; + 4FEF0722155C441B00507BF2 /* GTLBooksLayersummaries.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksLayersummaries.h; sourceTree = ""; }; + 4FEF0723155C441B00507BF2 /* GTLBooksLayersummaries.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksLayersummaries.m; sourceTree = ""; }; + 4FEF0724155C441B00507BF2 /* GTLBooksLayersummary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksLayersummary.h; sourceTree = ""; }; + 4FEF0725155C441B00507BF2 /* GTLBooksLayersummary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksLayersummary.m; sourceTree = ""; }; + 4FEF0726155C441B00507BF2 /* GTLBooksReadingPosition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksReadingPosition.h; sourceTree = ""; }; + 4FEF0727155C441B00507BF2 /* GTLBooksReadingPosition.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksReadingPosition.m; sourceTree = ""; }; + 4FEF0728155C441B00507BF2 /* GTLBooksRequestAccess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksRequestAccess.h; sourceTree = ""; }; + 4FEF0729155C441B00507BF2 /* GTLBooksRequestAccess.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksRequestAccess.m; sourceTree = ""; }; + 4FEF072A155C441B00507BF2 /* GTLBooksReview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksReview.h; sourceTree = ""; }; + 4FEF072B155C441B00507BF2 /* GTLBooksReview.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksReview.m; sourceTree = ""; }; + 4FEF072C155C441B00507BF2 /* GTLBooksVolume.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksVolume.h; sourceTree = ""; }; + 4FEF072D155C441B00507BF2 /* GTLBooksVolume.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksVolume.m; sourceTree = ""; }; + 4FEF072E155C441B00507BF2 /* GTLBooksVolumeannotation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksVolumeannotation.h; sourceTree = ""; }; + 4FEF072F155C441B00507BF2 /* GTLBooksVolumeannotation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksVolumeannotation.m; sourceTree = ""; }; + 4FEF0730155C441B00507BF2 /* GTLBooksVolumeannotations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksVolumeannotations.h; sourceTree = ""; }; + 4FEF0731155C441B00507BF2 /* GTLBooksVolumeannotations.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksVolumeannotations.m; sourceTree = ""; }; + 4FEF0732155C441B00507BF2 /* GTLBooksVolumes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksVolumes.h; sourceTree = ""; }; + 4FEF0733155C441B00507BF2 /* GTLBooksVolumes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksVolumes.m; sourceTree = ""; }; + 4FEF0734155C441B00507BF2 /* GTLQueryBooks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLQueryBooks.h; sourceTree = ""; }; + 4FEF0735155C441B00507BF2 /* GTLQueryBooks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLQueryBooks.m; sourceTree = ""; }; + 4FEF0736155C441B00507BF2 /* GTLServiceBooks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLServiceBooks.h; sourceTree = ""; }; + 4FEF0737155C441B00507BF2 /* GTLServiceBooks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLServiceBooks.m; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 8D1107320486CEB800E47090 /* BooksSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BooksSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F2445C9121F0D2C00FEE1DA /* GTL.framework in Frameworks */, + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 4F82A5110FCDFECC00C477D4 /* BooksSampleAppController.h */, + 4F82A5100FCDFECC00C477D4 /* BooksSampleAppController.m */, + 4F82A5130FCDFECC00C477D4 /* BooksSampleWindowController.h */, + 4F82A5120FCDFECC00C477D4 /* BooksSampleWindowController.m */, + ); + name = Classes; + sourceTree = ""; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 4F22A2141186315400FFBAB6 /* WebKit.framework */, + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* BooksSample.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CalendarSample */ = { + isa = PBXGroup; + children = ( + 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */, + 080E96DDFE201D6D7F000001 /* Classes */, + 4FB25425138C421100B5C1AE /* API Services */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CalendarSample; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 4FA6F3CF1034AEC400C5DFA5 /* BooksSampleWindow.xib */, + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */, + 8D1107310486CEB800E47090 /* Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4F2445B7121F0CF600FEE1DA /* Products */ = { + isa = PBXGroup; + children = ( + 4F2445BE121F0CF600FEE1DA /* GTL.framework */, + 4F2445C0121F0CF600FEE1DA /* libGTLTouchStaticLib.a */, + 4F2445C2121F0CF600FEE1DA /* GTLUnitTests.octest */, + 4F2445C4121F0CF600FEE1DA /* DevelopmentTestTool */, + ); + name = Products; + sourceTree = ""; + }; + 4F29EB7F147D7B94009E625E /* Books */ = { + isa = PBXGroup; + children = ( + 4FEF0708155C441B00507BF2 /* Generated */, + ); + name = Books; + path = ../../Source/Services/Books; + sourceTree = SOURCE_ROOT; + }; + 4FB25425138C421100B5C1AE /* API Services */ = { + isa = PBXGroup; + children = ( + 4F29EB7F147D7B94009E625E /* Books */, + ); + name = "API Services"; + sourceTree = ""; + }; + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */ = { + isa = PBXGroup; + children = ( + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */, + ); + name = "Build Scripts"; + sourceTree = ""; + }; + 4FEF0708155C441B00507BF2 /* Generated */ = { + isa = PBXGroup; + children = ( + 4FEF0709155C441B00507BF2 /* GTLBooks.h */, + 4FEF070A155C441B00507BF2 /* GTLBooksAnnotation.h */, + 4FEF070B155C441B00507BF2 /* GTLBooksAnnotation.m */, + 4FEF070C155C441B00507BF2 /* GTLBooksAnnotationdata.h */, + 4FEF070D155C441B00507BF2 /* GTLBooksAnnotationdata.m */, + 4FEF070E155C441B00507BF2 /* GTLBooksAnnotations.h */, + 4FEF070F155C441B00507BF2 /* GTLBooksAnnotations.m */, + 4FEF0710155C441B00507BF2 /* GTLBooksAnnotationsdata.h */, + 4FEF0711155C441B00507BF2 /* GTLBooksAnnotationsdata.m */, + 4FEF0712155C441B00507BF2 /* GTLBooksAnnotationsRange.h */, + 4FEF0713155C441B00507BF2 /* GTLBooksAnnotationsRange.m */, + 4FEF0714155C441B00507BF2 /* GTLBooksBookshelf.h */, + 4FEF0715155C441B00507BF2 /* GTLBooksBookshelf.m */, + 4FEF0716155C441B00507BF2 /* GTLBooksBookshelves.h */, + 4FEF0717155C441B00507BF2 /* GTLBooksBookshelves.m */, + 4FEF0718155C441B00507BF2 /* GTLBooksConcurrentAccessRestriction.h */, + 4FEF0719155C441B00507BF2 /* GTLBooksConcurrentAccessRestriction.m */, + 4FEF071A155C441B00507BF2 /* GTLBooksConstants.h */, + 4FEF071B155C441B00507BF2 /* GTLBooksConstants.m */, + 4FEF071C155C441B00507BF2 /* GTLBooksDownloadAccesses.h */, + 4FEF071D155C441B00507BF2 /* GTLBooksDownloadAccesses.m */, + 4FEF071E155C441B00507BF2 /* GTLBooksDownloadAccessRestriction.h */, + 4FEF071F155C441B00507BF2 /* GTLBooksDownloadAccessRestriction.m */, + 4FEF0720155C441B00507BF2 /* GTLBooksLayerGeoData.h */, + 4FEF0721155C441B00507BF2 /* GTLBooksLayerGeoData.m */, + 4FEF0722155C441B00507BF2 /* GTLBooksLayersummaries.h */, + 4FEF0723155C441B00507BF2 /* GTLBooksLayersummaries.m */, + 4FEF0724155C441B00507BF2 /* GTLBooksLayersummary.h */, + 4FEF0725155C441B00507BF2 /* GTLBooksLayersummary.m */, + 4FEF0726155C441B00507BF2 /* GTLBooksReadingPosition.h */, + 4FEF0727155C441B00507BF2 /* GTLBooksReadingPosition.m */, + 4FEF0728155C441B00507BF2 /* GTLBooksRequestAccess.h */, + 4FEF0729155C441B00507BF2 /* GTLBooksRequestAccess.m */, + 4FEF072A155C441B00507BF2 /* GTLBooksReview.h */, + 4FEF072B155C441B00507BF2 /* GTLBooksReview.m */, + 4FEF072C155C441B00507BF2 /* GTLBooksVolume.h */, + 4FEF072D155C441B00507BF2 /* GTLBooksVolume.m */, + 4FEF072E155C441B00507BF2 /* GTLBooksVolumeannotation.h */, + 4FEF072F155C441B00507BF2 /* GTLBooksVolumeannotation.m */, + 4FEF0730155C441B00507BF2 /* GTLBooksVolumeannotations.h */, + 4FEF0731155C441B00507BF2 /* GTLBooksVolumeannotations.m */, + 4FEF0732155C441B00507BF2 /* GTLBooksVolumes.h */, + 4FEF0733155C441B00507BF2 /* GTLBooksVolumes.m */, + 4FEF0734155C441B00507BF2 /* GTLQueryBooks.h */, + 4FEF0735155C441B00507BF2 /* GTLQueryBooks.m */, + 4FEF0736155C441B00507BF2 /* GTLServiceBooks.h */, + 4FEF0737155C441B00507BF2 /* GTLServiceBooks.m */, + ); + path = Generated; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* BooksSample */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "BooksSample" */; + buildPhases = ( + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + 4F38F8970B66FAB700B24B81 /* Copy GTL Framework */, + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */, + ); + buildRules = ( + ); + dependencies = ( + 4F72439F12233FAF001A4AD0 /* PBXTargetDependency */, + ); + name = BooksSample; + productInstallPath = "$(HOME)/Applications"; + productName = CalendarSample; + productReference = 8D1107320486CEB800E47090 /* BooksSample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "BooksSample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CalendarSample */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 4F2445B7121F0CF600FEE1DA /* Products */; + ProjectRef = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* BooksSample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 4F2445BE121F0CF600FEE1DA /* GTL.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = GTL.framework; + remoteRef = 4F2445BD121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C0121F0CF600FEE1DA /* libGTLTouchStaticLib.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libGTLTouchStaticLib.a; + remoteRef = 4F2445BF121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C2121F0CF600FEE1DA /* GTLUnitTests.octest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = GTLUnitTests.octest; + remoteRef = 4F2445C1121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C4121F0CF600FEE1DA /* DevelopmentTestTool */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = DevelopmentTestTool; + remoteRef = 4F2445C3121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + 4FA6F3D31034AEC400C5DFA5 /* BooksSampleWindow.xib in Resources */, + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Strip Headers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ./buildStripHeaders; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072D0486CEB800E47090 /* main.m in Sources */, + 4F82A5140FCDFECC00C477D4 /* BooksSampleAppController.m in Sources */, + 4F82A5150FCDFECC00C477D4 /* BooksSampleWindowController.m in Sources */, + 4FEF0738155C441B00507BF2 /* GTLBooksAnnotation.m in Sources */, + 4FEF0739155C441B00507BF2 /* GTLBooksAnnotationdata.m in Sources */, + 4FEF073A155C441B00507BF2 /* GTLBooksAnnotations.m in Sources */, + 4FEF073B155C441B00507BF2 /* GTLBooksAnnotationsdata.m in Sources */, + 4FEF073C155C441B00507BF2 /* GTLBooksAnnotationsRange.m in Sources */, + 4FEF073D155C441B00507BF2 /* GTLBooksBookshelf.m in Sources */, + 4FEF073E155C441B00507BF2 /* GTLBooksBookshelves.m in Sources */, + 4FEF073F155C441B00507BF2 /* GTLBooksConcurrentAccessRestriction.m in Sources */, + 4FEF0740155C441B00507BF2 /* GTLBooksConstants.m in Sources */, + 4FEF0741155C441B00507BF2 /* GTLBooksDownloadAccesses.m in Sources */, + 4FEF0742155C441B00507BF2 /* GTLBooksDownloadAccessRestriction.m in Sources */, + 4FEF0743155C441B00507BF2 /* GTLBooksLayerGeoData.m in Sources */, + 4FEF0744155C441B00507BF2 /* GTLBooksLayersummaries.m in Sources */, + 4FEF0745155C441B00507BF2 /* GTLBooksLayersummary.m in Sources */, + 4FEF0746155C441B00507BF2 /* GTLBooksReadingPosition.m in Sources */, + 4FEF0747155C441B00507BF2 /* GTLBooksRequestAccess.m in Sources */, + 4FEF0748155C441B00507BF2 /* GTLBooksReview.m in Sources */, + 4FEF0749155C441B00507BF2 /* GTLBooksVolume.m in Sources */, + 4FEF074A155C441B00507BF2 /* GTLBooksVolumeannotation.m in Sources */, + 4FEF074B155C441B00507BF2 /* GTLBooksVolumeannotations.m in Sources */, + 4FEF074C155C441B00507BF2 /* GTLBooksVolumes.m in Sources */, + 4FEF074D155C441B00507BF2 /* GTLQueryBooks.m in Sources */, + 4FEF074E155C441B00507BF2 /* GTLServiceBooks.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 4F72439F12233FAF001A4AD0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = GTLFramework; + targetProxy = 4F72439E12233FAF001A4AD0 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C165DFE840E0CC02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 4FA6F3CF1034AEC400C5DFA5 /* BooksSampleWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 4FA6F3D01034AEC400C5DFA5 /* English */, + ); + name = BooksSampleWindow.xib; + sourceTree = ""; + }; + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 4FA6F3D21034AEC400C5DFA5 /* English */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = BooksSample; + RUN_CLANG_STATIC_ANALYZER = YES; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = BooksSample; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = ( + "-DGTL_BUILT_AS_FRAMEWORK=1", + "-DDEBUG=1", + ); + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DGTL_BUILT_AS_FRAMEWORK=1"; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "BooksSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "BooksSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/GTL/Examples/BooksSample/BooksSample.xcodeproj/project.pbxproj b/GTL/Examples/BooksSample/BooksSample.xcodeproj/project.pbxproj new file mode 100644 index 0000000..96157a7 --- /dev/null +++ b/GTL/Examples/BooksSample/BooksSample.xcodeproj/project.pbxproj @@ -0,0 +1,626 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F22A2141186315400FFBAB6 /* WebKit.framework */; }; + 4F2445C8121F0D2900FEE1DA /* GTL.framework in Copy GTL Framework */ = {isa = PBXBuildFile; fileRef = 4F2445BE121F0CF600FEE1DA /* GTL.framework */; }; + 4F2445C9121F0D2C00FEE1DA /* GTL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F2445BE121F0CF600FEE1DA /* GTL.framework */; }; + 4F82A5140FCDFECC00C477D4 /* BooksSampleAppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F82A5100FCDFECC00C477D4 /* BooksSampleAppController.m */; }; + 4F82A5150FCDFECC00C477D4 /* BooksSampleWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F82A5120FCDFECC00C477D4 /* BooksSampleWindowController.m */; }; + 4FA6F3D31034AEC400C5DFA5 /* BooksSampleWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA6F3CF1034AEC400C5DFA5 /* BooksSampleWindow.xib */; }; + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */; }; + 4FEF0738155C441B00507BF2 /* GTLBooksAnnotation.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF070B155C441B00507BF2 /* GTLBooksAnnotation.m */; }; + 4FEF0739155C441B00507BF2 /* GTLBooksAnnotationdata.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF070D155C441B00507BF2 /* GTLBooksAnnotationdata.m */; }; + 4FEF073A155C441B00507BF2 /* GTLBooksAnnotations.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF070F155C441B00507BF2 /* GTLBooksAnnotations.m */; }; + 4FEF073B155C441B00507BF2 /* GTLBooksAnnotationsdata.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0711155C441B00507BF2 /* GTLBooksAnnotationsdata.m */; }; + 4FEF073C155C441B00507BF2 /* GTLBooksAnnotationsRange.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0713155C441B00507BF2 /* GTLBooksAnnotationsRange.m */; }; + 4FEF073D155C441B00507BF2 /* GTLBooksBookshelf.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0715155C441B00507BF2 /* GTLBooksBookshelf.m */; }; + 4FEF073E155C441B00507BF2 /* GTLBooksBookshelves.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0717155C441B00507BF2 /* GTLBooksBookshelves.m */; }; + 4FEF073F155C441B00507BF2 /* GTLBooksConcurrentAccessRestriction.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0719155C441B00507BF2 /* GTLBooksConcurrentAccessRestriction.m */; }; + 4FEF0740155C441B00507BF2 /* GTLBooksConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF071B155C441B00507BF2 /* GTLBooksConstants.m */; }; + 4FEF0741155C441B00507BF2 /* GTLBooksDownloadAccesses.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF071D155C441B00507BF2 /* GTLBooksDownloadAccesses.m */; }; + 4FEF0742155C441B00507BF2 /* GTLBooksDownloadAccessRestriction.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF071F155C441B00507BF2 /* GTLBooksDownloadAccessRestriction.m */; }; + 4FEF0743155C441B00507BF2 /* GTLBooksLayerGeoData.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0721155C441B00507BF2 /* GTLBooksLayerGeoData.m */; }; + 4FEF0744155C441B00507BF2 /* GTLBooksLayersummaries.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0723155C441B00507BF2 /* GTLBooksLayersummaries.m */; }; + 4FEF0745155C441B00507BF2 /* GTLBooksLayersummary.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0725155C441B00507BF2 /* GTLBooksLayersummary.m */; }; + 4FEF0746155C441B00507BF2 /* GTLBooksReadingPosition.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0727155C441B00507BF2 /* GTLBooksReadingPosition.m */; }; + 4FEF0747155C441B00507BF2 /* GTLBooksRequestAccess.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0729155C441B00507BF2 /* GTLBooksRequestAccess.m */; }; + 4FEF0748155C441B00507BF2 /* GTLBooksReview.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF072B155C441B00507BF2 /* GTLBooksReview.m */; }; + 4FEF0749155C441B00507BF2 /* GTLBooksVolume.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF072D155C441B00507BF2 /* GTLBooksVolume.m */; }; + 4FEF074A155C441B00507BF2 /* GTLBooksVolumeannotation.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF072F155C441B00507BF2 /* GTLBooksVolumeannotation.m */; }; + 4FEF074B155C441B00507BF2 /* GTLBooksVolumeannotations.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0731155C441B00507BF2 /* GTLBooksVolumeannotations.m */; }; + 4FEF074C155C441B00507BF2 /* GTLBooksVolumes.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0733155C441B00507BF2 /* GTLBooksVolumes.m */; }; + 4FEF074D155C441B00507BF2 /* GTLQueryBooks.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0735155C441B00507BF2 /* GTLQueryBooks.m */; }; + 4FEF074E155C441B00507BF2 /* GTLServiceBooks.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEF0737155C441B00507BF2 /* GTLServiceBooks.m */; }; + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4F2445BD121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F38F6A60B66E91D00B24B81; + remoteInfo = GTLFramework; + }; + 4F2445BF121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027C11A4CA2F00BEB470; + remoteInfo = GTLTouchStaticLib; + }; + 4F2445C1121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027D11A4CA2F00BEB470; + remoteInfo = GTLUnitTests; + }; + 4F2445C3121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F1AD9020B71603F00DC0485; + remoteInfo = DevelopmentTestTool; + }; + 4F72439E12233FAF001A4AD0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 4F38F6A50B66E91D00B24B81; + remoteInfo = GTLFramework; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 4F38F8970B66FAB700B24B81 /* Copy GTL Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4F2445C8121F0D2900FEE1DA /* GTL.framework in Copy GTL Framework */, + ); + name = "Copy GTL Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 4F22A2141186315400FFBAB6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; + 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GTL.xcodeproj; path = ../../Source/GTL.xcodeproj; sourceTree = SOURCE_ROOT; }; + 4F82A5100FCDFECC00C477D4 /* BooksSampleAppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BooksSampleAppController.m; sourceTree = ""; }; + 4F82A5110FCDFECC00C477D4 /* BooksSampleAppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BooksSampleAppController.h; sourceTree = ""; }; + 4F82A5120FCDFECC00C477D4 /* BooksSampleWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BooksSampleWindowController.m; sourceTree = ""; }; + 4F82A5130FCDFECC00C477D4 /* BooksSampleWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BooksSampleWindowController.h; sourceTree = ""; }; + 4FA6F3D01034AEC400C5DFA5 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/BooksSampleWindow.xib; sourceTree = ""; }; + 4FA6F3D21034AEC400C5DFA5 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = buildStripHeaders; sourceTree = ""; }; + 4FEF0709155C441B00507BF2 /* GTLBooks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooks.h; sourceTree = ""; }; + 4FEF070A155C441B00507BF2 /* GTLBooksAnnotation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksAnnotation.h; sourceTree = ""; }; + 4FEF070B155C441B00507BF2 /* GTLBooksAnnotation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksAnnotation.m; sourceTree = ""; }; + 4FEF070C155C441B00507BF2 /* GTLBooksAnnotationdata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksAnnotationdata.h; sourceTree = ""; }; + 4FEF070D155C441B00507BF2 /* GTLBooksAnnotationdata.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksAnnotationdata.m; sourceTree = ""; }; + 4FEF070E155C441B00507BF2 /* GTLBooksAnnotations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksAnnotations.h; sourceTree = ""; }; + 4FEF070F155C441B00507BF2 /* GTLBooksAnnotations.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksAnnotations.m; sourceTree = ""; }; + 4FEF0710155C441B00507BF2 /* GTLBooksAnnotationsdata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksAnnotationsdata.h; sourceTree = ""; }; + 4FEF0711155C441B00507BF2 /* GTLBooksAnnotationsdata.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksAnnotationsdata.m; sourceTree = ""; }; + 4FEF0712155C441B00507BF2 /* GTLBooksAnnotationsRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksAnnotationsRange.h; sourceTree = ""; }; + 4FEF0713155C441B00507BF2 /* GTLBooksAnnotationsRange.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksAnnotationsRange.m; sourceTree = ""; }; + 4FEF0714155C441B00507BF2 /* GTLBooksBookshelf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksBookshelf.h; sourceTree = ""; }; + 4FEF0715155C441B00507BF2 /* GTLBooksBookshelf.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksBookshelf.m; sourceTree = ""; }; + 4FEF0716155C441B00507BF2 /* GTLBooksBookshelves.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksBookshelves.h; sourceTree = ""; }; + 4FEF0717155C441B00507BF2 /* GTLBooksBookshelves.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksBookshelves.m; sourceTree = ""; }; + 4FEF0718155C441B00507BF2 /* GTLBooksConcurrentAccessRestriction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksConcurrentAccessRestriction.h; sourceTree = ""; }; + 4FEF0719155C441B00507BF2 /* GTLBooksConcurrentAccessRestriction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksConcurrentAccessRestriction.m; sourceTree = ""; }; + 4FEF071A155C441B00507BF2 /* GTLBooksConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksConstants.h; sourceTree = ""; }; + 4FEF071B155C441B00507BF2 /* GTLBooksConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksConstants.m; sourceTree = ""; }; + 4FEF071C155C441B00507BF2 /* GTLBooksDownloadAccesses.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksDownloadAccesses.h; sourceTree = ""; }; + 4FEF071D155C441B00507BF2 /* GTLBooksDownloadAccesses.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksDownloadAccesses.m; sourceTree = ""; }; + 4FEF071E155C441B00507BF2 /* GTLBooksDownloadAccessRestriction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksDownloadAccessRestriction.h; sourceTree = ""; }; + 4FEF071F155C441B00507BF2 /* GTLBooksDownloadAccessRestriction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksDownloadAccessRestriction.m; sourceTree = ""; }; + 4FEF0720155C441B00507BF2 /* GTLBooksLayerGeoData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksLayerGeoData.h; sourceTree = ""; }; + 4FEF0721155C441B00507BF2 /* GTLBooksLayerGeoData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksLayerGeoData.m; sourceTree = ""; }; + 4FEF0722155C441B00507BF2 /* GTLBooksLayersummaries.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksLayersummaries.h; sourceTree = ""; }; + 4FEF0723155C441B00507BF2 /* GTLBooksLayersummaries.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksLayersummaries.m; sourceTree = ""; }; + 4FEF0724155C441B00507BF2 /* GTLBooksLayersummary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksLayersummary.h; sourceTree = ""; }; + 4FEF0725155C441B00507BF2 /* GTLBooksLayersummary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksLayersummary.m; sourceTree = ""; }; + 4FEF0726155C441B00507BF2 /* GTLBooksReadingPosition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksReadingPosition.h; sourceTree = ""; }; + 4FEF0727155C441B00507BF2 /* GTLBooksReadingPosition.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksReadingPosition.m; sourceTree = ""; }; + 4FEF0728155C441B00507BF2 /* GTLBooksRequestAccess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksRequestAccess.h; sourceTree = ""; }; + 4FEF0729155C441B00507BF2 /* GTLBooksRequestAccess.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksRequestAccess.m; sourceTree = ""; }; + 4FEF072A155C441B00507BF2 /* GTLBooksReview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksReview.h; sourceTree = ""; }; + 4FEF072B155C441B00507BF2 /* GTLBooksReview.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksReview.m; sourceTree = ""; }; + 4FEF072C155C441B00507BF2 /* GTLBooksVolume.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksVolume.h; sourceTree = ""; }; + 4FEF072D155C441B00507BF2 /* GTLBooksVolume.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksVolume.m; sourceTree = ""; }; + 4FEF072E155C441B00507BF2 /* GTLBooksVolumeannotation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksVolumeannotation.h; sourceTree = ""; }; + 4FEF072F155C441B00507BF2 /* GTLBooksVolumeannotation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksVolumeannotation.m; sourceTree = ""; }; + 4FEF0730155C441B00507BF2 /* GTLBooksVolumeannotations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksVolumeannotations.h; sourceTree = ""; }; + 4FEF0731155C441B00507BF2 /* GTLBooksVolumeannotations.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksVolumeannotations.m; sourceTree = ""; }; + 4FEF0732155C441B00507BF2 /* GTLBooksVolumes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLBooksVolumes.h; sourceTree = ""; }; + 4FEF0733155C441B00507BF2 /* GTLBooksVolumes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLBooksVolumes.m; sourceTree = ""; }; + 4FEF0734155C441B00507BF2 /* GTLQueryBooks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLQueryBooks.h; sourceTree = ""; }; + 4FEF0735155C441B00507BF2 /* GTLQueryBooks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLQueryBooks.m; sourceTree = ""; }; + 4FEF0736155C441B00507BF2 /* GTLServiceBooks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLServiceBooks.h; sourceTree = ""; }; + 4FEF0737155C441B00507BF2 /* GTLServiceBooks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLServiceBooks.m; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 8D1107320486CEB800E47090 /* BooksSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BooksSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F2445C9121F0D2C00FEE1DA /* GTL.framework in Frameworks */, + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 4F82A5110FCDFECC00C477D4 /* BooksSampleAppController.h */, + 4F82A5100FCDFECC00C477D4 /* BooksSampleAppController.m */, + 4F82A5130FCDFECC00C477D4 /* BooksSampleWindowController.h */, + 4F82A5120FCDFECC00C477D4 /* BooksSampleWindowController.m */, + ); + name = Classes; + sourceTree = ""; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 4F22A2141186315400FFBAB6 /* WebKit.framework */, + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* BooksSample.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CalendarSample */ = { + isa = PBXGroup; + children = ( + 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */, + 080E96DDFE201D6D7F000001 /* Classes */, + 4FB25425138C421100B5C1AE /* API Services */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CalendarSample; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 4FA6F3CF1034AEC400C5DFA5 /* BooksSampleWindow.xib */, + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */, + 8D1107310486CEB800E47090 /* Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4F2445B7121F0CF600FEE1DA /* Products */ = { + isa = PBXGroup; + children = ( + 4F2445BE121F0CF600FEE1DA /* GTL.framework */, + 4F2445C0121F0CF600FEE1DA /* libGTLTouchStaticLib.a */, + 4F2445C2121F0CF600FEE1DA /* GTLUnitTests.octest */, + 4F2445C4121F0CF600FEE1DA /* DevelopmentTestTool */, + ); + name = Products; + sourceTree = ""; + }; + 4F29EB7F147D7B94009E625E /* Books */ = { + isa = PBXGroup; + children = ( + 4FEF0708155C441B00507BF2 /* Generated */, + ); + name = Books; + path = ../../Source/Services/Books; + sourceTree = SOURCE_ROOT; + }; + 4FB25425138C421100B5C1AE /* API Services */ = { + isa = PBXGroup; + children = ( + 4F29EB7F147D7B94009E625E /* Books */, + ); + name = "API Services"; + sourceTree = ""; + }; + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */ = { + isa = PBXGroup; + children = ( + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */, + ); + name = "Build Scripts"; + sourceTree = ""; + }; + 4FEF0708155C441B00507BF2 /* Generated */ = { + isa = PBXGroup; + children = ( + 4FEF0709155C441B00507BF2 /* GTLBooks.h */, + 4FEF070A155C441B00507BF2 /* GTLBooksAnnotation.h */, + 4FEF070B155C441B00507BF2 /* GTLBooksAnnotation.m */, + 4FEF070C155C441B00507BF2 /* GTLBooksAnnotationdata.h */, + 4FEF070D155C441B00507BF2 /* GTLBooksAnnotationdata.m */, + 4FEF070E155C441B00507BF2 /* GTLBooksAnnotations.h */, + 4FEF070F155C441B00507BF2 /* GTLBooksAnnotations.m */, + 4FEF0710155C441B00507BF2 /* GTLBooksAnnotationsdata.h */, + 4FEF0711155C441B00507BF2 /* GTLBooksAnnotationsdata.m */, + 4FEF0712155C441B00507BF2 /* GTLBooksAnnotationsRange.h */, + 4FEF0713155C441B00507BF2 /* GTLBooksAnnotationsRange.m */, + 4FEF0714155C441B00507BF2 /* GTLBooksBookshelf.h */, + 4FEF0715155C441B00507BF2 /* GTLBooksBookshelf.m */, + 4FEF0716155C441B00507BF2 /* GTLBooksBookshelves.h */, + 4FEF0717155C441B00507BF2 /* GTLBooksBookshelves.m */, + 4FEF0718155C441B00507BF2 /* GTLBooksConcurrentAccessRestriction.h */, + 4FEF0719155C441B00507BF2 /* GTLBooksConcurrentAccessRestriction.m */, + 4FEF071A155C441B00507BF2 /* GTLBooksConstants.h */, + 4FEF071B155C441B00507BF2 /* GTLBooksConstants.m */, + 4FEF071C155C441B00507BF2 /* GTLBooksDownloadAccesses.h */, + 4FEF071D155C441B00507BF2 /* GTLBooksDownloadAccesses.m */, + 4FEF071E155C441B00507BF2 /* GTLBooksDownloadAccessRestriction.h */, + 4FEF071F155C441B00507BF2 /* GTLBooksDownloadAccessRestriction.m */, + 4FEF0720155C441B00507BF2 /* GTLBooksLayerGeoData.h */, + 4FEF0721155C441B00507BF2 /* GTLBooksLayerGeoData.m */, + 4FEF0722155C441B00507BF2 /* GTLBooksLayersummaries.h */, + 4FEF0723155C441B00507BF2 /* GTLBooksLayersummaries.m */, + 4FEF0724155C441B00507BF2 /* GTLBooksLayersummary.h */, + 4FEF0725155C441B00507BF2 /* GTLBooksLayersummary.m */, + 4FEF0726155C441B00507BF2 /* GTLBooksReadingPosition.h */, + 4FEF0727155C441B00507BF2 /* GTLBooksReadingPosition.m */, + 4FEF0728155C441B00507BF2 /* GTLBooksRequestAccess.h */, + 4FEF0729155C441B00507BF2 /* GTLBooksRequestAccess.m */, + 4FEF072A155C441B00507BF2 /* GTLBooksReview.h */, + 4FEF072B155C441B00507BF2 /* GTLBooksReview.m */, + 4FEF072C155C441B00507BF2 /* GTLBooksVolume.h */, + 4FEF072D155C441B00507BF2 /* GTLBooksVolume.m */, + 4FEF072E155C441B00507BF2 /* GTLBooksVolumeannotation.h */, + 4FEF072F155C441B00507BF2 /* GTLBooksVolumeannotation.m */, + 4FEF0730155C441B00507BF2 /* GTLBooksVolumeannotations.h */, + 4FEF0731155C441B00507BF2 /* GTLBooksVolumeannotations.m */, + 4FEF0732155C441B00507BF2 /* GTLBooksVolumes.h */, + 4FEF0733155C441B00507BF2 /* GTLBooksVolumes.m */, + 4FEF0734155C441B00507BF2 /* GTLQueryBooks.h */, + 4FEF0735155C441B00507BF2 /* GTLQueryBooks.m */, + 4FEF0736155C441B00507BF2 /* GTLServiceBooks.h */, + 4FEF0737155C441B00507BF2 /* GTLServiceBooks.m */, + ); + path = Generated; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* BooksSample */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "BooksSample" */; + buildPhases = ( + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + 4F38F8970B66FAB700B24B81 /* Copy GTL Framework */, + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */, + ); + buildRules = ( + ); + dependencies = ( + 4F72439F12233FAF001A4AD0 /* PBXTargetDependency */, + ); + name = BooksSample; + productInstallPath = "$(HOME)/Applications"; + productName = CalendarSample; + productReference = 8D1107320486CEB800E47090 /* BooksSample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "BooksSample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CalendarSample */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 4F2445B7121F0CF600FEE1DA /* Products */; + ProjectRef = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* BooksSample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 4F2445BE121F0CF600FEE1DA /* GTL.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = GTL.framework; + remoteRef = 4F2445BD121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C0121F0CF600FEE1DA /* libGTLTouchStaticLib.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libGTLTouchStaticLib.a; + remoteRef = 4F2445BF121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C2121F0CF600FEE1DA /* GTLUnitTests.octest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = GTLUnitTests.octest; + remoteRef = 4F2445C1121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C4121F0CF600FEE1DA /* DevelopmentTestTool */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = DevelopmentTestTool; + remoteRef = 4F2445C3121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + 4FA6F3D31034AEC400C5DFA5 /* BooksSampleWindow.xib in Resources */, + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Strip Headers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ./buildStripHeaders; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072D0486CEB800E47090 /* main.m in Sources */, + 4F82A5140FCDFECC00C477D4 /* BooksSampleAppController.m in Sources */, + 4F82A5150FCDFECC00C477D4 /* BooksSampleWindowController.m in Sources */, + 4FEF0738155C441B00507BF2 /* GTLBooksAnnotation.m in Sources */, + 4FEF0739155C441B00507BF2 /* GTLBooksAnnotationdata.m in Sources */, + 4FEF073A155C441B00507BF2 /* GTLBooksAnnotations.m in Sources */, + 4FEF073B155C441B00507BF2 /* GTLBooksAnnotationsdata.m in Sources */, + 4FEF073C155C441B00507BF2 /* GTLBooksAnnotationsRange.m in Sources */, + 4FEF073D155C441B00507BF2 /* GTLBooksBookshelf.m in Sources */, + 4FEF073E155C441B00507BF2 /* GTLBooksBookshelves.m in Sources */, + 4FEF073F155C441B00507BF2 /* GTLBooksConcurrentAccessRestriction.m in Sources */, + 4FEF0740155C441B00507BF2 /* GTLBooksConstants.m in Sources */, + 4FEF0741155C441B00507BF2 /* GTLBooksDownloadAccesses.m in Sources */, + 4FEF0742155C441B00507BF2 /* GTLBooksDownloadAccessRestriction.m in Sources */, + 4FEF0743155C441B00507BF2 /* GTLBooksLayerGeoData.m in Sources */, + 4FEF0744155C441B00507BF2 /* GTLBooksLayersummaries.m in Sources */, + 4FEF0745155C441B00507BF2 /* GTLBooksLayersummary.m in Sources */, + 4FEF0746155C441B00507BF2 /* GTLBooksReadingPosition.m in Sources */, + 4FEF0747155C441B00507BF2 /* GTLBooksRequestAccess.m in Sources */, + 4FEF0748155C441B00507BF2 /* GTLBooksReview.m in Sources */, + 4FEF0749155C441B00507BF2 /* GTLBooksVolume.m in Sources */, + 4FEF074A155C441B00507BF2 /* GTLBooksVolumeannotation.m in Sources */, + 4FEF074B155C441B00507BF2 /* GTLBooksVolumeannotations.m in Sources */, + 4FEF074C155C441B00507BF2 /* GTLBooksVolumes.m in Sources */, + 4FEF074D155C441B00507BF2 /* GTLQueryBooks.m in Sources */, + 4FEF074E155C441B00507BF2 /* GTLServiceBooks.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 4F72439F12233FAF001A4AD0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = GTLFramework; + targetProxy = 4F72439E12233FAF001A4AD0 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C165DFE840E0CC02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 4FA6F3CF1034AEC400C5DFA5 /* BooksSampleWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 4FA6F3D01034AEC400C5DFA5 /* English */, + ); + name = BooksSampleWindow.xib; + sourceTree = ""; + }; + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 4FA6F3D21034AEC400C5DFA5 /* English */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = BooksSample; + RUN_CLANG_STATIC_ANALYZER = YES; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = BooksSample; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = ( + "-DGTL_BUILT_AS_FRAMEWORK=1", + "-DDEBUG=1", + ); + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DGTL_BUILT_AS_FRAMEWORK=1"; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "BooksSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "BooksSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/GTL/Examples/BooksSample/BooksSampleAppController.h b/GTL/Examples/BooksSample/BooksSampleAppController.h new file mode 100644 index 0000000..827321d --- /dev/null +++ b/GTL/Examples/BooksSample/BooksSampleAppController.h @@ -0,0 +1,23 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// BooksSampleAppController.h +// + +#import + +@interface BooksSampleAppController : NSObject +@end diff --git a/GTL/Examples/BooksSample/BooksSampleAppController.m b/GTL/Examples/BooksSample/BooksSampleAppController.m new file mode 100644 index 0000000..e9291ec --- /dev/null +++ b/GTL/Examples/BooksSample/BooksSampleAppController.m @@ -0,0 +1,35 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// BooksSampleAppController.m +// + +#import "BooksSampleAppController.h" +#import "BooksSampleWindowController.h" + +@implementation BooksSampleAppController + +- (void)applicationWillFinishLaunching:(NSNotification *)notification { + BooksSampleWindowController* windowController + = [BooksSampleWindowController sharedWindowController]; + [windowController showWindow:self]; +} + +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { + return YES; +} + +@end diff --git a/GTL/Examples/BooksSample/BooksSampleWindowController.h b/GTL/Examples/BooksSample/BooksSampleWindowController.h new file mode 100644 index 0000000..f74a5d4 --- /dev/null +++ b/GTL/Examples/BooksSample/BooksSampleWindowController.h @@ -0,0 +1,95 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// BooksSampleWindowController.h +// + +#import + +#import "GTLBooks.h" +#import "GTL/GTMOAuth2WindowController.h" + +@interface BooksSampleWindowController : NSWindowController { + @private + IBOutlet NSTextField *signedInField_; + IBOutlet NSButton *signedInButton_; + + IBOutlet NSTextField *keywordsField_; + IBOutlet NSButton *searchButton_; + + IBOutlet NSButton *addToMyLibraryButton_; + IBOutlet NSButton *publicVolumesCancelButton_; + + IBOutlet NSTableView *publicVolumesTable_; + IBOutlet NSProgressIndicator *publicVolumesProgressIndicator_; + IBOutlet NSTextView *publicVolumesResultTextView_; + IBOutlet NSImageView *publicVolumesImageView_; + + IBOutlet NSButton *fetchMyLibraryButton_; + IBOutlet NSPopUpButton *myBookshelvesPopup_; + IBOutlet NSButton *myLibraryCancelButton_; + + IBOutlet NSTableView *myVolumesTable_; + IBOutlet NSProgressIndicator *myVolumesProgressIndicator_; + IBOutlet NSTextView *myVolumesResultTextView_; + IBOutlet NSImageView *myVolumesImageView_; + + IBOutlet NSButton *removeButton_; + IBOutlet NSButton *removeAllButton_; + + IBOutlet NSButton *clientIDButton_; + IBOutlet NSTextField *clientIDRequiredTextField_; + IBOutlet NSWindow *clientIDSheet_; + IBOutlet NSTextField *clientIDField_; + IBOutlet NSTextField *clientSecretField_; + + GTLBooksVolumes *publicVolumes_; + GTLServiceTicket *publicVolumesTicket_; + NSError *publicVolumesFetchError_; + + GTLBooksBookshelves *bookshelves_; + GTLServiceTicket *bookshelvesTicket_; + + GTLBooksVolumes *myVolumes_; + GTLServiceTicket *myVolumesTicket_; + NSError *myVolumesFetchError_; + + GTLServiceTicket *editMyVolumeTicket_; +} + ++ (BooksSampleWindowController *)sharedWindowController; + +- (IBAction)signInClicked:(id)sender; + +- (IBAction)searchClicked:(id)sender; + +- (IBAction)cancelSearchClicked:(id)sender; + +- (IBAction)fetchMyVolumesClicked:(id)sender; +- (IBAction)cancelMyVolumesFetchClicked:(id)sender; + +- (IBAction)addToMyLibraryClicked:(id)sender; +- (IBAction)removeFromMyLibraryClicked:(id)sender; +- (IBAction)removeAllFromMyLibraryClicked:(id)sender; + +- (IBAction)APIConsoleClicked:(id)sender; +- (IBAction)loggingCheckboxClicked:(id)sender; + +// Client ID sheet +- (IBAction)clientIDClicked:(id)sender; +- (IBAction)clientIDDoneClicked:(id)sender; + +@end diff --git a/GTL/Examples/BooksSample/BooksSampleWindowController.m b/GTL/Examples/BooksSample/BooksSampleWindowController.m new file mode 100644 index 0000000..776bb97 --- /dev/null +++ b/GTL/Examples/BooksSample/BooksSampleWindowController.m @@ -0,0 +1,796 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// BooksSampleWindowController.m +// + +#import "BooksSampleWindowController.h" + +#import "GTL/GTMHTTPFetcherLogging.h" + +@interface BooksSampleWindowController () + +@property (nonatomic, readonly) GTLServiceBooks *booksService; + +@property (nonatomic, retain) GTLBooksVolumes *publicVolumes; +@property (nonatomic, retain) GTLServiceTicket *publicVolumesTicket; +@property (nonatomic, retain) NSError *publicVolumesFetchError; + +@property (nonatomic, retain) GTLBooksBookshelves *bookshelves; +@property (nonatomic, retain) GTLServiceTicket *bookshelvesTicket; + +@property (nonatomic, retain) GTLBooksVolumes *myVolumes; +@property (nonatomic, retain) GTLServiceTicket *myVolumesTicket; +@property (nonatomic, retain) NSError *myVolumesFetchError; + +@property (nonatomic, retain) GTLServiceTicket *editMyVolumeTicket; + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel; + +- (void)updateUI; +- (void)updateBookshelvesPopup; +- (void)displayAlert:(NSString *)title format:(NSString *)format, ...; + +- (void)searchVolumes; +- (void)fetchMyBookshelvesThenInvokeSelector:(SEL)sel; +- (void)fetchMyVolumes; + +- (void)addSelectedPublicVolume; +- (void)removeMyVolume; +- (void)removeAllMyVolumes; + +- (GTLBooksVolume *)selectedPublicVolume; +- (GTLBooksVolume *)selectedMyVolume; +- (GTLBooksBookshelf *)selectedBookshelf; +@end + + +NSString *const kKeychainItemName = @"Books Sample: Google Books"; + +@implementation BooksSampleWindowController + +@synthesize publicVolumes = publicVolumes_, + publicVolumesTicket = publicVolumesTicket_, + publicVolumesFetchError = publicVolumesFetchError_, + bookshelves = bookshelves_, + bookshelvesTicket = bookshelvesTicket_, + myVolumes = myVolumes_, + myVolumesTicket = myVolumesTicket_, + myVolumesFetchError = myVolumesFetchError_, + editMyVolumeTicket = editMyVolumeTicket_; + ++ (BooksSampleWindowController *)sharedWindowController { + static BooksSampleWindowController* gWindowController = nil; + if (!gWindowController) { + gWindowController = [[BooksSampleWindowController alloc] init]; + } + return gWindowController; +} + +- (id)init { + return [self initWithWindowNibName:@"BooksSampleWindow"]; +} + +- (void)awakeFromNib { + // Load the OAuth token from the keychain, if it was previously saved + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + GTMOAuth2Authentication *auth; + auth = [GTMOAuth2WindowController authForGoogleFromKeychainForName:kKeychainItemName + clientID:clientID + clientSecret:clientSecret]; + self.booksService.authorizer = auth; + + // Set the result text fields to have a distinctive color and mono-spaced font + [publicVolumesResultTextView_ setTextColor:[NSColor darkGrayColor]]; + [myVolumesResultTextView_ setTextColor:[NSColor darkGrayColor]]; + + NSFont *resultTextFont = [NSFont fontWithName:@"Monaco" size:9]; + [publicVolumesResultTextView_ setFont:resultTextFont]; + [myVolumesResultTextView_ setFont:resultTextFont]; + + [self updateUI]; +} + +- (void)dealloc { + self.publicVolumes = nil; + self.publicVolumesTicket = nil; + self.publicVolumesFetchError = nil; + + self.bookshelves = nil; + self.bookshelvesTicket = nil; + + self.myVolumes = nil; + self.myVolumesTicket = nil; + self.myVolumesFetchError = nil; + + self.editMyVolumeTicket = nil; + + [super dealloc]; +} + +#pragma mark - + +- (NSString *)signedInUsername { + GTMOAuth2Authentication *auth = self.booksService.authorizer; + BOOL isSignedIn = auth.canAuthorize; + if (isSignedIn) { + return auth.userEmail; + } else { + return nil; + } +} + +- (BOOL)isSignedIn { + NSString *name = [self signedInUsername]; + return (name != nil); +} + +#pragma mark IBActions + +- (IBAction)signInClicked:(id)sender { + if (![self isSignedIn]) { + // Sign in + [self runSigninThenInvokeSelector:@selector(updateUI)]; + } else { + // Sign out + GTLServiceBooks *service = self.booksService; + + [GTMOAuth2WindowController removeAuthFromKeychainForName:kKeychainItemName]; + service.authorizer = nil; + [self updateUI]; + } +} + +- (IBAction)searchClicked:(id)sender { + [self searchVolumes]; +} + +- (IBAction)cancelSearchClicked:(id)sender { + [self.publicVolumesTicket cancelTicket]; + self.publicVolumesTicket = nil; + + [self updateUI]; +} + +- (IBAction)fetchMyVolumesClicked:(id)sender { + if (![self isSignedIn]) { + [self runSigninThenInvokeSelector:@selector(fetchMyVolumes)]; + } else { + [self fetchMyVolumes]; + } +} + +- (IBAction)cancelMyVolumesFetchClicked:(id)sender { + [self.publicVolumesTicket cancelTicket]; + self.publicVolumesTicket = nil; + + [self.editMyVolumeTicket cancelTicket]; + self.editMyVolumeTicket = nil; + + [self updateUI]; +} + +- (IBAction)addToMyLibraryClicked:(id)sender { + [self addSelectedPublicVolume]; +}; + +- (IBAction)removeFromMyLibraryClicked:(id)sender { + [self removeMyVolume]; +}; + +- (IBAction)removeAllFromMyLibraryClicked:(id)sender { + // Make the user confirm that the all books on the shelf should be deleted + GTLBooksBookshelf *shelf = [self selectedBookshelf]; + NSBeginAlertSheet(@"Delete All", @"Delete", @"Cancel", nil, + [self window], self, + @selector(deleteAllSheetDidEnd:returnCode:contextInfo:), + nil, nil, @"Delete %@ volumes for shelf \"%@\"?", + shelf.volumeCount, shelf.title); +}; + +- (void)deleteAllSheetDidEnd:(NSWindow *)sheet + returnCode:(int)returnCode + contextInfo:(void *)contextInfo { + if (returnCode == NSAlertDefaultReturn) { + [self removeAllMyVolumes]; + } +} + + +- (IBAction)APIConsoleClicked:(id)sender { + NSURL *url = [NSURL URLWithString:@"https://code.google.com/apis/console"]; + [[NSWorkspace sharedWorkspace] openURL:url]; +} + +- (IBAction)loggingCheckboxClicked:(id)sender { + [GTMHTTPFetcher setLoggingEnabled:[sender state]]; +} + +#pragma mark - + +// get a service object with the current username/password +// +// A "service" object handles networking tasks. Service objects +// contain user authentication information as well as networking +// state information (such as cookies and the "last modified" date for +// fetched data.) + +- (GTLServiceBooks *)booksService { + + static GTLServiceBooks* service = nil; + + if (!service) { + service = [[GTLServiceBooks alloc] init]; + + // Have the service object set tickets to fetch consecutive pages + // of the object so we do not need to manually fetch them + service.shouldFetchNextPages = YES; + + // Have the service object set tickets to retry temporary error conditions + // automatically + service.retryEnabled = YES; + } + return service; +} + +- (GTLBooksVolume *)selectedPublicVolume { + int rowIndex = [publicVolumesTable_ selectedRow]; + if (rowIndex > -1) { + GTLBooksVolume *item = [self.publicVolumes itemAtIndex:rowIndex]; + return item; + } + return nil; +} + +- (GTLBooksVolume *)selectedMyVolume { + int rowIndex = [myVolumesTable_ selectedRow]; + if (rowIndex > -1) { + GTLBooksVolume *item = [self.myVolumes itemAtIndex:rowIndex]; + return item; + } + return nil; +} + +- (GTLBooksBookshelf *)selectedBookshelf { + NSMenuItem *menuItem = [myBookshelvesPopup_ selectedItem]; + GTLBooksBookshelf *shelf = [menuItem representedObject]; + return shelf; +} + +#pragma mark Search Public Volumes + +- (void)searchVolumes { + self.publicVolumes = nil; + self.publicVolumesFetchError = nil; + + NSString *text = [keywordsField_ stringValue]; + GTLQueryBooks *query = [GTLQueryBooks queryForVolumesListWithQ:text]; + + // The Books API currently requires that search queries not have an + // authorization header (b/4445456) + query.shouldSkipAuthorization = YES; + + // Note: setting the APIKey on the service object may give a higher + // server quota when executing unauthorized queries + GTLServiceBooks *service = self.booksService; + self.publicVolumesTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id object, NSError *error) { + // callback + self.publicVolumes = object; + self.publicVolumesFetchError = error; + self.publicVolumesTicket = nil; + + [self updateUI]; + }]; + [self updateUI]; +} + +#pragma mark Fetch Bookshelves + +- (void)fetchMyBookshelvesThenInvokeSelector:(SEL)sel { + self.bookshelves = nil; + self.myVolumesFetchError = nil; + + GTLQueryBooks *query = [GTLQueryBooks queryForMylibraryBookshelvesList]; + + GTLServiceBooks *service = self.booksService; + self.bookshelvesTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id object, NSError *error) { + // callback + self.bookshelves = object; + self.myVolumesFetchError = error; + self.bookshelvesTicket = nil; + + if (error == nil) { + // load the pop-up menu + [self updateBookshelvesPopup]; + if (sel) { + [self performSelector:sel]; + } + } + + [self updateUI]; + }]; + [self updateUI]; +} + +- (void)updateBookshelvesPopup { + NSInteger index = [myBookshelvesPopup_ indexOfSelectedItem]; + NSMenu *menu = [myBookshelvesPopup_ menu]; + [menu removeAllItems]; + + for (GTLBooksBookshelf *shelf in self.bookshelves) { + // Make a pop-up menu item including the bookshelf name and + // the number of books + NSString *title = [NSString stringWithFormat:@"%@ (%@)", + shelf.title, shelf.volumeCount]; + + NSMenuItem *menuItem = [menu addItemWithTitle:title + action:@selector(bookshelfPopupChanged:) + keyEquivalent:@""]; + [menuItem setTarget:self]; + + // Save this bookshelf in the menu item + [menuItem setRepresentedObject:shelf]; + } + [myBookshelvesPopup_ selectItemAtIndex:index]; +} + +- (void)bookshelfPopupChanged:(id)sender { + [self fetchMyVolumes]; +} + +#pragma mark Fetch My Volumes + +- (void)fetchMyVolumes { + GTLBooksBookshelves *bookshelves = self.bookshelves; + if (bookshelves == nil) { + // Before we fetch volumes, fetch the list of bookshelves so we can + // know which shelf of volumes to fetch + [self fetchMyBookshelvesThenInvokeSelector:@selector(fetchMyVolumes)]; + return; + } + + self.myVolumes = nil; + self.myVolumesFetchError = nil; + + GTLBooksBookshelf *shelf = [self selectedBookshelf]; + + // per b/4444470 bookshelf ID should be a string type, not a number + NSString *shelfID = [shelf.identifier stringValue]; + + GTLQueryBooks *query = [GTLQueryBooks queryForMylibraryBookshelvesVolumesListWithShelf:shelfID]; + + GTLServiceBooks *service = self.booksService; + self.myVolumesTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id object, NSError *error) { + // callback + self.myVolumes = object; + self.myVolumesFetchError = error; + self.myVolumesTicket = nil; + + [self updateUI]; + }]; + [self updateUI]; +} + +#pragma mark Add Selected Public Volume To My Volumes + +- (void)addSelectedPublicVolume { + GTLBooksVolume *selectedVolume = [self selectedPublicVolume]; + if (selectedVolume) { + // per b/4444470 bookshelf ID should be a string type, not a number + GTLBooksBookshelf *shelf = [self selectedBookshelf]; + NSString *shelfID = [shelf.identifier stringValue]; + + NSString *volumeID = selectedVolume.identifier; + GTLQueryBooks *query = [GTLQueryBooks queryForMylibraryBookshelvesAddVolumeWithShelf:shelfID + volumeId:volumeID]; + GTLServiceBooks *service = self.booksService; + self.myVolumesTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id object, NSError *error) { + // callback + self.myVolumesTicket = nil; + + if (error == nil) { + [self displayAlert:@"Volume Added" + format:@"Added \"%@\" to shelf \"%@\"", + selectedVolume.volumeInfo.title, shelf.title]; + + // Refresh the bookshelf count and the volume list + self.bookshelves = nil; + [self fetchMyVolumes]; + } else { + [self displayAlert:@"Add Failed" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; + } +} + +#pragma mark Remove My Volume + +- (void)removeMyVolume { + GTLBooksVolume *selectedVolume = [self selectedMyVolume]; + if (selectedVolume) { + // per b/4444470 bookshelf ID should be a string type, not a number + GTLBooksBookshelf *shelf = [self selectedBookshelf]; + NSString *shelfID = [shelf.identifier stringValue]; + + NSString *volumeID = selectedVolume.identifier; + GTLQueryBooks *query = [GTLQueryBooks queryForMylibraryBookshelvesRemoveVolumeWithShelf:shelfID + volumeId:volumeID]; + GTLServiceBooks *service = self.booksService; + self.myVolumesTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id object, NSError *error) { + // callback + self.myVolumesTicket = nil; + + if (error == nil) { + [self displayAlert:@"Volume Removed" + format:@"Removed \"%@\" from shelf \"%@\"", + selectedVolume.volumeInfo.title, shelf.title]; + + // Refresh the bookshelf count and the volume list + self.bookshelves = nil; + [self fetchMyVolumes]; + } else { + [self displayAlert:@"Remove Failed" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; + } +} + +#pragma mark Remove My Volume + +- (void)removeAllMyVolumes { + // per b/4444470 bookshelf ID should be a string type, not a number + GTLBooksBookshelf *shelf = [self selectedBookshelf]; + NSString *shelfID = [shelf.identifier stringValue]; + + GTLBatchQuery *batchQuery = [GTLBatchQuery batchQuery]; + + for (GTLBooksVolume *volume in self.myVolumes) { + NSString *volumeID = volume.identifier; + GTLQueryBooks *query = [GTLQueryBooks queryForMylibraryBookshelvesRemoveVolumeWithShelf:shelfID + volumeId:volumeID]; + [batchQuery addQuery:query]; + } + + GTLServiceBooks *service = self.booksService; + self.myVolumesTicket = [service executeQuery:batchQuery + completionHandler:^(GTLServiceTicket *ticket, + id object, NSError *error) { + // callback + self.myVolumesTicket = nil; + + if (error == nil) { + // execution succeeded + GTLBatchResult *batchResults = (GTLBatchResult *)object; + + NSDictionary *successes = batchResults.successes; + NSDictionary *failures = batchResults.failures; + + NSUInteger numberRemoved = [successes count]; + NSUInteger numberFailed = [failures count]; + + [self displayAlert:@"Volumes Removed" + format:@"Removed %lu of %lu from shelf \"%@\"", + numberRemoved, numberRemoved + numberFailed, + shelf.title]; + + // Refresh the bookshelf count and the volume list + self.bookshelves = nil; + [self fetchMyVolumes]; + } else { + // execution failed + [self displayAlert:@"Remove Failed" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; +} + +#pragma mark Sign In + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel { + // Applications should have client ID and client secret strings + // hardcoded into the source, but the sample application asks the + // developer for the strings + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + if ([clientID length] == 0 || [clientSecret length] == 0) { + // Remind the developer that client ID and client secret are needed + [clientIDButton_ performSelector:@selector(performClick:) + withObject:self + afterDelay:0.5]; + return; + } + + // Show the OAuth 2 sign-in controller + NSBundle *frameworkBundle = [NSBundle bundleForClass:[GTMOAuth2WindowController class]]; + GTMOAuth2WindowController *windowController; + windowController = [GTMOAuth2WindowController controllerWithScope:@"https://www.googleapis.com/auth/books" + clientID:clientID + clientSecret:clientSecret + keychainItemName:kKeychainItemName + resourceBundle:frameworkBundle]; + [windowController signInSheetModalForWindow:[self window] + completionHandler:^(GTMOAuth2Authentication *auth, + NSError *error) { + // callback + if (error == nil) { + self.booksService.authorizer = auth; + if (signInDoneSel) { + [self performSelector:signInDoneSel]; + } + } else { + self.myVolumesFetchError = error; + [self updateUI]; + } + }]; +} + +#pragma mark UI + +- (void)fetchURLString:(NSString *)newImageURLStr + staticURLString:(NSString **)priorURLString + forImageView:(NSImageView *)imageView + volume:(GTLBooksVolume *)volume { + // Common code to fetch an image for an NSImageView + if (!GTL_AreEqualOrBothNil(newImageURLStr, *priorURLString)) { + // The URL has changed since the previous fetch; save the new URL string + // in the static + *priorURLString = newImageURLStr; + + [imageView setImage:nil]; + + if (newImageURLStr) { + // Use an http fetcher to retrieve the image data + GTMHTTPFetcherService *fetcherService = self.booksService.fetcherService; + GTMHTTPFetcher *fetcher = [fetcherService fetcherWithURLString:newImageURLStr]; + + // Book image URLs are not https so they can't be authorized + fetcher.authorizer = nil; + [fetcher setCommentWithFormat:@"image for volume \"%@\"", + volume.volumeInfo.title]; + + [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { + // callback + if (error == nil) { + NSImage *image = [[[NSImage alloc] initWithData:data] autorelease]; + [imageView setImage:image]; + } else { + NSLog(@"Error %@ loading image %@", error, newImageURLStr); + } + }]; + } + } +} + +- (void)updatePublicVolumeImage { + static NSString* priorImageURLStr = nil; + + GTLBooksVolume *volume = [self selectedPublicVolume]; + NSString *imageURLStr = volume.volumeInfo.imageLinks.thumbnail; + + [self fetchURLString:imageURLStr + staticURLString:&priorImageURLStr + forImageView:publicVolumesImageView_ + volume:volume]; +} + +- (void)updateMyVolumeImage { + static NSString* priorImageURLStr = nil; + + GTLBooksVolume *volume = [self selectedMyVolume]; + NSString *imageURLStr = volume.volumeInfo.imageLinks.thumbnail; + + [self fetchURLString:imageURLStr + staticURLString:&priorImageURLStr + forImageView:myVolumesImageView_ + volume:volume]; +} + +- (void)updateUI { + BOOL isSignedIn = [self isSignedIn]; + NSString *username = [self signedInUsername]; + [signedInButton_ setTitle:(isSignedIn ? @"Sign Out" : @"Sign In")]; + [signedInField_ setStringValue:(isSignedIn ? username : @"No")]; + + // + // Public Volumes table + // + + [publicVolumesTable_ reloadData]; + + if (self.publicVolumesTicket) { + [publicVolumesProgressIndicator_ startAnimation:self]; + } else { + [publicVolumesProgressIndicator_ stopAnimation:self]; + } + + // Get the description of the selected item, or the fetch error + NSString *resultStr = @""; + + if (self.publicVolumesFetchError) { + // Display the error + resultStr = [self.publicVolumesFetchError description]; + } else { + // Display the selected item + GTLBooksVolume *item = [self selectedPublicVolume]; + if (item) { + resultStr = [item description]; + } + } + [publicVolumesResultTextView_ setString:resultStr]; + + [self updatePublicVolumeImage]; + + // + // My Volumes table + // + + [myVolumesTable_ reloadData]; + + if (self.myVolumesTicket) { + [myVolumesProgressIndicator_ startAnimation:self]; + } else { + [myVolumesProgressIndicator_ stopAnimation:self]; + } + + // Get the description of the selected item, or the fetch error + resultStr = @""; + + if (self.myVolumesFetchError) { + // Display the error + resultStr = [self.myVolumesFetchError description]; + } else { + // Display the selected item + GTLBooksVolume *item = [self selectedMyVolume]; + if (item) { + resultStr = [item description]; + } + } + [myVolumesResultTextView_ setString:resultStr]; + + [self updateMyVolumeImage]; + + // Enable buttons + BOOL hasSearchTerms = ([[keywordsField_ stringValue] length] > 0); + BOOL isFetchingPublicVolumes = (self.publicVolumesTicket != nil); + [searchButton_ setEnabled:(hasSearchTerms && !isFetchingPublicVolumes)]; + [publicVolumesCancelButton_ setEnabled:isFetchingPublicVolumes]; + + BOOL isFetchingMyVolumes = (self.myVolumesTicket != nil + || self.editMyVolumeTicket != nil); + [fetchMyLibraryButton_ setEnabled:(isSignedIn && !isFetchingMyVolumes)]; + [myLibraryCancelButton_ setEnabled:isFetchingMyVolumes]; + + BOOL hasMyLibrary = (self.myVolumes != nil); + BOOL isPublicLibraryVolumeSelected = ([self selectedPublicVolume] != nil); + [addToMyLibraryButton_ setEnabled:(isPublicLibraryVolumeSelected && hasMyLibrary)]; + + BOOL isMyLibraryVolumeSelected = ([self selectedMyVolume] != nil); + [removeButton_ setEnabled:isMyLibraryVolumeSelected]; + + BOOL hasMyLibraryVolumes = ([self.myVolumes.items count] > 0); + [removeAllButton_ setEnabled:hasMyLibraryVolumes]; + + BOOL hasBookshelves = (self.bookshelves != nil); + [myBookshelvesPopup_ setEnabled:hasBookshelves]; + + // Show or hide the text indicating that the client ID or client secret are + // needed + BOOL hasClientIDStrings = [[clientIDField_ stringValue] length] > 0 + && [[clientSecretField_ stringValue] length] > 0; + [clientIDRequiredTextField_ setHidden:hasClientIDStrings]; +} + +- (void)displayAlert:(NSString *)title format:(NSString *)format, ... { + NSString *result = format; + if (format) { + va_list argList; + va_start(argList, format); + result = [[[NSString alloc] initWithFormat:format + arguments:argList] autorelease]; + va_end(argList); + } + NSBeginAlertSheet(title, nil, nil, nil, [self window], nil, nil, + nil, nil, @"%@", result); +} + +#pragma mark Client ID Sheet + +// Client ID and Client Secret Sheet +// +// Sample apps need this sheet to ask for the client ID and client secret +// strings +// +// Your application will just hardcode the client ID and client secret strings +// into the source rather than ask the user for them. +// +// The string values are obtained from the API Console, +// https://code.google.com/apis/console + +- (IBAction)clientIDClicked:(id)sender { + // Show the sheet for developers to enter their client ID and client secret + [NSApp beginSheet:clientIDSheet_ + modalForWindow:[self window] + modalDelegate:self + didEndSelector:@selector(clientIDSheetDidEnd:returnCode:contextInfo:) + contextInfo:NULL]; +} + +- (IBAction)clientIDDoneClicked:(id)sender { + [NSApp endSheet:clientIDSheet_ returnCode:NSOKButton]; +} + +- (void)clientIDSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { + [sheet orderOut:self]; + [self updateUI]; +} + +#pragma mark Text field delegate methods + +- (void)controlTextDidChange:(NSNotification *)note { + [self updateUI]; // enable and disable buttons +} + +#pragma mark TableView delegate and data source methods + +- (void)tableViewSelectionDidChange:(NSNotification *)notification { + [self updateUI]; +} + +// Table view data source methods +- (int)numberOfRowsInTableView:(NSTableView *)tableView { + if (tableView == publicVolumesTable_) { + return [self.publicVolumes.items count]; + } else { + return [self.myVolumes.items count]; + } +} + +- (id)tableView:(NSTableView *)tableView +objectValueForTableColumn:(NSTableColumn *)tableColumn + row:(int)row { + NSArray *items; + if (tableView == publicVolumesTable_) { + items = self.publicVolumes.items; + } else { + items = self.myVolumes.items; + } + GTLBooksVolume *item = [items objectAtIndex:row]; + NSString *title = item.volumeInfo.title; + return title; +} + +@end diff --git a/GTL/Examples/BooksSample/English.lproj/.svn/all-wcprops b/GTL/Examples/BooksSample/English.lproj/.svn/all-wcprops new file mode 100644 index 0000000..ea03cc6 --- /dev/null +++ b/GTL/Examples/BooksSample/English.lproj/.svn/all-wcprops @@ -0,0 +1,23 @@ +K 25 +svn:wc:ra_dav:version-url +V 58 +/svn/!svn/ver/153/trunk/Examples/BooksSample/English.lproj +END +InfoPlist.strings +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/23/trunk/Examples/BooksSample/English.lproj/InfoPlist.strings +END +BooksSampleWindow.xib +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/153/trunk/Examples/BooksSample/English.lproj/BooksSampleWindow.xib +END +MainMenu.xib +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/28/trunk/Examples/BooksSample/English.lproj/MainMenu.xib +END diff --git a/GTL/Examples/BooksSample/English.lproj/.svn/entries b/GTL/Examples/BooksSample/English.lproj/.svn/entries new file mode 100644 index 0000000..1b6490e --- /dev/null +++ b/GTL/Examples/BooksSample/English.lproj/.svn/entries @@ -0,0 +1,130 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/BooksSample/English.lproj +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-05-10T20:30:28.630532Z +153 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +InfoPlist.strings +file + + + + +2012-12-09T08:42:33.000000Z +bc745a35febf3350074747882fc8b7e0 +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +95 + +BooksSampleWindow.xib +file + + + + +2012-12-09T08:42:33.000000Z +3db4394bbccb22b2f98fa8ca3257cb0c +2012-05-10T20:30:28.630532Z +153 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +132228 + +MainMenu.xib +file + + + + +2012-12-09T08:42:33.000000Z +77bdd4d5517848b4fa508454cb075453 +2011-08-23T19:12:40.725509Z +28 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +103624 + diff --git a/GTL/Examples/BooksSample/English.lproj/.svn/text-base/BooksSampleWindow.xib.svn-base b/GTL/Examples/BooksSample/English.lproj/.svn/text-base/BooksSampleWindow.xib.svn-base new file mode 100644 index 0000000..3055061 --- /dev/null +++ b/GTL/Examples/BooksSample/English.lproj/.svn/text-base/BooksSampleWindow.xib.svn-base @@ -0,0 +1,2996 @@ + + + + 1060 + 11D50b + 2182 + 1138.32 + 568.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2182 + + + YES + NSMenuItem + NSMenu + NSButton + NSCustomObject + NSSplitView + NSImageView + NSTableView + NSImageCell + NSTextField + NSWindowTemplate + NSTextFieldCell + NSButtonCell + NSTableColumn + NSPopUpButtonCell + NSView + NSScrollView + NSUserDefaultsController + NSProgressIndicator + NSScroller + NSPopUpButton + NSTextView + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + BooksSampleWindowController + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{16, 614}, {539, 524}} + 1886912512 + Sample App + + NSWindow + + + View + + + {539, 493} + + + 256 + + YES + + + 265 + {{329, 420}, {82, 32}} + + + YES + + 67239424 + 134217728 + Search + + LucidaGrande + 13 + 1044 + + + -2038284033 + 1 + + LucidaGrande + 13 + 16 + + + DQ + 200 + 25 + + + + + 1289 + + {{434, 403}, {16, 16}} + + + 28938 + 100 + + + + 289 + {{400, 18}, {128, 18}} + + + YES + + 67239424 + 131072 + Log http to desktop + + LucidaGrande + 11 + 3100 + + + 1211912703 + 2 + + NSImage + NSSwitch + + + NSSwitch + + + + 200 + 25 + + + + + 265 + {{467, 401}, {53, 16}} + + + YES + + 67239424 + 134479872 + Cancel + + LucidaGrande + 9 + 3614 + + + -2038284033 + 1 + + LucidaGrande + 9 + 16 + + + + 200 + 25 + + + + + 264 + {{93, 460}, {71, 17}} + + + YES + + 67239424 + 272629760 + Signed In: + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 266 + {{166, 460}, {247, 17}} + + + YES + + 67239424 + 272629760 + No + + + + + + + + + 268 + {{18, 453}, {72, 28}} + + + YES + + 67239424 + 134348800 + Sign Out + + + -2038284033 + 129 + + + 200 + 25 + + + + + 289 + {{467, 217}, {53, 16}} + + + YES + + 67239424 + 134479872 + Cancel + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 1313 + + {{444, 218}, {16, 16}} + + + 28938 + 100 + + + + 268 + {{18, 480}, {83, 28}} + + + YES + + -2080244224 + 134348800 + Client ID... + + + -2038284033 + 129 + + + 200 + 25 + + + + + 264 + {{105, 487}, {178, 14}} + + + YES + + 67239424 + 272760832 + Client ID and Secret Required + + + + + + + + + 274 + + YES + + + 256 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 256 + {408, 74} + + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 405 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + + + + 337772096 + 2048 + + + + 6 + System + controlBackgroundColor + + + + + 3 + YES + + + + 3 + 2 + + 3 + MQA + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + 37748736 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {408, 74}} + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 68}} + + + + _doScroller: + 0.35789470000000001 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + + 1 + + _doScroller: + 0.99047620000000003 + + + {410, 76} + + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 264 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{419, 0}, {80, 76}} + + + YES + + 130560 + 33554432 + 0 + 0 + 2 + NO + + YES + + + {499, 76} + + + YES + + + + 290 + + YES + + + 2304 + + YES + + + 2322 + {497, 14} + + + + + + + results + + + YES + + YES + NSColor + NSFont + + + YES + + 1 + MC40NTEwODY5NCAwLjEwNDE0NTEyIDAuMDgyODYwMjE2AA + + + Geneva + 10 + 16 + + + + + + + YES + + + 6 + + + + 497 + 1 + + + 67119969 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + 1 + MCAwIDEAA + + + + + + + 1 + + 6 + {996, 10000000} + {463, 0} + + + + {{1, 1}, {497, 56}} + + + + + + + {4, 5} + + 79691776 + + YES + + YES + + + + + file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff + + + + + + 3 + MCAwAA + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{0, 85}, {499, 58}} + + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + {{20, 252}, {499, 143}} + + + + + + 270 + {{17, 403}, {294, 17}} + + + YES + + 67239424 + 272629760 + Public Volumes - select one + + + + + + + + + 266 + {{87, 426}, {240, 22}} + + + YES + + -1804468671 + 272630784 + + + + YES + + 6 + System + textBackgroundColor + + + + 6 + System + textColor + + + + + + + 268 + {{17, 428}, {65, 17}} + + + YES + + 68288064 + 272630784 + Keywords + + + + + + + + + 265 + {{323, 401}, {104, 16}} + + + YES + + 67239424 + 134479872 + Add To My Library + + + -2038284033 + 129 + + + 200 + 25 + + + + + 292 + {{15, 31}, {68, 28}} + + + YES + + 67239424 + 134348800 + Remove + + + -2038284033 + 129 + + + 200 + 25 + + + + + 292 + {{15, 212}, {114, 28}} + + + YES + + 67239424 + 134348800 + Fetch My Library + + + -2038284033 + 1 + + LucidaGrande + 11 + 16 + + + + 200 + 25 + + + + + 292 + {{136, 215}, {221, 22}} + + + YES + + -2076049856 + 133120 + + + 109199615 + 129 + + + 400 + 75 + + + YES + Bookshelves + + 1048576 + 2147483647 + 1 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + _popUpItemAction: + + + YES + + OtherViews + + YES + + + + + 1 + YES + YES + 2 + + + + + 258 + + YES + + + 256 + + YES + + + 258 + + YES + + + 2304 + + YES + + + 256 + {404, 79} + + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 401 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + + + 337772096 + 2048 + + + + + + 3 + YES + + + + 3 + 2 + + + 17 + 37748736 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {404, 79}} + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 68}} + + + + _doScroller: + 0.35789470000000001 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + + 1 + + _doScroller: + 0.99047620000000003 + + + {406, 81} + + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{415, 0}, {91, 81}} + + + YES + + 130560 + 33554432 + 0 + 0 + 2 + NO + + YES + + + {506, 81} + + + YES + + + + 266 + + YES + + + 2304 + + YES + + + 2322 + {504, 14} + + + + + + + results + + + + + + YES + + + 6 + + + + 504 + 1 + + + 67119969 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + + + + + + 1 + + 6 + {996, 10000000} + {463, 0} + + + + {{1, 1}, {504, 56}} + + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{0, 90}, {506, 58}} + + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + {{20, 63}, {506, 148}} + + + + + + 292 + {{81, 31}, {86, 28}} + + + YES + + 67239424 + 134348800 + Remove All + + + -2038284033 + 129 + + + 200 + 25 + + + + {539, 524} + + + + {{0, 0}, {1920, 1178}} + {539, 515} + {10000000000000, 10000000000000} + YES + + + YES + + + 3 + 2 + {{235, 277}, {458, 282}} + 611844096 + Client ID Sheet + NSWindow + + + + + 256 + + YES + + + 266 + {{118, 141}, {320, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 141}, {63, 17}} + + YES + + 68288064 + 272630784 + Client ID: + + + + + + + + + 266 + {{118, 110}, {320, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 115}, {88, 17}} + + YES + + 68288064 + 272630784 + Client Secret: + + + + + + + + + 268 + {{338, 76}, {74, 22}} + + YES + + 67239424 + 134348800 + API Console + + + -2038284033 + 134 + + + 200 + 25 + + + + + 268 + {{17, 80}, {316, 17}} + + YES + + 68288064 + 272630784 + Client ID and Client Secret are obtained from the + + + + + + + + + 268 + {{17, 202}, {424, 34}} + + YES + + 67239424 + 138412032 + Each application should have a client ID and client secret hardcoded into the source. + + + + + + + + + 268 + {{348, 12}, {96, 32}} + + YES + + 67239424 + 134217728 + Done + + + -2038284033 + 129 + + DQ + 200 + 25 + + + + {458, 282} + + {{0, 0}, {1920, 1178}} + {10000000000000, 10000000000000} + YES + + + + + YES + + + window + + + + 16 + + + + mSpreadsheetTable + + + + 355 + + + + mSpreadsheetResultTextField + + + + 356 + + + + mSpreadsheetProgressIndicator + + + + 366 + + + + loggingCheckboxClicked: + + + + 600 + + + + signInClicked: + + + + 836 + + + + mTableTable + + + + 867 + + + + APIConsoleClicked: + + + + 925 + + + + clientIDClicked: + + + + 931 + + + + clientIDDoneClicked: + + + + 932 + + + + cancelMyVolumesFetchClicked: + + + + 1030 + + + + cancelSearchClicked: + + + + 1031 + + + + fetchMyVolumesClicked: + + + + 1033 + + + + searchClicked: + + + + 1034 + + + + addToMyLibraryClicked: + + + + 1038 + + + + removeFromMyLibraryClicked: + + + + 1039 + + + + removeAllFromMyLibraryClicked: + + + + 1045 + + + + signedInField_ + + + + 1047 + + + + signedInButton_ + + + + 1048 + + + + keywordsField_ + + + + 1049 + + + + searchButton_ + + + + 1050 + + + + addToMyLibraryButton_ + + + + 1051 + + + + publicVolumesCancelButton_ + + + + 1052 + + + + publicVolumesTable_ + + + + 1053 + + + + publicVolumesProgressIndicator_ + + + + 1054 + + + + publicVolumesResultTextView_ + + + + 1055 + + + + publicVolumesImageView_ + + + + 1056 + + + + fetchMyLibraryButton_ + + + + 1057 + + + + myBookshelvesPopup_ + + + + 1058 + + + + myLibraryCancelButton_ + + + + 1059 + + + + myVolumesTable_ + + + + 1060 + + + + myVolumesProgressIndicator_ + + + + 1061 + + + + myVolumesResultTextView_ + + + + 1062 + + + + myVolumesImageView_ + + + + 1063 + + + + removeButton_ + + + + 1064 + + + + removeAllButton_ + + + + 1065 + + + + clientIDButton_ + + + + 1066 + + + + clientIDRequiredTextField_ + + + + 1067 + + + + clientIDSheet_ + + + + 1068 + + + + clientIDField_ + + + + 1069 + + + + clientSecretField_ + + + + 1070 + + + + delegate + + + + 15 + + + + dataSource + + + + 588 + + + + delegate + + + + 589 + + + + delegate + + + + 874 + + + + dataSource + + + + 875 + + + + value: values.clientID + + + + + + value: values.clientID + value + values.clientID + + NSContinuouslyUpdatesValue + + + 2 + + + 940 + + + + value: values.clientSecret + + + + + + value: values.clientSecret + value + values.clientSecret + + NSContinuouslyUpdatesValue + + + 2 + + + 939 + + + + delegate + + + + 1035 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 5 + + + YES + + + + Window + + + 6 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + 17 + + + YES + + + + + + 40 + + + + + 139 + + + YES + + + + + + 44 + + + Shared Defaults + + + 744 + + + + + 746 + + + + + 796 + + + YES + + + + + + 797 + + + + + 828 + + + YES + + + + + + 829 + + + YES + + + + + + 830 + + + YES + + + + + + 831 + + + + + 832 + + + + + 833 + + + + + 861 + + + YES + + + + + + 862 + + + + + 863 + + + + + 900 + + + YES + + + + + + 901 + + + YES + + + + + + + + + + + + + 902 + + + YES + + + + + + 903 + + + YES + + + + + + 904 + + + YES + + + + + + 905 + + + YES + + + + + + 906 + + + YES + + + + + + 907 + + + YES + + + + + + 908 + + + YES + + + + + + 909 + + + + + 910 + + + + + 911 + + + + + 912 + + + + + 913 + + + + + 914 + + + + + 915 + + + + + 920 + + + YES + + + + + + 921 + + + + + 929 + + + YES + + + + + + 930 + + + + + 933 + + + YES + + + + + + 934 + + + + + 963 + + + YES + + + + + + + 962 + + + YES + + + + + + + 960 + + + YES + + + + + + 24 + + + YES + + + + + + + + 25 + + + YES + + + + + + 760 + + + + + 761 + + + + + 26 + + + YES + + + + + + 758 + + + + + 961 + + + + + 80 + + + YES + + + + + + + + 763 + + + + + 762 + + + + + 81 + + + + + 976 + + + YES + + + + + + 977 + + + + + 981 + + + YES + + + + + + 982 + + + + + 983 + + + YES + + + + + + 984 + + + + + 987 + + + YES + + + + + + 988 + + + + + 991 + + + YES + + + + + + 992 + + + + + 998 + + + YES + + + + + + 999 + + + + + 1001 + + + YES + + + + + + 1002 + + + YES + + + + + + 1003 + + + YES + + + + + + 1006 + + + + + 1012 + + + YES + + + + + + + 1011 + + + YES + + + + + + + 1009 + + + YES + + + + + + 850 + + + YES + + + + + + + + 853 + + + + + 852 + + + + + 851 + + + YES + + + + + + 854 + + + YES + + + + + + 855 + + + + + 1010 + + + + + 849 + + + YES + + + + + + + + 856 + + + + + 857 + + + + + 858 + + + + + 1040 + + + YES + + + + + + 1041 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 1001.IBPluginDependency + 1002.IBPluginDependency + 1003.IBPluginDependency + 1006.IBPluginDependency + 1009.IBPluginDependency + 1010.IBPluginDependency + 1011.IBPluginDependency + 1012.IBPluginDependency + 1040.IBPluginDependency + 1041.IBPluginDependency + 139.IBPluginDependency + 17.IBPluginDependency + 24.IBPluginDependency + 25.IBPluginDependency + 26.IBPluginDependency + 40.IBPluginDependency + 44.IBPluginDependency + 5.IBPluginDependency + 5.IBWindowTemplateEditedContentRect + 6.IBPluginDependency + 744.IBPluginDependency + 746.IBPluginDependency + 758.IBPluginDependency + 758.IBShouldRemoveOnLegacySave + 760.IBPluginDependency + 760.IBShouldRemoveOnLegacySave + 761.IBPluginDependency + 761.IBShouldRemoveOnLegacySave + 762.IBPluginDependency + 762.IBShouldRemoveOnLegacySave + 763.IBPluginDependency + 763.IBShouldRemoveOnLegacySave + 796.IBPluginDependency + 797.IBPluginDependency + 80.IBPluginDependency + 81.IBPluginDependency + 828.IBPluginDependency + 829.IBPluginDependency + 830.IBPluginDependency + 831.IBPluginDependency + 832.IBPluginDependency + 833.IBPluginDependency + 849.IBPluginDependency + 850.IBPluginDependency + 851.IBPluginDependency + 852.IBPluginDependency + 852.IBShouldRemoveOnLegacySave + 853.IBPluginDependency + 853.IBShouldRemoveOnLegacySave + 854.IBPluginDependency + 855.IBPluginDependency + 855.IBShouldRemoveOnLegacySave + 856.IBPluginDependency + 857.IBPluginDependency + 857.IBShouldRemoveOnLegacySave + 858.IBPluginDependency + 858.IBShouldRemoveOnLegacySave + 861.IBPluginDependency + 862.IBPluginDependency + 863.IBPluginDependency + 900.IBPluginDependency + 900.IBWindowTemplateEditedContentRect + 900.NSWindowTemplate.visibleAtLaunch + 901.IBPluginDependency + 902.IBPluginDependency + 903.IBPluginDependency + 904.IBPluginDependency + 905.IBPluginDependency + 906.IBPluginDependency + 907.IBPluginDependency + 908.IBPluginDependency + 909.IBPluginDependency + 910.IBPluginDependency + 911.IBPluginDependency + 912.IBPluginDependency + 913.IBPluginDependency + 914.IBPluginDependency + 915.IBPluginDependency + 920.IBPluginDependency + 921.IBPluginDependency + 929.IBPluginDependency + 930.IBPluginDependency + 933.IBPluginDependency + 934.IBPluginDependency + 960.IBPluginDependency + 961.IBPluginDependency + 962.IBPluginDependency + 963.IBPluginDependency + 976.IBPluginDependency + 977.IBPluginDependency + 981.IBPluginDependency + 982.IBPluginDependency + 983.IBPluginDependency + 984.IBPluginDependency + 987.IBPluginDependency + 988.IBPluginDependency + 991.IBPluginDependency + 992.IBPluginDependency + 998.IBPluginDependency + 999.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{32, 632}, {539, 524}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{196, 842}, {458, 282}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 1070 + + + + YES + + BooksSampleWindowController + NSWindowController + + YES + + YES + APIConsoleClicked: + addToMyLibraryClicked: + cancelMyVolumesFetchClicked: + cancelSearchClicked: + clientIDClicked: + clientIDDoneClicked: + fetchMyVolumesClicked: + loggingCheckboxClicked: + removeAllFromMyLibraryClicked: + removeFromMyLibraryClicked: + searchClicked: + signInClicked: + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + APIConsoleClicked: + addToMyLibraryClicked: + cancelMyVolumesFetchClicked: + cancelSearchClicked: + clientIDClicked: + clientIDDoneClicked: + fetchMyVolumesClicked: + loggingCheckboxClicked: + removeAllFromMyLibraryClicked: + removeFromMyLibraryClicked: + searchClicked: + signInClicked: + + + YES + + APIConsoleClicked: + id + + + addToMyLibraryClicked: + id + + + cancelMyVolumesFetchClicked: + id + + + cancelSearchClicked: + id + + + clientIDClicked: + id + + + clientIDDoneClicked: + id + + + fetchMyVolumesClicked: + id + + + loggingCheckboxClicked: + id + + + removeAllFromMyLibraryClicked: + id + + + removeFromMyLibraryClicked: + id + + + searchClicked: + id + + + signInClicked: + id + + + + + YES + + YES + addToMyLibraryButton_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + fetchMyLibraryButton_ + keywordsField_ + myBookshelvesPopup_ + myLibraryCancelButton_ + myVolumesImageView_ + myVolumesProgressIndicator_ + myVolumesResultTextView_ + myVolumesTable_ + publicVolumesCancelButton_ + publicVolumesImageView_ + publicVolumesProgressIndicator_ + publicVolumesResultTextView_ + publicVolumesTable_ + removeAllButton_ + removeButton_ + searchButton_ + signedInButton_ + signedInField_ + + + YES + NSButton + NSButton + NSTextField + NSTextField + NSWindow + NSTextField + NSButton + NSTextField + NSPopUpButton + NSButton + NSImageView + NSProgressIndicator + NSTextView + NSTableView + NSButton + NSImageView + NSProgressIndicator + NSTextView + NSTableView + NSButton + NSButton + NSButton + NSButton + NSTextField + + + + YES + + YES + addToMyLibraryButton_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + fetchMyLibraryButton_ + keywordsField_ + myBookshelvesPopup_ + myLibraryCancelButton_ + myVolumesImageView_ + myVolumesProgressIndicator_ + myVolumesResultTextView_ + myVolumesTable_ + publicVolumesCancelButton_ + publicVolumesImageView_ + publicVolumesProgressIndicator_ + publicVolumesResultTextView_ + publicVolumesTable_ + removeAllButton_ + removeButton_ + searchButton_ + signedInButton_ + signedInField_ + + + YES + + addToMyLibraryButton_ + NSButton + + + clientIDButton_ + NSButton + + + clientIDField_ + NSTextField + + + clientIDRequiredTextField_ + NSTextField + + + clientIDSheet_ + NSWindow + + + clientSecretField_ + NSTextField + + + fetchMyLibraryButton_ + NSButton + + + keywordsField_ + NSTextField + + + myBookshelvesPopup_ + NSPopUpButton + + + myLibraryCancelButton_ + NSButton + + + myVolumesImageView_ + NSImageView + + + myVolumesProgressIndicator_ + NSProgressIndicator + + + myVolumesResultTextView_ + NSTextView + + + myVolumesTable_ + NSTableView + + + publicVolumesCancelButton_ + NSButton + + + publicVolumesImageView_ + NSImageView + + + publicVolumesProgressIndicator_ + NSProgressIndicator + + + publicVolumesResultTextView_ + NSTextView + + + publicVolumesTable_ + NSTableView + + + removeAllButton_ + NSButton + + + removeButton_ + NSButton + + + searchButton_ + NSButton + + + signedInButton_ + NSButton + + + signedInField_ + NSTextField + + + + + IBProjectSource + ./Classes/BooksSampleWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + NSSwitch + + + YES + {11, 11} + {10, 3} + {15, 15} + + + + diff --git a/GTL/Examples/BooksSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base b/GTL/Examples/BooksSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base new file mode 100644 index 0000000..77831dd --- /dev/null +++ b/GTL/Examples/BooksSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "© Google Inc. 2011"; diff --git a/GTL/Examples/BooksSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base b/GTL/Examples/BooksSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base new file mode 100644 index 0000000..64e16eb --- /dev/null +++ b/GTL/Examples/BooksSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base @@ -0,0 +1,2409 @@ + + + + 1050 + 10J567 + 851 + 1038.35 + 462.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 851 + + + YES + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + + NSApplication + + + + FirstResponder + + + NSApplication + + + MainMenu + + YES + + + SampleApp + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + SampleApp + + YES + + + About the Sample + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + + Services + + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + + File + + + YES + + + New + n + 1048576 + 2147483647 + + + + + + Open... + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + + Open Recent + + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + Save As… + S + 1048576 + 2147483647 + + + + + + Revert + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup… + P + 1048576 + 2147483647 + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + + Edit + + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + + Find + + + YES + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1048576 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling + + 1048576 + 2147483647 + + + submenuAction: + + Spelling + + YES + + + Spelling… + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling as You Type + + 1048576 + 2147483647 + + + + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + + Window + + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + Help + + YES + + + Help + ? + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + BooksSampleAppController + + + + + YES + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + showHelp: + + + + 122 + + + + clearRecentDocuments: + + + + 127 + + + + terminate: + + + + 139 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + hideOtherApplications: + + + + 146 + + + + hide: + + + + 152 + + + + unhideAllApplications: + + + + 153 + + + + cut: + + + + 175 + + + + paste: + + + + 176 + + + + redo: + + + + 178 + + + + selectAll: + + + + 179 + + + + undo: + + + + 180 + + + + copy: + + + + 181 + + + + showGuessPanel: + + + + 188 + + + + checkSpelling: + + + + 190 + + + + toggleContinuousSpellChecking: + + + + 192 + + + + performClose: + + + + 193 + + + + delete: + + + + 195 + + + + performZoom: + + + + 198 + + + + performFindPanelAction: + + + + 199 + + + + performFindPanelAction: + + + + 200 + + + + performFindPanelAction: + + + + 201 + + + + performFindPanelAction: + + + + 202 + + + + centerSelectionInVisibleArea: + + + + 203 + + + + pasteAsPlainText: + + + + 205 + + + + delegate + + + + 223 + + + + delegate + + + + 225 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + MainMenu + + + 19 + + + YES + + + + + + 24 + + + YES + + + + + + + + + 5 + + + + + 23 + + + + + 92 + + + + + 197 + + + + + 56 + + + YES + + + + + + 57 + + + YES + + + + + + + + + + + + + + + + 58 + + + + + 129 + + + + + 131 + + + YES + + + + + + 130 + + + + + 134 + + + + + 136 + + + + + 143 + + + + + 144 + + + + + 145 + + + + + 149 + + + + + 150 + + + + + 196 + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + + + + + + + + 72 + + + + + 73 + + + + + 74 + + + + + 75 + + + + + 77 + + + + + 78 + + + + + 79 + + + + + 80 + + + + + 82 + + + + + 112 + + + + + 124 + + + YES + + + + + + 125 + + + YES + + + + + + 126 + + + + + 103 + + + YES + + + + + + 106 + + + YES + + + + + + 111 + + + + + 163 + + + YES + + + + + + 169 + + + YES + + + + + + + + + + + + + + + + + 156 + + + + + 157 + + + + + 158 + + + + + 160 + + + + + 164 + + + + + 168 + + + YES + + + + + + 159 + + + YES + + + + + + + + + + 154 + + + + + 155 + + + + + 161 + + + + + 162 + + + + + 167 + + + + + 171 + + + + + 172 + + + + + 173 + + + + + 174 + + + + + 184 + + + YES + + + + + + 185 + + + YES + + + + + + + + 187 + + + + + 189 + + + + + 191 + + + + + 204 + + + + + 222 + + + BuzzSampleAppController + + + + + YES + + YES + -3.IBPluginDependency + -3.ImportedFromIB2 + 103.IBPluginDependency + 103.ImportedFromIB2 + 106.IBPluginDependency + 106.ImportedFromIB2 + 111.IBPluginDependency + 111.ImportedFromIB2 + 112.IBPluginDependency + 112.ImportedFromIB2 + 124.IBPluginDependency + 124.ImportedFromIB2 + 125.IBPluginDependency + 125.ImportedFromIB2 + 126.IBPluginDependency + 126.ImportedFromIB2 + 129.IBPluginDependency + 129.ImportedFromIB2 + 130.IBPluginDependency + 130.ImportedFromIB2 + 131.IBPluginDependency + 131.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 136.IBPluginDependency + 136.ImportedFromIB2 + 143.IBPluginDependency + 143.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 145.IBPluginDependency + 145.ImportedFromIB2 + 149.IBPluginDependency + 149.ImportedFromIB2 + 150.IBPluginDependency + 150.ImportedFromIB2 + 154.IBPluginDependency + 154.ImportedFromIB2 + 155.IBPluginDependency + 155.ImportedFromIB2 + 156.IBPluginDependency + 156.ImportedFromIB2 + 157.IBPluginDependency + 157.ImportedFromIB2 + 158.IBPluginDependency + 158.ImportedFromIB2 + 159.IBPluginDependency + 159.ImportedFromIB2 + 160.IBPluginDependency + 160.ImportedFromIB2 + 161.IBPluginDependency + 161.ImportedFromIB2 + 162.IBPluginDependency + 162.ImportedFromIB2 + 163.IBPluginDependency + 163.ImportedFromIB2 + 164.IBPluginDependency + 164.ImportedFromIB2 + 167.IBPluginDependency + 167.ImportedFromIB2 + 168.IBPluginDependency + 168.ImportedFromIB2 + 169.IBPluginDependency + 169.ImportedFromIB2 + 171.IBPluginDependency + 171.ImportedFromIB2 + 172.IBPluginDependency + 172.ImportedFromIB2 + 173.IBPluginDependency + 173.ImportedFromIB2 + 174.IBPluginDependency + 174.ImportedFromIB2 + 184.IBPluginDependency + 184.ImportedFromIB2 + 185.IBPluginDependency + 185.ImportedFromIB2 + 187.IBPluginDependency + 187.ImportedFromIB2 + 189.IBPluginDependency + 189.ImportedFromIB2 + 19.IBPluginDependency + 19.ImportedFromIB2 + 191.IBPluginDependency + 191.ImportedFromIB2 + 196.IBPluginDependency + 196.ImportedFromIB2 + 197.IBPluginDependency + 197.ImportedFromIB2 + 204.IBPluginDependency + 204.ImportedFromIB2 + 222.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 24.IBPluginDependency + 24.ImportedFromIB2 + 29.IBPluginDependency + 29.ImportedFromIB2 + 5.IBPluginDependency + 5.ImportedFromIB2 + 56.IBPluginDependency + 56.ImportedFromIB2 + 57.IBPluginDependency + 57.ImportedFromIB2 + 58.IBPluginDependency + 58.ImportedFromIB2 + 72.IBPluginDependency + 72.ImportedFromIB2 + 73.IBPluginDependency + 73.ImportedFromIB2 + 74.IBPluginDependency + 74.ImportedFromIB2 + 75.IBPluginDependency + 75.ImportedFromIB2 + 77.IBPluginDependency + 77.ImportedFromIB2 + 78.IBPluginDependency + 78.ImportedFromIB2 + 79.IBPluginDependency + 79.ImportedFromIB2 + 80.IBPluginDependency + 80.ImportedFromIB2 + 81.IBPluginDependency + 81.ImportedFromIB2 + 82.IBPluginDependency + 82.ImportedFromIB2 + 83.IBPluginDependency + 83.ImportedFromIB2 + 92.IBPluginDependency + 92.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + + YES + + + + + YES + + + YES + + + + 227 + + + + YES + + BooksSampleAppController + NSObject + + IBUserSource + + + + + FirstResponder + NSObject + + IBUserSource + + + + + + YES + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSBrowser + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSBrowser.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSDocument + NSObject + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + id + id + id + id + id + id + + + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + + printDocument: + id + + + revertDocumentToSaved: + id + + + runPageLayout: + id + + + saveDocument: + id + + + saveDocumentAs: + id + + + saveDocumentTo: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocument.h + + + + NSDocument + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentScripting.h + + + + NSDocumentController + NSObject + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + id + id + id + id + + + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + + clearRecentDocuments: + id + + + newDocument: + id + + + openDocument: + id + + + saveAllDocuments: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentController.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSMatrix + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSMatrix.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSMenuItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSMovieView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSMovieView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebEditingDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebFrameLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebJavaPlugIn.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPlugin.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPluginContainer.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPolicyDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebResourceLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebScriptObject.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebUIDelegate.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSTableView + NSControl + + + + NSText + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSText.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + + WebView + NSView + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + + goBack: + id + + + goForward: + id + + + makeTextLarger: + id + + + makeTextSmaller: + id + + + makeTextStandardSize: + id + + + reload: + id + + + reloadFromOrigin: + id + + + stopLoading: + id + + + takeStringURLFrom: + id + + + toggleContinuousSpellChecking: + id + + + toggleSmartInsertDelete: + id + + + + + IBFrameworkSource + WebKit.framework/Headers/WebView.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../BuzzSample.xcodeproj + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {9, 8} + {7, 2} + + + + diff --git a/GTL/Examples/BooksSample/English.lproj/BooksSampleWindow.xib b/GTL/Examples/BooksSample/English.lproj/BooksSampleWindow.xib new file mode 100644 index 0000000..3055061 --- /dev/null +++ b/GTL/Examples/BooksSample/English.lproj/BooksSampleWindow.xib @@ -0,0 +1,2996 @@ + + + + 1060 + 11D50b + 2182 + 1138.32 + 568.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2182 + + + YES + NSMenuItem + NSMenu + NSButton + NSCustomObject + NSSplitView + NSImageView + NSTableView + NSImageCell + NSTextField + NSWindowTemplate + NSTextFieldCell + NSButtonCell + NSTableColumn + NSPopUpButtonCell + NSView + NSScrollView + NSUserDefaultsController + NSProgressIndicator + NSScroller + NSPopUpButton + NSTextView + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + BooksSampleWindowController + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{16, 614}, {539, 524}} + 1886912512 + Sample App + + NSWindow + + + View + + + {539, 493} + + + 256 + + YES + + + 265 + {{329, 420}, {82, 32}} + + + YES + + 67239424 + 134217728 + Search + + LucidaGrande + 13 + 1044 + + + -2038284033 + 1 + + LucidaGrande + 13 + 16 + + + DQ + 200 + 25 + + + + + 1289 + + {{434, 403}, {16, 16}} + + + 28938 + 100 + + + + 289 + {{400, 18}, {128, 18}} + + + YES + + 67239424 + 131072 + Log http to desktop + + LucidaGrande + 11 + 3100 + + + 1211912703 + 2 + + NSImage + NSSwitch + + + NSSwitch + + + + 200 + 25 + + + + + 265 + {{467, 401}, {53, 16}} + + + YES + + 67239424 + 134479872 + Cancel + + LucidaGrande + 9 + 3614 + + + -2038284033 + 1 + + LucidaGrande + 9 + 16 + + + + 200 + 25 + + + + + 264 + {{93, 460}, {71, 17}} + + + YES + + 67239424 + 272629760 + Signed In: + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 266 + {{166, 460}, {247, 17}} + + + YES + + 67239424 + 272629760 + No + + + + + + + + + 268 + {{18, 453}, {72, 28}} + + + YES + + 67239424 + 134348800 + Sign Out + + + -2038284033 + 129 + + + 200 + 25 + + + + + 289 + {{467, 217}, {53, 16}} + + + YES + + 67239424 + 134479872 + Cancel + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 1313 + + {{444, 218}, {16, 16}} + + + 28938 + 100 + + + + 268 + {{18, 480}, {83, 28}} + + + YES + + -2080244224 + 134348800 + Client ID... + + + -2038284033 + 129 + + + 200 + 25 + + + + + 264 + {{105, 487}, {178, 14}} + + + YES + + 67239424 + 272760832 + Client ID and Secret Required + + + + + + + + + 274 + + YES + + + 256 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 256 + {408, 74} + + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 405 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + + + + 337772096 + 2048 + + + + 6 + System + controlBackgroundColor + + + + + 3 + YES + + + + 3 + 2 + + 3 + MQA + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + 37748736 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {408, 74}} + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 68}} + + + + _doScroller: + 0.35789470000000001 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + + 1 + + _doScroller: + 0.99047620000000003 + + + {410, 76} + + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 264 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{419, 0}, {80, 76}} + + + YES + + 130560 + 33554432 + 0 + 0 + 2 + NO + + YES + + + {499, 76} + + + YES + + + + 290 + + YES + + + 2304 + + YES + + + 2322 + {497, 14} + + + + + + + results + + + YES + + YES + NSColor + NSFont + + + YES + + 1 + MC40NTEwODY5NCAwLjEwNDE0NTEyIDAuMDgyODYwMjE2AA + + + Geneva + 10 + 16 + + + + + + + YES + + + 6 + + + + 497 + 1 + + + 67119969 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + 1 + MCAwIDEAA + + + + + + + 1 + + 6 + {996, 10000000} + {463, 0} + + + + {{1, 1}, {497, 56}} + + + + + + + {4, 5} + + 79691776 + + YES + + YES + + + + + file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff + + + + + + 3 + MCAwAA + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{0, 85}, {499, 58}} + + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + {{20, 252}, {499, 143}} + + + + + + 270 + {{17, 403}, {294, 17}} + + + YES + + 67239424 + 272629760 + Public Volumes - select one + + + + + + + + + 266 + {{87, 426}, {240, 22}} + + + YES + + -1804468671 + 272630784 + + + + YES + + 6 + System + textBackgroundColor + + + + 6 + System + textColor + + + + + + + 268 + {{17, 428}, {65, 17}} + + + YES + + 68288064 + 272630784 + Keywords + + + + + + + + + 265 + {{323, 401}, {104, 16}} + + + YES + + 67239424 + 134479872 + Add To My Library + + + -2038284033 + 129 + + + 200 + 25 + + + + + 292 + {{15, 31}, {68, 28}} + + + YES + + 67239424 + 134348800 + Remove + + + -2038284033 + 129 + + + 200 + 25 + + + + + 292 + {{15, 212}, {114, 28}} + + + YES + + 67239424 + 134348800 + Fetch My Library + + + -2038284033 + 1 + + LucidaGrande + 11 + 16 + + + + 200 + 25 + + + + + 292 + {{136, 215}, {221, 22}} + + + YES + + -2076049856 + 133120 + + + 109199615 + 129 + + + 400 + 75 + + + YES + Bookshelves + + 1048576 + 2147483647 + 1 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + _popUpItemAction: + + + YES + + OtherViews + + YES + + + + + 1 + YES + YES + 2 + + + + + 258 + + YES + + + 256 + + YES + + + 258 + + YES + + + 2304 + + YES + + + 256 + {404, 79} + + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 401 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + + + 337772096 + 2048 + + + + + + 3 + YES + + + + 3 + 2 + + + 17 + 37748736 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {404, 79}} + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 68}} + + + + _doScroller: + 0.35789470000000001 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + + 1 + + _doScroller: + 0.99047620000000003 + + + {406, 81} + + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{415, 0}, {91, 81}} + + + YES + + 130560 + 33554432 + 0 + 0 + 2 + NO + + YES + + + {506, 81} + + + YES + + + + 266 + + YES + + + 2304 + + YES + + + 2322 + {504, 14} + + + + + + + results + + + + + + YES + + + 6 + + + + 504 + 1 + + + 67119969 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + + + + + + 1 + + 6 + {996, 10000000} + {463, 0} + + + + {{1, 1}, {504, 56}} + + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{0, 90}, {506, 58}} + + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + {{20, 63}, {506, 148}} + + + + + + 292 + {{81, 31}, {86, 28}} + + + YES + + 67239424 + 134348800 + Remove All + + + -2038284033 + 129 + + + 200 + 25 + + + + {539, 524} + + + + {{0, 0}, {1920, 1178}} + {539, 515} + {10000000000000, 10000000000000} + YES + + + YES + + + 3 + 2 + {{235, 277}, {458, 282}} + 611844096 + Client ID Sheet + NSWindow + + + + + 256 + + YES + + + 266 + {{118, 141}, {320, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 141}, {63, 17}} + + YES + + 68288064 + 272630784 + Client ID: + + + + + + + + + 266 + {{118, 110}, {320, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 115}, {88, 17}} + + YES + + 68288064 + 272630784 + Client Secret: + + + + + + + + + 268 + {{338, 76}, {74, 22}} + + YES + + 67239424 + 134348800 + API Console + + + -2038284033 + 134 + + + 200 + 25 + + + + + 268 + {{17, 80}, {316, 17}} + + YES + + 68288064 + 272630784 + Client ID and Client Secret are obtained from the + + + + + + + + + 268 + {{17, 202}, {424, 34}} + + YES + + 67239424 + 138412032 + Each application should have a client ID and client secret hardcoded into the source. + + + + + + + + + 268 + {{348, 12}, {96, 32}} + + YES + + 67239424 + 134217728 + Done + + + -2038284033 + 129 + + DQ + 200 + 25 + + + + {458, 282} + + {{0, 0}, {1920, 1178}} + {10000000000000, 10000000000000} + YES + + + + + YES + + + window + + + + 16 + + + + mSpreadsheetTable + + + + 355 + + + + mSpreadsheetResultTextField + + + + 356 + + + + mSpreadsheetProgressIndicator + + + + 366 + + + + loggingCheckboxClicked: + + + + 600 + + + + signInClicked: + + + + 836 + + + + mTableTable + + + + 867 + + + + APIConsoleClicked: + + + + 925 + + + + clientIDClicked: + + + + 931 + + + + clientIDDoneClicked: + + + + 932 + + + + cancelMyVolumesFetchClicked: + + + + 1030 + + + + cancelSearchClicked: + + + + 1031 + + + + fetchMyVolumesClicked: + + + + 1033 + + + + searchClicked: + + + + 1034 + + + + addToMyLibraryClicked: + + + + 1038 + + + + removeFromMyLibraryClicked: + + + + 1039 + + + + removeAllFromMyLibraryClicked: + + + + 1045 + + + + signedInField_ + + + + 1047 + + + + signedInButton_ + + + + 1048 + + + + keywordsField_ + + + + 1049 + + + + searchButton_ + + + + 1050 + + + + addToMyLibraryButton_ + + + + 1051 + + + + publicVolumesCancelButton_ + + + + 1052 + + + + publicVolumesTable_ + + + + 1053 + + + + publicVolumesProgressIndicator_ + + + + 1054 + + + + publicVolumesResultTextView_ + + + + 1055 + + + + publicVolumesImageView_ + + + + 1056 + + + + fetchMyLibraryButton_ + + + + 1057 + + + + myBookshelvesPopup_ + + + + 1058 + + + + myLibraryCancelButton_ + + + + 1059 + + + + myVolumesTable_ + + + + 1060 + + + + myVolumesProgressIndicator_ + + + + 1061 + + + + myVolumesResultTextView_ + + + + 1062 + + + + myVolumesImageView_ + + + + 1063 + + + + removeButton_ + + + + 1064 + + + + removeAllButton_ + + + + 1065 + + + + clientIDButton_ + + + + 1066 + + + + clientIDRequiredTextField_ + + + + 1067 + + + + clientIDSheet_ + + + + 1068 + + + + clientIDField_ + + + + 1069 + + + + clientSecretField_ + + + + 1070 + + + + delegate + + + + 15 + + + + dataSource + + + + 588 + + + + delegate + + + + 589 + + + + delegate + + + + 874 + + + + dataSource + + + + 875 + + + + value: values.clientID + + + + + + value: values.clientID + value + values.clientID + + NSContinuouslyUpdatesValue + + + 2 + + + 940 + + + + value: values.clientSecret + + + + + + value: values.clientSecret + value + values.clientSecret + + NSContinuouslyUpdatesValue + + + 2 + + + 939 + + + + delegate + + + + 1035 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 5 + + + YES + + + + Window + + + 6 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + 17 + + + YES + + + + + + 40 + + + + + 139 + + + YES + + + + + + 44 + + + Shared Defaults + + + 744 + + + + + 746 + + + + + 796 + + + YES + + + + + + 797 + + + + + 828 + + + YES + + + + + + 829 + + + YES + + + + + + 830 + + + YES + + + + + + 831 + + + + + 832 + + + + + 833 + + + + + 861 + + + YES + + + + + + 862 + + + + + 863 + + + + + 900 + + + YES + + + + + + 901 + + + YES + + + + + + + + + + + + + 902 + + + YES + + + + + + 903 + + + YES + + + + + + 904 + + + YES + + + + + + 905 + + + YES + + + + + + 906 + + + YES + + + + + + 907 + + + YES + + + + + + 908 + + + YES + + + + + + 909 + + + + + 910 + + + + + 911 + + + + + 912 + + + + + 913 + + + + + 914 + + + + + 915 + + + + + 920 + + + YES + + + + + + 921 + + + + + 929 + + + YES + + + + + + 930 + + + + + 933 + + + YES + + + + + + 934 + + + + + 963 + + + YES + + + + + + + 962 + + + YES + + + + + + + 960 + + + YES + + + + + + 24 + + + YES + + + + + + + + 25 + + + YES + + + + + + 760 + + + + + 761 + + + + + 26 + + + YES + + + + + + 758 + + + + + 961 + + + + + 80 + + + YES + + + + + + + + 763 + + + + + 762 + + + + + 81 + + + + + 976 + + + YES + + + + + + 977 + + + + + 981 + + + YES + + + + + + 982 + + + + + 983 + + + YES + + + + + + 984 + + + + + 987 + + + YES + + + + + + 988 + + + + + 991 + + + YES + + + + + + 992 + + + + + 998 + + + YES + + + + + + 999 + + + + + 1001 + + + YES + + + + + + 1002 + + + YES + + + + + + 1003 + + + YES + + + + + + 1006 + + + + + 1012 + + + YES + + + + + + + 1011 + + + YES + + + + + + + 1009 + + + YES + + + + + + 850 + + + YES + + + + + + + + 853 + + + + + 852 + + + + + 851 + + + YES + + + + + + 854 + + + YES + + + + + + 855 + + + + + 1010 + + + + + 849 + + + YES + + + + + + + + 856 + + + + + 857 + + + + + 858 + + + + + 1040 + + + YES + + + + + + 1041 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 1001.IBPluginDependency + 1002.IBPluginDependency + 1003.IBPluginDependency + 1006.IBPluginDependency + 1009.IBPluginDependency + 1010.IBPluginDependency + 1011.IBPluginDependency + 1012.IBPluginDependency + 1040.IBPluginDependency + 1041.IBPluginDependency + 139.IBPluginDependency + 17.IBPluginDependency + 24.IBPluginDependency + 25.IBPluginDependency + 26.IBPluginDependency + 40.IBPluginDependency + 44.IBPluginDependency + 5.IBPluginDependency + 5.IBWindowTemplateEditedContentRect + 6.IBPluginDependency + 744.IBPluginDependency + 746.IBPluginDependency + 758.IBPluginDependency + 758.IBShouldRemoveOnLegacySave + 760.IBPluginDependency + 760.IBShouldRemoveOnLegacySave + 761.IBPluginDependency + 761.IBShouldRemoveOnLegacySave + 762.IBPluginDependency + 762.IBShouldRemoveOnLegacySave + 763.IBPluginDependency + 763.IBShouldRemoveOnLegacySave + 796.IBPluginDependency + 797.IBPluginDependency + 80.IBPluginDependency + 81.IBPluginDependency + 828.IBPluginDependency + 829.IBPluginDependency + 830.IBPluginDependency + 831.IBPluginDependency + 832.IBPluginDependency + 833.IBPluginDependency + 849.IBPluginDependency + 850.IBPluginDependency + 851.IBPluginDependency + 852.IBPluginDependency + 852.IBShouldRemoveOnLegacySave + 853.IBPluginDependency + 853.IBShouldRemoveOnLegacySave + 854.IBPluginDependency + 855.IBPluginDependency + 855.IBShouldRemoveOnLegacySave + 856.IBPluginDependency + 857.IBPluginDependency + 857.IBShouldRemoveOnLegacySave + 858.IBPluginDependency + 858.IBShouldRemoveOnLegacySave + 861.IBPluginDependency + 862.IBPluginDependency + 863.IBPluginDependency + 900.IBPluginDependency + 900.IBWindowTemplateEditedContentRect + 900.NSWindowTemplate.visibleAtLaunch + 901.IBPluginDependency + 902.IBPluginDependency + 903.IBPluginDependency + 904.IBPluginDependency + 905.IBPluginDependency + 906.IBPluginDependency + 907.IBPluginDependency + 908.IBPluginDependency + 909.IBPluginDependency + 910.IBPluginDependency + 911.IBPluginDependency + 912.IBPluginDependency + 913.IBPluginDependency + 914.IBPluginDependency + 915.IBPluginDependency + 920.IBPluginDependency + 921.IBPluginDependency + 929.IBPluginDependency + 930.IBPluginDependency + 933.IBPluginDependency + 934.IBPluginDependency + 960.IBPluginDependency + 961.IBPluginDependency + 962.IBPluginDependency + 963.IBPluginDependency + 976.IBPluginDependency + 977.IBPluginDependency + 981.IBPluginDependency + 982.IBPluginDependency + 983.IBPluginDependency + 984.IBPluginDependency + 987.IBPluginDependency + 988.IBPluginDependency + 991.IBPluginDependency + 992.IBPluginDependency + 998.IBPluginDependency + 999.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{32, 632}, {539, 524}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{196, 842}, {458, 282}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 1070 + + + + YES + + BooksSampleWindowController + NSWindowController + + YES + + YES + APIConsoleClicked: + addToMyLibraryClicked: + cancelMyVolumesFetchClicked: + cancelSearchClicked: + clientIDClicked: + clientIDDoneClicked: + fetchMyVolumesClicked: + loggingCheckboxClicked: + removeAllFromMyLibraryClicked: + removeFromMyLibraryClicked: + searchClicked: + signInClicked: + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + APIConsoleClicked: + addToMyLibraryClicked: + cancelMyVolumesFetchClicked: + cancelSearchClicked: + clientIDClicked: + clientIDDoneClicked: + fetchMyVolumesClicked: + loggingCheckboxClicked: + removeAllFromMyLibraryClicked: + removeFromMyLibraryClicked: + searchClicked: + signInClicked: + + + YES + + APIConsoleClicked: + id + + + addToMyLibraryClicked: + id + + + cancelMyVolumesFetchClicked: + id + + + cancelSearchClicked: + id + + + clientIDClicked: + id + + + clientIDDoneClicked: + id + + + fetchMyVolumesClicked: + id + + + loggingCheckboxClicked: + id + + + removeAllFromMyLibraryClicked: + id + + + removeFromMyLibraryClicked: + id + + + searchClicked: + id + + + signInClicked: + id + + + + + YES + + YES + addToMyLibraryButton_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + fetchMyLibraryButton_ + keywordsField_ + myBookshelvesPopup_ + myLibraryCancelButton_ + myVolumesImageView_ + myVolumesProgressIndicator_ + myVolumesResultTextView_ + myVolumesTable_ + publicVolumesCancelButton_ + publicVolumesImageView_ + publicVolumesProgressIndicator_ + publicVolumesResultTextView_ + publicVolumesTable_ + removeAllButton_ + removeButton_ + searchButton_ + signedInButton_ + signedInField_ + + + YES + NSButton + NSButton + NSTextField + NSTextField + NSWindow + NSTextField + NSButton + NSTextField + NSPopUpButton + NSButton + NSImageView + NSProgressIndicator + NSTextView + NSTableView + NSButton + NSImageView + NSProgressIndicator + NSTextView + NSTableView + NSButton + NSButton + NSButton + NSButton + NSTextField + + + + YES + + YES + addToMyLibraryButton_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + fetchMyLibraryButton_ + keywordsField_ + myBookshelvesPopup_ + myLibraryCancelButton_ + myVolumesImageView_ + myVolumesProgressIndicator_ + myVolumesResultTextView_ + myVolumesTable_ + publicVolumesCancelButton_ + publicVolumesImageView_ + publicVolumesProgressIndicator_ + publicVolumesResultTextView_ + publicVolumesTable_ + removeAllButton_ + removeButton_ + searchButton_ + signedInButton_ + signedInField_ + + + YES + + addToMyLibraryButton_ + NSButton + + + clientIDButton_ + NSButton + + + clientIDField_ + NSTextField + + + clientIDRequiredTextField_ + NSTextField + + + clientIDSheet_ + NSWindow + + + clientSecretField_ + NSTextField + + + fetchMyLibraryButton_ + NSButton + + + keywordsField_ + NSTextField + + + myBookshelvesPopup_ + NSPopUpButton + + + myLibraryCancelButton_ + NSButton + + + myVolumesImageView_ + NSImageView + + + myVolumesProgressIndicator_ + NSProgressIndicator + + + myVolumesResultTextView_ + NSTextView + + + myVolumesTable_ + NSTableView + + + publicVolumesCancelButton_ + NSButton + + + publicVolumesImageView_ + NSImageView + + + publicVolumesProgressIndicator_ + NSProgressIndicator + + + publicVolumesResultTextView_ + NSTextView + + + publicVolumesTable_ + NSTableView + + + removeAllButton_ + NSButton + + + removeButton_ + NSButton + + + searchButton_ + NSButton + + + signedInButton_ + NSButton + + + signedInField_ + NSTextField + + + + + IBProjectSource + ./Classes/BooksSampleWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + NSSwitch + + + YES + {11, 11} + {10, 3} + {15, 15} + + + + diff --git a/GTL/Examples/BooksSample/English.lproj/InfoPlist.strings b/GTL/Examples/BooksSample/English.lproj/InfoPlist.strings new file mode 100644 index 0000000..77831dd --- /dev/null +++ b/GTL/Examples/BooksSample/English.lproj/InfoPlist.strings @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "© Google Inc. 2011"; diff --git a/GTL/Examples/BooksSample/English.lproj/MainMenu.xib b/GTL/Examples/BooksSample/English.lproj/MainMenu.xib new file mode 100644 index 0000000..64e16eb --- /dev/null +++ b/GTL/Examples/BooksSample/English.lproj/MainMenu.xib @@ -0,0 +1,2409 @@ + + + + 1050 + 10J567 + 851 + 1038.35 + 462.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 851 + + + YES + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + + NSApplication + + + + FirstResponder + + + NSApplication + + + MainMenu + + YES + + + SampleApp + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + SampleApp + + YES + + + About the Sample + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + + Services + + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + + File + + + YES + + + New + n + 1048576 + 2147483647 + + + + + + Open... + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + + Open Recent + + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + Save As… + S + 1048576 + 2147483647 + + + + + + Revert + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup… + P + 1048576 + 2147483647 + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + + Edit + + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + + Find + + + YES + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1048576 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling + + 1048576 + 2147483647 + + + submenuAction: + + Spelling + + YES + + + Spelling… + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling as You Type + + 1048576 + 2147483647 + + + + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + + Window + + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + Help + + YES + + + Help + ? + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + BooksSampleAppController + + + + + YES + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + showHelp: + + + + 122 + + + + clearRecentDocuments: + + + + 127 + + + + terminate: + + + + 139 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + hideOtherApplications: + + + + 146 + + + + hide: + + + + 152 + + + + unhideAllApplications: + + + + 153 + + + + cut: + + + + 175 + + + + paste: + + + + 176 + + + + redo: + + + + 178 + + + + selectAll: + + + + 179 + + + + undo: + + + + 180 + + + + copy: + + + + 181 + + + + showGuessPanel: + + + + 188 + + + + checkSpelling: + + + + 190 + + + + toggleContinuousSpellChecking: + + + + 192 + + + + performClose: + + + + 193 + + + + delete: + + + + 195 + + + + performZoom: + + + + 198 + + + + performFindPanelAction: + + + + 199 + + + + performFindPanelAction: + + + + 200 + + + + performFindPanelAction: + + + + 201 + + + + performFindPanelAction: + + + + 202 + + + + centerSelectionInVisibleArea: + + + + 203 + + + + pasteAsPlainText: + + + + 205 + + + + delegate + + + + 223 + + + + delegate + + + + 225 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + MainMenu + + + 19 + + + YES + + + + + + 24 + + + YES + + + + + + + + + 5 + + + + + 23 + + + + + 92 + + + + + 197 + + + + + 56 + + + YES + + + + + + 57 + + + YES + + + + + + + + + + + + + + + + 58 + + + + + 129 + + + + + 131 + + + YES + + + + + + 130 + + + + + 134 + + + + + 136 + + + + + 143 + + + + + 144 + + + + + 145 + + + + + 149 + + + + + 150 + + + + + 196 + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + + + + + + + + 72 + + + + + 73 + + + + + 74 + + + + + 75 + + + + + 77 + + + + + 78 + + + + + 79 + + + + + 80 + + + + + 82 + + + + + 112 + + + + + 124 + + + YES + + + + + + 125 + + + YES + + + + + + 126 + + + + + 103 + + + YES + + + + + + 106 + + + YES + + + + + + 111 + + + + + 163 + + + YES + + + + + + 169 + + + YES + + + + + + + + + + + + + + + + + 156 + + + + + 157 + + + + + 158 + + + + + 160 + + + + + 164 + + + + + 168 + + + YES + + + + + + 159 + + + YES + + + + + + + + + + 154 + + + + + 155 + + + + + 161 + + + + + 162 + + + + + 167 + + + + + 171 + + + + + 172 + + + + + 173 + + + + + 174 + + + + + 184 + + + YES + + + + + + 185 + + + YES + + + + + + + + 187 + + + + + 189 + + + + + 191 + + + + + 204 + + + + + 222 + + + BuzzSampleAppController + + + + + YES + + YES + -3.IBPluginDependency + -3.ImportedFromIB2 + 103.IBPluginDependency + 103.ImportedFromIB2 + 106.IBPluginDependency + 106.ImportedFromIB2 + 111.IBPluginDependency + 111.ImportedFromIB2 + 112.IBPluginDependency + 112.ImportedFromIB2 + 124.IBPluginDependency + 124.ImportedFromIB2 + 125.IBPluginDependency + 125.ImportedFromIB2 + 126.IBPluginDependency + 126.ImportedFromIB2 + 129.IBPluginDependency + 129.ImportedFromIB2 + 130.IBPluginDependency + 130.ImportedFromIB2 + 131.IBPluginDependency + 131.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 136.IBPluginDependency + 136.ImportedFromIB2 + 143.IBPluginDependency + 143.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 145.IBPluginDependency + 145.ImportedFromIB2 + 149.IBPluginDependency + 149.ImportedFromIB2 + 150.IBPluginDependency + 150.ImportedFromIB2 + 154.IBPluginDependency + 154.ImportedFromIB2 + 155.IBPluginDependency + 155.ImportedFromIB2 + 156.IBPluginDependency + 156.ImportedFromIB2 + 157.IBPluginDependency + 157.ImportedFromIB2 + 158.IBPluginDependency + 158.ImportedFromIB2 + 159.IBPluginDependency + 159.ImportedFromIB2 + 160.IBPluginDependency + 160.ImportedFromIB2 + 161.IBPluginDependency + 161.ImportedFromIB2 + 162.IBPluginDependency + 162.ImportedFromIB2 + 163.IBPluginDependency + 163.ImportedFromIB2 + 164.IBPluginDependency + 164.ImportedFromIB2 + 167.IBPluginDependency + 167.ImportedFromIB2 + 168.IBPluginDependency + 168.ImportedFromIB2 + 169.IBPluginDependency + 169.ImportedFromIB2 + 171.IBPluginDependency + 171.ImportedFromIB2 + 172.IBPluginDependency + 172.ImportedFromIB2 + 173.IBPluginDependency + 173.ImportedFromIB2 + 174.IBPluginDependency + 174.ImportedFromIB2 + 184.IBPluginDependency + 184.ImportedFromIB2 + 185.IBPluginDependency + 185.ImportedFromIB2 + 187.IBPluginDependency + 187.ImportedFromIB2 + 189.IBPluginDependency + 189.ImportedFromIB2 + 19.IBPluginDependency + 19.ImportedFromIB2 + 191.IBPluginDependency + 191.ImportedFromIB2 + 196.IBPluginDependency + 196.ImportedFromIB2 + 197.IBPluginDependency + 197.ImportedFromIB2 + 204.IBPluginDependency + 204.ImportedFromIB2 + 222.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 24.IBPluginDependency + 24.ImportedFromIB2 + 29.IBPluginDependency + 29.ImportedFromIB2 + 5.IBPluginDependency + 5.ImportedFromIB2 + 56.IBPluginDependency + 56.ImportedFromIB2 + 57.IBPluginDependency + 57.ImportedFromIB2 + 58.IBPluginDependency + 58.ImportedFromIB2 + 72.IBPluginDependency + 72.ImportedFromIB2 + 73.IBPluginDependency + 73.ImportedFromIB2 + 74.IBPluginDependency + 74.ImportedFromIB2 + 75.IBPluginDependency + 75.ImportedFromIB2 + 77.IBPluginDependency + 77.ImportedFromIB2 + 78.IBPluginDependency + 78.ImportedFromIB2 + 79.IBPluginDependency + 79.ImportedFromIB2 + 80.IBPluginDependency + 80.ImportedFromIB2 + 81.IBPluginDependency + 81.ImportedFromIB2 + 82.IBPluginDependency + 82.ImportedFromIB2 + 83.IBPluginDependency + 83.ImportedFromIB2 + 92.IBPluginDependency + 92.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + + YES + + + + + YES + + + YES + + + + 227 + + + + YES + + BooksSampleAppController + NSObject + + IBUserSource + + + + + FirstResponder + NSObject + + IBUserSource + + + + + + YES + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSBrowser + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSBrowser.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSDocument + NSObject + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + id + id + id + id + id + id + + + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + + printDocument: + id + + + revertDocumentToSaved: + id + + + runPageLayout: + id + + + saveDocument: + id + + + saveDocumentAs: + id + + + saveDocumentTo: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocument.h + + + + NSDocument + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentScripting.h + + + + NSDocumentController + NSObject + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + id + id + id + id + + + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + + clearRecentDocuments: + id + + + newDocument: + id + + + openDocument: + id + + + saveAllDocuments: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentController.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSMatrix + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSMatrix.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSMenuItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSMovieView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSMovieView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebEditingDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebFrameLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebJavaPlugIn.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPlugin.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPluginContainer.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPolicyDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebResourceLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebScriptObject.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebUIDelegate.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSTableView + NSControl + + + + NSText + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSText.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + + WebView + NSView + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + + goBack: + id + + + goForward: + id + + + makeTextLarger: + id + + + makeTextSmaller: + id + + + makeTextStandardSize: + id + + + reload: + id + + + reloadFromOrigin: + id + + + stopLoading: + id + + + takeStringURLFrom: + id + + + toggleContinuousSpellChecking: + id + + + toggleSmartInsertDelete: + id + + + + + IBFrameworkSource + WebKit.framework/Headers/WebView.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../BuzzSample.xcodeproj + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {9, 8} + {7, 2} + + + + diff --git a/GTL/Examples/BooksSample/Info.plist b/GTL/Examples/BooksSample/Info.plist new file mode 100644 index 0000000..8a98221 --- /dev/null +++ b/GTL/Examples/BooksSample/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.example.BooksSample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/GTL/Examples/BooksSample/README.txt b/GTL/Examples/BooksSample/README.txt new file mode 100644 index 0000000..ff257a0 --- /dev/null +++ b/GTL/Examples/BooksSample/README.txt @@ -0,0 +1 @@ +This sample should automatically build and copy over the GTL.framework as part of the build-and-run process. diff --git a/GTL/Examples/BooksSample/buildStripHeaders b/GTL/Examples/BooksSample/buildStripHeaders new file mode 100755 index 0000000..0238ef2 --- /dev/null +++ b/GTL/Examples/BooksSample/buildStripHeaders @@ -0,0 +1,17 @@ +#!/bin/sh +# +# buildStripHeaders +# +# Remove header files from the built copy of the framework inside our +# application. + +# Strip "*.h" files +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname '*.h' -delete + +# Strip "Headers" links +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type l -delete + +# Strip "Headers" directories +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type d -prune -delete + + diff --git a/GTL/Examples/BooksSample/main.m b/GTL/Examples/BooksSample/main.m new file mode 100644 index 0000000..3e35dea --- /dev/null +++ b/GTL/Examples/BooksSample/main.m @@ -0,0 +1,25 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// main.m +// + +#import + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **) argv); +} diff --git a/GTL/Examples/CalendarSample/.svn/all-wcprops b/GTL/Examples/CalendarSample/.svn/all-wcprops new file mode 100644 index 0000000..834ff4b --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/all-wcprops @@ -0,0 +1,77 @@ +K 25 +svn:wc:ra_dav:version-url +V 47 +/svn/!svn/ver/199/trunk/Examples/CalendarSample +END +main.m +K 25 +svn:wc:ra_dav:version-url +V 53 +/svn/!svn/ver/98/trunk/Examples/CalendarSample/main.m +END +CalendarSampleWindowController.m +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/199/trunk/Examples/CalendarSample/CalendarSampleWindowController.m +END +Info.plist +K 25 +svn:wc:ra_dav:version-url +V 57 +/svn/!svn/ver/98/trunk/Examples/CalendarSample/Info.plist +END +CalendarSampleAppController.h +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/98/trunk/Examples/CalendarSample/CalendarSampleAppController.h +END +EditACLWindowController.h +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/98/trunk/Examples/CalendarSample/EditACLWindowController.h +END +EditEventWindowController.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/98/trunk/Examples/CalendarSample/EditEventWindowController.h +END +README.txt +K 25 +svn:wc:ra_dav:version-url +V 57 +/svn/!svn/ver/98/trunk/Examples/CalendarSample/README.txt +END +CalendarSampleAppController.m +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/98/trunk/Examples/CalendarSample/CalendarSampleAppController.m +END +EditACLWindowController.m +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/98/trunk/Examples/CalendarSample/EditACLWindowController.m +END +buildStripHeaders +K 25 +svn:wc:ra_dav:version-url +V 64 +/svn/!svn/ver/98/trunk/Examples/CalendarSample/buildStripHeaders +END +CalendarSampleWindowController.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/98/trunk/Examples/CalendarSample/CalendarSampleWindowController.h +END +EditEventWindowController.m +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/199/trunk/Examples/CalendarSample/EditEventWindowController.m +END diff --git a/GTL/Examples/CalendarSample/.svn/entries b/GTL/Examples/CalendarSample/.svn/entries new file mode 100644 index 0000000..7186872 --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/entries @@ -0,0 +1,442 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/CalendarSample +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-08-06T20:16:00.435937Z +199 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +main.m +file + + + + +2012-12-09T08:42:34.000000Z +af9c2e77a713a1097860676cdace71b7 +2011-11-17T15:09:17.128127Z +98 +thomasvl@gmail.com +has-props + + + + + + + + + + + + + + + + + + + + +736 + +CalendarSampleWindowController.m +file + + + + +2012-12-09T08:42:34.000000Z +2b04c0caba8e73d1a0454600b6bdb40c +2012-08-06T20:16:00.435937Z +199 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +48233 + +Info.plist +file + + + + +2012-12-09T08:42:34.000000Z +0f958c16b80372193978d2c053370c59 +2011-11-17T15:09:17.128127Z +98 +thomasvl@gmail.com + + + + + + + + + + + + + + + + + + + + + +839 + +CalendarSampleAppController.h +file + + + + +2012-12-09T08:42:34.000000Z +9065a5c827420c851ee88a4a6fb0fa88 +2011-11-17T15:09:17.128127Z +98 +thomasvl@gmail.com +has-props + + + + + + + + + + + + + + + + + + + + +718 + +CalendarSample.xcodeproj +dir + +EditACLWindowController.h +file + + + + +2012-12-09T08:42:34.000000Z +a81f673df53b104e5a5f509c9ac6d04c +2011-11-17T15:09:17.128127Z +98 +thomasvl@gmail.com +has-props + + + + + + + + + + + + + + + + + + + + +1269 + +EditEventWindowController.h +file + + + + +2012-12-09T08:42:34.000000Z +5b0f579311727b9b1017f4e7828b963b +2011-11-17T15:09:17.128127Z +98 +thomasvl@gmail.com +has-props + + + + + + + + + + + + + + + + + + + + +1445 + +README.txt +file + + + + +2012-12-09T08:42:34.000000Z +0a3374a462b2cff6dcd19d0caf28958a +2011-11-17T15:09:17.128127Z +98 +thomasvl@gmail.com +has-props + + + + + + + + + + + + + + + + + + + + +109 + +CalendarSampleAppController.m +file + + + + +2012-12-09T08:42:34.000000Z +864d944316858f2f85c1522db67c606e +2011-11-17T15:09:17.128127Z +98 +thomasvl@gmail.com +has-props + + + + + + + + + + + + + + + + + + + + +1098 + +EditACLWindowController.m +file + + + + +2012-12-09T08:42:34.000000Z +4606d4cc7d1f8f52d3c3a5dfbea426bf +2011-11-17T15:09:17.128127Z +98 +thomasvl@gmail.com +has-props + + + + + + + + + + + + + + + + + + + + +3309 + +buildStripHeaders +file + + + + +2012-12-09T08:42:34.000000Z +38b5302dc0e4a662c40b288306a2f6ac +2011-11-17T15:09:17.128127Z +98 +thomasvl@gmail.com +has-props + + + + + + + + + + + + + + + + + + + + +454 + +CalendarSampleWindowController.h +file + + + + +2012-12-09T08:42:34.000000Z +ba9e61ddb924f6bad79638333f1251e6 +2011-11-17T15:09:17.128127Z +98 +thomasvl@gmail.com +has-props + + + + + + + + + + + + + + + + + + + + +3190 + +English.lproj +dir + +EditEventWindowController.m +file + + + + +2012-12-09T08:42:34.000000Z +6c0edba5850f3de04337c879a2a09ecc +2012-08-06T20:16:00.435937Z +199 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +5069 + diff --git a/GTL/Examples/CalendarSample/.svn/prop-base/CalendarSampleAppController.h.svn-base b/GTL/Examples/CalendarSample/.svn/prop-base/CalendarSampleAppController.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/prop-base/CalendarSampleAppController.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Examples/CalendarSample/.svn/prop-base/CalendarSampleAppController.m.svn-base b/GTL/Examples/CalendarSample/.svn/prop-base/CalendarSampleAppController.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/prop-base/CalendarSampleAppController.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Examples/CalendarSample/.svn/prop-base/CalendarSampleWindowController.h.svn-base b/GTL/Examples/CalendarSample/.svn/prop-base/CalendarSampleWindowController.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/prop-base/CalendarSampleWindowController.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Examples/CalendarSample/.svn/prop-base/CalendarSampleWindowController.m.svn-base b/GTL/Examples/CalendarSample/.svn/prop-base/CalendarSampleWindowController.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/prop-base/CalendarSampleWindowController.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Examples/CalendarSample/.svn/prop-base/EditACLWindowController.h.svn-base b/GTL/Examples/CalendarSample/.svn/prop-base/EditACLWindowController.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/prop-base/EditACLWindowController.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Examples/CalendarSample/.svn/prop-base/EditACLWindowController.m.svn-base b/GTL/Examples/CalendarSample/.svn/prop-base/EditACLWindowController.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/prop-base/EditACLWindowController.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Examples/CalendarSample/.svn/prop-base/EditEventWindowController.h.svn-base b/GTL/Examples/CalendarSample/.svn/prop-base/EditEventWindowController.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/prop-base/EditEventWindowController.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Examples/CalendarSample/.svn/prop-base/EditEventWindowController.m.svn-base b/GTL/Examples/CalendarSample/.svn/prop-base/EditEventWindowController.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/prop-base/EditEventWindowController.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Examples/CalendarSample/.svn/prop-base/README.txt.svn-base b/GTL/Examples/CalendarSample/.svn/prop-base/README.txt.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/prop-base/README.txt.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Examples/CalendarSample/.svn/prop-base/buildStripHeaders.svn-base b/GTL/Examples/CalendarSample/.svn/prop-base/buildStripHeaders.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/prop-base/buildStripHeaders.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/GTL/Examples/CalendarSample/.svn/prop-base/main.m.svn-base b/GTL/Examples/CalendarSample/.svn/prop-base/main.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/prop-base/main.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Examples/CalendarSample/.svn/text-base/CalendarSampleAppController.h.svn-base b/GTL/Examples/CalendarSample/.svn/text-base/CalendarSampleAppController.h.svn-base new file mode 100644 index 0000000..0c54129 --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/text-base/CalendarSampleAppController.h.svn-base @@ -0,0 +1,23 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// CalendarSampleAppController.h +// + +#import + +@interface CalendarSampleAppController : NSObject +@end diff --git a/GTL/Examples/CalendarSample/.svn/text-base/CalendarSampleAppController.m.svn-base b/GTL/Examples/CalendarSample/.svn/text-base/CalendarSampleAppController.m.svn-base new file mode 100644 index 0000000..b2141d1 --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/text-base/CalendarSampleAppController.m.svn-base @@ -0,0 +1,35 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// CalendarSampleAppController.m +// + +#import "CalendarSampleAppController.h" +#import "CalendarSampleWindowController.h" + +@implementation CalendarSampleAppController + +- (void)applicationWillFinishLaunching:(NSNotification *)notification { + CalendarSampleWindowController* windowController + = [CalendarSampleWindowController sharedWindowController]; + [windowController showWindow:self]; +} + +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { + return YES; +} + +@end diff --git a/GTL/Examples/CalendarSample/.svn/text-base/CalendarSampleWindowController.h.svn-base b/GTL/Examples/CalendarSample/.svn/text-base/CalendarSampleWindowController.h.svn-base new file mode 100644 index 0000000..f956798 --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/text-base/CalendarSampleWindowController.h.svn-base @@ -0,0 +1,108 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// CalendarSampleWindowController.h +// + +#import + +#import "GTLCalendar.h" +#import "GTL/GTMOAuth2WindowController.h" + +@interface CalendarSampleWindowController : NSWindowController { + @private + IBOutlet NSTextField *signedInField_; + IBOutlet NSButton *signedInButton_; + + IBOutlet NSTableView *calendarTable_; + IBOutlet NSProgressIndicator *calendarProgressIndicator_; + IBOutlet NSTextView *calendarResultTextField_; + IBOutlet NSButton *calendarCancelButton_; + + IBOutlet NSSegmentedControl *calendarSegmentedControl_; + IBOutlet NSButton *addCalendarButton_; + IBOutlet NSButton *renameCalendarButton_; + IBOutlet NSButton *deleteCalendarButton_; + IBOutlet NSTextField *calendarNameField_; + + IBOutlet NSTableView *eventTable_; + IBOutlet NSProgressIndicator *eventProgressIndicator_; + IBOutlet NSTextView *eventResultTextField_; + IBOutlet NSButton *eventCancelButton_; + + IBOutlet NSButton *addEntryButton_; + IBOutlet NSButton *editEntryButton_; + IBOutlet NSButton *deleteEntriesButton_; + IBOutlet NSButton *queryTodaysEventsButton_; + IBOutlet NSButton *queryFreeBusyButton_; + + IBOutlet NSSegmentedControl *entrySegmentedControl_; + + IBOutlet NSButton *clientIDButton_; + IBOutlet NSTextField *clientIDRequiredTextField_; + IBOutlet NSWindow *clientIDSheet_; + IBOutlet NSTextField *clientIDField_; + IBOutlet NSTextField *clientSecretField_; + + GTLCalendarCalendarList *calendarList_; + GTLServiceTicket *calendarListTicket_; + NSError *calendarFetchError_; + + GTLServiceTicket *editCalendarListTicket_; + + GTLCalendarEvents *events_; + GTLServiceTicket *eventTicket_; + NSError *eventsFetchError_; + + GTLServiceTicket *editEventTicket_; + + GTLCalendarAcl *calendarACLs_; + NSError *calendarACLsFetchError_; + + GTLCalendarSettings *settings_; + NSError *settingsFetchError_; +} + ++ (CalendarSampleWindowController *)sharedWindowController; + +- (IBAction)signInClicked:(id)sender; + +- (IBAction)getCalendarList:(id)sender; + +- (IBAction)cancelCalendarFetch:(id)sender; +- (IBAction)cancelEventsFetch:(id)sender; + +- (IBAction)addCalendar:(id)sender; +- (IBAction)renameCalendar:(id)sender; +- (IBAction)deleteCalendar:(id)sender; + +- (IBAction)entrySegmentClicked:(id)sender; + +- (IBAction)addEntry:(id)sender; +- (IBAction)editEntry:(id)sender; +- (IBAction)deleteEntries:(id)sender; + +- (IBAction)queryTodayClicked:(id)sender; +- (IBAction)queryFreeBusyClicked:(id)sender; + +- (IBAction)loggingCheckboxClicked:(id)sender; + +// Client ID sheet +- (IBAction)clientIDClicked:(id)sender; +- (IBAction)clientIDDoneClicked:(id)sender; +- (IBAction)APIConsoleClicked:(id)sender; + +@end diff --git a/GTL/Examples/CalendarSample/.svn/text-base/CalendarSampleWindowController.m.svn-base b/GTL/Examples/CalendarSample/.svn/text-base/CalendarSampleWindowController.m.svn-base new file mode 100644 index 0000000..d05dbbd --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/text-base/CalendarSampleWindowController.m.svn-base @@ -0,0 +1,1273 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// CalendarSampleWindowController.m +// + +#import "CalendarSampleWindowController.h" +#import "EditEventWindowController.h" +#import "EditACLWindowController.h" + +#import "GTL/GTLUtilities.h" +#import "GTL/GTMHTTPFetcherLogging.h" + +enum { + kEventsSegment = 0, + kAccessControlSegment = 1, + kSettingsSegment = 2 +}; + +@interface CalendarSampleWindowController () + +@property (readonly) GTLServiceCalendar *calendarService; + +@property (retain) GTLCalendarCalendarList *calendarList; +@property (retain) GTLServiceTicket *calendarListTicket; +@property (retain) NSError *calendarListFetchError; + +@property (retain) GTLServiceTicket *editCalendarListTicket; + +@property (retain) GTLCalendarEvents *events; +@property (retain) GTLServiceTicket *eventsTicket; +@property (retain) NSError *eventsFetchError; + +@property (retain) GTLCalendarAcl *ACLs; +@property (retain) NSError *ACLsFetchError; + +@property (retain) GTLCalendarSettings *settings; +@property (retain) NSError *settingsFetchError; + +@property (retain) GTLServiceTicket *editEventTicket; + + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel; + +- (void)updateUI; +- (NSString *)displayStringForACLRule:(GTLCalendarAclRule *)rule; +- (void)displayAlert:(NSString *)title format:(NSString *)format, ...; + +- (void)fetchCalendarList; +- (void)fetchSelectedCalendar; +- (void)addACalendar; +- (void)renameSelectedCalendar; +- (void)deleteSelectedCalendar; + +- (void)addAnEvent; +- (void)addEvent:(GTLCalendarEvent *)event; +- (void)editSelectedEvent; +- (void)editSelectedEventWithEvent:(GTLCalendarEvent *)revisedEvent; +- (void)deleteSelectedEvent; +- (void)queryTodaysEvents; +- (void)queryFreeBusy; + +- (void)addAnACLRule; +- (void)addACLRule:(GTLCalendarAclRule *)rule; +- (void)editSelectedACLRule; +- (void)editSelectedACLRuleWithRule:(GTLCalendarAclRule *)revisedRule; +- (void)deleteSelectedACLRule; + +- (GTLCalendarCalendarListEntry *)selectedCalendarListEntry; +- (GTLCalendarEvent *)selectedEvent; + +@end + +// Keychain item name for saving the user's authentication information +NSString *const kKeychainItemName = @"CalendarSample: Google Calendar"; + +@implementation CalendarSampleWindowController + +@synthesize calendarList = calendarList_, + calendarListTicket = calendarListTicket_, + calendarListFetchError = calendarFetchError_, + editCalendarListTicket = editCalendarListTicket_, + events = events_, + eventsTicket = eventTicket_, + eventsFetchError = eventsFetchError_, + ACLs = calendarACLs_, + ACLsFetchError = calendarACLsFetchError_, + settings = settings_, + settingsFetchError = settingsFetchError_, + editEventTicket = editEventTicket_; + ++ (CalendarSampleWindowController *)sharedWindowController { + static CalendarSampleWindowController* gWindowController = nil; + if (!gWindowController) { + gWindowController = [[CalendarSampleWindowController alloc] init]; + } + return gWindowController; +} + +- (id)init { + return [self initWithWindowNibName:@"CalendarSampleWindow"]; +} + +- (void)awakeFromNib { + // Load the OAuth token from the keychain, if it was previously saved + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + GTMOAuth2Authentication *auth; + auth = [GTMOAuth2WindowController authForGoogleFromKeychainForName:kKeychainItemName + clientID:clientID + clientSecret:clientSecret]; + self.calendarService.authorizer = auth; + + // Set the result text fields to have a distinctive color and mono-spaced font + [calendarResultTextField_ setTextColor:[NSColor darkGrayColor]]; + [eventResultTextField_ setTextColor:[NSColor darkGrayColor]]; + + NSFont *resultTextFont = [NSFont fontWithName:@"Monaco" size:9]; + [calendarResultTextField_ setFont:resultTextFont]; + [eventResultTextField_ setFont:resultTextFont]; + + [self updateUI]; +} + +- (void)dealloc { + [calendarList_ release]; + [calendarListTicket_ release]; + [calendarFetchError_ release]; + + [editCalendarListTicket_ release]; + + [events_ release]; + [eventTicket_ release]; + [eventsFetchError_ release]; + + [calendarACLs_ release]; + [calendarACLsFetchError_ release]; + + [settings_ release]; + [settingsFetchError_ release]; + + [editEventTicket_ release]; + + [super dealloc]; +} + +#pragma mark - + +- (NSString *)signedInUsername { + // Get the email address of the signed-in user + GTMOAuth2Authentication *auth = self.calendarService.authorizer; + BOOL isSignedIn = auth.canAuthorize; + if (isSignedIn) { + return auth.userEmail; + } else { + return nil; + } +} + +- (BOOL)isSignedIn { + NSString *name = [self signedInUsername]; + return (name != nil); +} + +#pragma mark IBActions + +- (IBAction)signInClicked:(id)sender { + if (![self isSignedIn]) { + // Sign in + [self runSigninThenInvokeSelector:@selector(updateUI)]; + } else { + // Sign out + GTLServiceCalendar *service = self.calendarService; + + [GTMOAuth2WindowController removeAuthFromKeychainForName:kKeychainItemName]; + service.authorizer = nil; + [self updateUI]; + } +} + +- (IBAction)getCalendarList:(id)sender { + if (![self isSignedIn]) { + [self runSigninThenInvokeSelector:@selector(fetchCalendarList)]; + } else { + [self fetchCalendarList]; + } +} + +- (IBAction)cancelCalendarFetch:(id)sender { + [self.calendarListTicket cancelTicket]; + self.calendarListTicket = nil; + + [self.editCalendarListTicket cancelTicket]; + self.editCalendarListTicket = nil; + + [self updateUI]; +} + +- (IBAction)cancelEventsFetch:(id)sender { + [self.eventsTicket cancelTicket]; + self.eventsTicket = nil; + + [self.editEventTicket cancelTicket]; + self.editEventTicket = nil; + + [self updateUI]; +} + +- (IBAction)entrySegmentClicked:(id)sender { + [self updateUI]; +} + +- (IBAction)addCalendar:(id)sender { + [self addACalendar]; +} + +- (IBAction)renameCalendar:(id)sender { + [self renameSelectedCalendar]; +} + +- (IBAction)deleteCalendar:(id)sender { + GTLCalendarCalendarListEntry *calendar = [self selectedCalendarListEntry]; + NSString *title = calendar.summary; + + NSBeginAlertSheet(@"Delete", nil, @"Cancel", nil, + [self window], self, + @selector(deleteCalendarSheetDidEnd:returnCode:contextInfo:), + nil, nil, @"Delete \"%@\"?", title); +} + +- (void)deleteCalendarSheetDidEnd:(NSWindow *)sheet + returnCode:(int)returnCode + contextInfo:(void *)contextInfo { + if (returnCode == NSAlertDefaultReturn) { + [self deleteSelectedCalendar]; + } +} + +- (IBAction)addEntry:(id)sender { + NSInteger segment = [entrySegmentedControl_ selectedSegment]; + if (segment == kEventsSegment) { + [self addAnEvent]; + } else { + [self addAnACLRule]; + } +} + +- (IBAction)editEntry:(id)sender { + NSInteger segment = [entrySegmentedControl_ selectedSegment]; + if (segment == kEventsSegment) { + [self editSelectedEvent]; + } else { + [self editSelectedACLRule]; + } +} + +- (IBAction)deleteEntries:(id)sender { + NSInteger segment = [entrySegmentedControl_ selectedSegment]; + if (segment == kEventsSegment) { + [self deleteSelectedEvent]; + } else { + [self deleteSelectedACLRule]; + } +} + +- (IBAction)queryTodayClicked:(id)sender { + [self queryTodaysEvents]; +} + +- (IBAction)queryFreeBusyClicked:(id)sender { + [self queryFreeBusy]; +} + +- (IBAction)APIConsoleClicked:(id)sender { + NSURL *url = [NSURL URLWithString:@"https://code.google.com/apis/console"]; + [[NSWorkspace sharedWorkspace] openURL:url]; +} + +- (IBAction)loggingCheckboxClicked:(id)sender { + [GTMHTTPFetcher setLoggingEnabled:[sender state]]; +} + +#pragma mark - + +// Get a service object with the current username/password +// +// A "service" object handles networking tasks. Service objects +// contain user authentication information as well as networking +// state information (such as cookies and the "last modified" date for +// fetched data.) + +- (GTLServiceCalendar *)calendarService { + static GTLServiceCalendar *service = nil; + + if (!service) { + service = [[GTLServiceCalendar alloc] init]; + + // Have the service object set tickets to fetch consecutive pages + // of the feed so we do not need to manually fetch them + service.shouldFetchNextPages = YES; + + // Have the service object set tickets to retry temporary error conditions + // automatically + service.retryEnabled = YES; + } + return service; +} + +- (GTLCalendarCalendarListEntry *)selectedCalendarListEntry { + int rowIndex = [calendarTable_ selectedRow]; + if (rowIndex > -1) { + GTLCalendarCalendarListEntry *item = [self.calendarList itemAtIndex:rowIndex]; + return item; + } + return nil; +} + +- (GTLCalendarEvent *)selectedEvent { + if ([entrySegmentedControl_ selectedSegment] == kEventsSegment) { + int rowIndex = [eventTable_ selectedRow]; + if (rowIndex > -1) { + GTLCalendarEvent *item = [self.events itemAtIndex:rowIndex]; + return item; + } + } + return nil; +} + +- (GTLCalendarAclRule *)selectedACLRule { + if ([entrySegmentedControl_ selectedSegment] == kAccessControlSegment) { + int rowIndex = [eventTable_ selectedRow]; + if (rowIndex > -1) { + GTLCalendarAclRule *item = [self.ACLs itemAtIndex:rowIndex]; + return item; + } + } + return nil; +} + +- (GTLCalendarSetting *)selectedSetting { + if ([entrySegmentedControl_ selectedSegment] == kSettingsSegment) { + int rowIndex = [eventTable_ selectedRow]; + if (rowIndex > -1) { + GTLCalendarSetting *item = [self.settings itemAtIndex:rowIndex]; + return item; + } + } + return nil; +} + +#pragma mark Fetch Calendar List + +- (void)fetchCalendarList { + self.calendarList = nil; + self.calendarListFetchError = nil; + + GTLServiceCalendar *service = self.calendarService; + + + GTLQueryCalendar *query = [GTLQueryCalendar queryForCalendarListList]; + + BOOL shouldFetchedOwned = ([calendarSegmentedControl_ selectedSegment] == 1); + if (shouldFetchedOwned) { + query.minAccessRole = kGTLCalendarMinAccessRoleOwner; + } + + self.calendarListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id calendarList, NSError *error) { + // Callback + self.calendarList = calendarList; + self.calendarListFetchError = error; + self.calendarListTicket = nil; + + [self updateUI]; + }]; + [self updateUI]; +} + +#pragma mark Fetch Selected Calendar + +- (void)fetchSelectedCalendar { + self.events = nil; + self.eventsFetchError = nil; + + self.ACLs = nil; + self.ACLsFetchError = nil; + + self.settings = nil; + self.settingsFetchError = nil; + + GTLServiceCalendar *service = self.calendarService; + + GTLCalendarCalendarListEntry *selectedCalendar = [self selectedCalendarListEntry]; + if (selectedCalendar) { + NSString *calendarID = selectedCalendar.identifier; + + // We will fetch the events for this calendar, the ACLs for this calendar, + // and the user's settings, together in a single batch. + GTLBatchQuery *batch = [GTLBatchQuery batchQuery]; + + GTLQueryCalendar *eventsQuery = [GTLQueryCalendar queryForEventsListWithCalendarId:calendarID]; + eventsQuery.completionBlock = ^(GTLServiceTicket *ticket, id object, NSError *error) { + self.events = object; + self.eventsFetchError = error; + }; + [batch addQuery:eventsQuery]; + + GTLQueryCalendar *aclQuery = [GTLQueryCalendar queryForAclListWithCalendarId:calendarID]; + aclQuery.completionBlock = ^(GTLServiceTicket *ticket, id object, NSError *error) { + self.ACLs = object; + self.ACLsFetchError = error; + }; + [batch addQuery:aclQuery]; + + GTLQueryCalendar *settingsQuery = [GTLQueryCalendar queryForSettingsList]; + settingsQuery.completionBlock = ^(GTLServiceTicket *ticket, id object, NSError *error) { + self.settings = object; + self.settingsFetchError = error; + }; + [batch addQuery:settingsQuery]; + + self.eventsTicket = [service executeQuery:batch + completionHandler:^(GTLServiceTicket *ticket, + id object, NSError *error) { + // Callback + // + // For batch queries with successful execution, + // the result is a GTLBatchResult object + // + // At this point, the query completion blocks + // have already been called + self.eventsTicket = nil; + + [self updateUI]; + }]; + [self updateUI]; + } +} + +#pragma mark Add, Rename, and Delete a Calendar + +- (void)addACalendar { + NSString *newCalendarName = [calendarNameField_ stringValue]; + + GTLServiceCalendar *service = self.calendarService; + + GTLCalendarCalendar *newEntry = [GTLCalendarCalendar object]; + newEntry.summary = newCalendarName; + newEntry.timeZone = [[NSTimeZone localTimeZone] name]; + + GTLQueryCalendar *query = [GTLQueryCalendar queryForCalendarsInsertWithObject:newEntry]; + self.editCalendarListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) { + // Callback + self.editCalendarListTicket = nil; + if (error == nil) { + [calendarNameField_ setStringValue:@""]; + [self fetchCalendarList]; + } else { + [self displayAlert:@"Add failed" + format:@"Calendar add failed: %@", error]; + } + [self updateUI]; + }]; + [self updateUI]; +} + +- (void)renameSelectedCalendar { + GTLCalendarCalendarListEntry *selectedCalendarListEntry = [self selectedCalendarListEntry]; + if (selectedCalendarListEntry) { + GTLServiceCalendar *service = self.calendarService; + + NSString *newCalendarName = [calendarNameField_ stringValue]; + + // Modify a copy of the selected calendar, not the existing one in memory + GTLCalendarCalendar *patchObject = [GTLCalendarCalendar object]; + patchObject.summary = newCalendarName; + + NSString *calendarID = selectedCalendarListEntry.identifier; + GTLQueryCalendar *query = [GTLQueryCalendar queryForCalendarsPatchWithObject:patchObject + calendarId:calendarID]; + self.editCalendarListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) { + // Callback + self.editCalendarListTicket = nil; + if (error == nil) { + GTLCalendarCalendar *calendar = object; + + [self displayAlert:@"Renamed" + format:@"Renamed calendar \"%@\" as \"%@\"", + selectedCalendarListEntry.summary, + calendar.summary]; + + [calendarNameField_ setStringValue:@""]; + + [self fetchCalendarList]; + } else { + [self displayAlert:@"Update failed" + format:@"Calendar update failed: %@", error]; + } + [self updateUI]; + }]; + [self updateUI]; + } +} + +- (void)deleteSelectedCalendar { + GTLCalendarCalendarListEntry *selectedCalendarListEntry = [self selectedCalendarListEntry]; + if (selectedCalendarListEntry) { + GTLServiceCalendar *service = self.calendarService; + + NSString *calendarID = selectedCalendarListEntry.identifier; + GTLQueryCalendar *query = [GTLQueryCalendar queryForCalendarsDeleteWithCalendarId:calendarID]; + + self.editCalendarListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) { + // Callback + self.editCalendarListTicket = nil; + if (error == nil) { + [self displayAlert:@"Deleted" + format:@"Deleted \"%@\"", + selectedCalendarListEntry.summary]; + [self fetchCalendarList]; + [self updateUI]; + } else { + [self displayAlert:@"Delete failed" + format:@"Delete failed: %@", error]; + } + }]; + } +} + +#pragma mark Add, Edit, and Delete an Event + +- (void)addAnEvent { + // Make a new event, and show it to the user to edit + GTLCalendarEvent *newEvent = [GTLCalendarEvent object]; + newEvent.summary = @"Sample Added Event"; + newEvent.descriptionProperty = @"Description of sample added event"; + + // We'll set the start time to now, and the end time to an hour from now, + // with a reminder 10 minutes before + NSDate *anHourFromNow = [NSDate dateWithTimeIntervalSinceNow:60*60]; + GTLDateTime *startDateTime = [GTLDateTime dateTimeWithDate:[NSDate date] + timeZone:[NSTimeZone systemTimeZone]]; + GTLDateTime *endDateTime = [GTLDateTime dateTimeWithDate:anHourFromNow + timeZone:[NSTimeZone systemTimeZone]]; + + newEvent.start = [GTLCalendarEventDateTime object]; + newEvent.start.dateTime = startDateTime; + + newEvent.end = [GTLCalendarEventDateTime object]; + newEvent.end.dateTime = endDateTime; + + GTLCalendarEventReminder *reminder = [GTLCalendarEventReminder object]; + reminder.minutes = [NSNumber numberWithInteger:10]; + reminder.method = @"email"; + + newEvent.reminders = [GTLCalendarEventReminders object]; + newEvent.reminders.overrides = [NSArray arrayWithObject:reminder]; + newEvent.reminders.useDefault = [NSNumber numberWithBool:NO]; + + // Display the event edit dialog + EditEventWindowController *controller = [[[EditEventWindowController alloc] init] autorelease]; + [controller runModalForWindow:[self window] + event:newEvent + completionHandler:^(NSInteger returnCode, GTLCalendarEvent *event) { + // Callback + if (returnCode == NSOKButton) { + [self addEvent:event]; + } + }]; +} + +- (void)addEvent:(GTLCalendarEvent *)event { + GTLServiceCalendar *service = self.calendarService; + GTLCalendarCalendarListEntry *selectedCalendar = [self selectedCalendarListEntry]; + NSString *calendarID = selectedCalendar.identifier; + + GTLQueryCalendar *query = [GTLQueryCalendar queryForEventsInsertWithObject:event + calendarId:calendarID]; + self.editEventTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) { + // Callback + self.editEventTicket = nil; + if (error == nil) { + GTLCalendarEvent *event = object; + [self displayAlert:@"Event Added" + format:@"Added event \"%@\"", + event.summary]; + [self fetchSelectedCalendar]; + } else { + [self displayAlert:@"Add failed" + format:@"Event add failed: %@", error]; + } + [self updateUI]; + }]; + [self updateUI]; +} + +- (void)editSelectedEvent { + // Show the selected event to the user to edit + GTLCalendarEvent *eventToEdit = [self selectedEvent]; + if (eventToEdit) { + EditEventWindowController *controller = [[[EditEventWindowController alloc] init] autorelease]; + [controller runModalForWindow:[self window] + event:eventToEdit + completionHandler:^(NSInteger returnCode, GTLCalendarEvent *event) { + // Callback + if (returnCode == NSOKButton) { + [self editSelectedEventWithEvent:event]; + } + }]; + } +} + +- (void)editSelectedEventWithEvent:(GTLCalendarEvent *)revisedEvent { + GTLServiceCalendar *service = self.calendarService; + GTLCalendarCalendarListEntry *selectedCalendarListEntry = [self selectedCalendarListEntry]; + + GTLCalendarEvent *originalEvent = [self selectedEvent]; + GTLCalendarEvent *patchEvent = [revisedEvent patchObjectFromOriginal:originalEvent]; + if (patchEvent) { + NSString *calendarID = selectedCalendarListEntry.identifier; + NSString *eventID = originalEvent.identifier; + GTLQueryCalendar *query = [GTLQueryCalendar queryForEventsPatchWithObject:patchEvent + calendarId:calendarID + eventId:eventID]; + self.editEventTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) { + // Callback + self.editEventTicket = nil; + if (error == nil) { + GTLCalendarEvent *event = object; + [self displayAlert:@"Event Updated" + format:@"Patched event \"%@\"", + event.summary]; + [self fetchSelectedCalendar]; + } else { + [self displayAlert:@"Update failed" + format:@"Event patch failed: %@", error]; + } + [self updateUI]; + }]; + [self updateUI]; + } +} + +- (void)deleteSelectedEvent { + GTLServiceCalendar *service = self.calendarService; + + GTLCalendarCalendarListEntry *selectedCalendarListEntry = [self selectedCalendarListEntry]; + NSString *calendarID = selectedCalendarListEntry.identifier; + + GTLCalendarEvent *selectedEvent = [self selectedEvent]; + NSString *eventID = selectedEvent.identifier; + + if (calendarID && eventID) { + GTLQueryCalendar *query = [GTLQueryCalendar queryForEventsDeleteWithCalendarId:calendarID + eventId:eventID]; + self.editEventTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id nilObject, NSError *error) { + // Callback + self.editEventTicket = nil; + if (error == nil) { + [self displayAlert:@"Event deleted" + format:@"Deleted \"%@\"", + selectedEvent.summary]; + [self fetchSelectedCalendar]; + } else { + [self displayAlert:@"Delete failed" + format:@"Event delete failed: %@", error]; + } + [self updateUI]; + }]; + [self updateUI]; + } +} + +#pragma mark Query Events + +// Utility routine to make a GTLDateTime object for sometime today +- (GTLDateTime *)dateTimeForTodayAtHour:(int)hour + minute:(int)minute + second:(int)second { + + int const kComponentBits = (NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit + | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit); + + NSCalendar *cal = [[[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar] autorelease]; + + NSDateComponents *dateComponents = [cal components:kComponentBits + fromDate:[NSDate date]]; + [dateComponents setHour:hour]; + [dateComponents setMinute:minute]; + [dateComponents setSecond:second]; + [dateComponents setTimeZone:[NSTimeZone localTimeZone]]; + + GTLDateTime *dateTime = [GTLDateTime dateTimeWithDateComponents:dateComponents]; + return dateTime; +} + +- (void)queryTodaysEvents { + GTLCalendarCalendarListEntry *selectedCalendar = [self selectedCalendarListEntry]; + if (selectedCalendar) { + NSString *calendarID = selectedCalendar.identifier; + + GTLDateTime *startOfDay = [self dateTimeForTodayAtHour:0 minute:0 second:0]; + GTLDateTime *endOfDay = [self dateTimeForTodayAtHour:23 minute:59 second:59]; + + GTLQueryCalendar *query = [GTLQueryCalendar queryForEventsListWithCalendarId:calendarID]; + query.maxResults = 10; + query.timeMin = startOfDay; + query.timeMax = endOfDay; + + GTLServiceCalendar *service = self.calendarService; + GTLServiceTicket *ticket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) { + // Callback + if (error == nil) { + // Make a comma-separated list of event titles + GTLCalendarEvents *events = object; + + NSArray *titles = [events.items valueForKey:@"summary"]; + NSString *joined = [titles componentsJoinedByString:@", "]; + [self displayAlert:@"Today's Events" + format:@"Query result: %@", joined]; + } else { + [self displayAlert:@"Query failed" + format:@"%@", error]; + } + [self updateUI]; + }]; + + // The service is set to fetch all pages, but for querying today's events, + // we only want the first 10 results + ticket.shouldFetchNextPages = NO; + } +} + +- (void)queryFreeBusy { + GTLCalendarCalendarListEntry *selectedCalendar = [self selectedCalendarListEntry]; + if (selectedCalendar) { + NSString *calendarID = selectedCalendar.identifier; + + GTLDateTime *startOfDay = [self dateTimeForTodayAtHour:0 minute:0 second:0]; + GTLDateTime *endOfDay = [self dateTimeForTodayAtHour:23 minute:59 second:59]; + + GTLCalendarFreeBusyRequestItem *requestItem = [GTLCalendarFreeBusyRequestItem object]; + requestItem.identifier = calendarID; + + GTLQueryCalendar *query = [GTLQueryCalendar queryForFreebusyQuery]; + query.items = [NSArray arrayWithObject:requestItem]; + query.maxResults = 10; + query.timeMin = startOfDay; + query.timeMax = endOfDay; + + GTLServiceCalendar *service = self.calendarService; + GTLServiceTicket *ticket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) { + // Callback + if (error == nil) { + // Display a list of busy periods for the calendar account + NSMutableString *displayStr = [NSMutableString string]; + + GTLCalendarFreeBusyResponse *response = object; + GTLCalendarFreeBusyResponseCalendars *responseCals = response.calendars; + NSDictionary *props = responseCals.additionalProperties; + + // Step through the free-busy calendar IDs, and display each calendar + // name (the summary field) and free/busy times + for (NSString *calendarID in props) { + GTLCalendarCalendarListEntry *calendar; + calendar = [GTLUtilities firstObjectFromArray:self.calendarList.items + withValue:calendarID + forKeyPath:@"identifier"]; + [displayStr appendFormat:@"%@: ", calendar.summary]; + + GTLCalendarFreeBusyCalendar *calResponse = [props objectForKey:calendarID]; + NSArray *busyArray = calResponse.busy; + for (GTLCalendarTimePeriod *period in busyArray) { + GTLDateTime *startTime = period.start; + GTLDateTime *endTime = period.end; + NSString *startStr = [NSDateFormatter localizedStringFromDate:startTime.date + dateStyle:NSDateFormatterNoStyle + timeStyle:NSDateFormatterShortStyle]; + NSString *endStr = [NSDateFormatter localizedStringFromDate:endTime.date + dateStyle:NSDateFormatterNoStyle + timeStyle:NSDateFormatterShortStyle]; + [displayStr appendFormat:@"(%@-%@) ", startStr, endStr]; + } + } + + [self displayAlert:@"Today's Busy Periods" + format:@"%@", displayStr]; + } else { + [self displayAlert:@"Query failed" + format:@"%@", error]; + } + [self updateUI]; + }]; + + // The service is set to fetch all pages, but for querying today's busy + // periods, we only want the first 10 results + ticket.shouldFetchNextPages = NO; + } +} + +#pragma mark Add, Edit, and Delete an ACL Rule + +- (void)addAnACLRule { + // Make a new ACL rule + GTLCalendarAclRuleScope *scope = [GTLCalendarAclRuleScope object]; + scope.type = @"user"; + scope.value = @"mark.twain@example.com"; + + GTLCalendarAclRule *newRule = [GTLCalendarAclRule object]; + newRule.role = @"reader"; + newRule.scope = scope; + + // Display the ACL edit dialog + EditACLWindowController *controller = [[[EditACLWindowController alloc] init] autorelease]; + [controller runModalForWindow:[self window] + ACLRule:newRule + completionHandler:^(NSInteger returnCode, GTLCalendarAclRule *rule) { + // Callback + if (returnCode == NSOKButton) { + [self addACLRule:rule]; + } + }]; +} + +- (void)addACLRule:(GTLCalendarAclRule *)aclRule { + GTLServiceCalendar *service = self.calendarService; + GTLCalendarCalendarListEntry *selectedCalendar = [self selectedCalendarListEntry]; + NSString *calendarID = selectedCalendar.identifier; + + GTLQueryCalendar *query = [GTLQueryCalendar queryForAclInsertWithObject:aclRule + calendarId:calendarID]; + self.editEventTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) { + // Callback + self.editEventTicket = nil; + if (error == nil) { + GTLCalendarAclRule *rule = object; + [self displayAlert:@"Added" + format:@"Added ACL rule: %@", + [self displayStringForACLRule:rule]]; + [self fetchSelectedCalendar]; + } else { + [self displayAlert:@"Add failed" + format:@"ACL rule add failed: %@", error]; + } + [self updateUI]; + }]; + [self updateUI]; +} + +- (void)editSelectedACLRule { + // Show the selected rule to the user to edit + GTLCalendarAclRule *ruleToEdit = [self selectedACLRule]; + if (ruleToEdit) { + EditACLWindowController *controller = [[[EditACLWindowController alloc] init] autorelease]; + [controller runModalForWindow:[self window] + ACLRule:ruleToEdit + completionHandler:^(NSInteger returnCode, GTLCalendarAclRule *rule) { + // Callback + if (returnCode == NSOKButton) { + [self editSelectedACLRuleWithRule:rule]; + } + }]; + } +} + +- (void)editSelectedACLRuleWithRule:(GTLCalendarAclRule *)revisedRule { + GTLServiceCalendar *service = self.calendarService; + GTLCalendarCalendarListEntry *selectedCalendarListEntry = [self selectedCalendarListEntry]; + + // We create an object reflecting just the changes from the original rule + // needing to be patched + GTLCalendarAclRule *originalRule = [self selectedACLRule]; + GTLCalendarAclRule *patchRule = [revisedRule patchObjectFromOriginal:originalRule]; + if (patchRule) { + // If patchRule is non-nil, there are some fields to be changed + NSString *calendarID = selectedCalendarListEntry.identifier; + NSString *ruleID = originalRule.identifier; + GTLQueryCalendar *query = [GTLQueryCalendar queryForAclPatchWithObject:patchRule + calendarId:calendarID + ruleId:ruleID]; + self.editEventTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) { + // Callback + self.editEventTicket = nil; + if (error == nil) { + GTLCalendarAclRule *rule = object; + [self displayAlert:@"Rule Updated" + format:@"Patched rule \"%@\"", + [self displayStringForACLRule:rule]]; + [self fetchSelectedCalendar]; + } else { + [self displayAlert:@"Update Failed" + format:@"Rule patch failed: %@", error]; + } + [self updateUI]; + }]; + [self updateUI]; + } +} + +- (void)deleteSelectedACLRule { + GTLServiceCalendar *service = self.calendarService; + + GTLCalendarCalendarListEntry *selectedCalendarListEntry = [self selectedCalendarListEntry]; + NSString *calendarID = selectedCalendarListEntry.identifier; + + GTLCalendarAclRule *selectedACLRule = [self selectedACLRule]; + NSString *ruleID = selectedACLRule.identifier; + + if (calendarID && ruleID) { + GTLQueryCalendar *query = [GTLQueryCalendar queryForAclDeleteWithCalendarId:calendarID + ruleId:ruleID]; + self.editEventTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id nilObject, NSError *error) { + // Callback + self.editEventTicket = nil; + if (error == nil) { + [self displayAlert:@"ACL Rule Deleted" + format:@"Deleted \"%@\"", + [self displayStringForACLRule:selectedACLRule]]; + [self fetchSelectedCalendar]; + } else { + [self displayAlert:@"Delete Failed" + format:@"Rule delete failed: %@", error]; + } + [self updateUI]; + }]; + [self updateUI]; + } +} + +#pragma mark Sign In + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel { + // Applications should have client ID and client secret strings + // hardcoded into the source, but the sample application asks the + // developer for the strings + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + if ([clientID length] == 0 || [clientSecret length] == 0) { + // Remind the developer that client ID and client secret are needed + [clientIDButton_ performSelector:@selector(performClick:) + withObject:self + afterDelay:0.5]; + return; + } + + // Show the OAuth 2 sign-in controller + NSBundle *frameworkBundle = [NSBundle bundleForClass:[GTMOAuth2WindowController class]]; + GTMOAuth2WindowController *windowController; + windowController = [GTMOAuth2WindowController controllerWithScope:kGTLAuthScopeCalendar + clientID:clientID + clientSecret:clientSecret + keychainItemName:kKeychainItemName + resourceBundle:frameworkBundle]; + + [windowController signInSheetModalForWindow:[self window] + completionHandler:^(GTMOAuth2Authentication *auth, + NSError *error) { + // Callback + if (error == nil) { + self.calendarService.authorizer = auth; + if (signInDoneSel) { + [self performSelector:signInDoneSel]; + } + } else { + self.calendarListFetchError = error; + [self updateUI]; + } + }]; +} + +#pragma mark UI + +- (NSString *)displayStringForACLRule:(GTLCalendarAclRule *)rule { + // Make a concise, readable string showing the scope type, scope value, + // and role value for an ACL entry, like: + // + // scope: user "fred@flintstone.com" role:owner + + NSMutableString *resultStr = [NSMutableString string]; + + GTLCalendarAclRuleScope *scope = rule.scope; + if (scope) { + NSString *type = (scope.type ? scope.type : @""); + NSString *value = @""; + if (scope.value) { + value = [NSString stringWithFormat:@"\"%@\"", scope.value]; + } + [resultStr appendFormat:@"scope: %@ %@ ", type, value]; + } + + NSString *role = rule.role; + if (role) { + [resultStr appendFormat:@"role: %@", role]; + } + return resultStr; +} + +- (void)updateUI { + BOOL isSignedIn = [self isSignedIn]; + NSString *username = [self signedInUsername]; + [signedInButton_ setTitle:(isSignedIn ? @"Sign Out" : @"Sign In")]; + [signedInField_ setStringValue:(isSignedIn ? username : @"No")]; + + // + // CalendarList table + // + [calendarTable_ reloadData]; + + if (self.calendarListTicket != nil || self.editCalendarListTicket != nil) { + [calendarProgressIndicator_ startAnimation:self]; + } else { + [calendarProgressIndicator_ stopAnimation:self]; + } + + // Get the description of the selected item, or the feed fetch error + NSString *resultStr = @""; + + if (self.calendarListFetchError) { + // Display the error + resultStr = [self.calendarListFetchError description]; + + // Also display any server data present + NSData *errData = [[self.calendarListFetchError userInfo] objectForKey:kGTMHTTPFetcherStatusDataKey]; + if (errData) { + NSString *dataStr = [[[NSString alloc] initWithData:errData + encoding:NSUTF8StringEncoding] autorelease]; + resultStr = [resultStr stringByAppendingFormat:@"\n%@", dataStr]; + } + } else { + // Display the selected item + GTLCalendarCalendarListEntry *item = [self selectedCalendarListEntry]; + if (item) { + resultStr = [item description]; + } + } + [calendarResultTextField_ setString:resultStr]; + + // + // Events list + // + [eventTable_ reloadData]; + + if (self.eventsTicket != nil || self.editEventTicket != nil) { + [eventProgressIndicator_ startAnimation:self]; + } else { + [eventProgressIndicator_ stopAnimation:self]; + } + + // Get the description of the selected item, or the feed fetch error + resultStr = @""; + switch ([entrySegmentedControl_ selectedSegment]) { + case kEventsSegment: + if (self.eventsFetchError) { + resultStr = [self.eventsFetchError description]; + } else { + GTLCalendarEvent *item = [self selectedEvent]; + if (item) { + resultStr = [item description]; + } + } + break; + case kAccessControlSegment: + if (self.ACLsFetchError) { + resultStr = [self.ACLsFetchError description]; + } else { + GTLCalendarAclRule *item = [self selectedACLRule]; + if (item) { + resultStr = [item description]; + } + } + break; + case kSettingsSegment: + if (self.settingsFetchError) { + resultStr = [self.settingsFetchError description]; + } else { + GTLCalendarSetting *item = [self selectedSetting]; + if (item) { + resultStr = [item description]; + } + } + break; + default: break; + } + + [eventResultTextField_ setString:resultStr]; + + // Enable buttons + BOOL isFetchingCalendars = (self.calendarListTicket != nil); + BOOL isEditingCalendar = (self.editCalendarListTicket != nil); + [calendarCancelButton_ setEnabled:(isFetchingCalendars || isEditingCalendar)]; + + BOOL isFetchingEvents = (self.eventsTicket != nil); + BOOL isEditingEvent = (self.editEventTicket != nil); + [eventCancelButton_ setEnabled:(isFetchingEvents || isEditingEvent)]; + + BOOL isCalendarSelected = ([self selectedCalendarListEntry] != nil); + BOOL hasNewName = ([[calendarNameField_ stringValue] length] > 0); + [addCalendarButton_ setEnabled:(isSignedIn && hasNewName)]; + [renameCalendarButton_ setEnabled:(isSignedIn && isCalendarSelected && hasNewName)]; + [deleteCalendarButton_ setEnabled:(isSignedIn && isCalendarSelected)]; + + NSInteger segment = [entrySegmentedControl_ selectedSegment]; + BOOL isEventsSegmentSelected = (segment == kEventsSegment); + BOOL isACLsSegmentSelected = (segment == kAccessControlSegment); + + if (isEventsSegmentSelected) { + // Events + BOOL isEventSelected = ([self selectedEvent] != nil); + + [addEntryButton_ setEnabled:isCalendarSelected]; + [editEntryButton_ setEnabled:isEventSelected]; + [deleteEntriesButton_ setEnabled:isEventSelected]; + } else if (isACLsSegmentSelected) { + // ACLs + BOOL isACLSelected = ([self selectedACLRule] != nil); + + [addEntryButton_ setEnabled:isCalendarSelected]; + [editEntryButton_ setEnabled:isACLSelected]; + [deleteEntriesButton_ setEnabled:isACLSelected]; + } else { + // Settings + [addEntryButton_ setEnabled:NO]; + [editEntryButton_ setEnabled:NO]; + [deleteEntriesButton_ setEnabled:NO]; + } + + [queryTodaysEventsButton_ setEnabled:isCalendarSelected]; + [queryFreeBusyButton_ setEnabled:isCalendarSelected]; + + // Show or hide the text indicating that the client ID or client secret are + // needed + BOOL hasClientIDStrings = [[clientIDField_ stringValue] length] > 0 + && [[clientSecretField_ stringValue] length] > 0; + [clientIDRequiredTextField_ setHidden:hasClientIDStrings]; +} + +- (void)displayAlert:(NSString *)title format:(NSString *)format, ... { + NSString *result = format; + if (format) { + va_list argList; + va_start(argList, format); + result = [[[NSString alloc] initWithFormat:format + arguments:argList] autorelease]; + va_end(argList); + } + NSBeginAlertSheet(title, nil, nil, nil, [self window], nil, nil, + nil, nil, @"%@", result); +} + +#pragma mark Client ID Sheet + +// Client ID and Client Secret Sheet +// +// Sample apps need this sheet to ask for the client ID and client secret +// strings +// +// Your application will just hardcode the client ID and client secret strings +// into the source rather than ask the user for them. +// +// The string values are obtained from the API Console, +// https://code.google.com/apis/console + +- (IBAction)clientIDClicked:(id)sender { + // Show the sheet for developers to enter their client ID and client secret + [NSApp beginSheet:clientIDSheet_ + modalForWindow:[self window] + modalDelegate:self + didEndSelector:@selector(clientIDSheetDidEnd:returnCode:contextInfo:) + contextInfo:NULL]; +} + +- (IBAction)clientIDDoneClicked:(id)sender { + [NSApp endSheet:clientIDSheet_ returnCode:NSOKButton]; +} + +- (void)clientIDSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { + [sheet orderOut:self]; + [self updateUI]; +} + +#pragma mark Text field delegate methods + +- (void)controlTextDidChange:(NSNotification *)note { + [self updateUI]; // enable and disable buttons +} + +#pragma mark TableView delegate and data source methods + +- (void)tableViewSelectionDidChange:(NSNotification *)notification { + if ([notification object] == calendarTable_) { + // The calendar list selection changed + [self fetchSelectedCalendar]; + } else { + // The event list selection changed + [self updateUI]; + } +} + +// Table view data source methods +- (int)numberOfRowsInTableView:(NSTableView *)tableView { + if (tableView == calendarTable_) { + return [self.calendarList.items count]; + } else { + switch ([entrySegmentedControl_ selectedSegment]) { + case kEventsSegment: return [self.events.items count]; + case kAccessControlSegment: return [self.ACLs.items count]; + case kSettingsSegment: return [self.settings.items count]; + default: return 0; + } + } +} + +- (id)tableView:(NSTableView *)tableView +objectValueForTableColumn:(NSTableColumn *)tableColumn + row:(int)row { + if (tableView == calendarTable_) { + // Calendar table + GTLCalendarCalendar *calendar = [self.calendarList itemAtIndex:row]; + NSString *str = calendar.summary; + return str; + } else { + // Events/ACLs/Settings table + switch ([entrySegmentedControl_ selectedSegment]) { + case kEventsSegment: { + GTLCalendarEvent *event = [self.events itemAtIndex:row]; + NSString *str = event.summary; + return str; + } + case kAccessControlSegment: { + GTLCalendarAclRule *rule = [self.ACLs itemAtIndex:row]; + NSString *str = [self displayStringForACLRule:rule]; + return str; + } + case kSettingsSegment: { + GTLCalendarSetting *setting = [self.settings itemAtIndex:row]; + NSString *str = [NSString stringWithFormat:@"%@: %@", + setting.identifier, setting.value]; + return str; + } + default: + return nil; + } + } +} + +@end diff --git a/GTL/Examples/CalendarSample/.svn/text-base/EditACLWindowController.h.svn-base b/GTL/Examples/CalendarSample/.svn/text-base/EditACLWindowController.h.svn-base new file mode 100644 index 0000000..774c092 --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/text-base/EditACLWindowController.h.svn-base @@ -0,0 +1,41 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// EditACLWindowController.h +// + +#import + +#import "GTLCalendar.h" + +@interface EditACLWindowController : NSWindowController { + @private + IBOutlet NSComboBox *scopeTypeField_; + IBOutlet NSTextField *scopeValueField_; + IBOutlet NSComboBox *roleValueField_; + + void (^completionHandler_)(NSInteger returnCode, GTLCalendarAclRule *rule); + + GTLCalendarAclRule *rule_; +} + +- (void)runModalForWindow:(NSWindow *)window + ACLRule:(GTLCalendarAclRule *)rule + completionHandler:(void (^)(NSInteger returnCode, GTLCalendarAclRule *rule))handler; + +- (IBAction)saveButtonClicked:(id)sender; +- (IBAction)cancelButtonClicked:(id)sender; +@end diff --git a/GTL/Examples/CalendarSample/.svn/text-base/EditACLWindowController.m.svn-base b/GTL/Examples/CalendarSample/.svn/text-base/EditACLWindowController.m.svn-base new file mode 100644 index 0000000..cba1fc7 --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/text-base/EditACLWindowController.m.svn-base @@ -0,0 +1,118 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// EditACLWindowController.m +// + +#import "EditACLWindowController.h" + +@implementation EditACLWindowController + +- (id)init { + return [self initWithWindowNibName:@"EditACLWindow"]; +} + +- (void)awakeFromNib { + if (rule_) { + // Copy data from the ACL entry to our dialog's controls + NSString *scopeType = rule_.scope.type; + NSString *scopeValue = rule_.scope.value; + NSString *roleValue = rule_.role; + + if (scopeType) [scopeTypeField_ setStringValue:scopeType]; + if (scopeValue) [scopeValueField_ setStringValue:scopeValue]; + if (roleValue) [roleValueField_ setStringValue:roleValue]; + + // Add standard calendar roles to the combo box's menu + NSArray *items = [NSArray arrayWithObjects: + kGTLCalendarMinAccessRoleOwner, + kGTLCalendarMinAccessRoleWriter, + kGTLCalendarMinAccessRoleReader, + kGTLCalendarMinAccessRoleFreeBusyReader, + nil]; + [roleValueField_ addItemsWithObjectValues:items]; + } +} + +- (void)dealloc { + [rule_ release]; + [super dealloc]; +} + +- (GTLCalendarAclRule *)rule { + // Copy from our dialog's controls into a copy of the original object + NSString *scopeType = [scopeTypeField_ stringValue]; + NSString *scopeValue = [scopeValueField_ stringValue]; + NSString *roleValue = [roleValueField_ stringValue]; + + GTLCalendarAclRule *rule; + if (rule_) { + rule = [[rule_ copy] autorelease]; + } else { + rule = [GTLCalendarAclRule object]; + } + + rule.role = roleValue; + rule.scope.value = scopeValue; + rule.scope.type = scopeType; + + return rule; +} + +#pragma mark - + +- (void)runModalForWindow:(NSWindow *)window + ACLRule:(GTLCalendarAclRule *)rule + completionHandler:(void (^)(NSInteger returnCode, GTLCalendarAclRule *rule))handler { + completionHandler_ = [handler copy]; + rule_ = [rule retain]; + + [NSApp beginSheet:[self window] + modalForWindow:window + modalDelegate:self + didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) + contextInfo:nil]; + + [self retain]; +} + +- (void)sheetDidEnd:(NSWindow *)sheet + returnCode:(int)returnCode + contextInfo:(void *)contextInfo { +} + +- (void)closeDialogWithReturnCode:(NSInteger)returnCode { + // Call the handler to say we're done + if (completionHandler_) { + completionHandler_(returnCode, [self rule]); + + [completionHandler_ release]; + completionHandler_ = nil; + } + + [[self window] orderOut:self]; + [NSApp endSheet:[self window]]; +} + +- (IBAction)saveButtonClicked:(id)sender { + [self closeDialogWithReturnCode:NSOKButton]; +} + +- (IBAction)cancelButtonClicked:(id)sender { + [self closeDialogWithReturnCode:NSCancelButton]; +} + +@end diff --git a/GTL/Examples/CalendarSample/.svn/text-base/EditEventWindowController.h.svn-base b/GTL/Examples/CalendarSample/.svn/text-base/EditEventWindowController.h.svn-base new file mode 100644 index 0000000..a451e21 --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/text-base/EditEventWindowController.h.svn-base @@ -0,0 +1,46 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// EditEventWindowController.h +// + +#import + +#import "GTLCalendar.h" + +@interface EditEventWindowController : NSWindowController { + @private + IBOutlet NSTextField *titleField_; + IBOutlet NSTextField *descriptionField_; + IBOutlet NSMatrix *reminderMatrix_; + IBOutlet NSTextField *reminderMinutesField_; + IBOutlet NSPopUpButton *reminderMethodPopup_; + IBOutlet NSDatePicker *startDatePicker_; + IBOutlet NSDatePicker *endDatePicker_; + + void (^completionHandler_)(NSInteger returnCode, GTLCalendarEvent *event); + + GTLCalendarEvent *event_; +} + +- (void)runModalForWindow:(NSWindow *)window + event:(GTLCalendarEvent *)event + completionHandler:(void (^)(NSInteger returnCode, GTLCalendarEvent *event))handler; + +- (IBAction)saveButtonClicked:(id)sender; +- (IBAction)cancelButtonClicked:(id)sender; + +@end diff --git a/GTL/Examples/CalendarSample/.svn/text-base/EditEventWindowController.m.svn-base b/GTL/Examples/CalendarSample/.svn/text-base/EditEventWindowController.m.svn-base new file mode 100644 index 0000000..1d93e71 --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/text-base/EditEventWindowController.m.svn-base @@ -0,0 +1,159 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// EditEventWindowController.m +// + +#import "EditEventWindowController.h" + +@implementation EditEventWindowController + +- (id)init { + return [self initWithWindowNibName:@"EditEventWindow"]; +} + +- (void)awakeFromNib { + if (event_) { + // Copy data from the event to our dialog's controls + NSString *title = event_.summary; + NSString *desc = event_.descriptionProperty; + + GTLDateTime *startTime = event_.start.dateTime; + GTLDateTime *endTime = event_.end.dateTime; + + // Events may provide a list of reminders to override the calendar's + // default reminders + BOOL shouldUseDefaultReminders = [event_.reminders.useDefault boolValue]; + + NSString *reminderMinutesStr = @""; + NSString *reminderMethod = nil; + if (!shouldUseDefaultReminders) { + NSArray *reminders = event_.reminders.overrides; + if ([reminders count] > 0) { + GTLCalendarEventReminder *reminder = [reminders objectAtIndex:0]; + reminderMinutesStr = [reminder.minutes stringValue]; + reminderMethod = reminder.method; + } + } + + if (title) [titleField_ setStringValue:title]; + if (desc) [descriptionField_ setStringValue:desc]; + + if (startTime) { + [startDatePicker_ setDateValue:[startTime date]]; + [startDatePicker_ setTimeZone:[startTime timeZone]]; + } + if (endTime) { + [endDatePicker_ setDateValue:[endTime date]]; + [endDatePicker_ setTimeZone:[endTime timeZone]]; + } + + [reminderMatrix_ selectCellWithTag:(shouldUseDefaultReminders ? 0 : 1)]; + [reminderMinutesField_ setStringValue:reminderMinutesStr]; + [reminderMethodPopup_ selectItemWithTitle:reminderMethod]; + } +} + +- (void)dealloc { + [event_ release]; + [super dealloc]; +} + +#pragma mark - + +- (GTLCalendarEvent *)event { + // Copy from our dialog's controls into a copy of the original event + NSString *title = [titleField_ stringValue]; + NSString *desc = [descriptionField_ stringValue]; + NSString *reminderMinStr = [reminderMinutesField_ stringValue]; + NSString *reminderMethod = [[reminderMethodPopup_ selectedItem] title]; + BOOL shouldUseDefaultReminders = ([[reminderMatrix_ selectedCell] tag] == 0); + + GTLCalendarEvent *newEvent; + if (event_) { + newEvent = [[event_ copy] autorelease]; + } else { + newEvent = [GTLCalendarEvent object]; + } + + newEvent.summary = title; + newEvent.descriptionProperty = desc; + + // Times + // + // For all-day events, use the GTLDateTime method +dateTimeForAllDayWithDate: + GTLDateTime *startDateTime = [GTLDateTime dateTimeWithDate:[startDatePicker_ dateValue] + timeZone:[startDatePicker_ timeZone]]; + GTLDateTime *endDateTime = [GTLDateTime dateTimeWithDate:[endDatePicker_ dateValue] + timeZone:[endDatePicker_ timeZone]]; + newEvent.start.dateTime = startDateTime; + newEvent.end.dateTime = endDateTime; + + // Reminders + newEvent.reminders = [GTLCalendarEventReminders object]; + newEvent.reminders.useDefault = [NSNumber numberWithBool:shouldUseDefaultReminders]; + if (!shouldUseDefaultReminders) { + GTLCalendarEventReminder *reminder = [GTLCalendarEventReminder object]; + reminder.minutes = [NSNumber numberWithInt:[reminderMinStr intValue]]; + reminder.method = reminderMethod; + + newEvent.reminders.overrides = [NSArray arrayWithObject:reminder]; + } + return newEvent; +} + +- (void)runModalForWindow:(NSWindow *)window + event:(GTLCalendarEvent *)event + completionHandler:(void (^)(NSInteger returnCode, GTLCalendarEvent *event))handler { + completionHandler_ = [handler copy]; + event_ = [event retain]; + + [NSApp beginSheet:[self window] + modalForWindow:window + modalDelegate:self + didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) + contextInfo:nil]; + + [self retain]; +} + +- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo { + +} + +- (void)closeDialogWithReturnCode:(NSInteger)returnCode { + // Call the handler to say we're done + if (completionHandler_) { + completionHandler_(returnCode, [self event]); + + [completionHandler_ release]; + completionHandler_ = nil; + } + + [[self window] orderOut:self]; + [NSApp endSheet:[self window]]; + [self autorelease]; +} + +- (IBAction)saveButtonClicked:(id)sender { + [self closeDialogWithReturnCode:NSOKButton]; +} + +- (IBAction)cancelButtonClicked:(id)sender { + [self closeDialogWithReturnCode:NSCancelButton]; +} + +@end diff --git a/GTL/Examples/CalendarSample/.svn/text-base/Info.plist.svn-base b/GTL/Examples/CalendarSample/.svn/text-base/Info.plist.svn-base new file mode 100644 index 0000000..a0c5e41 --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/text-base/Info.plist.svn-base @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.example.CalendarSample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/GTL/Examples/CalendarSample/.svn/text-base/README.txt.svn-base b/GTL/Examples/CalendarSample/.svn/text-base/README.txt.svn-base new file mode 100644 index 0000000..ff257a0 --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/text-base/README.txt.svn-base @@ -0,0 +1 @@ +This sample should automatically build and copy over the GTL.framework as part of the build-and-run process. diff --git a/GTL/Examples/CalendarSample/.svn/text-base/buildStripHeaders.svn-base b/GTL/Examples/CalendarSample/.svn/text-base/buildStripHeaders.svn-base new file mode 100644 index 0000000..0238ef2 --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/text-base/buildStripHeaders.svn-base @@ -0,0 +1,17 @@ +#!/bin/sh +# +# buildStripHeaders +# +# Remove header files from the built copy of the framework inside our +# application. + +# Strip "*.h" files +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname '*.h' -delete + +# Strip "Headers" links +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type l -delete + +# Strip "Headers" directories +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type d -prune -delete + + diff --git a/GTL/Examples/CalendarSample/.svn/text-base/main.m.svn-base b/GTL/Examples/CalendarSample/.svn/text-base/main.m.svn-base new file mode 100644 index 0000000..a1649ce --- /dev/null +++ b/GTL/Examples/CalendarSample/.svn/text-base/main.m.svn-base @@ -0,0 +1,24 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// main.m +// + +#import + +int main(int argc, char *argv[]) { + return NSApplicationMain(argc, (const char **) argv); +} diff --git a/GTL/Examples/CalendarSample/CalendarSample.xcodeproj/.svn/all-wcprops b/GTL/Examples/CalendarSample/CalendarSample.xcodeproj/.svn/all-wcprops new file mode 100644 index 0000000..34f7d4f --- /dev/null +++ b/GTL/Examples/CalendarSample/CalendarSample.xcodeproj/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/154/trunk/Examples/CalendarSample/CalendarSample.xcodeproj +END +project.pbxproj +K 25 +svn:wc:ra_dav:version-url +V 88 +/svn/!svn/ver/154/trunk/Examples/CalendarSample/CalendarSample.xcodeproj/project.pbxproj +END diff --git a/GTL/Examples/CalendarSample/CalendarSample.xcodeproj/.svn/entries b/GTL/Examples/CalendarSample/CalendarSample.xcodeproj/.svn/entries new file mode 100644 index 0000000..d4dfc88 --- /dev/null +++ b/GTL/Examples/CalendarSample/CalendarSample.xcodeproj/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/CalendarSample/CalendarSample.xcodeproj +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +project.pbxproj +file + + + + +2012-12-09T08:42:34.000000Z +c40edd423a421530283c9a13cf3e5acf +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +40030 + diff --git a/GTL/Examples/CalendarSample/CalendarSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base b/GTL/Examples/CalendarSample/CalendarSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base new file mode 100644 index 0000000..88a858a --- /dev/null +++ b/GTL/Examples/CalendarSample/CalendarSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base @@ -0,0 +1,669 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4F16F58F13DF666100811114 /* CalendarSampleAppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F16F58C13DF666100811114 /* CalendarSampleAppController.m */; }; + 4F16F59013DF666100811114 /* CalendarSampleWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F16F58E13DF666100811114 /* CalendarSampleWindowController.m */; }; + 4F16F59513DF673000811114 /* CalendarSampleWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F16F59313DF673000811114 /* CalendarSampleWindow.xib */; }; + 4F16FBE113E0C39E00811114 /* EditACLWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F16FBDD13E0C39E00811114 /* EditACLWindow.xib */; }; + 4F16FBE213E0C39E00811114 /* EditEventWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F16FBDF13E0C39E00811114 /* EditEventWindow.xib */; }; + 4F16FBEA13E0C3A600811114 /* EditACLWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F16FBE913E0C3A600811114 /* EditACLWindowController.m */; }; + 4F16FCCC13E0D0EE00811114 /* EditEventWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F16FCCB13E0D0EE00811114 /* EditEventWindowController.m */; }; + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F22A2141186315400FFBAB6 /* WebKit.framework */; }; + 4F2445C8121F0D2900FEE1DA /* GTL.framework in Copy GTL Framework */ = {isa = PBXBuildFile; fileRef = 4F2445BE121F0CF600FEE1DA /* GTL.framework */; }; + 4F2445C9121F0D2C00FEE1DA /* GTL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F2445BE121F0CF600FEE1DA /* GTL.framework */; }; + 4F88E7E01464844D00DDB4D0 /* GTLCalendarAcl.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7B11464844D00DDB4D0 /* GTLCalendarAcl.m */; }; + 4F88E7E11464844D00DDB4D0 /* GTLCalendarAclRule.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7B31464844D00DDB4D0 /* GTLCalendarAclRule.m */; }; + 4F88E7E21464844D00DDB4D0 /* GTLCalendarCalendar.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7B51464844D00DDB4D0 /* GTLCalendarCalendar.m */; }; + 4F88E7E31464844D00DDB4D0 /* GTLCalendarCalendarList.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7B71464844D00DDB4D0 /* GTLCalendarCalendarList.m */; }; + 4F88E7E41464844D00DDB4D0 /* GTLCalendarCalendarListEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7B91464844D00DDB4D0 /* GTLCalendarCalendarListEntry.m */; }; + 4F88E7E51464844D00DDB4D0 /* GTLCalendarColorDefinition.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7BB1464844D00DDB4D0 /* GTLCalendarColorDefinition.m */; }; + 4F88E7E61464844D00DDB4D0 /* GTLCalendarColors.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7BD1464844D00DDB4D0 /* GTLCalendarColors.m */; }; + 4F88E7E71464844D00DDB4D0 /* GTLCalendarConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7BF1464844D00DDB4D0 /* GTLCalendarConstants.m */; }; + 4F88E7E81464844D00DDB4D0 /* GTLCalendarError.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7C11464844D00DDB4D0 /* GTLCalendarError.m */; }; + 4F88E7E91464844D00DDB4D0 /* GTLCalendarEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7C31464844D00DDB4D0 /* GTLCalendarEvent.m */; }; + 4F88E7EA1464844D00DDB4D0 /* GTLCalendarEventAttendee.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7C51464844D00DDB4D0 /* GTLCalendarEventAttendee.m */; }; + 4F88E7EB1464844D00DDB4D0 /* GTLCalendarEventDateTime.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7C71464844D00DDB4D0 /* GTLCalendarEventDateTime.m */; }; + 4F88E7EC1464844D00DDB4D0 /* GTLCalendarEventReminder.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7C91464844D00DDB4D0 /* GTLCalendarEventReminder.m */; }; + 4F88E7ED1464844D00DDB4D0 /* GTLCalendarEvents.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7CB1464844D00DDB4D0 /* GTLCalendarEvents.m */; }; + 4F88E7EE1464844D00DDB4D0 /* GTLCalendarFreeBusyCalendar.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7CD1464844D00DDB4D0 /* GTLCalendarFreeBusyCalendar.m */; }; + 4F88E7EF1464844D00DDB4D0 /* GTLCalendarFreeBusyGroup.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7CF1464844D00DDB4D0 /* GTLCalendarFreeBusyGroup.m */; }; + 4F88E7F01464844D00DDB4D0 /* GTLCalendarFreeBusyRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7D11464844D00DDB4D0 /* GTLCalendarFreeBusyRequest.m */; }; + 4F88E7F11464844D00DDB4D0 /* GTLCalendarFreeBusyRequestItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7D31464844D00DDB4D0 /* GTLCalendarFreeBusyRequestItem.m */; }; + 4F88E7F21464844D00DDB4D0 /* GTLCalendarFreeBusyResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7D51464844D00DDB4D0 /* GTLCalendarFreeBusyResponse.m */; }; + 4F88E7F31464844D00DDB4D0 /* GTLCalendarSetting.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7D71464844D00DDB4D0 /* GTLCalendarSetting.m */; }; + 4F88E7F41464844D00DDB4D0 /* GTLCalendarSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7D91464844D00DDB4D0 /* GTLCalendarSettings.m */; }; + 4F88E7F51464844D00DDB4D0 /* GTLCalendarTimePeriod.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7DB1464844D00DDB4D0 /* GTLCalendarTimePeriod.m */; }; + 4F88E7F61464844D00DDB4D0 /* GTLQueryCalendar.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7DD1464844D00DDB4D0 /* GTLQueryCalendar.m */; }; + 4F88E7F71464844D00DDB4D0 /* GTLServiceCalendar.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7DF1464844D00DDB4D0 /* GTLServiceCalendar.m */; }; + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */; }; + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4F2445BD121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F38F6A60B66E91D00B24B81; + remoteInfo = GTLFramework; + }; + 4F2445BF121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027C11A4CA2F00BEB470; + remoteInfo = GTLTouchStaticLib; + }; + 4F2445C1121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027D11A4CA2F00BEB470; + remoteInfo = GTLUnitTests; + }; + 4F2445C3121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F1AD9020B71603F00DC0485; + remoteInfo = DevelopmentTestTool; + }; + 4F72439E12233FAF001A4AD0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 4F38F6A50B66E91D00B24B81; + remoteInfo = GTLFramework; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 4F38F8970B66FAB700B24B81 /* Copy GTL Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4F2445C8121F0D2900FEE1DA /* GTL.framework in Copy GTL Framework */, + ); + name = "Copy GTL Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 4F16F58B13DF666100811114 /* CalendarSampleAppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CalendarSampleAppController.h; sourceTree = ""; }; + 4F16F58C13DF666100811114 /* CalendarSampleAppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CalendarSampleAppController.m; sourceTree = ""; }; + 4F16F58D13DF666100811114 /* CalendarSampleWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CalendarSampleWindowController.h; sourceTree = ""; }; + 4F16F58E13DF666100811114 /* CalendarSampleWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CalendarSampleWindowController.m; sourceTree = ""; }; + 4F16F59413DF673000811114 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/CalendarSampleWindow.xib; sourceTree = ""; }; + 4F16FBDE13E0C39E00811114 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/EditACLWindow.xib; sourceTree = ""; }; + 4F16FBE013E0C39E00811114 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/EditEventWindow.xib; sourceTree = ""; }; + 4F16FBE813E0C3A600811114 /* EditACLWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditACLWindowController.h; sourceTree = ""; }; + 4F16FBE913E0C3A600811114 /* EditACLWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EditACLWindowController.m; sourceTree = ""; }; + 4F16FCCA13E0D0EE00811114 /* EditEventWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditEventWindowController.h; sourceTree = ""; }; + 4F16FCCB13E0D0EE00811114 /* EditEventWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EditEventWindowController.m; sourceTree = ""; }; + 4F22A2141186315400FFBAB6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; + 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GTL.xcodeproj; path = ../../Source/GTL.xcodeproj; sourceTree = SOURCE_ROOT; }; + 4F88E7AF1464844D00DDB4D0 /* GTLCalendar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendar.h; sourceTree = ""; }; + 4F88E7B01464844D00DDB4D0 /* GTLCalendarAcl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarAcl.h; sourceTree = ""; }; + 4F88E7B11464844D00DDB4D0 /* GTLCalendarAcl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarAcl.m; sourceTree = ""; }; + 4F88E7B21464844D00DDB4D0 /* GTLCalendarAclRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarAclRule.h; sourceTree = ""; }; + 4F88E7B31464844D00DDB4D0 /* GTLCalendarAclRule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarAclRule.m; sourceTree = ""; }; + 4F88E7B41464844D00DDB4D0 /* GTLCalendarCalendar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarCalendar.h; sourceTree = ""; }; + 4F88E7B51464844D00DDB4D0 /* GTLCalendarCalendar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarCalendar.m; sourceTree = ""; }; + 4F88E7B61464844D00DDB4D0 /* GTLCalendarCalendarList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarCalendarList.h; sourceTree = ""; }; + 4F88E7B71464844D00DDB4D0 /* GTLCalendarCalendarList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarCalendarList.m; sourceTree = ""; }; + 4F88E7B81464844D00DDB4D0 /* GTLCalendarCalendarListEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarCalendarListEntry.h; sourceTree = ""; }; + 4F88E7B91464844D00DDB4D0 /* GTLCalendarCalendarListEntry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarCalendarListEntry.m; sourceTree = ""; }; + 4F88E7BA1464844D00DDB4D0 /* GTLCalendarColorDefinition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarColorDefinition.h; sourceTree = ""; }; + 4F88E7BB1464844D00DDB4D0 /* GTLCalendarColorDefinition.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarColorDefinition.m; sourceTree = ""; }; + 4F88E7BC1464844D00DDB4D0 /* GTLCalendarColors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarColors.h; sourceTree = ""; }; + 4F88E7BD1464844D00DDB4D0 /* GTLCalendarColors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarColors.m; sourceTree = ""; }; + 4F88E7BE1464844D00DDB4D0 /* GTLCalendarConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarConstants.h; sourceTree = ""; }; + 4F88E7BF1464844D00DDB4D0 /* GTLCalendarConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarConstants.m; sourceTree = ""; }; + 4F88E7C01464844D00DDB4D0 /* GTLCalendarError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarError.h; sourceTree = ""; }; + 4F88E7C11464844D00DDB4D0 /* GTLCalendarError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarError.m; sourceTree = ""; }; + 4F88E7C21464844D00DDB4D0 /* GTLCalendarEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarEvent.h; sourceTree = ""; }; + 4F88E7C31464844D00DDB4D0 /* GTLCalendarEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarEvent.m; sourceTree = ""; }; + 4F88E7C41464844D00DDB4D0 /* GTLCalendarEventAttendee.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarEventAttendee.h; sourceTree = ""; }; + 4F88E7C51464844D00DDB4D0 /* GTLCalendarEventAttendee.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarEventAttendee.m; sourceTree = ""; }; + 4F88E7C61464844D00DDB4D0 /* GTLCalendarEventDateTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarEventDateTime.h; sourceTree = ""; }; + 4F88E7C71464844D00DDB4D0 /* GTLCalendarEventDateTime.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarEventDateTime.m; sourceTree = ""; }; + 4F88E7C81464844D00DDB4D0 /* GTLCalendarEventReminder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarEventReminder.h; sourceTree = ""; }; + 4F88E7C91464844D00DDB4D0 /* GTLCalendarEventReminder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarEventReminder.m; sourceTree = ""; }; + 4F88E7CA1464844D00DDB4D0 /* GTLCalendarEvents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarEvents.h; sourceTree = ""; }; + 4F88E7CB1464844D00DDB4D0 /* GTLCalendarEvents.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarEvents.m; sourceTree = ""; }; + 4F88E7CC1464844D00DDB4D0 /* GTLCalendarFreeBusyCalendar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarFreeBusyCalendar.h; sourceTree = ""; }; + 4F88E7CD1464844D00DDB4D0 /* GTLCalendarFreeBusyCalendar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarFreeBusyCalendar.m; sourceTree = ""; }; + 4F88E7CE1464844D00DDB4D0 /* GTLCalendarFreeBusyGroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarFreeBusyGroup.h; sourceTree = ""; }; + 4F88E7CF1464844D00DDB4D0 /* GTLCalendarFreeBusyGroup.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarFreeBusyGroup.m; sourceTree = ""; }; + 4F88E7D01464844D00DDB4D0 /* GTLCalendarFreeBusyRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarFreeBusyRequest.h; sourceTree = ""; }; + 4F88E7D11464844D00DDB4D0 /* GTLCalendarFreeBusyRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarFreeBusyRequest.m; sourceTree = ""; }; + 4F88E7D21464844D00DDB4D0 /* GTLCalendarFreeBusyRequestItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarFreeBusyRequestItem.h; sourceTree = ""; }; + 4F88E7D31464844D00DDB4D0 /* GTLCalendarFreeBusyRequestItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarFreeBusyRequestItem.m; sourceTree = ""; }; + 4F88E7D41464844D00DDB4D0 /* GTLCalendarFreeBusyResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarFreeBusyResponse.h; sourceTree = ""; }; + 4F88E7D51464844D00DDB4D0 /* GTLCalendarFreeBusyResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarFreeBusyResponse.m; sourceTree = ""; }; + 4F88E7D61464844D00DDB4D0 /* GTLCalendarSetting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarSetting.h; sourceTree = ""; }; + 4F88E7D71464844D00DDB4D0 /* GTLCalendarSetting.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarSetting.m; sourceTree = ""; }; + 4F88E7D81464844D00DDB4D0 /* GTLCalendarSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarSettings.h; sourceTree = ""; }; + 4F88E7D91464844D00DDB4D0 /* GTLCalendarSettings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarSettings.m; sourceTree = ""; }; + 4F88E7DA1464844D00DDB4D0 /* GTLCalendarTimePeriod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarTimePeriod.h; sourceTree = ""; }; + 4F88E7DB1464844D00DDB4D0 /* GTLCalendarTimePeriod.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarTimePeriod.m; sourceTree = ""; }; + 4F88E7DC1464844D00DDB4D0 /* GTLQueryCalendar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLQueryCalendar.h; sourceTree = ""; }; + 4F88E7DD1464844D00DDB4D0 /* GTLQueryCalendar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLQueryCalendar.m; sourceTree = ""; }; + 4F88E7DE1464844D00DDB4D0 /* GTLServiceCalendar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLServiceCalendar.h; sourceTree = ""; }; + 4F88E7DF1464844D00DDB4D0 /* GTLServiceCalendar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLServiceCalendar.m; sourceTree = ""; }; + 4FA6F3D21034AEC400C5DFA5 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = buildStripHeaders; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 8D1107320486CEB800E47090 /* CalendarSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CalendarSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F2445C9121F0D2C00FEE1DA /* GTL.framework in Frameworks */, + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Sample App Classes */ = { + isa = PBXGroup; + children = ( + 4F16F58B13DF666100811114 /* CalendarSampleAppController.h */, + 4F16F58C13DF666100811114 /* CalendarSampleAppController.m */, + 4F16F58D13DF666100811114 /* CalendarSampleWindowController.h */, + 4F16F58E13DF666100811114 /* CalendarSampleWindowController.m */, + 4F16FCCA13E0D0EE00811114 /* EditEventWindowController.h */, + 4F16FCCB13E0D0EE00811114 /* EditEventWindowController.m */, + 4F16FBE813E0C3A600811114 /* EditACLWindowController.h */, + 4F16FBE913E0C3A600811114 /* EditACLWindowController.m */, + ); + name = "Sample App Classes"; + sourceTree = ""; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 4F22A2141186315400FFBAB6 /* WebKit.framework */, + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* CalendarSample.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CalendarSample */ = { + isa = PBXGroup; + children = ( + 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */, + 080E96DDFE201D6D7F000001 /* Sample App Classes */, + 4FB25385138C3F9E00B5C1AE /* API Services */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CalendarSample; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 4F16FBDD13E0C39E00811114 /* EditACLWindow.xib */, + 4F16FBDF13E0C39E00811114 /* EditEventWindow.xib */, + 4F16F59313DF673000811114 /* CalendarSampleWindow.xib */, + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */, + 8D1107310486CEB800E47090 /* Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4F2445B7121F0CF600FEE1DA /* Products */ = { + isa = PBXGroup; + children = ( + 4F2445BE121F0CF600FEE1DA /* GTL.framework */, + 4F2445C0121F0CF600FEE1DA /* libGTLTouchStaticLib.a */, + 4F2445C2121F0CF600FEE1DA /* GTLUnitTests.octest */, + 4F2445C4121F0CF600FEE1DA /* DevelopmentTestTool */, + ); + name = Products; + sourceTree = ""; + }; + 4F88E7AD1464844D00DDB4D0 /* Calendar */ = { + isa = PBXGroup; + children = ( + 4F88E7AE1464844D00DDB4D0 /* Generated */, + ); + name = Calendar; + path = ../../Source/Services/Calendar; + sourceTree = SOURCE_ROOT; + }; + 4F88E7AE1464844D00DDB4D0 /* Generated */ = { + isa = PBXGroup; + children = ( + 4F88E7AF1464844D00DDB4D0 /* GTLCalendar.h */, + 4F88E7B01464844D00DDB4D0 /* GTLCalendarAcl.h */, + 4F88E7B11464844D00DDB4D0 /* GTLCalendarAcl.m */, + 4F88E7B21464844D00DDB4D0 /* GTLCalendarAclRule.h */, + 4F88E7B31464844D00DDB4D0 /* GTLCalendarAclRule.m */, + 4F88E7B41464844D00DDB4D0 /* GTLCalendarCalendar.h */, + 4F88E7B51464844D00DDB4D0 /* GTLCalendarCalendar.m */, + 4F88E7B61464844D00DDB4D0 /* GTLCalendarCalendarList.h */, + 4F88E7B71464844D00DDB4D0 /* GTLCalendarCalendarList.m */, + 4F88E7B81464844D00DDB4D0 /* GTLCalendarCalendarListEntry.h */, + 4F88E7B91464844D00DDB4D0 /* GTLCalendarCalendarListEntry.m */, + 4F88E7BA1464844D00DDB4D0 /* GTLCalendarColorDefinition.h */, + 4F88E7BB1464844D00DDB4D0 /* GTLCalendarColorDefinition.m */, + 4F88E7BC1464844D00DDB4D0 /* GTLCalendarColors.h */, + 4F88E7BD1464844D00DDB4D0 /* GTLCalendarColors.m */, + 4F88E7BE1464844D00DDB4D0 /* GTLCalendarConstants.h */, + 4F88E7BF1464844D00DDB4D0 /* GTLCalendarConstants.m */, + 4F88E7C01464844D00DDB4D0 /* GTLCalendarError.h */, + 4F88E7C11464844D00DDB4D0 /* GTLCalendarError.m */, + 4F88E7C21464844D00DDB4D0 /* GTLCalendarEvent.h */, + 4F88E7C31464844D00DDB4D0 /* GTLCalendarEvent.m */, + 4F88E7C41464844D00DDB4D0 /* GTLCalendarEventAttendee.h */, + 4F88E7C51464844D00DDB4D0 /* GTLCalendarEventAttendee.m */, + 4F88E7C61464844D00DDB4D0 /* GTLCalendarEventDateTime.h */, + 4F88E7C71464844D00DDB4D0 /* GTLCalendarEventDateTime.m */, + 4F88E7C81464844D00DDB4D0 /* GTLCalendarEventReminder.h */, + 4F88E7C91464844D00DDB4D0 /* GTLCalendarEventReminder.m */, + 4F88E7CA1464844D00DDB4D0 /* GTLCalendarEvents.h */, + 4F88E7CB1464844D00DDB4D0 /* GTLCalendarEvents.m */, + 4F88E7CC1464844D00DDB4D0 /* GTLCalendarFreeBusyCalendar.h */, + 4F88E7CD1464844D00DDB4D0 /* GTLCalendarFreeBusyCalendar.m */, + 4F88E7CE1464844D00DDB4D0 /* GTLCalendarFreeBusyGroup.h */, + 4F88E7CF1464844D00DDB4D0 /* GTLCalendarFreeBusyGroup.m */, + 4F88E7D01464844D00DDB4D0 /* GTLCalendarFreeBusyRequest.h */, + 4F88E7D11464844D00DDB4D0 /* GTLCalendarFreeBusyRequest.m */, + 4F88E7D21464844D00DDB4D0 /* GTLCalendarFreeBusyRequestItem.h */, + 4F88E7D31464844D00DDB4D0 /* GTLCalendarFreeBusyRequestItem.m */, + 4F88E7D41464844D00DDB4D0 /* GTLCalendarFreeBusyResponse.h */, + 4F88E7D51464844D00DDB4D0 /* GTLCalendarFreeBusyResponse.m */, + 4F88E7D61464844D00DDB4D0 /* GTLCalendarSetting.h */, + 4F88E7D71464844D00DDB4D0 /* GTLCalendarSetting.m */, + 4F88E7D81464844D00DDB4D0 /* GTLCalendarSettings.h */, + 4F88E7D91464844D00DDB4D0 /* GTLCalendarSettings.m */, + 4F88E7DA1464844D00DDB4D0 /* GTLCalendarTimePeriod.h */, + 4F88E7DB1464844D00DDB4D0 /* GTLCalendarTimePeriod.m */, + 4F88E7DC1464844D00DDB4D0 /* GTLQueryCalendar.h */, + 4F88E7DD1464844D00DDB4D0 /* GTLQueryCalendar.m */, + 4F88E7DE1464844D00DDB4D0 /* GTLServiceCalendar.h */, + 4F88E7DF1464844D00DDB4D0 /* GTLServiceCalendar.m */, + ); + path = Generated; + sourceTree = ""; + }; + 4FB25385138C3F9E00B5C1AE /* API Services */ = { + isa = PBXGroup; + children = ( + 4F88E7AD1464844D00DDB4D0 /* Calendar */, + ); + name = "API Services"; + sourceTree = ""; + }; + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */ = { + isa = PBXGroup; + children = ( + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */, + ); + name = "Build Scripts"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* CalendarSample */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "CalendarSample" */; + buildPhases = ( + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + 4F38F8970B66FAB700B24B81 /* Copy GTL Framework */, + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */, + ); + buildRules = ( + ); + dependencies = ( + 4F72439F12233FAF001A4AD0 /* PBXTargetDependency */, + ); + name = CalendarSample; + productInstallPath = "$(HOME)/Applications"; + productName = CalendarSample; + productReference = 8D1107320486CEB800E47090 /* CalendarSample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0420; + }; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "CalendarSample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CalendarSample */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 4F2445B7121F0CF600FEE1DA /* Products */; + ProjectRef = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* CalendarSample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 4F2445BE121F0CF600FEE1DA /* GTL.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = GTL.framework; + remoteRef = 4F2445BD121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C0121F0CF600FEE1DA /* libGTLTouchStaticLib.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libGTLTouchStaticLib.a; + remoteRef = 4F2445BF121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C2121F0CF600FEE1DA /* GTLUnitTests.octest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = GTLUnitTests.octest; + remoteRef = 4F2445C1121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C4121F0CF600FEE1DA /* DevelopmentTestTool */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = DevelopmentTestTool; + remoteRef = 4F2445C3121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */, + 4F16F59513DF673000811114 /* CalendarSampleWindow.xib in Resources */, + 4F16FBE113E0C39E00811114 /* EditACLWindow.xib in Resources */, + 4F16FBE213E0C39E00811114 /* EditEventWindow.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Strip Headers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ./buildStripHeaders; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072D0486CEB800E47090 /* main.m in Sources */, + 4F16F58F13DF666100811114 /* CalendarSampleAppController.m in Sources */, + 4F16F59013DF666100811114 /* CalendarSampleWindowController.m in Sources */, + 4F16FBEA13E0C3A600811114 /* EditACLWindowController.m in Sources */, + 4F16FCCC13E0D0EE00811114 /* EditEventWindowController.m in Sources */, + 4F88E7E01464844D00DDB4D0 /* GTLCalendarAcl.m in Sources */, + 4F88E7E11464844D00DDB4D0 /* GTLCalendarAclRule.m in Sources */, + 4F88E7E21464844D00DDB4D0 /* GTLCalendarCalendar.m in Sources */, + 4F88E7E31464844D00DDB4D0 /* GTLCalendarCalendarList.m in Sources */, + 4F88E7E41464844D00DDB4D0 /* GTLCalendarCalendarListEntry.m in Sources */, + 4F88E7E51464844D00DDB4D0 /* GTLCalendarColorDefinition.m in Sources */, + 4F88E7E61464844D00DDB4D0 /* GTLCalendarColors.m in Sources */, + 4F88E7E71464844D00DDB4D0 /* GTLCalendarConstants.m in Sources */, + 4F88E7E81464844D00DDB4D0 /* GTLCalendarError.m in Sources */, + 4F88E7E91464844D00DDB4D0 /* GTLCalendarEvent.m in Sources */, + 4F88E7EA1464844D00DDB4D0 /* GTLCalendarEventAttendee.m in Sources */, + 4F88E7EB1464844D00DDB4D0 /* GTLCalendarEventDateTime.m in Sources */, + 4F88E7EC1464844D00DDB4D0 /* GTLCalendarEventReminder.m in Sources */, + 4F88E7ED1464844D00DDB4D0 /* GTLCalendarEvents.m in Sources */, + 4F88E7EE1464844D00DDB4D0 /* GTLCalendarFreeBusyCalendar.m in Sources */, + 4F88E7EF1464844D00DDB4D0 /* GTLCalendarFreeBusyGroup.m in Sources */, + 4F88E7F01464844D00DDB4D0 /* GTLCalendarFreeBusyRequest.m in Sources */, + 4F88E7F11464844D00DDB4D0 /* GTLCalendarFreeBusyRequestItem.m in Sources */, + 4F88E7F21464844D00DDB4D0 /* GTLCalendarFreeBusyResponse.m in Sources */, + 4F88E7F31464844D00DDB4D0 /* GTLCalendarSetting.m in Sources */, + 4F88E7F41464844D00DDB4D0 /* GTLCalendarSettings.m in Sources */, + 4F88E7F51464844D00DDB4D0 /* GTLCalendarTimePeriod.m in Sources */, + 4F88E7F61464844D00DDB4D0 /* GTLQueryCalendar.m in Sources */, + 4F88E7F71464844D00DDB4D0 /* GTLServiceCalendar.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 4F72439F12233FAF001A4AD0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = GTLFramework; + targetProxy = 4F72439E12233FAF001A4AD0 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C165DFE840E0CC02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 4F16F59313DF673000811114 /* CalendarSampleWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 4F16F59413DF673000811114 /* English */, + ); + name = CalendarSampleWindow.xib; + sourceTree = ""; + }; + 4F16FBDD13E0C39E00811114 /* EditACLWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 4F16FBDE13E0C39E00811114 /* English */, + ); + name = EditACLWindow.xib; + sourceTree = ""; + }; + 4F16FBDF13E0C39E00811114 /* EditEventWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 4F16FBE013E0C39E00811114 /* English */, + ); + name = EditEventWindow.xib; + sourceTree = ""; + }; + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 4FA6F3D21034AEC400C5DFA5 /* English */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = CalendarSample; + RUN_CLANG_STATIC_ANALYZER = YES; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = CalendarSample; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = ( + "-DGTL_BUILT_AS_FRAMEWORK=1", + "-DDEBUG=1", + ); + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DGTL_BUILT_AS_FRAMEWORK=1"; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "CalendarSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "CalendarSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/GTL/Examples/CalendarSample/CalendarSample.xcodeproj/project.pbxproj b/GTL/Examples/CalendarSample/CalendarSample.xcodeproj/project.pbxproj new file mode 100644 index 0000000..88a858a --- /dev/null +++ b/GTL/Examples/CalendarSample/CalendarSample.xcodeproj/project.pbxproj @@ -0,0 +1,669 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4F16F58F13DF666100811114 /* CalendarSampleAppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F16F58C13DF666100811114 /* CalendarSampleAppController.m */; }; + 4F16F59013DF666100811114 /* CalendarSampleWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F16F58E13DF666100811114 /* CalendarSampleWindowController.m */; }; + 4F16F59513DF673000811114 /* CalendarSampleWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F16F59313DF673000811114 /* CalendarSampleWindow.xib */; }; + 4F16FBE113E0C39E00811114 /* EditACLWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F16FBDD13E0C39E00811114 /* EditACLWindow.xib */; }; + 4F16FBE213E0C39E00811114 /* EditEventWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F16FBDF13E0C39E00811114 /* EditEventWindow.xib */; }; + 4F16FBEA13E0C3A600811114 /* EditACLWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F16FBE913E0C3A600811114 /* EditACLWindowController.m */; }; + 4F16FCCC13E0D0EE00811114 /* EditEventWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F16FCCB13E0D0EE00811114 /* EditEventWindowController.m */; }; + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F22A2141186315400FFBAB6 /* WebKit.framework */; }; + 4F2445C8121F0D2900FEE1DA /* GTL.framework in Copy GTL Framework */ = {isa = PBXBuildFile; fileRef = 4F2445BE121F0CF600FEE1DA /* GTL.framework */; }; + 4F2445C9121F0D2C00FEE1DA /* GTL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F2445BE121F0CF600FEE1DA /* GTL.framework */; }; + 4F88E7E01464844D00DDB4D0 /* GTLCalendarAcl.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7B11464844D00DDB4D0 /* GTLCalendarAcl.m */; }; + 4F88E7E11464844D00DDB4D0 /* GTLCalendarAclRule.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7B31464844D00DDB4D0 /* GTLCalendarAclRule.m */; }; + 4F88E7E21464844D00DDB4D0 /* GTLCalendarCalendar.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7B51464844D00DDB4D0 /* GTLCalendarCalendar.m */; }; + 4F88E7E31464844D00DDB4D0 /* GTLCalendarCalendarList.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7B71464844D00DDB4D0 /* GTLCalendarCalendarList.m */; }; + 4F88E7E41464844D00DDB4D0 /* GTLCalendarCalendarListEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7B91464844D00DDB4D0 /* GTLCalendarCalendarListEntry.m */; }; + 4F88E7E51464844D00DDB4D0 /* GTLCalendarColorDefinition.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7BB1464844D00DDB4D0 /* GTLCalendarColorDefinition.m */; }; + 4F88E7E61464844D00DDB4D0 /* GTLCalendarColors.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7BD1464844D00DDB4D0 /* GTLCalendarColors.m */; }; + 4F88E7E71464844D00DDB4D0 /* GTLCalendarConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7BF1464844D00DDB4D0 /* GTLCalendarConstants.m */; }; + 4F88E7E81464844D00DDB4D0 /* GTLCalendarError.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7C11464844D00DDB4D0 /* GTLCalendarError.m */; }; + 4F88E7E91464844D00DDB4D0 /* GTLCalendarEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7C31464844D00DDB4D0 /* GTLCalendarEvent.m */; }; + 4F88E7EA1464844D00DDB4D0 /* GTLCalendarEventAttendee.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7C51464844D00DDB4D0 /* GTLCalendarEventAttendee.m */; }; + 4F88E7EB1464844D00DDB4D0 /* GTLCalendarEventDateTime.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7C71464844D00DDB4D0 /* GTLCalendarEventDateTime.m */; }; + 4F88E7EC1464844D00DDB4D0 /* GTLCalendarEventReminder.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7C91464844D00DDB4D0 /* GTLCalendarEventReminder.m */; }; + 4F88E7ED1464844D00DDB4D0 /* GTLCalendarEvents.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7CB1464844D00DDB4D0 /* GTLCalendarEvents.m */; }; + 4F88E7EE1464844D00DDB4D0 /* GTLCalendarFreeBusyCalendar.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7CD1464844D00DDB4D0 /* GTLCalendarFreeBusyCalendar.m */; }; + 4F88E7EF1464844D00DDB4D0 /* GTLCalendarFreeBusyGroup.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7CF1464844D00DDB4D0 /* GTLCalendarFreeBusyGroup.m */; }; + 4F88E7F01464844D00DDB4D0 /* GTLCalendarFreeBusyRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7D11464844D00DDB4D0 /* GTLCalendarFreeBusyRequest.m */; }; + 4F88E7F11464844D00DDB4D0 /* GTLCalendarFreeBusyRequestItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7D31464844D00DDB4D0 /* GTLCalendarFreeBusyRequestItem.m */; }; + 4F88E7F21464844D00DDB4D0 /* GTLCalendarFreeBusyResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7D51464844D00DDB4D0 /* GTLCalendarFreeBusyResponse.m */; }; + 4F88E7F31464844D00DDB4D0 /* GTLCalendarSetting.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7D71464844D00DDB4D0 /* GTLCalendarSetting.m */; }; + 4F88E7F41464844D00DDB4D0 /* GTLCalendarSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7D91464844D00DDB4D0 /* GTLCalendarSettings.m */; }; + 4F88E7F51464844D00DDB4D0 /* GTLCalendarTimePeriod.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7DB1464844D00DDB4D0 /* GTLCalendarTimePeriod.m */; }; + 4F88E7F61464844D00DDB4D0 /* GTLQueryCalendar.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7DD1464844D00DDB4D0 /* GTLQueryCalendar.m */; }; + 4F88E7F71464844D00DDB4D0 /* GTLServiceCalendar.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F88E7DF1464844D00DDB4D0 /* GTLServiceCalendar.m */; }; + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */; }; + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4F2445BD121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F38F6A60B66E91D00B24B81; + remoteInfo = GTLFramework; + }; + 4F2445BF121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027C11A4CA2F00BEB470; + remoteInfo = GTLTouchStaticLib; + }; + 4F2445C1121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027D11A4CA2F00BEB470; + remoteInfo = GTLUnitTests; + }; + 4F2445C3121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F1AD9020B71603F00DC0485; + remoteInfo = DevelopmentTestTool; + }; + 4F72439E12233FAF001A4AD0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 4F38F6A50B66E91D00B24B81; + remoteInfo = GTLFramework; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 4F38F8970B66FAB700B24B81 /* Copy GTL Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4F2445C8121F0D2900FEE1DA /* GTL.framework in Copy GTL Framework */, + ); + name = "Copy GTL Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 4F16F58B13DF666100811114 /* CalendarSampleAppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CalendarSampleAppController.h; sourceTree = ""; }; + 4F16F58C13DF666100811114 /* CalendarSampleAppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CalendarSampleAppController.m; sourceTree = ""; }; + 4F16F58D13DF666100811114 /* CalendarSampleWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CalendarSampleWindowController.h; sourceTree = ""; }; + 4F16F58E13DF666100811114 /* CalendarSampleWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CalendarSampleWindowController.m; sourceTree = ""; }; + 4F16F59413DF673000811114 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/CalendarSampleWindow.xib; sourceTree = ""; }; + 4F16FBDE13E0C39E00811114 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/EditACLWindow.xib; sourceTree = ""; }; + 4F16FBE013E0C39E00811114 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/EditEventWindow.xib; sourceTree = ""; }; + 4F16FBE813E0C3A600811114 /* EditACLWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditACLWindowController.h; sourceTree = ""; }; + 4F16FBE913E0C3A600811114 /* EditACLWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EditACLWindowController.m; sourceTree = ""; }; + 4F16FCCA13E0D0EE00811114 /* EditEventWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditEventWindowController.h; sourceTree = ""; }; + 4F16FCCB13E0D0EE00811114 /* EditEventWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EditEventWindowController.m; sourceTree = ""; }; + 4F22A2141186315400FFBAB6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; + 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GTL.xcodeproj; path = ../../Source/GTL.xcodeproj; sourceTree = SOURCE_ROOT; }; + 4F88E7AF1464844D00DDB4D0 /* GTLCalendar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendar.h; sourceTree = ""; }; + 4F88E7B01464844D00DDB4D0 /* GTLCalendarAcl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarAcl.h; sourceTree = ""; }; + 4F88E7B11464844D00DDB4D0 /* GTLCalendarAcl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarAcl.m; sourceTree = ""; }; + 4F88E7B21464844D00DDB4D0 /* GTLCalendarAclRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarAclRule.h; sourceTree = ""; }; + 4F88E7B31464844D00DDB4D0 /* GTLCalendarAclRule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarAclRule.m; sourceTree = ""; }; + 4F88E7B41464844D00DDB4D0 /* GTLCalendarCalendar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarCalendar.h; sourceTree = ""; }; + 4F88E7B51464844D00DDB4D0 /* GTLCalendarCalendar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarCalendar.m; sourceTree = ""; }; + 4F88E7B61464844D00DDB4D0 /* GTLCalendarCalendarList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarCalendarList.h; sourceTree = ""; }; + 4F88E7B71464844D00DDB4D0 /* GTLCalendarCalendarList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarCalendarList.m; sourceTree = ""; }; + 4F88E7B81464844D00DDB4D0 /* GTLCalendarCalendarListEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarCalendarListEntry.h; sourceTree = ""; }; + 4F88E7B91464844D00DDB4D0 /* GTLCalendarCalendarListEntry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarCalendarListEntry.m; sourceTree = ""; }; + 4F88E7BA1464844D00DDB4D0 /* GTLCalendarColorDefinition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarColorDefinition.h; sourceTree = ""; }; + 4F88E7BB1464844D00DDB4D0 /* GTLCalendarColorDefinition.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarColorDefinition.m; sourceTree = ""; }; + 4F88E7BC1464844D00DDB4D0 /* GTLCalendarColors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarColors.h; sourceTree = ""; }; + 4F88E7BD1464844D00DDB4D0 /* GTLCalendarColors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarColors.m; sourceTree = ""; }; + 4F88E7BE1464844D00DDB4D0 /* GTLCalendarConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarConstants.h; sourceTree = ""; }; + 4F88E7BF1464844D00DDB4D0 /* GTLCalendarConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarConstants.m; sourceTree = ""; }; + 4F88E7C01464844D00DDB4D0 /* GTLCalendarError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarError.h; sourceTree = ""; }; + 4F88E7C11464844D00DDB4D0 /* GTLCalendarError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarError.m; sourceTree = ""; }; + 4F88E7C21464844D00DDB4D0 /* GTLCalendarEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarEvent.h; sourceTree = ""; }; + 4F88E7C31464844D00DDB4D0 /* GTLCalendarEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarEvent.m; sourceTree = ""; }; + 4F88E7C41464844D00DDB4D0 /* GTLCalendarEventAttendee.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarEventAttendee.h; sourceTree = ""; }; + 4F88E7C51464844D00DDB4D0 /* GTLCalendarEventAttendee.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarEventAttendee.m; sourceTree = ""; }; + 4F88E7C61464844D00DDB4D0 /* GTLCalendarEventDateTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarEventDateTime.h; sourceTree = ""; }; + 4F88E7C71464844D00DDB4D0 /* GTLCalendarEventDateTime.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarEventDateTime.m; sourceTree = ""; }; + 4F88E7C81464844D00DDB4D0 /* GTLCalendarEventReminder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarEventReminder.h; sourceTree = ""; }; + 4F88E7C91464844D00DDB4D0 /* GTLCalendarEventReminder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarEventReminder.m; sourceTree = ""; }; + 4F88E7CA1464844D00DDB4D0 /* GTLCalendarEvents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarEvents.h; sourceTree = ""; }; + 4F88E7CB1464844D00DDB4D0 /* GTLCalendarEvents.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarEvents.m; sourceTree = ""; }; + 4F88E7CC1464844D00DDB4D0 /* GTLCalendarFreeBusyCalendar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarFreeBusyCalendar.h; sourceTree = ""; }; + 4F88E7CD1464844D00DDB4D0 /* GTLCalendarFreeBusyCalendar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarFreeBusyCalendar.m; sourceTree = ""; }; + 4F88E7CE1464844D00DDB4D0 /* GTLCalendarFreeBusyGroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarFreeBusyGroup.h; sourceTree = ""; }; + 4F88E7CF1464844D00DDB4D0 /* GTLCalendarFreeBusyGroup.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarFreeBusyGroup.m; sourceTree = ""; }; + 4F88E7D01464844D00DDB4D0 /* GTLCalendarFreeBusyRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarFreeBusyRequest.h; sourceTree = ""; }; + 4F88E7D11464844D00DDB4D0 /* GTLCalendarFreeBusyRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarFreeBusyRequest.m; sourceTree = ""; }; + 4F88E7D21464844D00DDB4D0 /* GTLCalendarFreeBusyRequestItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarFreeBusyRequestItem.h; sourceTree = ""; }; + 4F88E7D31464844D00DDB4D0 /* GTLCalendarFreeBusyRequestItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarFreeBusyRequestItem.m; sourceTree = ""; }; + 4F88E7D41464844D00DDB4D0 /* GTLCalendarFreeBusyResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarFreeBusyResponse.h; sourceTree = ""; }; + 4F88E7D51464844D00DDB4D0 /* GTLCalendarFreeBusyResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarFreeBusyResponse.m; sourceTree = ""; }; + 4F88E7D61464844D00DDB4D0 /* GTLCalendarSetting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarSetting.h; sourceTree = ""; }; + 4F88E7D71464844D00DDB4D0 /* GTLCalendarSetting.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarSetting.m; sourceTree = ""; }; + 4F88E7D81464844D00DDB4D0 /* GTLCalendarSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarSettings.h; sourceTree = ""; }; + 4F88E7D91464844D00DDB4D0 /* GTLCalendarSettings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarSettings.m; sourceTree = ""; }; + 4F88E7DA1464844D00DDB4D0 /* GTLCalendarTimePeriod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLCalendarTimePeriod.h; sourceTree = ""; }; + 4F88E7DB1464844D00DDB4D0 /* GTLCalendarTimePeriod.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCalendarTimePeriod.m; sourceTree = ""; }; + 4F88E7DC1464844D00DDB4D0 /* GTLQueryCalendar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLQueryCalendar.h; sourceTree = ""; }; + 4F88E7DD1464844D00DDB4D0 /* GTLQueryCalendar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLQueryCalendar.m; sourceTree = ""; }; + 4F88E7DE1464844D00DDB4D0 /* GTLServiceCalendar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLServiceCalendar.h; sourceTree = ""; }; + 4F88E7DF1464844D00DDB4D0 /* GTLServiceCalendar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLServiceCalendar.m; sourceTree = ""; }; + 4FA6F3D21034AEC400C5DFA5 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = buildStripHeaders; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 8D1107320486CEB800E47090 /* CalendarSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CalendarSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F2445C9121F0D2C00FEE1DA /* GTL.framework in Frameworks */, + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Sample App Classes */ = { + isa = PBXGroup; + children = ( + 4F16F58B13DF666100811114 /* CalendarSampleAppController.h */, + 4F16F58C13DF666100811114 /* CalendarSampleAppController.m */, + 4F16F58D13DF666100811114 /* CalendarSampleWindowController.h */, + 4F16F58E13DF666100811114 /* CalendarSampleWindowController.m */, + 4F16FCCA13E0D0EE00811114 /* EditEventWindowController.h */, + 4F16FCCB13E0D0EE00811114 /* EditEventWindowController.m */, + 4F16FBE813E0C3A600811114 /* EditACLWindowController.h */, + 4F16FBE913E0C3A600811114 /* EditACLWindowController.m */, + ); + name = "Sample App Classes"; + sourceTree = ""; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 4F22A2141186315400FFBAB6 /* WebKit.framework */, + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* CalendarSample.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CalendarSample */ = { + isa = PBXGroup; + children = ( + 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */, + 080E96DDFE201D6D7F000001 /* Sample App Classes */, + 4FB25385138C3F9E00B5C1AE /* API Services */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CalendarSample; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 4F16FBDD13E0C39E00811114 /* EditACLWindow.xib */, + 4F16FBDF13E0C39E00811114 /* EditEventWindow.xib */, + 4F16F59313DF673000811114 /* CalendarSampleWindow.xib */, + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */, + 8D1107310486CEB800E47090 /* Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4F2445B7121F0CF600FEE1DA /* Products */ = { + isa = PBXGroup; + children = ( + 4F2445BE121F0CF600FEE1DA /* GTL.framework */, + 4F2445C0121F0CF600FEE1DA /* libGTLTouchStaticLib.a */, + 4F2445C2121F0CF600FEE1DA /* GTLUnitTests.octest */, + 4F2445C4121F0CF600FEE1DA /* DevelopmentTestTool */, + ); + name = Products; + sourceTree = ""; + }; + 4F88E7AD1464844D00DDB4D0 /* Calendar */ = { + isa = PBXGroup; + children = ( + 4F88E7AE1464844D00DDB4D0 /* Generated */, + ); + name = Calendar; + path = ../../Source/Services/Calendar; + sourceTree = SOURCE_ROOT; + }; + 4F88E7AE1464844D00DDB4D0 /* Generated */ = { + isa = PBXGroup; + children = ( + 4F88E7AF1464844D00DDB4D0 /* GTLCalendar.h */, + 4F88E7B01464844D00DDB4D0 /* GTLCalendarAcl.h */, + 4F88E7B11464844D00DDB4D0 /* GTLCalendarAcl.m */, + 4F88E7B21464844D00DDB4D0 /* GTLCalendarAclRule.h */, + 4F88E7B31464844D00DDB4D0 /* GTLCalendarAclRule.m */, + 4F88E7B41464844D00DDB4D0 /* GTLCalendarCalendar.h */, + 4F88E7B51464844D00DDB4D0 /* GTLCalendarCalendar.m */, + 4F88E7B61464844D00DDB4D0 /* GTLCalendarCalendarList.h */, + 4F88E7B71464844D00DDB4D0 /* GTLCalendarCalendarList.m */, + 4F88E7B81464844D00DDB4D0 /* GTLCalendarCalendarListEntry.h */, + 4F88E7B91464844D00DDB4D0 /* GTLCalendarCalendarListEntry.m */, + 4F88E7BA1464844D00DDB4D0 /* GTLCalendarColorDefinition.h */, + 4F88E7BB1464844D00DDB4D0 /* GTLCalendarColorDefinition.m */, + 4F88E7BC1464844D00DDB4D0 /* GTLCalendarColors.h */, + 4F88E7BD1464844D00DDB4D0 /* GTLCalendarColors.m */, + 4F88E7BE1464844D00DDB4D0 /* GTLCalendarConstants.h */, + 4F88E7BF1464844D00DDB4D0 /* GTLCalendarConstants.m */, + 4F88E7C01464844D00DDB4D0 /* GTLCalendarError.h */, + 4F88E7C11464844D00DDB4D0 /* GTLCalendarError.m */, + 4F88E7C21464844D00DDB4D0 /* GTLCalendarEvent.h */, + 4F88E7C31464844D00DDB4D0 /* GTLCalendarEvent.m */, + 4F88E7C41464844D00DDB4D0 /* GTLCalendarEventAttendee.h */, + 4F88E7C51464844D00DDB4D0 /* GTLCalendarEventAttendee.m */, + 4F88E7C61464844D00DDB4D0 /* GTLCalendarEventDateTime.h */, + 4F88E7C71464844D00DDB4D0 /* GTLCalendarEventDateTime.m */, + 4F88E7C81464844D00DDB4D0 /* GTLCalendarEventReminder.h */, + 4F88E7C91464844D00DDB4D0 /* GTLCalendarEventReminder.m */, + 4F88E7CA1464844D00DDB4D0 /* GTLCalendarEvents.h */, + 4F88E7CB1464844D00DDB4D0 /* GTLCalendarEvents.m */, + 4F88E7CC1464844D00DDB4D0 /* GTLCalendarFreeBusyCalendar.h */, + 4F88E7CD1464844D00DDB4D0 /* GTLCalendarFreeBusyCalendar.m */, + 4F88E7CE1464844D00DDB4D0 /* GTLCalendarFreeBusyGroup.h */, + 4F88E7CF1464844D00DDB4D0 /* GTLCalendarFreeBusyGroup.m */, + 4F88E7D01464844D00DDB4D0 /* GTLCalendarFreeBusyRequest.h */, + 4F88E7D11464844D00DDB4D0 /* GTLCalendarFreeBusyRequest.m */, + 4F88E7D21464844D00DDB4D0 /* GTLCalendarFreeBusyRequestItem.h */, + 4F88E7D31464844D00DDB4D0 /* GTLCalendarFreeBusyRequestItem.m */, + 4F88E7D41464844D00DDB4D0 /* GTLCalendarFreeBusyResponse.h */, + 4F88E7D51464844D00DDB4D0 /* GTLCalendarFreeBusyResponse.m */, + 4F88E7D61464844D00DDB4D0 /* GTLCalendarSetting.h */, + 4F88E7D71464844D00DDB4D0 /* GTLCalendarSetting.m */, + 4F88E7D81464844D00DDB4D0 /* GTLCalendarSettings.h */, + 4F88E7D91464844D00DDB4D0 /* GTLCalendarSettings.m */, + 4F88E7DA1464844D00DDB4D0 /* GTLCalendarTimePeriod.h */, + 4F88E7DB1464844D00DDB4D0 /* GTLCalendarTimePeriod.m */, + 4F88E7DC1464844D00DDB4D0 /* GTLQueryCalendar.h */, + 4F88E7DD1464844D00DDB4D0 /* GTLQueryCalendar.m */, + 4F88E7DE1464844D00DDB4D0 /* GTLServiceCalendar.h */, + 4F88E7DF1464844D00DDB4D0 /* GTLServiceCalendar.m */, + ); + path = Generated; + sourceTree = ""; + }; + 4FB25385138C3F9E00B5C1AE /* API Services */ = { + isa = PBXGroup; + children = ( + 4F88E7AD1464844D00DDB4D0 /* Calendar */, + ); + name = "API Services"; + sourceTree = ""; + }; + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */ = { + isa = PBXGroup; + children = ( + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */, + ); + name = "Build Scripts"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* CalendarSample */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "CalendarSample" */; + buildPhases = ( + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + 4F38F8970B66FAB700B24B81 /* Copy GTL Framework */, + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */, + ); + buildRules = ( + ); + dependencies = ( + 4F72439F12233FAF001A4AD0 /* PBXTargetDependency */, + ); + name = CalendarSample; + productInstallPath = "$(HOME)/Applications"; + productName = CalendarSample; + productReference = 8D1107320486CEB800E47090 /* CalendarSample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0420; + }; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "CalendarSample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CalendarSample */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 4F2445B7121F0CF600FEE1DA /* Products */; + ProjectRef = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* CalendarSample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 4F2445BE121F0CF600FEE1DA /* GTL.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = GTL.framework; + remoteRef = 4F2445BD121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C0121F0CF600FEE1DA /* libGTLTouchStaticLib.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libGTLTouchStaticLib.a; + remoteRef = 4F2445BF121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C2121F0CF600FEE1DA /* GTLUnitTests.octest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = GTLUnitTests.octest; + remoteRef = 4F2445C1121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C4121F0CF600FEE1DA /* DevelopmentTestTool */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = DevelopmentTestTool; + remoteRef = 4F2445C3121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */, + 4F16F59513DF673000811114 /* CalendarSampleWindow.xib in Resources */, + 4F16FBE113E0C39E00811114 /* EditACLWindow.xib in Resources */, + 4F16FBE213E0C39E00811114 /* EditEventWindow.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Strip Headers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ./buildStripHeaders; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072D0486CEB800E47090 /* main.m in Sources */, + 4F16F58F13DF666100811114 /* CalendarSampleAppController.m in Sources */, + 4F16F59013DF666100811114 /* CalendarSampleWindowController.m in Sources */, + 4F16FBEA13E0C3A600811114 /* EditACLWindowController.m in Sources */, + 4F16FCCC13E0D0EE00811114 /* EditEventWindowController.m in Sources */, + 4F88E7E01464844D00DDB4D0 /* GTLCalendarAcl.m in Sources */, + 4F88E7E11464844D00DDB4D0 /* GTLCalendarAclRule.m in Sources */, + 4F88E7E21464844D00DDB4D0 /* GTLCalendarCalendar.m in Sources */, + 4F88E7E31464844D00DDB4D0 /* GTLCalendarCalendarList.m in Sources */, + 4F88E7E41464844D00DDB4D0 /* GTLCalendarCalendarListEntry.m in Sources */, + 4F88E7E51464844D00DDB4D0 /* GTLCalendarColorDefinition.m in Sources */, + 4F88E7E61464844D00DDB4D0 /* GTLCalendarColors.m in Sources */, + 4F88E7E71464844D00DDB4D0 /* GTLCalendarConstants.m in Sources */, + 4F88E7E81464844D00DDB4D0 /* GTLCalendarError.m in Sources */, + 4F88E7E91464844D00DDB4D0 /* GTLCalendarEvent.m in Sources */, + 4F88E7EA1464844D00DDB4D0 /* GTLCalendarEventAttendee.m in Sources */, + 4F88E7EB1464844D00DDB4D0 /* GTLCalendarEventDateTime.m in Sources */, + 4F88E7EC1464844D00DDB4D0 /* GTLCalendarEventReminder.m in Sources */, + 4F88E7ED1464844D00DDB4D0 /* GTLCalendarEvents.m in Sources */, + 4F88E7EE1464844D00DDB4D0 /* GTLCalendarFreeBusyCalendar.m in Sources */, + 4F88E7EF1464844D00DDB4D0 /* GTLCalendarFreeBusyGroup.m in Sources */, + 4F88E7F01464844D00DDB4D0 /* GTLCalendarFreeBusyRequest.m in Sources */, + 4F88E7F11464844D00DDB4D0 /* GTLCalendarFreeBusyRequestItem.m in Sources */, + 4F88E7F21464844D00DDB4D0 /* GTLCalendarFreeBusyResponse.m in Sources */, + 4F88E7F31464844D00DDB4D0 /* GTLCalendarSetting.m in Sources */, + 4F88E7F41464844D00DDB4D0 /* GTLCalendarSettings.m in Sources */, + 4F88E7F51464844D00DDB4D0 /* GTLCalendarTimePeriod.m in Sources */, + 4F88E7F61464844D00DDB4D0 /* GTLQueryCalendar.m in Sources */, + 4F88E7F71464844D00DDB4D0 /* GTLServiceCalendar.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 4F72439F12233FAF001A4AD0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = GTLFramework; + targetProxy = 4F72439E12233FAF001A4AD0 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C165DFE840E0CC02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 4F16F59313DF673000811114 /* CalendarSampleWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 4F16F59413DF673000811114 /* English */, + ); + name = CalendarSampleWindow.xib; + sourceTree = ""; + }; + 4F16FBDD13E0C39E00811114 /* EditACLWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 4F16FBDE13E0C39E00811114 /* English */, + ); + name = EditACLWindow.xib; + sourceTree = ""; + }; + 4F16FBDF13E0C39E00811114 /* EditEventWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 4F16FBE013E0C39E00811114 /* English */, + ); + name = EditEventWindow.xib; + sourceTree = ""; + }; + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 4FA6F3D21034AEC400C5DFA5 /* English */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = CalendarSample; + RUN_CLANG_STATIC_ANALYZER = YES; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = CalendarSample; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = ( + "-DGTL_BUILT_AS_FRAMEWORK=1", + "-DDEBUG=1", + ); + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DGTL_BUILT_AS_FRAMEWORK=1"; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "CalendarSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "CalendarSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/GTL/Examples/CalendarSample/CalendarSampleAppController.h b/GTL/Examples/CalendarSample/CalendarSampleAppController.h new file mode 100644 index 0000000..0c54129 --- /dev/null +++ b/GTL/Examples/CalendarSample/CalendarSampleAppController.h @@ -0,0 +1,23 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// CalendarSampleAppController.h +// + +#import + +@interface CalendarSampleAppController : NSObject +@end diff --git a/GTL/Examples/CalendarSample/CalendarSampleAppController.m b/GTL/Examples/CalendarSample/CalendarSampleAppController.m new file mode 100644 index 0000000..b2141d1 --- /dev/null +++ b/GTL/Examples/CalendarSample/CalendarSampleAppController.m @@ -0,0 +1,35 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// CalendarSampleAppController.m +// + +#import "CalendarSampleAppController.h" +#import "CalendarSampleWindowController.h" + +@implementation CalendarSampleAppController + +- (void)applicationWillFinishLaunching:(NSNotification *)notification { + CalendarSampleWindowController* windowController + = [CalendarSampleWindowController sharedWindowController]; + [windowController showWindow:self]; +} + +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { + return YES; +} + +@end diff --git a/GTL/Examples/CalendarSample/CalendarSampleWindowController.h b/GTL/Examples/CalendarSample/CalendarSampleWindowController.h new file mode 100644 index 0000000..f956798 --- /dev/null +++ b/GTL/Examples/CalendarSample/CalendarSampleWindowController.h @@ -0,0 +1,108 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// CalendarSampleWindowController.h +// + +#import + +#import "GTLCalendar.h" +#import "GTL/GTMOAuth2WindowController.h" + +@interface CalendarSampleWindowController : NSWindowController { + @private + IBOutlet NSTextField *signedInField_; + IBOutlet NSButton *signedInButton_; + + IBOutlet NSTableView *calendarTable_; + IBOutlet NSProgressIndicator *calendarProgressIndicator_; + IBOutlet NSTextView *calendarResultTextField_; + IBOutlet NSButton *calendarCancelButton_; + + IBOutlet NSSegmentedControl *calendarSegmentedControl_; + IBOutlet NSButton *addCalendarButton_; + IBOutlet NSButton *renameCalendarButton_; + IBOutlet NSButton *deleteCalendarButton_; + IBOutlet NSTextField *calendarNameField_; + + IBOutlet NSTableView *eventTable_; + IBOutlet NSProgressIndicator *eventProgressIndicator_; + IBOutlet NSTextView *eventResultTextField_; + IBOutlet NSButton *eventCancelButton_; + + IBOutlet NSButton *addEntryButton_; + IBOutlet NSButton *editEntryButton_; + IBOutlet NSButton *deleteEntriesButton_; + IBOutlet NSButton *queryTodaysEventsButton_; + IBOutlet NSButton *queryFreeBusyButton_; + + IBOutlet NSSegmentedControl *entrySegmentedControl_; + + IBOutlet NSButton *clientIDButton_; + IBOutlet NSTextField *clientIDRequiredTextField_; + IBOutlet NSWindow *clientIDSheet_; + IBOutlet NSTextField *clientIDField_; + IBOutlet NSTextField *clientSecretField_; + + GTLCalendarCalendarList *calendarList_; + GTLServiceTicket *calendarListTicket_; + NSError *calendarFetchError_; + + GTLServiceTicket *editCalendarListTicket_; + + GTLCalendarEvents *events_; + GTLServiceTicket *eventTicket_; + NSError *eventsFetchError_; + + GTLServiceTicket *editEventTicket_; + + GTLCalendarAcl *calendarACLs_; + NSError *calendarACLsFetchError_; + + GTLCalendarSettings *settings_; + NSError *settingsFetchError_; +} + ++ (CalendarSampleWindowController *)sharedWindowController; + +- (IBAction)signInClicked:(id)sender; + +- (IBAction)getCalendarList:(id)sender; + +- (IBAction)cancelCalendarFetch:(id)sender; +- (IBAction)cancelEventsFetch:(id)sender; + +- (IBAction)addCalendar:(id)sender; +- (IBAction)renameCalendar:(id)sender; +- (IBAction)deleteCalendar:(id)sender; + +- (IBAction)entrySegmentClicked:(id)sender; + +- (IBAction)addEntry:(id)sender; +- (IBAction)editEntry:(id)sender; +- (IBAction)deleteEntries:(id)sender; + +- (IBAction)queryTodayClicked:(id)sender; +- (IBAction)queryFreeBusyClicked:(id)sender; + +- (IBAction)loggingCheckboxClicked:(id)sender; + +// Client ID sheet +- (IBAction)clientIDClicked:(id)sender; +- (IBAction)clientIDDoneClicked:(id)sender; +- (IBAction)APIConsoleClicked:(id)sender; + +@end diff --git a/GTL/Examples/CalendarSample/CalendarSampleWindowController.m b/GTL/Examples/CalendarSample/CalendarSampleWindowController.m new file mode 100644 index 0000000..d05dbbd --- /dev/null +++ b/GTL/Examples/CalendarSample/CalendarSampleWindowController.m @@ -0,0 +1,1273 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// CalendarSampleWindowController.m +// + +#import "CalendarSampleWindowController.h" +#import "EditEventWindowController.h" +#import "EditACLWindowController.h" + +#import "GTL/GTLUtilities.h" +#import "GTL/GTMHTTPFetcherLogging.h" + +enum { + kEventsSegment = 0, + kAccessControlSegment = 1, + kSettingsSegment = 2 +}; + +@interface CalendarSampleWindowController () + +@property (readonly) GTLServiceCalendar *calendarService; + +@property (retain) GTLCalendarCalendarList *calendarList; +@property (retain) GTLServiceTicket *calendarListTicket; +@property (retain) NSError *calendarListFetchError; + +@property (retain) GTLServiceTicket *editCalendarListTicket; + +@property (retain) GTLCalendarEvents *events; +@property (retain) GTLServiceTicket *eventsTicket; +@property (retain) NSError *eventsFetchError; + +@property (retain) GTLCalendarAcl *ACLs; +@property (retain) NSError *ACLsFetchError; + +@property (retain) GTLCalendarSettings *settings; +@property (retain) NSError *settingsFetchError; + +@property (retain) GTLServiceTicket *editEventTicket; + + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel; + +- (void)updateUI; +- (NSString *)displayStringForACLRule:(GTLCalendarAclRule *)rule; +- (void)displayAlert:(NSString *)title format:(NSString *)format, ...; + +- (void)fetchCalendarList; +- (void)fetchSelectedCalendar; +- (void)addACalendar; +- (void)renameSelectedCalendar; +- (void)deleteSelectedCalendar; + +- (void)addAnEvent; +- (void)addEvent:(GTLCalendarEvent *)event; +- (void)editSelectedEvent; +- (void)editSelectedEventWithEvent:(GTLCalendarEvent *)revisedEvent; +- (void)deleteSelectedEvent; +- (void)queryTodaysEvents; +- (void)queryFreeBusy; + +- (void)addAnACLRule; +- (void)addACLRule:(GTLCalendarAclRule *)rule; +- (void)editSelectedACLRule; +- (void)editSelectedACLRuleWithRule:(GTLCalendarAclRule *)revisedRule; +- (void)deleteSelectedACLRule; + +- (GTLCalendarCalendarListEntry *)selectedCalendarListEntry; +- (GTLCalendarEvent *)selectedEvent; + +@end + +// Keychain item name for saving the user's authentication information +NSString *const kKeychainItemName = @"CalendarSample: Google Calendar"; + +@implementation CalendarSampleWindowController + +@synthesize calendarList = calendarList_, + calendarListTicket = calendarListTicket_, + calendarListFetchError = calendarFetchError_, + editCalendarListTicket = editCalendarListTicket_, + events = events_, + eventsTicket = eventTicket_, + eventsFetchError = eventsFetchError_, + ACLs = calendarACLs_, + ACLsFetchError = calendarACLsFetchError_, + settings = settings_, + settingsFetchError = settingsFetchError_, + editEventTicket = editEventTicket_; + ++ (CalendarSampleWindowController *)sharedWindowController { + static CalendarSampleWindowController* gWindowController = nil; + if (!gWindowController) { + gWindowController = [[CalendarSampleWindowController alloc] init]; + } + return gWindowController; +} + +- (id)init { + return [self initWithWindowNibName:@"CalendarSampleWindow"]; +} + +- (void)awakeFromNib { + // Load the OAuth token from the keychain, if it was previously saved + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + GTMOAuth2Authentication *auth; + auth = [GTMOAuth2WindowController authForGoogleFromKeychainForName:kKeychainItemName + clientID:clientID + clientSecret:clientSecret]; + self.calendarService.authorizer = auth; + + // Set the result text fields to have a distinctive color and mono-spaced font + [calendarResultTextField_ setTextColor:[NSColor darkGrayColor]]; + [eventResultTextField_ setTextColor:[NSColor darkGrayColor]]; + + NSFont *resultTextFont = [NSFont fontWithName:@"Monaco" size:9]; + [calendarResultTextField_ setFont:resultTextFont]; + [eventResultTextField_ setFont:resultTextFont]; + + [self updateUI]; +} + +- (void)dealloc { + [calendarList_ release]; + [calendarListTicket_ release]; + [calendarFetchError_ release]; + + [editCalendarListTicket_ release]; + + [events_ release]; + [eventTicket_ release]; + [eventsFetchError_ release]; + + [calendarACLs_ release]; + [calendarACLsFetchError_ release]; + + [settings_ release]; + [settingsFetchError_ release]; + + [editEventTicket_ release]; + + [super dealloc]; +} + +#pragma mark - + +- (NSString *)signedInUsername { + // Get the email address of the signed-in user + GTMOAuth2Authentication *auth = self.calendarService.authorizer; + BOOL isSignedIn = auth.canAuthorize; + if (isSignedIn) { + return auth.userEmail; + } else { + return nil; + } +} + +- (BOOL)isSignedIn { + NSString *name = [self signedInUsername]; + return (name != nil); +} + +#pragma mark IBActions + +- (IBAction)signInClicked:(id)sender { + if (![self isSignedIn]) { + // Sign in + [self runSigninThenInvokeSelector:@selector(updateUI)]; + } else { + // Sign out + GTLServiceCalendar *service = self.calendarService; + + [GTMOAuth2WindowController removeAuthFromKeychainForName:kKeychainItemName]; + service.authorizer = nil; + [self updateUI]; + } +} + +- (IBAction)getCalendarList:(id)sender { + if (![self isSignedIn]) { + [self runSigninThenInvokeSelector:@selector(fetchCalendarList)]; + } else { + [self fetchCalendarList]; + } +} + +- (IBAction)cancelCalendarFetch:(id)sender { + [self.calendarListTicket cancelTicket]; + self.calendarListTicket = nil; + + [self.editCalendarListTicket cancelTicket]; + self.editCalendarListTicket = nil; + + [self updateUI]; +} + +- (IBAction)cancelEventsFetch:(id)sender { + [self.eventsTicket cancelTicket]; + self.eventsTicket = nil; + + [self.editEventTicket cancelTicket]; + self.editEventTicket = nil; + + [self updateUI]; +} + +- (IBAction)entrySegmentClicked:(id)sender { + [self updateUI]; +} + +- (IBAction)addCalendar:(id)sender { + [self addACalendar]; +} + +- (IBAction)renameCalendar:(id)sender { + [self renameSelectedCalendar]; +} + +- (IBAction)deleteCalendar:(id)sender { + GTLCalendarCalendarListEntry *calendar = [self selectedCalendarListEntry]; + NSString *title = calendar.summary; + + NSBeginAlertSheet(@"Delete", nil, @"Cancel", nil, + [self window], self, + @selector(deleteCalendarSheetDidEnd:returnCode:contextInfo:), + nil, nil, @"Delete \"%@\"?", title); +} + +- (void)deleteCalendarSheetDidEnd:(NSWindow *)sheet + returnCode:(int)returnCode + contextInfo:(void *)contextInfo { + if (returnCode == NSAlertDefaultReturn) { + [self deleteSelectedCalendar]; + } +} + +- (IBAction)addEntry:(id)sender { + NSInteger segment = [entrySegmentedControl_ selectedSegment]; + if (segment == kEventsSegment) { + [self addAnEvent]; + } else { + [self addAnACLRule]; + } +} + +- (IBAction)editEntry:(id)sender { + NSInteger segment = [entrySegmentedControl_ selectedSegment]; + if (segment == kEventsSegment) { + [self editSelectedEvent]; + } else { + [self editSelectedACLRule]; + } +} + +- (IBAction)deleteEntries:(id)sender { + NSInteger segment = [entrySegmentedControl_ selectedSegment]; + if (segment == kEventsSegment) { + [self deleteSelectedEvent]; + } else { + [self deleteSelectedACLRule]; + } +} + +- (IBAction)queryTodayClicked:(id)sender { + [self queryTodaysEvents]; +} + +- (IBAction)queryFreeBusyClicked:(id)sender { + [self queryFreeBusy]; +} + +- (IBAction)APIConsoleClicked:(id)sender { + NSURL *url = [NSURL URLWithString:@"https://code.google.com/apis/console"]; + [[NSWorkspace sharedWorkspace] openURL:url]; +} + +- (IBAction)loggingCheckboxClicked:(id)sender { + [GTMHTTPFetcher setLoggingEnabled:[sender state]]; +} + +#pragma mark - + +// Get a service object with the current username/password +// +// A "service" object handles networking tasks. Service objects +// contain user authentication information as well as networking +// state information (such as cookies and the "last modified" date for +// fetched data.) + +- (GTLServiceCalendar *)calendarService { + static GTLServiceCalendar *service = nil; + + if (!service) { + service = [[GTLServiceCalendar alloc] init]; + + // Have the service object set tickets to fetch consecutive pages + // of the feed so we do not need to manually fetch them + service.shouldFetchNextPages = YES; + + // Have the service object set tickets to retry temporary error conditions + // automatically + service.retryEnabled = YES; + } + return service; +} + +- (GTLCalendarCalendarListEntry *)selectedCalendarListEntry { + int rowIndex = [calendarTable_ selectedRow]; + if (rowIndex > -1) { + GTLCalendarCalendarListEntry *item = [self.calendarList itemAtIndex:rowIndex]; + return item; + } + return nil; +} + +- (GTLCalendarEvent *)selectedEvent { + if ([entrySegmentedControl_ selectedSegment] == kEventsSegment) { + int rowIndex = [eventTable_ selectedRow]; + if (rowIndex > -1) { + GTLCalendarEvent *item = [self.events itemAtIndex:rowIndex]; + return item; + } + } + return nil; +} + +- (GTLCalendarAclRule *)selectedACLRule { + if ([entrySegmentedControl_ selectedSegment] == kAccessControlSegment) { + int rowIndex = [eventTable_ selectedRow]; + if (rowIndex > -1) { + GTLCalendarAclRule *item = [self.ACLs itemAtIndex:rowIndex]; + return item; + } + } + return nil; +} + +- (GTLCalendarSetting *)selectedSetting { + if ([entrySegmentedControl_ selectedSegment] == kSettingsSegment) { + int rowIndex = [eventTable_ selectedRow]; + if (rowIndex > -1) { + GTLCalendarSetting *item = [self.settings itemAtIndex:rowIndex]; + return item; + } + } + return nil; +} + +#pragma mark Fetch Calendar List + +- (void)fetchCalendarList { + self.calendarList = nil; + self.calendarListFetchError = nil; + + GTLServiceCalendar *service = self.calendarService; + + + GTLQueryCalendar *query = [GTLQueryCalendar queryForCalendarListList]; + + BOOL shouldFetchedOwned = ([calendarSegmentedControl_ selectedSegment] == 1); + if (shouldFetchedOwned) { + query.minAccessRole = kGTLCalendarMinAccessRoleOwner; + } + + self.calendarListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id calendarList, NSError *error) { + // Callback + self.calendarList = calendarList; + self.calendarListFetchError = error; + self.calendarListTicket = nil; + + [self updateUI]; + }]; + [self updateUI]; +} + +#pragma mark Fetch Selected Calendar + +- (void)fetchSelectedCalendar { + self.events = nil; + self.eventsFetchError = nil; + + self.ACLs = nil; + self.ACLsFetchError = nil; + + self.settings = nil; + self.settingsFetchError = nil; + + GTLServiceCalendar *service = self.calendarService; + + GTLCalendarCalendarListEntry *selectedCalendar = [self selectedCalendarListEntry]; + if (selectedCalendar) { + NSString *calendarID = selectedCalendar.identifier; + + // We will fetch the events for this calendar, the ACLs for this calendar, + // and the user's settings, together in a single batch. + GTLBatchQuery *batch = [GTLBatchQuery batchQuery]; + + GTLQueryCalendar *eventsQuery = [GTLQueryCalendar queryForEventsListWithCalendarId:calendarID]; + eventsQuery.completionBlock = ^(GTLServiceTicket *ticket, id object, NSError *error) { + self.events = object; + self.eventsFetchError = error; + }; + [batch addQuery:eventsQuery]; + + GTLQueryCalendar *aclQuery = [GTLQueryCalendar queryForAclListWithCalendarId:calendarID]; + aclQuery.completionBlock = ^(GTLServiceTicket *ticket, id object, NSError *error) { + self.ACLs = object; + self.ACLsFetchError = error; + }; + [batch addQuery:aclQuery]; + + GTLQueryCalendar *settingsQuery = [GTLQueryCalendar queryForSettingsList]; + settingsQuery.completionBlock = ^(GTLServiceTicket *ticket, id object, NSError *error) { + self.settings = object; + self.settingsFetchError = error; + }; + [batch addQuery:settingsQuery]; + + self.eventsTicket = [service executeQuery:batch + completionHandler:^(GTLServiceTicket *ticket, + id object, NSError *error) { + // Callback + // + // For batch queries with successful execution, + // the result is a GTLBatchResult object + // + // At this point, the query completion blocks + // have already been called + self.eventsTicket = nil; + + [self updateUI]; + }]; + [self updateUI]; + } +} + +#pragma mark Add, Rename, and Delete a Calendar + +- (void)addACalendar { + NSString *newCalendarName = [calendarNameField_ stringValue]; + + GTLServiceCalendar *service = self.calendarService; + + GTLCalendarCalendar *newEntry = [GTLCalendarCalendar object]; + newEntry.summary = newCalendarName; + newEntry.timeZone = [[NSTimeZone localTimeZone] name]; + + GTLQueryCalendar *query = [GTLQueryCalendar queryForCalendarsInsertWithObject:newEntry]; + self.editCalendarListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) { + // Callback + self.editCalendarListTicket = nil; + if (error == nil) { + [calendarNameField_ setStringValue:@""]; + [self fetchCalendarList]; + } else { + [self displayAlert:@"Add failed" + format:@"Calendar add failed: %@", error]; + } + [self updateUI]; + }]; + [self updateUI]; +} + +- (void)renameSelectedCalendar { + GTLCalendarCalendarListEntry *selectedCalendarListEntry = [self selectedCalendarListEntry]; + if (selectedCalendarListEntry) { + GTLServiceCalendar *service = self.calendarService; + + NSString *newCalendarName = [calendarNameField_ stringValue]; + + // Modify a copy of the selected calendar, not the existing one in memory + GTLCalendarCalendar *patchObject = [GTLCalendarCalendar object]; + patchObject.summary = newCalendarName; + + NSString *calendarID = selectedCalendarListEntry.identifier; + GTLQueryCalendar *query = [GTLQueryCalendar queryForCalendarsPatchWithObject:patchObject + calendarId:calendarID]; + self.editCalendarListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) { + // Callback + self.editCalendarListTicket = nil; + if (error == nil) { + GTLCalendarCalendar *calendar = object; + + [self displayAlert:@"Renamed" + format:@"Renamed calendar \"%@\" as \"%@\"", + selectedCalendarListEntry.summary, + calendar.summary]; + + [calendarNameField_ setStringValue:@""]; + + [self fetchCalendarList]; + } else { + [self displayAlert:@"Update failed" + format:@"Calendar update failed: %@", error]; + } + [self updateUI]; + }]; + [self updateUI]; + } +} + +- (void)deleteSelectedCalendar { + GTLCalendarCalendarListEntry *selectedCalendarListEntry = [self selectedCalendarListEntry]; + if (selectedCalendarListEntry) { + GTLServiceCalendar *service = self.calendarService; + + NSString *calendarID = selectedCalendarListEntry.identifier; + GTLQueryCalendar *query = [GTLQueryCalendar queryForCalendarsDeleteWithCalendarId:calendarID]; + + self.editCalendarListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) { + // Callback + self.editCalendarListTicket = nil; + if (error == nil) { + [self displayAlert:@"Deleted" + format:@"Deleted \"%@\"", + selectedCalendarListEntry.summary]; + [self fetchCalendarList]; + [self updateUI]; + } else { + [self displayAlert:@"Delete failed" + format:@"Delete failed: %@", error]; + } + }]; + } +} + +#pragma mark Add, Edit, and Delete an Event + +- (void)addAnEvent { + // Make a new event, and show it to the user to edit + GTLCalendarEvent *newEvent = [GTLCalendarEvent object]; + newEvent.summary = @"Sample Added Event"; + newEvent.descriptionProperty = @"Description of sample added event"; + + // We'll set the start time to now, and the end time to an hour from now, + // with a reminder 10 minutes before + NSDate *anHourFromNow = [NSDate dateWithTimeIntervalSinceNow:60*60]; + GTLDateTime *startDateTime = [GTLDateTime dateTimeWithDate:[NSDate date] + timeZone:[NSTimeZone systemTimeZone]]; + GTLDateTime *endDateTime = [GTLDateTime dateTimeWithDate:anHourFromNow + timeZone:[NSTimeZone systemTimeZone]]; + + newEvent.start = [GTLCalendarEventDateTime object]; + newEvent.start.dateTime = startDateTime; + + newEvent.end = [GTLCalendarEventDateTime object]; + newEvent.end.dateTime = endDateTime; + + GTLCalendarEventReminder *reminder = [GTLCalendarEventReminder object]; + reminder.minutes = [NSNumber numberWithInteger:10]; + reminder.method = @"email"; + + newEvent.reminders = [GTLCalendarEventReminders object]; + newEvent.reminders.overrides = [NSArray arrayWithObject:reminder]; + newEvent.reminders.useDefault = [NSNumber numberWithBool:NO]; + + // Display the event edit dialog + EditEventWindowController *controller = [[[EditEventWindowController alloc] init] autorelease]; + [controller runModalForWindow:[self window] + event:newEvent + completionHandler:^(NSInteger returnCode, GTLCalendarEvent *event) { + // Callback + if (returnCode == NSOKButton) { + [self addEvent:event]; + } + }]; +} + +- (void)addEvent:(GTLCalendarEvent *)event { + GTLServiceCalendar *service = self.calendarService; + GTLCalendarCalendarListEntry *selectedCalendar = [self selectedCalendarListEntry]; + NSString *calendarID = selectedCalendar.identifier; + + GTLQueryCalendar *query = [GTLQueryCalendar queryForEventsInsertWithObject:event + calendarId:calendarID]; + self.editEventTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) { + // Callback + self.editEventTicket = nil; + if (error == nil) { + GTLCalendarEvent *event = object; + [self displayAlert:@"Event Added" + format:@"Added event \"%@\"", + event.summary]; + [self fetchSelectedCalendar]; + } else { + [self displayAlert:@"Add failed" + format:@"Event add failed: %@", error]; + } + [self updateUI]; + }]; + [self updateUI]; +} + +- (void)editSelectedEvent { + // Show the selected event to the user to edit + GTLCalendarEvent *eventToEdit = [self selectedEvent]; + if (eventToEdit) { + EditEventWindowController *controller = [[[EditEventWindowController alloc] init] autorelease]; + [controller runModalForWindow:[self window] + event:eventToEdit + completionHandler:^(NSInteger returnCode, GTLCalendarEvent *event) { + // Callback + if (returnCode == NSOKButton) { + [self editSelectedEventWithEvent:event]; + } + }]; + } +} + +- (void)editSelectedEventWithEvent:(GTLCalendarEvent *)revisedEvent { + GTLServiceCalendar *service = self.calendarService; + GTLCalendarCalendarListEntry *selectedCalendarListEntry = [self selectedCalendarListEntry]; + + GTLCalendarEvent *originalEvent = [self selectedEvent]; + GTLCalendarEvent *patchEvent = [revisedEvent patchObjectFromOriginal:originalEvent]; + if (patchEvent) { + NSString *calendarID = selectedCalendarListEntry.identifier; + NSString *eventID = originalEvent.identifier; + GTLQueryCalendar *query = [GTLQueryCalendar queryForEventsPatchWithObject:patchEvent + calendarId:calendarID + eventId:eventID]; + self.editEventTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) { + // Callback + self.editEventTicket = nil; + if (error == nil) { + GTLCalendarEvent *event = object; + [self displayAlert:@"Event Updated" + format:@"Patched event \"%@\"", + event.summary]; + [self fetchSelectedCalendar]; + } else { + [self displayAlert:@"Update failed" + format:@"Event patch failed: %@", error]; + } + [self updateUI]; + }]; + [self updateUI]; + } +} + +- (void)deleteSelectedEvent { + GTLServiceCalendar *service = self.calendarService; + + GTLCalendarCalendarListEntry *selectedCalendarListEntry = [self selectedCalendarListEntry]; + NSString *calendarID = selectedCalendarListEntry.identifier; + + GTLCalendarEvent *selectedEvent = [self selectedEvent]; + NSString *eventID = selectedEvent.identifier; + + if (calendarID && eventID) { + GTLQueryCalendar *query = [GTLQueryCalendar queryForEventsDeleteWithCalendarId:calendarID + eventId:eventID]; + self.editEventTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id nilObject, NSError *error) { + // Callback + self.editEventTicket = nil; + if (error == nil) { + [self displayAlert:@"Event deleted" + format:@"Deleted \"%@\"", + selectedEvent.summary]; + [self fetchSelectedCalendar]; + } else { + [self displayAlert:@"Delete failed" + format:@"Event delete failed: %@", error]; + } + [self updateUI]; + }]; + [self updateUI]; + } +} + +#pragma mark Query Events + +// Utility routine to make a GTLDateTime object for sometime today +- (GTLDateTime *)dateTimeForTodayAtHour:(int)hour + minute:(int)minute + second:(int)second { + + int const kComponentBits = (NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit + | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit); + + NSCalendar *cal = [[[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar] autorelease]; + + NSDateComponents *dateComponents = [cal components:kComponentBits + fromDate:[NSDate date]]; + [dateComponents setHour:hour]; + [dateComponents setMinute:minute]; + [dateComponents setSecond:second]; + [dateComponents setTimeZone:[NSTimeZone localTimeZone]]; + + GTLDateTime *dateTime = [GTLDateTime dateTimeWithDateComponents:dateComponents]; + return dateTime; +} + +- (void)queryTodaysEvents { + GTLCalendarCalendarListEntry *selectedCalendar = [self selectedCalendarListEntry]; + if (selectedCalendar) { + NSString *calendarID = selectedCalendar.identifier; + + GTLDateTime *startOfDay = [self dateTimeForTodayAtHour:0 minute:0 second:0]; + GTLDateTime *endOfDay = [self dateTimeForTodayAtHour:23 minute:59 second:59]; + + GTLQueryCalendar *query = [GTLQueryCalendar queryForEventsListWithCalendarId:calendarID]; + query.maxResults = 10; + query.timeMin = startOfDay; + query.timeMax = endOfDay; + + GTLServiceCalendar *service = self.calendarService; + GTLServiceTicket *ticket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) { + // Callback + if (error == nil) { + // Make a comma-separated list of event titles + GTLCalendarEvents *events = object; + + NSArray *titles = [events.items valueForKey:@"summary"]; + NSString *joined = [titles componentsJoinedByString:@", "]; + [self displayAlert:@"Today's Events" + format:@"Query result: %@", joined]; + } else { + [self displayAlert:@"Query failed" + format:@"%@", error]; + } + [self updateUI]; + }]; + + // The service is set to fetch all pages, but for querying today's events, + // we only want the first 10 results + ticket.shouldFetchNextPages = NO; + } +} + +- (void)queryFreeBusy { + GTLCalendarCalendarListEntry *selectedCalendar = [self selectedCalendarListEntry]; + if (selectedCalendar) { + NSString *calendarID = selectedCalendar.identifier; + + GTLDateTime *startOfDay = [self dateTimeForTodayAtHour:0 minute:0 second:0]; + GTLDateTime *endOfDay = [self dateTimeForTodayAtHour:23 minute:59 second:59]; + + GTLCalendarFreeBusyRequestItem *requestItem = [GTLCalendarFreeBusyRequestItem object]; + requestItem.identifier = calendarID; + + GTLQueryCalendar *query = [GTLQueryCalendar queryForFreebusyQuery]; + query.items = [NSArray arrayWithObject:requestItem]; + query.maxResults = 10; + query.timeMin = startOfDay; + query.timeMax = endOfDay; + + GTLServiceCalendar *service = self.calendarService; + GTLServiceTicket *ticket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) { + // Callback + if (error == nil) { + // Display a list of busy periods for the calendar account + NSMutableString *displayStr = [NSMutableString string]; + + GTLCalendarFreeBusyResponse *response = object; + GTLCalendarFreeBusyResponseCalendars *responseCals = response.calendars; + NSDictionary *props = responseCals.additionalProperties; + + // Step through the free-busy calendar IDs, and display each calendar + // name (the summary field) and free/busy times + for (NSString *calendarID in props) { + GTLCalendarCalendarListEntry *calendar; + calendar = [GTLUtilities firstObjectFromArray:self.calendarList.items + withValue:calendarID + forKeyPath:@"identifier"]; + [displayStr appendFormat:@"%@: ", calendar.summary]; + + GTLCalendarFreeBusyCalendar *calResponse = [props objectForKey:calendarID]; + NSArray *busyArray = calResponse.busy; + for (GTLCalendarTimePeriod *period in busyArray) { + GTLDateTime *startTime = period.start; + GTLDateTime *endTime = period.end; + NSString *startStr = [NSDateFormatter localizedStringFromDate:startTime.date + dateStyle:NSDateFormatterNoStyle + timeStyle:NSDateFormatterShortStyle]; + NSString *endStr = [NSDateFormatter localizedStringFromDate:endTime.date + dateStyle:NSDateFormatterNoStyle + timeStyle:NSDateFormatterShortStyle]; + [displayStr appendFormat:@"(%@-%@) ", startStr, endStr]; + } + } + + [self displayAlert:@"Today's Busy Periods" + format:@"%@", displayStr]; + } else { + [self displayAlert:@"Query failed" + format:@"%@", error]; + } + [self updateUI]; + }]; + + // The service is set to fetch all pages, but for querying today's busy + // periods, we only want the first 10 results + ticket.shouldFetchNextPages = NO; + } +} + +#pragma mark Add, Edit, and Delete an ACL Rule + +- (void)addAnACLRule { + // Make a new ACL rule + GTLCalendarAclRuleScope *scope = [GTLCalendarAclRuleScope object]; + scope.type = @"user"; + scope.value = @"mark.twain@example.com"; + + GTLCalendarAclRule *newRule = [GTLCalendarAclRule object]; + newRule.role = @"reader"; + newRule.scope = scope; + + // Display the ACL edit dialog + EditACLWindowController *controller = [[[EditACLWindowController alloc] init] autorelease]; + [controller runModalForWindow:[self window] + ACLRule:newRule + completionHandler:^(NSInteger returnCode, GTLCalendarAclRule *rule) { + // Callback + if (returnCode == NSOKButton) { + [self addACLRule:rule]; + } + }]; +} + +- (void)addACLRule:(GTLCalendarAclRule *)aclRule { + GTLServiceCalendar *service = self.calendarService; + GTLCalendarCalendarListEntry *selectedCalendar = [self selectedCalendarListEntry]; + NSString *calendarID = selectedCalendar.identifier; + + GTLQueryCalendar *query = [GTLQueryCalendar queryForAclInsertWithObject:aclRule + calendarId:calendarID]; + self.editEventTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) { + // Callback + self.editEventTicket = nil; + if (error == nil) { + GTLCalendarAclRule *rule = object; + [self displayAlert:@"Added" + format:@"Added ACL rule: %@", + [self displayStringForACLRule:rule]]; + [self fetchSelectedCalendar]; + } else { + [self displayAlert:@"Add failed" + format:@"ACL rule add failed: %@", error]; + } + [self updateUI]; + }]; + [self updateUI]; +} + +- (void)editSelectedACLRule { + // Show the selected rule to the user to edit + GTLCalendarAclRule *ruleToEdit = [self selectedACLRule]; + if (ruleToEdit) { + EditACLWindowController *controller = [[[EditACLWindowController alloc] init] autorelease]; + [controller runModalForWindow:[self window] + ACLRule:ruleToEdit + completionHandler:^(NSInteger returnCode, GTLCalendarAclRule *rule) { + // Callback + if (returnCode == NSOKButton) { + [self editSelectedACLRuleWithRule:rule]; + } + }]; + } +} + +- (void)editSelectedACLRuleWithRule:(GTLCalendarAclRule *)revisedRule { + GTLServiceCalendar *service = self.calendarService; + GTLCalendarCalendarListEntry *selectedCalendarListEntry = [self selectedCalendarListEntry]; + + // We create an object reflecting just the changes from the original rule + // needing to be patched + GTLCalendarAclRule *originalRule = [self selectedACLRule]; + GTLCalendarAclRule *patchRule = [revisedRule patchObjectFromOriginal:originalRule]; + if (patchRule) { + // If patchRule is non-nil, there are some fields to be changed + NSString *calendarID = selectedCalendarListEntry.identifier; + NSString *ruleID = originalRule.identifier; + GTLQueryCalendar *query = [GTLQueryCalendar queryForAclPatchWithObject:patchRule + calendarId:calendarID + ruleId:ruleID]; + self.editEventTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) { + // Callback + self.editEventTicket = nil; + if (error == nil) { + GTLCalendarAclRule *rule = object; + [self displayAlert:@"Rule Updated" + format:@"Patched rule \"%@\"", + [self displayStringForACLRule:rule]]; + [self fetchSelectedCalendar]; + } else { + [self displayAlert:@"Update Failed" + format:@"Rule patch failed: %@", error]; + } + [self updateUI]; + }]; + [self updateUI]; + } +} + +- (void)deleteSelectedACLRule { + GTLServiceCalendar *service = self.calendarService; + + GTLCalendarCalendarListEntry *selectedCalendarListEntry = [self selectedCalendarListEntry]; + NSString *calendarID = selectedCalendarListEntry.identifier; + + GTLCalendarAclRule *selectedACLRule = [self selectedACLRule]; + NSString *ruleID = selectedACLRule.identifier; + + if (calendarID && ruleID) { + GTLQueryCalendar *query = [GTLQueryCalendar queryForAclDeleteWithCalendarId:calendarID + ruleId:ruleID]; + self.editEventTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id nilObject, NSError *error) { + // Callback + self.editEventTicket = nil; + if (error == nil) { + [self displayAlert:@"ACL Rule Deleted" + format:@"Deleted \"%@\"", + [self displayStringForACLRule:selectedACLRule]]; + [self fetchSelectedCalendar]; + } else { + [self displayAlert:@"Delete Failed" + format:@"Rule delete failed: %@", error]; + } + [self updateUI]; + }]; + [self updateUI]; + } +} + +#pragma mark Sign In + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel { + // Applications should have client ID and client secret strings + // hardcoded into the source, but the sample application asks the + // developer for the strings + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + if ([clientID length] == 0 || [clientSecret length] == 0) { + // Remind the developer that client ID and client secret are needed + [clientIDButton_ performSelector:@selector(performClick:) + withObject:self + afterDelay:0.5]; + return; + } + + // Show the OAuth 2 sign-in controller + NSBundle *frameworkBundle = [NSBundle bundleForClass:[GTMOAuth2WindowController class]]; + GTMOAuth2WindowController *windowController; + windowController = [GTMOAuth2WindowController controllerWithScope:kGTLAuthScopeCalendar + clientID:clientID + clientSecret:clientSecret + keychainItemName:kKeychainItemName + resourceBundle:frameworkBundle]; + + [windowController signInSheetModalForWindow:[self window] + completionHandler:^(GTMOAuth2Authentication *auth, + NSError *error) { + // Callback + if (error == nil) { + self.calendarService.authorizer = auth; + if (signInDoneSel) { + [self performSelector:signInDoneSel]; + } + } else { + self.calendarListFetchError = error; + [self updateUI]; + } + }]; +} + +#pragma mark UI + +- (NSString *)displayStringForACLRule:(GTLCalendarAclRule *)rule { + // Make a concise, readable string showing the scope type, scope value, + // and role value for an ACL entry, like: + // + // scope: user "fred@flintstone.com" role:owner + + NSMutableString *resultStr = [NSMutableString string]; + + GTLCalendarAclRuleScope *scope = rule.scope; + if (scope) { + NSString *type = (scope.type ? scope.type : @""); + NSString *value = @""; + if (scope.value) { + value = [NSString stringWithFormat:@"\"%@\"", scope.value]; + } + [resultStr appendFormat:@"scope: %@ %@ ", type, value]; + } + + NSString *role = rule.role; + if (role) { + [resultStr appendFormat:@"role: %@", role]; + } + return resultStr; +} + +- (void)updateUI { + BOOL isSignedIn = [self isSignedIn]; + NSString *username = [self signedInUsername]; + [signedInButton_ setTitle:(isSignedIn ? @"Sign Out" : @"Sign In")]; + [signedInField_ setStringValue:(isSignedIn ? username : @"No")]; + + // + // CalendarList table + // + [calendarTable_ reloadData]; + + if (self.calendarListTicket != nil || self.editCalendarListTicket != nil) { + [calendarProgressIndicator_ startAnimation:self]; + } else { + [calendarProgressIndicator_ stopAnimation:self]; + } + + // Get the description of the selected item, or the feed fetch error + NSString *resultStr = @""; + + if (self.calendarListFetchError) { + // Display the error + resultStr = [self.calendarListFetchError description]; + + // Also display any server data present + NSData *errData = [[self.calendarListFetchError userInfo] objectForKey:kGTMHTTPFetcherStatusDataKey]; + if (errData) { + NSString *dataStr = [[[NSString alloc] initWithData:errData + encoding:NSUTF8StringEncoding] autorelease]; + resultStr = [resultStr stringByAppendingFormat:@"\n%@", dataStr]; + } + } else { + // Display the selected item + GTLCalendarCalendarListEntry *item = [self selectedCalendarListEntry]; + if (item) { + resultStr = [item description]; + } + } + [calendarResultTextField_ setString:resultStr]; + + // + // Events list + // + [eventTable_ reloadData]; + + if (self.eventsTicket != nil || self.editEventTicket != nil) { + [eventProgressIndicator_ startAnimation:self]; + } else { + [eventProgressIndicator_ stopAnimation:self]; + } + + // Get the description of the selected item, or the feed fetch error + resultStr = @""; + switch ([entrySegmentedControl_ selectedSegment]) { + case kEventsSegment: + if (self.eventsFetchError) { + resultStr = [self.eventsFetchError description]; + } else { + GTLCalendarEvent *item = [self selectedEvent]; + if (item) { + resultStr = [item description]; + } + } + break; + case kAccessControlSegment: + if (self.ACLsFetchError) { + resultStr = [self.ACLsFetchError description]; + } else { + GTLCalendarAclRule *item = [self selectedACLRule]; + if (item) { + resultStr = [item description]; + } + } + break; + case kSettingsSegment: + if (self.settingsFetchError) { + resultStr = [self.settingsFetchError description]; + } else { + GTLCalendarSetting *item = [self selectedSetting]; + if (item) { + resultStr = [item description]; + } + } + break; + default: break; + } + + [eventResultTextField_ setString:resultStr]; + + // Enable buttons + BOOL isFetchingCalendars = (self.calendarListTicket != nil); + BOOL isEditingCalendar = (self.editCalendarListTicket != nil); + [calendarCancelButton_ setEnabled:(isFetchingCalendars || isEditingCalendar)]; + + BOOL isFetchingEvents = (self.eventsTicket != nil); + BOOL isEditingEvent = (self.editEventTicket != nil); + [eventCancelButton_ setEnabled:(isFetchingEvents || isEditingEvent)]; + + BOOL isCalendarSelected = ([self selectedCalendarListEntry] != nil); + BOOL hasNewName = ([[calendarNameField_ stringValue] length] > 0); + [addCalendarButton_ setEnabled:(isSignedIn && hasNewName)]; + [renameCalendarButton_ setEnabled:(isSignedIn && isCalendarSelected && hasNewName)]; + [deleteCalendarButton_ setEnabled:(isSignedIn && isCalendarSelected)]; + + NSInteger segment = [entrySegmentedControl_ selectedSegment]; + BOOL isEventsSegmentSelected = (segment == kEventsSegment); + BOOL isACLsSegmentSelected = (segment == kAccessControlSegment); + + if (isEventsSegmentSelected) { + // Events + BOOL isEventSelected = ([self selectedEvent] != nil); + + [addEntryButton_ setEnabled:isCalendarSelected]; + [editEntryButton_ setEnabled:isEventSelected]; + [deleteEntriesButton_ setEnabled:isEventSelected]; + } else if (isACLsSegmentSelected) { + // ACLs + BOOL isACLSelected = ([self selectedACLRule] != nil); + + [addEntryButton_ setEnabled:isCalendarSelected]; + [editEntryButton_ setEnabled:isACLSelected]; + [deleteEntriesButton_ setEnabled:isACLSelected]; + } else { + // Settings + [addEntryButton_ setEnabled:NO]; + [editEntryButton_ setEnabled:NO]; + [deleteEntriesButton_ setEnabled:NO]; + } + + [queryTodaysEventsButton_ setEnabled:isCalendarSelected]; + [queryFreeBusyButton_ setEnabled:isCalendarSelected]; + + // Show or hide the text indicating that the client ID or client secret are + // needed + BOOL hasClientIDStrings = [[clientIDField_ stringValue] length] > 0 + && [[clientSecretField_ stringValue] length] > 0; + [clientIDRequiredTextField_ setHidden:hasClientIDStrings]; +} + +- (void)displayAlert:(NSString *)title format:(NSString *)format, ... { + NSString *result = format; + if (format) { + va_list argList; + va_start(argList, format); + result = [[[NSString alloc] initWithFormat:format + arguments:argList] autorelease]; + va_end(argList); + } + NSBeginAlertSheet(title, nil, nil, nil, [self window], nil, nil, + nil, nil, @"%@", result); +} + +#pragma mark Client ID Sheet + +// Client ID and Client Secret Sheet +// +// Sample apps need this sheet to ask for the client ID and client secret +// strings +// +// Your application will just hardcode the client ID and client secret strings +// into the source rather than ask the user for them. +// +// The string values are obtained from the API Console, +// https://code.google.com/apis/console + +- (IBAction)clientIDClicked:(id)sender { + // Show the sheet for developers to enter their client ID and client secret + [NSApp beginSheet:clientIDSheet_ + modalForWindow:[self window] + modalDelegate:self + didEndSelector:@selector(clientIDSheetDidEnd:returnCode:contextInfo:) + contextInfo:NULL]; +} + +- (IBAction)clientIDDoneClicked:(id)sender { + [NSApp endSheet:clientIDSheet_ returnCode:NSOKButton]; +} + +- (void)clientIDSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { + [sheet orderOut:self]; + [self updateUI]; +} + +#pragma mark Text field delegate methods + +- (void)controlTextDidChange:(NSNotification *)note { + [self updateUI]; // enable and disable buttons +} + +#pragma mark TableView delegate and data source methods + +- (void)tableViewSelectionDidChange:(NSNotification *)notification { + if ([notification object] == calendarTable_) { + // The calendar list selection changed + [self fetchSelectedCalendar]; + } else { + // The event list selection changed + [self updateUI]; + } +} + +// Table view data source methods +- (int)numberOfRowsInTableView:(NSTableView *)tableView { + if (tableView == calendarTable_) { + return [self.calendarList.items count]; + } else { + switch ([entrySegmentedControl_ selectedSegment]) { + case kEventsSegment: return [self.events.items count]; + case kAccessControlSegment: return [self.ACLs.items count]; + case kSettingsSegment: return [self.settings.items count]; + default: return 0; + } + } +} + +- (id)tableView:(NSTableView *)tableView +objectValueForTableColumn:(NSTableColumn *)tableColumn + row:(int)row { + if (tableView == calendarTable_) { + // Calendar table + GTLCalendarCalendar *calendar = [self.calendarList itemAtIndex:row]; + NSString *str = calendar.summary; + return str; + } else { + // Events/ACLs/Settings table + switch ([entrySegmentedControl_ selectedSegment]) { + case kEventsSegment: { + GTLCalendarEvent *event = [self.events itemAtIndex:row]; + NSString *str = event.summary; + return str; + } + case kAccessControlSegment: { + GTLCalendarAclRule *rule = [self.ACLs itemAtIndex:row]; + NSString *str = [self displayStringForACLRule:rule]; + return str; + } + case kSettingsSegment: { + GTLCalendarSetting *setting = [self.settings itemAtIndex:row]; + NSString *str = [NSString stringWithFormat:@"%@: %@", + setting.identifier, setting.value]; + return str; + } + default: + return nil; + } + } +} + +@end diff --git a/GTL/Examples/CalendarSample/EditACLWindowController.h b/GTL/Examples/CalendarSample/EditACLWindowController.h new file mode 100644 index 0000000..774c092 --- /dev/null +++ b/GTL/Examples/CalendarSample/EditACLWindowController.h @@ -0,0 +1,41 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// EditACLWindowController.h +// + +#import + +#import "GTLCalendar.h" + +@interface EditACLWindowController : NSWindowController { + @private + IBOutlet NSComboBox *scopeTypeField_; + IBOutlet NSTextField *scopeValueField_; + IBOutlet NSComboBox *roleValueField_; + + void (^completionHandler_)(NSInteger returnCode, GTLCalendarAclRule *rule); + + GTLCalendarAclRule *rule_; +} + +- (void)runModalForWindow:(NSWindow *)window + ACLRule:(GTLCalendarAclRule *)rule + completionHandler:(void (^)(NSInteger returnCode, GTLCalendarAclRule *rule))handler; + +- (IBAction)saveButtonClicked:(id)sender; +- (IBAction)cancelButtonClicked:(id)sender; +@end diff --git a/GTL/Examples/CalendarSample/EditACLWindowController.m b/GTL/Examples/CalendarSample/EditACLWindowController.m new file mode 100644 index 0000000..cba1fc7 --- /dev/null +++ b/GTL/Examples/CalendarSample/EditACLWindowController.m @@ -0,0 +1,118 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// EditACLWindowController.m +// + +#import "EditACLWindowController.h" + +@implementation EditACLWindowController + +- (id)init { + return [self initWithWindowNibName:@"EditACLWindow"]; +} + +- (void)awakeFromNib { + if (rule_) { + // Copy data from the ACL entry to our dialog's controls + NSString *scopeType = rule_.scope.type; + NSString *scopeValue = rule_.scope.value; + NSString *roleValue = rule_.role; + + if (scopeType) [scopeTypeField_ setStringValue:scopeType]; + if (scopeValue) [scopeValueField_ setStringValue:scopeValue]; + if (roleValue) [roleValueField_ setStringValue:roleValue]; + + // Add standard calendar roles to the combo box's menu + NSArray *items = [NSArray arrayWithObjects: + kGTLCalendarMinAccessRoleOwner, + kGTLCalendarMinAccessRoleWriter, + kGTLCalendarMinAccessRoleReader, + kGTLCalendarMinAccessRoleFreeBusyReader, + nil]; + [roleValueField_ addItemsWithObjectValues:items]; + } +} + +- (void)dealloc { + [rule_ release]; + [super dealloc]; +} + +- (GTLCalendarAclRule *)rule { + // Copy from our dialog's controls into a copy of the original object + NSString *scopeType = [scopeTypeField_ stringValue]; + NSString *scopeValue = [scopeValueField_ stringValue]; + NSString *roleValue = [roleValueField_ stringValue]; + + GTLCalendarAclRule *rule; + if (rule_) { + rule = [[rule_ copy] autorelease]; + } else { + rule = [GTLCalendarAclRule object]; + } + + rule.role = roleValue; + rule.scope.value = scopeValue; + rule.scope.type = scopeType; + + return rule; +} + +#pragma mark - + +- (void)runModalForWindow:(NSWindow *)window + ACLRule:(GTLCalendarAclRule *)rule + completionHandler:(void (^)(NSInteger returnCode, GTLCalendarAclRule *rule))handler { + completionHandler_ = [handler copy]; + rule_ = [rule retain]; + + [NSApp beginSheet:[self window] + modalForWindow:window + modalDelegate:self + didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) + contextInfo:nil]; + + [self retain]; +} + +- (void)sheetDidEnd:(NSWindow *)sheet + returnCode:(int)returnCode + contextInfo:(void *)contextInfo { +} + +- (void)closeDialogWithReturnCode:(NSInteger)returnCode { + // Call the handler to say we're done + if (completionHandler_) { + completionHandler_(returnCode, [self rule]); + + [completionHandler_ release]; + completionHandler_ = nil; + } + + [[self window] orderOut:self]; + [NSApp endSheet:[self window]]; +} + +- (IBAction)saveButtonClicked:(id)sender { + [self closeDialogWithReturnCode:NSOKButton]; +} + +- (IBAction)cancelButtonClicked:(id)sender { + [self closeDialogWithReturnCode:NSCancelButton]; +} + +@end diff --git a/GTL/Examples/CalendarSample/EditEventWindowController.h b/GTL/Examples/CalendarSample/EditEventWindowController.h new file mode 100644 index 0000000..a451e21 --- /dev/null +++ b/GTL/Examples/CalendarSample/EditEventWindowController.h @@ -0,0 +1,46 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// EditEventWindowController.h +// + +#import + +#import "GTLCalendar.h" + +@interface EditEventWindowController : NSWindowController { + @private + IBOutlet NSTextField *titleField_; + IBOutlet NSTextField *descriptionField_; + IBOutlet NSMatrix *reminderMatrix_; + IBOutlet NSTextField *reminderMinutesField_; + IBOutlet NSPopUpButton *reminderMethodPopup_; + IBOutlet NSDatePicker *startDatePicker_; + IBOutlet NSDatePicker *endDatePicker_; + + void (^completionHandler_)(NSInteger returnCode, GTLCalendarEvent *event); + + GTLCalendarEvent *event_; +} + +- (void)runModalForWindow:(NSWindow *)window + event:(GTLCalendarEvent *)event + completionHandler:(void (^)(NSInteger returnCode, GTLCalendarEvent *event))handler; + +- (IBAction)saveButtonClicked:(id)sender; +- (IBAction)cancelButtonClicked:(id)sender; + +@end diff --git a/GTL/Examples/CalendarSample/EditEventWindowController.m b/GTL/Examples/CalendarSample/EditEventWindowController.m new file mode 100644 index 0000000..1d93e71 --- /dev/null +++ b/GTL/Examples/CalendarSample/EditEventWindowController.m @@ -0,0 +1,159 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// EditEventWindowController.m +// + +#import "EditEventWindowController.h" + +@implementation EditEventWindowController + +- (id)init { + return [self initWithWindowNibName:@"EditEventWindow"]; +} + +- (void)awakeFromNib { + if (event_) { + // Copy data from the event to our dialog's controls + NSString *title = event_.summary; + NSString *desc = event_.descriptionProperty; + + GTLDateTime *startTime = event_.start.dateTime; + GTLDateTime *endTime = event_.end.dateTime; + + // Events may provide a list of reminders to override the calendar's + // default reminders + BOOL shouldUseDefaultReminders = [event_.reminders.useDefault boolValue]; + + NSString *reminderMinutesStr = @""; + NSString *reminderMethod = nil; + if (!shouldUseDefaultReminders) { + NSArray *reminders = event_.reminders.overrides; + if ([reminders count] > 0) { + GTLCalendarEventReminder *reminder = [reminders objectAtIndex:0]; + reminderMinutesStr = [reminder.minutes stringValue]; + reminderMethod = reminder.method; + } + } + + if (title) [titleField_ setStringValue:title]; + if (desc) [descriptionField_ setStringValue:desc]; + + if (startTime) { + [startDatePicker_ setDateValue:[startTime date]]; + [startDatePicker_ setTimeZone:[startTime timeZone]]; + } + if (endTime) { + [endDatePicker_ setDateValue:[endTime date]]; + [endDatePicker_ setTimeZone:[endTime timeZone]]; + } + + [reminderMatrix_ selectCellWithTag:(shouldUseDefaultReminders ? 0 : 1)]; + [reminderMinutesField_ setStringValue:reminderMinutesStr]; + [reminderMethodPopup_ selectItemWithTitle:reminderMethod]; + } +} + +- (void)dealloc { + [event_ release]; + [super dealloc]; +} + +#pragma mark - + +- (GTLCalendarEvent *)event { + // Copy from our dialog's controls into a copy of the original event + NSString *title = [titleField_ stringValue]; + NSString *desc = [descriptionField_ stringValue]; + NSString *reminderMinStr = [reminderMinutesField_ stringValue]; + NSString *reminderMethod = [[reminderMethodPopup_ selectedItem] title]; + BOOL shouldUseDefaultReminders = ([[reminderMatrix_ selectedCell] tag] == 0); + + GTLCalendarEvent *newEvent; + if (event_) { + newEvent = [[event_ copy] autorelease]; + } else { + newEvent = [GTLCalendarEvent object]; + } + + newEvent.summary = title; + newEvent.descriptionProperty = desc; + + // Times + // + // For all-day events, use the GTLDateTime method +dateTimeForAllDayWithDate: + GTLDateTime *startDateTime = [GTLDateTime dateTimeWithDate:[startDatePicker_ dateValue] + timeZone:[startDatePicker_ timeZone]]; + GTLDateTime *endDateTime = [GTLDateTime dateTimeWithDate:[endDatePicker_ dateValue] + timeZone:[endDatePicker_ timeZone]]; + newEvent.start.dateTime = startDateTime; + newEvent.end.dateTime = endDateTime; + + // Reminders + newEvent.reminders = [GTLCalendarEventReminders object]; + newEvent.reminders.useDefault = [NSNumber numberWithBool:shouldUseDefaultReminders]; + if (!shouldUseDefaultReminders) { + GTLCalendarEventReminder *reminder = [GTLCalendarEventReminder object]; + reminder.minutes = [NSNumber numberWithInt:[reminderMinStr intValue]]; + reminder.method = reminderMethod; + + newEvent.reminders.overrides = [NSArray arrayWithObject:reminder]; + } + return newEvent; +} + +- (void)runModalForWindow:(NSWindow *)window + event:(GTLCalendarEvent *)event + completionHandler:(void (^)(NSInteger returnCode, GTLCalendarEvent *event))handler { + completionHandler_ = [handler copy]; + event_ = [event retain]; + + [NSApp beginSheet:[self window] + modalForWindow:window + modalDelegate:self + didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) + contextInfo:nil]; + + [self retain]; +} + +- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo { + +} + +- (void)closeDialogWithReturnCode:(NSInteger)returnCode { + // Call the handler to say we're done + if (completionHandler_) { + completionHandler_(returnCode, [self event]); + + [completionHandler_ release]; + completionHandler_ = nil; + } + + [[self window] orderOut:self]; + [NSApp endSheet:[self window]]; + [self autorelease]; +} + +- (IBAction)saveButtonClicked:(id)sender { + [self closeDialogWithReturnCode:NSOKButton]; +} + +- (IBAction)cancelButtonClicked:(id)sender { + [self closeDialogWithReturnCode:NSCancelButton]; +} + +@end diff --git a/GTL/Examples/CalendarSample/English.lproj/.svn/all-wcprops b/GTL/Examples/CalendarSample/English.lproj/.svn/all-wcprops new file mode 100644 index 0000000..493a50a --- /dev/null +++ b/GTL/Examples/CalendarSample/English.lproj/.svn/all-wcprops @@ -0,0 +1,35 @@ +K 25 +svn:wc:ra_dav:version-url +V 61 +/svn/!svn/ver/199/trunk/Examples/CalendarSample/English.lproj +END +InfoPlist.strings +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/98/trunk/Examples/CalendarSample/English.lproj/InfoPlist.strings +END +EditEventWindow.xib +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/98/trunk/Examples/CalendarSample/English.lproj/EditEventWindow.xib +END +CalendarSampleWindow.xib +K 25 +svn:wc:ra_dav:version-url +V 86 +/svn/!svn/ver/154/trunk/Examples/CalendarSample/English.lproj/CalendarSampleWindow.xib +END +MainMenu.xib +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/!svn/ver/98/trunk/Examples/CalendarSample/English.lproj/MainMenu.xib +END +EditACLWindow.xib +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/199/trunk/Examples/CalendarSample/English.lproj/EditACLWindow.xib +END diff --git a/GTL/Examples/CalendarSample/English.lproj/.svn/entries b/GTL/Examples/CalendarSample/English.lproj/.svn/entries new file mode 100644 index 0000000..889e924 --- /dev/null +++ b/GTL/Examples/CalendarSample/English.lproj/.svn/entries @@ -0,0 +1,198 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/CalendarSample/English.lproj +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-08-06T20:16:00.435937Z +199 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +InfoPlist.strings +file + + + + +2012-12-09T08:42:34.000000Z +bc745a35febf3350074747882fc8b7e0 +2011-11-17T15:09:17.128127Z +98 +thomasvl@gmail.com + + + + + + + + + + + + + + + + + + + + + +95 + +EditEventWindow.xib +file + + + + +2012-12-09T08:42:34.000000Z +4d805418473fe79f11972331b9bfa1f7 +2011-11-17T15:09:17.128127Z +98 +thomasvl@gmail.com + + + + + + + + + + + + + + + + + + + + + +88644 + +CalendarSampleWindow.xib +file + + + + +2012-12-09T08:42:34.000000Z +3913440c1bc64c9df399bb7cbac1728c +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +137298 + +MainMenu.xib +file + + + + +2012-12-09T08:42:34.000000Z +0b98980e6502b52149e8673f100d094c +2011-11-17T15:09:17.128127Z +98 +thomasvl@gmail.com + + + + + + + + + + + + + + + + + + + + + +103670 + +EditACLWindow.xib +file + + + + +2012-12-09T08:42:34.000000Z +a8866a610d4487cf97ec8c75261a6689 +2012-08-06T20:16:00.435937Z +199 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +36227 + diff --git a/GTL/Examples/CalendarSample/English.lproj/.svn/text-base/CalendarSampleWindow.xib.svn-base b/GTL/Examples/CalendarSample/English.lproj/.svn/text-base/CalendarSampleWindow.xib.svn-base new file mode 100644 index 0000000..ed195e6 --- /dev/null +++ b/GTL/Examples/CalendarSample/English.lproj/.svn/text-base/CalendarSampleWindow.xib.svn-base @@ -0,0 +1,3154 @@ + + + + 1070 + 11D50b + 2182 + 1138.32 + 568.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2182 + + + YES + NSUserDefaultsController + NSSegmentedControl + NSSegmentedCell + NSScroller + NSButton + NSScrollView + NSButtonCell + NSTextFieldCell + NSProgressIndicator + NSTableView + NSCustomObject + NSTextView + NSView + NSWindowTemplate + NSTextField + NSTableColumn + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + CalendarSampleWindowController + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{119, 489}, {565, 635}} + 1886912512 + CalendarSample + + NSWindow + + + View + + + {565, 635} + + + 256 + + YES + + + 265 + {{422, 556}, {129, 32}} + + + + YES + + 67239424 + 134217728 + Get Calendars + + LucidaGrande + 13 + 1044 + + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + + 266 + + YES + + + 2304 + + YES + + + 256 + {523, 95} + + + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 520 + 8 + 1000 + + 75628096 + 2048 + + + LucidaGrande + 11 + 3100 + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + 3 + MAA + + + + + 337772096 + 2048 + + + + 6 + System + controlBackgroundColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + + + 3 + YES + + + + 3 + 2 + + 3 + MQA + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + 306184192 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {523, 95}} + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 95}} + + + + + _doScroller: + 0.5 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + + + 1 + + _doScroller: + 0.99047620000000003 + + + {{20, 426}, {525, 97}} + + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 266 + + YES + + + 2304 + + YES + + + 256 + {508, 121} + + + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 505 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + + + 337772096 + 2048 + + + + + + 3 + YES + + + + 3 + 2 + + + 17 + 306184192 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {508, 121}} + + + + + + 4 + + + + 256 + {{509, 1}, {15, 121}} + + + + + _doScroller: + 0.63684209999999997 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + + + 1 + + _doScroller: + 0.96651790000000004 + + + {{20, 163}, {525, 123}} + + + + 133138 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 264 + {{118, 531}, {149, 17}} + + + + YES + + 67239424 + 272629760 + Calendars - Select One + + + + 6 + System + controlColor + + + + + + + + 1289 + + {{462, 531}, {16, 16}} + + + + 28938 + 100 + + + + 1289 + + {{469, 294}, {16, 16}} + + + + 28938 + 100 + + + + 256 + {{15, 40}, {80, 28}} + + + + YES + + 67239424 + 134348800 + Add Entry + + + -2038284033 + 1 + + LucidaGrande + 11 + 16 + + + + + + 200 + 25 + + + + + 256 + {{170, 40}, {100, 28}} + + + + YES + + 67239424 + 134348800 + Delete Entries + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 256 + {{93, 40}, {79, 28}} + + + + YES + + 67239424 + 134348800 + Edit Entry + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 292 + {{15, 13}, {140, 28}} + + + + YES + + 67239424 + 134348800 + Query Today's Events + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 266 + + YES + + + 2304 + + YES + + + 2322 + {523, 56} + + + + + + + + results + + + YES + + YES + NSColor + NSFont + + + YES + + 1 + MC40NTEwODY5NCAwLjEwNDE0NTEyIDAuMDgyODYwMjE2AA + + + Geneva + 10 + 16 + + + + + + + YES + + + 6 + + + + 523 + 1 + + + 67119969 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + 1 + MCAwIDEAA + + + + + + + 1 + + 6 + {523, 10000000} + {463, 56} + + + + {{1, 1}, {523, 56}} + + + + + + + {4, 5} + + 79691776 + + YES + + YES + + + + + file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff + + + + + + 3 + MCAwAA + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{20, 360}, {525, 58}} + + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + + 274 + + YES + + + 2304 + + YES + + + 2322 + {426, 77} + + + + + + + + results + + + YES + + YES + NSColor + NSFont + + + YES + + 1 + MC45Njg2Mjc0NSAwLjIzNTI5NDEyIDAuMTg4MjM1MwA + + + + + + + + YES + + + 6 + + + + 426 + 1 + + + 67119969 + 0 + + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + + + + + + 1 + + 6 + {463, 10000000} + {366, 77} + + + + {{1, 1}, {523, 77}} + + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 77}} + + + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{20, 76}, {525, 79}} + + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + + 265 + {{485, 530}, {54, 16}} + + + + YES + + 67239424 + 134479872 + Cancel + + LucidaGrande + 9 + 3614 + + + -2038284033 + 1 + + LucidaGrande + 9 + 16 + + + + + + 200 + 25 + + + + + 265 + {{492, 293}, {54, 16}} + + + + YES + + 67239424 + 134479872 + Cancel + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 268 + {{18, 291}, {218, 20}} + + + + YES + + 67239424 + 131072 + + + + YES + + 54 + Events + YES + 2 + + + 97 + Access Control + 1 + 2 + + + Settings + 2 + + + + + + + 268 + {{239, 295}, {147, 17}} + + + + YES + + 67239424 + 272629760 + Entries - select one + + + + + + + + + 268 + {{18, 527}, {97, 20}} + + + + YES + + 67239424 + 131072 + + + + YES + + 34 + All + YES + 2 + + + 56 + Owned + 1 + 2 + + + + + + + 266 + {{148, 330}, {164, 19}} + + + + YES + + -1804468671 + 272761856 + + + + YES + + 6 + System + textBackgroundColor + + + + 6 + System + textColor + + + + + + + 268 + {{17, 332}, {126, 14}} + + + + YES + + 67239424 + 272629760 + Owned calendar name: + + + + + + + + + 265 + {{315, 323}, {64, 28}} + + + + YES + + 67239424 + 134348800 + Add + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 265 + {{464, 324}, {79, 28}} + + + + YES + + 67239424 + 134348800 + Delete + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 265 + {{377, 323}, {69, 28}} + + + + YES + + 67239424 + 134348800 + Rename + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 289 + {{419, 19}, {148, 18}} + + + + YES + + 67239424 + 131072 + Log http to desktop + + + 1211912703 + 2 + + NSSwitch + + + + 200 + 25 + + + + + 264 + {{90, 569}, {71, 17}} + + + + YES + + 67239424 + 272629760 + Signed In: + + + + + + + + + 266 + {{163, 569}, {247, 17}} + + + + YES + + 67239424 + 272629760 + No + + + + + + + + + 268 + {{15, 562}, {72, 28}} + + + + YES + + 67239424 + 134348800 + Sign Out + + + -2038284033 + 129 + + + 200 + 25 + + + + + 268 + {{15, 589}, {83, 28}} + + + + YES + + -2080244224 + 134348800 + Client ID... + + + -2038284033 + 129 + + + 200 + 25 + + + + + 264 + {{102, 596}, {178, 14}} + + + + YES + + 67239424 + 272760832 + Client ID and Secret Required + + + + + + + + + 292 + {{153, 12}, {159, 28}} + + + + YES + + 67239424 + 134348800 + Query Today's Free/Busy + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + {565, 635} + + + + + {{0, 0}, {1920, 1178}} + {565, 657} + {10000000000000, 10000000000000} + YES + + + YES + + + 3 + 2 + {{235, 275}, {458, 284}} + 611844096 + Client ID Sheet + NSWindow + + + + + 256 + + YES + + + 266 + {{118, 143}, {320, 22}} + + + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 143}, {63, 17}} + + + + YES + + 68288064 + 272630784 + Client ID: + + + + + + + + + 266 + {{118, 112}, {320, 22}} + + + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 117}, {88, 17}} + + + + YES + + 68288064 + 272630784 + Client Secret: + + + + + + + + + 268 + {{342, 78}, {74, 22}} + + + + YES + + 67239424 + 134348800 + API Console + + + -2038284033 + 134 + + + 200 + 25 + + + + + 268 + {{17, 82}, {316, 17}} + + + + YES + + 68288064 + 272630784 + Client ID and Client Secret are obtained from the + + + + + + + + + 268 + {{17, 204}, {424, 34}} + + + + YES + + 67239424 + 138412032 + Each application should have a client ID and client secret hardcoded into the source. + + + + + + + + + 268 + {{348, 12}, {96, 32}} + + + + YES + + 67239424 + 134217728 + Done + + + -2038284033 + 129 + + DQ + 200 + 25 + + + + {458, 284} + + + + + {{0, 0}, {1920, 1178}} + {10000000000000, 10000000000000} + YES + + + + + YES + + + window + + + + 16 + + + + loggingCheckboxClicked: + + + + 132 + + + + APIConsoleClicked: + + + + 229 + + + + clientIDDoneClicked: + + + + 230 + + + + clientIDClicked: + + + + 251 + + + + signInClicked: + + + + 252 + + + + getCalendarList: + + + + 253 + + + + cancelCalendarFetch: + + + + 254 + + + + cancelEventsFetch: + + + + 256 + + + + entrySegmentClicked: + + + + 257 + + + + addCalendar: + + + + 258 + + + + renameCalendar: + + + + 259 + + + + deleteCalendar: + + + + 260 + + + + getCalendarList: + + + + 261 + + + + addEntry: + + + + 262 + + + + editEntry: + + + + 263 + + + + deleteEntries: + + + + 264 + + + + signedInField_ + + + + 270 + + + + signedInButton_ + + + + 271 + + + + calendarTable_ + + + + 272 + + + + calendarProgressIndicator_ + + + + 273 + + + + calendarResultTextField_ + + + + 274 + + + + calendarCancelButton_ + + + + 275 + + + + calendarSegmentedControl_ + + + + 276 + + + + addCalendarButton_ + + + + 277 + + + + renameCalendarButton_ + + + + 278 + + + + deleteCalendarButton_ + + + + 279 + + + + calendarNameField_ + + + + 280 + + + + eventTable_ + + + + 281 + + + + eventProgressIndicator_ + + + + 282 + + + + eventResultTextField_ + + + + 283 + + + + eventCancelButton_ + + + + 284 + + + + addEntryButton_ + + + + 285 + + + + editEntryButton_ + + + + 286 + + + + deleteEntriesButton_ + + + + 287 + + + + entrySegmentedControl_ + + + + 290 + + + + clientIDButton_ + + + + 291 + + + + clientIDRequiredTextField_ + + + + 292 + + + + clientIDSheet_ + + + + 293 + + + + clientIDField_ + + + + 294 + + + + clientSecretField_ + + + + 295 + + + + queryTodayClicked: + + + + 298 + + + + queryTodaysEventsButton_ + + + + 299 + + + + queryFreeBusyClicked: + + + + 303 + + + + queryFreeBusyButton_ + + + + 304 + + + + delegate + + + + 15 + + + + dataSource + + + + 34 + + + + delegate + + + + 35 + + + + delegate + + + + 36 + + + + dataSource + + + + 37 + + + + delegate + + + + 122 + + + + value: values.clientSecret + + + + + + value: values.clientSecret + value + values.clientSecret + 2 + + + 243 + + + + value: values.clientID + + + + + + value: values.clientID + value + values.clientID + 2 + + + 242 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 5 + + + YES + + + + Window + + + 6 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 17 + + + YES + + + + + + 24 + + + YES + + + + + + + + 25 + + + YES + + + + + + 26 + + + YES + + + + + + 28 + + + YES + + + + + + + + 29 + + + YES + + + + + + 30 + + + YES + + + + + + 38 + + + YES + + + + + + 40 + + + + + 41 + + + + + 56 + + + YES + + + + + + 57 + + + YES + + + + + + 58 + + + YES + + + + + + 59 + + + YES + + + + + + 80 + + + YES + + + + + + + + 81 + + + + + 82 + + + YES + + + + + + + + 83 + + + + + 86 + + + YES + + + + + + 87 + + + YES + + + + + + 92 + + + YES + + + + + + 95 + + + YES + + + + + + 109 + + + YES + + + + + + 113 + + + YES + + + + + + 115 + + + YES + + + + + + 116 + + + YES + + + + + + 117 + + + YES + + + + + + 128 + + + YES + + + + + + 131 + + + YES + + + + + + 44 + + + Shared Defaults + + + 175 + + + + + 176 + + + + + 177 + + + + + 178 + + + + + 179 + + + + + 180 + + + + + 181 + + + + + 182 + + + + + 183 + + + + + 184 + + + + + 185 + + + + + 186 + + + + + 187 + + + + + 188 + + + + + 189 + + + + + 190 + + + + + 191 + + + + + 193 + + + + + 194 + + + + + 195 + + + + + 196 + + + + + 197 + + + + + 198 + + + + + 199 + + + + + 200 + + + + + 201 + + + + + 202 + + + + + 208 + + + YES + + + + + + 209 + + + YES + + + + + + + + + + + + + 210 + + + YES + + + + + + 211 + + + YES + + + + + + 212 + + + YES + + + + + + 213 + + + YES + + + + + + 214 + + + YES + + + + + + 215 + + + YES + + + + + + 216 + + + YES + + + + + + 217 + + + YES + + + + + + 218 + + + + + 219 + + + + + 220 + + + + + 221 + + + + + 222 + + + + + 223 + + + + + 224 + + + + + 225 + + + + + 231 + + + YES + + + + + + 232 + + + YES + + + + + + 233 + + + YES + + + + + + 234 + + + YES + + + + + + 235 + + + YES + + + + + + 236 + + + + + 237 + + + + + 238 + + + + + 239 + + + + + 240 + + + + + 300 + + + YES + + + + + + 301 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 109.IBPluginDependency + 113.IBPluginDependency + 115.IBPluginDependency + 116.IBPluginDependency + 117.IBPluginDependency + 128.IBPluginDependency + 131.IBPluginDependency + 17.IBPluginDependency + 175.IBPluginDependency + 176.IBPluginDependency + 177.IBPluginDependency + 178.IBPluginDependency + 179.IBPluginDependency + 180.IBPluginDependency + 181.IBPluginDependency + 182.IBPluginDependency + 183.IBPluginDependency + 184.IBPluginDependency + 185.IBPluginDependency + 186.IBPluginDependency + 187.IBPluginDependency + 188.IBPluginDependency + 189.IBPluginDependency + 190.IBPluginDependency + 191.IBPluginDependency + 193.IBPluginDependency + 193.IBShouldRemoveOnLegacySave + 194.IBPluginDependency + 194.IBShouldRemoveOnLegacySave + 195.IBPluginDependency + 195.IBShouldRemoveOnLegacySave + 196.IBPluginDependency + 196.IBShouldRemoveOnLegacySave + 197.IBPluginDependency + 197.IBShouldRemoveOnLegacySave + 198.IBPluginDependency + 198.IBShouldRemoveOnLegacySave + 199.IBPluginDependency + 199.IBShouldRemoveOnLegacySave + 200.IBPluginDependency + 200.IBShouldRemoveOnLegacySave + 201.IBPluginDependency + 201.IBShouldRemoveOnLegacySave + 202.IBPluginDependency + 202.IBShouldRemoveOnLegacySave + 208.IBPluginDependency + 208.IBWindowTemplateEditedContentRect + 208.NSWindowTemplate.visibleAtLaunch + 209.IBPluginDependency + 210.IBPluginDependency + 211.IBPluginDependency + 212.IBPluginDependency + 213.IBPluginDependency + 214.IBPluginDependency + 215.IBPluginDependency + 216.IBPluginDependency + 217.IBPluginDependency + 218.IBPluginDependency + 219.IBPluginDependency + 220.IBPluginDependency + 221.IBPluginDependency + 222.IBPluginDependency + 223.IBPluginDependency + 224.IBPluginDependency + 225.IBPluginDependency + 231.IBPluginDependency + 232.IBPluginDependency + 233.IBPluginDependency + 234.IBPluginDependency + 235.IBPluginDependency + 236.IBPluginDependency + 237.IBPluginDependency + 238.IBPluginDependency + 239.IBPluginDependency + 24.IBPluginDependency + 240.IBPluginDependency + 25.IBPluginDependency + 26.IBPluginDependency + 28.IBPluginDependency + 29.IBPluginDependency + 30.IBPluginDependency + 300.IBPluginDependency + 301.IBPluginDependency + 38.IBPluginDependency + 40.IBPluginDependency + 41.IBPluginDependency + 44.IBPluginDependency + 5.IBPluginDependency + 5.IBWindowTemplateEditedContentRect + 56.IBPluginDependency + 57.IBPluginDependency + 58.IBPluginDependency + 59.IBPluginDependency + 6.IBPluginDependency + 80.IBPluginDependency + 81.IBPluginDependency + 82.IBPluginDependency + 83.IBPluginDependency + 86.IBPluginDependency + 87.IBPluginDependency + 92.IBPluginDependency + 95.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + {{129, 872}, {458, 284}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{99, 519}, {565, 635}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 304 + + + + YES + + CalendarSampleWindowController + NSWindowController + + YES + + YES + APIConsoleClicked: + addCalendar: + addEntry: + cancelCalendarFetch: + cancelEventsFetch: + clientIDClicked: + clientIDDoneClicked: + deleteCalendar: + deleteEntries: + editEntry: + entrySegmentClicked: + getCalendarList: + loggingCheckboxClicked: + queryFreeBusyClicked: + queryTodayClicked: + renameCalendar: + signInClicked: + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + APIConsoleClicked: + addCalendar: + addEntry: + cancelCalendarFetch: + cancelEventsFetch: + clientIDClicked: + clientIDDoneClicked: + deleteCalendar: + deleteEntries: + editEntry: + entrySegmentClicked: + getCalendarList: + loggingCheckboxClicked: + queryFreeBusyClicked: + queryTodayClicked: + renameCalendar: + signInClicked: + + + YES + + APIConsoleClicked: + id + + + addCalendar: + id + + + addEntry: + id + + + cancelCalendarFetch: + id + + + cancelEventsFetch: + id + + + clientIDClicked: + id + + + clientIDDoneClicked: + id + + + deleteCalendar: + id + + + deleteEntries: + id + + + editEntry: + id + + + entrySegmentClicked: + id + + + getCalendarList: + id + + + loggingCheckboxClicked: + id + + + queryFreeBusyClicked: + id + + + queryTodayClicked: + id + + + renameCalendar: + id + + + signInClicked: + id + + + + + YES + + YES + addCalendarButton_ + addEntryButton_ + calendarCancelButton_ + calendarNameField_ + calendarProgressIndicator_ + calendarResultTextField_ + calendarSegmentedControl_ + calendarTable_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + deleteCalendarButton_ + deleteEntriesButton_ + editEntryButton_ + entrySegmentedControl_ + eventCancelButton_ + eventProgressIndicator_ + eventResultTextField_ + eventTable_ + queryFreeBusyButton_ + queryTodaysEventsButton_ + renameCalendarButton_ + signedInButton_ + signedInField_ + + + YES + NSButton + NSButton + NSButton + NSTextField + NSProgressIndicator + NSTextView + NSSegmentedControl + NSTableView + NSButton + NSTextField + NSTextField + NSWindow + NSTextField + NSButton + NSButton + NSButton + NSSegmentedControl + NSButton + NSProgressIndicator + NSTextView + NSTableView + NSButton + NSButton + NSButton + NSButton + NSTextField + + + + YES + + YES + addCalendarButton_ + addEntryButton_ + calendarCancelButton_ + calendarNameField_ + calendarProgressIndicator_ + calendarResultTextField_ + calendarSegmentedControl_ + calendarTable_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + deleteCalendarButton_ + deleteEntriesButton_ + editEntryButton_ + entrySegmentedControl_ + eventCancelButton_ + eventProgressIndicator_ + eventResultTextField_ + eventTable_ + queryFreeBusyButton_ + queryTodaysEventsButton_ + renameCalendarButton_ + signedInButton_ + signedInField_ + + + YES + + addCalendarButton_ + NSButton + + + addEntryButton_ + NSButton + + + calendarCancelButton_ + NSButton + + + calendarNameField_ + NSTextField + + + calendarProgressIndicator_ + NSProgressIndicator + + + calendarResultTextField_ + NSTextView + + + calendarSegmentedControl_ + NSSegmentedControl + + + calendarTable_ + NSTableView + + + clientIDButton_ + NSButton + + + clientIDField_ + NSTextField + + + clientIDRequiredTextField_ + NSTextField + + + clientIDSheet_ + NSWindow + + + clientSecretField_ + NSTextField + + + deleteCalendarButton_ + NSButton + + + deleteEntriesButton_ + NSButton + + + editEntryButton_ + NSButton + + + entrySegmentedControl_ + NSSegmentedControl + + + eventCancelButton_ + NSButton + + + eventProgressIndicator_ + NSProgressIndicator + + + eventResultTextField_ + NSTextView + + + eventTable_ + NSTableView + + + queryFreeBusyButton_ + NSButton + + + queryTodaysEventsButton_ + NSButton + + + renameCalendarButton_ + NSButton + + + signedInButton_ + NSButton + + + signedInField_ + NSTextField + + + + + IBProjectSource + ./Classes/CalendarSampleWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + diff --git a/GTL/Examples/CalendarSample/English.lproj/.svn/text-base/EditACLWindow.xib.svn-base b/GTL/Examples/CalendarSample/English.lproj/.svn/text-base/EditACLWindow.xib.svn-base new file mode 100644 index 0000000..b55a3b3 --- /dev/null +++ b/GTL/Examples/CalendarSample/English.lproj/.svn/text-base/EditACLWindow.xib.svn-base @@ -0,0 +1,824 @@ + + + + 1050 + 11E53 + 2818 + 1138.47 + 569.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2818 + + + YES + NSBox + NSButton + NSButtonCell + NSComboBox + NSComboBoxCell + NSCustomObject + NSTextField + NSTextFieldCell + NSView + NSWindowTemplate + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + EditACLWindowController + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{88, 481}, {478, 177}} + 1886912512 + + Window + + + NSWindow + + + View + + + {412, 177} + + + 256 + + YES + + + 268 + {{17, 129}, {114, 17}} + + YES + + 67239424 + 272629760 + Scope + + LucidaGrande + 13 + 1044 + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 268 + {{76, 140}, {61, 17}} + + YES + + 67239424 + 71303168 + Type: + + + + + + + + + 268 + {{76, 115}, {61, 17}} + + YES + + 67239424 + 71303168 + VmFsdWU6Cg + + + + + + + + + 268 + {{17, 68}, {114, 17}} + + YES + + 67239424 + 272629760 + Role + + + + + + + + + 268 + {{76, 68}, {61, 17}} + + YES + + 67239424 + 71303168 + VmFsdWU6Cg + + + + + + + + + 266 + {{142, 114}, {316, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 6 + System + textColor + + + + + + + 266 + {{142, 136}, {319, 26}} + + YES + + 343014976 + 272630784 + user + + + YES + + + 5 + YES + + YES + user + domain + default + + + + + 274 + {13, 63} + + + YES + + YES + + 10 + 10 + 1000 + + 75628032 + 0 + + + + + LucidaGrande + 12 + 16 + + + 3 + MC4zMzMzMzI5OQA + + + + + 338820672 + 1024 + + + YES + + 6 + System + controlBackgroundColor + + + + + 3 + YES + + + + 3 + 2 + + + 6 + System + gridColor + + 3 + MC41AA + + + 19 + tableViewAction: + -765427712 + + + + 1 + 15 + 0 + YES + 0 + 1 + + + + + + 289 + {{382, 12}, {82, 32}} + + YES + + 67239424 + 134217728 + Save + + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + + 289 + {{300, 12}, {82, 32}} + + YES + + 67239424 + 134217728 + Cancel + + + -2038284033 + 1 + + + Gw + 200 + 25 + + + + + 266 + {{20, 97}, {438, 5}} + + {0, 0} + + 67239424 + 0 + Box + + + + 3 + MCAwLjgwMDAwMDAxAA + + + 3 + 2 + 0 + NO + + + + 266 + {{142, 64}, {319, 26}} + + YES + + 343014976 + 272630784 + + + + + + YES + + + 5 + YES + + + + 274 + {15, 0} + + + YES + + YES + + 12 + 10 + 1000 + + 75628032 + 0 + + + + 3 + MC4zMzMzMzI5OQA + + + + + 338820672 + 1024 + + + YES + + + + 3 + YES + + + + 3 + 2 + + + 19 + tableViewAction: + -767524864 + + + + 1 + 15 + 0 + YES + 0 + 1 + + + + + {478, 177} + + + {{0, 0}, {1920, 1178}} + {412, 199} + {10000000000000, 10000000000000} + YES + + + + 256 + {125, 1} + + + + + YES + + + window + + + + 29 + + + + saveButtonClicked: + + + + 30 + + + + cancelButtonClicked: + + + + 31 + + + + scopeTypeField_ + + + + 45 + + + + scopeValueField_ + + + + 46 + + + + roleValueField_ + + + + 47 + + + + okButton_ + + + + 48 + + + + cancelButton_ + + + + 49 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + 5 + + + YES + + + + Window + + + 6 + + + YES + + + + + + + + + + + + + + + + 7 + + + YES + + + + + + 8 + + + YES + + + + + + 9 + + + YES + + + + + + 10 + + + YES + + + + + + 11 + + + YES + + + + + + 13 + + + YES + + + + + + 14 + + + YES + + + + + + 15 + + + YES + + + + + + 16 + + + YES + + + + + + 22 + + + YES + + + + + 32 + + + YES + + + + + + 35 + + + + + 36 + + + + + 37 + + + + + 38 + + + + + 39 + + + + + 40 + + + + + 41 + + + + + 42 + + + + + 43 + + + + + 44 + + + + + -3 + + + Application + + + 23 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 10.IBPluginDependency + 11.IBPluginDependency + 13.IBPluginDependency + 14.IBPluginDependency + 15.IBPluginDependency + 16.IBPluginDependency + 22.IBPluginDependency + 23.IBPluginDependency + 32.IBPluginDependency + 35.IBPluginDependency + 36.IBPluginDependency + 37.IBPluginDependency + 38.IBPluginDependency + 39.IBPluginDependency + 40.IBPluginDependency + 41.IBPluginDependency + 42.IBPluginDependency + 43.IBPluginDependency + 44.IBPluginDependency + 5.IBPluginDependency + 6.IBPluginDependency + 7.IBPluginDependency + 8.IBPluginDependency + 9.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 49 + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + diff --git a/GTL/Examples/CalendarSample/English.lproj/.svn/text-base/EditEventWindow.xib.svn-base b/GTL/Examples/CalendarSample/English.lproj/.svn/text-base/EditEventWindow.xib.svn-base new file mode 100644 index 0000000..b54c90a --- /dev/null +++ b/GTL/Examples/CalendarSample/English.lproj/.svn/text-base/EditEventWindow.xib.svn-base @@ -0,0 +1,1912 @@ + + + + 1050 + 10J869 + 851 + 1038.35 + 461.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 851 + + + YES + + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + EditEventWindowController + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{134, 425}, {480, 244}} + 1886912512 + Window + + NSWindow + + + View + + {1.79769e+308, 1.79769e+308} + {480, 222} + + + 256 + + YES + + + 268 + {{28, 207}, {36, 17}} + + YES + + 67239424 + 272629760 + Title: + + LucidaGrande + 13 + 1044 + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 266 + {{114, 205}, {346, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 6 + System + textColor + + + + + + + 268 + {{28, 173}, {81, 17}} + + YES + + 67239424 + 272629760 + Description: + + + + + + + + + 266 + {{114, 171}, {346, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{114, 141}, {169, 27}} + + YES + + 71433728 + 0 + + 0.0 + + + + 0.0 + 236 + + 6 + System + controlBackgroundColor + + + + + + + + 268 + {{28, 144}, {38, 17}} + + YES + + 67239424 + 272629760 + Start: + + + + + + + + + 268 + {{114, 111}, {169, 27}} + + YES + + 71433728 + 0 + + 0.0 + + + + 0.0 + 236 + + + + + + + 268 + {{28, 114}, {38, 17}} + + YES + + 67239424 + 272629760 + End: + + + + + + + + + 268 + {{168, 61}, {50, 14}} + + YES + + 67239424 + 272760832 + Minutes: + + LucidaGrande + 11 + 3100 + + + + + + + + + 268 + {{223, 58}, {58, 19}} + + YES + + -1804468671 + 272761856 + + + + YES + + + + + + + 265 + {{384, 12}, {82, 32}} + + YES + + 67239424 + 134217728 + Save + + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + + 265 + {{302, 12}, {82, 32}} + + YES + + 67239424 + 134217728 + Cancel + + + -2038284033 + 1 + + + Gw + 200 + 25 + + + + + 268 + {{291, 61}, {48, 14}} + + YES + + 67239424 + 272760832 + Method: + + + + + + + + + 268 + {{342, 55}, {100, 22}} + + YES + + -2076049856 + 133120 + + + 109199615 + 129 + + + 400 + 75 + + + popup + + 1048576 + 2147483647 + 1 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + _popUpItemAction: + + + YES + + OtherViews + + YES + + + sms + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + email + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + + + 2 + 1 + YES + YES + 2 + + + + + 268 + {{31, 59}, {139, 38}} + + YES + 2 + 1 + + YES + + -2080244224 + 0 + Default Reminders + + + 1211912703 + 0 + + NSRadioButton + + + + 200 + 25 + + + 67239424 + 0 + Override + + + 1 + 1211912703 + 0 + + 549453824 + {18, 18} + + YES + + YES + + + + TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw +IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/ +29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5 +dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA +AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG +AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/ +0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/ +7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/ +5eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/ +3t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD +AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns +AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/ +6+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/ +/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/ +///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl +YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA +AAAAAAAAAAUAAAAfAAAAZTMzM8KAgIDwv7+//O3t7f/t7e3/v7+//ICAgPAzMzPCAAAAZQAAAB8AAAAF +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAFwAAAEMAAAB3AAAAnwAAALMAAACzAAAAnwAAAHcAAABD +AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu +AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgEAAAMAAAABABIAAAEB +AAMAAAABABIAAAECAAMAAAAEAAAFxgEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES +AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS +AAMAAAABAAEAAAFTAAMAAAAEAAAFzodzAAcAAAwYAAAF1gAAAAAACAAIAAgACAABAAEAAQABAAAMGGFw +cGwCAAAAbW50clJHQiBYWVogB9YABAADABMALAASYWNzcEFQUEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAPbWAAEAAAAA0y1hcHBsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAOclhZWgAAASwAAAAUZ1hZWgAAAUAAAAAUYlhZWgAAAVQAAAAUd3RwdAAAAWgAAAAUY2hhZAAA +AXwAAAAsclRSQwAAAagAAAAOZ1RSQwAAAbgAAAAOYlRSQwAAAcgAAAAOdmNndAAAAdgAAAMSbmRpbgAA +BOwAAAY+ZGVzYwAACywAAABkZHNjbQAAC5AAAAAubW1vZAAAC8AAAAAoY3BydAAAC+gAAAAtWFlaIAAA +AAAAAF1KAAA0kQAACCVYWVogAAAAAAAAdCAAALRgAAAjPVhZWiAAAAAAAAAlbAAAFyoAAKfDWFlaIAAA +AAAAAPNSAAEAAAABFs9zZjMyAAAAAAABDEIAAAXe///zJgAAB5IAAP2R///7ov///aMAAAPcAADAbGN1 +cnYAAAAAAAAAAQHNAABjdXJ2AAAAAAAAAAEBzQAAY3VydgAAAAAAAAABAc0AAHZjZ3QAAAAAAAAAAAAD +AQAAAQACBAUGBwkKCw0ODxASExQWFxgaGxweHyAiIyQmJygpKywtLzAxMjM1Njc4OTs8PT5AQUJDREZH +SElKS0xOT1BRUlNUVVZXWFlaW1xdXl9hYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gIGCg4SF +hoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnZ6foKGio6SlpqanqKmqq6ytra6vsLGysrO0tba3uLi5uru8 +vL2+v8DBwcLDxMXGxsfIycrKy8zNzs7P0NHS0tPU1dbW19jZ2drb3Nzd3t/g4eLi4+Tl5ufo6enq6+zt +7u/w8fHy8/T19vf4+fr7/P3+/v8AAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR8gISIjJCUnKCkq +Ky0uLzAxMzQ1Njc4OTo7PD0/QEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaWltcXV5fYGFiY2RlZmdo +aWprbG1ub3BxcnN0dXZ3d3h5ent8fH1+f4CBgoKDhIWGh4iIiYqLjI2Oj5CRkpOUlJWWl5iZmpucnZ2e +n6ChoqOkpaamp6ipqqusra6vsLCxsrO0tba3uLm5uru8vb6/wMHCw8TFx8jJysvMzc7P0NDR0tPU1dbX +2Nna29ze3+Dh4uPk5ebn6err7O3u7/Hy8/T19vf5+vv8/f7/AAIDAwQFBgcICQoKCwwNDg8QERITFBUW +FxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODg5Ojs8PT4+P0BBQkNDREVGR0hJSUpLTE1O +Tk9QUVJSU1RVVVZXWFhZWltbXF1eXl9gYWFiY2RkZWZnZ2hpaWprbGxtbm5vcHFxcnNzdHV1dnd4eHl6 +ent8fH1+fn+AgYGCg4SEhYaHiImJiouMjY6Oj5CRkpOTlJWWl5iZmZqbnJ2en6ChoqOkpaanqKmqq6yt +rq+xsrO0tba3uLq7vL2+wMHDxMbHycrMzs/R0tTW19nb3d7g4uTm6Ors7vDy9Pb4+vz+/wAAbmRpbgAA +AAAAAAY2AACXGgAAVjoAAFPKAACJ3gAAJ8IAABaoAABQDQAAVDkAAiuFAAIZmQABeFEAAwEAAAIAAAAA +AAEABgANABcAIwAxAEAAUgBlAHsAkwCrAMUA4gD/AR8BPwFhAYUBqgHQAfgCIAJLAncCpQLSAwIDMwNl +A5gDzgQFBD0EdQSvBOsFKQVnBacF6AYqBm4GtQb8B0UHkgfkCDkIkAjnCT4JmAn0ClAKrQsLC2sLygwq +DIwM8Q1XDcAOKA6SDv4PbA/bEE0QxBE7EbQSMRKwEzITuRREFNAVYBXxFocXHhfAGGIZBBmsGlQa+RuU +HC4czh1yHhQeux9jIA0gvCFoIhkizyOJJEEk+SW6JnknOygFKMspkypiKzIsASzXLawuhy9gMD4xGzH8 +MtszvzSgNYY2cjdcOEw5OTorOxs8CD0EPfU+6z/nQOFB2ELUQ9VE00XcRttH5EjxSgBLCUwdTTFOUE9v +UI9Rt1LdVAVVNlZsV6VY4FohW21ct135X09goGH0Y0tkqGYFZ19oxGova5ptCG54b/BxbnLsdG119Xd/ +eQh6knwqfcV/W4D4gpSEO4Xih4CJKorYjIqOOY/jkZuTWJUOlsyYiZpSnB6d4Z+soX+jWqUvpxOo+6rj +rMuuwLC4sra0rra0uL+60LzfvwDBHcLdxLXGhchYyi7MCs3lz7rRmtOA1WPXR9kq2xPc/97s4M/iveSn +5o3obupT7ELuLPAM8fLz0PW396H5f/tZ/T3//wAAAAEAAwALABYAJQA3AE0AZQCBAJ8AwQDlAQsBNQFh +AZABwQH1AisCZAKfAtwDHANfA6MD6gQ0BH8EzQT1BR0FcAXEBhsGdAbPBy0HXAeMB+4IUgi4CSAJVAmK +CfYKZArVC0cLgQu8DDIMqw0mDaIOIQ6hDyQPqRAvELgQ/RFDEc8SXRLuE4AUFRSrFUMV3RZ5FxcXthhY +GPwZoRpIGvEbnBxJHPgdqB5bHw8fxSB9ITch8iKwJDAk8yW3Jn4nRigQKNwpqSp5K0osHCzxLccuoC95 +MFUxMzISMvMz1TS5NaA2hzdxOFw5STo4Oyg8Gj4DPvs/9EDuQepD6ETpRexG8Uf3SP9LFEwhTTBOQE9S +UGZSklOrVMVV4Vb/WB5ZP1phW4Vcq13SXvthUmJ/Y69k4GYSZ0dofGm0au1tZG6ib+FxInJlc6l073Y2 +d396FXtjfLJ+A39VgKmB/4NWhK+GCYjCiiGLgYzjjkePrJESknuT5Ja8mCuZm5sMnH+d9J9qoOGiWqPV +pVGmz6eOqE6pzqtRrNSuWq/gsWmy8rR+tgu5Kbq6vE294b93wQ7Cp8RBxd3He8kZyrrLisxbzf/Po9FK +0vHUm9ZF1/HZn9tO3Cbc/96x4GTiGePQ5YjnQegf6Pzquex27jbv9/G583z0X/VC9wj40Pqa/GX+Mf// +AAAAAQADAAsAJQA3AE0AZQCBAJ8AwQELATUBYQGQAcEB9QIrAmQCnwLcAxwDXwOjA+oENAR/BM0FHQVw +BcQGGwZ0Bs8HLQeMB+4IUgi4CSAJign2CmQK1QtHC7wMMgyrDSYNog4hDqEPJA+pEC8QuBFDEl0S7hOA +FBUUqxVDFnkXFxe2GFgY/BpIGvEbnBxJHPgdqB8PH8UgfSE3IfIjbyQwJPMltydGKBAo3Cp5K0osHC3H +LqAveTEzMhIy8zS5NaA2hzhcOUk6ODwaPQ4+Az/0QO5C6EPoROlG8Uf3SglLFEwhTkBPUlF7UpJUxVXh +Vv9ZP1phXKtd0mAlYVJjr2TgZhJofGm0au1tZG6ib+FxInJldO92Nnd/eMl6FXyyfgN/VYCpgf+Er4YJ +h2WIwoohi4GOR4+skRKSe5PklVCWvJgrmZubDJx/nfSfaqDholqj1aVRps+oTqnOq1Gs1K2Xrlqv4LFp +svK0frYLt5m5Kbnxurq8Tb3hv3fBDsHawqfEQcUPxd3He8hKyRnKusuKzFvN/87Rz6PQdtFK0vHTxtSb +1kXXG9fx2MjZn9tO3Cbc/93Y3rHfiuBk4hni9ePQ5KzliOZk50HoH+j86drqueuX7HbtVu427xbv9/DX +8bnymvN89F/1QvYl9wj37PjQ+bX6mvt//GX9S/4x//8AAGRlc2MAAAAAAAAACkNvbG9yIExDRAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAABIAAAAcAEMAbwBsAG8AcgAgAEwAQwBE +AABtbW9kAAAAAAAABhAAAJxOAAAAAL5zkQAAAAAAAAAAAAAAAAAAAAAAdGV4dAAAAABDb3B5cmlnaHQg +QXBwbGUgQ29tcHV0ZXIsIEluYy4sIDIwMDUAAAAAA + + + + + + 3 + MCAwAA + + + + 400 + 75 + + + {139, 18} + {4, 2} + 1151868928 + NSActionCell + + 67239424 + 0 + Radio + + 1211912703 + 0 + + 549453824 + {18, 18} + + YES + + YES + + + + TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw +IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/ +29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5 +dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA +AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG +AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/ +0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/ +7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/ +5eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/ +3t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD +AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns +AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/ +6+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/ +/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/ +///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl +YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA +AAAAAAAAAAUAAAAfAAAAZTMzM8KAgIDwv7+//O3t7f/t7e3/v7+//ICAgPAzMzPCAAAAZQAAAB8AAAAF +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAFwAAAEMAAAB3AAAAnwAAALMAAACzAAAAnwAAAHcAAABD +AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu +AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQEAAAMAAAABABIAAAEB +AAMAAAABABIAAAECAAMAAAAEAAAFugEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES +AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS +AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA + + + + + + + + 400 + 75 + + + + + + + + {480, 244} + + + {{0, 0}, {1920, 1178}} + {480, 244} + {1.79769e+308, 1.79769e+308} + + + + + YES + + + window + + + + 27 + + + + titleField_ + + + + 70 + + + + descriptionField_ + + + + 71 + + + + reminderMinutesField_ + + + + 72 + + + + reminderMethodPopup_ + + + + 73 + + + + startDatePicker_ + + + + 74 + + + + endDatePicker_ + + + + 75 + + + + saveButtonClicked: + + + + 76 + + + + cancelButtonClicked: + + + + 77 + + + + reminderMatrix_ + + + + 83 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + 5 + + + YES + + + + Window + + + 6 + + + YES + + + + + + + + + + + + + + + + + + + + 7 + + + YES + + + + + + 8 + + + YES + + + + + + 9 + + + YES + + + + + + 10 + + + YES + + + + + + 11 + + + YES + + + + + + 12 + + + YES + + + + + + 13 + + + YES + + + + + + 14 + + + YES + + + + + + 21 + + + YES + + + + + + 22 + + + YES + + + + + + 23 + + + YES + + + + + + 24 + + + YES + + + + + + 46 + + + + + 47 + + + + + 48 + + + + + 49 + + + + + 50 + + + + + 51 + + + + + 52 + + + + + 53 + + + + + 54 + + + + + 55 + + + + + 56 + + + + + 57 + + + + + -3 + + + Application + + + 58 + + + YES + + + + + + 61 + + + + + 62 + + + YES + + + + + + 63 + + + YES + + + + + + 64 + + + YES + + + + + + + + 65 + + + + + 66 + + + + + 67 + + + + + 78 + + + YES + + + + + + + + 79 + + + + + 80 + + + + + 81 + + + + + + + YES + + YES + -3.IBPluginDependency + 10.IBPluginDependency + 10.ImportedFromIB2 + 11.IBPluginDependency + 11.ImportedFromIB2 + 12.IBPluginDependency + 12.ImportedFromIB2 + 13.IBPluginDependency + 13.ImportedFromIB2 + 14.IBPluginDependency + 14.ImportedFromIB2 + 21.IBPluginDependency + 21.IBViewBoundsToFrameTransform + 21.ImportedFromIB2 + 22.IBPluginDependency + 22.IBViewBoundsToFrameTransform + 22.ImportedFromIB2 + 23.IBPluginDependency + 23.IBViewBoundsToFrameTransform + 23.ImportedFromIB2 + 24.IBPluginDependency + 24.IBViewBoundsToFrameTransform + 24.ImportedFromIB2 + 46.IBPluginDependency + 47.IBPluginDependency + 48.IBPluginDependency + 49.IBPluginDependency + 5.IBEditorWindowLastContentRect + 5.IBPluginDependency + 5.IBWindowTemplateEditedContentRect + 5.ImportedFromIB2 + 5.windowTemplate.hasMinSize + 5.windowTemplate.minSize + 50.IBPluginDependency + 51.IBPluginDependency + 52.IBPluginDependency + 53.IBPluginDependency + 54.IBPluginDependency + 55.IBPluginDependency + 56.IBPluginDependency + 57.IBPluginDependency + 58.IBPluginDependency + 58.IBViewBoundsToFrameTransform + 58.ImportedFromIB2 + 6.IBPluginDependency + 6.ImportedFromIB2 + 61.IBPluginDependency + 62.IBPluginDependency + 62.IBViewBoundsToFrameTransform + 63.IBPluginDependency + 64.IBEditorWindowLastContentRect + 64.IBPluginDependency + 65.IBPluginDependency + 66.IBPluginDependency + 67.IBPluginDependency + 7.IBPluginDependency + 7.ImportedFromIB2 + 78.IBPluginDependency + 78.IBViewBoundsToFrameTransform + 79.IBPluginDependency + 8.IBPluginDependency + 8.ImportedFromIB2 + 80.IBPluginDependency + 81.IBPluginDependency + 9.IBPluginDependency + 9.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDAwAAwsQAAA + + + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDOgAAwsoAAA + + + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDwAAAwoAAAA + + + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDlwAAwoAAAA + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{0, 601}, {480, 244}} + com.apple.InterfaceBuilder.CocoaPlugin + {{0, 601}, {480, 244}} + + + {480, 222} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDBAAAwpAAAA + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDNwAAwpYAAA + + com.apple.InterfaceBuilder.CocoaPlugin + {{331, 624}, {100, 54}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABByAAAwr4AAA + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + + YES + + + + + YES + + + YES + + + + 83 + + + + YES + + EditEventWindowController + NSWindowController + + YES + + YES + cancelButtonClicked: + saveButtonClicked: + + + YES + id + id + + + + YES + + YES + cancelButtonClicked: + saveButtonClicked: + + + YES + + cancelButtonClicked: + id + + + saveButtonClicked: + id + + + + + YES + + YES + descriptionField_ + endDatePicker_ + reminderMatrix_ + reminderMethodPopup_ + reminderMinutesField_ + startDatePicker_ + titleField_ + + + YES + NSTextField + NSDatePicker + NSMatrix + NSPopUpButton + NSTextField + NSDatePicker + NSTextField + + + + YES + + YES + descriptionField_ + endDatePicker_ + reminderMatrix_ + reminderMethodPopup_ + reminderMinutesField_ + startDatePicker_ + titleField_ + + + YES + + descriptionField_ + NSTextField + + + endDatePicker_ + NSDatePicker + + + reminderMatrix_ + NSMatrix + + + reminderMethodPopup_ + NSPopUpButton + + + reminderMinutesField_ + NSTextField + + + startDatePicker_ + NSDatePicker + + + titleField_ + NSTextField + + + + + IBProjectSource + EditEventWindowController.h + + + + EditEventWindowController + NSWindowController + + IBUserSource + + + + + FirstResponder + NSObject + + IBUserSource + + + + + NSDatePicker + NSControl + + IBUserSource + + + + + + YES + + NSActionCell + NSCell + + IBFrameworkSource + AppKit.framework/Headers/NSActionCell.h + + + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSButton + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSButton.h + + + + NSButtonCell + NSActionCell + + IBFrameworkSource + AppKit.framework/Headers/NSButtonCell.h + + + + NSCell + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSCell.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSDatePicker + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSDatePicker.h + + + + NSDatePickerCell + NSActionCell + + IBFrameworkSource + AppKit.framework/Headers/NSDatePickerCell.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSMatrix + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSMatrix.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSMenuItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSMenuItemCell + NSButtonCell + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItemCell.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebEditingDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebFrameLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebJavaPlugIn.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPlugin.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPluginContainer.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPolicyDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebResourceLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebScriptObject.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebUIDelegate.h + + + + NSPopUpButton + NSButton + + IBFrameworkSource + AppKit.framework/Headers/NSPopUpButton.h + + + + NSPopUpButtonCell + NSMenuItemCell + + IBFrameworkSource + AppKit.framework/Headers/NSPopUpButtonCell.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSTextField + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSTextField.h + + + + NSTextFieldCell + NSActionCell + + IBFrameworkSource + AppKit.framework/Headers/NSTextFieldCell.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + + NSWindowController + NSResponder + + showWindow: + id + + + showWindow: + + showWindow: + id + + + + IBFrameworkSource + AppKit.framework/Headers/NSWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../CalendarSample.xcodeproj + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {9, 8} + {7, 2} + + + + diff --git a/GTL/Examples/CalendarSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base b/GTL/Examples/CalendarSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base new file mode 100644 index 0000000..77831dd --- /dev/null +++ b/GTL/Examples/CalendarSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "© Google Inc. 2011"; diff --git a/GTL/Examples/CalendarSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base b/GTL/Examples/CalendarSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base new file mode 100644 index 0000000..b936afc --- /dev/null +++ b/GTL/Examples/CalendarSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base @@ -0,0 +1,2409 @@ + + + + 1050 + 10J869 + 851 + 1038.35 + 461.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 851 + + + YES + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + + NSApplication + + + + FirstResponder + + + NSApplication + + + MainMenu + + YES + + + SampleApp + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + SampleApp + + YES + + + About the Sample + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + + Services + + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + + File + + + YES + + + New + n + 1048576 + 2147483647 + + + + + + Open... + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + + Open Recent + + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + Save As… + S + 1048576 + 2147483647 + + + + + + Revert + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup… + P + 1048576 + 2147483647 + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + + Edit + + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + + Find + + + YES + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1048576 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling + + 1048576 + 2147483647 + + + submenuAction: + + Spelling + + YES + + + Spelling… + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling as You Type + + 1048576 + 2147483647 + + + + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + + Window + + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + Help + + YES + + + Help + ? + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + CalendarSampleAppController + + + + + YES + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + showHelp: + + + + 122 + + + + clearRecentDocuments: + + + + 127 + + + + terminate: + + + + 139 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + hideOtherApplications: + + + + 146 + + + + hide: + + + + 152 + + + + unhideAllApplications: + + + + 153 + + + + cut: + + + + 175 + + + + paste: + + + + 176 + + + + redo: + + + + 178 + + + + selectAll: + + + + 179 + + + + undo: + + + + 180 + + + + copy: + + + + 181 + + + + showGuessPanel: + + + + 188 + + + + checkSpelling: + + + + 190 + + + + toggleContinuousSpellChecking: + + + + 192 + + + + performClose: + + + + 193 + + + + delete: + + + + 195 + + + + performZoom: + + + + 198 + + + + performFindPanelAction: + + + + 199 + + + + performFindPanelAction: + + + + 200 + + + + performFindPanelAction: + + + + 201 + + + + performFindPanelAction: + + + + 202 + + + + centerSelectionInVisibleArea: + + + + 203 + + + + pasteAsPlainText: + + + + 205 + + + + delegate + + + + 223 + + + + delegate + + + + 225 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + MainMenu + + + 19 + + + YES + + + + + + 24 + + + YES + + + + + + + + + 5 + + + + + 23 + + + + + 92 + + + + + 197 + + + + + 56 + + + YES + + + + + + 57 + + + YES + + + + + + + + + + + + + + + + 58 + + + + + 129 + + + + + 131 + + + YES + + + + + + 130 + + + + + 134 + + + + + 136 + + + + + 143 + + + + + 144 + + + + + 145 + + + + + 149 + + + + + 150 + + + + + 196 + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + + + + + + + + 72 + + + + + 73 + + + + + 74 + + + + + 75 + + + + + 77 + + + + + 78 + + + + + 79 + + + + + 80 + + + + + 82 + + + + + 112 + + + + + 124 + + + YES + + + + + + 125 + + + YES + + + + + + 126 + + + + + 103 + + + YES + + + + + + 106 + + + YES + + + + + + 111 + + + + + 163 + + + YES + + + + + + 169 + + + YES + + + + + + + + + + + + + + + + + 156 + + + + + 157 + + + + + 158 + + + + + 160 + + + + + 164 + + + + + 168 + + + YES + + + + + + 159 + + + YES + + + + + + + + + + 154 + + + + + 155 + + + + + 161 + + + + + 162 + + + + + 167 + + + + + 171 + + + + + 172 + + + + + 173 + + + + + 174 + + + + + 184 + + + YES + + + + + + 185 + + + YES + + + + + + + + 187 + + + + + 189 + + + + + 191 + + + + + 204 + + + + + 222 + + + SampleAppController + + + + + YES + + YES + -3.IBPluginDependency + -3.ImportedFromIB2 + 103.IBPluginDependency + 103.ImportedFromIB2 + 106.IBPluginDependency + 106.ImportedFromIB2 + 111.IBPluginDependency + 111.ImportedFromIB2 + 112.IBPluginDependency + 112.ImportedFromIB2 + 124.IBPluginDependency + 124.ImportedFromIB2 + 125.IBPluginDependency + 125.ImportedFromIB2 + 126.IBPluginDependency + 126.ImportedFromIB2 + 129.IBPluginDependency + 129.ImportedFromIB2 + 130.IBPluginDependency + 130.ImportedFromIB2 + 131.IBPluginDependency + 131.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 136.IBPluginDependency + 136.ImportedFromIB2 + 143.IBPluginDependency + 143.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 145.IBPluginDependency + 145.ImportedFromIB2 + 149.IBPluginDependency + 149.ImportedFromIB2 + 150.IBPluginDependency + 150.ImportedFromIB2 + 154.IBPluginDependency + 154.ImportedFromIB2 + 155.IBPluginDependency + 155.ImportedFromIB2 + 156.IBPluginDependency + 156.ImportedFromIB2 + 157.IBPluginDependency + 157.ImportedFromIB2 + 158.IBPluginDependency + 158.ImportedFromIB2 + 159.IBPluginDependency + 159.ImportedFromIB2 + 160.IBPluginDependency + 160.ImportedFromIB2 + 161.IBPluginDependency + 161.ImportedFromIB2 + 162.IBPluginDependency + 162.ImportedFromIB2 + 163.IBPluginDependency + 163.ImportedFromIB2 + 164.IBPluginDependency + 164.ImportedFromIB2 + 167.IBPluginDependency + 167.ImportedFromIB2 + 168.IBPluginDependency + 168.ImportedFromIB2 + 169.IBPluginDependency + 169.ImportedFromIB2 + 171.IBPluginDependency + 171.ImportedFromIB2 + 172.IBPluginDependency + 172.ImportedFromIB2 + 173.IBPluginDependency + 173.ImportedFromIB2 + 174.IBPluginDependency + 174.ImportedFromIB2 + 184.IBPluginDependency + 184.ImportedFromIB2 + 185.IBPluginDependency + 185.ImportedFromIB2 + 187.IBPluginDependency + 187.ImportedFromIB2 + 189.IBPluginDependency + 189.ImportedFromIB2 + 19.IBPluginDependency + 19.ImportedFromIB2 + 191.IBPluginDependency + 191.ImportedFromIB2 + 196.IBPluginDependency + 196.ImportedFromIB2 + 197.IBPluginDependency + 197.ImportedFromIB2 + 204.IBPluginDependency + 204.ImportedFromIB2 + 222.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 24.IBPluginDependency + 24.ImportedFromIB2 + 29.IBPluginDependency + 29.ImportedFromIB2 + 5.IBPluginDependency + 5.ImportedFromIB2 + 56.IBPluginDependency + 56.ImportedFromIB2 + 57.IBPluginDependency + 57.ImportedFromIB2 + 58.IBPluginDependency + 58.ImportedFromIB2 + 72.IBPluginDependency + 72.ImportedFromIB2 + 73.IBPluginDependency + 73.ImportedFromIB2 + 74.IBPluginDependency + 74.ImportedFromIB2 + 75.IBPluginDependency + 75.ImportedFromIB2 + 77.IBPluginDependency + 77.ImportedFromIB2 + 78.IBPluginDependency + 78.ImportedFromIB2 + 79.IBPluginDependency + 79.ImportedFromIB2 + 80.IBPluginDependency + 80.ImportedFromIB2 + 81.IBPluginDependency + 81.ImportedFromIB2 + 82.IBPluginDependency + 82.ImportedFromIB2 + 83.IBPluginDependency + 83.ImportedFromIB2 + 92.IBPluginDependency + 92.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + + YES + + + + + YES + + + YES + + + + 227 + + + + YES + + CalendarSampleAppController + NSObject + + IBProjectSource + CalendarSampleAppController.h + + + + FirstResponder + NSObject + + IBUserSource + + + + + + YES + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSBrowser + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSBrowser.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSDocument + NSObject + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + id + id + id + id + id + id + + + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + + printDocument: + id + + + revertDocumentToSaved: + id + + + runPageLayout: + id + + + saveDocument: + id + + + saveDocumentAs: + id + + + saveDocumentTo: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocument.h + + + + NSDocument + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentScripting.h + + + + NSDocumentController + NSObject + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + id + id + id + id + + + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + + clearRecentDocuments: + id + + + newDocument: + id + + + openDocument: + id + + + saveAllDocuments: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentController.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSMatrix + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSMatrix.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSMenuItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSMovieView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSMovieView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebEditingDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebFrameLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebJavaPlugIn.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPlugin.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPluginContainer.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPolicyDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebResourceLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebScriptObject.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebUIDelegate.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSTableView + NSControl + + + + NSText + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSText.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + + WebView + NSView + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + + goBack: + id + + + goForward: + id + + + makeTextLarger: + id + + + makeTextSmaller: + id + + + makeTextStandardSize: + id + + + reload: + id + + + reloadFromOrigin: + id + + + stopLoading: + id + + + takeStringURLFrom: + id + + + toggleContinuousSpellChecking: + id + + + toggleSmartInsertDelete: + id + + + + + IBFrameworkSource + WebKit.framework/Headers/WebView.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../CalendarSample.xcodeproj + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {9, 8} + {7, 2} + + + + diff --git a/GTL/Examples/CalendarSample/English.lproj/CalendarSampleWindow.xib b/GTL/Examples/CalendarSample/English.lproj/CalendarSampleWindow.xib new file mode 100644 index 0000000..ed195e6 --- /dev/null +++ b/GTL/Examples/CalendarSample/English.lproj/CalendarSampleWindow.xib @@ -0,0 +1,3154 @@ + + + + 1070 + 11D50b + 2182 + 1138.32 + 568.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2182 + + + YES + NSUserDefaultsController + NSSegmentedControl + NSSegmentedCell + NSScroller + NSButton + NSScrollView + NSButtonCell + NSTextFieldCell + NSProgressIndicator + NSTableView + NSCustomObject + NSTextView + NSView + NSWindowTemplate + NSTextField + NSTableColumn + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + CalendarSampleWindowController + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{119, 489}, {565, 635}} + 1886912512 + CalendarSample + + NSWindow + + + View + + + {565, 635} + + + 256 + + YES + + + 265 + {{422, 556}, {129, 32}} + + + + YES + + 67239424 + 134217728 + Get Calendars + + LucidaGrande + 13 + 1044 + + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + + 266 + + YES + + + 2304 + + YES + + + 256 + {523, 95} + + + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 520 + 8 + 1000 + + 75628096 + 2048 + + + LucidaGrande + 11 + 3100 + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + 3 + MAA + + + + + 337772096 + 2048 + + + + 6 + System + controlBackgroundColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + + + 3 + YES + + + + 3 + 2 + + 3 + MQA + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + 306184192 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {523, 95}} + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 95}} + + + + + _doScroller: + 0.5 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + + + 1 + + _doScroller: + 0.99047620000000003 + + + {{20, 426}, {525, 97}} + + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 266 + + YES + + + 2304 + + YES + + + 256 + {508, 121} + + + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 505 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + + + 337772096 + 2048 + + + + + + 3 + YES + + + + 3 + 2 + + + 17 + 306184192 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {508, 121}} + + + + + + 4 + + + + 256 + {{509, 1}, {15, 121}} + + + + + _doScroller: + 0.63684209999999997 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + + + 1 + + _doScroller: + 0.96651790000000004 + + + {{20, 163}, {525, 123}} + + + + 133138 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 264 + {{118, 531}, {149, 17}} + + + + YES + + 67239424 + 272629760 + Calendars - Select One + + + + 6 + System + controlColor + + + + + + + + 1289 + + {{462, 531}, {16, 16}} + + + + 28938 + 100 + + + + 1289 + + {{469, 294}, {16, 16}} + + + + 28938 + 100 + + + + 256 + {{15, 40}, {80, 28}} + + + + YES + + 67239424 + 134348800 + Add Entry + + + -2038284033 + 1 + + LucidaGrande + 11 + 16 + + + + + + 200 + 25 + + + + + 256 + {{170, 40}, {100, 28}} + + + + YES + + 67239424 + 134348800 + Delete Entries + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 256 + {{93, 40}, {79, 28}} + + + + YES + + 67239424 + 134348800 + Edit Entry + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 292 + {{15, 13}, {140, 28}} + + + + YES + + 67239424 + 134348800 + Query Today's Events + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 266 + + YES + + + 2304 + + YES + + + 2322 + {523, 56} + + + + + + + + results + + + YES + + YES + NSColor + NSFont + + + YES + + 1 + MC40NTEwODY5NCAwLjEwNDE0NTEyIDAuMDgyODYwMjE2AA + + + Geneva + 10 + 16 + + + + + + + YES + + + 6 + + + + 523 + 1 + + + 67119969 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + 1 + MCAwIDEAA + + + + + + + 1 + + 6 + {523, 10000000} + {463, 56} + + + + {{1, 1}, {523, 56}} + + + + + + + {4, 5} + + 79691776 + + YES + + YES + + + + + file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff + + + + + + 3 + MCAwAA + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{20, 360}, {525, 58}} + + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + + 274 + + YES + + + 2304 + + YES + + + 2322 + {426, 77} + + + + + + + + results + + + YES + + YES + NSColor + NSFont + + + YES + + 1 + MC45Njg2Mjc0NSAwLjIzNTI5NDEyIDAuMTg4MjM1MwA + + + + + + + + YES + + + 6 + + + + 426 + 1 + + + 67119969 + 0 + + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + + + + + + 1 + + 6 + {463, 10000000} + {366, 77} + + + + {{1, 1}, {523, 77}} + + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 77}} + + + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{20, 76}, {525, 79}} + + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + + 265 + {{485, 530}, {54, 16}} + + + + YES + + 67239424 + 134479872 + Cancel + + LucidaGrande + 9 + 3614 + + + -2038284033 + 1 + + LucidaGrande + 9 + 16 + + + + + + 200 + 25 + + + + + 265 + {{492, 293}, {54, 16}} + + + + YES + + 67239424 + 134479872 + Cancel + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 268 + {{18, 291}, {218, 20}} + + + + YES + + 67239424 + 131072 + + + + YES + + 54 + Events + YES + 2 + + + 97 + Access Control + 1 + 2 + + + Settings + 2 + + + + + + + 268 + {{239, 295}, {147, 17}} + + + + YES + + 67239424 + 272629760 + Entries - select one + + + + + + + + + 268 + {{18, 527}, {97, 20}} + + + + YES + + 67239424 + 131072 + + + + YES + + 34 + All + YES + 2 + + + 56 + Owned + 1 + 2 + + + + + + + 266 + {{148, 330}, {164, 19}} + + + + YES + + -1804468671 + 272761856 + + + + YES + + 6 + System + textBackgroundColor + + + + 6 + System + textColor + + + + + + + 268 + {{17, 332}, {126, 14}} + + + + YES + + 67239424 + 272629760 + Owned calendar name: + + + + + + + + + 265 + {{315, 323}, {64, 28}} + + + + YES + + 67239424 + 134348800 + Add + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 265 + {{464, 324}, {79, 28}} + + + + YES + + 67239424 + 134348800 + Delete + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 265 + {{377, 323}, {69, 28}} + + + + YES + + 67239424 + 134348800 + Rename + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 289 + {{419, 19}, {148, 18}} + + + + YES + + 67239424 + 131072 + Log http to desktop + + + 1211912703 + 2 + + NSSwitch + + + + 200 + 25 + + + + + 264 + {{90, 569}, {71, 17}} + + + + YES + + 67239424 + 272629760 + Signed In: + + + + + + + + + 266 + {{163, 569}, {247, 17}} + + + + YES + + 67239424 + 272629760 + No + + + + + + + + + 268 + {{15, 562}, {72, 28}} + + + + YES + + 67239424 + 134348800 + Sign Out + + + -2038284033 + 129 + + + 200 + 25 + + + + + 268 + {{15, 589}, {83, 28}} + + + + YES + + -2080244224 + 134348800 + Client ID... + + + -2038284033 + 129 + + + 200 + 25 + + + + + 264 + {{102, 596}, {178, 14}} + + + + YES + + 67239424 + 272760832 + Client ID and Secret Required + + + + + + + + + 292 + {{153, 12}, {159, 28}} + + + + YES + + 67239424 + 134348800 + Query Today's Free/Busy + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + {565, 635} + + + + + {{0, 0}, {1920, 1178}} + {565, 657} + {10000000000000, 10000000000000} + YES + + + YES + + + 3 + 2 + {{235, 275}, {458, 284}} + 611844096 + Client ID Sheet + NSWindow + + + + + 256 + + YES + + + 266 + {{118, 143}, {320, 22}} + + + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 143}, {63, 17}} + + + + YES + + 68288064 + 272630784 + Client ID: + + + + + + + + + 266 + {{118, 112}, {320, 22}} + + + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 117}, {88, 17}} + + + + YES + + 68288064 + 272630784 + Client Secret: + + + + + + + + + 268 + {{342, 78}, {74, 22}} + + + + YES + + 67239424 + 134348800 + API Console + + + -2038284033 + 134 + + + 200 + 25 + + + + + 268 + {{17, 82}, {316, 17}} + + + + YES + + 68288064 + 272630784 + Client ID and Client Secret are obtained from the + + + + + + + + + 268 + {{17, 204}, {424, 34}} + + + + YES + + 67239424 + 138412032 + Each application should have a client ID and client secret hardcoded into the source. + + + + + + + + + 268 + {{348, 12}, {96, 32}} + + + + YES + + 67239424 + 134217728 + Done + + + -2038284033 + 129 + + DQ + 200 + 25 + + + + {458, 284} + + + + + {{0, 0}, {1920, 1178}} + {10000000000000, 10000000000000} + YES + + + + + YES + + + window + + + + 16 + + + + loggingCheckboxClicked: + + + + 132 + + + + APIConsoleClicked: + + + + 229 + + + + clientIDDoneClicked: + + + + 230 + + + + clientIDClicked: + + + + 251 + + + + signInClicked: + + + + 252 + + + + getCalendarList: + + + + 253 + + + + cancelCalendarFetch: + + + + 254 + + + + cancelEventsFetch: + + + + 256 + + + + entrySegmentClicked: + + + + 257 + + + + addCalendar: + + + + 258 + + + + renameCalendar: + + + + 259 + + + + deleteCalendar: + + + + 260 + + + + getCalendarList: + + + + 261 + + + + addEntry: + + + + 262 + + + + editEntry: + + + + 263 + + + + deleteEntries: + + + + 264 + + + + signedInField_ + + + + 270 + + + + signedInButton_ + + + + 271 + + + + calendarTable_ + + + + 272 + + + + calendarProgressIndicator_ + + + + 273 + + + + calendarResultTextField_ + + + + 274 + + + + calendarCancelButton_ + + + + 275 + + + + calendarSegmentedControl_ + + + + 276 + + + + addCalendarButton_ + + + + 277 + + + + renameCalendarButton_ + + + + 278 + + + + deleteCalendarButton_ + + + + 279 + + + + calendarNameField_ + + + + 280 + + + + eventTable_ + + + + 281 + + + + eventProgressIndicator_ + + + + 282 + + + + eventResultTextField_ + + + + 283 + + + + eventCancelButton_ + + + + 284 + + + + addEntryButton_ + + + + 285 + + + + editEntryButton_ + + + + 286 + + + + deleteEntriesButton_ + + + + 287 + + + + entrySegmentedControl_ + + + + 290 + + + + clientIDButton_ + + + + 291 + + + + clientIDRequiredTextField_ + + + + 292 + + + + clientIDSheet_ + + + + 293 + + + + clientIDField_ + + + + 294 + + + + clientSecretField_ + + + + 295 + + + + queryTodayClicked: + + + + 298 + + + + queryTodaysEventsButton_ + + + + 299 + + + + queryFreeBusyClicked: + + + + 303 + + + + queryFreeBusyButton_ + + + + 304 + + + + delegate + + + + 15 + + + + dataSource + + + + 34 + + + + delegate + + + + 35 + + + + delegate + + + + 36 + + + + dataSource + + + + 37 + + + + delegate + + + + 122 + + + + value: values.clientSecret + + + + + + value: values.clientSecret + value + values.clientSecret + 2 + + + 243 + + + + value: values.clientID + + + + + + value: values.clientID + value + values.clientID + 2 + + + 242 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 5 + + + YES + + + + Window + + + 6 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 17 + + + YES + + + + + + 24 + + + YES + + + + + + + + 25 + + + YES + + + + + + 26 + + + YES + + + + + + 28 + + + YES + + + + + + + + 29 + + + YES + + + + + + 30 + + + YES + + + + + + 38 + + + YES + + + + + + 40 + + + + + 41 + + + + + 56 + + + YES + + + + + + 57 + + + YES + + + + + + 58 + + + YES + + + + + + 59 + + + YES + + + + + + 80 + + + YES + + + + + + + + 81 + + + + + 82 + + + YES + + + + + + + + 83 + + + + + 86 + + + YES + + + + + + 87 + + + YES + + + + + + 92 + + + YES + + + + + + 95 + + + YES + + + + + + 109 + + + YES + + + + + + 113 + + + YES + + + + + + 115 + + + YES + + + + + + 116 + + + YES + + + + + + 117 + + + YES + + + + + + 128 + + + YES + + + + + + 131 + + + YES + + + + + + 44 + + + Shared Defaults + + + 175 + + + + + 176 + + + + + 177 + + + + + 178 + + + + + 179 + + + + + 180 + + + + + 181 + + + + + 182 + + + + + 183 + + + + + 184 + + + + + 185 + + + + + 186 + + + + + 187 + + + + + 188 + + + + + 189 + + + + + 190 + + + + + 191 + + + + + 193 + + + + + 194 + + + + + 195 + + + + + 196 + + + + + 197 + + + + + 198 + + + + + 199 + + + + + 200 + + + + + 201 + + + + + 202 + + + + + 208 + + + YES + + + + + + 209 + + + YES + + + + + + + + + + + + + 210 + + + YES + + + + + + 211 + + + YES + + + + + + 212 + + + YES + + + + + + 213 + + + YES + + + + + + 214 + + + YES + + + + + + 215 + + + YES + + + + + + 216 + + + YES + + + + + + 217 + + + YES + + + + + + 218 + + + + + 219 + + + + + 220 + + + + + 221 + + + + + 222 + + + + + 223 + + + + + 224 + + + + + 225 + + + + + 231 + + + YES + + + + + + 232 + + + YES + + + + + + 233 + + + YES + + + + + + 234 + + + YES + + + + + + 235 + + + YES + + + + + + 236 + + + + + 237 + + + + + 238 + + + + + 239 + + + + + 240 + + + + + 300 + + + YES + + + + + + 301 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 109.IBPluginDependency + 113.IBPluginDependency + 115.IBPluginDependency + 116.IBPluginDependency + 117.IBPluginDependency + 128.IBPluginDependency + 131.IBPluginDependency + 17.IBPluginDependency + 175.IBPluginDependency + 176.IBPluginDependency + 177.IBPluginDependency + 178.IBPluginDependency + 179.IBPluginDependency + 180.IBPluginDependency + 181.IBPluginDependency + 182.IBPluginDependency + 183.IBPluginDependency + 184.IBPluginDependency + 185.IBPluginDependency + 186.IBPluginDependency + 187.IBPluginDependency + 188.IBPluginDependency + 189.IBPluginDependency + 190.IBPluginDependency + 191.IBPluginDependency + 193.IBPluginDependency + 193.IBShouldRemoveOnLegacySave + 194.IBPluginDependency + 194.IBShouldRemoveOnLegacySave + 195.IBPluginDependency + 195.IBShouldRemoveOnLegacySave + 196.IBPluginDependency + 196.IBShouldRemoveOnLegacySave + 197.IBPluginDependency + 197.IBShouldRemoveOnLegacySave + 198.IBPluginDependency + 198.IBShouldRemoveOnLegacySave + 199.IBPluginDependency + 199.IBShouldRemoveOnLegacySave + 200.IBPluginDependency + 200.IBShouldRemoveOnLegacySave + 201.IBPluginDependency + 201.IBShouldRemoveOnLegacySave + 202.IBPluginDependency + 202.IBShouldRemoveOnLegacySave + 208.IBPluginDependency + 208.IBWindowTemplateEditedContentRect + 208.NSWindowTemplate.visibleAtLaunch + 209.IBPluginDependency + 210.IBPluginDependency + 211.IBPluginDependency + 212.IBPluginDependency + 213.IBPluginDependency + 214.IBPluginDependency + 215.IBPluginDependency + 216.IBPluginDependency + 217.IBPluginDependency + 218.IBPluginDependency + 219.IBPluginDependency + 220.IBPluginDependency + 221.IBPluginDependency + 222.IBPluginDependency + 223.IBPluginDependency + 224.IBPluginDependency + 225.IBPluginDependency + 231.IBPluginDependency + 232.IBPluginDependency + 233.IBPluginDependency + 234.IBPluginDependency + 235.IBPluginDependency + 236.IBPluginDependency + 237.IBPluginDependency + 238.IBPluginDependency + 239.IBPluginDependency + 24.IBPluginDependency + 240.IBPluginDependency + 25.IBPluginDependency + 26.IBPluginDependency + 28.IBPluginDependency + 29.IBPluginDependency + 30.IBPluginDependency + 300.IBPluginDependency + 301.IBPluginDependency + 38.IBPluginDependency + 40.IBPluginDependency + 41.IBPluginDependency + 44.IBPluginDependency + 5.IBPluginDependency + 5.IBWindowTemplateEditedContentRect + 56.IBPluginDependency + 57.IBPluginDependency + 58.IBPluginDependency + 59.IBPluginDependency + 6.IBPluginDependency + 80.IBPluginDependency + 81.IBPluginDependency + 82.IBPluginDependency + 83.IBPluginDependency + 86.IBPluginDependency + 87.IBPluginDependency + 92.IBPluginDependency + 95.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + {{129, 872}, {458, 284}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{99, 519}, {565, 635}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 304 + + + + YES + + CalendarSampleWindowController + NSWindowController + + YES + + YES + APIConsoleClicked: + addCalendar: + addEntry: + cancelCalendarFetch: + cancelEventsFetch: + clientIDClicked: + clientIDDoneClicked: + deleteCalendar: + deleteEntries: + editEntry: + entrySegmentClicked: + getCalendarList: + loggingCheckboxClicked: + queryFreeBusyClicked: + queryTodayClicked: + renameCalendar: + signInClicked: + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + APIConsoleClicked: + addCalendar: + addEntry: + cancelCalendarFetch: + cancelEventsFetch: + clientIDClicked: + clientIDDoneClicked: + deleteCalendar: + deleteEntries: + editEntry: + entrySegmentClicked: + getCalendarList: + loggingCheckboxClicked: + queryFreeBusyClicked: + queryTodayClicked: + renameCalendar: + signInClicked: + + + YES + + APIConsoleClicked: + id + + + addCalendar: + id + + + addEntry: + id + + + cancelCalendarFetch: + id + + + cancelEventsFetch: + id + + + clientIDClicked: + id + + + clientIDDoneClicked: + id + + + deleteCalendar: + id + + + deleteEntries: + id + + + editEntry: + id + + + entrySegmentClicked: + id + + + getCalendarList: + id + + + loggingCheckboxClicked: + id + + + queryFreeBusyClicked: + id + + + queryTodayClicked: + id + + + renameCalendar: + id + + + signInClicked: + id + + + + + YES + + YES + addCalendarButton_ + addEntryButton_ + calendarCancelButton_ + calendarNameField_ + calendarProgressIndicator_ + calendarResultTextField_ + calendarSegmentedControl_ + calendarTable_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + deleteCalendarButton_ + deleteEntriesButton_ + editEntryButton_ + entrySegmentedControl_ + eventCancelButton_ + eventProgressIndicator_ + eventResultTextField_ + eventTable_ + queryFreeBusyButton_ + queryTodaysEventsButton_ + renameCalendarButton_ + signedInButton_ + signedInField_ + + + YES + NSButton + NSButton + NSButton + NSTextField + NSProgressIndicator + NSTextView + NSSegmentedControl + NSTableView + NSButton + NSTextField + NSTextField + NSWindow + NSTextField + NSButton + NSButton + NSButton + NSSegmentedControl + NSButton + NSProgressIndicator + NSTextView + NSTableView + NSButton + NSButton + NSButton + NSButton + NSTextField + + + + YES + + YES + addCalendarButton_ + addEntryButton_ + calendarCancelButton_ + calendarNameField_ + calendarProgressIndicator_ + calendarResultTextField_ + calendarSegmentedControl_ + calendarTable_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + deleteCalendarButton_ + deleteEntriesButton_ + editEntryButton_ + entrySegmentedControl_ + eventCancelButton_ + eventProgressIndicator_ + eventResultTextField_ + eventTable_ + queryFreeBusyButton_ + queryTodaysEventsButton_ + renameCalendarButton_ + signedInButton_ + signedInField_ + + + YES + + addCalendarButton_ + NSButton + + + addEntryButton_ + NSButton + + + calendarCancelButton_ + NSButton + + + calendarNameField_ + NSTextField + + + calendarProgressIndicator_ + NSProgressIndicator + + + calendarResultTextField_ + NSTextView + + + calendarSegmentedControl_ + NSSegmentedControl + + + calendarTable_ + NSTableView + + + clientIDButton_ + NSButton + + + clientIDField_ + NSTextField + + + clientIDRequiredTextField_ + NSTextField + + + clientIDSheet_ + NSWindow + + + clientSecretField_ + NSTextField + + + deleteCalendarButton_ + NSButton + + + deleteEntriesButton_ + NSButton + + + editEntryButton_ + NSButton + + + entrySegmentedControl_ + NSSegmentedControl + + + eventCancelButton_ + NSButton + + + eventProgressIndicator_ + NSProgressIndicator + + + eventResultTextField_ + NSTextView + + + eventTable_ + NSTableView + + + queryFreeBusyButton_ + NSButton + + + queryTodaysEventsButton_ + NSButton + + + renameCalendarButton_ + NSButton + + + signedInButton_ + NSButton + + + signedInField_ + NSTextField + + + + + IBProjectSource + ./Classes/CalendarSampleWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + diff --git a/GTL/Examples/CalendarSample/English.lproj/EditACLWindow.xib b/GTL/Examples/CalendarSample/English.lproj/EditACLWindow.xib new file mode 100644 index 0000000..b55a3b3 --- /dev/null +++ b/GTL/Examples/CalendarSample/English.lproj/EditACLWindow.xib @@ -0,0 +1,824 @@ + + + + 1050 + 11E53 + 2818 + 1138.47 + 569.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2818 + + + YES + NSBox + NSButton + NSButtonCell + NSComboBox + NSComboBoxCell + NSCustomObject + NSTextField + NSTextFieldCell + NSView + NSWindowTemplate + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + EditACLWindowController + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{88, 481}, {478, 177}} + 1886912512 + + Window + + + NSWindow + + + View + + + {412, 177} + + + 256 + + YES + + + 268 + {{17, 129}, {114, 17}} + + YES + + 67239424 + 272629760 + Scope + + LucidaGrande + 13 + 1044 + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 268 + {{76, 140}, {61, 17}} + + YES + + 67239424 + 71303168 + Type: + + + + + + + + + 268 + {{76, 115}, {61, 17}} + + YES + + 67239424 + 71303168 + VmFsdWU6Cg + + + + + + + + + 268 + {{17, 68}, {114, 17}} + + YES + + 67239424 + 272629760 + Role + + + + + + + + + 268 + {{76, 68}, {61, 17}} + + YES + + 67239424 + 71303168 + VmFsdWU6Cg + + + + + + + + + 266 + {{142, 114}, {316, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 6 + System + textColor + + + + + + + 266 + {{142, 136}, {319, 26}} + + YES + + 343014976 + 272630784 + user + + + YES + + + 5 + YES + + YES + user + domain + default + + + + + 274 + {13, 63} + + + YES + + YES + + 10 + 10 + 1000 + + 75628032 + 0 + + + + + LucidaGrande + 12 + 16 + + + 3 + MC4zMzMzMzI5OQA + + + + + 338820672 + 1024 + + + YES + + 6 + System + controlBackgroundColor + + + + + 3 + YES + + + + 3 + 2 + + + 6 + System + gridColor + + 3 + MC41AA + + + 19 + tableViewAction: + -765427712 + + + + 1 + 15 + 0 + YES + 0 + 1 + + + + + + 289 + {{382, 12}, {82, 32}} + + YES + + 67239424 + 134217728 + Save + + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + + 289 + {{300, 12}, {82, 32}} + + YES + + 67239424 + 134217728 + Cancel + + + -2038284033 + 1 + + + Gw + 200 + 25 + + + + + 266 + {{20, 97}, {438, 5}} + + {0, 0} + + 67239424 + 0 + Box + + + + 3 + MCAwLjgwMDAwMDAxAA + + + 3 + 2 + 0 + NO + + + + 266 + {{142, 64}, {319, 26}} + + YES + + 343014976 + 272630784 + + + + + + YES + + + 5 + YES + + + + 274 + {15, 0} + + + YES + + YES + + 12 + 10 + 1000 + + 75628032 + 0 + + + + 3 + MC4zMzMzMzI5OQA + + + + + 338820672 + 1024 + + + YES + + + + 3 + YES + + + + 3 + 2 + + + 19 + tableViewAction: + -767524864 + + + + 1 + 15 + 0 + YES + 0 + 1 + + + + + {478, 177} + + + {{0, 0}, {1920, 1178}} + {412, 199} + {10000000000000, 10000000000000} + YES + + + + 256 + {125, 1} + + + + + YES + + + window + + + + 29 + + + + saveButtonClicked: + + + + 30 + + + + cancelButtonClicked: + + + + 31 + + + + scopeTypeField_ + + + + 45 + + + + scopeValueField_ + + + + 46 + + + + roleValueField_ + + + + 47 + + + + okButton_ + + + + 48 + + + + cancelButton_ + + + + 49 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + 5 + + + YES + + + + Window + + + 6 + + + YES + + + + + + + + + + + + + + + + 7 + + + YES + + + + + + 8 + + + YES + + + + + + 9 + + + YES + + + + + + 10 + + + YES + + + + + + 11 + + + YES + + + + + + 13 + + + YES + + + + + + 14 + + + YES + + + + + + 15 + + + YES + + + + + + 16 + + + YES + + + + + + 22 + + + YES + + + + + 32 + + + YES + + + + + + 35 + + + + + 36 + + + + + 37 + + + + + 38 + + + + + 39 + + + + + 40 + + + + + 41 + + + + + 42 + + + + + 43 + + + + + 44 + + + + + -3 + + + Application + + + 23 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 10.IBPluginDependency + 11.IBPluginDependency + 13.IBPluginDependency + 14.IBPluginDependency + 15.IBPluginDependency + 16.IBPluginDependency + 22.IBPluginDependency + 23.IBPluginDependency + 32.IBPluginDependency + 35.IBPluginDependency + 36.IBPluginDependency + 37.IBPluginDependency + 38.IBPluginDependency + 39.IBPluginDependency + 40.IBPluginDependency + 41.IBPluginDependency + 42.IBPluginDependency + 43.IBPluginDependency + 44.IBPluginDependency + 5.IBPluginDependency + 6.IBPluginDependency + 7.IBPluginDependency + 8.IBPluginDependency + 9.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 49 + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + diff --git a/GTL/Examples/CalendarSample/English.lproj/EditEventWindow.xib b/GTL/Examples/CalendarSample/English.lproj/EditEventWindow.xib new file mode 100644 index 0000000..b54c90a --- /dev/null +++ b/GTL/Examples/CalendarSample/English.lproj/EditEventWindow.xib @@ -0,0 +1,1912 @@ + + + + 1050 + 10J869 + 851 + 1038.35 + 461.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 851 + + + YES + + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + EditEventWindowController + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{134, 425}, {480, 244}} + 1886912512 + Window + + NSWindow + + + View + + {1.79769e+308, 1.79769e+308} + {480, 222} + + + 256 + + YES + + + 268 + {{28, 207}, {36, 17}} + + YES + + 67239424 + 272629760 + Title: + + LucidaGrande + 13 + 1044 + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 266 + {{114, 205}, {346, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 6 + System + textColor + + + + + + + 268 + {{28, 173}, {81, 17}} + + YES + + 67239424 + 272629760 + Description: + + + + + + + + + 266 + {{114, 171}, {346, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{114, 141}, {169, 27}} + + YES + + 71433728 + 0 + + 0.0 + + + + 0.0 + 236 + + 6 + System + controlBackgroundColor + + + + + + + + 268 + {{28, 144}, {38, 17}} + + YES + + 67239424 + 272629760 + Start: + + + + + + + + + 268 + {{114, 111}, {169, 27}} + + YES + + 71433728 + 0 + + 0.0 + + + + 0.0 + 236 + + + + + + + 268 + {{28, 114}, {38, 17}} + + YES + + 67239424 + 272629760 + End: + + + + + + + + + 268 + {{168, 61}, {50, 14}} + + YES + + 67239424 + 272760832 + Minutes: + + LucidaGrande + 11 + 3100 + + + + + + + + + 268 + {{223, 58}, {58, 19}} + + YES + + -1804468671 + 272761856 + + + + YES + + + + + + + 265 + {{384, 12}, {82, 32}} + + YES + + 67239424 + 134217728 + Save + + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + + 265 + {{302, 12}, {82, 32}} + + YES + + 67239424 + 134217728 + Cancel + + + -2038284033 + 1 + + + Gw + 200 + 25 + + + + + 268 + {{291, 61}, {48, 14}} + + YES + + 67239424 + 272760832 + Method: + + + + + + + + + 268 + {{342, 55}, {100, 22}} + + YES + + -2076049856 + 133120 + + + 109199615 + 129 + + + 400 + 75 + + + popup + + 1048576 + 2147483647 + 1 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + _popUpItemAction: + + + YES + + OtherViews + + YES + + + sms + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + email + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + + + 2 + 1 + YES + YES + 2 + + + + + 268 + {{31, 59}, {139, 38}} + + YES + 2 + 1 + + YES + + -2080244224 + 0 + Default Reminders + + + 1211912703 + 0 + + NSRadioButton + + + + 200 + 25 + + + 67239424 + 0 + Override + + + 1 + 1211912703 + 0 + + 549453824 + {18, 18} + + YES + + YES + + + + TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw +IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/ +29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5 +dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA +AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG +AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/ +0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/ +7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/ +5eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/ +3t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD +AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns +AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/ +6+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/ +/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/ +///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl +YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA +AAAAAAAAAAUAAAAfAAAAZTMzM8KAgIDwv7+//O3t7f/t7e3/v7+//ICAgPAzMzPCAAAAZQAAAB8AAAAF +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAFwAAAEMAAAB3AAAAnwAAALMAAACzAAAAnwAAAHcAAABD +AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu +AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgEAAAMAAAABABIAAAEB +AAMAAAABABIAAAECAAMAAAAEAAAFxgEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES +AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS +AAMAAAABAAEAAAFTAAMAAAAEAAAFzodzAAcAAAwYAAAF1gAAAAAACAAIAAgACAABAAEAAQABAAAMGGFw +cGwCAAAAbW50clJHQiBYWVogB9YABAADABMALAASYWNzcEFQUEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAPbWAAEAAAAA0y1hcHBsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAOclhZWgAAASwAAAAUZ1hZWgAAAUAAAAAUYlhZWgAAAVQAAAAUd3RwdAAAAWgAAAAUY2hhZAAA +AXwAAAAsclRSQwAAAagAAAAOZ1RSQwAAAbgAAAAOYlRSQwAAAcgAAAAOdmNndAAAAdgAAAMSbmRpbgAA +BOwAAAY+ZGVzYwAACywAAABkZHNjbQAAC5AAAAAubW1vZAAAC8AAAAAoY3BydAAAC+gAAAAtWFlaIAAA +AAAAAF1KAAA0kQAACCVYWVogAAAAAAAAdCAAALRgAAAjPVhZWiAAAAAAAAAlbAAAFyoAAKfDWFlaIAAA +AAAAAPNSAAEAAAABFs9zZjMyAAAAAAABDEIAAAXe///zJgAAB5IAAP2R///7ov///aMAAAPcAADAbGN1 +cnYAAAAAAAAAAQHNAABjdXJ2AAAAAAAAAAEBzQAAY3VydgAAAAAAAAABAc0AAHZjZ3QAAAAAAAAAAAAD +AQAAAQACBAUGBwkKCw0ODxASExQWFxgaGxweHyAiIyQmJygpKywtLzAxMjM1Njc4OTs8PT5AQUJDREZH +SElKS0xOT1BRUlNUVVZXWFlaW1xdXl9hYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gIGCg4SF +hoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnZ6foKGio6SlpqanqKmqq6ytra6vsLGysrO0tba3uLi5uru8 +vL2+v8DBwcLDxMXGxsfIycrKy8zNzs7P0NHS0tPU1dbW19jZ2drb3Nzd3t/g4eLi4+Tl5ufo6enq6+zt +7u/w8fHy8/T19vf4+fr7/P3+/v8AAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR8gISIjJCUnKCkq +Ky0uLzAxMzQ1Njc4OTo7PD0/QEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaWltcXV5fYGFiY2RlZmdo +aWprbG1ub3BxcnN0dXZ3d3h5ent8fH1+f4CBgoKDhIWGh4iIiYqLjI2Oj5CRkpOUlJWWl5iZmpucnZ2e +n6ChoqOkpaamp6ipqqusra6vsLCxsrO0tba3uLm5uru8vb6/wMHCw8TFx8jJysvMzc7P0NDR0tPU1dbX +2Nna29ze3+Dh4uPk5ebn6err7O3u7/Hy8/T19vf5+vv8/f7/AAIDAwQFBgcICQoKCwwNDg8QERITFBUW +FxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODg5Ojs8PT4+P0BBQkNDREVGR0hJSUpLTE1O +Tk9QUVJSU1RVVVZXWFhZWltbXF1eXl9gYWFiY2RkZWZnZ2hpaWprbGxtbm5vcHFxcnNzdHV1dnd4eHl6 +ent8fH1+fn+AgYGCg4SEhYaHiImJiouMjY6Oj5CRkpOTlJWWl5iZmZqbnJ2en6ChoqOkpaanqKmqq6yt +rq+xsrO0tba3uLq7vL2+wMHDxMbHycrMzs/R0tTW19nb3d7g4uTm6Ors7vDy9Pb4+vz+/wAAbmRpbgAA +AAAAAAY2AACXGgAAVjoAAFPKAACJ3gAAJ8IAABaoAABQDQAAVDkAAiuFAAIZmQABeFEAAwEAAAIAAAAA +AAEABgANABcAIwAxAEAAUgBlAHsAkwCrAMUA4gD/AR8BPwFhAYUBqgHQAfgCIAJLAncCpQLSAwIDMwNl +A5gDzgQFBD0EdQSvBOsFKQVnBacF6AYqBm4GtQb8B0UHkgfkCDkIkAjnCT4JmAn0ClAKrQsLC2sLygwq +DIwM8Q1XDcAOKA6SDv4PbA/bEE0QxBE7EbQSMRKwEzITuRREFNAVYBXxFocXHhfAGGIZBBmsGlQa+RuU +HC4czh1yHhQeux9jIA0gvCFoIhkizyOJJEEk+SW6JnknOygFKMspkypiKzIsASzXLawuhy9gMD4xGzH8 +MtszvzSgNYY2cjdcOEw5OTorOxs8CD0EPfU+6z/nQOFB2ELUQ9VE00XcRttH5EjxSgBLCUwdTTFOUE9v +UI9Rt1LdVAVVNlZsV6VY4FohW21ct135X09goGH0Y0tkqGYFZ19oxGova5ptCG54b/BxbnLsdG119Xd/ +eQh6knwqfcV/W4D4gpSEO4Xih4CJKorYjIqOOY/jkZuTWJUOlsyYiZpSnB6d4Z+soX+jWqUvpxOo+6rj +rMuuwLC4sra0rra0uL+60LzfvwDBHcLdxLXGhchYyi7MCs3lz7rRmtOA1WPXR9kq2xPc/97s4M/iveSn +5o3obupT7ELuLPAM8fLz0PW396H5f/tZ/T3//wAAAAEAAwALABYAJQA3AE0AZQCBAJ8AwQDlAQsBNQFh +AZABwQH1AisCZAKfAtwDHANfA6MD6gQ0BH8EzQT1BR0FcAXEBhsGdAbPBy0HXAeMB+4IUgi4CSAJVAmK +CfYKZArVC0cLgQu8DDIMqw0mDaIOIQ6hDyQPqRAvELgQ/RFDEc8SXRLuE4AUFRSrFUMV3RZ5FxcXthhY +GPwZoRpIGvEbnBxJHPgdqB5bHw8fxSB9ITch8iKwJDAk8yW3Jn4nRigQKNwpqSp5K0osHCzxLccuoC95 +MFUxMzISMvMz1TS5NaA2hzdxOFw5STo4Oyg8Gj4DPvs/9EDuQepD6ETpRexG8Uf3SP9LFEwhTTBOQE9S +UGZSklOrVMVV4Vb/WB5ZP1phW4Vcq13SXvthUmJ/Y69k4GYSZ0dofGm0au1tZG6ib+FxInJlc6l073Y2 +d396FXtjfLJ+A39VgKmB/4NWhK+GCYjCiiGLgYzjjkePrJESknuT5Ja8mCuZm5sMnH+d9J9qoOGiWqPV +pVGmz6eOqE6pzqtRrNSuWq/gsWmy8rR+tgu5Kbq6vE294b93wQ7Cp8RBxd3He8kZyrrLisxbzf/Po9FK +0vHUm9ZF1/HZn9tO3Cbc/96x4GTiGePQ5YjnQegf6Pzquex27jbv9/G583z0X/VC9wj40Pqa/GX+Mf// +AAAAAQADAAsAJQA3AE0AZQCBAJ8AwQELATUBYQGQAcEB9QIrAmQCnwLcAxwDXwOjA+oENAR/BM0FHQVw +BcQGGwZ0Bs8HLQeMB+4IUgi4CSAJign2CmQK1QtHC7wMMgyrDSYNog4hDqEPJA+pEC8QuBFDEl0S7hOA +FBUUqxVDFnkXFxe2GFgY/BpIGvEbnBxJHPgdqB8PH8UgfSE3IfIjbyQwJPMltydGKBAo3Cp5K0osHC3H +LqAveTEzMhIy8zS5NaA2hzhcOUk6ODwaPQ4+Az/0QO5C6EPoROlG8Uf3SglLFEwhTkBPUlF7UpJUxVXh +Vv9ZP1phXKtd0mAlYVJjr2TgZhJofGm0au1tZG6ib+FxInJldO92Nnd/eMl6FXyyfgN/VYCpgf+Er4YJ +h2WIwoohi4GOR4+skRKSe5PklVCWvJgrmZubDJx/nfSfaqDholqj1aVRps+oTqnOq1Gs1K2Xrlqv4LFp +svK0frYLt5m5Kbnxurq8Tb3hv3fBDsHawqfEQcUPxd3He8hKyRnKusuKzFvN/87Rz6PQdtFK0vHTxtSb +1kXXG9fx2MjZn9tO3Cbc/93Y3rHfiuBk4hni9ePQ5KzliOZk50HoH+j86drqueuX7HbtVu427xbv9/DX +8bnymvN89F/1QvYl9wj37PjQ+bX6mvt//GX9S/4x//8AAGRlc2MAAAAAAAAACkNvbG9yIExDRAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAABIAAAAcAEMAbwBsAG8AcgAgAEwAQwBE +AABtbW9kAAAAAAAABhAAAJxOAAAAAL5zkQAAAAAAAAAAAAAAAAAAAAAAdGV4dAAAAABDb3B5cmlnaHQg +QXBwbGUgQ29tcHV0ZXIsIEluYy4sIDIwMDUAAAAAA + + + + + + 3 + MCAwAA + + + + 400 + 75 + + + {139, 18} + {4, 2} + 1151868928 + NSActionCell + + 67239424 + 0 + Radio + + 1211912703 + 0 + + 549453824 + {18, 18} + + YES + + YES + + + + TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw +IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/ +29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5 +dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA +AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG +AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/ +0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/ +7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/ +5eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/ +3t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD +AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns +AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/ +6+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/ +/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/ +///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl +YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA +AAAAAAAAAAUAAAAfAAAAZTMzM8KAgIDwv7+//O3t7f/t7e3/v7+//ICAgPAzMzPCAAAAZQAAAB8AAAAF +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAFwAAAEMAAAB3AAAAnwAAALMAAACzAAAAnwAAAHcAAABD +AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu +AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQEAAAMAAAABABIAAAEB +AAMAAAABABIAAAECAAMAAAAEAAAFugEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES +AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS +AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA + + + + + + + + 400 + 75 + + + + + + + + {480, 244} + + + {{0, 0}, {1920, 1178}} + {480, 244} + {1.79769e+308, 1.79769e+308} + + + + + YES + + + window + + + + 27 + + + + titleField_ + + + + 70 + + + + descriptionField_ + + + + 71 + + + + reminderMinutesField_ + + + + 72 + + + + reminderMethodPopup_ + + + + 73 + + + + startDatePicker_ + + + + 74 + + + + endDatePicker_ + + + + 75 + + + + saveButtonClicked: + + + + 76 + + + + cancelButtonClicked: + + + + 77 + + + + reminderMatrix_ + + + + 83 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + 5 + + + YES + + + + Window + + + 6 + + + YES + + + + + + + + + + + + + + + + + + + + 7 + + + YES + + + + + + 8 + + + YES + + + + + + 9 + + + YES + + + + + + 10 + + + YES + + + + + + 11 + + + YES + + + + + + 12 + + + YES + + + + + + 13 + + + YES + + + + + + 14 + + + YES + + + + + + 21 + + + YES + + + + + + 22 + + + YES + + + + + + 23 + + + YES + + + + + + 24 + + + YES + + + + + + 46 + + + + + 47 + + + + + 48 + + + + + 49 + + + + + 50 + + + + + 51 + + + + + 52 + + + + + 53 + + + + + 54 + + + + + 55 + + + + + 56 + + + + + 57 + + + + + -3 + + + Application + + + 58 + + + YES + + + + + + 61 + + + + + 62 + + + YES + + + + + + 63 + + + YES + + + + + + 64 + + + YES + + + + + + + + 65 + + + + + 66 + + + + + 67 + + + + + 78 + + + YES + + + + + + + + 79 + + + + + 80 + + + + + 81 + + + + + + + YES + + YES + -3.IBPluginDependency + 10.IBPluginDependency + 10.ImportedFromIB2 + 11.IBPluginDependency + 11.ImportedFromIB2 + 12.IBPluginDependency + 12.ImportedFromIB2 + 13.IBPluginDependency + 13.ImportedFromIB2 + 14.IBPluginDependency + 14.ImportedFromIB2 + 21.IBPluginDependency + 21.IBViewBoundsToFrameTransform + 21.ImportedFromIB2 + 22.IBPluginDependency + 22.IBViewBoundsToFrameTransform + 22.ImportedFromIB2 + 23.IBPluginDependency + 23.IBViewBoundsToFrameTransform + 23.ImportedFromIB2 + 24.IBPluginDependency + 24.IBViewBoundsToFrameTransform + 24.ImportedFromIB2 + 46.IBPluginDependency + 47.IBPluginDependency + 48.IBPluginDependency + 49.IBPluginDependency + 5.IBEditorWindowLastContentRect + 5.IBPluginDependency + 5.IBWindowTemplateEditedContentRect + 5.ImportedFromIB2 + 5.windowTemplate.hasMinSize + 5.windowTemplate.minSize + 50.IBPluginDependency + 51.IBPluginDependency + 52.IBPluginDependency + 53.IBPluginDependency + 54.IBPluginDependency + 55.IBPluginDependency + 56.IBPluginDependency + 57.IBPluginDependency + 58.IBPluginDependency + 58.IBViewBoundsToFrameTransform + 58.ImportedFromIB2 + 6.IBPluginDependency + 6.ImportedFromIB2 + 61.IBPluginDependency + 62.IBPluginDependency + 62.IBViewBoundsToFrameTransform + 63.IBPluginDependency + 64.IBEditorWindowLastContentRect + 64.IBPluginDependency + 65.IBPluginDependency + 66.IBPluginDependency + 67.IBPluginDependency + 7.IBPluginDependency + 7.ImportedFromIB2 + 78.IBPluginDependency + 78.IBViewBoundsToFrameTransform + 79.IBPluginDependency + 8.IBPluginDependency + 8.ImportedFromIB2 + 80.IBPluginDependency + 81.IBPluginDependency + 9.IBPluginDependency + 9.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDAwAAwsQAAA + + + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDOgAAwsoAAA + + + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDwAAAwoAAAA + + + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDlwAAwoAAAA + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{0, 601}, {480, 244}} + com.apple.InterfaceBuilder.CocoaPlugin + {{0, 601}, {480, 244}} + + + {480, 222} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDBAAAwpAAAA + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDNwAAwpYAAA + + com.apple.InterfaceBuilder.CocoaPlugin + {{331, 624}, {100, 54}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABByAAAwr4AAA + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + + YES + + + + + YES + + + YES + + + + 83 + + + + YES + + EditEventWindowController + NSWindowController + + YES + + YES + cancelButtonClicked: + saveButtonClicked: + + + YES + id + id + + + + YES + + YES + cancelButtonClicked: + saveButtonClicked: + + + YES + + cancelButtonClicked: + id + + + saveButtonClicked: + id + + + + + YES + + YES + descriptionField_ + endDatePicker_ + reminderMatrix_ + reminderMethodPopup_ + reminderMinutesField_ + startDatePicker_ + titleField_ + + + YES + NSTextField + NSDatePicker + NSMatrix + NSPopUpButton + NSTextField + NSDatePicker + NSTextField + + + + YES + + YES + descriptionField_ + endDatePicker_ + reminderMatrix_ + reminderMethodPopup_ + reminderMinutesField_ + startDatePicker_ + titleField_ + + + YES + + descriptionField_ + NSTextField + + + endDatePicker_ + NSDatePicker + + + reminderMatrix_ + NSMatrix + + + reminderMethodPopup_ + NSPopUpButton + + + reminderMinutesField_ + NSTextField + + + startDatePicker_ + NSDatePicker + + + titleField_ + NSTextField + + + + + IBProjectSource + EditEventWindowController.h + + + + EditEventWindowController + NSWindowController + + IBUserSource + + + + + FirstResponder + NSObject + + IBUserSource + + + + + NSDatePicker + NSControl + + IBUserSource + + + + + + YES + + NSActionCell + NSCell + + IBFrameworkSource + AppKit.framework/Headers/NSActionCell.h + + + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSButton + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSButton.h + + + + NSButtonCell + NSActionCell + + IBFrameworkSource + AppKit.framework/Headers/NSButtonCell.h + + + + NSCell + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSCell.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSDatePicker + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSDatePicker.h + + + + NSDatePickerCell + NSActionCell + + IBFrameworkSource + AppKit.framework/Headers/NSDatePickerCell.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSMatrix + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSMatrix.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSMenuItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSMenuItemCell + NSButtonCell + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItemCell.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebEditingDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebFrameLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebJavaPlugIn.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPlugin.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPluginContainer.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPolicyDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebResourceLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebScriptObject.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebUIDelegate.h + + + + NSPopUpButton + NSButton + + IBFrameworkSource + AppKit.framework/Headers/NSPopUpButton.h + + + + NSPopUpButtonCell + NSMenuItemCell + + IBFrameworkSource + AppKit.framework/Headers/NSPopUpButtonCell.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSTextField + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSTextField.h + + + + NSTextFieldCell + NSActionCell + + IBFrameworkSource + AppKit.framework/Headers/NSTextFieldCell.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + + NSWindowController + NSResponder + + showWindow: + id + + + showWindow: + + showWindow: + id + + + + IBFrameworkSource + AppKit.framework/Headers/NSWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../CalendarSample.xcodeproj + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {9, 8} + {7, 2} + + + + diff --git a/GTL/Examples/CalendarSample/English.lproj/InfoPlist.strings b/GTL/Examples/CalendarSample/English.lproj/InfoPlist.strings new file mode 100644 index 0000000..77831dd --- /dev/null +++ b/GTL/Examples/CalendarSample/English.lproj/InfoPlist.strings @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "© Google Inc. 2011"; diff --git a/GTL/Examples/CalendarSample/English.lproj/MainMenu.xib b/GTL/Examples/CalendarSample/English.lproj/MainMenu.xib new file mode 100644 index 0000000..b936afc --- /dev/null +++ b/GTL/Examples/CalendarSample/English.lproj/MainMenu.xib @@ -0,0 +1,2409 @@ + + + + 1050 + 10J869 + 851 + 1038.35 + 461.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 851 + + + YES + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + + NSApplication + + + + FirstResponder + + + NSApplication + + + MainMenu + + YES + + + SampleApp + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + SampleApp + + YES + + + About the Sample + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + + Services + + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + + File + + + YES + + + New + n + 1048576 + 2147483647 + + + + + + Open... + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + + Open Recent + + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + Save As… + S + 1048576 + 2147483647 + + + + + + Revert + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup… + P + 1048576 + 2147483647 + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + + Edit + + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + + Find + + + YES + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1048576 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling + + 1048576 + 2147483647 + + + submenuAction: + + Spelling + + YES + + + Spelling… + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling as You Type + + 1048576 + 2147483647 + + + + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + + Window + + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + Help + + YES + + + Help + ? + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + CalendarSampleAppController + + + + + YES + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + showHelp: + + + + 122 + + + + clearRecentDocuments: + + + + 127 + + + + terminate: + + + + 139 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + hideOtherApplications: + + + + 146 + + + + hide: + + + + 152 + + + + unhideAllApplications: + + + + 153 + + + + cut: + + + + 175 + + + + paste: + + + + 176 + + + + redo: + + + + 178 + + + + selectAll: + + + + 179 + + + + undo: + + + + 180 + + + + copy: + + + + 181 + + + + showGuessPanel: + + + + 188 + + + + checkSpelling: + + + + 190 + + + + toggleContinuousSpellChecking: + + + + 192 + + + + performClose: + + + + 193 + + + + delete: + + + + 195 + + + + performZoom: + + + + 198 + + + + performFindPanelAction: + + + + 199 + + + + performFindPanelAction: + + + + 200 + + + + performFindPanelAction: + + + + 201 + + + + performFindPanelAction: + + + + 202 + + + + centerSelectionInVisibleArea: + + + + 203 + + + + pasteAsPlainText: + + + + 205 + + + + delegate + + + + 223 + + + + delegate + + + + 225 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + MainMenu + + + 19 + + + YES + + + + + + 24 + + + YES + + + + + + + + + 5 + + + + + 23 + + + + + 92 + + + + + 197 + + + + + 56 + + + YES + + + + + + 57 + + + YES + + + + + + + + + + + + + + + + 58 + + + + + 129 + + + + + 131 + + + YES + + + + + + 130 + + + + + 134 + + + + + 136 + + + + + 143 + + + + + 144 + + + + + 145 + + + + + 149 + + + + + 150 + + + + + 196 + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + + + + + + + + 72 + + + + + 73 + + + + + 74 + + + + + 75 + + + + + 77 + + + + + 78 + + + + + 79 + + + + + 80 + + + + + 82 + + + + + 112 + + + + + 124 + + + YES + + + + + + 125 + + + YES + + + + + + 126 + + + + + 103 + + + YES + + + + + + 106 + + + YES + + + + + + 111 + + + + + 163 + + + YES + + + + + + 169 + + + YES + + + + + + + + + + + + + + + + + 156 + + + + + 157 + + + + + 158 + + + + + 160 + + + + + 164 + + + + + 168 + + + YES + + + + + + 159 + + + YES + + + + + + + + + + 154 + + + + + 155 + + + + + 161 + + + + + 162 + + + + + 167 + + + + + 171 + + + + + 172 + + + + + 173 + + + + + 174 + + + + + 184 + + + YES + + + + + + 185 + + + YES + + + + + + + + 187 + + + + + 189 + + + + + 191 + + + + + 204 + + + + + 222 + + + SampleAppController + + + + + YES + + YES + -3.IBPluginDependency + -3.ImportedFromIB2 + 103.IBPluginDependency + 103.ImportedFromIB2 + 106.IBPluginDependency + 106.ImportedFromIB2 + 111.IBPluginDependency + 111.ImportedFromIB2 + 112.IBPluginDependency + 112.ImportedFromIB2 + 124.IBPluginDependency + 124.ImportedFromIB2 + 125.IBPluginDependency + 125.ImportedFromIB2 + 126.IBPluginDependency + 126.ImportedFromIB2 + 129.IBPluginDependency + 129.ImportedFromIB2 + 130.IBPluginDependency + 130.ImportedFromIB2 + 131.IBPluginDependency + 131.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 136.IBPluginDependency + 136.ImportedFromIB2 + 143.IBPluginDependency + 143.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 145.IBPluginDependency + 145.ImportedFromIB2 + 149.IBPluginDependency + 149.ImportedFromIB2 + 150.IBPluginDependency + 150.ImportedFromIB2 + 154.IBPluginDependency + 154.ImportedFromIB2 + 155.IBPluginDependency + 155.ImportedFromIB2 + 156.IBPluginDependency + 156.ImportedFromIB2 + 157.IBPluginDependency + 157.ImportedFromIB2 + 158.IBPluginDependency + 158.ImportedFromIB2 + 159.IBPluginDependency + 159.ImportedFromIB2 + 160.IBPluginDependency + 160.ImportedFromIB2 + 161.IBPluginDependency + 161.ImportedFromIB2 + 162.IBPluginDependency + 162.ImportedFromIB2 + 163.IBPluginDependency + 163.ImportedFromIB2 + 164.IBPluginDependency + 164.ImportedFromIB2 + 167.IBPluginDependency + 167.ImportedFromIB2 + 168.IBPluginDependency + 168.ImportedFromIB2 + 169.IBPluginDependency + 169.ImportedFromIB2 + 171.IBPluginDependency + 171.ImportedFromIB2 + 172.IBPluginDependency + 172.ImportedFromIB2 + 173.IBPluginDependency + 173.ImportedFromIB2 + 174.IBPluginDependency + 174.ImportedFromIB2 + 184.IBPluginDependency + 184.ImportedFromIB2 + 185.IBPluginDependency + 185.ImportedFromIB2 + 187.IBPluginDependency + 187.ImportedFromIB2 + 189.IBPluginDependency + 189.ImportedFromIB2 + 19.IBPluginDependency + 19.ImportedFromIB2 + 191.IBPluginDependency + 191.ImportedFromIB2 + 196.IBPluginDependency + 196.ImportedFromIB2 + 197.IBPluginDependency + 197.ImportedFromIB2 + 204.IBPluginDependency + 204.ImportedFromIB2 + 222.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 24.IBPluginDependency + 24.ImportedFromIB2 + 29.IBPluginDependency + 29.ImportedFromIB2 + 5.IBPluginDependency + 5.ImportedFromIB2 + 56.IBPluginDependency + 56.ImportedFromIB2 + 57.IBPluginDependency + 57.ImportedFromIB2 + 58.IBPluginDependency + 58.ImportedFromIB2 + 72.IBPluginDependency + 72.ImportedFromIB2 + 73.IBPluginDependency + 73.ImportedFromIB2 + 74.IBPluginDependency + 74.ImportedFromIB2 + 75.IBPluginDependency + 75.ImportedFromIB2 + 77.IBPluginDependency + 77.ImportedFromIB2 + 78.IBPluginDependency + 78.ImportedFromIB2 + 79.IBPluginDependency + 79.ImportedFromIB2 + 80.IBPluginDependency + 80.ImportedFromIB2 + 81.IBPluginDependency + 81.ImportedFromIB2 + 82.IBPluginDependency + 82.ImportedFromIB2 + 83.IBPluginDependency + 83.ImportedFromIB2 + 92.IBPluginDependency + 92.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + + YES + + + + + YES + + + YES + + + + 227 + + + + YES + + CalendarSampleAppController + NSObject + + IBProjectSource + CalendarSampleAppController.h + + + + FirstResponder + NSObject + + IBUserSource + + + + + + YES + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSBrowser + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSBrowser.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSDocument + NSObject + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + id + id + id + id + id + id + + + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + + printDocument: + id + + + revertDocumentToSaved: + id + + + runPageLayout: + id + + + saveDocument: + id + + + saveDocumentAs: + id + + + saveDocumentTo: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocument.h + + + + NSDocument + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentScripting.h + + + + NSDocumentController + NSObject + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + id + id + id + id + + + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + + clearRecentDocuments: + id + + + newDocument: + id + + + openDocument: + id + + + saveAllDocuments: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentController.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSMatrix + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSMatrix.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSMenuItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSMovieView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSMovieView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebEditingDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebFrameLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebJavaPlugIn.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPlugin.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPluginContainer.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPolicyDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebResourceLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebScriptObject.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebUIDelegate.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSTableView + NSControl + + + + NSText + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSText.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + + WebView + NSView + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + + goBack: + id + + + goForward: + id + + + makeTextLarger: + id + + + makeTextSmaller: + id + + + makeTextStandardSize: + id + + + reload: + id + + + reloadFromOrigin: + id + + + stopLoading: + id + + + takeStringURLFrom: + id + + + toggleContinuousSpellChecking: + id + + + toggleSmartInsertDelete: + id + + + + + IBFrameworkSource + WebKit.framework/Headers/WebView.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../CalendarSample.xcodeproj + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {9, 8} + {7, 2} + + + + diff --git a/GTL/Examples/CalendarSample/Info.plist b/GTL/Examples/CalendarSample/Info.plist new file mode 100644 index 0000000..a0c5e41 --- /dev/null +++ b/GTL/Examples/CalendarSample/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.example.CalendarSample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/GTL/Examples/CalendarSample/README.txt b/GTL/Examples/CalendarSample/README.txt new file mode 100644 index 0000000..ff257a0 --- /dev/null +++ b/GTL/Examples/CalendarSample/README.txt @@ -0,0 +1 @@ +This sample should automatically build and copy over the GTL.framework as part of the build-and-run process. diff --git a/GTL/Examples/CalendarSample/buildStripHeaders b/GTL/Examples/CalendarSample/buildStripHeaders new file mode 100755 index 0000000..0238ef2 --- /dev/null +++ b/GTL/Examples/CalendarSample/buildStripHeaders @@ -0,0 +1,17 @@ +#!/bin/sh +# +# buildStripHeaders +# +# Remove header files from the built copy of the framework inside our +# application. + +# Strip "*.h" files +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname '*.h' -delete + +# Strip "Headers" links +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type l -delete + +# Strip "Headers" directories +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type d -prune -delete + + diff --git a/GTL/Examples/CalendarSample/main.m b/GTL/Examples/CalendarSample/main.m new file mode 100644 index 0000000..a1649ce --- /dev/null +++ b/GTL/Examples/CalendarSample/main.m @@ -0,0 +1,24 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// main.m +// + +#import + +int main(int argc, char *argv[]) { + return NSApplicationMain(argc, (const char **) argv); +} diff --git a/GTL/Examples/DriveSample/.svn/all-wcprops b/GTL/Examples/DriveSample/.svn/all-wcprops new file mode 100644 index 0000000..714d3b1 --- /dev/null +++ b/GTL/Examples/DriveSample/.svn/all-wcprops @@ -0,0 +1,53 @@ +K 25 +svn:wc:ra_dav:version-url +V 44 +/svn/!svn/ver/234/trunk/Examples/DriveSample +END +main.m +K 25 +svn:wc:ra_dav:version-url +V 51 +/svn/!svn/ver/177/trunk/Examples/DriveSample/main.m +END +DriveSampleWindowController.m +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/218/trunk/Examples/DriveSample/DriveSampleWindowController.m +END +Info.plist +K 25 +svn:wc:ra_dav:version-url +V 55 +/svn/!svn/ver/177/trunk/Examples/DriveSample/Info.plist +END +DriveSampleAppController.h +K 25 +svn:wc:ra_dav:version-url +V 71 +/svn/!svn/ver/177/trunk/Examples/DriveSample/DriveSampleAppController.h +END +DriveSampleAppController.m +K 25 +svn:wc:ra_dav:version-url +V 71 +/svn/!svn/ver/177/trunk/Examples/DriveSample/DriveSampleAppController.m +END +README.txt +K 25 +svn:wc:ra_dav:version-url +V 55 +/svn/!svn/ver/177/trunk/Examples/DriveSample/README.txt +END +DriveSampleWindowController.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/200/trunk/Examples/DriveSample/DriveSampleWindowController.h +END +buildStripHeaders +K 25 +svn:wc:ra_dav:version-url +V 62 +/svn/!svn/ver/177/trunk/Examples/DriveSample/buildStripHeaders +END diff --git a/GTL/Examples/DriveSample/.svn/entries b/GTL/Examples/DriveSample/.svn/entries new file mode 100644 index 0000000..b7c3968 --- /dev/null +++ b/GTL/Examples/DriveSample/.svn/entries @@ -0,0 +1,306 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/DriveSample +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-11T00:45:57.082798Z +234 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +main.m +file + + + + +2012-12-09T08:42:34.000000Z +af9c2e77a713a1097860676cdace71b7 +2012-06-27T17:28:28.744668Z +177 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +736 + +DriveSampleWindowController.m +file + + + + +2012-12-09T08:42:34.000000Z +3871f007989dbd1e6aced9bd6eb60994 +2012-09-26T02:50:27.597920Z +218 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +37642 + +Info.plist +file + + + + +2012-12-09T08:42:34.000000Z +acf24a969aeefcbe2b1a6de85fabf632 +2012-06-27T17:28:28.744668Z +177 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +836 + +DriveSampleAppController.h +file + + + + +2012-12-09T08:42:34.000000Z +3cd985409ac60c56c4e7fc6d2cebd8d4 +2012-06-27T17:28:28.744668Z +177 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +712 + +DriveSample.xcodeproj +dir + +DriveSampleAppController.m +file + + + + +2012-12-09T08:42:34.000000Z +5c28b4a31d8ef25842bc66a8833914c9 +2012-06-27T17:28:28.744668Z +177 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1080 + +README.txt +file + + + + +2012-12-09T08:42:34.000000Z +0a3374a462b2cff6dcd19d0caf28958a +2012-06-27T17:28:28.744668Z +177 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +109 + +DriveSampleWindowController.h +file + + + + +2012-12-09T08:42:34.000000Z +b3bd8f9d6e775fcc4c3df3afba2d6e94 +2012-08-06T20:19:50.423180Z +200 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3103 + +buildStripHeaders +file + + + + +2012-12-09T08:42:34.000000Z +38b5302dc0e4a662c40b288306a2f6ac +2012-06-27T17:28:28.744668Z +177 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +454 + +English.lproj +dir + diff --git a/GTL/Examples/DriveSample/.svn/prop-base/buildStripHeaders.svn-base b/GTL/Examples/DriveSample/.svn/prop-base/buildStripHeaders.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/GTL/Examples/DriveSample/.svn/prop-base/buildStripHeaders.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/GTL/Examples/DriveSample/.svn/text-base/DriveSampleAppController.h.svn-base b/GTL/Examples/DriveSample/.svn/text-base/DriveSampleAppController.h.svn-base new file mode 100644 index 0000000..499658a --- /dev/null +++ b/GTL/Examples/DriveSample/.svn/text-base/DriveSampleAppController.h.svn-base @@ -0,0 +1,23 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// DriveSampleAppController.h +// + +#import + +@interface DriveSampleAppController : NSObject +@end diff --git a/GTL/Examples/DriveSample/.svn/text-base/DriveSampleAppController.m.svn-base b/GTL/Examples/DriveSample/.svn/text-base/DriveSampleAppController.m.svn-base new file mode 100644 index 0000000..c7e3398 --- /dev/null +++ b/GTL/Examples/DriveSample/.svn/text-base/DriveSampleAppController.m.svn-base @@ -0,0 +1,35 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// DriveSampleAppController.m +// + +#import "DriveSampleAppController.h" +#import "DriveSampleWindowController.h" + +@implementation DriveSampleAppController + +- (void)applicationWillFinishLaunching:(NSNotification *)notification { + DriveSampleWindowController* windowController + = [DriveSampleWindowController sharedWindowController]; + [windowController showWindow:self]; +} + +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { + return YES; +} + +@end diff --git a/GTL/Examples/DriveSample/.svn/text-base/DriveSampleWindowController.h.svn-base b/GTL/Examples/DriveSample/.svn/text-base/DriveSampleWindowController.h.svn-base new file mode 100644 index 0000000..c9eb7cb --- /dev/null +++ b/GTL/Examples/DriveSample/.svn/text-base/DriveSampleWindowController.h.svn-base @@ -0,0 +1,98 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// DriveSampleWindowController.h +// + +// The sample app controllers are built with ARC, though the sources of +// the GTL library should be built without ARC using the compiler flag +// -fno-objc-arc in the Compile Sources build phase of the application +// target. + +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import + +#import "GTLDrive.h" +#import "GTL/GTMOAuth2WindowController.h" + +@interface DriveSampleWindowController : NSWindowController { + @private + IBOutlet NSTextField *_signedInField; + IBOutlet NSButton *_signedInButton; + + IBOutlet NSTableView *_fileListTable; + IBOutlet NSProgressIndicator *_fileListProgressIndicator; + IBOutlet NSTextView *_fileListResultTextField; + IBOutlet NSButton *_fileListCancelButton; + IBOutlet NSImageView *_thumbnailView; + + IBOutlet NSPopUpButton *_downloadButton; + IBOutlet NSButton *_viewButton; + IBOutlet NSButton *_duplicateButton; + IBOutlet NSButton *_trashButton; + IBOutlet NSButton *_deleteButton; + + IBOutlet NSButton *_uploadButton; + IBOutlet NSProgressIndicator *_uploadProgressIndicator; + IBOutlet NSButton *_pauseUploadButton; + IBOutlet NSButton *_stopUploadButton; + IBOutlet NSButton *_newFolderButton; + + IBOutlet NSSegmentedControl *_segmentedControl; + IBOutlet NSTableView *_detailTable; + IBOutlet NSProgressIndicator *_detailProgressIndicator; + IBOutlet NSTextView *_detailResultTextField; + IBOutlet NSButton *_detailCancelButton; + + // Client ID Sheet (Not needed by real applications) + IBOutlet NSButton *_clientIDButton; + IBOutlet NSTextField *_clientIDRequiredTextField; + IBOutlet NSWindow *_clientIDSheet; + IBOutlet NSTextField *_clientIDField; + IBOutlet NSTextField *_clientSecretField; +} + ++ (DriveSampleWindowController *)sharedWindowController; + +- (IBAction)signInClicked:(id)sender; + +- (IBAction)getFileList:(id)sender; + +- (IBAction)cancelFileListFetch:(id)sender; + +- (IBAction)viewClicked:(id)sender; +- (IBAction)duplicateClicked:(id)sender; +- (IBAction)trashClicked:(id)sender; +- (IBAction)deleteClicked:(id)sender; + +- (IBAction)uploadFileClicked:(id)sender; +- (IBAction)pauseUploadClicked:(id)sender; +- (IBAction)stopUploadClicked:(id)sender; +- (IBAction)createFolderClicked:(id)sender; + +- (IBAction)segmentedControlClicked:(id)sender; + +- (IBAction)loggingCheckboxClicked:(id)sender; + +// Client ID Sheet +- (IBAction)clientIDClicked:(id)sender; +- (IBAction)clientIDDoneClicked:(id)sender; +- (IBAction)APIConsoleClicked:(id)sender; + +@end diff --git a/GTL/Examples/DriveSample/.svn/text-base/DriveSampleWindowController.m.svn-base b/GTL/Examples/DriveSample/.svn/text-base/DriveSampleWindowController.m.svn-base new file mode 100644 index 0000000..9428e56 --- /dev/null +++ b/GTL/Examples/DriveSample/.svn/text-base/DriveSampleWindowController.m.svn-base @@ -0,0 +1,1116 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// DriveSampleWindowController.m +// + +#import "DriveSampleWindowController.h" + +#import "GTL/GTLUtilities.h" +#import "GTL/GTMHTTPFetcherLogging.h" + +// Segmented control indices. +enum { + kRevisionsSegment = 0, + kPermissionsSegment, + kChildrenSegment, + kParentsSegment +}; + +// Menu item title for downloading the original file. +static NSString *const kOriginalFile = @"Original File"; + +// Keychain item name for saving the user's authentication information. +NSString *const kKeychainItemName = @"DriveSample: Google Drive"; + +@interface DriveSampleWindowController () +@property (nonatomic, readonly) GTLServiceDrive *driveService; +@end + +@implementation DriveSampleWindowController { + GTLDriveFileList *_fileList; + GTLServiceTicket *_fileListTicket; + NSError *_fileListFetchError; + GTLServiceTicket *_editFileListTicket; + GTLServiceTicket *_uploadFileTicket; + + // Details + GTLDriveRevisionList *_revisionList; + NSError *_revisionListFetchError; + + GTLDrivePermissionList *_permissionList; + NSError *_permissionListFetchError; + + GTLDriveChildList *_childList; + NSError *_childListFetchError; + + GTLDriveParentList *_parentsList; + NSError *_parentsListFetchError; + + GTLServiceTicket *_detailsTicket; + NSError *_detailsFetchError; +} + ++ (DriveSampleWindowController *)sharedWindowController { + static DriveSampleWindowController* gWindowController = nil; + if (!gWindowController) { + gWindowController = [[DriveSampleWindowController alloc] init]; + } + return gWindowController; +} + +- (id)init { + return [self initWithWindowNibName:@"DriveSampleWindow"]; +} + +- (void)awakeFromNib { + // Load the OAuth 2 token from the keychain, if it was previously saved. + NSString *clientID = [_clientIDField stringValue]; + NSString *clientSecret = [_clientSecretField stringValue]; + + GTMOAuth2Authentication *auth; + auth = [GTMOAuth2WindowController authForGoogleFromKeychainForName:kKeychainItemName + clientID:clientID + clientSecret:clientSecret]; + self.driveService.authorizer = auth; + + // Set the result text fields to have a distinctive color and mono-spaced font. + [_fileListResultTextField setTextColor:[NSColor darkGrayColor]]; + [_detailResultTextField setTextColor:[NSColor darkGrayColor]]; + + NSFont *resultTextFont = [NSFont fontWithName:@"Monaco" size:9]; + [_fileListResultTextField setFont:resultTextFont]; + [_detailResultTextField setFont:resultTextFont]; + + [self updateUI]; +} + +#pragma mark - + +- (NSString *)signedInUsername { + // Get the email address of the signed-in user. + GTMOAuth2Authentication *auth = self.driveService.authorizer; + BOOL isSignedIn = auth.canAuthorize; + if (isSignedIn) { + return auth.userEmail; + } else { + return nil; + } +} + +- (BOOL)isSignedIn { + NSString *name = [self signedInUsername]; + return (name != nil); +} + +#pragma mark IBActions + +- (IBAction)signInClicked:(id)sender { + if (![self isSignedIn]) { + // Sign in + [self runSigninThenHandler:^{ + [self updateUI]; + }]; + } else { + // Sign out + GTLServiceDrive *service = self.driveService; + + [GTMOAuth2WindowController removeAuthFromKeychainForName:kKeychainItemName]; + service.authorizer = nil; + [self updateUI]; + } +} + +- (IBAction)segmentedControlClicked:(id)sender { + [self updateUI]; +} + +- (IBAction)getFileList:(id)sender { + if (![self isSignedIn]) { + [self runSigninThenHandler:^{ + [self fetchFileList]; + }]; + } else { + [self fetchFileList]; + } +} + +- (IBAction)cancelFileListFetch:(id)sender { + [_fileListTicket cancelTicket]; + _fileListTicket = nil; + + [_editFileListTicket cancelTicket]; + _editFileListTicket = nil; + + [self updateUI]; +} + +- (IBAction)viewClicked:(id)sender { + GTLDriveFile *selectedFile = [self selectedFileListEntry]; + NSString *viewURLString = selectedFile.alternateLink; + if ([viewURLString length] > 0) { + NSURL *url = [NSURL URLWithString:viewURLString]; + [[NSWorkspace sharedWorkspace] openURL:url]; + } +} + +- (IBAction)duplicateClicked:(id)sender { + [self duplicateSelectedFile]; +} + +- (IBAction)trashClicked:(id)sender { + [self changeTrashStateForSelectedFile]; +} + +- (IBAction)deleteClicked:(id)sender { + GTLDriveFile *file = [self selectedFileListEntry]; + NSString *title = file.title; + + NSBeginAlertSheet(@"Delete", nil, @"Cancel", nil, + [self window], self, + @selector(deleteFileSheetDidEnd:returnCode:contextInfo:), + nil, nil, @"Delete \"%@\"?", title); +} + +- (void)deleteFileSheetDidEnd:(NSWindow *)sheet + returnCode:(int)returnCode + contextInfo:(void *)contextInfo { + if (returnCode == NSAlertDefaultReturn) { + [self deleteSelectedFile]; + } +} + +- (IBAction)uploadFileClicked:(id)sender { + // Ask the user to choose a file. + NSOpenPanel *openPanel = [NSOpenPanel openPanel]; + [openPanel setPrompt:@"Upload"]; + [openPanel setCanChooseDirectories:NO]; + [openPanel beginSheetModalForWindow:[self window] + completionHandler:^(NSInteger result) { + // Callback. + if (result == NSOKButton) { + // The user chose a file and clicked OK. + // + // Start uploading (deferred briefly since + // we currently have a sheet displayed). + NSString *path = [[openPanel URL] path]; + [self performSelector:@selector(uploadFileAtPath:) + withObject:path + afterDelay:0.1]; + } + }]; +} + +- (IBAction)pauseUploadClicked:(id)sender { + if ([_uploadFileTicket isUploadPaused]) { + [_uploadFileTicket resumeUpload]; + } else { + [_uploadFileTicket pauseUpload]; + } + [self updateUI]; +} + +- (IBAction)stopUploadClicked:(id)sender { + [_uploadFileTicket cancelTicket]; + _uploadFileTicket = nil; + + [self updateUI]; +} + +- (IBAction)createFolderClicked:(id)sender { + [self createAFolder]; +} + +- (IBAction)APIConsoleClicked:(id)sender { + NSURL *url = [NSURL URLWithString:@"https://code.google.com/apis/console"]; + [[NSWorkspace sharedWorkspace] openURL:url]; +} + +- (IBAction)loggingCheckboxClicked:(id)sender { + [GTMHTTPFetcher setLoggingEnabled:[sender state]]; +} + +#pragma mark - + +// Get a service object with the current username/password +// +// A "service" object handles networking tasks. Service objects +// contain user authentication information as well as networking +// state information (such as cookies and the "last modified" date for +// fetched data.) + +- (GTLServiceDrive *)driveService { + static GTLServiceDrive *service; + + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + service = [[GTLServiceDrive alloc] init]; + + // Have the service object set tickets to fetch consecutive pages + // of the feed so we do not need to manually fetch them + service.shouldFetchNextPages = YES; + + // Have the service object set tickets to retry temporary error conditions + // automatically + service.retryEnabled = YES; + }); + return service; +} + +- (GTLDriveFile *)selectedFileListEntry { + int rowIndex = [_fileListTable selectedRow]; + if (rowIndex > -1) { + // GTLCollectionObjects like GTLDriveFileList support indexed + // access to the collection items + GTLDriveFile *item = _fileList[rowIndex]; + return item; + } + return nil; +} + +- (id)detailCollection { + NSInteger segment = [_segmentedControl selectedSegment]; + switch (segment) { + case kRevisionsSegment: + return _revisionList; + case kPermissionsSegment: + return _permissionList; + case kChildrenSegment: + return _childList; + case kParentsSegment: + return _parentsList; + default: + return nil; + } +} + +- (id)selectedDetailItem { + int rowIndex = [_detailTable selectedRow]; + if (rowIndex > -1) { + GTLCollectionObject *collection = [self detailCollection]; + GTLObject *item = collection[rowIndex]; + return item; + } + return nil; +} + +- (NSError *)detailsError { + // First, check if the query execution succeeded. + NSError *error = _detailsFetchError; + if (error == nil) { + // Next, check if there was an error for the selected detail. + NSInteger segment = [_segmentedControl selectedSegment]; + switch (segment) { + case kRevisionsSegment: + return _revisionListFetchError; + case kPermissionsSegment: + return _permissionListFetchError; + case kChildrenSegment: + return _childListFetchError; + case kParentsSegment: + return _parentsListFetchError; + default: + return nil; + } + } + return nil; +} + +- (NSString *)descriptionForFileID:(NSString *)fileID { + NSArray *files = _fileList.items; + GTLDriveFile *file = [GTLUtilities firstObjectFromArray:files + withValue:fileID + forKeyPath:@"identifier"]; + if (file) { + return file.title; + } else { + // Can't find the file by its identifier. + return [NSString stringWithFormat:@"<%@>", fileID]; + } +} + +- (NSString *)descriptionForDetailItem:(id)item { + if ([item isKindOfClass:[GTLDriveRevision class]]) { + return ((GTLDriveRevision *)item).modifiedDate.stringValue; + } else if ([item isKindOfClass:[GTLDrivePermission class]]) { + return ((GTLDrivePermission *)item).name; + } else if ([item isKindOfClass:[GTLDriveChildReference class]]) { + NSString *childID = ((GTLDriveChildReference *)item).identifier; + return [self descriptionForFileID:childID]; + } else if ([item isKindOfClass:[GTLDriveParentReference class]]) { + GTLDriveParentReference *parentRef = ((GTLDriveParentReference *)item); + if ([[parentRef isRoot] boolValue]) { + return @""; + } else { + NSString *parentID = parentRef.identifier; + return [self descriptionForFileID:parentID]; + } + } + return nil; +} + +#pragma mark - +#pragma mark Fetch File List + +- (void)fetchFileList { + _fileList = nil; + _fileListFetchError = nil; + + GTLServiceDrive *service = self.driveService; + + GTLQueryDrive *query = [GTLQueryDrive queryForFilesList]; + + // maxResults specifies the number of results per page. Since we earlier + // specified shouldFetchNextPages=YES, all results should be fetched, + // though specifying a larger maxResults will reduce the number of fetches + // needed to retrieve all pages. + query.maxResults = 150; + + // The Drive API's file entries are chock full of data that the app may not + // care about. Specifying the fields we want here reduces the network + // bandwidth and memory needed for the collection. + // + // For example, leave query.fields as nil during development. + // When ready to test and optimize your app, specify just the fields needed. + // For example, this sample app might use + // + // query.fields = @"kind,etag,items(id,downloadUrl,editable,etag,exportLinks,kind,labels,originalFilename,title)"; + + _fileListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + GTLDriveFileList *fileList, + NSError *error) { + // Callback + _fileList = fileList; + _fileListFetchError = error; + _fileListTicket = nil; + + [self updateUI]; + }]; + + [self updateUI]; +} + +#pragma mark Fetch File Details + +- (void)fetchSelectedFileDetails { + _revisionList = nil; + _revisionListFetchError = nil; + _permissionList = nil; + _permissionListFetchError = nil; + _childList = nil; + _childListFetchError = nil; + _parentsList = nil; + _parentsListFetchError = nil; + + _detailsFetchError = nil; + + GTLServiceDrive *service = self.driveService; + + GTLDriveFile *selectedFile = [self selectedFileListEntry]; + NSString *fileID = selectedFile.identifier; + if (fileID) { + // Rather than make separate fetches for each kind of detail for the + // selected file, we'll make a single batch query to etch the various + // details. Each query in the batch will have its own result or error, + // and the batch query execution itself may fail with an error. + GTLQueryDrive *revisionQuery = [GTLQueryDrive queryForRevisionsListWithFileId:fileID]; + revisionQuery.completionBlock = ^(GTLServiceTicket *ticket, GTLDriveRevisionList *obj, + NSError *error) { + _revisionList = obj; + _revisionListFetchError = error; + }; + + GTLQueryDrive *permissionQuery = [GTLQueryDrive queryForPermissionsListWithFileId:fileID]; + permissionQuery.completionBlock = ^(GTLServiceTicket *ticket, GTLDrivePermissionList *obj, + NSError *error) { + _permissionList = obj; + _permissionListFetchError = error; + }; + + GTLQueryDrive *childQuery = [GTLQueryDrive queryForChildrenListWithFolderId:fileID]; + childQuery.completionBlock = ^(GTLServiceTicket *ticket, GTLDriveChildList *obj, + NSError *error) { + _childList = obj; + _childListFetchError = error; + }; + + GTLQueryDrive *parentsQuery = [GTLQueryDrive queryForParentsListWithFileId:fileID]; + parentsQuery.completionBlock = ^(GTLServiceTicket *ticket, GTLDriveParentList *obj, + NSError *error) { + // Note that we could obtain the parents list for a file item from the + // main file list feed, too. + _parentsList = obj; + _parentsListFetchError = error; + }; + + // Combine the separate queries into one batch. + GTLBatchQuery *batchQuery = [GTLBatchQuery batchQuery]; + [batchQuery addQuery:revisionQuery]; + [batchQuery addQuery:permissionQuery]; + [batchQuery addQuery:childQuery]; + [batchQuery addQuery:parentsQuery]; + + _detailsTicket = [service executeQuery:batchQuery + completionHandler:^(GTLServiceTicket *ticket, + GTLBatchResult *batchResult, NSError *error) { + // Callback + // + // The batch query execution completionHandler runs after the individual + // query completion handlers have been called. + _detailsTicket = nil; + _detailsFetchError = error; + + [self updateUI]; + }]; + [self updateUI]; + } +} + +#pragma mark Delete a File + +- (void)deleteSelectedFile { + GTLServiceDrive *service = self.driveService; + + GTLDriveFile *selectedFile = [self selectedFileListEntry]; + NSString *fileID = selectedFile.identifier; + if (fileID) { + GTLQueryDrive *query = [GTLQueryDrive queryForFilesDeleteWithFileId:fileID]; + _editFileListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id nilObject, + NSError *error) { + // Callback + _editFileListTicket = nil; + if (error == nil) { + [self displayAlert:@"Deleted" + format:@"Deleted \"%@\"", + selectedFile.title]; + [self updateUI]; + [self fetchFileList]; + } else { + [self displayAlert:@"Delete Failed" + format:@"%@", error]; + } + }]; + } +} + +#pragma mark Toggle Trash State + +- (void)changeTrashStateForSelectedFile { + GTLServiceDrive *service = self.driveService; + + GTLDriveFile *selectedFile = [self selectedFileListEntry]; + NSString *fileID = selectedFile.identifier; + if (fileID) { + GTLQueryDrive *query; + BOOL isInTrash = [selectedFile.labels.trashed boolValue]; + if (isInTrash) { + query = [GTLQueryDrive queryForFilesUntrashWithFileId:fileID]; + } else { + query = [GTLQueryDrive queryForFilesTrashWithFileId:fileID]; + } + _editFileListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id nilObject, + NSError *error) { + // Callback + _editFileListTicket = nil; + if (error == nil) { + NSString *fmt = (isInTrash ? @"Moved \"%@\" out of trash" : @"Moved \"%@\" to trash"); + [self displayAlert:@"Updated" + format:fmt, selectedFile.title]; + [self updateUI]; + [self fetchFileList]; + } else { + [self displayAlert:@"Trash Change Failed" + format:@"%@", error]; + } + }]; + } +} + +#pragma mark Duplicate a File + +- (void)duplicateSelectedFile { + GTLServiceDrive *service = self.driveService; + + GTLDriveFile *selectedFile = [self selectedFileListEntry]; + NSString *fileID = selectedFile.identifier; + if (fileID) { + // Make a file object with the title to use for the duplicate. + GTLDriveFile *fileObj = [GTLDriveFile object]; + fileObj.title = [NSString stringWithFormat:@"%@ copy", selectedFile.title]; + + GTLQueryDrive *query = [GTLQueryDrive queryForFilesCopyWithObject:fileObj + fileId:fileID]; + _editFileListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + GTLDriveFile *copiedFile, + NSError *error) { + // Callback + _editFileListTicket = nil; + if (error == nil) { + [self displayAlert:@"Copied" + format:@"Created copy \"%@\"", + copiedFile.title]; + [self updateUI]; + [self fetchFileList]; + } else { + [self displayAlert:@"Copy failed" + format:@"%@", error]; + } + }]; + } +} + +#pragma mark New Folder + +- (void)createAFolder { + GTLServiceDrive *service = self.driveService; + + GTLDriveFile *folderObj = [GTLDriveFile object]; + folderObj.title = [NSString stringWithFormat:@"New Folder %@", [NSDate date]]; + folderObj.mimeType = @"application/vnd.google-apps.folder"; + + // To create a folder in a specific parent folder, specify the identifier + // of the parent: + // + // GTLDriveParentReference *parentRef = [GTLDriveParentReference object]; + // parentRef.identifier = parentID; + // folderObj.parents = [NSArray arrayWithObject:parentRef]; + + GTLQueryDrive *query = [GTLQueryDrive queryForFilesInsertWithObject:folderObj + uploadParameters:nil]; + _editFileListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + GTLDriveFile *folderItem, + NSError *error) { + // Callback + _editFileListTicket = nil; + if (error == nil) { + [self displayAlert:@"Created" + format:@"Created folder \"%@\"", + folderItem.title]; + [self updateUI]; + [self fetchFileList]; + } else { + [self displayAlert:@"Create Folder Failed" + format:@"%@", error]; + } + }]; +} + +#pragma mark Uploading + +- (void)uploadFileAtPath:(NSString *)path { + // Queries that support file uploads take an uploadParameters object. + // The uploadParameters include the MIME type of the file being uploaded, + // and either an NSData with the file contents, or an NSFileHandler for + // the file path. + NSFileHandle *fileHandle = [NSFileHandle fileHandleForReadingAtPath:path]; + if (fileHandle) { + GTLServiceDrive *service = self.driveService; + + NSString *filename = [path lastPathComponent]; + NSString *mimeType = [self MIMETypeFileName:filename + defaultMIMEType:@"binary/octet-stream"]; + GTLUploadParameters *uploadParameters = + [GTLUploadParameters uploadParametersWithFileHandle:fileHandle + MIMEType:mimeType]; + GTLDriveFile *newFile = [GTLDriveFile object]; + newFile.title = filename; + + GTLQueryDrive *query = [GTLQueryDrive queryForFilesInsertWithObject:newFile + uploadParameters:uploadParameters]; + _uploadFileTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + GTLDriveFile *uploadedFile, + NSError *error) { + // Callback + _uploadFileTicket = nil; + if (error == nil) { + [self displayAlert:@"Created" + format:@"Uploaded file \"%@\"", + uploadedFile.title]; + [self fetchFileList]; + } else { + [self displayAlert:@"Upload Failed" + format:@"%@", error]; + } + [_uploadProgressIndicator setDoubleValue:0.0]; + [self updateUI]; + }]; + + NSProgressIndicator *uploadProgressIndicator = _uploadProgressIndicator; + _uploadFileTicket.uploadProgressBlock = ^(GTLServiceTicket *ticket, + unsigned long long numberOfBytesRead, + unsigned long long dataLength) { + [uploadProgressIndicator setMaxValue:(double)dataLength]; + [uploadProgressIndicator setDoubleValue:(double)numberOfBytesRead]; + }; + [self updateUI]; + } else { + // Could not read file data. + [self displayAlert:@"No Upload File Found" format:@"Path: %@", path]; + } +} + +- (NSString *)MIMETypeFileName:(NSString *)path + defaultMIMEType:(NSString *)defaultType { + NSString *result = defaultType; + NSString *extension = [path pathExtension]; + CFStringRef uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, + (__bridge CFStringRef)extension, NULL); + if (uti) { + CFStringRef cfMIMEType = UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType); + if (cfMIMEType) { + result = CFBridgingRelease(cfMIMEType); + } + CFRelease(uti); + } + return result; +} + +#pragma mark Downloading + +- (void)downloadFormatSelected:(NSMenuItem *)menuItem { + // The user chose a format for downloading the selected file. + NSString *exportFormat = [menuItem title]; + GTLDriveFile *file = [menuItem representedObject]; + NSString *exportURLStr; + NSString *extn = nil; + if ([exportFormat isEqual:kOriginalFile]) { + exportURLStr = file.downloadUrl; + } else { + exportURLStr = [file.exportLinks JSONValueForKey:exportFormat]; + extn = [self extensionForMIMEType:exportFormat]; + } + if ([exportURLStr length] > 0) { + // Show a save panel so the user can pick a download location. + NSString *suggestedName = file.originalFilename; + if ([suggestedName length] == 0) { + suggestedName = file.title; + } + if ([extn length] > 0) { + NSString *withoutExt = [suggestedName stringByDeletingPathExtension]; + suggestedName = [withoutExt stringByAppendingPathExtension:extn]; + } + NSSavePanel *savePanel = [NSSavePanel savePanel]; + [savePanel setNameFieldStringValue:suggestedName]; + [savePanel beginSheetModalForWindow:[self window] + completionHandler:^(NSInteger result) { + // Callback + if (result == NSOKButton) { + NSString *savePath = [[savePanel URL] path]; + + // Use a GTMHTTPFetcher object to download the file with authorization. + NSURL *url = [NSURL URLWithString:exportURLStr]; + NSURLRequest *request = [NSURLRequest requestWithURL:url]; + GTMHTTPFetcher *fetcher = [GTMHTTPFetcher fetcherWithRequest:request]; + + // Requests of user data from Google services must be authorized. + fetcher.authorizer = self.driveService.authorizer; + + // The fetcher can save data directly to a file. + fetcher.downloadPath = savePath; + + // Fetcher logging can include comments. + [fetcher setCommentWithFormat:@"Downloading \"%@\"", file.title]; + + fetcher.receivedDataBlock = ^(NSData *receivedData) { + // The fetcher will call the received data block periodically. + // When a download path has been specified, the received data + // parameter will be nil. + }; + + [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { + // Callback + if (error == nil) { + // Successfully saved the file. + // + // Since a downloadPath property was specified, the data argument is + // nil, and the file data has been written to disk. + [self displayAlert:@"Downloaded" + format:@"%@", savePath]; + } else { + [self displayAlert:@"Error Downloading File" + format:@"%@", error]; + } + }]; + } + }]; + } +} + +- (NSString *)extensionForMIMEType:(NSString *)mimeType { + NSString *result = nil; + CFStringRef uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassMIMEType, + (__bridge CFStringRef)mimeType, NULL); + if (uti) { + CFStringRef cfExtn = UTTypeCopyPreferredTagWithClass(uti, kUTTagClassFilenameExtension); + if (cfExtn) { + result = CFBridgingRelease(cfExtn); + } + CFRelease(uti); + } + return result; +} + +#pragma mark - +#pragma mark Sign In + +- (void)runSigninThenHandler:(void (^)(void))handler { + // Applications should have client ID and client secret strings + // hardcoded into the source, but the sample application asks the + // developer for the strings. + NSString *clientID = [_clientIDField stringValue]; + NSString *clientSecret = [_clientSecretField stringValue]; + + if ([clientID length] == 0 || [clientSecret length] == 0) { + // Remind the developer that client ID and client secret are needed + [_clientIDButton performSelector:@selector(performClick:) + withObject:self + afterDelay:0.5]; + return; + } + + // Show the OAuth 2 sign-in controller + NSBundle *frameworkBundle = [NSBundle bundleForClass:[GTMOAuth2WindowController class]]; + GTMOAuth2WindowController *windowController; + + // Applications that only need to access files created by this app should + // use kGTLAuthScopeDriveFile. + windowController = [GTMOAuth2WindowController controllerWithScope:kGTLAuthScopeDrive + clientID:clientID + clientSecret:clientSecret + keychainItemName:kKeychainItemName + resourceBundle:frameworkBundle]; + + [windowController signInSheetModalForWindow:[self window] + completionHandler:^(GTMOAuth2Authentication *auth, + NSError *error) { + // Callback + if (error == nil) { + self.driveService.authorizer = auth; + if (handler) handler(); + } else { + _fileListFetchError = error; + [self updateUI]; + } + }]; +} + +#pragma mark - +#pragma mark UI + +- (void)updateUI { + BOOL isSignedIn = [self isSignedIn]; + NSString *username = [self signedInUsername]; + [_signedInButton setTitle:(isSignedIn ? @"Sign Out" : @"Sign In")]; + [_signedInField setStringValue:(isSignedIn ? username : @"No")]; + + // + // File list table + // + [_fileListTable reloadData]; + + if (_fileListTicket != nil || _editFileListTicket != nil) { + [_fileListProgressIndicator startAnimation:self]; + } else { + [_fileListProgressIndicator stopAnimation:self]; + } + + // Get the description of the selected item, or the feed fetch error + NSString *resultStr = @""; + + if (_fileListFetchError) { + // Display the error + resultStr = [_fileListFetchError description]; + + // Also display any server data present + NSDictionary *errorInfo = [_fileListFetchError userInfo]; + NSData *errData = errorInfo[kGTMHTTPFetcherStatusDataKey]; + if (errData) { + NSString *dataStr = [[NSString alloc] initWithData:errData + encoding:NSUTF8StringEncoding]; + resultStr = [resultStr stringByAppendingFormat:@"\n%@", dataStr]; + } + } else { + // Display the selected item + GTLDriveFile *item = [self selectedFileListEntry]; + if (item) { + resultStr = [item description]; + } + } + [_fileListResultTextField setString:resultStr]; + + [self updateThumbnailImage]; + + // + // Details table + // + + [_detailTable reloadData]; + + if (_detailsTicket != nil) { + [_detailProgressIndicator startAnimation:self]; + } else { + [_detailProgressIndicator stopAnimation:self]; + } + + // Get the description of the selected item, or the feed fetch error + resultStr = @""; + + NSError *error = [self detailsError]; + if (error) { + resultStr = [error description]; + } else { + id item = [self selectedDetailItem]; + if (item) { + resultStr = [item description]; + } + } + + [_detailResultTextField setString:resultStr]; + + // Update the counts in the segmented control + NSUInteger numberOfRevisions = [_revisionList.items count]; + NSUInteger numberOfPermissions = [_permissionList.items count]; + NSUInteger numberOfChildren = [_childList.items count]; + NSUInteger numberOfParents = [_parentsList.items count]; + + NSString *revisionsStr = [NSString stringWithFormat:@"Revisions %lu", numberOfRevisions]; + NSString *permissionsStr = [NSString stringWithFormat:@"Permissions %lu", numberOfPermissions]; + NSString *childrenStr = [NSString stringWithFormat:@"Children %lu", numberOfChildren]; + NSString *parentsStr = [NSString stringWithFormat:@"Parents %lu", numberOfParents]; + + [_segmentedControl setLabel:revisionsStr forSegment:kRevisionsSegment]; + [_segmentedControl setLabel:permissionsStr forSegment:kPermissionsSegment]; + [_segmentedControl setLabel:childrenStr forSegment:kChildrenSegment]; + [_segmentedControl setLabel:parentsStr forSegment:kParentsSegment]; + + // Enable buttons + BOOL isFetchingFileList = (_fileListTicket != nil); + BOOL isEditingFileList = (_editFileListTicket != nil); + [_fileListCancelButton setEnabled:(isFetchingFileList || isEditingFileList)]; + + BOOL isFetchingDetails = (_detailsTicket != nil); + [_detailCancelButton setEnabled:isFetchingDetails]; + + GTLDriveFile *selectedFile = [self selectedFileListEntry]; + BOOL isFileSelected = (selectedFile != nil); + BOOL isFileViewable = (selectedFile.alternateLink != nil); + [_viewButton setEnabled:isFileViewable]; + + BOOL isEditable = [selectedFile.editable boolValue]; + [_deleteButton setEnabled:isEditable]; + [_trashButton setEnabled:isEditable]; + + BOOL isInTrash = [selectedFile.labels.trashed boolValue]; + NSString *trashTitle = (isInTrash ? @"Untrash" : @"Trash"); + [_trashButton setTitle:trashTitle]; + + [_duplicateButton setEnabled:isFileSelected]; + + BOOL hasFileList = (_fileList != nil); + [_newFolderButton setEnabled:hasFileList]; + + BOOL isUploading = (_uploadFileTicket != nil); + [_uploadButton setEnabled:(hasFileList && !isUploading)]; + [_pauseUploadButton setEnabled:isUploading]; + [_stopUploadButton setEnabled:isUploading]; + + BOOL isUploadPaused = [_uploadFileTicket isUploadPaused]; + NSString *pauseTitle = (isUploadPaused ? @"Resume" : @"Pause"); + [_pauseUploadButton setTitle:pauseTitle]; + + // Fill in the download menu with the available download formats. + BOOL hasDownloadURL = ([selectedFile.downloadUrl length] > 0); + GTLDriveFileExportLinks *exportLinks = selectedFile.exportLinks; + NSArray *exportLinkKeys = [exportLinks additionalJSONKeys]; + BOOL hasExportLinks = ([exportLinkKeys count] > 0); + [_downloadButton setEnabled:(hasDownloadURL || hasExportLinks)]; + + NSMenu *menu = [[NSMenu alloc] init]; + [menu addItemWithTitle:@"Download" action:NULL keyEquivalent:@""]; + + // Add an "Original File" menu item only if there's a download URL. + if ([selectedFile.downloadUrl length] > 0) { + NSMenuItem *menuItem = [menu addItemWithTitle:kOriginalFile + action:@selector(downloadFormatSelected:) + keyEquivalent:@""]; + [menuItem setTarget:self]; + [menuItem setRepresentedObject:selectedFile]; + } + + for (NSString *key in exportLinkKeys) { + NSMenuItem *menuItem = [menu addItemWithTitle:key + action:@selector(downloadFormatSelected:) + keyEquivalent:@""]; + [menuItem setTarget:self]; + + [menuItem setRepresentedObject:selectedFile]; + } + [_downloadButton setMenu:menu]; + + // Show or hide the text indicating that the client ID or client secret are + // needed + BOOL hasClientIDStrings = [[_clientIDField stringValue] length] > 0 + && [[_clientSecretField stringValue] length] > 0; + [_clientIDRequiredTextField setHidden:hasClientIDStrings]; +} + +- (void)updateThumbnailImage { + // We will fetch the thumbnail image if its URL is different from the one + // currently displayed. + static NSString *gDisplayedURLStr = nil; + GTLDriveFile *selectedFile = [self selectedFileListEntry]; + NSString *thumbnailURLStr = selectedFile.thumbnailLink; + + if (!GTL_AreEqualOrBothNil(gDisplayedURLStr, thumbnailURLStr)) { + [_thumbnailView setImage:nil]; + + gDisplayedURLStr = [thumbnailURLStr copy]; + + if (thumbnailURLStr) { + GTMHTTPFetcher *fetcher = [GTMHTTPFetcher fetcherWithURLString:thumbnailURLStr]; + fetcher.authorizer = self.driveService.authorizer; + [fetcher setCommentWithFormat:@"Thumbnail for \"%@\"", selectedFile.title]; + [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { + if (data) { + NSImage *image = [[NSImage alloc] initWithData:data]; + if (image) { + [_thumbnailView setImage:image]; + } else { + NSLog(@"Failed to make image from %lu bytes for \"%@\"", + (unsigned long) [data length], selectedFile.title); + } + } else { + NSLog(@"Failed to fetch thumbnail for \"%@\", %@", + selectedFile.title, error); + } + }]; + } + } +} + +- (void)displayAlert:(NSString *)title format:(NSString *)format, ... { + NSString *result = format; + if (format) { + va_list argList; + va_start(argList, format); + result = [[NSString alloc] initWithFormat:format + arguments:argList]; + va_end(argList); + } + NSBeginAlertSheet(title, nil, nil, nil, [self window], nil, nil, + nil, nil, @"%@", result); +} + +#pragma mark Client ID Sheet + +// Client ID and Client Secret Sheet +// +// Sample apps need this sheet to ask for the client ID and client secret +// strings +// +// Your application will just hardcode the client ID and client secret strings +// into the source rather than ask the user for them. +// +// The string values are obtained from the API Console, +// https://code.google.com/apis/console + +- (IBAction)clientIDClicked:(id)sender { + // Show the sheet for developers to enter their client ID and client secret + [NSApp beginSheet:_clientIDSheet + modalForWindow:[self window] + modalDelegate:self + didEndSelector:@selector(clientIDSheetDidEnd:returnCode:contextInfo:) + contextInfo:NULL]; +} + +- (IBAction)clientIDDoneClicked:(id)sender { + [NSApp endSheet:_clientIDSheet returnCode:NSOKButton]; +} + +- (void)clientIDSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { + [sheet orderOut:self]; + [self updateUI]; +} + +#pragma mark Text field delegate methods + +- (void)controlTextDidChange:(NSNotification *)note { + [self updateUI]; // enable and disable buttons +} + +#pragma mark TableView delegate and data source methods + +- (void)tableViewSelectionDidChange:(NSNotification *)notification { + [self updateUI]; + if ([notification object] == _fileListTable) { + [self fetchSelectedFileDetails]; + } +} + +// Table view data source methods +- (int)numberOfRowsInTableView:(NSTableView *)tableView { + GTLCollectionObject *collection; + if (tableView == _fileListTable) { + collection = _fileList; + } else { + collection = [self detailCollection]; + } + return [collection.items count]; +} + +- (id)tableView:(NSTableView *)tableView +objectValueForTableColumn:(NSTableColumn *)tableColumn + row:(NSInteger)row { + if (tableView == _fileListTable) { + // GTLCollectionObjects support indexed access to the collection items + GTLDriveFile *file = _fileList[row]; + return [self fileTitleWithLabelsForFile:file]; + } else { + GTLCollectionObject *collection = [self detailCollection]; + GTLObject *item = collection[row]; + return [self descriptionForDetailItem:item]; + } +} + +- (NSString *)fileTitleWithLabelsForFile:(GTLDriveFile *)file { + + NSMutableString *title = [NSMutableString stringWithString:file.title]; + GTLDriveFileLabels *labels = file.labels; + + if ([labels.starred boolValue]) { + [title appendString:@" \u2605"]; // star character + } + if ([labels.trashed boolValue]) { + title = [NSString stringWithFormat:@"\u2717 %@", title]; // X character + } + if ([labels.hidden boolValue]) { + [title appendString:@" \u263D"]; // quarter moon character + } + if ([labels.restricted boolValue]) { + [title appendString:@" \u21DF"]; // crossed down arrow character + } + return title; +} + +@end diff --git a/GTL/Examples/DriveSample/.svn/text-base/Info.plist.svn-base b/GTL/Examples/DriveSample/.svn/text-base/Info.plist.svn-base new file mode 100644 index 0000000..235b97e --- /dev/null +++ b/GTL/Examples/DriveSample/.svn/text-base/Info.plist.svn-base @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.example.DriveSample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/GTL/Examples/DriveSample/.svn/text-base/README.txt.svn-base b/GTL/Examples/DriveSample/.svn/text-base/README.txt.svn-base new file mode 100644 index 0000000..ff257a0 --- /dev/null +++ b/GTL/Examples/DriveSample/.svn/text-base/README.txt.svn-base @@ -0,0 +1 @@ +This sample should automatically build and copy over the GTL.framework as part of the build-and-run process. diff --git a/GTL/Examples/DriveSample/.svn/text-base/buildStripHeaders.svn-base b/GTL/Examples/DriveSample/.svn/text-base/buildStripHeaders.svn-base new file mode 100644 index 0000000..0238ef2 --- /dev/null +++ b/GTL/Examples/DriveSample/.svn/text-base/buildStripHeaders.svn-base @@ -0,0 +1,17 @@ +#!/bin/sh +# +# buildStripHeaders +# +# Remove header files from the built copy of the framework inside our +# application. + +# Strip "*.h" files +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname '*.h' -delete + +# Strip "Headers" links +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type l -delete + +# Strip "Headers" directories +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type d -prune -delete + + diff --git a/GTL/Examples/DriveSample/.svn/text-base/main.m.svn-base b/GTL/Examples/DriveSample/.svn/text-base/main.m.svn-base new file mode 100644 index 0000000..a1649ce --- /dev/null +++ b/GTL/Examples/DriveSample/.svn/text-base/main.m.svn-base @@ -0,0 +1,24 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// main.m +// + +#import + +int main(int argc, char *argv[]) { + return NSApplicationMain(argc, (const char **) argv); +} diff --git a/GTL/Examples/DriveSample/DriveSample.xcodeproj/.svn/all-wcprops b/GTL/Examples/DriveSample/DriveSample.xcodeproj/.svn/all-wcprops new file mode 100644 index 0000000..d374525 --- /dev/null +++ b/GTL/Examples/DriveSample/DriveSample.xcodeproj/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 66 +/svn/!svn/ver/234/trunk/Examples/DriveSample/DriveSample.xcodeproj +END +project.pbxproj +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/234/trunk/Examples/DriveSample/DriveSample.xcodeproj/project.pbxproj +END diff --git a/GTL/Examples/DriveSample/DriveSample.xcodeproj/.svn/entries b/GTL/Examples/DriveSample/DriveSample.xcodeproj/.svn/entries new file mode 100644 index 0000000..65f772d --- /dev/null +++ b/GTL/Examples/DriveSample/DriveSample.xcodeproj/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/DriveSample/DriveSample.xcodeproj +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-11T00:45:57.082798Z +234 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +project.pbxproj +file + + + + +2012-12-09T08:42:34.000000Z +8891cda1e97b6ce60509af41b59221ed +2012-10-11T00:45:57.082798Z +234 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +19723 + diff --git a/GTL/Examples/DriveSample/DriveSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base b/GTL/Examples/DriveSample/DriveSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base new file mode 100644 index 0000000..5ac731a --- /dev/null +++ b/GTL/Examples/DriveSample/DriveSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base @@ -0,0 +1,499 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4F16F59513DF673000811114 /* DriveSampleWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F16F59313DF673000811114 /* DriveSampleWindow.xib */; }; + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F22A2141186315400FFBAB6 /* WebKit.framework */; }; + 4F2445C8121F0D2900FEE1DA /* GTL.framework in Copy GTL Framework */ = {isa = PBXBuildFile; fileRef = 4F2445BE121F0CF600FEE1DA /* GTL.framework */; }; + 4F2445C9121F0D2C00FEE1DA /* GTL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F2445BE121F0CF600FEE1DA /* GTL.framework */; }; + 4F9B545B15816762005E917A /* DriveSampleAppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F9B545815816762005E917A /* DriveSampleAppController.m */; }; + 4F9B545C15816762005E917A /* DriveSampleWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F9B545A15816762005E917A /* DriveSampleWindowController.m */; }; + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */; }; + 4FF21BEB1626428F00805586 /* GTLDrive_Sources.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FF21BEA1626428F00805586 /* GTLDrive_Sources.m */; }; + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4F2445BD121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F38F6A60B66E91D00B24B81; + remoteInfo = GTLFramework; + }; + 4F2445BF121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027C11A4CA2F00BEB470; + remoteInfo = GTLTouchStaticLib; + }; + 4F2445C1121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027D11A4CA2F00BEB470; + remoteInfo = GTLUnitTests; + }; + 4F2445C3121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F1AD9020B71603F00DC0485; + remoteInfo = DevelopmentTestTool; + }; + 4F72439E12233FAF001A4AD0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 4F38F6A50B66E91D00B24B81; + remoteInfo = GTLFramework; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 4F38F8970B66FAB700B24B81 /* Copy GTL Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4F2445C8121F0D2900FEE1DA /* GTL.framework in Copy GTL Framework */, + ); + name = "Copy GTL Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 4F16F59413DF673000811114 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/DriveSampleWindow.xib; sourceTree = ""; }; + 4F22A2141186315400FFBAB6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; + 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GTL.xcodeproj; path = ../../Source/GTL.xcodeproj; sourceTree = SOURCE_ROOT; }; + 4F9B545715816762005E917A /* DriveSampleAppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = DriveSampleAppController.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 4F9B545815816762005E917A /* DriveSampleAppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = DriveSampleAppController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 4F9B545915816762005E917A /* DriveSampleWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = DriveSampleWindowController.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 4F9B545A15816762005E917A /* DriveSampleWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DriveSampleWindowController.m; sourceTree = ""; }; + 4FA6F3D21034AEC400C5DFA5 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = buildStripHeaders; sourceTree = ""; }; + 4FF21BEA1626428F00805586 /* GTLDrive_Sources.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLDrive_Sources.m; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 8D1107320486CEB800E47090 /* DriveSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DriveSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F2445C9121F0D2C00FEE1DA /* GTL.framework in Frameworks */, + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Sample App Classes */ = { + isa = PBXGroup; + children = ( + 4F9B545715816762005E917A /* DriveSampleAppController.h */, + 4F9B545815816762005E917A /* DriveSampleAppController.m */, + 4F9B545915816762005E917A /* DriveSampleWindowController.h */, + 4F9B545A15816762005E917A /* DriveSampleWindowController.m */, + ); + name = "Sample App Classes"; + sourceTree = ""; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 4F22A2141186315400FFBAB6 /* WebKit.framework */, + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* DriveSample.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CalendarSample */ = { + isa = PBXGroup; + children = ( + 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */, + 080E96DDFE201D6D7F000001 /* Sample App Classes */, + 4FB25385138C3F9E00B5C1AE /* API Services */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CalendarSample; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 4F16F59313DF673000811114 /* DriveSampleWindow.xib */, + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */, + 8D1107310486CEB800E47090 /* Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4F2445B7121F0CF600FEE1DA /* Products */ = { + isa = PBXGroup; + children = ( + 4F2445BE121F0CF600FEE1DA /* GTL.framework */, + 4F2445C0121F0CF600FEE1DA /* libGTLTouchStaticLib.a */, + 4F2445C2121F0CF600FEE1DA /* GTLUnitTests.octest */, + 4F2445C4121F0CF600FEE1DA /* DevelopmentTestTool */, + ); + name = Products; + sourceTree = ""; + }; + 4F96C2221581680B00A0D1D2 /* Drive */ = { + isa = PBXGroup; + children = ( + 4FBBC4BC1593BF1300495B52 /* Generated */, + ); + name = Drive; + path = ../../Source/Services/Drive; + sourceTree = ""; + }; + 4FB25385138C3F9E00B5C1AE /* API Services */ = { + isa = PBXGroup; + children = ( + 4F96C2221581680B00A0D1D2 /* Drive */, + ); + name = "API Services"; + sourceTree = ""; + }; + 4FBBC4BC1593BF1300495B52 /* Generated */ = { + isa = PBXGroup; + children = ( + 4FF21BEA1626428F00805586 /* GTLDrive_Sources.m */, + ); + path = Generated; + sourceTree = ""; + }; + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */ = { + isa = PBXGroup; + children = ( + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */, + ); + name = "Build Scripts"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* DriveSample */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "DriveSample" */; + buildPhases = ( + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + 4F38F8970B66FAB700B24B81 /* Copy GTL Framework */, + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */, + ); + buildRules = ( + ); + dependencies = ( + 4F72439F12233FAF001A4AD0 /* PBXTargetDependency */, + ); + name = DriveSample; + productInstallPath = "$(HOME)/Applications"; + productName = CalendarSample; + productReference = 8D1107320486CEB800E47090 /* DriveSample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0440; + }; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "DriveSample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CalendarSample */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 4F2445B7121F0CF600FEE1DA /* Products */; + ProjectRef = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* DriveSample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 4F2445BE121F0CF600FEE1DA /* GTL.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = GTL.framework; + remoteRef = 4F2445BD121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C0121F0CF600FEE1DA /* libGTLTouchStaticLib.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libGTLTouchStaticLib.a; + remoteRef = 4F2445BF121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C2121F0CF600FEE1DA /* GTLUnitTests.octest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = GTLUnitTests.octest; + remoteRef = 4F2445C1121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C4121F0CF600FEE1DA /* DevelopmentTestTool */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = DevelopmentTestTool; + remoteRef = 4F2445C3121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */, + 4F16F59513DF673000811114 /* DriveSampleWindow.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Strip Headers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ./buildStripHeaders; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072D0486CEB800E47090 /* main.m in Sources */, + 4F9B545B15816762005E917A /* DriveSampleAppController.m in Sources */, + 4F9B545C15816762005E917A /* DriveSampleWindowController.m in Sources */, + 4FF21BEB1626428F00805586 /* GTLDrive_Sources.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 4F72439F12233FAF001A4AD0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = GTLFramework; + targetProxy = 4F72439E12233FAF001A4AD0 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C165DFE840E0CC02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 4F16F59313DF673000811114 /* DriveSampleWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 4F16F59413DF673000811114 /* English */, + ); + name = DriveSampleWindow.xib; + sourceTree = ""; + }; + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 4FA6F3D21034AEC400C5DFA5 /* English */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = DriveSample; + RUN_CLANG_STATIC_ANALYZER = YES; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = DriveSample; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = ( + "-DGTL_BUILT_AS_FRAMEWORK=1", + "-DDEBUG=1", + ); + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DGTL_BUILT_AS_FRAMEWORK=1"; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "DriveSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "DriveSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/GTL/Examples/DriveSample/DriveSample.xcodeproj/project.pbxproj b/GTL/Examples/DriveSample/DriveSample.xcodeproj/project.pbxproj new file mode 100644 index 0000000..5ac731a --- /dev/null +++ b/GTL/Examples/DriveSample/DriveSample.xcodeproj/project.pbxproj @@ -0,0 +1,499 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4F16F59513DF673000811114 /* DriveSampleWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F16F59313DF673000811114 /* DriveSampleWindow.xib */; }; + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F22A2141186315400FFBAB6 /* WebKit.framework */; }; + 4F2445C8121F0D2900FEE1DA /* GTL.framework in Copy GTL Framework */ = {isa = PBXBuildFile; fileRef = 4F2445BE121F0CF600FEE1DA /* GTL.framework */; }; + 4F2445C9121F0D2C00FEE1DA /* GTL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F2445BE121F0CF600FEE1DA /* GTL.framework */; }; + 4F9B545B15816762005E917A /* DriveSampleAppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F9B545815816762005E917A /* DriveSampleAppController.m */; }; + 4F9B545C15816762005E917A /* DriveSampleWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F9B545A15816762005E917A /* DriveSampleWindowController.m */; }; + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */; }; + 4FF21BEB1626428F00805586 /* GTLDrive_Sources.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FF21BEA1626428F00805586 /* GTLDrive_Sources.m */; }; + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4F2445BD121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F38F6A60B66E91D00B24B81; + remoteInfo = GTLFramework; + }; + 4F2445BF121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027C11A4CA2F00BEB470; + remoteInfo = GTLTouchStaticLib; + }; + 4F2445C1121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027D11A4CA2F00BEB470; + remoteInfo = GTLUnitTests; + }; + 4F2445C3121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F1AD9020B71603F00DC0485; + remoteInfo = DevelopmentTestTool; + }; + 4F72439E12233FAF001A4AD0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 4F38F6A50B66E91D00B24B81; + remoteInfo = GTLFramework; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 4F38F8970B66FAB700B24B81 /* Copy GTL Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4F2445C8121F0D2900FEE1DA /* GTL.framework in Copy GTL Framework */, + ); + name = "Copy GTL Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 4F16F59413DF673000811114 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/DriveSampleWindow.xib; sourceTree = ""; }; + 4F22A2141186315400FFBAB6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; + 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GTL.xcodeproj; path = ../../Source/GTL.xcodeproj; sourceTree = SOURCE_ROOT; }; + 4F9B545715816762005E917A /* DriveSampleAppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = DriveSampleAppController.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 4F9B545815816762005E917A /* DriveSampleAppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = DriveSampleAppController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 4F9B545915816762005E917A /* DriveSampleWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = DriveSampleWindowController.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 4F9B545A15816762005E917A /* DriveSampleWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DriveSampleWindowController.m; sourceTree = ""; }; + 4FA6F3D21034AEC400C5DFA5 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = buildStripHeaders; sourceTree = ""; }; + 4FF21BEA1626428F00805586 /* GTLDrive_Sources.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLDrive_Sources.m; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 8D1107320486CEB800E47090 /* DriveSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DriveSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F2445C9121F0D2C00FEE1DA /* GTL.framework in Frameworks */, + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Sample App Classes */ = { + isa = PBXGroup; + children = ( + 4F9B545715816762005E917A /* DriveSampleAppController.h */, + 4F9B545815816762005E917A /* DriveSampleAppController.m */, + 4F9B545915816762005E917A /* DriveSampleWindowController.h */, + 4F9B545A15816762005E917A /* DriveSampleWindowController.m */, + ); + name = "Sample App Classes"; + sourceTree = ""; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 4F22A2141186315400FFBAB6 /* WebKit.framework */, + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* DriveSample.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CalendarSample */ = { + isa = PBXGroup; + children = ( + 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */, + 080E96DDFE201D6D7F000001 /* Sample App Classes */, + 4FB25385138C3F9E00B5C1AE /* API Services */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CalendarSample; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 4F16F59313DF673000811114 /* DriveSampleWindow.xib */, + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */, + 8D1107310486CEB800E47090 /* Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4F2445B7121F0CF600FEE1DA /* Products */ = { + isa = PBXGroup; + children = ( + 4F2445BE121F0CF600FEE1DA /* GTL.framework */, + 4F2445C0121F0CF600FEE1DA /* libGTLTouchStaticLib.a */, + 4F2445C2121F0CF600FEE1DA /* GTLUnitTests.octest */, + 4F2445C4121F0CF600FEE1DA /* DevelopmentTestTool */, + ); + name = Products; + sourceTree = ""; + }; + 4F96C2221581680B00A0D1D2 /* Drive */ = { + isa = PBXGroup; + children = ( + 4FBBC4BC1593BF1300495B52 /* Generated */, + ); + name = Drive; + path = ../../Source/Services/Drive; + sourceTree = ""; + }; + 4FB25385138C3F9E00B5C1AE /* API Services */ = { + isa = PBXGroup; + children = ( + 4F96C2221581680B00A0D1D2 /* Drive */, + ); + name = "API Services"; + sourceTree = ""; + }; + 4FBBC4BC1593BF1300495B52 /* Generated */ = { + isa = PBXGroup; + children = ( + 4FF21BEA1626428F00805586 /* GTLDrive_Sources.m */, + ); + path = Generated; + sourceTree = ""; + }; + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */ = { + isa = PBXGroup; + children = ( + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */, + ); + name = "Build Scripts"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* DriveSample */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "DriveSample" */; + buildPhases = ( + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + 4F38F8970B66FAB700B24B81 /* Copy GTL Framework */, + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */, + ); + buildRules = ( + ); + dependencies = ( + 4F72439F12233FAF001A4AD0 /* PBXTargetDependency */, + ); + name = DriveSample; + productInstallPath = "$(HOME)/Applications"; + productName = CalendarSample; + productReference = 8D1107320486CEB800E47090 /* DriveSample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0440; + }; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "DriveSample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CalendarSample */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 4F2445B7121F0CF600FEE1DA /* Products */; + ProjectRef = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* DriveSample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 4F2445BE121F0CF600FEE1DA /* GTL.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = GTL.framework; + remoteRef = 4F2445BD121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C0121F0CF600FEE1DA /* libGTLTouchStaticLib.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libGTLTouchStaticLib.a; + remoteRef = 4F2445BF121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C2121F0CF600FEE1DA /* GTLUnitTests.octest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = GTLUnitTests.octest; + remoteRef = 4F2445C1121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C4121F0CF600FEE1DA /* DevelopmentTestTool */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = DevelopmentTestTool; + remoteRef = 4F2445C3121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */, + 4F16F59513DF673000811114 /* DriveSampleWindow.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Strip Headers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ./buildStripHeaders; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072D0486CEB800E47090 /* main.m in Sources */, + 4F9B545B15816762005E917A /* DriveSampleAppController.m in Sources */, + 4F9B545C15816762005E917A /* DriveSampleWindowController.m in Sources */, + 4FF21BEB1626428F00805586 /* GTLDrive_Sources.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 4F72439F12233FAF001A4AD0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = GTLFramework; + targetProxy = 4F72439E12233FAF001A4AD0 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C165DFE840E0CC02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 4F16F59313DF673000811114 /* DriveSampleWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 4F16F59413DF673000811114 /* English */, + ); + name = DriveSampleWindow.xib; + sourceTree = ""; + }; + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 4FA6F3D21034AEC400C5DFA5 /* English */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = DriveSample; + RUN_CLANG_STATIC_ANALYZER = YES; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = DriveSample; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = ( + "-DGTL_BUILT_AS_FRAMEWORK=1", + "-DDEBUG=1", + ); + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DGTL_BUILT_AS_FRAMEWORK=1"; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "DriveSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "DriveSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/GTL/Examples/DriveSample/DriveSampleAppController.h b/GTL/Examples/DriveSample/DriveSampleAppController.h new file mode 100644 index 0000000..499658a --- /dev/null +++ b/GTL/Examples/DriveSample/DriveSampleAppController.h @@ -0,0 +1,23 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// DriveSampleAppController.h +// + +#import + +@interface DriveSampleAppController : NSObject +@end diff --git a/GTL/Examples/DriveSample/DriveSampleAppController.m b/GTL/Examples/DriveSample/DriveSampleAppController.m new file mode 100644 index 0000000..c7e3398 --- /dev/null +++ b/GTL/Examples/DriveSample/DriveSampleAppController.m @@ -0,0 +1,35 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// DriveSampleAppController.m +// + +#import "DriveSampleAppController.h" +#import "DriveSampleWindowController.h" + +@implementation DriveSampleAppController + +- (void)applicationWillFinishLaunching:(NSNotification *)notification { + DriveSampleWindowController* windowController + = [DriveSampleWindowController sharedWindowController]; + [windowController showWindow:self]; +} + +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { + return YES; +} + +@end diff --git a/GTL/Examples/DriveSample/DriveSampleWindowController.h b/GTL/Examples/DriveSample/DriveSampleWindowController.h new file mode 100644 index 0000000..c9eb7cb --- /dev/null +++ b/GTL/Examples/DriveSample/DriveSampleWindowController.h @@ -0,0 +1,98 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// DriveSampleWindowController.h +// + +// The sample app controllers are built with ARC, though the sources of +// the GTL library should be built without ARC using the compiler flag +// -fno-objc-arc in the Compile Sources build phase of the application +// target. + +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import + +#import "GTLDrive.h" +#import "GTL/GTMOAuth2WindowController.h" + +@interface DriveSampleWindowController : NSWindowController { + @private + IBOutlet NSTextField *_signedInField; + IBOutlet NSButton *_signedInButton; + + IBOutlet NSTableView *_fileListTable; + IBOutlet NSProgressIndicator *_fileListProgressIndicator; + IBOutlet NSTextView *_fileListResultTextField; + IBOutlet NSButton *_fileListCancelButton; + IBOutlet NSImageView *_thumbnailView; + + IBOutlet NSPopUpButton *_downloadButton; + IBOutlet NSButton *_viewButton; + IBOutlet NSButton *_duplicateButton; + IBOutlet NSButton *_trashButton; + IBOutlet NSButton *_deleteButton; + + IBOutlet NSButton *_uploadButton; + IBOutlet NSProgressIndicator *_uploadProgressIndicator; + IBOutlet NSButton *_pauseUploadButton; + IBOutlet NSButton *_stopUploadButton; + IBOutlet NSButton *_newFolderButton; + + IBOutlet NSSegmentedControl *_segmentedControl; + IBOutlet NSTableView *_detailTable; + IBOutlet NSProgressIndicator *_detailProgressIndicator; + IBOutlet NSTextView *_detailResultTextField; + IBOutlet NSButton *_detailCancelButton; + + // Client ID Sheet (Not needed by real applications) + IBOutlet NSButton *_clientIDButton; + IBOutlet NSTextField *_clientIDRequiredTextField; + IBOutlet NSWindow *_clientIDSheet; + IBOutlet NSTextField *_clientIDField; + IBOutlet NSTextField *_clientSecretField; +} + ++ (DriveSampleWindowController *)sharedWindowController; + +- (IBAction)signInClicked:(id)sender; + +- (IBAction)getFileList:(id)sender; + +- (IBAction)cancelFileListFetch:(id)sender; + +- (IBAction)viewClicked:(id)sender; +- (IBAction)duplicateClicked:(id)sender; +- (IBAction)trashClicked:(id)sender; +- (IBAction)deleteClicked:(id)sender; + +- (IBAction)uploadFileClicked:(id)sender; +- (IBAction)pauseUploadClicked:(id)sender; +- (IBAction)stopUploadClicked:(id)sender; +- (IBAction)createFolderClicked:(id)sender; + +- (IBAction)segmentedControlClicked:(id)sender; + +- (IBAction)loggingCheckboxClicked:(id)sender; + +// Client ID Sheet +- (IBAction)clientIDClicked:(id)sender; +- (IBAction)clientIDDoneClicked:(id)sender; +- (IBAction)APIConsoleClicked:(id)sender; + +@end diff --git a/GTL/Examples/DriveSample/DriveSampleWindowController.m b/GTL/Examples/DriveSample/DriveSampleWindowController.m new file mode 100644 index 0000000..9428e56 --- /dev/null +++ b/GTL/Examples/DriveSample/DriveSampleWindowController.m @@ -0,0 +1,1116 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// DriveSampleWindowController.m +// + +#import "DriveSampleWindowController.h" + +#import "GTL/GTLUtilities.h" +#import "GTL/GTMHTTPFetcherLogging.h" + +// Segmented control indices. +enum { + kRevisionsSegment = 0, + kPermissionsSegment, + kChildrenSegment, + kParentsSegment +}; + +// Menu item title for downloading the original file. +static NSString *const kOriginalFile = @"Original File"; + +// Keychain item name for saving the user's authentication information. +NSString *const kKeychainItemName = @"DriveSample: Google Drive"; + +@interface DriveSampleWindowController () +@property (nonatomic, readonly) GTLServiceDrive *driveService; +@end + +@implementation DriveSampleWindowController { + GTLDriveFileList *_fileList; + GTLServiceTicket *_fileListTicket; + NSError *_fileListFetchError; + GTLServiceTicket *_editFileListTicket; + GTLServiceTicket *_uploadFileTicket; + + // Details + GTLDriveRevisionList *_revisionList; + NSError *_revisionListFetchError; + + GTLDrivePermissionList *_permissionList; + NSError *_permissionListFetchError; + + GTLDriveChildList *_childList; + NSError *_childListFetchError; + + GTLDriveParentList *_parentsList; + NSError *_parentsListFetchError; + + GTLServiceTicket *_detailsTicket; + NSError *_detailsFetchError; +} + ++ (DriveSampleWindowController *)sharedWindowController { + static DriveSampleWindowController* gWindowController = nil; + if (!gWindowController) { + gWindowController = [[DriveSampleWindowController alloc] init]; + } + return gWindowController; +} + +- (id)init { + return [self initWithWindowNibName:@"DriveSampleWindow"]; +} + +- (void)awakeFromNib { + // Load the OAuth 2 token from the keychain, if it was previously saved. + NSString *clientID = [_clientIDField stringValue]; + NSString *clientSecret = [_clientSecretField stringValue]; + + GTMOAuth2Authentication *auth; + auth = [GTMOAuth2WindowController authForGoogleFromKeychainForName:kKeychainItemName + clientID:clientID + clientSecret:clientSecret]; + self.driveService.authorizer = auth; + + // Set the result text fields to have a distinctive color and mono-spaced font. + [_fileListResultTextField setTextColor:[NSColor darkGrayColor]]; + [_detailResultTextField setTextColor:[NSColor darkGrayColor]]; + + NSFont *resultTextFont = [NSFont fontWithName:@"Monaco" size:9]; + [_fileListResultTextField setFont:resultTextFont]; + [_detailResultTextField setFont:resultTextFont]; + + [self updateUI]; +} + +#pragma mark - + +- (NSString *)signedInUsername { + // Get the email address of the signed-in user. + GTMOAuth2Authentication *auth = self.driveService.authorizer; + BOOL isSignedIn = auth.canAuthorize; + if (isSignedIn) { + return auth.userEmail; + } else { + return nil; + } +} + +- (BOOL)isSignedIn { + NSString *name = [self signedInUsername]; + return (name != nil); +} + +#pragma mark IBActions + +- (IBAction)signInClicked:(id)sender { + if (![self isSignedIn]) { + // Sign in + [self runSigninThenHandler:^{ + [self updateUI]; + }]; + } else { + // Sign out + GTLServiceDrive *service = self.driveService; + + [GTMOAuth2WindowController removeAuthFromKeychainForName:kKeychainItemName]; + service.authorizer = nil; + [self updateUI]; + } +} + +- (IBAction)segmentedControlClicked:(id)sender { + [self updateUI]; +} + +- (IBAction)getFileList:(id)sender { + if (![self isSignedIn]) { + [self runSigninThenHandler:^{ + [self fetchFileList]; + }]; + } else { + [self fetchFileList]; + } +} + +- (IBAction)cancelFileListFetch:(id)sender { + [_fileListTicket cancelTicket]; + _fileListTicket = nil; + + [_editFileListTicket cancelTicket]; + _editFileListTicket = nil; + + [self updateUI]; +} + +- (IBAction)viewClicked:(id)sender { + GTLDriveFile *selectedFile = [self selectedFileListEntry]; + NSString *viewURLString = selectedFile.alternateLink; + if ([viewURLString length] > 0) { + NSURL *url = [NSURL URLWithString:viewURLString]; + [[NSWorkspace sharedWorkspace] openURL:url]; + } +} + +- (IBAction)duplicateClicked:(id)sender { + [self duplicateSelectedFile]; +} + +- (IBAction)trashClicked:(id)sender { + [self changeTrashStateForSelectedFile]; +} + +- (IBAction)deleteClicked:(id)sender { + GTLDriveFile *file = [self selectedFileListEntry]; + NSString *title = file.title; + + NSBeginAlertSheet(@"Delete", nil, @"Cancel", nil, + [self window], self, + @selector(deleteFileSheetDidEnd:returnCode:contextInfo:), + nil, nil, @"Delete \"%@\"?", title); +} + +- (void)deleteFileSheetDidEnd:(NSWindow *)sheet + returnCode:(int)returnCode + contextInfo:(void *)contextInfo { + if (returnCode == NSAlertDefaultReturn) { + [self deleteSelectedFile]; + } +} + +- (IBAction)uploadFileClicked:(id)sender { + // Ask the user to choose a file. + NSOpenPanel *openPanel = [NSOpenPanel openPanel]; + [openPanel setPrompt:@"Upload"]; + [openPanel setCanChooseDirectories:NO]; + [openPanel beginSheetModalForWindow:[self window] + completionHandler:^(NSInteger result) { + // Callback. + if (result == NSOKButton) { + // The user chose a file and clicked OK. + // + // Start uploading (deferred briefly since + // we currently have a sheet displayed). + NSString *path = [[openPanel URL] path]; + [self performSelector:@selector(uploadFileAtPath:) + withObject:path + afterDelay:0.1]; + } + }]; +} + +- (IBAction)pauseUploadClicked:(id)sender { + if ([_uploadFileTicket isUploadPaused]) { + [_uploadFileTicket resumeUpload]; + } else { + [_uploadFileTicket pauseUpload]; + } + [self updateUI]; +} + +- (IBAction)stopUploadClicked:(id)sender { + [_uploadFileTicket cancelTicket]; + _uploadFileTicket = nil; + + [self updateUI]; +} + +- (IBAction)createFolderClicked:(id)sender { + [self createAFolder]; +} + +- (IBAction)APIConsoleClicked:(id)sender { + NSURL *url = [NSURL URLWithString:@"https://code.google.com/apis/console"]; + [[NSWorkspace sharedWorkspace] openURL:url]; +} + +- (IBAction)loggingCheckboxClicked:(id)sender { + [GTMHTTPFetcher setLoggingEnabled:[sender state]]; +} + +#pragma mark - + +// Get a service object with the current username/password +// +// A "service" object handles networking tasks. Service objects +// contain user authentication information as well as networking +// state information (such as cookies and the "last modified" date for +// fetched data.) + +- (GTLServiceDrive *)driveService { + static GTLServiceDrive *service; + + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + service = [[GTLServiceDrive alloc] init]; + + // Have the service object set tickets to fetch consecutive pages + // of the feed so we do not need to manually fetch them + service.shouldFetchNextPages = YES; + + // Have the service object set tickets to retry temporary error conditions + // automatically + service.retryEnabled = YES; + }); + return service; +} + +- (GTLDriveFile *)selectedFileListEntry { + int rowIndex = [_fileListTable selectedRow]; + if (rowIndex > -1) { + // GTLCollectionObjects like GTLDriveFileList support indexed + // access to the collection items + GTLDriveFile *item = _fileList[rowIndex]; + return item; + } + return nil; +} + +- (id)detailCollection { + NSInteger segment = [_segmentedControl selectedSegment]; + switch (segment) { + case kRevisionsSegment: + return _revisionList; + case kPermissionsSegment: + return _permissionList; + case kChildrenSegment: + return _childList; + case kParentsSegment: + return _parentsList; + default: + return nil; + } +} + +- (id)selectedDetailItem { + int rowIndex = [_detailTable selectedRow]; + if (rowIndex > -1) { + GTLCollectionObject *collection = [self detailCollection]; + GTLObject *item = collection[rowIndex]; + return item; + } + return nil; +} + +- (NSError *)detailsError { + // First, check if the query execution succeeded. + NSError *error = _detailsFetchError; + if (error == nil) { + // Next, check if there was an error for the selected detail. + NSInteger segment = [_segmentedControl selectedSegment]; + switch (segment) { + case kRevisionsSegment: + return _revisionListFetchError; + case kPermissionsSegment: + return _permissionListFetchError; + case kChildrenSegment: + return _childListFetchError; + case kParentsSegment: + return _parentsListFetchError; + default: + return nil; + } + } + return nil; +} + +- (NSString *)descriptionForFileID:(NSString *)fileID { + NSArray *files = _fileList.items; + GTLDriveFile *file = [GTLUtilities firstObjectFromArray:files + withValue:fileID + forKeyPath:@"identifier"]; + if (file) { + return file.title; + } else { + // Can't find the file by its identifier. + return [NSString stringWithFormat:@"<%@>", fileID]; + } +} + +- (NSString *)descriptionForDetailItem:(id)item { + if ([item isKindOfClass:[GTLDriveRevision class]]) { + return ((GTLDriveRevision *)item).modifiedDate.stringValue; + } else if ([item isKindOfClass:[GTLDrivePermission class]]) { + return ((GTLDrivePermission *)item).name; + } else if ([item isKindOfClass:[GTLDriveChildReference class]]) { + NSString *childID = ((GTLDriveChildReference *)item).identifier; + return [self descriptionForFileID:childID]; + } else if ([item isKindOfClass:[GTLDriveParentReference class]]) { + GTLDriveParentReference *parentRef = ((GTLDriveParentReference *)item); + if ([[parentRef isRoot] boolValue]) { + return @""; + } else { + NSString *parentID = parentRef.identifier; + return [self descriptionForFileID:parentID]; + } + } + return nil; +} + +#pragma mark - +#pragma mark Fetch File List + +- (void)fetchFileList { + _fileList = nil; + _fileListFetchError = nil; + + GTLServiceDrive *service = self.driveService; + + GTLQueryDrive *query = [GTLQueryDrive queryForFilesList]; + + // maxResults specifies the number of results per page. Since we earlier + // specified shouldFetchNextPages=YES, all results should be fetched, + // though specifying a larger maxResults will reduce the number of fetches + // needed to retrieve all pages. + query.maxResults = 150; + + // The Drive API's file entries are chock full of data that the app may not + // care about. Specifying the fields we want here reduces the network + // bandwidth and memory needed for the collection. + // + // For example, leave query.fields as nil during development. + // When ready to test and optimize your app, specify just the fields needed. + // For example, this sample app might use + // + // query.fields = @"kind,etag,items(id,downloadUrl,editable,etag,exportLinks,kind,labels,originalFilename,title)"; + + _fileListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + GTLDriveFileList *fileList, + NSError *error) { + // Callback + _fileList = fileList; + _fileListFetchError = error; + _fileListTicket = nil; + + [self updateUI]; + }]; + + [self updateUI]; +} + +#pragma mark Fetch File Details + +- (void)fetchSelectedFileDetails { + _revisionList = nil; + _revisionListFetchError = nil; + _permissionList = nil; + _permissionListFetchError = nil; + _childList = nil; + _childListFetchError = nil; + _parentsList = nil; + _parentsListFetchError = nil; + + _detailsFetchError = nil; + + GTLServiceDrive *service = self.driveService; + + GTLDriveFile *selectedFile = [self selectedFileListEntry]; + NSString *fileID = selectedFile.identifier; + if (fileID) { + // Rather than make separate fetches for each kind of detail for the + // selected file, we'll make a single batch query to etch the various + // details. Each query in the batch will have its own result or error, + // and the batch query execution itself may fail with an error. + GTLQueryDrive *revisionQuery = [GTLQueryDrive queryForRevisionsListWithFileId:fileID]; + revisionQuery.completionBlock = ^(GTLServiceTicket *ticket, GTLDriveRevisionList *obj, + NSError *error) { + _revisionList = obj; + _revisionListFetchError = error; + }; + + GTLQueryDrive *permissionQuery = [GTLQueryDrive queryForPermissionsListWithFileId:fileID]; + permissionQuery.completionBlock = ^(GTLServiceTicket *ticket, GTLDrivePermissionList *obj, + NSError *error) { + _permissionList = obj; + _permissionListFetchError = error; + }; + + GTLQueryDrive *childQuery = [GTLQueryDrive queryForChildrenListWithFolderId:fileID]; + childQuery.completionBlock = ^(GTLServiceTicket *ticket, GTLDriveChildList *obj, + NSError *error) { + _childList = obj; + _childListFetchError = error; + }; + + GTLQueryDrive *parentsQuery = [GTLQueryDrive queryForParentsListWithFileId:fileID]; + parentsQuery.completionBlock = ^(GTLServiceTicket *ticket, GTLDriveParentList *obj, + NSError *error) { + // Note that we could obtain the parents list for a file item from the + // main file list feed, too. + _parentsList = obj; + _parentsListFetchError = error; + }; + + // Combine the separate queries into one batch. + GTLBatchQuery *batchQuery = [GTLBatchQuery batchQuery]; + [batchQuery addQuery:revisionQuery]; + [batchQuery addQuery:permissionQuery]; + [batchQuery addQuery:childQuery]; + [batchQuery addQuery:parentsQuery]; + + _detailsTicket = [service executeQuery:batchQuery + completionHandler:^(GTLServiceTicket *ticket, + GTLBatchResult *batchResult, NSError *error) { + // Callback + // + // The batch query execution completionHandler runs after the individual + // query completion handlers have been called. + _detailsTicket = nil; + _detailsFetchError = error; + + [self updateUI]; + }]; + [self updateUI]; + } +} + +#pragma mark Delete a File + +- (void)deleteSelectedFile { + GTLServiceDrive *service = self.driveService; + + GTLDriveFile *selectedFile = [self selectedFileListEntry]; + NSString *fileID = selectedFile.identifier; + if (fileID) { + GTLQueryDrive *query = [GTLQueryDrive queryForFilesDeleteWithFileId:fileID]; + _editFileListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id nilObject, + NSError *error) { + // Callback + _editFileListTicket = nil; + if (error == nil) { + [self displayAlert:@"Deleted" + format:@"Deleted \"%@\"", + selectedFile.title]; + [self updateUI]; + [self fetchFileList]; + } else { + [self displayAlert:@"Delete Failed" + format:@"%@", error]; + } + }]; + } +} + +#pragma mark Toggle Trash State + +- (void)changeTrashStateForSelectedFile { + GTLServiceDrive *service = self.driveService; + + GTLDriveFile *selectedFile = [self selectedFileListEntry]; + NSString *fileID = selectedFile.identifier; + if (fileID) { + GTLQueryDrive *query; + BOOL isInTrash = [selectedFile.labels.trashed boolValue]; + if (isInTrash) { + query = [GTLQueryDrive queryForFilesUntrashWithFileId:fileID]; + } else { + query = [GTLQueryDrive queryForFilesTrashWithFileId:fileID]; + } + _editFileListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id nilObject, + NSError *error) { + // Callback + _editFileListTicket = nil; + if (error == nil) { + NSString *fmt = (isInTrash ? @"Moved \"%@\" out of trash" : @"Moved \"%@\" to trash"); + [self displayAlert:@"Updated" + format:fmt, selectedFile.title]; + [self updateUI]; + [self fetchFileList]; + } else { + [self displayAlert:@"Trash Change Failed" + format:@"%@", error]; + } + }]; + } +} + +#pragma mark Duplicate a File + +- (void)duplicateSelectedFile { + GTLServiceDrive *service = self.driveService; + + GTLDriveFile *selectedFile = [self selectedFileListEntry]; + NSString *fileID = selectedFile.identifier; + if (fileID) { + // Make a file object with the title to use for the duplicate. + GTLDriveFile *fileObj = [GTLDriveFile object]; + fileObj.title = [NSString stringWithFormat:@"%@ copy", selectedFile.title]; + + GTLQueryDrive *query = [GTLQueryDrive queryForFilesCopyWithObject:fileObj + fileId:fileID]; + _editFileListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + GTLDriveFile *copiedFile, + NSError *error) { + // Callback + _editFileListTicket = nil; + if (error == nil) { + [self displayAlert:@"Copied" + format:@"Created copy \"%@\"", + copiedFile.title]; + [self updateUI]; + [self fetchFileList]; + } else { + [self displayAlert:@"Copy failed" + format:@"%@", error]; + } + }]; + } +} + +#pragma mark New Folder + +- (void)createAFolder { + GTLServiceDrive *service = self.driveService; + + GTLDriveFile *folderObj = [GTLDriveFile object]; + folderObj.title = [NSString stringWithFormat:@"New Folder %@", [NSDate date]]; + folderObj.mimeType = @"application/vnd.google-apps.folder"; + + // To create a folder in a specific parent folder, specify the identifier + // of the parent: + // + // GTLDriveParentReference *parentRef = [GTLDriveParentReference object]; + // parentRef.identifier = parentID; + // folderObj.parents = [NSArray arrayWithObject:parentRef]; + + GTLQueryDrive *query = [GTLQueryDrive queryForFilesInsertWithObject:folderObj + uploadParameters:nil]; + _editFileListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + GTLDriveFile *folderItem, + NSError *error) { + // Callback + _editFileListTicket = nil; + if (error == nil) { + [self displayAlert:@"Created" + format:@"Created folder \"%@\"", + folderItem.title]; + [self updateUI]; + [self fetchFileList]; + } else { + [self displayAlert:@"Create Folder Failed" + format:@"%@", error]; + } + }]; +} + +#pragma mark Uploading + +- (void)uploadFileAtPath:(NSString *)path { + // Queries that support file uploads take an uploadParameters object. + // The uploadParameters include the MIME type of the file being uploaded, + // and either an NSData with the file contents, or an NSFileHandler for + // the file path. + NSFileHandle *fileHandle = [NSFileHandle fileHandleForReadingAtPath:path]; + if (fileHandle) { + GTLServiceDrive *service = self.driveService; + + NSString *filename = [path lastPathComponent]; + NSString *mimeType = [self MIMETypeFileName:filename + defaultMIMEType:@"binary/octet-stream"]; + GTLUploadParameters *uploadParameters = + [GTLUploadParameters uploadParametersWithFileHandle:fileHandle + MIMEType:mimeType]; + GTLDriveFile *newFile = [GTLDriveFile object]; + newFile.title = filename; + + GTLQueryDrive *query = [GTLQueryDrive queryForFilesInsertWithObject:newFile + uploadParameters:uploadParameters]; + _uploadFileTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + GTLDriveFile *uploadedFile, + NSError *error) { + // Callback + _uploadFileTicket = nil; + if (error == nil) { + [self displayAlert:@"Created" + format:@"Uploaded file \"%@\"", + uploadedFile.title]; + [self fetchFileList]; + } else { + [self displayAlert:@"Upload Failed" + format:@"%@", error]; + } + [_uploadProgressIndicator setDoubleValue:0.0]; + [self updateUI]; + }]; + + NSProgressIndicator *uploadProgressIndicator = _uploadProgressIndicator; + _uploadFileTicket.uploadProgressBlock = ^(GTLServiceTicket *ticket, + unsigned long long numberOfBytesRead, + unsigned long long dataLength) { + [uploadProgressIndicator setMaxValue:(double)dataLength]; + [uploadProgressIndicator setDoubleValue:(double)numberOfBytesRead]; + }; + [self updateUI]; + } else { + // Could not read file data. + [self displayAlert:@"No Upload File Found" format:@"Path: %@", path]; + } +} + +- (NSString *)MIMETypeFileName:(NSString *)path + defaultMIMEType:(NSString *)defaultType { + NSString *result = defaultType; + NSString *extension = [path pathExtension]; + CFStringRef uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, + (__bridge CFStringRef)extension, NULL); + if (uti) { + CFStringRef cfMIMEType = UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType); + if (cfMIMEType) { + result = CFBridgingRelease(cfMIMEType); + } + CFRelease(uti); + } + return result; +} + +#pragma mark Downloading + +- (void)downloadFormatSelected:(NSMenuItem *)menuItem { + // The user chose a format for downloading the selected file. + NSString *exportFormat = [menuItem title]; + GTLDriveFile *file = [menuItem representedObject]; + NSString *exportURLStr; + NSString *extn = nil; + if ([exportFormat isEqual:kOriginalFile]) { + exportURLStr = file.downloadUrl; + } else { + exportURLStr = [file.exportLinks JSONValueForKey:exportFormat]; + extn = [self extensionForMIMEType:exportFormat]; + } + if ([exportURLStr length] > 0) { + // Show a save panel so the user can pick a download location. + NSString *suggestedName = file.originalFilename; + if ([suggestedName length] == 0) { + suggestedName = file.title; + } + if ([extn length] > 0) { + NSString *withoutExt = [suggestedName stringByDeletingPathExtension]; + suggestedName = [withoutExt stringByAppendingPathExtension:extn]; + } + NSSavePanel *savePanel = [NSSavePanel savePanel]; + [savePanel setNameFieldStringValue:suggestedName]; + [savePanel beginSheetModalForWindow:[self window] + completionHandler:^(NSInteger result) { + // Callback + if (result == NSOKButton) { + NSString *savePath = [[savePanel URL] path]; + + // Use a GTMHTTPFetcher object to download the file with authorization. + NSURL *url = [NSURL URLWithString:exportURLStr]; + NSURLRequest *request = [NSURLRequest requestWithURL:url]; + GTMHTTPFetcher *fetcher = [GTMHTTPFetcher fetcherWithRequest:request]; + + // Requests of user data from Google services must be authorized. + fetcher.authorizer = self.driveService.authorizer; + + // The fetcher can save data directly to a file. + fetcher.downloadPath = savePath; + + // Fetcher logging can include comments. + [fetcher setCommentWithFormat:@"Downloading \"%@\"", file.title]; + + fetcher.receivedDataBlock = ^(NSData *receivedData) { + // The fetcher will call the received data block periodically. + // When a download path has been specified, the received data + // parameter will be nil. + }; + + [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { + // Callback + if (error == nil) { + // Successfully saved the file. + // + // Since a downloadPath property was specified, the data argument is + // nil, and the file data has been written to disk. + [self displayAlert:@"Downloaded" + format:@"%@", savePath]; + } else { + [self displayAlert:@"Error Downloading File" + format:@"%@", error]; + } + }]; + } + }]; + } +} + +- (NSString *)extensionForMIMEType:(NSString *)mimeType { + NSString *result = nil; + CFStringRef uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassMIMEType, + (__bridge CFStringRef)mimeType, NULL); + if (uti) { + CFStringRef cfExtn = UTTypeCopyPreferredTagWithClass(uti, kUTTagClassFilenameExtension); + if (cfExtn) { + result = CFBridgingRelease(cfExtn); + } + CFRelease(uti); + } + return result; +} + +#pragma mark - +#pragma mark Sign In + +- (void)runSigninThenHandler:(void (^)(void))handler { + // Applications should have client ID and client secret strings + // hardcoded into the source, but the sample application asks the + // developer for the strings. + NSString *clientID = [_clientIDField stringValue]; + NSString *clientSecret = [_clientSecretField stringValue]; + + if ([clientID length] == 0 || [clientSecret length] == 0) { + // Remind the developer that client ID and client secret are needed + [_clientIDButton performSelector:@selector(performClick:) + withObject:self + afterDelay:0.5]; + return; + } + + // Show the OAuth 2 sign-in controller + NSBundle *frameworkBundle = [NSBundle bundleForClass:[GTMOAuth2WindowController class]]; + GTMOAuth2WindowController *windowController; + + // Applications that only need to access files created by this app should + // use kGTLAuthScopeDriveFile. + windowController = [GTMOAuth2WindowController controllerWithScope:kGTLAuthScopeDrive + clientID:clientID + clientSecret:clientSecret + keychainItemName:kKeychainItemName + resourceBundle:frameworkBundle]; + + [windowController signInSheetModalForWindow:[self window] + completionHandler:^(GTMOAuth2Authentication *auth, + NSError *error) { + // Callback + if (error == nil) { + self.driveService.authorizer = auth; + if (handler) handler(); + } else { + _fileListFetchError = error; + [self updateUI]; + } + }]; +} + +#pragma mark - +#pragma mark UI + +- (void)updateUI { + BOOL isSignedIn = [self isSignedIn]; + NSString *username = [self signedInUsername]; + [_signedInButton setTitle:(isSignedIn ? @"Sign Out" : @"Sign In")]; + [_signedInField setStringValue:(isSignedIn ? username : @"No")]; + + // + // File list table + // + [_fileListTable reloadData]; + + if (_fileListTicket != nil || _editFileListTicket != nil) { + [_fileListProgressIndicator startAnimation:self]; + } else { + [_fileListProgressIndicator stopAnimation:self]; + } + + // Get the description of the selected item, or the feed fetch error + NSString *resultStr = @""; + + if (_fileListFetchError) { + // Display the error + resultStr = [_fileListFetchError description]; + + // Also display any server data present + NSDictionary *errorInfo = [_fileListFetchError userInfo]; + NSData *errData = errorInfo[kGTMHTTPFetcherStatusDataKey]; + if (errData) { + NSString *dataStr = [[NSString alloc] initWithData:errData + encoding:NSUTF8StringEncoding]; + resultStr = [resultStr stringByAppendingFormat:@"\n%@", dataStr]; + } + } else { + // Display the selected item + GTLDriveFile *item = [self selectedFileListEntry]; + if (item) { + resultStr = [item description]; + } + } + [_fileListResultTextField setString:resultStr]; + + [self updateThumbnailImage]; + + // + // Details table + // + + [_detailTable reloadData]; + + if (_detailsTicket != nil) { + [_detailProgressIndicator startAnimation:self]; + } else { + [_detailProgressIndicator stopAnimation:self]; + } + + // Get the description of the selected item, or the feed fetch error + resultStr = @""; + + NSError *error = [self detailsError]; + if (error) { + resultStr = [error description]; + } else { + id item = [self selectedDetailItem]; + if (item) { + resultStr = [item description]; + } + } + + [_detailResultTextField setString:resultStr]; + + // Update the counts in the segmented control + NSUInteger numberOfRevisions = [_revisionList.items count]; + NSUInteger numberOfPermissions = [_permissionList.items count]; + NSUInteger numberOfChildren = [_childList.items count]; + NSUInteger numberOfParents = [_parentsList.items count]; + + NSString *revisionsStr = [NSString stringWithFormat:@"Revisions %lu", numberOfRevisions]; + NSString *permissionsStr = [NSString stringWithFormat:@"Permissions %lu", numberOfPermissions]; + NSString *childrenStr = [NSString stringWithFormat:@"Children %lu", numberOfChildren]; + NSString *parentsStr = [NSString stringWithFormat:@"Parents %lu", numberOfParents]; + + [_segmentedControl setLabel:revisionsStr forSegment:kRevisionsSegment]; + [_segmentedControl setLabel:permissionsStr forSegment:kPermissionsSegment]; + [_segmentedControl setLabel:childrenStr forSegment:kChildrenSegment]; + [_segmentedControl setLabel:parentsStr forSegment:kParentsSegment]; + + // Enable buttons + BOOL isFetchingFileList = (_fileListTicket != nil); + BOOL isEditingFileList = (_editFileListTicket != nil); + [_fileListCancelButton setEnabled:(isFetchingFileList || isEditingFileList)]; + + BOOL isFetchingDetails = (_detailsTicket != nil); + [_detailCancelButton setEnabled:isFetchingDetails]; + + GTLDriveFile *selectedFile = [self selectedFileListEntry]; + BOOL isFileSelected = (selectedFile != nil); + BOOL isFileViewable = (selectedFile.alternateLink != nil); + [_viewButton setEnabled:isFileViewable]; + + BOOL isEditable = [selectedFile.editable boolValue]; + [_deleteButton setEnabled:isEditable]; + [_trashButton setEnabled:isEditable]; + + BOOL isInTrash = [selectedFile.labels.trashed boolValue]; + NSString *trashTitle = (isInTrash ? @"Untrash" : @"Trash"); + [_trashButton setTitle:trashTitle]; + + [_duplicateButton setEnabled:isFileSelected]; + + BOOL hasFileList = (_fileList != nil); + [_newFolderButton setEnabled:hasFileList]; + + BOOL isUploading = (_uploadFileTicket != nil); + [_uploadButton setEnabled:(hasFileList && !isUploading)]; + [_pauseUploadButton setEnabled:isUploading]; + [_stopUploadButton setEnabled:isUploading]; + + BOOL isUploadPaused = [_uploadFileTicket isUploadPaused]; + NSString *pauseTitle = (isUploadPaused ? @"Resume" : @"Pause"); + [_pauseUploadButton setTitle:pauseTitle]; + + // Fill in the download menu with the available download formats. + BOOL hasDownloadURL = ([selectedFile.downloadUrl length] > 0); + GTLDriveFileExportLinks *exportLinks = selectedFile.exportLinks; + NSArray *exportLinkKeys = [exportLinks additionalJSONKeys]; + BOOL hasExportLinks = ([exportLinkKeys count] > 0); + [_downloadButton setEnabled:(hasDownloadURL || hasExportLinks)]; + + NSMenu *menu = [[NSMenu alloc] init]; + [menu addItemWithTitle:@"Download" action:NULL keyEquivalent:@""]; + + // Add an "Original File" menu item only if there's a download URL. + if ([selectedFile.downloadUrl length] > 0) { + NSMenuItem *menuItem = [menu addItemWithTitle:kOriginalFile + action:@selector(downloadFormatSelected:) + keyEquivalent:@""]; + [menuItem setTarget:self]; + [menuItem setRepresentedObject:selectedFile]; + } + + for (NSString *key in exportLinkKeys) { + NSMenuItem *menuItem = [menu addItemWithTitle:key + action:@selector(downloadFormatSelected:) + keyEquivalent:@""]; + [menuItem setTarget:self]; + + [menuItem setRepresentedObject:selectedFile]; + } + [_downloadButton setMenu:menu]; + + // Show or hide the text indicating that the client ID or client secret are + // needed + BOOL hasClientIDStrings = [[_clientIDField stringValue] length] > 0 + && [[_clientSecretField stringValue] length] > 0; + [_clientIDRequiredTextField setHidden:hasClientIDStrings]; +} + +- (void)updateThumbnailImage { + // We will fetch the thumbnail image if its URL is different from the one + // currently displayed. + static NSString *gDisplayedURLStr = nil; + GTLDriveFile *selectedFile = [self selectedFileListEntry]; + NSString *thumbnailURLStr = selectedFile.thumbnailLink; + + if (!GTL_AreEqualOrBothNil(gDisplayedURLStr, thumbnailURLStr)) { + [_thumbnailView setImage:nil]; + + gDisplayedURLStr = [thumbnailURLStr copy]; + + if (thumbnailURLStr) { + GTMHTTPFetcher *fetcher = [GTMHTTPFetcher fetcherWithURLString:thumbnailURLStr]; + fetcher.authorizer = self.driveService.authorizer; + [fetcher setCommentWithFormat:@"Thumbnail for \"%@\"", selectedFile.title]; + [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { + if (data) { + NSImage *image = [[NSImage alloc] initWithData:data]; + if (image) { + [_thumbnailView setImage:image]; + } else { + NSLog(@"Failed to make image from %lu bytes for \"%@\"", + (unsigned long) [data length], selectedFile.title); + } + } else { + NSLog(@"Failed to fetch thumbnail for \"%@\", %@", + selectedFile.title, error); + } + }]; + } + } +} + +- (void)displayAlert:(NSString *)title format:(NSString *)format, ... { + NSString *result = format; + if (format) { + va_list argList; + va_start(argList, format); + result = [[NSString alloc] initWithFormat:format + arguments:argList]; + va_end(argList); + } + NSBeginAlertSheet(title, nil, nil, nil, [self window], nil, nil, + nil, nil, @"%@", result); +} + +#pragma mark Client ID Sheet + +// Client ID and Client Secret Sheet +// +// Sample apps need this sheet to ask for the client ID and client secret +// strings +// +// Your application will just hardcode the client ID and client secret strings +// into the source rather than ask the user for them. +// +// The string values are obtained from the API Console, +// https://code.google.com/apis/console + +- (IBAction)clientIDClicked:(id)sender { + // Show the sheet for developers to enter their client ID and client secret + [NSApp beginSheet:_clientIDSheet + modalForWindow:[self window] + modalDelegate:self + didEndSelector:@selector(clientIDSheetDidEnd:returnCode:contextInfo:) + contextInfo:NULL]; +} + +- (IBAction)clientIDDoneClicked:(id)sender { + [NSApp endSheet:_clientIDSheet returnCode:NSOKButton]; +} + +- (void)clientIDSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { + [sheet orderOut:self]; + [self updateUI]; +} + +#pragma mark Text field delegate methods + +- (void)controlTextDidChange:(NSNotification *)note { + [self updateUI]; // enable and disable buttons +} + +#pragma mark TableView delegate and data source methods + +- (void)tableViewSelectionDidChange:(NSNotification *)notification { + [self updateUI]; + if ([notification object] == _fileListTable) { + [self fetchSelectedFileDetails]; + } +} + +// Table view data source methods +- (int)numberOfRowsInTableView:(NSTableView *)tableView { + GTLCollectionObject *collection; + if (tableView == _fileListTable) { + collection = _fileList; + } else { + collection = [self detailCollection]; + } + return [collection.items count]; +} + +- (id)tableView:(NSTableView *)tableView +objectValueForTableColumn:(NSTableColumn *)tableColumn + row:(NSInteger)row { + if (tableView == _fileListTable) { + // GTLCollectionObjects support indexed access to the collection items + GTLDriveFile *file = _fileList[row]; + return [self fileTitleWithLabelsForFile:file]; + } else { + GTLCollectionObject *collection = [self detailCollection]; + GTLObject *item = collection[row]; + return [self descriptionForDetailItem:item]; + } +} + +- (NSString *)fileTitleWithLabelsForFile:(GTLDriveFile *)file { + + NSMutableString *title = [NSMutableString stringWithString:file.title]; + GTLDriveFileLabels *labels = file.labels; + + if ([labels.starred boolValue]) { + [title appendString:@" \u2605"]; // star character + } + if ([labels.trashed boolValue]) { + title = [NSString stringWithFormat:@"\u2717 %@", title]; // X character + } + if ([labels.hidden boolValue]) { + [title appendString:@" \u263D"]; // quarter moon character + } + if ([labels.restricted boolValue]) { + [title appendString:@" \u21DF"]; // crossed down arrow character + } + return title; +} + +@end diff --git a/GTL/Examples/DriveSample/English.lproj/.svn/all-wcprops b/GTL/Examples/DriveSample/English.lproj/.svn/all-wcprops new file mode 100644 index 0000000..a61b586 --- /dev/null +++ b/GTL/Examples/DriveSample/English.lproj/.svn/all-wcprops @@ -0,0 +1,23 @@ +K 25 +svn:wc:ra_dav:version-url +V 58 +/svn/!svn/ver/200/trunk/Examples/DriveSample/English.lproj +END +InfoPlist.strings +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/177/trunk/Examples/DriveSample/English.lproj/InfoPlist.strings +END +DriveSampleWindow.xib +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/200/trunk/Examples/DriveSample/English.lproj/DriveSampleWindow.xib +END +MainMenu.xib +K 25 +svn:wc:ra_dav:version-url +V 71 +/svn/!svn/ver/177/trunk/Examples/DriveSample/English.lproj/MainMenu.xib +END diff --git a/GTL/Examples/DriveSample/English.lproj/.svn/entries b/GTL/Examples/DriveSample/English.lproj/.svn/entries new file mode 100644 index 0000000..4b01764 --- /dev/null +++ b/GTL/Examples/DriveSample/English.lproj/.svn/entries @@ -0,0 +1,130 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/DriveSample/English.lproj +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-08-06T20:19:50.423180Z +200 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +InfoPlist.strings +file + + + + +2012-12-09T08:42:34.000000Z +a7eb38b67a917064132a2b4d70f185f5 +2012-06-27T17:28:28.744668Z +177 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +95 + +DriveSampleWindow.xib +file + + + + +2012-12-09T08:42:34.000000Z +ed608c1fdf2cde47463a43ed7ef8d3da +2012-08-06T20:19:50.423180Z +200 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +128546 + +MainMenu.xib +file + + + + +2012-12-09T08:42:34.000000Z +eed6183f722fabf9a7918647fcee4b63 +2012-06-27T17:28:28.744668Z +177 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +62243 + diff --git a/GTL/Examples/DriveSample/English.lproj/.svn/text-base/DriveSampleWindow.xib.svn-base b/GTL/Examples/DriveSample/English.lproj/.svn/text-base/DriveSampleWindow.xib.svn-base new file mode 100644 index 0000000..02fdfed --- /dev/null +++ b/GTL/Examples/DriveSample/English.lproj/.svn/text-base/DriveSampleWindow.xib.svn-base @@ -0,0 +1,2822 @@ + + + + 1070 + 11E53 + 2549 + 1138.47 + 569.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2549 + + + NSButton + NSButtonCell + NSCustomObject + NSImageCell + NSImageView + NSMenu + NSMenuItem + NSPopUpButton + NSPopUpButtonCell + NSProgressIndicator + NSScrollView + NSScroller + NSSegmentedCell + NSSegmentedControl + NSSplitView + NSTableColumn + NSTableView + NSTextField + NSTextFieldCell + NSTextView + NSUserDefaultsController + NSView + NSWindowTemplate + + + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + + DriveSampleWindowController + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{119, 489}, {565, 564}} + 1886912512 + SampleApp + + NSWindow + + + View + + + {565, 564} + + + 256 + + + + 265 + {{430, 516}, {114, 32}} + + + YES + + 67239424 + 134217728 + Get File List + + LucidaGrande + 13 + 1044 + + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + + 290 + + + + 2304 + + + + 256 + {508, 86} + + + YES + + + 256 + {{449, 0}, {16, 17}} + + + + 505 + 8 + 1000 + + 75628096 + 2048 + + + LucidaGrande + 11 + 3100 + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + 3 + MAA + + + + + 337772096 + 2048 + + + + 6 + System + controlBackgroundColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + + + 3 + YES + + + + 3 + 2 + + 3 + MQA + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + 306184192 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {508, 86}} + + + + + 4 + + + + 256 + {{509, 1}, {15, 86}} + + + + _doScroller: + 0.63684209999999997 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + + 1 + + _doScroller: + 0.96651790000000004 + + + {{20, 123}, {525, 88}} + + + 133138 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 264 + {{17, 455}, {155, 17}} + + + YES + + 67239424 + 272629760 + Documents - select one + + + + 6 + System + controlColor + + + + + + + + 1292 + + {{177, 453}, {16, 16}} + + + 28938 + 100 + + + + 1313 + + {{469, 219}, {16, 16}} + + + 28938 + 100 + + + + 258 + + + + 2304 + + + + 2322 + {426, 77} + + + + + + + results + + + + 1 + MC45Njg2Mjc0NSAwLjIzNTI5NDEyIDAuMTg4MjM1MwA + + + Geneva + 10 + 16 + + + + + + + + 6 + + + + 426 + 1 + + + 100674401 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + 1 + MCAwIDEAA + + + + + + 1 + + 6 + {463, 10000000} + {366, 77} + + + + {{1, 1}, {523, 77}} + + + + + + {4, 5} + + 79691776 + + + + + + file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff + + + + + 3 + MCAwAA + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 77}} + + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{20, 36}, {525, 79}} + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + + 265 + {{492, 499}, {54, 16}} + + + YES + + 67239424 + 134479872 + Cancel + + LucidaGrande + 9 + 3614 + + + -2038284033 + 1 + + LucidaGrande + 9 + 16 + + + Gw + 200 + 25 + + + + + 289 + {{492, 218}, {54, 16}} + + + YES + + 67239424 + 134479872 + Cancel + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 292 + {{18, 217}, {358, 19}} + + + YES + + 67239424 + 131072 + + + + + 87 + Revisions + YES + 2 + + + 92 + Permissions + 1 + 2 + + + 82 + Children + 2 + + + 82 + Parents + 0 + + + + + + + 292 + {{376, 220}, {69, 17}} + + + YES + + 67239424 + 272629760 + Select one + + + + + + + + + 289 + {{186, 252}, {59, 16}} + + + YES + + 67239424 + 134479872 + Resume + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 289 + {{464, 246}, {86, 28}} + + + YES + + 67239424 + 134348800 + New Folder + + + -2038284033 + 1 + + LucidaGrande + 11 + 16 + + + + + + 200 + 25 + + + + + 289 + {{420, 12}, {128, 18}} + + YES + + 67239424 + 131072 + Log http to desktop + + + 1211912703 + 2 + + NSSwitch + + + + 200 + 25 + + + + + 264 + {{90, 498}, {71, 17}} + + + YES + + 67239424 + 272629760 + Signed In: + + + + + + + + + 266 + {{163, 498}, {247, 17}} + + + YES + + 67239424 + 272629760 + No + + + + + + + + + 268 + {{15, 491}, {72, 28}} + + + YES + + 67239424 + 134348800 + Sign Out + + + -2038284033 + 129 + + + 200 + 25 + + + + + 268 + {{15, 518}, {83, 28}} + + + YES + + -2080244224 + 134348800 + Client ID... + + + -2038284033 + 129 + + + 200 + 25 + + + + + 264 + {{102, 525}, {178, 14}} + + + YES + + 67239424 + 272760832 + Client ID and Secret Required + + + + + + + + + 292 + {{15, 245}, {97, 28}} + + + _NS:9 + YES + + 67239424 + 134348800 + Upload File… + + _NS:9 + + -2038284033 + 129 + + + 200 + 25 + + + + + 290 + {{114, 254}, {66, 12}} + + + _NS:9 + {250, 250} + 16653 + 100 + + + + 289 + {{251, 252}, {44, 16}} + + + YES + + 67239424 + 134479872 + Stop + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 265 + {{494, 475}, {52, 16}} + + + YES + + 67239424 + 134479872 + Delete + + + -2038284033 + 1 + + + Gw + 200 + 25 + + + + + 265 + {{481, 453}, {66, 16}} + + + YES + + 67239424 + 134479872 + Duplicate + + + -2038284033 + 1 + + + Gw + 200 + 25 + + + + + 265 + {{421, 452}, {54, 16}} + + + YES + + 67239424 + 134479872 + View + + + -2038284033 + 1 + + + Gw + 200 + 25 + + + + + 265 + {{310, 453}, {106, 15}} + + + _NS:9 + YES + + -2076049856 + 264192 + + _NS:9 + + 109199615 + 129 + + + 400 + 75 + + + YES + Download + + 1048576 + 2147483647 + 1 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + _popUpItemAction: + + + YES + + OtherViews + + + + + Item + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + + YES + 1 + YES + YES + 2 + + + + + 274 + + + + 256 + + + + 266 + + + + 2304 + + + + 256 + {413, 89} + + + YES + + + 256 + {{449, 0}, {16, 17}} + + + + 410 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + + + 337772096 + 2048 + + + + + + 3 + YES + + + + 3 + 2 + + + 17 + 306184192 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {413, 89}} + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 95}} + + + + _doScroller: + 0.5 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + + 1 + + _doScroller: + 0.99047620000000003 + + + {415, 91} + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 265 + + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + {{425, 0}, {100, 91}} + + + _NS:9 + YES + + 134348288 + 33554432 + _NS:9 + 0 + 0 + 2 + NO + + YES + + + {525, 91} + + + YES + 3 + + + + 266 + + + + 2304 + + + + 2322 + {523, 56} + + + + + + + results + + + + 1 + MC40NTEwODY5NCAwLjEwNDE0NTEyIDAuMDgyODYwMjE2AA + + + + + + + + + 6 + + + + 523 + 1 + + + 100674401 + 0 + + + + + + + + + + + + + + 1 + + 6 + {523, 10000000} + {463, 56} + + + + {{1, 1}, {523, 56}} + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{0, 101}, {525, 58}} + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + {{20, 278}, {525, 159}} + + + 3 + + + + 265 + {{430, 475}, {58, 16}} + + + YES + + 67239424 + 134479872 + Untrash + + + -2038284033 + 1 + + + Gw + 200 + 25 + + + + {565, 564} + + + {{0, 0}, {1920, 1178}} + {565, 586} + {10000000000000, 10000000000000} + YES + + + YES + + + 3 + 2 + {{235, 275}, {458, 284}} + 611844096 + Client ID Sheet + NSWindow + + + + + 256 + + + + 266 + {{118, 143}, {320, 22}} + + + YES + + -1804468671 + 272630784 + + + + YES + + 6 + System + textBackgroundColor + + + + 6 + System + textColor + + + + + + + 268 + {{17, 143}, {63, 17}} + + + YES + + 68288064 + 272630784 + Client ID: + + + + + + + + + 266 + {{118, 112}, {320, 22}} + + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 117}, {88, 17}} + + + YES + + 68288064 + 272630784 + Client Secret: + + + + + + + + + 268 + {{342, 78}, {74, 22}} + + + YES + + 67239424 + 134348800 + API Console + + + -2038284033 + 134 + + + 200 + 25 + + + + + 268 + {{17, 82}, {316, 17}} + + + YES + + 68288064 + 272630784 + Client ID and Client Secret are obtained from the + + + + + + + + + 268 + {{17, 204}, {424, 34}} + + + YES + + 67239424 + 138412032 + Each application should have a client ID and client secret hardcoded into the source. + + + + + + + + + 268 + {{348, 12}, {96, 32}} + + YES + + 67239424 + 134217728 + Done + + + -2038284033 + 129 + + DQ + 200 + 25 + + + + {458, 284} + + + {{0, 0}, {1920, 1178}} + {10000000000000, 10000000000000} + YES + + + + + + + window + + + + 16 + + + + loggingCheckboxClicked: + + + + 132 + + + + APIConsoleClicked: + + + + 229 + + + + clientIDDoneClicked: + + + + 230 + + + + clientIDClicked: + + + + 251 + + + + signInClicked: + + + + 252 + + + + cancelFileListFetch: + + + + 306 + + + + getFileList: + + + + 311 + + + + viewClicked: + + + + 353 + + + + duplicateClicked: + + + + 355 + + + + deleteClicked: + + + + 356 + + + + segmentedControlClicked: + + + + 357 + + + + uploadFileClicked: + + + + 371 + + + + pauseUploadClicked: + + + + 372 + + + + stopUploadClicked: + + + + 373 + + + + createFolderClicked: + + + + 374 + + + + trashClicked: + + + + 396 + + + + _signedInField + + + + 398 + + + + _signedInButton + + + + 399 + + + + _fileListTable + + + + 400 + + + + _fileListProgressIndicator + + + + 401 + + + + _fileListResultTextField + + + + 402 + + + + _fileListCancelButton + + + + 403 + + + + _thumbnailView + + + + 404 + + + + _downloadButton + + + + 405 + + + + _viewButton + + + + 406 + + + + _duplicateButton + + + + 407 + + + + _trashButton + + + + 408 + + + + _deleteButton + + + + 409 + + + + _uploadButton + + + + 410 + + + + _uploadProgressIndicator + + + + 411 + + + + _pauseUploadButton + + + + 412 + + + + _stopUploadButton + + + + 413 + + + + _newFolderButton + + + + 414 + + + + _segmentedControl + + + + 415 + + + + _detailTable + + + + 416 + + + + _detailProgressIndicator + + + + 417 + + + + _detailResultTextField + + + + 418 + + + + _detailCancelButton + + + + 419 + + + + _clientIDButton + + + + 420 + + + + _clientIDRequiredTextField + + + + 421 + + + + _clientIDSheet + + + + 422 + + + + _clientIDField + + + + 423 + + + + _clientSecretField + + + + 424 + + + + delegate + + + + 15 + + + + dataSource + + + + 34 + + + + delegate + + + + 35 + + + + delegate + + + + 36 + + + + dataSource + + + + 37 + + + + value: values.clientSecret + + + + + + value: values.clientSecret + value + values.clientSecret + 2 + + + 243 + + + + value: values.clientID + + + + + + value: values.clientID + value + values.clientID + 2 + + + 242 + + + + + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 5 + + + + + + Window + + + 6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 17 + + + + + + + + 38 + + + + + + + + 40 + + + + + 41 + + + + + 82 + + + + + + + + + + 83 + + + + + 86 + + + + + + + + 87 + + + + + + + + 92 + + + + + + + + 95 + + + + + + + + 131 + + + + + + + + 44 + + + Shared Defaults + + + 175 + + + + + 176 + + + + + 181 + + + + + 182 + + + + + 183 + + + + + 184 + + + + + 191 + + + + + 201 + + + + + 202 + + + + + 208 + + + + + + + + 209 + + + + + + + + + + + + + + + 210 + + + + + + + + 211 + + + + + + + + 212 + + + + + + + + 213 + + + + + + + + 214 + + + + + + + + 215 + + + + + + + + 216 + + + + + + + + 217 + + + + + + + + 218 + + + + + 219 + + + + + 220 + + + + + 221 + + + + + 222 + + + + + 223 + + + + + 224 + + + + + 225 + + + + + 231 + + + + + + + + 232 + + + + + + + + 233 + + + + + + + + 234 + + + + + + + + 235 + + + + + + + + 236 + + + + + 237 + + + + + 238 + + + + + 239 + + + + + 240 + + + + + 117 + + + + + + + + 189 + + + + + 116 + + + + + + + + 188 + + + + + 312 + + + + + + + + 313 + + + + + 317 + + + + + 322 + + + + + + + + 323 + + + + + 325 + + + + + + + + 326 + + + + + 328 + + + + + + + + 329 + + + + + 334 + + + + + + + + 335 + + + + + 358 + + + + + + + + 359 + + + + + + + + 360 + + + + + + + + + 361 + + + + + 363 + + + + + 28 + + + + + + + + + + 198 + + + + + 197 + + + + + 29 + + + + + + + + 30 + + + + + + + + 194 + + + + + 387 + + + + + + + + + 386 + + + + + + + + + 24 + + + + + + + + + + 384 + + + + + + + + 385 + + + + + 25 + + + + + + + + 195 + + + + + 196 + + + + + 26 + + + + + + + + 193 + + + + + 80 + + + + + + + + + + 200 + + + + + 199 + + + + + 81 + + + + + 389 + + + + + + + + 390 + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + {{129, 872}, {458, 284}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{99, 519}, {565, 635}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + 424 + + + + + DriveSampleWindowController + NSWindowController + + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + APIConsoleClicked: + id + + + cancelFileListFetch: + id + + + clientIDClicked: + id + + + clientIDDoneClicked: + id + + + createFolderClicked: + id + + + deleteClicked: + id + + + duplicateClicked: + id + + + getFileList: + id + + + loggingCheckboxClicked: + id + + + pauseUploadClicked: + id + + + segmentedControlClicked: + id + + + signInClicked: + id + + + stopUploadClicked: + id + + + trashClicked: + id + + + uploadFileClicked: + id + + + viewClicked: + id + + + + NSButton + NSTextField + NSTextField + NSWindow + NSTextField + NSButton + NSButton + NSProgressIndicator + NSTextView + NSTableView + NSPopUpButton + NSButton + NSButton + NSProgressIndicator + NSTextView + NSTableView + NSButton + NSButton + NSSegmentedControl + NSButton + NSTextField + NSButton + NSImageView + NSButton + NSButton + NSProgressIndicator + NSButton + + + + clientIDButton_ + NSButton + + + clientIDField_ + NSTextField + + + clientIDRequiredTextField_ + NSTextField + + + clientIDSheet_ + NSWindow + + + clientSecretField_ + NSTextField + + + deleteButton_ + NSButton + + + detailCancelButton_ + NSButton + + + detailProgressIndicator_ + NSProgressIndicator + + + detailResultTextField_ + NSTextView + + + detailTable_ + NSTableView + + + downloadButton_ + NSPopUpButton + + + duplicateButton_ + NSButton + + + fileListCancelButton_ + NSButton + + + fileListProgressIndicator_ + NSProgressIndicator + + + fileListResultTextField_ + NSTextView + + + fileListTable_ + NSTableView + + + newFolderButton_ + NSButton + + + pauseUploadButton_ + NSButton + + + segmentedControl_ + NSSegmentedControl + + + signedInButton_ + NSButton + + + signedInField_ + NSTextField + + + stopUploadButton_ + NSButton + + + thumbnailView_ + NSImageView + + + trashButton_ + NSButton + + + uploadButton_ + NSButton + + + uploadProgressIndicator_ + NSProgressIndicator + + + viewButton_ + NSButton + + + + IBProjectSource + ./Classes/DriveSampleWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + {11, 11} + {10, 3} + + + diff --git a/GTL/Examples/DriveSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base b/GTL/Examples/DriveSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base new file mode 100644 index 0000000..07a8a81 --- /dev/null +++ b/GTL/Examples/DriveSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "© Google Inc. 2012"; diff --git a/GTL/Examples/DriveSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base b/GTL/Examples/DriveSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base new file mode 100644 index 0000000..9d95b7f --- /dev/null +++ b/GTL/Examples/DriveSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base @@ -0,0 +1,1418 @@ + + + + 1070 + 11E53 + 2182 + 1138.47 + 569.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2182 + + + NSMenu + NSMenuItem + NSCustomObject + + + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + + + NSApplication + + + + FirstResponder + + + NSApplication + + + MainMenu + + + + SampleApp + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + SampleApp + + + + About the Sample + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + + Services + + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + + File + + + + + New + n + 1048576 + 2147483647 + + + + + + Open... + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + + Open Recent + + + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + Save As… + S + 1048576 + 2147483647 + + + + + + Revert + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup… + P + 1048576 + 2147483647 + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + + Edit + + + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + + Find + + + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1048576 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling + + 1048576 + 2147483647 + + + submenuAction: + + Spelling + + + + Spelling… + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling as You Type + + 1048576 + 2147483647 + + + + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + + Window + + + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + Help + + + + Help + ? + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + DriveSampleAppController + + + + + + + delegate + + + + 225 + + + + terminate: + + + + 139 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + hideOtherApplications: + + + + 146 + + + + hide: + + + + 152 + + + + unhideAllApplications: + + + + 153 + + + + delegate + + + + 223 + + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + showHelp: + + + + 122 + + + + clearRecentDocuments: + + + + 127 + + + + cut: + + + + 175 + + + + paste: + + + + 176 + + + + redo: + + + + 178 + + + + selectAll: + + + + 179 + + + + undo: + + + + 180 + + + + copy: + + + + 181 + + + + showGuessPanel: + + + + 188 + + + + checkSpelling: + + + + 190 + + + + toggleContinuousSpellChecking: + + + + 192 + + + + performClose: + + + + 193 + + + + delete: + + + + 195 + + + + performZoom: + + + + 198 + + + + performFindPanelAction: + + + + 199 + + + + performFindPanelAction: + + + + 200 + + + + performFindPanelAction: + + + + 201 + + + + performFindPanelAction: + + + + 202 + + + + centerSelectionInVisibleArea: + + + + 203 + + + + pasteAsPlainText: + + + + 205 + + + + + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + + + + + + + + MainMenu + + + 19 + + + + + + + + 24 + + + + + + + + + + + 5 + + + + + 23 + + + + + 92 + + + + + 197 + + + + + 56 + + + + + + + + 57 + + + + + + + + + + + + + + + + + + 58 + + + + + 129 + + + + + 131 + + + + + + + + 130 + + + + + 134 + + + + + 136 + + + + + 143 + + + + + 144 + + + + + 145 + + + + + 149 + + + + + 150 + + + + + 196 + + + + + 83 + + + + + + + + 81 + + + + + + + + + + + + + + + + + + 72 + + + + + 73 + + + + + 74 + + + + + 75 + + + + + 77 + + + + + 78 + + + + + 79 + + + + + 80 + + + + + 82 + + + + + 112 + + + + + 124 + + + + + + + + 125 + + + + + + + + 126 + + + + + 103 + + + + + + + + 106 + + + + + + + + 111 + + + + + 163 + + + + + + + + 169 + + + + + + + + + + + + + + + + + + + 156 + + + + + 157 + + + + + 158 + + + + + 160 + + + + + 164 + + + + + 168 + + + + + + + + 159 + + + + + + + + + + + + 154 + + + + + 155 + + + + + 161 + + + + + 162 + + + + + 167 + + + + + 171 + + + + + 172 + + + + + 173 + + + + + 174 + + + + + 184 + + + + + + + + 185 + + + + + + + + + + 187 + + + + + 189 + + + + + 191 + + + + + 204 + + + + + 222 + + + SampleAppController + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + 227 + + + + + DriveSampleAppController + NSObject + + IBProjectSource + ./Classes/DriveSampleAppController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + {11, 11} + {10, 3} + + + diff --git a/GTL/Examples/DriveSample/English.lproj/DriveSampleWindow.xib b/GTL/Examples/DriveSample/English.lproj/DriveSampleWindow.xib new file mode 100644 index 0000000..02fdfed --- /dev/null +++ b/GTL/Examples/DriveSample/English.lproj/DriveSampleWindow.xib @@ -0,0 +1,2822 @@ + + + + 1070 + 11E53 + 2549 + 1138.47 + 569.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2549 + + + NSButton + NSButtonCell + NSCustomObject + NSImageCell + NSImageView + NSMenu + NSMenuItem + NSPopUpButton + NSPopUpButtonCell + NSProgressIndicator + NSScrollView + NSScroller + NSSegmentedCell + NSSegmentedControl + NSSplitView + NSTableColumn + NSTableView + NSTextField + NSTextFieldCell + NSTextView + NSUserDefaultsController + NSView + NSWindowTemplate + + + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + + DriveSampleWindowController + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{119, 489}, {565, 564}} + 1886912512 + SampleApp + + NSWindow + + + View + + + {565, 564} + + + 256 + + + + 265 + {{430, 516}, {114, 32}} + + + YES + + 67239424 + 134217728 + Get File List + + LucidaGrande + 13 + 1044 + + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + + 290 + + + + 2304 + + + + 256 + {508, 86} + + + YES + + + 256 + {{449, 0}, {16, 17}} + + + + 505 + 8 + 1000 + + 75628096 + 2048 + + + LucidaGrande + 11 + 3100 + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + 3 + MAA + + + + + 337772096 + 2048 + + + + 6 + System + controlBackgroundColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + + + 3 + YES + + + + 3 + 2 + + 3 + MQA + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + 306184192 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {508, 86}} + + + + + 4 + + + + 256 + {{509, 1}, {15, 86}} + + + + _doScroller: + 0.63684209999999997 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + + 1 + + _doScroller: + 0.96651790000000004 + + + {{20, 123}, {525, 88}} + + + 133138 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 264 + {{17, 455}, {155, 17}} + + + YES + + 67239424 + 272629760 + Documents - select one + + + + 6 + System + controlColor + + + + + + + + 1292 + + {{177, 453}, {16, 16}} + + + 28938 + 100 + + + + 1313 + + {{469, 219}, {16, 16}} + + + 28938 + 100 + + + + 258 + + + + 2304 + + + + 2322 + {426, 77} + + + + + + + results + + + + 1 + MC45Njg2Mjc0NSAwLjIzNTI5NDEyIDAuMTg4MjM1MwA + + + Geneva + 10 + 16 + + + + + + + + 6 + + + + 426 + 1 + + + 100674401 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + 1 + MCAwIDEAA + + + + + + 1 + + 6 + {463, 10000000} + {366, 77} + + + + {{1, 1}, {523, 77}} + + + + + + {4, 5} + + 79691776 + + + + + + file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff + + + + + 3 + MCAwAA + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 77}} + + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{20, 36}, {525, 79}} + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + + 265 + {{492, 499}, {54, 16}} + + + YES + + 67239424 + 134479872 + Cancel + + LucidaGrande + 9 + 3614 + + + -2038284033 + 1 + + LucidaGrande + 9 + 16 + + + Gw + 200 + 25 + + + + + 289 + {{492, 218}, {54, 16}} + + + YES + + 67239424 + 134479872 + Cancel + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 292 + {{18, 217}, {358, 19}} + + + YES + + 67239424 + 131072 + + + + + 87 + Revisions + YES + 2 + + + 92 + Permissions + 1 + 2 + + + 82 + Children + 2 + + + 82 + Parents + 0 + + + + + + + 292 + {{376, 220}, {69, 17}} + + + YES + + 67239424 + 272629760 + Select one + + + + + + + + + 289 + {{186, 252}, {59, 16}} + + + YES + + 67239424 + 134479872 + Resume + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 289 + {{464, 246}, {86, 28}} + + + YES + + 67239424 + 134348800 + New Folder + + + -2038284033 + 1 + + LucidaGrande + 11 + 16 + + + + + + 200 + 25 + + + + + 289 + {{420, 12}, {128, 18}} + + YES + + 67239424 + 131072 + Log http to desktop + + + 1211912703 + 2 + + NSSwitch + + + + 200 + 25 + + + + + 264 + {{90, 498}, {71, 17}} + + + YES + + 67239424 + 272629760 + Signed In: + + + + + + + + + 266 + {{163, 498}, {247, 17}} + + + YES + + 67239424 + 272629760 + No + + + + + + + + + 268 + {{15, 491}, {72, 28}} + + + YES + + 67239424 + 134348800 + Sign Out + + + -2038284033 + 129 + + + 200 + 25 + + + + + 268 + {{15, 518}, {83, 28}} + + + YES + + -2080244224 + 134348800 + Client ID... + + + -2038284033 + 129 + + + 200 + 25 + + + + + 264 + {{102, 525}, {178, 14}} + + + YES + + 67239424 + 272760832 + Client ID and Secret Required + + + + + + + + + 292 + {{15, 245}, {97, 28}} + + + _NS:9 + YES + + 67239424 + 134348800 + Upload File… + + _NS:9 + + -2038284033 + 129 + + + 200 + 25 + + + + + 290 + {{114, 254}, {66, 12}} + + + _NS:9 + {250, 250} + 16653 + 100 + + + + 289 + {{251, 252}, {44, 16}} + + + YES + + 67239424 + 134479872 + Stop + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 265 + {{494, 475}, {52, 16}} + + + YES + + 67239424 + 134479872 + Delete + + + -2038284033 + 1 + + + Gw + 200 + 25 + + + + + 265 + {{481, 453}, {66, 16}} + + + YES + + 67239424 + 134479872 + Duplicate + + + -2038284033 + 1 + + + Gw + 200 + 25 + + + + + 265 + {{421, 452}, {54, 16}} + + + YES + + 67239424 + 134479872 + View + + + -2038284033 + 1 + + + Gw + 200 + 25 + + + + + 265 + {{310, 453}, {106, 15}} + + + _NS:9 + YES + + -2076049856 + 264192 + + _NS:9 + + 109199615 + 129 + + + 400 + 75 + + + YES + Download + + 1048576 + 2147483647 + 1 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + _popUpItemAction: + + + YES + + OtherViews + + + + + Item + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + + YES + 1 + YES + YES + 2 + + + + + 274 + + + + 256 + + + + 266 + + + + 2304 + + + + 256 + {413, 89} + + + YES + + + 256 + {{449, 0}, {16, 17}} + + + + 410 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + + + 337772096 + 2048 + + + + + + 3 + YES + + + + 3 + 2 + + + 17 + 306184192 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {413, 89}} + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 95}} + + + + _doScroller: + 0.5 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + + 1 + + _doScroller: + 0.99047620000000003 + + + {415, 91} + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 265 + + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + {{425, 0}, {100, 91}} + + + _NS:9 + YES + + 134348288 + 33554432 + _NS:9 + 0 + 0 + 2 + NO + + YES + + + {525, 91} + + + YES + 3 + + + + 266 + + + + 2304 + + + + 2322 + {523, 56} + + + + + + + results + + + + 1 + MC40NTEwODY5NCAwLjEwNDE0NTEyIDAuMDgyODYwMjE2AA + + + + + + + + + 6 + + + + 523 + 1 + + + 100674401 + 0 + + + + + + + + + + + + + + 1 + + 6 + {523, 10000000} + {463, 56} + + + + {{1, 1}, {523, 56}} + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{0, 101}, {525, 58}} + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + {{20, 278}, {525, 159}} + + + 3 + + + + 265 + {{430, 475}, {58, 16}} + + + YES + + 67239424 + 134479872 + Untrash + + + -2038284033 + 1 + + + Gw + 200 + 25 + + + + {565, 564} + + + {{0, 0}, {1920, 1178}} + {565, 586} + {10000000000000, 10000000000000} + YES + + + YES + + + 3 + 2 + {{235, 275}, {458, 284}} + 611844096 + Client ID Sheet + NSWindow + + + + + 256 + + + + 266 + {{118, 143}, {320, 22}} + + + YES + + -1804468671 + 272630784 + + + + YES + + 6 + System + textBackgroundColor + + + + 6 + System + textColor + + + + + + + 268 + {{17, 143}, {63, 17}} + + + YES + + 68288064 + 272630784 + Client ID: + + + + + + + + + 266 + {{118, 112}, {320, 22}} + + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 117}, {88, 17}} + + + YES + + 68288064 + 272630784 + Client Secret: + + + + + + + + + 268 + {{342, 78}, {74, 22}} + + + YES + + 67239424 + 134348800 + API Console + + + -2038284033 + 134 + + + 200 + 25 + + + + + 268 + {{17, 82}, {316, 17}} + + + YES + + 68288064 + 272630784 + Client ID and Client Secret are obtained from the + + + + + + + + + 268 + {{17, 204}, {424, 34}} + + + YES + + 67239424 + 138412032 + Each application should have a client ID and client secret hardcoded into the source. + + + + + + + + + 268 + {{348, 12}, {96, 32}} + + YES + + 67239424 + 134217728 + Done + + + -2038284033 + 129 + + DQ + 200 + 25 + + + + {458, 284} + + + {{0, 0}, {1920, 1178}} + {10000000000000, 10000000000000} + YES + + + + + + + window + + + + 16 + + + + loggingCheckboxClicked: + + + + 132 + + + + APIConsoleClicked: + + + + 229 + + + + clientIDDoneClicked: + + + + 230 + + + + clientIDClicked: + + + + 251 + + + + signInClicked: + + + + 252 + + + + cancelFileListFetch: + + + + 306 + + + + getFileList: + + + + 311 + + + + viewClicked: + + + + 353 + + + + duplicateClicked: + + + + 355 + + + + deleteClicked: + + + + 356 + + + + segmentedControlClicked: + + + + 357 + + + + uploadFileClicked: + + + + 371 + + + + pauseUploadClicked: + + + + 372 + + + + stopUploadClicked: + + + + 373 + + + + createFolderClicked: + + + + 374 + + + + trashClicked: + + + + 396 + + + + _signedInField + + + + 398 + + + + _signedInButton + + + + 399 + + + + _fileListTable + + + + 400 + + + + _fileListProgressIndicator + + + + 401 + + + + _fileListResultTextField + + + + 402 + + + + _fileListCancelButton + + + + 403 + + + + _thumbnailView + + + + 404 + + + + _downloadButton + + + + 405 + + + + _viewButton + + + + 406 + + + + _duplicateButton + + + + 407 + + + + _trashButton + + + + 408 + + + + _deleteButton + + + + 409 + + + + _uploadButton + + + + 410 + + + + _uploadProgressIndicator + + + + 411 + + + + _pauseUploadButton + + + + 412 + + + + _stopUploadButton + + + + 413 + + + + _newFolderButton + + + + 414 + + + + _segmentedControl + + + + 415 + + + + _detailTable + + + + 416 + + + + _detailProgressIndicator + + + + 417 + + + + _detailResultTextField + + + + 418 + + + + _detailCancelButton + + + + 419 + + + + _clientIDButton + + + + 420 + + + + _clientIDRequiredTextField + + + + 421 + + + + _clientIDSheet + + + + 422 + + + + _clientIDField + + + + 423 + + + + _clientSecretField + + + + 424 + + + + delegate + + + + 15 + + + + dataSource + + + + 34 + + + + delegate + + + + 35 + + + + delegate + + + + 36 + + + + dataSource + + + + 37 + + + + value: values.clientSecret + + + + + + value: values.clientSecret + value + values.clientSecret + 2 + + + 243 + + + + value: values.clientID + + + + + + value: values.clientID + value + values.clientID + 2 + + + 242 + + + + + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 5 + + + + + + Window + + + 6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 17 + + + + + + + + 38 + + + + + + + + 40 + + + + + 41 + + + + + 82 + + + + + + + + + + 83 + + + + + 86 + + + + + + + + 87 + + + + + + + + 92 + + + + + + + + 95 + + + + + + + + 131 + + + + + + + + 44 + + + Shared Defaults + + + 175 + + + + + 176 + + + + + 181 + + + + + 182 + + + + + 183 + + + + + 184 + + + + + 191 + + + + + 201 + + + + + 202 + + + + + 208 + + + + + + + + 209 + + + + + + + + + + + + + + + 210 + + + + + + + + 211 + + + + + + + + 212 + + + + + + + + 213 + + + + + + + + 214 + + + + + + + + 215 + + + + + + + + 216 + + + + + + + + 217 + + + + + + + + 218 + + + + + 219 + + + + + 220 + + + + + 221 + + + + + 222 + + + + + 223 + + + + + 224 + + + + + 225 + + + + + 231 + + + + + + + + 232 + + + + + + + + 233 + + + + + + + + 234 + + + + + + + + 235 + + + + + + + + 236 + + + + + 237 + + + + + 238 + + + + + 239 + + + + + 240 + + + + + 117 + + + + + + + + 189 + + + + + 116 + + + + + + + + 188 + + + + + 312 + + + + + + + + 313 + + + + + 317 + + + + + 322 + + + + + + + + 323 + + + + + 325 + + + + + + + + 326 + + + + + 328 + + + + + + + + 329 + + + + + 334 + + + + + + + + 335 + + + + + 358 + + + + + + + + 359 + + + + + + + + 360 + + + + + + + + + 361 + + + + + 363 + + + + + 28 + + + + + + + + + + 198 + + + + + 197 + + + + + 29 + + + + + + + + 30 + + + + + + + + 194 + + + + + 387 + + + + + + + + + 386 + + + + + + + + + 24 + + + + + + + + + + 384 + + + + + + + + 385 + + + + + 25 + + + + + + + + 195 + + + + + 196 + + + + + 26 + + + + + + + + 193 + + + + + 80 + + + + + + + + + + 200 + + + + + 199 + + + + + 81 + + + + + 389 + + + + + + + + 390 + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + {{129, 872}, {458, 284}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{99, 519}, {565, 635}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + 424 + + + + + DriveSampleWindowController + NSWindowController + + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + APIConsoleClicked: + id + + + cancelFileListFetch: + id + + + clientIDClicked: + id + + + clientIDDoneClicked: + id + + + createFolderClicked: + id + + + deleteClicked: + id + + + duplicateClicked: + id + + + getFileList: + id + + + loggingCheckboxClicked: + id + + + pauseUploadClicked: + id + + + segmentedControlClicked: + id + + + signInClicked: + id + + + stopUploadClicked: + id + + + trashClicked: + id + + + uploadFileClicked: + id + + + viewClicked: + id + + + + NSButton + NSTextField + NSTextField + NSWindow + NSTextField + NSButton + NSButton + NSProgressIndicator + NSTextView + NSTableView + NSPopUpButton + NSButton + NSButton + NSProgressIndicator + NSTextView + NSTableView + NSButton + NSButton + NSSegmentedControl + NSButton + NSTextField + NSButton + NSImageView + NSButton + NSButton + NSProgressIndicator + NSButton + + + + clientIDButton_ + NSButton + + + clientIDField_ + NSTextField + + + clientIDRequiredTextField_ + NSTextField + + + clientIDSheet_ + NSWindow + + + clientSecretField_ + NSTextField + + + deleteButton_ + NSButton + + + detailCancelButton_ + NSButton + + + detailProgressIndicator_ + NSProgressIndicator + + + detailResultTextField_ + NSTextView + + + detailTable_ + NSTableView + + + downloadButton_ + NSPopUpButton + + + duplicateButton_ + NSButton + + + fileListCancelButton_ + NSButton + + + fileListProgressIndicator_ + NSProgressIndicator + + + fileListResultTextField_ + NSTextView + + + fileListTable_ + NSTableView + + + newFolderButton_ + NSButton + + + pauseUploadButton_ + NSButton + + + segmentedControl_ + NSSegmentedControl + + + signedInButton_ + NSButton + + + signedInField_ + NSTextField + + + stopUploadButton_ + NSButton + + + thumbnailView_ + NSImageView + + + trashButton_ + NSButton + + + uploadButton_ + NSButton + + + uploadProgressIndicator_ + NSProgressIndicator + + + viewButton_ + NSButton + + + + IBProjectSource + ./Classes/DriveSampleWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + {11, 11} + {10, 3} + + + diff --git a/GTL/Examples/DriveSample/English.lproj/InfoPlist.strings b/GTL/Examples/DriveSample/English.lproj/InfoPlist.strings new file mode 100644 index 0000000..07a8a81 --- /dev/null +++ b/GTL/Examples/DriveSample/English.lproj/InfoPlist.strings @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "© Google Inc. 2012"; diff --git a/GTL/Examples/DriveSample/English.lproj/MainMenu.xib b/GTL/Examples/DriveSample/English.lproj/MainMenu.xib new file mode 100644 index 0000000..9d95b7f --- /dev/null +++ b/GTL/Examples/DriveSample/English.lproj/MainMenu.xib @@ -0,0 +1,1418 @@ + + + + 1070 + 11E53 + 2182 + 1138.47 + 569.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2182 + + + NSMenu + NSMenuItem + NSCustomObject + + + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + + + NSApplication + + + + FirstResponder + + + NSApplication + + + MainMenu + + + + SampleApp + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + SampleApp + + + + About the Sample + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + + Services + + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + + File + + + + + New + n + 1048576 + 2147483647 + + + + + + Open... + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + + Open Recent + + + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + Save As… + S + 1048576 + 2147483647 + + + + + + Revert + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup… + P + 1048576 + 2147483647 + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + + Edit + + + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + + Find + + + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1048576 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling + + 1048576 + 2147483647 + + + submenuAction: + + Spelling + + + + Spelling… + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling as You Type + + 1048576 + 2147483647 + + + + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + + Window + + + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + Help + + + + Help + ? + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + DriveSampleAppController + + + + + + + delegate + + + + 225 + + + + terminate: + + + + 139 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + hideOtherApplications: + + + + 146 + + + + hide: + + + + 152 + + + + unhideAllApplications: + + + + 153 + + + + delegate + + + + 223 + + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + showHelp: + + + + 122 + + + + clearRecentDocuments: + + + + 127 + + + + cut: + + + + 175 + + + + paste: + + + + 176 + + + + redo: + + + + 178 + + + + selectAll: + + + + 179 + + + + undo: + + + + 180 + + + + copy: + + + + 181 + + + + showGuessPanel: + + + + 188 + + + + checkSpelling: + + + + 190 + + + + toggleContinuousSpellChecking: + + + + 192 + + + + performClose: + + + + 193 + + + + delete: + + + + 195 + + + + performZoom: + + + + 198 + + + + performFindPanelAction: + + + + 199 + + + + performFindPanelAction: + + + + 200 + + + + performFindPanelAction: + + + + 201 + + + + performFindPanelAction: + + + + 202 + + + + centerSelectionInVisibleArea: + + + + 203 + + + + pasteAsPlainText: + + + + 205 + + + + + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + + + + + + + + MainMenu + + + 19 + + + + + + + + 24 + + + + + + + + + + + 5 + + + + + 23 + + + + + 92 + + + + + 197 + + + + + 56 + + + + + + + + 57 + + + + + + + + + + + + + + + + + + 58 + + + + + 129 + + + + + 131 + + + + + + + + 130 + + + + + 134 + + + + + 136 + + + + + 143 + + + + + 144 + + + + + 145 + + + + + 149 + + + + + 150 + + + + + 196 + + + + + 83 + + + + + + + + 81 + + + + + + + + + + + + + + + + + + 72 + + + + + 73 + + + + + 74 + + + + + 75 + + + + + 77 + + + + + 78 + + + + + 79 + + + + + 80 + + + + + 82 + + + + + 112 + + + + + 124 + + + + + + + + 125 + + + + + + + + 126 + + + + + 103 + + + + + + + + 106 + + + + + + + + 111 + + + + + 163 + + + + + + + + 169 + + + + + + + + + + + + + + + + + + + 156 + + + + + 157 + + + + + 158 + + + + + 160 + + + + + 164 + + + + + 168 + + + + + + + + 159 + + + + + + + + + + + + 154 + + + + + 155 + + + + + 161 + + + + + 162 + + + + + 167 + + + + + 171 + + + + + 172 + + + + + 173 + + + + + 174 + + + + + 184 + + + + + + + + 185 + + + + + + + + + + 187 + + + + + 189 + + + + + 191 + + + + + 204 + + + + + 222 + + + SampleAppController + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + 227 + + + + + DriveSampleAppController + NSObject + + IBProjectSource + ./Classes/DriveSampleAppController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + {11, 11} + {10, 3} + + + diff --git a/GTL/Examples/DriveSample/Info.plist b/GTL/Examples/DriveSample/Info.plist new file mode 100644 index 0000000..235b97e --- /dev/null +++ b/GTL/Examples/DriveSample/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.example.DriveSample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/GTL/Examples/DriveSample/README.txt b/GTL/Examples/DriveSample/README.txt new file mode 100644 index 0000000..ff257a0 --- /dev/null +++ b/GTL/Examples/DriveSample/README.txt @@ -0,0 +1 @@ +This sample should automatically build and copy over the GTL.framework as part of the build-and-run process. diff --git a/GTL/Examples/DriveSample/buildStripHeaders b/GTL/Examples/DriveSample/buildStripHeaders new file mode 100755 index 0000000..0238ef2 --- /dev/null +++ b/GTL/Examples/DriveSample/buildStripHeaders @@ -0,0 +1,17 @@ +#!/bin/sh +# +# buildStripHeaders +# +# Remove header files from the built copy of the framework inside our +# application. + +# Strip "*.h" files +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname '*.h' -delete + +# Strip "Headers" links +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type l -delete + +# Strip "Headers" directories +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type d -prune -delete + + diff --git a/GTL/Examples/DriveSample/main.m b/GTL/Examples/DriveSample/main.m new file mode 100644 index 0000000..a1649ce --- /dev/null +++ b/GTL/Examples/DriveSample/main.m @@ -0,0 +1,24 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// main.m +// + +#import + +int main(int argc, char *argv[]) { + return NSApplicationMain(argc, (const char **) argv); +} diff --git a/GTL/Examples/LatitudeSample/.svn/all-wcprops b/GTL/Examples/LatitudeSample/.svn/all-wcprops new file mode 100644 index 0000000..4c06e1d --- /dev/null +++ b/GTL/Examples/LatitudeSample/.svn/all-wcprops @@ -0,0 +1,53 @@ +K 25 +svn:wc:ra_dav:version-url +V 47 +/svn/!svn/ver/169/trunk/Examples/LatitudeSample +END +LatitudeSampleWindowController.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/29/trunk/Examples/LatitudeSample/LatitudeSampleWindowController.h +END +main.m +K 25 +svn:wc:ra_dav:version-url +V 53 +/svn/!svn/ver/29/trunk/Examples/LatitudeSample/main.m +END +LatitudeSampleWindowController.m +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/169/trunk/Examples/LatitudeSample/LatitudeSampleWindowController.m +END +Info.plist +K 25 +svn:wc:ra_dav:version-url +V 57 +/svn/!svn/ver/29/trunk/Examples/LatitudeSample/Info.plist +END +LatitudeSampleAppController.h +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/29/trunk/Examples/LatitudeSample/LatitudeSampleAppController.h +END +README.txt +K 25 +svn:wc:ra_dav:version-url +V 57 +/svn/!svn/ver/29/trunk/Examples/LatitudeSample/README.txt +END +buildStripHeaders +K 25 +svn:wc:ra_dav:version-url +V 64 +/svn/!svn/ver/29/trunk/Examples/LatitudeSample/buildStripHeaders +END +LatitudeSampleAppController.m +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/29/trunk/Examples/LatitudeSample/LatitudeSampleAppController.m +END diff --git a/GTL/Examples/LatitudeSample/.svn/entries b/GTL/Examples/LatitudeSample/.svn/entries new file mode 100644 index 0000000..b377261 --- /dev/null +++ b/GTL/Examples/LatitudeSample/.svn/entries @@ -0,0 +1,306 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/LatitudeSample +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-06-19T21:52:36.704909Z +169 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +LatitudeSampleWindowController.h +file + + + + +2012-12-09T08:42:34.000000Z +aec9492be0dd8cff42bc5553f4d71cf9 +2011-08-23T19:15:08.363770Z +29 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2627 + +main.m +file + + + + +2012-12-09T08:42:34.000000Z +246a89353f2c5021dce7384b100ff0fe +2011-08-23T19:15:08.363770Z +29 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +736 + +LatitudeSampleWindowController.m +file + + + + +2012-12-09T08:42:34.000000Z +c366bb5271ca60cb2d55bac395e35120 +2012-06-19T21:52:36.704909Z +169 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +19999 + +Info.plist +file + + + + +2012-12-09T08:42:34.000000Z +ea22f5ef2f0697c14c3e2cbd8c0bb67a +2011-08-23T19:15:08.363770Z +29 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +839 + +LatitudeSampleAppController.h +file + + + + +2012-12-09T08:42:34.000000Z +72c9b2bde84f96b4a183ee6f4acebb52 +2011-08-23T19:15:08.363770Z +29 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +718 + +LatitudeSample.xcodeproj +dir + +README.txt +file + + + + +2012-12-09T08:42:34.000000Z +0a3374a462b2cff6dcd19d0caf28958a +2011-08-23T19:15:08.363770Z +29 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +109 + +buildStripHeaders +file + + + + +2012-12-09T08:42:34.000000Z +38b5302dc0e4a662c40b288306a2f6ac +2011-08-23T19:15:08.363770Z +29 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +454 + +LatitudeSampleAppController.m +file + + + + +2012-12-09T08:42:34.000000Z +bfed96929463a148385993f395d8f98b +2011-08-23T19:15:08.363770Z +29 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1100 + +English.lproj +dir + diff --git a/GTL/Examples/LatitudeSample/.svn/prop-base/buildStripHeaders.svn-base b/GTL/Examples/LatitudeSample/.svn/prop-base/buildStripHeaders.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/GTL/Examples/LatitudeSample/.svn/prop-base/buildStripHeaders.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/GTL/Examples/LatitudeSample/.svn/text-base/Info.plist.svn-base b/GTL/Examples/LatitudeSample/.svn/text-base/Info.plist.svn-base new file mode 100644 index 0000000..10540ef --- /dev/null +++ b/GTL/Examples/LatitudeSample/.svn/text-base/Info.plist.svn-base @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.example.LatitudeSample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/GTL/Examples/LatitudeSample/.svn/text-base/LatitudeSampleAppController.h.svn-base b/GTL/Examples/LatitudeSample/.svn/text-base/LatitudeSampleAppController.h.svn-base new file mode 100644 index 0000000..1f3eaed --- /dev/null +++ b/GTL/Examples/LatitudeSample/.svn/text-base/LatitudeSampleAppController.h.svn-base @@ -0,0 +1,23 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// LatitudeSampleAppController.h +// + +#import + +@interface LatitudeSampleAppController : NSObject +@end diff --git a/GTL/Examples/LatitudeSample/.svn/text-base/LatitudeSampleAppController.m.svn-base b/GTL/Examples/LatitudeSample/.svn/text-base/LatitudeSampleAppController.m.svn-base new file mode 100644 index 0000000..1e50ef1 --- /dev/null +++ b/GTL/Examples/LatitudeSample/.svn/text-base/LatitudeSampleAppController.m.svn-base @@ -0,0 +1,37 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// LatitudeSampleAppController.m +// + +#import "LatitudeSampleAppController.h" +#import "LatitudeSampleWindowController.h" + +@implementation LatitudeSampleAppController + +- (void)applicationWillFinishLaunching:(NSNotification *)notification { + + LatitudeSampleWindowController* windowController + = [LatitudeSampleWindowController sharedWindowController]; + [windowController showWindow:self]; + +} + +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { + return YES; +} + +@end diff --git a/GTL/Examples/LatitudeSample/.svn/text-base/LatitudeSampleWindowController.h.svn-base b/GTL/Examples/LatitudeSample/.svn/text-base/LatitudeSampleWindowController.h.svn-base new file mode 100644 index 0000000..fda19ab --- /dev/null +++ b/GTL/Examples/LatitudeSample/.svn/text-base/LatitudeSampleWindowController.h.svn-base @@ -0,0 +1,83 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// LatitudeSampleWindowController.h +// + +#import +#import + +#import "GTLLatitude.h" + +@interface LatitudeSampleWindowController : NSWindowController { + @private + IBOutlet NSTextField *signedInField_; + IBOutlet NSButton *signedInButton_; + + IBOutlet NSMatrix *timeMatrix_; + IBOutlet NSMatrix *granularityMatrix_; + + IBOutlet NSTableView *locationsTable_; + IBOutlet NSProgressIndicator *locationsProgressIndicator_; + IBOutlet NSTextView *locationsResultTextField_; + IBOutlet NSButton *locationsCancelButton_; + + IBOutlet NSTextField *latitudeField_; + IBOutlet NSTextField *longitudeField_; + IBOutlet NSDatePicker *datePicker_; + + IBOutlet NSButton *addLocationButton_; + IBOutlet NSButton *updateLocationButton_; + IBOutlet NSButton *deleteLocationButton_; + + // client ID sheet + IBOutlet NSButton *clientIDButton_; + IBOutlet NSTextField *clientIDRequiredTextField_; + IBOutlet NSWindow *clientIDSheet_; + IBOutlet NSTextField *clientIDField_; + IBOutlet NSTextField *clientSecretField_; + + GTLLatitudeLocationFeed *locationsFeed_; + GTLServiceTicket *locationsTicket_; + NSError *locationsFetchError_; + + GTLServiceTicket *editLocationTicket_; +} + +@property (retain, nonatomic) GTLLatitudeLocationFeed *locationsFeed; +@property (retain, nonatomic) GTLServiceTicket *locationsTicket; +@property (retain, nonatomic) NSError *locationsFetchError; + +@property (retain, nonatomic) GTLServiceTicket *editLocationTicket; + ++ (LatitudeSampleWindowController *)sharedWindowController; + +- (IBAction)signInClicked:(id)sender; + +- (IBAction)getLocationsClicked:(id)sender; +- (IBAction)cancelLocationsFetchClicked:(id)sender; +- (IBAction)locationRadioButtonClicked:(id)sender; + +- (IBAction)addLocationClicked:(id)sender; +- (IBAction)updateLocationClicked:(id)sender; +- (IBAction)deleteLocationClicked:(id)sender; + +- (IBAction)clientIDClicked:(id)sender; +- (IBAction)clientIDDoneClicked:(id)sender; + +- (IBAction)APIConsoleClicked:(id)sender; +- (IBAction)loggingCheckboxClicked:(id)sender; +@end diff --git a/GTL/Examples/LatitudeSample/.svn/text-base/LatitudeSampleWindowController.m.svn-base b/GTL/Examples/LatitudeSample/.svn/text-base/LatitudeSampleWindowController.m.svn-base new file mode 100644 index 0000000..651e361 --- /dev/null +++ b/GTL/Examples/LatitudeSample/.svn/text-base/LatitudeSampleWindowController.m.svn-base @@ -0,0 +1,583 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// LatitudeSampleWindowController.m +// + +#import "LatitudeSampleWindowController.h" + +#import "GTL/GTMOAuth2WindowController.h" +#import "GTL/GTMHTTPFetcherLogging.h" + +@interface LatitudeSampleWindowController () + +@property (readonly) GTLServiceLatitude *latitudeService; + +- (void)updateUI; +- (void)displayAlert:(NSString *)title format:(NSString *)format, ...; + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel; +- (GTLLatitudeLocation *)selectedLocationItem; + +- (BOOL)isHistorySelected; +- (BOOL)isBestGranularitySelected; +- (void)setLocationForTimestamp:(NSString *)timestamp; + +- (void)fetchLocations; +- (void)deleteLocation; + +@end + +NSString *const kKeychainItemName = @"Latitude Sample: Google Latitude"; + +@implementation LatitudeSampleWindowController + +@synthesize locationsFeed = locationsFeed_, + locationsTicket = locationsTicket_, + locationsFetchError = locationsFetchError_, + editLocationTicket = editLocationTicket_; + ++ (LatitudeSampleWindowController *)sharedWindowController { + static LatitudeSampleWindowController* gWindowController = nil; + if (!gWindowController) { + gWindowController = [[LatitudeSampleWindowController alloc] init]; + } + return gWindowController; +} + + +- (id)init { + return [self initWithWindowNibName:@"LatitudeSampleWindow"]; +} + +- (void)awakeFromNib { + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + GTMOAuth2Authentication *auth; + auth = [GTMOAuth2WindowController authForGoogleFromKeychainForName:kKeychainItemName + clientID:clientID + clientSecret:clientSecret]; + [self.latitudeService setAuthorizer:auth]; + + // Set the result text fields to have a distinctive color and mono-spaced font + [locationsResultTextField_ setTextColor:[NSColor darkGrayColor]]; + + NSFont *resultTextFont = [NSFont fontWithName:@"Monaco" size:9]; + [locationsResultTextField_ setFont:resultTextFont]; + + [datePicker_ setDateValue:[NSDate date]]; + + // We'll try to use the location manager to initialize the latitude/logitude + // text fields to the current location + [self updateUI]; +} + +- (void)dealloc { + [locationsFeed_ release]; + [locationsTicket_ release]; + [locationsFetchError_ release]; + [editLocationTicket_ release]; + + [super dealloc]; +} + +#pragma mark - + +- (NSString *)signedInUsername { + // Get the email address of the signed-in user + GTLServiceLatitude *service = self.latitudeService; + GTMOAuth2Authentication *auth = [service authorizer]; + BOOL isSignedIn = [auth canAuthorize]; + if (isSignedIn) { + return [auth userEmail]; + } else { + return nil; + } +} + +- (BOOL)isSignedIn { + NSString *name = [self signedInUsername]; + return (name != nil); +} + +#pragma mark IBActions + ++ (NSString *)timestampForDate:(NSDate *)date { + NSTimeInterval seconds = [date timeIntervalSince1970]; + double millisecs = seconds * 1000.0; + unsigned long long val = (long long)millisecs; + NSString *str = [NSString stringWithFormat:@"%qu", val]; + return str; +} + ++ (NSDate *)dateForTimestamp:(NSString *)timestamp { + // the server returns timestamp as a string, milliseconds since the unix epoch + long long val = [timestamp longLongValue]; + NSTimeInterval seconds = (NSTimeInterval)val / 1000.0; + NSDate *date = [NSDate dateWithTimeIntervalSince1970:seconds]; + return date; +} + +- (IBAction)signInClicked:(id)sender { + if (![self isSignedIn]) { + // sign in + [self runSigninThenInvokeSelector:@selector(updateUI)]; + } else { + // sign out + GTLServiceLatitude *service = self.latitudeService; + + [GTMOAuth2WindowController removeAuthFromKeychainForName:kKeychainItemName]; + [service setAuthorizer:nil]; + [self updateUI]; + } +} + +- (IBAction)getLocationsClicked:(id)sender { + if (![self isSignedIn]) { + [self runSigninThenInvokeSelector:@selector(fetchLocations)]; + } else { + [self fetchLocations]; + } +} + +- (IBAction)cancelLocationsFetchClicked:(id)sender { + // cancel any location feed fetch + [self.locationsTicket cancelTicket]; + [self setLocationsTicket:nil]; + + // cancel if we're editing the location + [self.editLocationTicket cancelTicket]; + [self setEditLocationTicket:nil]; + + [self updateUI]; +} + +- (IBAction)locationRadioButtonClicked:(id)sender { + // enabled/disable buttons + [self updateUI]; +} + +- (IBAction)addLocationClicked:(id)sender { + [self setLocationForTimestamp:nil]; +} + +- (IBAction)updateLocationClicked:(id)sender { + BOOL isHistorySelected = [self isHistorySelected]; + if (isHistorySelected) { + // replace an existing location + GTLLatitudeLocation *location = [self selectedLocationItem]; + if (location) { + NSString *timestamp = [location timestampMs]; + [self setLocationForTimestamp:timestamp]; + } + } else { + // replace current location + [self setLocationForTimestamp:nil]; + } +} + +- (IBAction)deleteLocationClicked:(id)sender { + [self deleteLocation]; +} + +- (IBAction)APIConsoleClicked:(id)sender { + NSURL *url = [NSURL URLWithString:@"https://code.google.com/apis/console"]; + [[NSWorkspace sharedWorkspace] openURL:url]; +} + +- (IBAction)loggingCheckboxClicked:(id)sender { + [GTMHTTPFetcher setLoggingEnabled:[sender state]]; +} + +#pragma mark - + +// get a service object with the current username/password +// +// A "service" object handles networking tasks. Service objects +// contain user authentication information as well as networking +// state information (such as cookies and the "last modified" date for +// fetched data.) + +- (GTLServiceLatitude *)latitudeService { + + static GTLServiceLatitude* service = nil; + + if (!service) { + service = [[GTLServiceLatitude alloc] init]; + + // have the service object fetch consecutive pages of the feed so we + // do not need to manually fetch them + service.shouldFetchNextPages = YES; + + // have the service object retry temporary error conditions automatically + service.retryEnabled = YES; + } + return service; +} + +// get the comment selected in the bottom list, or nil if non +- (GTLLatitudeLocation *)selectedLocationItem { + int rowIndex = [locationsTable_ selectedRow]; + if (rowIndex > -1) { + GTLLatitudeLocation *item = [self.locationsFeed.items objectAtIndex:rowIndex]; + return item; + } + return nil; +} + +#pragma mark Fetch the locations feed + +- (BOOL)isHistorySelected { + int timeTag = [[timeMatrix_ selectedCell] tag]; + BOOL isHistoryRequest = (timeTag == 0); + return isHistoryRequest; +} + +- (BOOL)isBestGranularitySelected { + int granularityTag = [[granularityMatrix_ selectedCell] tag]; + BOOL isBest = (granularityTag == 1); + return isBest; +} + +// begin retrieving the feed +- (void)fetchLocations { + + self.locationsFeed = nil; + self.locationsFetchError = nil; + + GTLQueryLatitude *query; + if ([self isHistorySelected]) { + query = [GTLQueryLatitude queryForLocationList]; + } else { + query = [GTLQueryLatitude queryForCurrentLocationGet]; + } + + NSString *granularity; + if ([self isBestGranularitySelected]) { + granularity = kGTLLatitudeGranularityBest; + } else { + granularity = kGTLLatitudeGranularityCity; + } + [query setGranularity:granularity]; + + GTLServiceLatitude *service = self.latitudeService; + self.locationsTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id object, NSError *error) { + // callback + GTLLatitudeLocationFeed *feed; + + if ([object isKindOfClass:[GTLLatitudeLocation class]]) { + // we fetched the current location, which is an item rather than a feed; + // we'll create a feed around the item + feed = [[[GTLLatitudeLocationFeed alloc] init] autorelease]; + feed.items = [NSMutableArray arrayWithObject:object]; + } else { + // we fetched a feed + feed = (GTLLatitudeLocationFeed *)object; + } + + self.locationsFeed = feed; + self.locationsFetchError = error; + self.locationsTicket = nil; + + [self updateUI]; + }]; + [self updateUI]; +} + +#pragma mark Add or Update a location + +- (void)setLocationForTimestamp:(NSString *)timestamp { + // set a location item with the latitude and longitude and, for + // inserting into the location history, the date set in the picker + // + // if timestamp is specified, it replaces any existing location with that + // timestamp + NSString *lat = [latitudeField_ stringValue]; + NSString *lng = [longitudeField_ stringValue]; + + NSDecimalNumber *latNum = [NSDecimalNumber decimalNumberWithString:lat]; + NSDecimalNumber *lngNum = [NSDecimalNumber decimalNumberWithString:lng]; + + GTLLatitudeLocation *newLocation = [GTLLatitudeLocation object]; + newLocation.latitude = latNum; + newLocation.longitude = lngNum; + + GTLQueryLatitude *query; + BOOL isHistorySelected = [self isHistorySelected]; + if (isHistorySelected) { + + if ([timestamp length] > 0) { + // replacing a previous location + [newLocation setTimestampMs:timestamp]; + } else { + // adding a new location to the history + NSDate *date = [datePicker_ dateValue]; + newLocation.timestampMs = [[self class] timestampForDate:date]; + } + query = [GTLQueryLatitude queryForLocationInsertWithObject:newLocation]; + } else { + // replacing current location + query = [GTLQueryLatitude queryForCurrentLocationInsertWithObject:newLocation]; + } + + // even though replacing a location should logically be done with an http + // PUT to update the item, the Latitude API relies on POST for both + // insert and update + GTLServiceLatitude *service = self.latitudeService; + self.editLocationTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id object, NSError *error) { + // callback + self.editLocationTicket = nil; + + GTLLatitudeLocation *item = object; + if (error == nil) { + [self displayAlert:@"Location Set" + format:@"Set location %@,%@ for date %@", + item.latitude, item.longitude, + [[self class] dateForTimestamp:item.timestampMs]]; + + [self fetchLocations]; + } else { + [self displayAlert:@"Set Location Error" + format:@"%@", error]; + [self updateUI]; + } + + }]; + [self updateUI]; +} + +#pragma mark Delete Location from History + +- (void)deleteLocation { + GTLQueryLatitude *query = nil; + BOOL isHistorySelected = [self isHistorySelected]; + if (isHistorySelected) { + // delete the selected location + GTLLatitudeLocation *selectedLocation = [self selectedLocationItem]; + if (selectedLocation) { + query = [GTLQueryLatitude queryForLocationDeleteWithLocationId:selectedLocation.timestampMs]; + } + } else { + // delete the current location + query = [GTLQueryLatitude queryForCurrentLocationDelete]; + } + + if (query) { + GTLServiceLatitude *service = self.latitudeService; + self.editLocationTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id object, NSError *error) { + // callback + self.editLocationTicket = nil; + + if (error == nil) { + [self displayAlert:@"Location Deleted" + format:@"Deleted location"]; + [self fetchLocations]; + } else { + [self displayAlert:@"Delete Location Error" + format:@"%@", error]; + [self updateUI]; + } + + }]; + [self updateUI]; + } +} + +#pragma mark - + +#pragma mark Client ID and Client Secret Sheet + +// Sample apps need this sheet to ask for the client ID and client secret +// strings +// +// Your application will just hardcode the client ID and client secret strings +// into the source rather than ask the user for them. +// +// The string values are obtained from the API Console, +// https://code.google.com/apis/console +// + +- (IBAction)clientIDClicked:(id)sender { + // show the sheet for developers to enter client ID and client secret + [NSApp beginSheet:clientIDSheet_ + modalForWindow:[self window] + modalDelegate:self + didEndSelector:@selector(clientIDSheetDidEnd:returnCode:contextInfo:) + contextInfo:NULL]; +} + +- (IBAction)clientIDDoneClicked:(id)sender { + [NSApp endSheet:clientIDSheet_ + returnCode:NSOKButton]; +} + +- (void)clientIDSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { + [sheet orderOut:self]; + [self updateUI]; +} + +#pragma mark Sign In + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel { + NSString *scope = [GTMOAuth2Authentication scopeWithStrings: + kGTLAuthScopeLatitudeAllBest, + kGTLAuthScopeLatitudeCurrentBest, + nil]; + + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + if ([clientID length] == 0 || [clientSecret length] == 0) { + // remind the developer that client ID and client secret are needed + [clientIDButton_ performSelector:@selector(performClick:) + withObject:self + afterDelay:0.5]; + return; + } + + NSBundle *frameworkBundle = [NSBundle bundleForClass:[GTMOAuth2WindowController class]]; + GTMOAuth2WindowController *windowController; + windowController = [GTMOAuth2WindowController controllerWithScope:scope + clientID:clientID + clientSecret:clientSecret + keychainItemName:kKeychainItemName + resourceBundle:frameworkBundle]; + + [windowController signInSheetModalForWindow:[self window] + completionHandler:^(GTMOAuth2Authentication *auth, + NSError *error) { + // callback + if (error == nil) { + self.latitudeService.authorizer = auth; + if (signInDoneSel) { + [self performSelector:signInDoneSel]; + } + } else { + self.locationsFetchError = error; + [self updateUI]; + } + }]; +} + +#pragma mark UI + +- (void)updateUI { + BOOL isSignedIn = [self isSignedIn]; + NSString *username = [self signedInUsername]; + [signedInButton_ setTitle:(isSignedIn ? @"Sign Out" : @"Sign In")]; + [signedInField_ setStringValue:(isSignedIn ? username : @"No")]; + + // locations table + [locationsTable_ reloadData]; + + if ([self locationsTicket] != nil || [self editLocationTicket] != nil) { + [locationsProgressIndicator_ startAnimation:self]; + [locationsCancelButton_ setEnabled:YES]; + } else { + [locationsProgressIndicator_ stopAnimation:self]; + [locationsCancelButton_ setEnabled:NO]; + } + + GTLLatitudeLocation *selectedLocation = [self selectedLocationItem]; + NSString *resultStr = @""; + NSError *fetchError = self.locationsFetchError; + if (fetchError != nil) { + resultStr = [fetchError description]; + // also display any server error data present + NSData *errData = [[fetchError userInfo] objectForKey:kGTMHTTPFetcherStatusDataKey]; + if (errData) { + NSString *dataStr = [[[NSString alloc] initWithData:errData + encoding:NSUTF8StringEncoding] autorelease]; + resultStr = [resultStr stringByAppendingFormat:@"\n%@", dataStr]; + } + } else { + if (selectedLocation) { + resultStr = [selectedLocation description]; + } + } + [locationsResultTextField_ setString:resultStr]; + + // enable buttons + BOOL hasLatitude = ([[latitudeField_ stringValue] length] > 0); + BOOL hasLongitude = ([[longitudeField_ stringValue] length] > 0); + BOOL hasLatLong = (hasLatitude && hasLongitude); + BOOL hasSelectedLocation = (selectedLocation != nil); + BOOL isHistorySelected = [self isHistorySelected]; + + [addLocationButton_ setEnabled:(hasLatLong && isHistorySelected)]; + [updateLocationButton_ setEnabled:((hasSelectedLocation || !isHistorySelected) + && hasLatLong)]; + [deleteLocationButton_ setEnabled:hasSelectedLocation]; + + [datePicker_ setEnabled:isHistorySelected]; + + // show or hide the text indicating that the client ID or client secret are + // needed + BOOL hasClientIDStrings = [[clientIDField_ stringValue] length] > 0 + && [[clientSecretField_ stringValue] length] > 0; + [clientIDRequiredTextField_ setHidden:hasClientIDStrings]; +} + +- (void)displayAlert:(NSString *)title format:(NSString *)format, ... { + NSString *result = format; + if (format) { + va_list argList; + va_start(argList, format); + result = [[[NSString alloc] initWithFormat:format + arguments:argList] autorelease]; + va_end(argList); + } + NSBeginAlertSheet(title, nil, nil, nil, [self window], nil, nil, + nil, nil, @"%@", result); +} + +#pragma mark Text field delegate methods + +- (void)controlTextDidChange:(NSNotification *)note { + [self updateUI]; // enabled/disable buttons +} + +#pragma mark TableView delegate and data source methods + +- (void)tableViewSelectionDidChange:(NSNotification *)notification { + [self updateUI]; +} + +// table view data source methods +- (int)numberOfRowsInTableView:(NSTableView *)tableView { + return [self.locationsFeed.items count]; +} + +- (id)tableView:(NSTableView *)tableView +objectValueForTableColumn:(NSTableColumn *)tableColumn + row:(int)row { + // make a string with the location date and lat/long + NSArray *items = self.locationsFeed.items; + GTLLatitudeLocation *location = [items objectAtIndex:row]; + NSDate *date = [[self class] dateForTimestamp:location.timestampMs]; + NSString *resultStr = [NSString stringWithFormat:@"%@ (%@, %@)", + date, location.latitude, location.longitude]; + return resultStr; +} + +@end diff --git a/GTL/Examples/LatitudeSample/.svn/text-base/README.txt.svn-base b/GTL/Examples/LatitudeSample/.svn/text-base/README.txt.svn-base new file mode 100644 index 0000000..ff257a0 --- /dev/null +++ b/GTL/Examples/LatitudeSample/.svn/text-base/README.txt.svn-base @@ -0,0 +1 @@ +This sample should automatically build and copy over the GTL.framework as part of the build-and-run process. diff --git a/GTL/Examples/LatitudeSample/.svn/text-base/buildStripHeaders.svn-base b/GTL/Examples/LatitudeSample/.svn/text-base/buildStripHeaders.svn-base new file mode 100644 index 0000000..0238ef2 --- /dev/null +++ b/GTL/Examples/LatitudeSample/.svn/text-base/buildStripHeaders.svn-base @@ -0,0 +1,17 @@ +#!/bin/sh +# +# buildStripHeaders +# +# Remove header files from the built copy of the framework inside our +# application. + +# Strip "*.h" files +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname '*.h' -delete + +# Strip "Headers" links +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type l -delete + +# Strip "Headers" directories +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type d -prune -delete + + diff --git a/GTL/Examples/LatitudeSample/.svn/text-base/main.m.svn-base b/GTL/Examples/LatitudeSample/.svn/text-base/main.m.svn-base new file mode 100644 index 0000000..3e35dea --- /dev/null +++ b/GTL/Examples/LatitudeSample/.svn/text-base/main.m.svn-base @@ -0,0 +1,25 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// main.m +// + +#import + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **) argv); +} diff --git a/GTL/Examples/LatitudeSample/English.lproj/.svn/all-wcprops b/GTL/Examples/LatitudeSample/English.lproj/.svn/all-wcprops new file mode 100644 index 0000000..84963f2 --- /dev/null +++ b/GTL/Examples/LatitudeSample/English.lproj/.svn/all-wcprops @@ -0,0 +1,23 @@ +K 25 +svn:wc:ra_dav:version-url +V 61 +/svn/!svn/ver/154/trunk/Examples/LatitudeSample/English.lproj +END +InfoPlist.strings +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/29/trunk/Examples/LatitudeSample/English.lproj/InfoPlist.strings +END +LatitudeSampleWindow.xib +K 25 +svn:wc:ra_dav:version-url +V 86 +/svn/!svn/ver/154/trunk/Examples/LatitudeSample/English.lproj/LatitudeSampleWindow.xib +END +MainMenu.xib +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/!svn/ver/29/trunk/Examples/LatitudeSample/English.lproj/MainMenu.xib +END diff --git a/GTL/Examples/LatitudeSample/English.lproj/.svn/entries b/GTL/Examples/LatitudeSample/English.lproj/.svn/entries new file mode 100644 index 0000000..ff75416 --- /dev/null +++ b/GTL/Examples/LatitudeSample/English.lproj/.svn/entries @@ -0,0 +1,130 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/LatitudeSample/English.lproj +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +InfoPlist.strings +file + + + + +2012-12-09T08:42:34.000000Z +ecc3ab83055be89e5e7e5417516fd6f8 +2011-08-23T19:15:08.363770Z +29 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +95 + +LatitudeSampleWindow.xib +file + + + + +2012-12-09T08:42:34.000000Z +7f26969fcd0c77626f66ab11641f0865 +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +128126 + +MainMenu.xib +file + + + + +2012-12-09T08:42:34.000000Z +aef4b2c4d3545e6e2c9199443ad047e0 +2011-08-23T19:15:08.363770Z +29 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +98433 + diff --git a/GTL/Examples/LatitudeSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base b/GTL/Examples/LatitudeSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base new file mode 100644 index 0000000..152e52c --- /dev/null +++ b/GTL/Examples/LatitudeSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "© Google Inc. 2010"; diff --git a/GTL/Examples/LatitudeSample/English.lproj/.svn/text-base/LatitudeSampleWindow.xib.svn-base b/GTL/Examples/LatitudeSample/English.lproj/.svn/text-base/LatitudeSampleWindow.xib.svn-base new file mode 100644 index 0000000..c9d25db --- /dev/null +++ b/GTL/Examples/LatitudeSample/English.lproj/.svn/text-base/LatitudeSampleWindow.xib.svn-base @@ -0,0 +1,2754 @@ + + + + 1070 + 11D50b + 2182 + 1138.32 + 568.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2182 + + + YES + NSTableColumn + NSDatePicker + NSScroller + NSSplitView + NSButton + NSDatePickerCell + NSTextFieldCell + NSButtonCell + NSScrollView + NSProgressIndicator + NSTableView + NSMatrix + NSCustomObject + NSTextView + NSView + NSWindowTemplate + NSTextField + NSUserDefaultsController + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + LatitudeSampleWindowController + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{64, 404}, {567, 429}} + 1886912512 + Sample App + + NSWindow + + + View + + + {568, 337} + + + 256 + + YES + + + 265 + {{401, 317}, {152, 32}} + + + YES + + 67239424 + 134217728 + Get Locations List + + LucidaGrande + 13 + 1044 + + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + + 264 + {{20, 276}, {162, 17}} + + + YES + + 67239424 + 272629760 + Locations - select one + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 1289 + + {{469, 278}, {16, 16}} + + + 28938 + 100 + + + + 265 + {{492, 277}, {54, 16}} + + + YES + + 67239424 + 134479872 + Cancel + + LucidaGrande + 9 + 3614 + + + -2038284033 + 1 + + LucidaGrande + 9 + 16 + + + + + + 200 + 25 + + + + + 289 + {{421, 18}, {128, 18}} + + + YES + + 67239424 + 131072 + Log http to desktop + + LucidaGrande + 11 + 3100 + + + 1211912703 + 2 + + NSSwitch + + + + 200 + 25 + + + + + 264 + {{91, 359}, {71, 17}} + + + YES + + 67239424 + 272629760 + Signed In: + + + + + + + + + 266 + {{164, 359}, {373, 17}} + + + YES + + 67239424 + 272629760 + No + + + + + + + + + 268 + {{20, 352}, {72, 28}} + + + YES + + 67239424 + 134348800 + Sign Out + + + -2038284033 + 129 + + + 200 + 25 + + + + + 268 + {{20, 305}, {73, 38}} + + + YES + 2 + 1 + + YES + + -2080244224 + 131072 + Current + + + 1 + 1211912703 + 0 + + NSRadioButton + + + + 200 + 25 + + + 67239424 + 131072 + Historical + + + 1211912703 + 0 + + 549453824 + {18, 18} + + YES + + YES + + + + TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw +IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/ +29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5 +dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA +AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG +AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/ +0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/ +7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/ +5eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/ +3t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD +AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns +AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/ +6+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/ +/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/ +///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl +YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA +AAAAAAAAAAUAAAAfAAAAZTMzM8KAgIDwv7+//O3t7f/t7e3/v7+//ICAgPAzMzPCAAAAZQAAAB8AAAAF +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAFwAAAEMAAAB3AAAAnwAAALMAAACzAAAAnwAAAHcAAABD +AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu +AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgEAAAMAAAABABIAAAEB +AAMAAAABABIAAAECAAMAAAAEAAAFxgEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES +AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS +AAMAAAABAAEAAAFTAAMAAAAEAAAFzodzAAcAAAwYAAAF1gAAAAAACAAIAAgACAABAAEAAQABAAAMGGFw +cGwCAAAAbW50clJHQiBYWVogB9YABAADABMALAASYWNzcEFQUEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAPbWAAEAAAAA0y1hcHBsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAOclhZWgAAASwAAAAUZ1hZWgAAAUAAAAAUYlhZWgAAAVQAAAAUd3RwdAAAAWgAAAAUY2hhZAAA +AXwAAAAsclRSQwAAAagAAAAOZ1RSQwAAAbgAAAAOYlRSQwAAAcgAAAAOdmNndAAAAdgAAAMSbmRpbgAA +BOwAAAY+ZGVzYwAACywAAABkZHNjbQAAC5AAAAAubW1vZAAAC8AAAAAoY3BydAAAC+gAAAAtWFlaIAAA +AAAAAF1KAAA0kQAACCVYWVogAAAAAAAAdCAAALRgAAAjPVhZWiAAAAAAAAAlbAAAFyoAAKfDWFlaIAAA +AAAAAPNSAAEAAAABFs9zZjMyAAAAAAABDEIAAAXe///zJgAAB5IAAP2R///7ov///aMAAAPcAADAbGN1 +cnYAAAAAAAAAAQHNAABjdXJ2AAAAAAAAAAEBzQAAY3VydgAAAAAAAAABAc0AAHZjZ3QAAAAAAAAAAAAD +AQAAAQACBAUGBwkKCw0ODxASExQWFxgaGxweHyAiIyQmJygpKywtLzAxMjM1Njc4OTs8PT5AQUJDREZH +SElKS0xOT1BRUlNUVVZXWFlaW1xdXl9hYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gIGCg4SF +hoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnZ6foKGio6SlpqanqKmqq6ytra6vsLGysrO0tba3uLi5uru8 +vL2+v8DBwcLDxMXGxsfIycrKy8zNzs7P0NHS0tPU1dbW19jZ2drb3Nzd3t/g4eLi4+Tl5ufo6enq6+zt +7u/w8fHy8/T19vf4+fr7/P3+/v8AAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR8gISIjJCUnKCkq +Ky0uLzAxMzQ1Njc4OTo7PD0/QEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaWltcXV5fYGFiY2RlZmdo +aWprbG1ub3BxcnN0dXZ3d3h5ent8fH1+f4CBgoKDhIWGh4iIiYqLjI2Oj5CRkpOUlJWWl5iZmpucnZ2e +n6ChoqOkpaamp6ipqqusra6vsLCxsrO0tba3uLm5uru8vb6/wMHCw8TFx8jJysvMzc7P0NDR0tPU1dbX +2Nna29ze3+Dh4uPk5ebn6err7O3u7/Hy8/T19vf5+vv8/f7/AAIDAwQFBgcICQoKCwwNDg8QERITFBUW +FxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODg5Ojs8PT4+P0BBQkNDREVGR0hJSUpLTE1O +Tk9QUVJSU1RVVVZXWFhZWltbXF1eXl9gYWFiY2RkZWZnZ2hpaWprbGxtbm5vcHFxcnNzdHV1dnd4eHl6 +ent8fH1+fn+AgYGCg4SEhYaHiImJiouMjY6Oj5CRkpOTlJWWl5iZmZqbnJ2en6ChoqOkpaanqKmqq6yt +rq+xsrO0tba3uLq7vL2+wMHDxMbHycrMzs/R0tTW19nb3d7g4uTm6Ors7vDy9Pb4+vz+/wAAbmRpbgAA +AAAAAAY2AACXGgAAVjoAAFPKAACJ3gAAJ8IAABaoAABQDQAAVDkAAiuFAAIZmQABeFEAAwEAAAIAAAAA +AAEABgANABcAIwAxAEAAUgBlAHsAkwCrAMUA4gD/AR8BPwFhAYUBqgHQAfgCIAJLAncCpQLSAwIDMwNl +A5gDzgQFBD0EdQSvBOsFKQVnBacF6AYqBm4GtQb8B0UHkgfkCDkIkAjnCT4JmAn0ClAKrQsLC2sLygwq +DIwM8Q1XDcAOKA6SDv4PbA/bEE0QxBE7EbQSMRKwEzITuRREFNAVYBXxFocXHhfAGGIZBBmsGlQa+RuU +HC4czh1yHhQeux9jIA0gvCFoIhkizyOJJEEk+SW6JnknOygFKMspkypiKzIsASzXLawuhy9gMD4xGzH8 +MtszvzSgNYY2cjdcOEw5OTorOxs8CD0EPfU+6z/nQOFB2ELUQ9VE00XcRttH5EjxSgBLCUwdTTFOUE9v +UI9Rt1LdVAVVNlZsV6VY4FohW21ct135X09goGH0Y0tkqGYFZ19oxGova5ptCG54b/BxbnLsdG119Xd/ +eQh6knwqfcV/W4D4gpSEO4Xih4CJKorYjIqOOY/jkZuTWJUOlsyYiZpSnB6d4Z+soX+jWqUvpxOo+6rj +rMuuwLC4sra0rra0uL+60LzfvwDBHcLdxLXGhchYyi7MCs3lz7rRmtOA1WPXR9kq2xPc/97s4M/iveSn +5o3obupT7ELuLPAM8fLz0PW396H5f/tZ/T3//wAAAAEAAwALABYAJQA3AE0AZQCBAJ8AwQDlAQsBNQFh +AZABwQH1AisCZAKfAtwDHANfA6MD6gQ0BH8EzQT1BR0FcAXEBhsGdAbPBy0HXAeMB+4IUgi4CSAJVAmK +CfYKZArVC0cLgQu8DDIMqw0mDaIOIQ6hDyQPqRAvELgQ/RFDEc8SXRLuE4AUFRSrFUMV3RZ5FxcXthhY +GPwZoRpIGvEbnBxJHPgdqB5bHw8fxSB9ITch8iKwJDAk8yW3Jn4nRigQKNwpqSp5K0osHCzxLccuoC95 +MFUxMzISMvMz1TS5NaA2hzdxOFw5STo4Oyg8Gj4DPvs/9EDuQepD6ETpRexG8Uf3SP9LFEwhTTBOQE9S +UGZSklOrVMVV4Vb/WB5ZP1phW4Vcq13SXvthUmJ/Y69k4GYSZ0dofGm0au1tZG6ib+FxInJlc6l073Y2 +d396FXtjfLJ+A39VgKmB/4NWhK+GCYjCiiGLgYzjjkePrJESknuT5Ja8mCuZm5sMnH+d9J9qoOGiWqPV +pVGmz6eOqE6pzqtRrNSuWq/gsWmy8rR+tgu5Kbq6vE294b93wQ7Cp8RBxd3He8kZyrrLisxbzf/Po9FK +0vHUm9ZF1/HZn9tO3Cbc/96x4GTiGePQ5YjnQegf6Pzquex27jbv9/G583z0X/VC9wj40Pqa/GX+Mf// +AAAAAQADAAsAJQA3AE0AZQCBAJ8AwQELATUBYQGQAcEB9QIrAmQCnwLcAxwDXwOjA+oENAR/BM0FHQVw +BcQGGwZ0Bs8HLQeMB+4IUgi4CSAJign2CmQK1QtHC7wMMgyrDSYNog4hDqEPJA+pEC8QuBFDEl0S7hOA +FBUUqxVDFnkXFxe2GFgY/BpIGvEbnBxJHPgdqB8PH8UgfSE3IfIjbyQwJPMltydGKBAo3Cp5K0osHC3H +LqAveTEzMhIy8zS5NaA2hzhcOUk6ODwaPQ4+Az/0QO5C6EPoROlG8Uf3SglLFEwhTkBPUlF7UpJUxVXh +Vv9ZP1phXKtd0mAlYVJjr2TgZhJofGm0au1tZG6ib+FxInJldO92Nnd/eMl6FXyyfgN/VYCpgf+Er4YJ +h2WIwoohi4GOR4+skRKSe5PklVCWvJgrmZubDJx/nfSfaqDholqj1aVRps+oTqnOq1Gs1K2Xrlqv4LFp +svK0frYLt5m5Kbnxurq8Tb3hv3fBDsHawqfEQcUPxd3He8hKyRnKusuKzFvN/87Rz6PQdtFK0vHTxtSb +1kXXG9fx2MjZn9tO3Cbc/93Y3rHfiuBk4hni9ePQ5KzliOZk50HoH+j86drqueuX7HbtVu427xbv9/DX +8bnymvN89F/1QvYl9wj37PjQ+bX6mvt//GX9S/4x//8AAGRlc2MAAAAAAAAACkNvbG9yIExDRAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAABIAAAAcAEMAbwBsAG8AcgAgAEwAQwBE +AABtbW9kAAAAAAAABhAAAJxOAAAAAL5zkQAAAAAAAAAAAAAAAAAAAAAAdGV4dAAAAABDb3B5cmlnaHQg +QXBwbGUgQ29tcHV0ZXIsIEluYy4sIDIwMDUAAAAAA + + + + + + 3 + MCAwAA + + + + 400 + 75 + + + {73, 18} + {4, 2} + 1168646144 + NSActionCell + + 67239424 + 131072 + Radio + + 1211912703 + 0 + + 549453824 + {18, 18} + + YES + + YES + + + + TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw +IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/ +29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5 +dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA +AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG +AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/ +0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/ +7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/ +5eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/ +3t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD +AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns +AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/ +6+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/ +/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/ +///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl +YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA +AAAAAAAAAAUAAAAfAAAAZTMzM8KAgIDwv7+//O3t7f/t7e3/v7+//ICAgPAzMzPCAAAAZQAAAB8AAAAF +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAFwAAAEMAAAB3AAAAnwAAALMAAACzAAAAnwAAAHcAAABD +AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu +AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQEAAAMAAAABABIAAAEB +AAMAAAABABIAAAECAAMAAAAEAAAFugEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES +AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS +AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA + + + + + + + + 400 + 75 + + + + + 3 + MQA + + + + + + 268 + {{101, 305}, {107, 38}} + + + YES + 2 + 1 + + YES + + -2080244224 + 131072 + Best Granularity + + + 1 + 1211912703 + 0 + + + + 200 + 25 + + + 67239424 + 131072 + City + + + 1211912703 + 0 + + 549453824 + {18, 18} + + YES + + YES + + + + TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw +IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/ +29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5 +dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA +AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG +AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/ +0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/ +7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/ +5eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/ +3t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD +AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns +AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/ +6+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/ +/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/ +///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl +YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA +AAAAAAAAAAUAAAAfAAAAZTMzM8KAgIDwv7+//O3t7f/t7e3/v7+//ICAgPAzMzPCAAAAZQAAAB8AAAAF +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAFwAAAEMAAAB3AAAAnwAAALMAAACzAAAAnwAAAHcAAABD +AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu +AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgEAAAMAAAABABIAAAEB +AAMAAAABABIAAAECAAMAAAAEAAAFxgEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES +AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS +AAMAAAABAAEAAAFTAAMAAAAEAAAFzodzAAcAAAwYAAAF1gAAAAAACAAIAAgACAABAAEAAQABAAAMGGFw +cGwCAAAAbW50clJHQiBYWVogB9YABAADABMALAASYWNzcEFQUEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAPbWAAEAAAAA0y1hcHBsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAOclhZWgAAASwAAAAUZ1hZWgAAAUAAAAAUYlhZWgAAAVQAAAAUd3RwdAAAAWgAAAAUY2hhZAAA +AXwAAAAsclRSQwAAAagAAAAOZ1RSQwAAAbgAAAAOYlRSQwAAAcgAAAAOdmNndAAAAdgAAAMSbmRpbgAA +BOwAAAY+ZGVzYwAACywAAABkZHNjbQAAC5AAAAAubW1vZAAAC8AAAAAoY3BydAAAC+gAAAAtWFlaIAAA +AAAAAF1KAAA0kQAACCVYWVogAAAAAAAAdCAAALRgAAAjPVhZWiAAAAAAAAAlbAAAFyoAAKfDWFlaIAAA +AAAAAPNSAAEAAAABFs9zZjMyAAAAAAABDEIAAAXe///zJgAAB5IAAP2R///7ov///aMAAAPcAADAbGN1 +cnYAAAAAAAAAAQHNAABjdXJ2AAAAAAAAAAEBzQAAY3VydgAAAAAAAAABAc0AAHZjZ3QAAAAAAAAAAAAD +AQAAAQACBAUGBwkKCw0ODxASExQWFxgaGxweHyAiIyQmJygpKywtLzAxMjM1Njc4OTs8PT5AQUJDREZH +SElKS0xOT1BRUlNUVVZXWFlaW1xdXl9hYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gIGCg4SF +hoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnZ6foKGio6SlpqanqKmqq6ytra6vsLGysrO0tba3uLi5uru8 +vL2+v8DBwcLDxMXGxsfIycrKy8zNzs7P0NHS0tPU1dbW19jZ2drb3Nzd3t/g4eLi4+Tl5ufo6enq6+zt +7u/w8fHy8/T19vf4+fr7/P3+/v8AAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR8gISIjJCUnKCkq +Ky0uLzAxMzQ1Njc4OTo7PD0/QEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaWltcXV5fYGFiY2RlZmdo +aWprbG1ub3BxcnN0dXZ3d3h5ent8fH1+f4CBgoKDhIWGh4iIiYqLjI2Oj5CRkpOUlJWWl5iZmpucnZ2e +n6ChoqOkpaamp6ipqqusra6vsLCxsrO0tba3uLm5uru8vb6/wMHCw8TFx8jJysvMzc7P0NDR0tPU1dbX +2Nna29ze3+Dh4uPk5ebn6err7O3u7/Hy8/T19vf5+vv8/f7/AAIDAwQFBgcICQoKCwwNDg8QERITFBUW +FxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODg5Ojs8PT4+P0BBQkNDREVGR0hJSUpLTE1O +Tk9QUVJSU1RVVVZXWFhZWltbXF1eXl9gYWFiY2RkZWZnZ2hpaWprbGxtbm5vcHFxcnNzdHV1dnd4eHl6 +ent8fH1+fn+AgYGCg4SEhYaHiImJiouMjY6Oj5CRkpOTlJWWl5iZmZqbnJ2en6ChoqOkpaanqKmqq6yt +rq+xsrO0tba3uLq7vL2+wMHDxMbHycrMzs/R0tTW19nb3d7g4uTm6Ors7vDy9Pb4+vz+/wAAbmRpbgAA +AAAAAAY2AACXGgAAVjoAAFPKAACJ3gAAJ8IAABaoAABQDQAAVDkAAiuFAAIZmQABeFEAAwEAAAIAAAAA +AAEABgANABcAIwAxAEAAUgBlAHsAkwCrAMUA4gD/AR8BPwFhAYUBqgHQAfgCIAJLAncCpQLSAwIDMwNl +A5gDzgQFBD0EdQSvBOsFKQVnBacF6AYqBm4GtQb8B0UHkgfkCDkIkAjnCT4JmAn0ClAKrQsLC2sLygwq +DIwM8Q1XDcAOKA6SDv4PbA/bEE0QxBE7EbQSMRKwEzITuRREFNAVYBXxFocXHhfAGGIZBBmsGlQa+RuU +HC4czh1yHhQeux9jIA0gvCFoIhkizyOJJEEk+SW6JnknOygFKMspkypiKzIsASzXLawuhy9gMD4xGzH8 +MtszvzSgNYY2cjdcOEw5OTorOxs8CD0EPfU+6z/nQOFB2ELUQ9VE00XcRttH5EjxSgBLCUwdTTFOUE9v +UI9Rt1LdVAVVNlZsV6VY4FohW21ct135X09goGH0Y0tkqGYFZ19oxGova5ptCG54b/BxbnLsdG119Xd/ +eQh6knwqfcV/W4D4gpSEO4Xih4CJKorYjIqOOY/jkZuTWJUOlsyYiZpSnB6d4Z+soX+jWqUvpxOo+6rj +rMuuwLC4sra0rra0uL+60LzfvwDBHcLdxLXGhchYyi7MCs3lz7rRmtOA1WPXR9kq2xPc/97s4M/iveSn +5o3obupT7ELuLPAM8fLz0PW396H5f/tZ/T3//wAAAAEAAwALABYAJQA3AE0AZQCBAJ8AwQDlAQsBNQFh +AZABwQH1AisCZAKfAtwDHANfA6MD6gQ0BH8EzQT1BR0FcAXEBhsGdAbPBy0HXAeMB+4IUgi4CSAJVAmK +CfYKZArVC0cLgQu8DDIMqw0mDaIOIQ6hDyQPqRAvELgQ/RFDEc8SXRLuE4AUFRSrFUMV3RZ5FxcXthhY +GPwZoRpIGvEbnBxJHPgdqB5bHw8fxSB9ITch8iKwJDAk8yW3Jn4nRigQKNwpqSp5K0osHCzxLccuoC95 +MFUxMzISMvMz1TS5NaA2hzdxOFw5STo4Oyg8Gj4DPvs/9EDuQepD6ETpRexG8Uf3SP9LFEwhTTBOQE9S +UGZSklOrVMVV4Vb/WB5ZP1phW4Vcq13SXvthUmJ/Y69k4GYSZ0dofGm0au1tZG6ib+FxInJlc6l073Y2 +d396FXtjfLJ+A39VgKmB/4NWhK+GCYjCiiGLgYzjjkePrJESknuT5Ja8mCuZm5sMnH+d9J9qoOGiWqPV +pVGmz6eOqE6pzqtRrNSuWq/gsWmy8rR+tgu5Kbq6vE294b93wQ7Cp8RBxd3He8kZyrrLisxbzf/Po9FK +0vHUm9ZF1/HZn9tO3Cbc/96x4GTiGePQ5YjnQegf6Pzquex27jbv9/G583z0X/VC9wj40Pqa/GX+Mf// +AAAAAQADAAsAJQA3AE0AZQCBAJ8AwQELATUBYQGQAcEB9QIrAmQCnwLcAxwDXwOjA+oENAR/BM0FHQVw +BcQGGwZ0Bs8HLQeMB+4IUgi4CSAJign2CmQK1QtHC7wMMgyrDSYNog4hDqEPJA+pEC8QuBFDEl0S7hOA +FBUUqxVDFnkXFxe2GFgY/BpIGvEbnBxJHPgdqB8PH8UgfSE3IfIjbyQwJPMltydGKBAo3Cp5K0osHC3H +LqAveTEzMhIy8zS5NaA2hzhcOUk6ODwaPQ4+Az/0QO5C6EPoROlG8Uf3SglLFEwhTkBPUlF7UpJUxVXh +Vv9ZP1phXKtd0mAlYVJjr2TgZhJofGm0au1tZG6ib+FxInJldO92Nnd/eMl6FXyyfgN/VYCpgf+Er4YJ +h2WIwoohi4GOR4+skRKSe5PklVCWvJgrmZubDJx/nfSfaqDholqj1aVRps+oTqnOq1Gs1K2Xrlqv4LFp +svK0frYLt5m5Kbnxurq8Tb3hv3fBDsHawqfEQcUPxd3He8hKyRnKusuKzFvN/87Rz6PQdtFK0vHTxtSb +1kXXG9fx2MjZn9tO3Cbc/93Y3rHfiuBk4hni9ePQ5KzliOZk50HoH+j86drqueuX7HbtVu427xbv9/DX +8bnymvN89F/1QvYl9wj37PjQ+bX6mvt//GX9S/4x//8AAGRlc2MAAAAAAAAACkNvbG9yIExDRAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAABIAAAAcAEMAbwBsAG8AcgAgAEwAQwBE +AABtbW9kAAAAAAAABhAAAJxOAAAAAL5zkQAAAAAAAAAAAAAAAAAAAAAAdGV4dAAAAABDb3B5cmlnaHQg +QXBwbGUgQ29tcHV0ZXIsIEluYy4sIDIwMDUAAAAAA + + + + + + + + 400 + 75 + + + {107, 18} + {4, 2} + 1168646144 + NSActionCell + + 67239424 + 131072 + Radio + + 1211912703 + 0 + + 549453824 + {18, 18} + + YES + + YES + + + + TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw +IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/ +29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5 +dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA +AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG +AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/ +0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/ +7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/ +5eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/ +3t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD +AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns +AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/ +6+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/ +/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/ +///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl +YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA +AAAAAAAAAAUAAAAfAAAAZTMzM8KAgIDwv7+//O3t7f/t7e3/v7+//ICAgPAzMzPCAAAAZQAAAB8AAAAF +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAFwAAAEMAAAB3AAAAnwAAALMAAACzAAAAnwAAAHcAAABD +AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu +AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQEAAAMAAAABABIAAAEB +AAMAAAABABIAAAECAAMAAAAEAAAFugEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES +AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS +AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA + + + + + + + + 400 + 75 + + + + + + + + + 274 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 256 + {525, 102} + + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 522 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + + + + 337772096 + 2048 + + + + 6 + System + controlBackgroundColor + + + + + 3 + YES + + + + 3 + 2 + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + 306184192 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {525, 102}} + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 95}} + + + + _doScroller: + 0.5 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + + 1 + + _doScroller: + 0.99047620000000003 + + + {527, 104} + + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 290 + + YES + + + 2304 + + YES + + + 2322 + {525, 14} + + + + + + + results + + + YES + + YES + NSColor + NSFont + + + YES + + 1 + MC40NTEwODY5NCAwLjEwNDE0NTEyIDAuMDgyODYwMjE2AA + + + Geneva + 10 + 16 + + + + + + + YES + + + 6 + + + + 525 + 1 + + + 67119969 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + 1 + MCAwIDEAA + + + + + + + 1 + + 6 + {1052, 10000000} + {463, 0} + + + + {{1, 1}, {525, 76}} + + + + + + + {4, 5} + + 79691776 + + YES + + YES + + + + + file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff + + + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{0, 113}, {527, 78}} + + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + {{20, 77}, {527, 191}} + + + + + + 292 + {{21, 52}, {60, 14}} + + + YES + + 68288064 + 272761856 + Latitude: + + + + + + + + + 292 + {{21, 30}, {72, 14}} + + + YES + + 68288064 + 272761856 + Longitude: + + + + + + + + + 292 + {{158, 49}, {160, 22}} + + + YES + + 71433728 + 131072 + + -595929600 + + US/Pacific + + VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ +y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ +5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g +8n/BkPNvwKD0X6OQ9U+ioPY/hZD3L4Sg+CiiEPkPZqD6CIQQ+viDIPvoZhD82GUg/chIEP64RyD/qCoQ +AJgpIAGIDBACeAsgA3EokARhJ6AFUQqQBkEJoAcw7JAHjUOgCRDOkAmtvyAK8LCQC+CvoAzZzRANwJGg +DrmvEA+priAQmZEQEYmQIBJ5cxATaXIgFFlVEBVJVCAWOTcQFyk2IBgiU5AZCRggGgI1kBryNKAb4heQ +HNIWoB3B+ZAesfigH6HbkCB2KyAhgb2QIlYNICNq2hAkNe8gJUq8ECYV0SAnKp4QJ/7toCkKgBAp3s+g +KupiECu+saAs036QLZ6ToC6zYJAvfnWgMJNCkDFnkiAycySQM0d0IDRTBpA1J1YgNjLokDcHOCA4HAUQ +OOcaIDn75xA6xvwgO9vJEDywGKA9u6sQPo/6oD+bjRBAb9ygQYSpkEJPvqBDZIuQRC+goEVEbZBF89Mg +Ry2KEEfTtSBJDWwQSbOXIErtThBLnLOgTNZqkE18laBOtkyQT1x3oFCWLpBRPFmgUnYQkFMcO6BUVfKQ +VPwdoFY11JBW5TogWB7xEFjFHCBZ/tMQWqT+IFvetRBchOAgXb6XEF5kwiBfnnkQYE3eoGGHlZBiLcCg +Y2d3kGQNoqBlR1mQZe2EoGcnO5BnzWagaQcdkGmtSKBq5v+Qa5ZlIGzQHBBtdkcgbq/+EG9WKSBwj+AQ +cTYLIHJvwhBzFe0gdE+kEHT/CaB2OMCQdt7roHgYopB4vs2gefiEkHqer6B72GaQfH6RoH24SJB+XnOg +f5gqkAABAAECAwEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA +AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA +AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA +AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA + + + %Y-%m-%d %H:%M:%S %z + + + + 0.0 + 238 + + + + + + + 292 + {{84, 28}, {66, 19}} + + + YES + + -1804468671 + 272761856 + + + + YES + + 6 + System + textBackgroundColor + + + + 6 + System + textColor + + + + + + + 292 + {{84, 50}, {66, 19}} + + + YES + + -1804468671 + 272761856 + + + + YES + + + + + + + 292 + {{364, 45}, {64, 28}} + + + YES + + 67239424 + 134348800 + Add + + LucidaGrande + 11 + 16 + + + -2038284033 + 129 + + + 200 + 25 + + + + + 292 + {{426, 45}, {64, 28}} + + + YES + + 67239424 + 134348800 + Update + + + -2038284033 + 129 + + + 200 + 25 + + + + + 292 + {{488, 45}, {64, 28}} + + + YES + + 67239424 + 134348800 + Delete + + + -2038284033 + 129 + + + 200 + 25 + + + + + 268 + {{15, 385}, {83, 28}} + + + YES + + -2080244224 + 134348800 + Client ID... + + + -2038284033 + 129 + + + 200 + 25 + + + + + 264 + {{102, 392}, {178, 14}} + + + YES + + 67239424 + 272760832 + Client ID and Secret Required + + + + + + + + {567, 429} + + + + {{0, 0}, {1440, 878}} + {568, 359} + {10000000000000, 10000000000000} + YES + + + YES + + + 3 + 2 + {{235, 277}, {458, 282}} + 611844096 + Client ID Sheet + NSWindow + + + + + 256 + + YES + + + 266 + {{118, 141}, {320, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 141}, {63, 17}} + + YES + + 68288064 + 272630784 + Client ID: + + + + + + + + + 266 + {{118, 110}, {320, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 115}, {88, 17}} + + YES + + 68288064 + 272630784 + Client Secret: + + + + + + + + + 268 + {{338, 78}, {82, 20}} + + YES + + 67239424 + 134348800 + API Console + + + -2038284033 + 134 + + + 200 + 25 + + + + + 268 + {{17, 80}, {316, 17}} + + YES + + 68288064 + 272630784 + Client ID and Client Secret are obtained from the + + + + + + + + + 268 + {{17, 202}, {424, 34}} + + YES + + 67239424 + 138412032 + Each application should have a client ID and client secret hardcoded into the source. + + + + + + + + + 268 + {{348, 12}, {96, 32}} + + YES + + 67239424 + 134217728 + Done + + + -2038284033 + 129 + + DQ + 200 + 25 + + + + {458, 282} + + {{0, 0}, {1920, 1178}} + {10000000000000, 10000000000000} + YES + + + + + YES + + + loggingCheckboxClicked: + + + + 151 + + + + signInClicked: + + + + 364 + + + + getLocationsClicked: + + + + 377 + + + + cancelLocationsFetchClicked: + + + + 382 + + + + window + + + + 383 + + + + addLocationClicked: + + + + 409 + + + + deleteLocationClicked: + + + + 410 + + + + updateLocationClicked: + + + + 411 + + + + locationRadioButtonClicked: + + + + 416 + + + + clientIDClicked: + + + + 466 + + + + clientIDDoneClicked: + + + + 467 + + + + APIConsoleClicked: + + + + 468 + + + + signedInField_ + + + + 473 + + + + signedInButton_ + + + + 474 + + + + timeMatrix_ + + + + 475 + + + + granularityMatrix_ + + + + 476 + + + + locationsTable_ + + + + 477 + + + + locationsProgressIndicator_ + + + + 478 + + + + locationsResultTextField_ + + + + 479 + + + + locationsCancelButton_ + + + + 480 + + + + latitudeField_ + + + + 481 + + + + longitudeField_ + + + + 482 + + + + datePicker_ + + + + 483 + + + + addLocationButton_ + + + + 484 + + + + updateLocationButton_ + + + + 485 + + + + deleteLocationButton_ + + + + 486 + + + + clientIDButton_ + + + + 487 + + + + clientIDRequiredTextField_ + + + + 488 + + + + clientIDSheet_ + + + + 489 + + + + clientIDField_ + + + + 490 + + + + clientSecretField_ + + + + 491 + + + + delegate + + + + 15 + + + + dataSource + + + + 34 + + + + delegate + + + + 35 + + + + delegate + + + + 415 + + + + delegate + + + + 414 + + + + value: values.clientID + + + + + + value: values.clientID + value + values.clientID + + NSContinuouslyUpdatesValue + + + 2 + + + 470 + + + + value: values.clientSecret + + + + + + value: values.clientSecret + value + values.clientSecret + + NSContinuouslyUpdatesValue + + + 2 + + + 472 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 5 + + + YES + + + + Window + + + 6 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + 17 + + + YES + + + + + + 40 + + + + + 86 + + + YES + + + + + + 150 + + + YES + + + + + + 44 + + + Shared Defaults + + + 251 + + + + + 253 + + + + + 254 + + + + + 38 + + + YES + + + + + + 252 + + + + + 358 + + + YES + + + + + + 359 + + + YES + + + + + + 360 + + + YES + + + + + + 361 + + + + + 362 + + + + + 363 + + + + + 367 + + + YES + + + + + + + + 368 + + + + + 369 + + + + + 370 + + + + + 371 + + + YES + + + + + + + + 372 + + + + + 373 + + + + + 374 + + + + + 384 + + + YES + + + + + + + 24 + + + YES + + + + + + + + 265 + + + + + 264 + + + + + 25 + + + YES + + + + + + 26 + + + YES + + + + + + 263 + + + + + 80 + + + YES + + + + + + + + 267 + + + + + 266 + + + + + 81 + + + + + 385 + + + YES + + + + + + 386 + + + + + 387 + + + YES + + + + + + 388 + + + + + 389 + + + YES + + + + + + 390 + + + + + 391 + + + YES + + + + + + 392 + + + + + 393 + + + YES + + + + + + 394 + + + + + 399 + + + YES + + + + + + 400 + + + + + 401 + + + YES + + + + + + 402 + + + + + 403 + + + YES + + + + + + 404 + + + + + 438 + + + YES + + + + + + 439 + + + YES + + + + + + + + + + + + + 440 + + + YES + + + + + + 441 + + + YES + + + + + + 442 + + + YES + + + + + + 443 + + + YES + + + + + + 444 + + + YES + + + + + + 445 + + + YES + + + + + + 446 + + + YES + + + + + + 447 + + + YES + + + + + + 448 + + + + + 449 + + + + + 450 + + + + + 451 + + + + + 452 + + + + + 453 + + + + + 454 + + + + + 455 + + + + + 460 + + + YES + + + + + + 461 + + + YES + + + + + + 462 + + + + + 463 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 150.IBPluginDependency + 17.IBPluginDependency + 24.IBPluginDependency + 25.IBPluginDependency + 251.IBPluginDependency + 252.IBPluginDependency + 253.IBPluginDependency + 254.IBPluginDependency + 26.IBPluginDependency + 263.IBPluginDependency + 263.IBShouldRemoveOnLegacySave + 264.IBPluginDependency + 264.IBShouldRemoveOnLegacySave + 265.IBPluginDependency + 265.IBShouldRemoveOnLegacySave + 266.IBPluginDependency + 266.IBShouldRemoveOnLegacySave + 267.IBPluginDependency + 267.IBShouldRemoveOnLegacySave + 358.IBPluginDependency + 359.IBPluginDependency + 360.IBPluginDependency + 361.IBPluginDependency + 362.IBPluginDependency + 363.IBPluginDependency + 367.IBPluginDependency + 368.IBPluginDependency + 369.IBPluginDependency + 370.IBPluginDependency + 371.IBPluginDependency + 372.IBPluginDependency + 373.IBPluginDependency + 374.IBPluginDependency + 38.IBPluginDependency + 384.IBPluginDependency + 385.IBPluginDependency + 386.IBPluginDependency + 387.IBPluginDependency + 388.IBPluginDependency + 389.IBPluginDependency + 390.IBPluginDependency + 391.IBPluginDependency + 392.IBPluginDependency + 393.IBPluginDependency + 394.IBPluginDependency + 399.IBPluginDependency + 40.IBPluginDependency + 400.IBPluginDependency + 401.IBPluginDependency + 402.IBPluginDependency + 403.IBPluginDependency + 404.IBPluginDependency + 438.IBPluginDependency + 438.IBWindowTemplateEditedContentRect + 438.NSWindowTemplate.visibleAtLaunch + 439.IBPluginDependency + 44.IBPluginDependency + 440.IBPluginDependency + 441.IBPluginDependency + 442.IBPluginDependency + 443.IBPluginDependency + 444.IBPluginDependency + 445.IBPluginDependency + 446.IBPluginDependency + 447.IBPluginDependency + 448.IBPluginDependency + 449.IBPluginDependency + 450.IBPluginDependency + 451.IBPluginDependency + 452.IBPluginDependency + 453.IBPluginDependency + 454.IBPluginDependency + 455.IBPluginDependency + 460.IBPluginDependency + 461.IBPluginDependency + 462.IBPluginDependency + 463.IBPluginDependency + 5.IBPluginDependency + 5.IBWindowTemplateEditedContentRect + 6.IBPluginDependency + 6.IBUserGuides + 80.IBPluginDependency + 81.IBPluginDependency + 86.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{196, 842}, {458, 282}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{18, 726}, {567, 429}} + com.apple.InterfaceBuilder.CocoaPlugin + + YES + + + 318 + 1 + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 491 + + + + YES + + LatitudeSampleWindowController + NSWindowController + + YES + + YES + APIConsoleClicked: + addLocationClicked: + cancelLocationsFetchClicked: + clientIDClicked: + clientIDDoneClicked: + deleteLocationClicked: + getLocationsClicked: + locationRadioButtonClicked: + loggingCheckboxClicked: + signInClicked: + updateLocationClicked: + + + YES + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + APIConsoleClicked: + addLocationClicked: + cancelLocationsFetchClicked: + clientIDClicked: + clientIDDoneClicked: + deleteLocationClicked: + getLocationsClicked: + locationRadioButtonClicked: + loggingCheckboxClicked: + signInClicked: + updateLocationClicked: + + + YES + + APIConsoleClicked: + id + + + addLocationClicked: + id + + + cancelLocationsFetchClicked: + id + + + clientIDClicked: + id + + + clientIDDoneClicked: + id + + + deleteLocationClicked: + id + + + getLocationsClicked: + id + + + locationRadioButtonClicked: + id + + + loggingCheckboxClicked: + id + + + signInClicked: + id + + + updateLocationClicked: + id + + + + + YES + + YES + addLocationButton_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + datePicker_ + deleteLocationButton_ + granularityMatrix_ + latitudeField_ + locationsCancelButton_ + locationsProgressIndicator_ + locationsResultTextField_ + locationsTable_ + longitudeField_ + signedInButton_ + signedInField_ + timeMatrix_ + updateLocationButton_ + + + YES + NSButton + NSButton + NSTextField + NSTextField + NSWindow + NSTextField + NSDatePicker + NSButton + NSMatrix + NSTextField + NSButton + NSProgressIndicator + NSTextView + NSTableView + NSTextField + NSButton + NSTextField + NSMatrix + NSButton + + + + YES + + YES + addLocationButton_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + datePicker_ + deleteLocationButton_ + granularityMatrix_ + latitudeField_ + locationsCancelButton_ + locationsProgressIndicator_ + locationsResultTextField_ + locationsTable_ + longitudeField_ + signedInButton_ + signedInField_ + timeMatrix_ + updateLocationButton_ + + + YES + + addLocationButton_ + NSButton + + + clientIDButton_ + NSButton + + + clientIDField_ + NSTextField + + + clientIDRequiredTextField_ + NSTextField + + + clientIDSheet_ + NSWindow + + + clientSecretField_ + NSTextField + + + datePicker_ + NSDatePicker + + + deleteLocationButton_ + NSButton + + + granularityMatrix_ + NSMatrix + + + latitudeField_ + NSTextField + + + locationsCancelButton_ + NSButton + + + locationsProgressIndicator_ + NSProgressIndicator + + + locationsResultTextField_ + NSTextView + + + locationsTable_ + NSTableView + + + longitudeField_ + NSTextField + + + signedInButton_ + NSButton + + + signedInField_ + NSTextField + + + timeMatrix_ + NSMatrix + + + updateLocationButton_ + NSButton + + + + + IBProjectSource + ./Classes/LatitudeSampleWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + diff --git a/GTL/Examples/LatitudeSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base b/GTL/Examples/LatitudeSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base new file mode 100644 index 0000000..4131f3f --- /dev/null +++ b/GTL/Examples/LatitudeSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base @@ -0,0 +1,2280 @@ + + + + 1050 + 10D2063a + 762 + 1038.29 + 460.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 762 + + + YES + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + YES + + YES + + + YES + + + + YES + + + NSApplication + + + + FirstResponder + + + NSApplication + + + MainMenu + + YES + + + SampleApp + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + SampleApp + + YES + + + About the Sample + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + + Services + + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + + File + + + YES + + + New + n + 1048576 + 2147483647 + + + + + + Open... + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + + Open Recent + + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + Save As… + S + 1048576 + 2147483647 + + + + + + Revert + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup… + P + 1048576 + 2147483647 + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + + Edit + + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + + Find + + + YES + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1048576 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling + + 1048576 + 2147483647 + + + submenuAction: + + Spelling + + YES + + + Spelling… + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling as You Type + + 1048576 + 2147483647 + + + + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + + Window + + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + Help + + YES + + + Help + ? + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + LatitudeSampleAppController + + + + + YES + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + showHelp: + + + + 122 + + + + clearRecentDocuments: + + + + 127 + + + + terminate: + + + + 139 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + hideOtherApplications: + + + + 146 + + + + hide: + + + + 152 + + + + unhideAllApplications: + + + + 153 + + + + cut: + + + + 175 + + + + paste: + + + + 176 + + + + redo: + + + + 178 + + + + selectAll: + + + + 179 + + + + undo: + + + + 180 + + + + copy: + + + + 181 + + + + showGuessPanel: + + + + 188 + + + + checkSpelling: + + + + 190 + + + + toggleContinuousSpellChecking: + + + + 192 + + + + performClose: + + + + 193 + + + + delete: + + + + 195 + + + + performZoom: + + + + 198 + + + + performFindPanelAction: + + + + 199 + + + + performFindPanelAction: + + + + 200 + + + + performFindPanelAction: + + + + 201 + + + + performFindPanelAction: + + + + 202 + + + + centerSelectionInVisibleArea: + + + + 203 + + + + pasteAsPlainText: + + + + 205 + + + + delegate + + + + 223 + + + + delegate + + + + 225 + + + + + YES + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + MainMenu + + + 19 + + + YES + + + + + + 24 + + + YES + + + + + + + + + 5 + + + + + 23 + + + + + 92 + + + + + 197 + + + + + 56 + + + YES + + + + + + 57 + + + YES + + + + + + + + + + + + + + + + 58 + + + + + 129 + + + + + 131 + + + YES + + + + + + 130 + + + + + 134 + + + + + 136 + + + + + 143 + + + + + 144 + + + + + 145 + + + + + 149 + + + + + 150 + + + + + 196 + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + + + + + + + + 72 + + + + + 73 + + + + + 74 + + + + + 75 + + + + + 77 + + + + + 78 + + + + + 79 + + + + + 80 + + + + + 82 + + + + + 112 + + + + + 124 + + + YES + + + + + + 125 + + + YES + + + + + + 126 + + + + + 103 + + + YES + + + + + + 106 + + + YES + + + + + + 111 + + + + + 163 + + + YES + + + + + + 169 + + + YES + + + + + + + + + + + + + + + + + 156 + + + + + 157 + + + + + 158 + + + + + 160 + + + + + 164 + + + + + 168 + + + YES + + + + + + 159 + + + YES + + + + + + + + + + 154 + + + + + 155 + + + + + 161 + + + + + 162 + + + + + 167 + + + + + 171 + + + + + 172 + + + + + 173 + + + + + 174 + + + + + 184 + + + YES + + + + + + 185 + + + YES + + + + + + + + 187 + + + + + 189 + + + + + 191 + + + + + 204 + + + + + 222 + + + SampleAppController + + + + + YES + + YES + -3.IBPluginDependency + -3.ImportedFromIB2 + 103.IBPluginDependency + 103.ImportedFromIB2 + 106.IBPluginDependency + 106.ImportedFromIB2 + 111.IBPluginDependency + 111.ImportedFromIB2 + 112.IBPluginDependency + 112.ImportedFromIB2 + 124.IBPluginDependency + 124.ImportedFromIB2 + 125.IBPluginDependency + 125.ImportedFromIB2 + 126.IBPluginDependency + 126.ImportedFromIB2 + 129.IBPluginDependency + 129.ImportedFromIB2 + 130.IBPluginDependency + 130.ImportedFromIB2 + 131.IBPluginDependency + 131.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 136.IBPluginDependency + 136.ImportedFromIB2 + 143.IBPluginDependency + 143.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 145.IBPluginDependency + 145.ImportedFromIB2 + 149.IBPluginDependency + 149.ImportedFromIB2 + 150.IBPluginDependency + 150.ImportedFromIB2 + 154.IBPluginDependency + 154.ImportedFromIB2 + 155.IBPluginDependency + 155.ImportedFromIB2 + 156.IBPluginDependency + 156.ImportedFromIB2 + 157.IBPluginDependency + 157.ImportedFromIB2 + 158.IBPluginDependency + 158.ImportedFromIB2 + 159.IBPluginDependency + 159.ImportedFromIB2 + 160.IBPluginDependency + 160.ImportedFromIB2 + 161.IBPluginDependency + 161.ImportedFromIB2 + 162.IBPluginDependency + 162.ImportedFromIB2 + 163.IBPluginDependency + 163.ImportedFromIB2 + 164.IBPluginDependency + 164.ImportedFromIB2 + 167.IBPluginDependency + 167.ImportedFromIB2 + 168.IBPluginDependency + 168.ImportedFromIB2 + 169.IBPluginDependency + 169.ImportedFromIB2 + 171.IBPluginDependency + 171.ImportedFromIB2 + 172.IBPluginDependency + 172.ImportedFromIB2 + 173.IBPluginDependency + 173.ImportedFromIB2 + 174.IBPluginDependency + 174.ImportedFromIB2 + 184.IBPluginDependency + 184.ImportedFromIB2 + 185.IBPluginDependency + 185.ImportedFromIB2 + 187.IBPluginDependency + 187.ImportedFromIB2 + 189.IBPluginDependency + 189.ImportedFromIB2 + 19.IBPluginDependency + 19.ImportedFromIB2 + 191.IBPluginDependency + 191.ImportedFromIB2 + 196.IBPluginDependency + 196.ImportedFromIB2 + 197.IBPluginDependency + 197.ImportedFromIB2 + 204.IBPluginDependency + 204.ImportedFromIB2 + 222.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 24.IBPluginDependency + 24.ImportedFromIB2 + 29.IBPluginDependency + 29.ImportedFromIB2 + 5.IBPluginDependency + 5.ImportedFromIB2 + 56.IBPluginDependency + 56.ImportedFromIB2 + 57.IBPluginDependency + 57.ImportedFromIB2 + 58.IBPluginDependency + 58.ImportedFromIB2 + 72.IBPluginDependency + 72.ImportedFromIB2 + 73.IBPluginDependency + 73.ImportedFromIB2 + 74.IBPluginDependency + 74.ImportedFromIB2 + 75.IBPluginDependency + 75.ImportedFromIB2 + 77.IBPluginDependency + 77.ImportedFromIB2 + 78.IBPluginDependency + 78.ImportedFromIB2 + 79.IBPluginDependency + 79.ImportedFromIB2 + 80.IBPluginDependency + 80.ImportedFromIB2 + 81.IBPluginDependency + 81.ImportedFromIB2 + 82.IBPluginDependency + 82.ImportedFromIB2 + 83.IBPluginDependency + 83.ImportedFromIB2 + 92.IBPluginDependency + 92.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + + YES + + + + + YES + + + YES + + + + 227 + + + + YES + + FirstResponder + NSObject + + IBUserSource + + + + + LatitudeSampleAppController + NSObject + + IBProjectSource + LatitudeSampleAppController.h + + + + + YES + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSBrowser + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSBrowser.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSDocument + NSObject + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + id + id + id + id + id + id + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocument.h + + + + NSDocument + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentScripting.h + + + + NSDocumentController + NSObject + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + id + id + id + id + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentController.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSMatrix + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSMatrix.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSMenuItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSMovieView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSMovieView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebEditingDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebFrameLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebJavaPlugIn.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPlugin.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPluginContainer.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPolicyDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebResourceLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebScriptObject.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebUIDelegate.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSTableView + NSControl + + + + NSText + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSText.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + + WebView + NSView + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + id + id + id + id + id + id + id + id + id + id + id + + + + IBFrameworkSource + WebKit.framework/Headers/WebView.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../LatitudeSample.xcodeproj + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {9, 8} + {7, 2} + + + + diff --git a/GTL/Examples/LatitudeSample/English.lproj/InfoPlist.strings b/GTL/Examples/LatitudeSample/English.lproj/InfoPlist.strings new file mode 100644 index 0000000..152e52c --- /dev/null +++ b/GTL/Examples/LatitudeSample/English.lproj/InfoPlist.strings @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "© Google Inc. 2010"; diff --git a/GTL/Examples/LatitudeSample/English.lproj/LatitudeSampleWindow.xib b/GTL/Examples/LatitudeSample/English.lproj/LatitudeSampleWindow.xib new file mode 100644 index 0000000..c9d25db --- /dev/null +++ b/GTL/Examples/LatitudeSample/English.lproj/LatitudeSampleWindow.xib @@ -0,0 +1,2754 @@ + + + + 1070 + 11D50b + 2182 + 1138.32 + 568.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2182 + + + YES + NSTableColumn + NSDatePicker + NSScroller + NSSplitView + NSButton + NSDatePickerCell + NSTextFieldCell + NSButtonCell + NSScrollView + NSProgressIndicator + NSTableView + NSMatrix + NSCustomObject + NSTextView + NSView + NSWindowTemplate + NSTextField + NSUserDefaultsController + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + LatitudeSampleWindowController + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{64, 404}, {567, 429}} + 1886912512 + Sample App + + NSWindow + + + View + + + {568, 337} + + + 256 + + YES + + + 265 + {{401, 317}, {152, 32}} + + + YES + + 67239424 + 134217728 + Get Locations List + + LucidaGrande + 13 + 1044 + + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + + 264 + {{20, 276}, {162, 17}} + + + YES + + 67239424 + 272629760 + Locations - select one + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 1289 + + {{469, 278}, {16, 16}} + + + 28938 + 100 + + + + 265 + {{492, 277}, {54, 16}} + + + YES + + 67239424 + 134479872 + Cancel + + LucidaGrande + 9 + 3614 + + + -2038284033 + 1 + + LucidaGrande + 9 + 16 + + + + + + 200 + 25 + + + + + 289 + {{421, 18}, {128, 18}} + + + YES + + 67239424 + 131072 + Log http to desktop + + LucidaGrande + 11 + 3100 + + + 1211912703 + 2 + + NSSwitch + + + + 200 + 25 + + + + + 264 + {{91, 359}, {71, 17}} + + + YES + + 67239424 + 272629760 + Signed In: + + + + + + + + + 266 + {{164, 359}, {373, 17}} + + + YES + + 67239424 + 272629760 + No + + + + + + + + + 268 + {{20, 352}, {72, 28}} + + + YES + + 67239424 + 134348800 + Sign Out + + + -2038284033 + 129 + + + 200 + 25 + + + + + 268 + {{20, 305}, {73, 38}} + + + YES + 2 + 1 + + YES + + -2080244224 + 131072 + Current + + + 1 + 1211912703 + 0 + + NSRadioButton + + + + 200 + 25 + + + 67239424 + 131072 + Historical + + + 1211912703 + 0 + + 549453824 + {18, 18} + + YES + + YES + + + + TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw +IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/ +29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5 +dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA +AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG +AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/ +0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/ +7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/ +5eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/ +3t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD +AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns +AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/ +6+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/ +/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/ +///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl +YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA +AAAAAAAAAAUAAAAfAAAAZTMzM8KAgIDwv7+//O3t7f/t7e3/v7+//ICAgPAzMzPCAAAAZQAAAB8AAAAF +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAFwAAAEMAAAB3AAAAnwAAALMAAACzAAAAnwAAAHcAAABD +AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu +AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgEAAAMAAAABABIAAAEB +AAMAAAABABIAAAECAAMAAAAEAAAFxgEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES +AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS +AAMAAAABAAEAAAFTAAMAAAAEAAAFzodzAAcAAAwYAAAF1gAAAAAACAAIAAgACAABAAEAAQABAAAMGGFw +cGwCAAAAbW50clJHQiBYWVogB9YABAADABMALAASYWNzcEFQUEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAPbWAAEAAAAA0y1hcHBsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAOclhZWgAAASwAAAAUZ1hZWgAAAUAAAAAUYlhZWgAAAVQAAAAUd3RwdAAAAWgAAAAUY2hhZAAA +AXwAAAAsclRSQwAAAagAAAAOZ1RSQwAAAbgAAAAOYlRSQwAAAcgAAAAOdmNndAAAAdgAAAMSbmRpbgAA +BOwAAAY+ZGVzYwAACywAAABkZHNjbQAAC5AAAAAubW1vZAAAC8AAAAAoY3BydAAAC+gAAAAtWFlaIAAA +AAAAAF1KAAA0kQAACCVYWVogAAAAAAAAdCAAALRgAAAjPVhZWiAAAAAAAAAlbAAAFyoAAKfDWFlaIAAA +AAAAAPNSAAEAAAABFs9zZjMyAAAAAAABDEIAAAXe///zJgAAB5IAAP2R///7ov///aMAAAPcAADAbGN1 +cnYAAAAAAAAAAQHNAABjdXJ2AAAAAAAAAAEBzQAAY3VydgAAAAAAAAABAc0AAHZjZ3QAAAAAAAAAAAAD +AQAAAQACBAUGBwkKCw0ODxASExQWFxgaGxweHyAiIyQmJygpKywtLzAxMjM1Njc4OTs8PT5AQUJDREZH +SElKS0xOT1BRUlNUVVZXWFlaW1xdXl9hYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gIGCg4SF +hoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnZ6foKGio6SlpqanqKmqq6ytra6vsLGysrO0tba3uLi5uru8 +vL2+v8DBwcLDxMXGxsfIycrKy8zNzs7P0NHS0tPU1dbW19jZ2drb3Nzd3t/g4eLi4+Tl5ufo6enq6+zt +7u/w8fHy8/T19vf4+fr7/P3+/v8AAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR8gISIjJCUnKCkq +Ky0uLzAxMzQ1Njc4OTo7PD0/QEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaWltcXV5fYGFiY2RlZmdo +aWprbG1ub3BxcnN0dXZ3d3h5ent8fH1+f4CBgoKDhIWGh4iIiYqLjI2Oj5CRkpOUlJWWl5iZmpucnZ2e +n6ChoqOkpaamp6ipqqusra6vsLCxsrO0tba3uLm5uru8vb6/wMHCw8TFx8jJysvMzc7P0NDR0tPU1dbX +2Nna29ze3+Dh4uPk5ebn6err7O3u7/Hy8/T19vf5+vv8/f7/AAIDAwQFBgcICQoKCwwNDg8QERITFBUW +FxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODg5Ojs8PT4+P0BBQkNDREVGR0hJSUpLTE1O +Tk9QUVJSU1RVVVZXWFhZWltbXF1eXl9gYWFiY2RkZWZnZ2hpaWprbGxtbm5vcHFxcnNzdHV1dnd4eHl6 +ent8fH1+fn+AgYGCg4SEhYaHiImJiouMjY6Oj5CRkpOTlJWWl5iZmZqbnJ2en6ChoqOkpaanqKmqq6yt +rq+xsrO0tba3uLq7vL2+wMHDxMbHycrMzs/R0tTW19nb3d7g4uTm6Ors7vDy9Pb4+vz+/wAAbmRpbgAA +AAAAAAY2AACXGgAAVjoAAFPKAACJ3gAAJ8IAABaoAABQDQAAVDkAAiuFAAIZmQABeFEAAwEAAAIAAAAA +AAEABgANABcAIwAxAEAAUgBlAHsAkwCrAMUA4gD/AR8BPwFhAYUBqgHQAfgCIAJLAncCpQLSAwIDMwNl +A5gDzgQFBD0EdQSvBOsFKQVnBacF6AYqBm4GtQb8B0UHkgfkCDkIkAjnCT4JmAn0ClAKrQsLC2sLygwq +DIwM8Q1XDcAOKA6SDv4PbA/bEE0QxBE7EbQSMRKwEzITuRREFNAVYBXxFocXHhfAGGIZBBmsGlQa+RuU +HC4czh1yHhQeux9jIA0gvCFoIhkizyOJJEEk+SW6JnknOygFKMspkypiKzIsASzXLawuhy9gMD4xGzH8 +MtszvzSgNYY2cjdcOEw5OTorOxs8CD0EPfU+6z/nQOFB2ELUQ9VE00XcRttH5EjxSgBLCUwdTTFOUE9v +UI9Rt1LdVAVVNlZsV6VY4FohW21ct135X09goGH0Y0tkqGYFZ19oxGova5ptCG54b/BxbnLsdG119Xd/ +eQh6knwqfcV/W4D4gpSEO4Xih4CJKorYjIqOOY/jkZuTWJUOlsyYiZpSnB6d4Z+soX+jWqUvpxOo+6rj +rMuuwLC4sra0rra0uL+60LzfvwDBHcLdxLXGhchYyi7MCs3lz7rRmtOA1WPXR9kq2xPc/97s4M/iveSn +5o3obupT7ELuLPAM8fLz0PW396H5f/tZ/T3//wAAAAEAAwALABYAJQA3AE0AZQCBAJ8AwQDlAQsBNQFh +AZABwQH1AisCZAKfAtwDHANfA6MD6gQ0BH8EzQT1BR0FcAXEBhsGdAbPBy0HXAeMB+4IUgi4CSAJVAmK +CfYKZArVC0cLgQu8DDIMqw0mDaIOIQ6hDyQPqRAvELgQ/RFDEc8SXRLuE4AUFRSrFUMV3RZ5FxcXthhY +GPwZoRpIGvEbnBxJHPgdqB5bHw8fxSB9ITch8iKwJDAk8yW3Jn4nRigQKNwpqSp5K0osHCzxLccuoC95 +MFUxMzISMvMz1TS5NaA2hzdxOFw5STo4Oyg8Gj4DPvs/9EDuQepD6ETpRexG8Uf3SP9LFEwhTTBOQE9S +UGZSklOrVMVV4Vb/WB5ZP1phW4Vcq13SXvthUmJ/Y69k4GYSZ0dofGm0au1tZG6ib+FxInJlc6l073Y2 +d396FXtjfLJ+A39VgKmB/4NWhK+GCYjCiiGLgYzjjkePrJESknuT5Ja8mCuZm5sMnH+d9J9qoOGiWqPV +pVGmz6eOqE6pzqtRrNSuWq/gsWmy8rR+tgu5Kbq6vE294b93wQ7Cp8RBxd3He8kZyrrLisxbzf/Po9FK +0vHUm9ZF1/HZn9tO3Cbc/96x4GTiGePQ5YjnQegf6Pzquex27jbv9/G583z0X/VC9wj40Pqa/GX+Mf// +AAAAAQADAAsAJQA3AE0AZQCBAJ8AwQELATUBYQGQAcEB9QIrAmQCnwLcAxwDXwOjA+oENAR/BM0FHQVw +BcQGGwZ0Bs8HLQeMB+4IUgi4CSAJign2CmQK1QtHC7wMMgyrDSYNog4hDqEPJA+pEC8QuBFDEl0S7hOA +FBUUqxVDFnkXFxe2GFgY/BpIGvEbnBxJHPgdqB8PH8UgfSE3IfIjbyQwJPMltydGKBAo3Cp5K0osHC3H +LqAveTEzMhIy8zS5NaA2hzhcOUk6ODwaPQ4+Az/0QO5C6EPoROlG8Uf3SglLFEwhTkBPUlF7UpJUxVXh +Vv9ZP1phXKtd0mAlYVJjr2TgZhJofGm0au1tZG6ib+FxInJldO92Nnd/eMl6FXyyfgN/VYCpgf+Er4YJ +h2WIwoohi4GOR4+skRKSe5PklVCWvJgrmZubDJx/nfSfaqDholqj1aVRps+oTqnOq1Gs1K2Xrlqv4LFp +svK0frYLt5m5Kbnxurq8Tb3hv3fBDsHawqfEQcUPxd3He8hKyRnKusuKzFvN/87Rz6PQdtFK0vHTxtSb +1kXXG9fx2MjZn9tO3Cbc/93Y3rHfiuBk4hni9ePQ5KzliOZk50HoH+j86drqueuX7HbtVu427xbv9/DX +8bnymvN89F/1QvYl9wj37PjQ+bX6mvt//GX9S/4x//8AAGRlc2MAAAAAAAAACkNvbG9yIExDRAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAABIAAAAcAEMAbwBsAG8AcgAgAEwAQwBE +AABtbW9kAAAAAAAABhAAAJxOAAAAAL5zkQAAAAAAAAAAAAAAAAAAAAAAdGV4dAAAAABDb3B5cmlnaHQg +QXBwbGUgQ29tcHV0ZXIsIEluYy4sIDIwMDUAAAAAA + + + + + + 3 + MCAwAA + + + + 400 + 75 + + + {73, 18} + {4, 2} + 1168646144 + NSActionCell + + 67239424 + 131072 + Radio + + 1211912703 + 0 + + 549453824 + {18, 18} + + YES + + YES + + + + TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw +IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/ +29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5 +dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA +AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG +AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/ +0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/ +7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/ +5eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/ +3t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD +AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns +AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/ +6+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/ +/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/ +///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl +YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA +AAAAAAAAAAUAAAAfAAAAZTMzM8KAgIDwv7+//O3t7f/t7e3/v7+//ICAgPAzMzPCAAAAZQAAAB8AAAAF +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAFwAAAEMAAAB3AAAAnwAAALMAAACzAAAAnwAAAHcAAABD +AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu +AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQEAAAMAAAABABIAAAEB +AAMAAAABABIAAAECAAMAAAAEAAAFugEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES +AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS +AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA + + + + + + + + 400 + 75 + + + + + 3 + MQA + + + + + + 268 + {{101, 305}, {107, 38}} + + + YES + 2 + 1 + + YES + + -2080244224 + 131072 + Best Granularity + + + 1 + 1211912703 + 0 + + + + 200 + 25 + + + 67239424 + 131072 + City + + + 1211912703 + 0 + + 549453824 + {18, 18} + + YES + + YES + + + + TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw +IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/ +29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5 +dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA +AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG +AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/ +0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/ +7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/ +5eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/ +3t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD +AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns +AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/ +6+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/ +/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/ +///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl +YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA +AAAAAAAAAAUAAAAfAAAAZTMzM8KAgIDwv7+//O3t7f/t7e3/v7+//ICAgPAzMzPCAAAAZQAAAB8AAAAF +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAFwAAAEMAAAB3AAAAnwAAALMAAACzAAAAnwAAAHcAAABD +AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu +AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgEAAAMAAAABABIAAAEB +AAMAAAABABIAAAECAAMAAAAEAAAFxgEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES +AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS +AAMAAAABAAEAAAFTAAMAAAAEAAAFzodzAAcAAAwYAAAF1gAAAAAACAAIAAgACAABAAEAAQABAAAMGGFw +cGwCAAAAbW50clJHQiBYWVogB9YABAADABMALAASYWNzcEFQUEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAPbWAAEAAAAA0y1hcHBsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAOclhZWgAAASwAAAAUZ1hZWgAAAUAAAAAUYlhZWgAAAVQAAAAUd3RwdAAAAWgAAAAUY2hhZAAA +AXwAAAAsclRSQwAAAagAAAAOZ1RSQwAAAbgAAAAOYlRSQwAAAcgAAAAOdmNndAAAAdgAAAMSbmRpbgAA +BOwAAAY+ZGVzYwAACywAAABkZHNjbQAAC5AAAAAubW1vZAAAC8AAAAAoY3BydAAAC+gAAAAtWFlaIAAA +AAAAAF1KAAA0kQAACCVYWVogAAAAAAAAdCAAALRgAAAjPVhZWiAAAAAAAAAlbAAAFyoAAKfDWFlaIAAA +AAAAAPNSAAEAAAABFs9zZjMyAAAAAAABDEIAAAXe///zJgAAB5IAAP2R///7ov///aMAAAPcAADAbGN1 +cnYAAAAAAAAAAQHNAABjdXJ2AAAAAAAAAAEBzQAAY3VydgAAAAAAAAABAc0AAHZjZ3QAAAAAAAAAAAAD +AQAAAQACBAUGBwkKCw0ODxASExQWFxgaGxweHyAiIyQmJygpKywtLzAxMjM1Njc4OTs8PT5AQUJDREZH +SElKS0xOT1BRUlNUVVZXWFlaW1xdXl9hYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gIGCg4SF +hoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnZ6foKGio6SlpqanqKmqq6ytra6vsLGysrO0tba3uLi5uru8 +vL2+v8DBwcLDxMXGxsfIycrKy8zNzs7P0NHS0tPU1dbW19jZ2drb3Nzd3t/g4eLi4+Tl5ufo6enq6+zt +7u/w8fHy8/T19vf4+fr7/P3+/v8AAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR8gISIjJCUnKCkq +Ky0uLzAxMzQ1Njc4OTo7PD0/QEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaWltcXV5fYGFiY2RlZmdo +aWprbG1ub3BxcnN0dXZ3d3h5ent8fH1+f4CBgoKDhIWGh4iIiYqLjI2Oj5CRkpOUlJWWl5iZmpucnZ2e +n6ChoqOkpaamp6ipqqusra6vsLCxsrO0tba3uLm5uru8vb6/wMHCw8TFx8jJysvMzc7P0NDR0tPU1dbX +2Nna29ze3+Dh4uPk5ebn6err7O3u7/Hy8/T19vf5+vv8/f7/AAIDAwQFBgcICQoKCwwNDg8QERITFBUW +FxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODg5Ojs8PT4+P0BBQkNDREVGR0hJSUpLTE1O +Tk9QUVJSU1RVVVZXWFhZWltbXF1eXl9gYWFiY2RkZWZnZ2hpaWprbGxtbm5vcHFxcnNzdHV1dnd4eHl6 +ent8fH1+fn+AgYGCg4SEhYaHiImJiouMjY6Oj5CRkpOTlJWWl5iZmZqbnJ2en6ChoqOkpaanqKmqq6yt +rq+xsrO0tba3uLq7vL2+wMHDxMbHycrMzs/R0tTW19nb3d7g4uTm6Ors7vDy9Pb4+vz+/wAAbmRpbgAA +AAAAAAY2AACXGgAAVjoAAFPKAACJ3gAAJ8IAABaoAABQDQAAVDkAAiuFAAIZmQABeFEAAwEAAAIAAAAA +AAEABgANABcAIwAxAEAAUgBlAHsAkwCrAMUA4gD/AR8BPwFhAYUBqgHQAfgCIAJLAncCpQLSAwIDMwNl +A5gDzgQFBD0EdQSvBOsFKQVnBacF6AYqBm4GtQb8B0UHkgfkCDkIkAjnCT4JmAn0ClAKrQsLC2sLygwq +DIwM8Q1XDcAOKA6SDv4PbA/bEE0QxBE7EbQSMRKwEzITuRREFNAVYBXxFocXHhfAGGIZBBmsGlQa+RuU +HC4czh1yHhQeux9jIA0gvCFoIhkizyOJJEEk+SW6JnknOygFKMspkypiKzIsASzXLawuhy9gMD4xGzH8 +MtszvzSgNYY2cjdcOEw5OTorOxs8CD0EPfU+6z/nQOFB2ELUQ9VE00XcRttH5EjxSgBLCUwdTTFOUE9v +UI9Rt1LdVAVVNlZsV6VY4FohW21ct135X09goGH0Y0tkqGYFZ19oxGova5ptCG54b/BxbnLsdG119Xd/ +eQh6knwqfcV/W4D4gpSEO4Xih4CJKorYjIqOOY/jkZuTWJUOlsyYiZpSnB6d4Z+soX+jWqUvpxOo+6rj +rMuuwLC4sra0rra0uL+60LzfvwDBHcLdxLXGhchYyi7MCs3lz7rRmtOA1WPXR9kq2xPc/97s4M/iveSn +5o3obupT7ELuLPAM8fLz0PW396H5f/tZ/T3//wAAAAEAAwALABYAJQA3AE0AZQCBAJ8AwQDlAQsBNQFh +AZABwQH1AisCZAKfAtwDHANfA6MD6gQ0BH8EzQT1BR0FcAXEBhsGdAbPBy0HXAeMB+4IUgi4CSAJVAmK +CfYKZArVC0cLgQu8DDIMqw0mDaIOIQ6hDyQPqRAvELgQ/RFDEc8SXRLuE4AUFRSrFUMV3RZ5FxcXthhY +GPwZoRpIGvEbnBxJHPgdqB5bHw8fxSB9ITch8iKwJDAk8yW3Jn4nRigQKNwpqSp5K0osHCzxLccuoC95 +MFUxMzISMvMz1TS5NaA2hzdxOFw5STo4Oyg8Gj4DPvs/9EDuQepD6ETpRexG8Uf3SP9LFEwhTTBOQE9S +UGZSklOrVMVV4Vb/WB5ZP1phW4Vcq13SXvthUmJ/Y69k4GYSZ0dofGm0au1tZG6ib+FxInJlc6l073Y2 +d396FXtjfLJ+A39VgKmB/4NWhK+GCYjCiiGLgYzjjkePrJESknuT5Ja8mCuZm5sMnH+d9J9qoOGiWqPV +pVGmz6eOqE6pzqtRrNSuWq/gsWmy8rR+tgu5Kbq6vE294b93wQ7Cp8RBxd3He8kZyrrLisxbzf/Po9FK +0vHUm9ZF1/HZn9tO3Cbc/96x4GTiGePQ5YjnQegf6Pzquex27jbv9/G583z0X/VC9wj40Pqa/GX+Mf// +AAAAAQADAAsAJQA3AE0AZQCBAJ8AwQELATUBYQGQAcEB9QIrAmQCnwLcAxwDXwOjA+oENAR/BM0FHQVw +BcQGGwZ0Bs8HLQeMB+4IUgi4CSAJign2CmQK1QtHC7wMMgyrDSYNog4hDqEPJA+pEC8QuBFDEl0S7hOA +FBUUqxVDFnkXFxe2GFgY/BpIGvEbnBxJHPgdqB8PH8UgfSE3IfIjbyQwJPMltydGKBAo3Cp5K0osHC3H +LqAveTEzMhIy8zS5NaA2hzhcOUk6ODwaPQ4+Az/0QO5C6EPoROlG8Uf3SglLFEwhTkBPUlF7UpJUxVXh +Vv9ZP1phXKtd0mAlYVJjr2TgZhJofGm0au1tZG6ib+FxInJldO92Nnd/eMl6FXyyfgN/VYCpgf+Er4YJ +h2WIwoohi4GOR4+skRKSe5PklVCWvJgrmZubDJx/nfSfaqDholqj1aVRps+oTqnOq1Gs1K2Xrlqv4LFp +svK0frYLt5m5Kbnxurq8Tb3hv3fBDsHawqfEQcUPxd3He8hKyRnKusuKzFvN/87Rz6PQdtFK0vHTxtSb +1kXXG9fx2MjZn9tO3Cbc/93Y3rHfiuBk4hni9ePQ5KzliOZk50HoH+j86drqueuX7HbtVu427xbv9/DX +8bnymvN89F/1QvYl9wj37PjQ+bX6mvt//GX9S/4x//8AAGRlc2MAAAAAAAAACkNvbG9yIExDRAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAABIAAAAcAEMAbwBsAG8AcgAgAEwAQwBE +AABtbW9kAAAAAAAABhAAAJxOAAAAAL5zkQAAAAAAAAAAAAAAAAAAAAAAdGV4dAAAAABDb3B5cmlnaHQg +QXBwbGUgQ29tcHV0ZXIsIEluYy4sIDIwMDUAAAAAA + + + + + + + + 400 + 75 + + + {107, 18} + {4, 2} + 1168646144 + NSActionCell + + 67239424 + 131072 + Radio + + 1211912703 + 0 + + 549453824 + {18, 18} + + YES + + YES + + + + TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw +IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/ +29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5 +dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA +AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG +AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/ +0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/ +7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/ +5eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/ +3t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD +AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns +AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/ +6+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/ +/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/ +///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl +YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA +AAAAAAAAAAUAAAAfAAAAZTMzM8KAgIDwv7+//O3t7f/t7e3/v7+//ICAgPAzMzPCAAAAZQAAAB8AAAAF +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAFwAAAEMAAAB3AAAAnwAAALMAAACzAAAAnwAAAHcAAABD +AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu +AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQEAAAMAAAABABIAAAEB +AAMAAAABABIAAAECAAMAAAAEAAAFugEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES +AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS +AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA + + + + + + + + 400 + 75 + + + + + + + + + 274 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 256 + {525, 102} + + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 522 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + + + + 337772096 + 2048 + + + + 6 + System + controlBackgroundColor + + + + + 3 + YES + + + + 3 + 2 + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + 306184192 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {525, 102}} + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 95}} + + + + _doScroller: + 0.5 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + + 1 + + _doScroller: + 0.99047620000000003 + + + {527, 104} + + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 290 + + YES + + + 2304 + + YES + + + 2322 + {525, 14} + + + + + + + results + + + YES + + YES + NSColor + NSFont + + + YES + + 1 + MC40NTEwODY5NCAwLjEwNDE0NTEyIDAuMDgyODYwMjE2AA + + + Geneva + 10 + 16 + + + + + + + YES + + + 6 + + + + 525 + 1 + + + 67119969 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + 1 + MCAwIDEAA + + + + + + + 1 + + 6 + {1052, 10000000} + {463, 0} + + + + {{1, 1}, {525, 76}} + + + + + + + {4, 5} + + 79691776 + + YES + + YES + + + + + file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff + + + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{0, 113}, {527, 78}} + + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + {{20, 77}, {527, 191}} + + + + + + 292 + {{21, 52}, {60, 14}} + + + YES + + 68288064 + 272761856 + Latitude: + + + + + + + + + 292 + {{21, 30}, {72, 14}} + + + YES + + 68288064 + 272761856 + Longitude: + + + + + + + + + 292 + {{158, 49}, {160, 22}} + + + YES + + 71433728 + 131072 + + -595929600 + + US/Pacific + + VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ +y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ +5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g +8n/BkPNvwKD0X6OQ9U+ioPY/hZD3L4Sg+CiiEPkPZqD6CIQQ+viDIPvoZhD82GUg/chIEP64RyD/qCoQ +AJgpIAGIDBACeAsgA3EokARhJ6AFUQqQBkEJoAcw7JAHjUOgCRDOkAmtvyAK8LCQC+CvoAzZzRANwJGg +DrmvEA+priAQmZEQEYmQIBJ5cxATaXIgFFlVEBVJVCAWOTcQFyk2IBgiU5AZCRggGgI1kBryNKAb4heQ +HNIWoB3B+ZAesfigH6HbkCB2KyAhgb2QIlYNICNq2hAkNe8gJUq8ECYV0SAnKp4QJ/7toCkKgBAp3s+g +KupiECu+saAs036QLZ6ToC6zYJAvfnWgMJNCkDFnkiAycySQM0d0IDRTBpA1J1YgNjLokDcHOCA4HAUQ +OOcaIDn75xA6xvwgO9vJEDywGKA9u6sQPo/6oD+bjRBAb9ygQYSpkEJPvqBDZIuQRC+goEVEbZBF89Mg +Ry2KEEfTtSBJDWwQSbOXIErtThBLnLOgTNZqkE18laBOtkyQT1x3oFCWLpBRPFmgUnYQkFMcO6BUVfKQ +VPwdoFY11JBW5TogWB7xEFjFHCBZ/tMQWqT+IFvetRBchOAgXb6XEF5kwiBfnnkQYE3eoGGHlZBiLcCg +Y2d3kGQNoqBlR1mQZe2EoGcnO5BnzWagaQcdkGmtSKBq5v+Qa5ZlIGzQHBBtdkcgbq/+EG9WKSBwj+AQ +cTYLIHJvwhBzFe0gdE+kEHT/CaB2OMCQdt7roHgYopB4vs2gefiEkHqer6B72GaQfH6RoH24SJB+XnOg +f5gqkAABAAECAwEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA +AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA +AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA +AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA + + + %Y-%m-%d %H:%M:%S %z + + + + 0.0 + 238 + + + + + + + 292 + {{84, 28}, {66, 19}} + + + YES + + -1804468671 + 272761856 + + + + YES + + 6 + System + textBackgroundColor + + + + 6 + System + textColor + + + + + + + 292 + {{84, 50}, {66, 19}} + + + YES + + -1804468671 + 272761856 + + + + YES + + + + + + + 292 + {{364, 45}, {64, 28}} + + + YES + + 67239424 + 134348800 + Add + + LucidaGrande + 11 + 16 + + + -2038284033 + 129 + + + 200 + 25 + + + + + 292 + {{426, 45}, {64, 28}} + + + YES + + 67239424 + 134348800 + Update + + + -2038284033 + 129 + + + 200 + 25 + + + + + 292 + {{488, 45}, {64, 28}} + + + YES + + 67239424 + 134348800 + Delete + + + -2038284033 + 129 + + + 200 + 25 + + + + + 268 + {{15, 385}, {83, 28}} + + + YES + + -2080244224 + 134348800 + Client ID... + + + -2038284033 + 129 + + + 200 + 25 + + + + + 264 + {{102, 392}, {178, 14}} + + + YES + + 67239424 + 272760832 + Client ID and Secret Required + + + + + + + + {567, 429} + + + + {{0, 0}, {1440, 878}} + {568, 359} + {10000000000000, 10000000000000} + YES + + + YES + + + 3 + 2 + {{235, 277}, {458, 282}} + 611844096 + Client ID Sheet + NSWindow + + + + + 256 + + YES + + + 266 + {{118, 141}, {320, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 141}, {63, 17}} + + YES + + 68288064 + 272630784 + Client ID: + + + + + + + + + 266 + {{118, 110}, {320, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 115}, {88, 17}} + + YES + + 68288064 + 272630784 + Client Secret: + + + + + + + + + 268 + {{338, 78}, {82, 20}} + + YES + + 67239424 + 134348800 + API Console + + + -2038284033 + 134 + + + 200 + 25 + + + + + 268 + {{17, 80}, {316, 17}} + + YES + + 68288064 + 272630784 + Client ID and Client Secret are obtained from the + + + + + + + + + 268 + {{17, 202}, {424, 34}} + + YES + + 67239424 + 138412032 + Each application should have a client ID and client secret hardcoded into the source. + + + + + + + + + 268 + {{348, 12}, {96, 32}} + + YES + + 67239424 + 134217728 + Done + + + -2038284033 + 129 + + DQ + 200 + 25 + + + + {458, 282} + + {{0, 0}, {1920, 1178}} + {10000000000000, 10000000000000} + YES + + + + + YES + + + loggingCheckboxClicked: + + + + 151 + + + + signInClicked: + + + + 364 + + + + getLocationsClicked: + + + + 377 + + + + cancelLocationsFetchClicked: + + + + 382 + + + + window + + + + 383 + + + + addLocationClicked: + + + + 409 + + + + deleteLocationClicked: + + + + 410 + + + + updateLocationClicked: + + + + 411 + + + + locationRadioButtonClicked: + + + + 416 + + + + clientIDClicked: + + + + 466 + + + + clientIDDoneClicked: + + + + 467 + + + + APIConsoleClicked: + + + + 468 + + + + signedInField_ + + + + 473 + + + + signedInButton_ + + + + 474 + + + + timeMatrix_ + + + + 475 + + + + granularityMatrix_ + + + + 476 + + + + locationsTable_ + + + + 477 + + + + locationsProgressIndicator_ + + + + 478 + + + + locationsResultTextField_ + + + + 479 + + + + locationsCancelButton_ + + + + 480 + + + + latitudeField_ + + + + 481 + + + + longitudeField_ + + + + 482 + + + + datePicker_ + + + + 483 + + + + addLocationButton_ + + + + 484 + + + + updateLocationButton_ + + + + 485 + + + + deleteLocationButton_ + + + + 486 + + + + clientIDButton_ + + + + 487 + + + + clientIDRequiredTextField_ + + + + 488 + + + + clientIDSheet_ + + + + 489 + + + + clientIDField_ + + + + 490 + + + + clientSecretField_ + + + + 491 + + + + delegate + + + + 15 + + + + dataSource + + + + 34 + + + + delegate + + + + 35 + + + + delegate + + + + 415 + + + + delegate + + + + 414 + + + + value: values.clientID + + + + + + value: values.clientID + value + values.clientID + + NSContinuouslyUpdatesValue + + + 2 + + + 470 + + + + value: values.clientSecret + + + + + + value: values.clientSecret + value + values.clientSecret + + NSContinuouslyUpdatesValue + + + 2 + + + 472 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 5 + + + YES + + + + Window + + + 6 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + 17 + + + YES + + + + + + 40 + + + + + 86 + + + YES + + + + + + 150 + + + YES + + + + + + 44 + + + Shared Defaults + + + 251 + + + + + 253 + + + + + 254 + + + + + 38 + + + YES + + + + + + 252 + + + + + 358 + + + YES + + + + + + 359 + + + YES + + + + + + 360 + + + YES + + + + + + 361 + + + + + 362 + + + + + 363 + + + + + 367 + + + YES + + + + + + + + 368 + + + + + 369 + + + + + 370 + + + + + 371 + + + YES + + + + + + + + 372 + + + + + 373 + + + + + 374 + + + + + 384 + + + YES + + + + + + + 24 + + + YES + + + + + + + + 265 + + + + + 264 + + + + + 25 + + + YES + + + + + + 26 + + + YES + + + + + + 263 + + + + + 80 + + + YES + + + + + + + + 267 + + + + + 266 + + + + + 81 + + + + + 385 + + + YES + + + + + + 386 + + + + + 387 + + + YES + + + + + + 388 + + + + + 389 + + + YES + + + + + + 390 + + + + + 391 + + + YES + + + + + + 392 + + + + + 393 + + + YES + + + + + + 394 + + + + + 399 + + + YES + + + + + + 400 + + + + + 401 + + + YES + + + + + + 402 + + + + + 403 + + + YES + + + + + + 404 + + + + + 438 + + + YES + + + + + + 439 + + + YES + + + + + + + + + + + + + 440 + + + YES + + + + + + 441 + + + YES + + + + + + 442 + + + YES + + + + + + 443 + + + YES + + + + + + 444 + + + YES + + + + + + 445 + + + YES + + + + + + 446 + + + YES + + + + + + 447 + + + YES + + + + + + 448 + + + + + 449 + + + + + 450 + + + + + 451 + + + + + 452 + + + + + 453 + + + + + 454 + + + + + 455 + + + + + 460 + + + YES + + + + + + 461 + + + YES + + + + + + 462 + + + + + 463 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 150.IBPluginDependency + 17.IBPluginDependency + 24.IBPluginDependency + 25.IBPluginDependency + 251.IBPluginDependency + 252.IBPluginDependency + 253.IBPluginDependency + 254.IBPluginDependency + 26.IBPluginDependency + 263.IBPluginDependency + 263.IBShouldRemoveOnLegacySave + 264.IBPluginDependency + 264.IBShouldRemoveOnLegacySave + 265.IBPluginDependency + 265.IBShouldRemoveOnLegacySave + 266.IBPluginDependency + 266.IBShouldRemoveOnLegacySave + 267.IBPluginDependency + 267.IBShouldRemoveOnLegacySave + 358.IBPluginDependency + 359.IBPluginDependency + 360.IBPluginDependency + 361.IBPluginDependency + 362.IBPluginDependency + 363.IBPluginDependency + 367.IBPluginDependency + 368.IBPluginDependency + 369.IBPluginDependency + 370.IBPluginDependency + 371.IBPluginDependency + 372.IBPluginDependency + 373.IBPluginDependency + 374.IBPluginDependency + 38.IBPluginDependency + 384.IBPluginDependency + 385.IBPluginDependency + 386.IBPluginDependency + 387.IBPluginDependency + 388.IBPluginDependency + 389.IBPluginDependency + 390.IBPluginDependency + 391.IBPluginDependency + 392.IBPluginDependency + 393.IBPluginDependency + 394.IBPluginDependency + 399.IBPluginDependency + 40.IBPluginDependency + 400.IBPluginDependency + 401.IBPluginDependency + 402.IBPluginDependency + 403.IBPluginDependency + 404.IBPluginDependency + 438.IBPluginDependency + 438.IBWindowTemplateEditedContentRect + 438.NSWindowTemplate.visibleAtLaunch + 439.IBPluginDependency + 44.IBPluginDependency + 440.IBPluginDependency + 441.IBPluginDependency + 442.IBPluginDependency + 443.IBPluginDependency + 444.IBPluginDependency + 445.IBPluginDependency + 446.IBPluginDependency + 447.IBPluginDependency + 448.IBPluginDependency + 449.IBPluginDependency + 450.IBPluginDependency + 451.IBPluginDependency + 452.IBPluginDependency + 453.IBPluginDependency + 454.IBPluginDependency + 455.IBPluginDependency + 460.IBPluginDependency + 461.IBPluginDependency + 462.IBPluginDependency + 463.IBPluginDependency + 5.IBPluginDependency + 5.IBWindowTemplateEditedContentRect + 6.IBPluginDependency + 6.IBUserGuides + 80.IBPluginDependency + 81.IBPluginDependency + 86.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{196, 842}, {458, 282}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{18, 726}, {567, 429}} + com.apple.InterfaceBuilder.CocoaPlugin + + YES + + + 318 + 1 + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 491 + + + + YES + + LatitudeSampleWindowController + NSWindowController + + YES + + YES + APIConsoleClicked: + addLocationClicked: + cancelLocationsFetchClicked: + clientIDClicked: + clientIDDoneClicked: + deleteLocationClicked: + getLocationsClicked: + locationRadioButtonClicked: + loggingCheckboxClicked: + signInClicked: + updateLocationClicked: + + + YES + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + APIConsoleClicked: + addLocationClicked: + cancelLocationsFetchClicked: + clientIDClicked: + clientIDDoneClicked: + deleteLocationClicked: + getLocationsClicked: + locationRadioButtonClicked: + loggingCheckboxClicked: + signInClicked: + updateLocationClicked: + + + YES + + APIConsoleClicked: + id + + + addLocationClicked: + id + + + cancelLocationsFetchClicked: + id + + + clientIDClicked: + id + + + clientIDDoneClicked: + id + + + deleteLocationClicked: + id + + + getLocationsClicked: + id + + + locationRadioButtonClicked: + id + + + loggingCheckboxClicked: + id + + + signInClicked: + id + + + updateLocationClicked: + id + + + + + YES + + YES + addLocationButton_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + datePicker_ + deleteLocationButton_ + granularityMatrix_ + latitudeField_ + locationsCancelButton_ + locationsProgressIndicator_ + locationsResultTextField_ + locationsTable_ + longitudeField_ + signedInButton_ + signedInField_ + timeMatrix_ + updateLocationButton_ + + + YES + NSButton + NSButton + NSTextField + NSTextField + NSWindow + NSTextField + NSDatePicker + NSButton + NSMatrix + NSTextField + NSButton + NSProgressIndicator + NSTextView + NSTableView + NSTextField + NSButton + NSTextField + NSMatrix + NSButton + + + + YES + + YES + addLocationButton_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + datePicker_ + deleteLocationButton_ + granularityMatrix_ + latitudeField_ + locationsCancelButton_ + locationsProgressIndicator_ + locationsResultTextField_ + locationsTable_ + longitudeField_ + signedInButton_ + signedInField_ + timeMatrix_ + updateLocationButton_ + + + YES + + addLocationButton_ + NSButton + + + clientIDButton_ + NSButton + + + clientIDField_ + NSTextField + + + clientIDRequiredTextField_ + NSTextField + + + clientIDSheet_ + NSWindow + + + clientSecretField_ + NSTextField + + + datePicker_ + NSDatePicker + + + deleteLocationButton_ + NSButton + + + granularityMatrix_ + NSMatrix + + + latitudeField_ + NSTextField + + + locationsCancelButton_ + NSButton + + + locationsProgressIndicator_ + NSProgressIndicator + + + locationsResultTextField_ + NSTextView + + + locationsTable_ + NSTableView + + + longitudeField_ + NSTextField + + + signedInButton_ + NSButton + + + signedInField_ + NSTextField + + + timeMatrix_ + NSMatrix + + + updateLocationButton_ + NSButton + + + + + IBProjectSource + ./Classes/LatitudeSampleWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + diff --git a/GTL/Examples/LatitudeSample/English.lproj/MainMenu.xib b/GTL/Examples/LatitudeSample/English.lproj/MainMenu.xib new file mode 100644 index 0000000..4131f3f --- /dev/null +++ b/GTL/Examples/LatitudeSample/English.lproj/MainMenu.xib @@ -0,0 +1,2280 @@ + + + + 1050 + 10D2063a + 762 + 1038.29 + 460.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 762 + + + YES + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + YES + + YES + + + YES + + + + YES + + + NSApplication + + + + FirstResponder + + + NSApplication + + + MainMenu + + YES + + + SampleApp + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + SampleApp + + YES + + + About the Sample + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + + Services + + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + + File + + + YES + + + New + n + 1048576 + 2147483647 + + + + + + Open... + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + + Open Recent + + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + Save As… + S + 1048576 + 2147483647 + + + + + + Revert + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup… + P + 1048576 + 2147483647 + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + + Edit + + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + + Find + + + YES + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1048576 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling + + 1048576 + 2147483647 + + + submenuAction: + + Spelling + + YES + + + Spelling… + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling as You Type + + 1048576 + 2147483647 + + + + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + + Window + + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + Help + + YES + + + Help + ? + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + LatitudeSampleAppController + + + + + YES + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + showHelp: + + + + 122 + + + + clearRecentDocuments: + + + + 127 + + + + terminate: + + + + 139 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + hideOtherApplications: + + + + 146 + + + + hide: + + + + 152 + + + + unhideAllApplications: + + + + 153 + + + + cut: + + + + 175 + + + + paste: + + + + 176 + + + + redo: + + + + 178 + + + + selectAll: + + + + 179 + + + + undo: + + + + 180 + + + + copy: + + + + 181 + + + + showGuessPanel: + + + + 188 + + + + checkSpelling: + + + + 190 + + + + toggleContinuousSpellChecking: + + + + 192 + + + + performClose: + + + + 193 + + + + delete: + + + + 195 + + + + performZoom: + + + + 198 + + + + performFindPanelAction: + + + + 199 + + + + performFindPanelAction: + + + + 200 + + + + performFindPanelAction: + + + + 201 + + + + performFindPanelAction: + + + + 202 + + + + centerSelectionInVisibleArea: + + + + 203 + + + + pasteAsPlainText: + + + + 205 + + + + delegate + + + + 223 + + + + delegate + + + + 225 + + + + + YES + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + MainMenu + + + 19 + + + YES + + + + + + 24 + + + YES + + + + + + + + + 5 + + + + + 23 + + + + + 92 + + + + + 197 + + + + + 56 + + + YES + + + + + + 57 + + + YES + + + + + + + + + + + + + + + + 58 + + + + + 129 + + + + + 131 + + + YES + + + + + + 130 + + + + + 134 + + + + + 136 + + + + + 143 + + + + + 144 + + + + + 145 + + + + + 149 + + + + + 150 + + + + + 196 + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + + + + + + + + 72 + + + + + 73 + + + + + 74 + + + + + 75 + + + + + 77 + + + + + 78 + + + + + 79 + + + + + 80 + + + + + 82 + + + + + 112 + + + + + 124 + + + YES + + + + + + 125 + + + YES + + + + + + 126 + + + + + 103 + + + YES + + + + + + 106 + + + YES + + + + + + 111 + + + + + 163 + + + YES + + + + + + 169 + + + YES + + + + + + + + + + + + + + + + + 156 + + + + + 157 + + + + + 158 + + + + + 160 + + + + + 164 + + + + + 168 + + + YES + + + + + + 159 + + + YES + + + + + + + + + + 154 + + + + + 155 + + + + + 161 + + + + + 162 + + + + + 167 + + + + + 171 + + + + + 172 + + + + + 173 + + + + + 174 + + + + + 184 + + + YES + + + + + + 185 + + + YES + + + + + + + + 187 + + + + + 189 + + + + + 191 + + + + + 204 + + + + + 222 + + + SampleAppController + + + + + YES + + YES + -3.IBPluginDependency + -3.ImportedFromIB2 + 103.IBPluginDependency + 103.ImportedFromIB2 + 106.IBPluginDependency + 106.ImportedFromIB2 + 111.IBPluginDependency + 111.ImportedFromIB2 + 112.IBPluginDependency + 112.ImportedFromIB2 + 124.IBPluginDependency + 124.ImportedFromIB2 + 125.IBPluginDependency + 125.ImportedFromIB2 + 126.IBPluginDependency + 126.ImportedFromIB2 + 129.IBPluginDependency + 129.ImportedFromIB2 + 130.IBPluginDependency + 130.ImportedFromIB2 + 131.IBPluginDependency + 131.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 136.IBPluginDependency + 136.ImportedFromIB2 + 143.IBPluginDependency + 143.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 145.IBPluginDependency + 145.ImportedFromIB2 + 149.IBPluginDependency + 149.ImportedFromIB2 + 150.IBPluginDependency + 150.ImportedFromIB2 + 154.IBPluginDependency + 154.ImportedFromIB2 + 155.IBPluginDependency + 155.ImportedFromIB2 + 156.IBPluginDependency + 156.ImportedFromIB2 + 157.IBPluginDependency + 157.ImportedFromIB2 + 158.IBPluginDependency + 158.ImportedFromIB2 + 159.IBPluginDependency + 159.ImportedFromIB2 + 160.IBPluginDependency + 160.ImportedFromIB2 + 161.IBPluginDependency + 161.ImportedFromIB2 + 162.IBPluginDependency + 162.ImportedFromIB2 + 163.IBPluginDependency + 163.ImportedFromIB2 + 164.IBPluginDependency + 164.ImportedFromIB2 + 167.IBPluginDependency + 167.ImportedFromIB2 + 168.IBPluginDependency + 168.ImportedFromIB2 + 169.IBPluginDependency + 169.ImportedFromIB2 + 171.IBPluginDependency + 171.ImportedFromIB2 + 172.IBPluginDependency + 172.ImportedFromIB2 + 173.IBPluginDependency + 173.ImportedFromIB2 + 174.IBPluginDependency + 174.ImportedFromIB2 + 184.IBPluginDependency + 184.ImportedFromIB2 + 185.IBPluginDependency + 185.ImportedFromIB2 + 187.IBPluginDependency + 187.ImportedFromIB2 + 189.IBPluginDependency + 189.ImportedFromIB2 + 19.IBPluginDependency + 19.ImportedFromIB2 + 191.IBPluginDependency + 191.ImportedFromIB2 + 196.IBPluginDependency + 196.ImportedFromIB2 + 197.IBPluginDependency + 197.ImportedFromIB2 + 204.IBPluginDependency + 204.ImportedFromIB2 + 222.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 24.IBPluginDependency + 24.ImportedFromIB2 + 29.IBPluginDependency + 29.ImportedFromIB2 + 5.IBPluginDependency + 5.ImportedFromIB2 + 56.IBPluginDependency + 56.ImportedFromIB2 + 57.IBPluginDependency + 57.ImportedFromIB2 + 58.IBPluginDependency + 58.ImportedFromIB2 + 72.IBPluginDependency + 72.ImportedFromIB2 + 73.IBPluginDependency + 73.ImportedFromIB2 + 74.IBPluginDependency + 74.ImportedFromIB2 + 75.IBPluginDependency + 75.ImportedFromIB2 + 77.IBPluginDependency + 77.ImportedFromIB2 + 78.IBPluginDependency + 78.ImportedFromIB2 + 79.IBPluginDependency + 79.ImportedFromIB2 + 80.IBPluginDependency + 80.ImportedFromIB2 + 81.IBPluginDependency + 81.ImportedFromIB2 + 82.IBPluginDependency + 82.ImportedFromIB2 + 83.IBPluginDependency + 83.ImportedFromIB2 + 92.IBPluginDependency + 92.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + + YES + + + + + YES + + + YES + + + + 227 + + + + YES + + FirstResponder + NSObject + + IBUserSource + + + + + LatitudeSampleAppController + NSObject + + IBProjectSource + LatitudeSampleAppController.h + + + + + YES + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSBrowser + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSBrowser.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSDocument + NSObject + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + id + id + id + id + id + id + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocument.h + + + + NSDocument + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentScripting.h + + + + NSDocumentController + NSObject + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + id + id + id + id + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentController.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSMatrix + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSMatrix.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSMenuItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSMovieView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSMovieView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebEditingDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebFrameLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebJavaPlugIn.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPlugin.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPluginContainer.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPolicyDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebResourceLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebScriptObject.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebUIDelegate.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSTableView + NSControl + + + + NSText + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSText.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + + WebView + NSView + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + id + id + id + id + id + id + id + id + id + id + id + + + + IBFrameworkSource + WebKit.framework/Headers/WebView.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../LatitudeSample.xcodeproj + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {9, 8} + {7, 2} + + + + diff --git a/GTL/Examples/LatitudeSample/Info.plist b/GTL/Examples/LatitudeSample/Info.plist new file mode 100644 index 0000000..10540ef --- /dev/null +++ b/GTL/Examples/LatitudeSample/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.example.LatitudeSample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/GTL/Examples/LatitudeSample/LatitudeSample.xcodeproj/.svn/all-wcprops b/GTL/Examples/LatitudeSample/LatitudeSample.xcodeproj/.svn/all-wcprops new file mode 100644 index 0000000..d70e331 --- /dev/null +++ b/GTL/Examples/LatitudeSample/LatitudeSample.xcodeproj/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/154/trunk/Examples/LatitudeSample/LatitudeSample.xcodeproj +END +project.pbxproj +K 25 +svn:wc:ra_dav:version-url +V 88 +/svn/!svn/ver/154/trunk/Examples/LatitudeSample/LatitudeSample.xcodeproj/project.pbxproj +END diff --git a/GTL/Examples/LatitudeSample/LatitudeSample.xcodeproj/.svn/entries b/GTL/Examples/LatitudeSample/LatitudeSample.xcodeproj/.svn/entries new file mode 100644 index 0000000..740c4c8 --- /dev/null +++ b/GTL/Examples/LatitudeSample/LatitudeSample.xcodeproj/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/LatitudeSample/LatitudeSample.xcodeproj +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +project.pbxproj +file + + + + +2012-12-09T08:42:34.000000Z +195e4cb81b2cc2d7b0408d8918f4757c +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +23069 + diff --git a/GTL/Examples/LatitudeSample/LatitudeSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base b/GTL/Examples/LatitudeSample/LatitudeSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base new file mode 100644 index 0000000..ee3c482 --- /dev/null +++ b/GTL/Examples/LatitudeSample/LatitudeSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base @@ -0,0 +1,525 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F22A2141186315400FFBAB6 /* WebKit.framework */; }; + 4F244586121F0B8700FEE1DA /* GTL.framework in Copy GTL.framework */ = {isa = PBXBuildFile; fileRef = 4F24457F121F0B8300FEE1DA /* GTL.framework */; }; + 4F244587121F0B8A00FEE1DA /* GTL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F24457F121F0B8300FEE1DA /* GTL.framework */; }; + 4F3472A51405718C00D3CE42 /* GTLLatitudeConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3472A41405718C00D3CE42 /* GTLLatitudeConstants.m */; }; + 4F6293CE11CC193500BE36DD /* LatitudeSampleAppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F6293CB11CC193500BE36DD /* LatitudeSampleAppController.m */; }; + 4F6293CF11CC193500BE36DD /* LatitudeSampleWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F6293CD11CC193500BE36DD /* LatitudeSampleWindowController.m */; }; + 4F6293F811CC21A000BE36DD /* LatitudeSampleWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F6293F611CC21A000BE36DD /* LatitudeSampleWindow.xib */; }; + 4FA527CA13F07DA100D6873C /* GTLLatitudeLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FA527C313F07DA100D6873C /* GTLLatitudeLocation.m */; }; + 4FA527CB13F07DA100D6873C /* GTLLatitudeLocationFeed.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FA527C513F07DA100D6873C /* GTLLatitudeLocationFeed.m */; }; + 4FA527CC13F07DA100D6873C /* GTLQueryLatitude.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FA527C713F07DA100D6873C /* GTLQueryLatitude.m */; }; + 4FA527CD13F07DA100D6873C /* GTLServiceLatitude.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FA527C913F07DA100D6873C /* GTLServiceLatitude.m */; }; + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */; }; + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4F24457E121F0B8300FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F38F6A60B66E91D00B24B81; + remoteInfo = GTLFramework; + }; + 4F244580121F0B8300FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027C11A4CA2F00BEB470; + remoteInfo = GTLTouchStaticLib; + }; + 4F244582121F0B8300FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027D11A4CA2F00BEB470; + remoteInfo = GTLUnitTests; + }; + 4F244584121F0B8300FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F1AD9020B71603F00DC0485; + remoteInfo = DevelopmentTestTool; + }; + 4F72435E12233E7D001A4AD0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 4F38F6A50B66E91D00B24B81; + remoteInfo = GTLFramework; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 4F38F8970B66FAB700B24B81 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4F62921C11CAE5F700BE36DD /* Copy GTL.framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4F244586121F0B8700FEE1DA /* GTL.framework in Copy GTL.framework */, + ); + name = "Copy GTL.framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 4F22A2141186315400FFBAB6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; + 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GTL.xcodeproj; path = ../../Source/GTL.xcodeproj; sourceTree = SOURCE_ROOT; }; + 4F3472A31405718C00D3CE42 /* GTLLatitudeConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLLatitudeConstants.h; sourceTree = ""; }; + 4F3472A41405718C00D3CE42 /* GTLLatitudeConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLLatitudeConstants.m; sourceTree = ""; }; + 4F6293CA11CC193500BE36DD /* LatitudeSampleAppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LatitudeSampleAppController.h; sourceTree = ""; }; + 4F6293CB11CC193500BE36DD /* LatitudeSampleAppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LatitudeSampleAppController.m; sourceTree = ""; }; + 4F6293CC11CC193500BE36DD /* LatitudeSampleWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LatitudeSampleWindowController.h; sourceTree = ""; }; + 4F6293CD11CC193500BE36DD /* LatitudeSampleWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LatitudeSampleWindowController.m; sourceTree = ""; }; + 4F6293F711CC21A000BE36DD /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/LatitudeSampleWindow.xib; sourceTree = ""; }; + 4FA527C113F07DA100D6873C /* GTLLatitude.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLLatitude.h; sourceTree = ""; }; + 4FA527C213F07DA100D6873C /* GTLLatitudeLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLLatitudeLocation.h; sourceTree = ""; }; + 4FA527C313F07DA100D6873C /* GTLLatitudeLocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLLatitudeLocation.m; sourceTree = ""; }; + 4FA527C413F07DA100D6873C /* GTLLatitudeLocationFeed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLLatitudeLocationFeed.h; sourceTree = ""; }; + 4FA527C513F07DA100D6873C /* GTLLatitudeLocationFeed.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLLatitudeLocationFeed.m; sourceTree = ""; }; + 4FA527C613F07DA100D6873C /* GTLQueryLatitude.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLQueryLatitude.h; sourceTree = ""; }; + 4FA527C713F07DA100D6873C /* GTLQueryLatitude.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLQueryLatitude.m; sourceTree = ""; }; + 4FA527C813F07DA100D6873C /* GTLServiceLatitude.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLServiceLatitude.h; sourceTree = ""; }; + 4FA527C913F07DA100D6873C /* GTLServiceLatitude.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLServiceLatitude.m; sourceTree = ""; }; + 4FA6F3D21034AEC400C5DFA5 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; + 4FD0F1D90CBC68F300059DC1 /* buildCopyScript */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = buildCopyScript; sourceTree = ""; }; + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = buildStripHeaders; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 8D1107320486CEB800E47090 /* LatitudeSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LatitudeSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F244587121F0B8A00FEE1DA /* GTL.framework in Frameworks */, + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 4F6293CA11CC193500BE36DD /* LatitudeSampleAppController.h */, + 4F6293CB11CC193500BE36DD /* LatitudeSampleAppController.m */, + 4F6293CC11CC193500BE36DD /* LatitudeSampleWindowController.h */, + 4F6293CD11CC193500BE36DD /* LatitudeSampleWindowController.m */, + ); + name = Classes; + sourceTree = ""; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 4F22A2141186315400FFBAB6 /* WebKit.framework */, + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* LatitudeSample.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CalendarSample */ = { + isa = PBXGroup; + children = ( + 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */, + 080E96DDFE201D6D7F000001 /* Classes */, + 4FA527BC13F07D8700D6873C /* API Services */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CalendarSample; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 4F6293F611CC21A000BE36DD /* LatitudeSampleWindow.xib */, + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */, + 8D1107310486CEB800E47090 /* Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4F244578121F0B8300FEE1DA /* Products */ = { + isa = PBXGroup; + children = ( + 4F24457F121F0B8300FEE1DA /* GTL.framework */, + 4F244581121F0B8300FEE1DA /* libGTLTouchStaticLib.a */, + 4F244583121F0B8300FEE1DA /* GTLUnitTests.octest */, + 4F244585121F0B8300FEE1DA /* DevelopmentTestTool */, + ); + name = Products; + sourceTree = ""; + }; + 4FA527BC13F07D8700D6873C /* API Services */ = { + isa = PBXGroup; + children = ( + 4FA527BF13F07DA100D6873C /* Latitude */, + ); + name = "API Services"; + sourceTree = ""; + }; + 4FA527BF13F07DA100D6873C /* Latitude */ = { + isa = PBXGroup; + children = ( + 4FA527C013F07DA100D6873C /* Generated */, + ); + name = Latitude; + path = ../../Source/Services/Latitude; + sourceTree = SOURCE_ROOT; + }; + 4FA527C013F07DA100D6873C /* Generated */ = { + isa = PBXGroup; + children = ( + 4FA527C113F07DA100D6873C /* GTLLatitude.h */, + 4F3472A31405718C00D3CE42 /* GTLLatitudeConstants.h */, + 4F3472A41405718C00D3CE42 /* GTLLatitudeConstants.m */, + 4FA527C213F07DA100D6873C /* GTLLatitudeLocation.h */, + 4FA527C313F07DA100D6873C /* GTLLatitudeLocation.m */, + 4FA527C413F07DA100D6873C /* GTLLatitudeLocationFeed.h */, + 4FA527C513F07DA100D6873C /* GTLLatitudeLocationFeed.m */, + 4FA527C613F07DA100D6873C /* GTLQueryLatitude.h */, + 4FA527C713F07DA100D6873C /* GTLQueryLatitude.m */, + 4FA527C813F07DA100D6873C /* GTLServiceLatitude.h */, + 4FA527C913F07DA100D6873C /* GTLServiceLatitude.m */, + ); + path = Generated; + sourceTree = ""; + }; + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */ = { + isa = PBXGroup; + children = ( + 4FD0F1D90CBC68F300059DC1 /* buildCopyScript */, + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */, + ); + name = "Build Scripts"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* LatitudeSample */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "LatitudeSample" */; + buildPhases = ( + 4F62921C11CAE5F700BE36DD /* Copy GTL.framework */, + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + 4F38F8970B66FAB700B24B81 /* CopyFiles */, + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */, + ); + buildRules = ( + ); + dependencies = ( + 4F72435F12233E7D001A4AD0 /* PBXTargetDependency */, + ); + name = LatitudeSample; + productInstallPath = "$(HOME)/Applications"; + productName = CalendarSample; + productReference = 8D1107320486CEB800E47090 /* LatitudeSample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "LatitudeSample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CalendarSample */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 4F244578121F0B8300FEE1DA /* Products */; + ProjectRef = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* LatitudeSample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 4F24457F121F0B8300FEE1DA /* GTL.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = GTL.framework; + remoteRef = 4F24457E121F0B8300FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F244581121F0B8300FEE1DA /* libGTLTouchStaticLib.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libGTLTouchStaticLib.a; + remoteRef = 4F244580121F0B8300FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F244583121F0B8300FEE1DA /* GTLUnitTests.octest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = GTLUnitTests.octest; + remoteRef = 4F244582121F0B8300FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F244585121F0B8300FEE1DA /* DevelopmentTestTool */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = DevelopmentTestTool; + remoteRef = 4F244584121F0B8300FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */, + 4F6293F811CC21A000BE36DD /* LatitudeSampleWindow.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Strip Headers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ./buildStripHeaders; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072D0486CEB800E47090 /* main.m in Sources */, + 4F6293CE11CC193500BE36DD /* LatitudeSampleAppController.m in Sources */, + 4F6293CF11CC193500BE36DD /* LatitudeSampleWindowController.m in Sources */, + 4FA527CA13F07DA100D6873C /* GTLLatitudeLocation.m in Sources */, + 4FA527CB13F07DA100D6873C /* GTLLatitudeLocationFeed.m in Sources */, + 4FA527CC13F07DA100D6873C /* GTLQueryLatitude.m in Sources */, + 4FA527CD13F07DA100D6873C /* GTLServiceLatitude.m in Sources */, + 4F3472A51405718C00D3CE42 /* GTLLatitudeConstants.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 4F72435F12233E7D001A4AD0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = GTLFramework; + targetProxy = 4F72435E12233E7D001A4AD0 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C165DFE840E0CC02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 4F6293F611CC21A000BE36DD /* LatitudeSampleWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 4F6293F711CC21A000BE36DD /* English */, + ); + name = LatitudeSampleWindow.xib; + sourceTree = ""; + }; + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 4FA6F3D21034AEC400C5DFA5 /* English */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = LatitudeSample; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = LatitudeSample; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = ( + "-DGTL_BUILT_AS_FRAMEWORK=1", + "-DDEBUG=1", + ); + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DGTL_BUILT_AS_FRAMEWORK=1"; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "LatitudeSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "LatitudeSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/GTL/Examples/LatitudeSample/LatitudeSample.xcodeproj/project.pbxproj b/GTL/Examples/LatitudeSample/LatitudeSample.xcodeproj/project.pbxproj new file mode 100644 index 0000000..ee3c482 --- /dev/null +++ b/GTL/Examples/LatitudeSample/LatitudeSample.xcodeproj/project.pbxproj @@ -0,0 +1,525 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F22A2141186315400FFBAB6 /* WebKit.framework */; }; + 4F244586121F0B8700FEE1DA /* GTL.framework in Copy GTL.framework */ = {isa = PBXBuildFile; fileRef = 4F24457F121F0B8300FEE1DA /* GTL.framework */; }; + 4F244587121F0B8A00FEE1DA /* GTL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F24457F121F0B8300FEE1DA /* GTL.framework */; }; + 4F3472A51405718C00D3CE42 /* GTLLatitudeConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3472A41405718C00D3CE42 /* GTLLatitudeConstants.m */; }; + 4F6293CE11CC193500BE36DD /* LatitudeSampleAppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F6293CB11CC193500BE36DD /* LatitudeSampleAppController.m */; }; + 4F6293CF11CC193500BE36DD /* LatitudeSampleWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F6293CD11CC193500BE36DD /* LatitudeSampleWindowController.m */; }; + 4F6293F811CC21A000BE36DD /* LatitudeSampleWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F6293F611CC21A000BE36DD /* LatitudeSampleWindow.xib */; }; + 4FA527CA13F07DA100D6873C /* GTLLatitudeLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FA527C313F07DA100D6873C /* GTLLatitudeLocation.m */; }; + 4FA527CB13F07DA100D6873C /* GTLLatitudeLocationFeed.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FA527C513F07DA100D6873C /* GTLLatitudeLocationFeed.m */; }; + 4FA527CC13F07DA100D6873C /* GTLQueryLatitude.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FA527C713F07DA100D6873C /* GTLQueryLatitude.m */; }; + 4FA527CD13F07DA100D6873C /* GTLServiceLatitude.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FA527C913F07DA100D6873C /* GTLServiceLatitude.m */; }; + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */; }; + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4F24457E121F0B8300FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F38F6A60B66E91D00B24B81; + remoteInfo = GTLFramework; + }; + 4F244580121F0B8300FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027C11A4CA2F00BEB470; + remoteInfo = GTLTouchStaticLib; + }; + 4F244582121F0B8300FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027D11A4CA2F00BEB470; + remoteInfo = GTLUnitTests; + }; + 4F244584121F0B8300FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F1AD9020B71603F00DC0485; + remoteInfo = DevelopmentTestTool; + }; + 4F72435E12233E7D001A4AD0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 4F38F6A50B66E91D00B24B81; + remoteInfo = GTLFramework; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 4F38F8970B66FAB700B24B81 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4F62921C11CAE5F700BE36DD /* Copy GTL.framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4F244586121F0B8700FEE1DA /* GTL.framework in Copy GTL.framework */, + ); + name = "Copy GTL.framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 4F22A2141186315400FFBAB6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; + 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GTL.xcodeproj; path = ../../Source/GTL.xcodeproj; sourceTree = SOURCE_ROOT; }; + 4F3472A31405718C00D3CE42 /* GTLLatitudeConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLLatitudeConstants.h; sourceTree = ""; }; + 4F3472A41405718C00D3CE42 /* GTLLatitudeConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLLatitudeConstants.m; sourceTree = ""; }; + 4F6293CA11CC193500BE36DD /* LatitudeSampleAppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LatitudeSampleAppController.h; sourceTree = ""; }; + 4F6293CB11CC193500BE36DD /* LatitudeSampleAppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LatitudeSampleAppController.m; sourceTree = ""; }; + 4F6293CC11CC193500BE36DD /* LatitudeSampleWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LatitudeSampleWindowController.h; sourceTree = ""; }; + 4F6293CD11CC193500BE36DD /* LatitudeSampleWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LatitudeSampleWindowController.m; sourceTree = ""; }; + 4F6293F711CC21A000BE36DD /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/LatitudeSampleWindow.xib; sourceTree = ""; }; + 4FA527C113F07DA100D6873C /* GTLLatitude.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLLatitude.h; sourceTree = ""; }; + 4FA527C213F07DA100D6873C /* GTLLatitudeLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLLatitudeLocation.h; sourceTree = ""; }; + 4FA527C313F07DA100D6873C /* GTLLatitudeLocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLLatitudeLocation.m; sourceTree = ""; }; + 4FA527C413F07DA100D6873C /* GTLLatitudeLocationFeed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLLatitudeLocationFeed.h; sourceTree = ""; }; + 4FA527C513F07DA100D6873C /* GTLLatitudeLocationFeed.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLLatitudeLocationFeed.m; sourceTree = ""; }; + 4FA527C613F07DA100D6873C /* GTLQueryLatitude.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLQueryLatitude.h; sourceTree = ""; }; + 4FA527C713F07DA100D6873C /* GTLQueryLatitude.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLQueryLatitude.m; sourceTree = ""; }; + 4FA527C813F07DA100D6873C /* GTLServiceLatitude.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLServiceLatitude.h; sourceTree = ""; }; + 4FA527C913F07DA100D6873C /* GTLServiceLatitude.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLServiceLatitude.m; sourceTree = ""; }; + 4FA6F3D21034AEC400C5DFA5 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; + 4FD0F1D90CBC68F300059DC1 /* buildCopyScript */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = buildCopyScript; sourceTree = ""; }; + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = buildStripHeaders; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 8D1107320486CEB800E47090 /* LatitudeSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LatitudeSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F244587121F0B8A00FEE1DA /* GTL.framework in Frameworks */, + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 4F6293CA11CC193500BE36DD /* LatitudeSampleAppController.h */, + 4F6293CB11CC193500BE36DD /* LatitudeSampleAppController.m */, + 4F6293CC11CC193500BE36DD /* LatitudeSampleWindowController.h */, + 4F6293CD11CC193500BE36DD /* LatitudeSampleWindowController.m */, + ); + name = Classes; + sourceTree = ""; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 4F22A2141186315400FFBAB6 /* WebKit.framework */, + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* LatitudeSample.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CalendarSample */ = { + isa = PBXGroup; + children = ( + 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */, + 080E96DDFE201D6D7F000001 /* Classes */, + 4FA527BC13F07D8700D6873C /* API Services */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CalendarSample; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 4F6293F611CC21A000BE36DD /* LatitudeSampleWindow.xib */, + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */, + 8D1107310486CEB800E47090 /* Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4F244578121F0B8300FEE1DA /* Products */ = { + isa = PBXGroup; + children = ( + 4F24457F121F0B8300FEE1DA /* GTL.framework */, + 4F244581121F0B8300FEE1DA /* libGTLTouchStaticLib.a */, + 4F244583121F0B8300FEE1DA /* GTLUnitTests.octest */, + 4F244585121F0B8300FEE1DA /* DevelopmentTestTool */, + ); + name = Products; + sourceTree = ""; + }; + 4FA527BC13F07D8700D6873C /* API Services */ = { + isa = PBXGroup; + children = ( + 4FA527BF13F07DA100D6873C /* Latitude */, + ); + name = "API Services"; + sourceTree = ""; + }; + 4FA527BF13F07DA100D6873C /* Latitude */ = { + isa = PBXGroup; + children = ( + 4FA527C013F07DA100D6873C /* Generated */, + ); + name = Latitude; + path = ../../Source/Services/Latitude; + sourceTree = SOURCE_ROOT; + }; + 4FA527C013F07DA100D6873C /* Generated */ = { + isa = PBXGroup; + children = ( + 4FA527C113F07DA100D6873C /* GTLLatitude.h */, + 4F3472A31405718C00D3CE42 /* GTLLatitudeConstants.h */, + 4F3472A41405718C00D3CE42 /* GTLLatitudeConstants.m */, + 4FA527C213F07DA100D6873C /* GTLLatitudeLocation.h */, + 4FA527C313F07DA100D6873C /* GTLLatitudeLocation.m */, + 4FA527C413F07DA100D6873C /* GTLLatitudeLocationFeed.h */, + 4FA527C513F07DA100D6873C /* GTLLatitudeLocationFeed.m */, + 4FA527C613F07DA100D6873C /* GTLQueryLatitude.h */, + 4FA527C713F07DA100D6873C /* GTLQueryLatitude.m */, + 4FA527C813F07DA100D6873C /* GTLServiceLatitude.h */, + 4FA527C913F07DA100D6873C /* GTLServiceLatitude.m */, + ); + path = Generated; + sourceTree = ""; + }; + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */ = { + isa = PBXGroup; + children = ( + 4FD0F1D90CBC68F300059DC1 /* buildCopyScript */, + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */, + ); + name = "Build Scripts"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* LatitudeSample */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "LatitudeSample" */; + buildPhases = ( + 4F62921C11CAE5F700BE36DD /* Copy GTL.framework */, + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + 4F38F8970B66FAB700B24B81 /* CopyFiles */, + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */, + ); + buildRules = ( + ); + dependencies = ( + 4F72435F12233E7D001A4AD0 /* PBXTargetDependency */, + ); + name = LatitudeSample; + productInstallPath = "$(HOME)/Applications"; + productName = CalendarSample; + productReference = 8D1107320486CEB800E47090 /* LatitudeSample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "LatitudeSample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CalendarSample */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 4F244578121F0B8300FEE1DA /* Products */; + ProjectRef = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* LatitudeSample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 4F24457F121F0B8300FEE1DA /* GTL.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = GTL.framework; + remoteRef = 4F24457E121F0B8300FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F244581121F0B8300FEE1DA /* libGTLTouchStaticLib.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libGTLTouchStaticLib.a; + remoteRef = 4F244580121F0B8300FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F244583121F0B8300FEE1DA /* GTLUnitTests.octest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = GTLUnitTests.octest; + remoteRef = 4F244582121F0B8300FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F244585121F0B8300FEE1DA /* DevelopmentTestTool */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = DevelopmentTestTool; + remoteRef = 4F244584121F0B8300FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */, + 4F6293F811CC21A000BE36DD /* LatitudeSampleWindow.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Strip Headers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ./buildStripHeaders; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072D0486CEB800E47090 /* main.m in Sources */, + 4F6293CE11CC193500BE36DD /* LatitudeSampleAppController.m in Sources */, + 4F6293CF11CC193500BE36DD /* LatitudeSampleWindowController.m in Sources */, + 4FA527CA13F07DA100D6873C /* GTLLatitudeLocation.m in Sources */, + 4FA527CB13F07DA100D6873C /* GTLLatitudeLocationFeed.m in Sources */, + 4FA527CC13F07DA100D6873C /* GTLQueryLatitude.m in Sources */, + 4FA527CD13F07DA100D6873C /* GTLServiceLatitude.m in Sources */, + 4F3472A51405718C00D3CE42 /* GTLLatitudeConstants.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 4F72435F12233E7D001A4AD0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = GTLFramework; + targetProxy = 4F72435E12233E7D001A4AD0 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C165DFE840E0CC02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 4F6293F611CC21A000BE36DD /* LatitudeSampleWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 4F6293F711CC21A000BE36DD /* English */, + ); + name = LatitudeSampleWindow.xib; + sourceTree = ""; + }; + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 4FA6F3D21034AEC400C5DFA5 /* English */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = LatitudeSample; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = LatitudeSample; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = ( + "-DGTL_BUILT_AS_FRAMEWORK=1", + "-DDEBUG=1", + ); + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DGTL_BUILT_AS_FRAMEWORK=1"; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "LatitudeSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "LatitudeSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/GTL/Examples/LatitudeSample/LatitudeSampleAppController.h b/GTL/Examples/LatitudeSample/LatitudeSampleAppController.h new file mode 100644 index 0000000..1f3eaed --- /dev/null +++ b/GTL/Examples/LatitudeSample/LatitudeSampleAppController.h @@ -0,0 +1,23 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// LatitudeSampleAppController.h +// + +#import + +@interface LatitudeSampleAppController : NSObject +@end diff --git a/GTL/Examples/LatitudeSample/LatitudeSampleAppController.m b/GTL/Examples/LatitudeSample/LatitudeSampleAppController.m new file mode 100644 index 0000000..1e50ef1 --- /dev/null +++ b/GTL/Examples/LatitudeSample/LatitudeSampleAppController.m @@ -0,0 +1,37 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// LatitudeSampleAppController.m +// + +#import "LatitudeSampleAppController.h" +#import "LatitudeSampleWindowController.h" + +@implementation LatitudeSampleAppController + +- (void)applicationWillFinishLaunching:(NSNotification *)notification { + + LatitudeSampleWindowController* windowController + = [LatitudeSampleWindowController sharedWindowController]; + [windowController showWindow:self]; + +} + +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { + return YES; +} + +@end diff --git a/GTL/Examples/LatitudeSample/LatitudeSampleWindowController.h b/GTL/Examples/LatitudeSample/LatitudeSampleWindowController.h new file mode 100644 index 0000000..fda19ab --- /dev/null +++ b/GTL/Examples/LatitudeSample/LatitudeSampleWindowController.h @@ -0,0 +1,83 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// LatitudeSampleWindowController.h +// + +#import +#import + +#import "GTLLatitude.h" + +@interface LatitudeSampleWindowController : NSWindowController { + @private + IBOutlet NSTextField *signedInField_; + IBOutlet NSButton *signedInButton_; + + IBOutlet NSMatrix *timeMatrix_; + IBOutlet NSMatrix *granularityMatrix_; + + IBOutlet NSTableView *locationsTable_; + IBOutlet NSProgressIndicator *locationsProgressIndicator_; + IBOutlet NSTextView *locationsResultTextField_; + IBOutlet NSButton *locationsCancelButton_; + + IBOutlet NSTextField *latitudeField_; + IBOutlet NSTextField *longitudeField_; + IBOutlet NSDatePicker *datePicker_; + + IBOutlet NSButton *addLocationButton_; + IBOutlet NSButton *updateLocationButton_; + IBOutlet NSButton *deleteLocationButton_; + + // client ID sheet + IBOutlet NSButton *clientIDButton_; + IBOutlet NSTextField *clientIDRequiredTextField_; + IBOutlet NSWindow *clientIDSheet_; + IBOutlet NSTextField *clientIDField_; + IBOutlet NSTextField *clientSecretField_; + + GTLLatitudeLocationFeed *locationsFeed_; + GTLServiceTicket *locationsTicket_; + NSError *locationsFetchError_; + + GTLServiceTicket *editLocationTicket_; +} + +@property (retain, nonatomic) GTLLatitudeLocationFeed *locationsFeed; +@property (retain, nonatomic) GTLServiceTicket *locationsTicket; +@property (retain, nonatomic) NSError *locationsFetchError; + +@property (retain, nonatomic) GTLServiceTicket *editLocationTicket; + ++ (LatitudeSampleWindowController *)sharedWindowController; + +- (IBAction)signInClicked:(id)sender; + +- (IBAction)getLocationsClicked:(id)sender; +- (IBAction)cancelLocationsFetchClicked:(id)sender; +- (IBAction)locationRadioButtonClicked:(id)sender; + +- (IBAction)addLocationClicked:(id)sender; +- (IBAction)updateLocationClicked:(id)sender; +- (IBAction)deleteLocationClicked:(id)sender; + +- (IBAction)clientIDClicked:(id)sender; +- (IBAction)clientIDDoneClicked:(id)sender; + +- (IBAction)APIConsoleClicked:(id)sender; +- (IBAction)loggingCheckboxClicked:(id)sender; +@end diff --git a/GTL/Examples/LatitudeSample/LatitudeSampleWindowController.m b/GTL/Examples/LatitudeSample/LatitudeSampleWindowController.m new file mode 100644 index 0000000..651e361 --- /dev/null +++ b/GTL/Examples/LatitudeSample/LatitudeSampleWindowController.m @@ -0,0 +1,583 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// LatitudeSampleWindowController.m +// + +#import "LatitudeSampleWindowController.h" + +#import "GTL/GTMOAuth2WindowController.h" +#import "GTL/GTMHTTPFetcherLogging.h" + +@interface LatitudeSampleWindowController () + +@property (readonly) GTLServiceLatitude *latitudeService; + +- (void)updateUI; +- (void)displayAlert:(NSString *)title format:(NSString *)format, ...; + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel; +- (GTLLatitudeLocation *)selectedLocationItem; + +- (BOOL)isHistorySelected; +- (BOOL)isBestGranularitySelected; +- (void)setLocationForTimestamp:(NSString *)timestamp; + +- (void)fetchLocations; +- (void)deleteLocation; + +@end + +NSString *const kKeychainItemName = @"Latitude Sample: Google Latitude"; + +@implementation LatitudeSampleWindowController + +@synthesize locationsFeed = locationsFeed_, + locationsTicket = locationsTicket_, + locationsFetchError = locationsFetchError_, + editLocationTicket = editLocationTicket_; + ++ (LatitudeSampleWindowController *)sharedWindowController { + static LatitudeSampleWindowController* gWindowController = nil; + if (!gWindowController) { + gWindowController = [[LatitudeSampleWindowController alloc] init]; + } + return gWindowController; +} + + +- (id)init { + return [self initWithWindowNibName:@"LatitudeSampleWindow"]; +} + +- (void)awakeFromNib { + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + GTMOAuth2Authentication *auth; + auth = [GTMOAuth2WindowController authForGoogleFromKeychainForName:kKeychainItemName + clientID:clientID + clientSecret:clientSecret]; + [self.latitudeService setAuthorizer:auth]; + + // Set the result text fields to have a distinctive color and mono-spaced font + [locationsResultTextField_ setTextColor:[NSColor darkGrayColor]]; + + NSFont *resultTextFont = [NSFont fontWithName:@"Monaco" size:9]; + [locationsResultTextField_ setFont:resultTextFont]; + + [datePicker_ setDateValue:[NSDate date]]; + + // We'll try to use the location manager to initialize the latitude/logitude + // text fields to the current location + [self updateUI]; +} + +- (void)dealloc { + [locationsFeed_ release]; + [locationsTicket_ release]; + [locationsFetchError_ release]; + [editLocationTicket_ release]; + + [super dealloc]; +} + +#pragma mark - + +- (NSString *)signedInUsername { + // Get the email address of the signed-in user + GTLServiceLatitude *service = self.latitudeService; + GTMOAuth2Authentication *auth = [service authorizer]; + BOOL isSignedIn = [auth canAuthorize]; + if (isSignedIn) { + return [auth userEmail]; + } else { + return nil; + } +} + +- (BOOL)isSignedIn { + NSString *name = [self signedInUsername]; + return (name != nil); +} + +#pragma mark IBActions + ++ (NSString *)timestampForDate:(NSDate *)date { + NSTimeInterval seconds = [date timeIntervalSince1970]; + double millisecs = seconds * 1000.0; + unsigned long long val = (long long)millisecs; + NSString *str = [NSString stringWithFormat:@"%qu", val]; + return str; +} + ++ (NSDate *)dateForTimestamp:(NSString *)timestamp { + // the server returns timestamp as a string, milliseconds since the unix epoch + long long val = [timestamp longLongValue]; + NSTimeInterval seconds = (NSTimeInterval)val / 1000.0; + NSDate *date = [NSDate dateWithTimeIntervalSince1970:seconds]; + return date; +} + +- (IBAction)signInClicked:(id)sender { + if (![self isSignedIn]) { + // sign in + [self runSigninThenInvokeSelector:@selector(updateUI)]; + } else { + // sign out + GTLServiceLatitude *service = self.latitudeService; + + [GTMOAuth2WindowController removeAuthFromKeychainForName:kKeychainItemName]; + [service setAuthorizer:nil]; + [self updateUI]; + } +} + +- (IBAction)getLocationsClicked:(id)sender { + if (![self isSignedIn]) { + [self runSigninThenInvokeSelector:@selector(fetchLocations)]; + } else { + [self fetchLocations]; + } +} + +- (IBAction)cancelLocationsFetchClicked:(id)sender { + // cancel any location feed fetch + [self.locationsTicket cancelTicket]; + [self setLocationsTicket:nil]; + + // cancel if we're editing the location + [self.editLocationTicket cancelTicket]; + [self setEditLocationTicket:nil]; + + [self updateUI]; +} + +- (IBAction)locationRadioButtonClicked:(id)sender { + // enabled/disable buttons + [self updateUI]; +} + +- (IBAction)addLocationClicked:(id)sender { + [self setLocationForTimestamp:nil]; +} + +- (IBAction)updateLocationClicked:(id)sender { + BOOL isHistorySelected = [self isHistorySelected]; + if (isHistorySelected) { + // replace an existing location + GTLLatitudeLocation *location = [self selectedLocationItem]; + if (location) { + NSString *timestamp = [location timestampMs]; + [self setLocationForTimestamp:timestamp]; + } + } else { + // replace current location + [self setLocationForTimestamp:nil]; + } +} + +- (IBAction)deleteLocationClicked:(id)sender { + [self deleteLocation]; +} + +- (IBAction)APIConsoleClicked:(id)sender { + NSURL *url = [NSURL URLWithString:@"https://code.google.com/apis/console"]; + [[NSWorkspace sharedWorkspace] openURL:url]; +} + +- (IBAction)loggingCheckboxClicked:(id)sender { + [GTMHTTPFetcher setLoggingEnabled:[sender state]]; +} + +#pragma mark - + +// get a service object with the current username/password +// +// A "service" object handles networking tasks. Service objects +// contain user authentication information as well as networking +// state information (such as cookies and the "last modified" date for +// fetched data.) + +- (GTLServiceLatitude *)latitudeService { + + static GTLServiceLatitude* service = nil; + + if (!service) { + service = [[GTLServiceLatitude alloc] init]; + + // have the service object fetch consecutive pages of the feed so we + // do not need to manually fetch them + service.shouldFetchNextPages = YES; + + // have the service object retry temporary error conditions automatically + service.retryEnabled = YES; + } + return service; +} + +// get the comment selected in the bottom list, or nil if non +- (GTLLatitudeLocation *)selectedLocationItem { + int rowIndex = [locationsTable_ selectedRow]; + if (rowIndex > -1) { + GTLLatitudeLocation *item = [self.locationsFeed.items objectAtIndex:rowIndex]; + return item; + } + return nil; +} + +#pragma mark Fetch the locations feed + +- (BOOL)isHistorySelected { + int timeTag = [[timeMatrix_ selectedCell] tag]; + BOOL isHistoryRequest = (timeTag == 0); + return isHistoryRequest; +} + +- (BOOL)isBestGranularitySelected { + int granularityTag = [[granularityMatrix_ selectedCell] tag]; + BOOL isBest = (granularityTag == 1); + return isBest; +} + +// begin retrieving the feed +- (void)fetchLocations { + + self.locationsFeed = nil; + self.locationsFetchError = nil; + + GTLQueryLatitude *query; + if ([self isHistorySelected]) { + query = [GTLQueryLatitude queryForLocationList]; + } else { + query = [GTLQueryLatitude queryForCurrentLocationGet]; + } + + NSString *granularity; + if ([self isBestGranularitySelected]) { + granularity = kGTLLatitudeGranularityBest; + } else { + granularity = kGTLLatitudeGranularityCity; + } + [query setGranularity:granularity]; + + GTLServiceLatitude *service = self.latitudeService; + self.locationsTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id object, NSError *error) { + // callback + GTLLatitudeLocationFeed *feed; + + if ([object isKindOfClass:[GTLLatitudeLocation class]]) { + // we fetched the current location, which is an item rather than a feed; + // we'll create a feed around the item + feed = [[[GTLLatitudeLocationFeed alloc] init] autorelease]; + feed.items = [NSMutableArray arrayWithObject:object]; + } else { + // we fetched a feed + feed = (GTLLatitudeLocationFeed *)object; + } + + self.locationsFeed = feed; + self.locationsFetchError = error; + self.locationsTicket = nil; + + [self updateUI]; + }]; + [self updateUI]; +} + +#pragma mark Add or Update a location + +- (void)setLocationForTimestamp:(NSString *)timestamp { + // set a location item with the latitude and longitude and, for + // inserting into the location history, the date set in the picker + // + // if timestamp is specified, it replaces any existing location with that + // timestamp + NSString *lat = [latitudeField_ stringValue]; + NSString *lng = [longitudeField_ stringValue]; + + NSDecimalNumber *latNum = [NSDecimalNumber decimalNumberWithString:lat]; + NSDecimalNumber *lngNum = [NSDecimalNumber decimalNumberWithString:lng]; + + GTLLatitudeLocation *newLocation = [GTLLatitudeLocation object]; + newLocation.latitude = latNum; + newLocation.longitude = lngNum; + + GTLQueryLatitude *query; + BOOL isHistorySelected = [self isHistorySelected]; + if (isHistorySelected) { + + if ([timestamp length] > 0) { + // replacing a previous location + [newLocation setTimestampMs:timestamp]; + } else { + // adding a new location to the history + NSDate *date = [datePicker_ dateValue]; + newLocation.timestampMs = [[self class] timestampForDate:date]; + } + query = [GTLQueryLatitude queryForLocationInsertWithObject:newLocation]; + } else { + // replacing current location + query = [GTLQueryLatitude queryForCurrentLocationInsertWithObject:newLocation]; + } + + // even though replacing a location should logically be done with an http + // PUT to update the item, the Latitude API relies on POST for both + // insert and update + GTLServiceLatitude *service = self.latitudeService; + self.editLocationTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id object, NSError *error) { + // callback + self.editLocationTicket = nil; + + GTLLatitudeLocation *item = object; + if (error == nil) { + [self displayAlert:@"Location Set" + format:@"Set location %@,%@ for date %@", + item.latitude, item.longitude, + [[self class] dateForTimestamp:item.timestampMs]]; + + [self fetchLocations]; + } else { + [self displayAlert:@"Set Location Error" + format:@"%@", error]; + [self updateUI]; + } + + }]; + [self updateUI]; +} + +#pragma mark Delete Location from History + +- (void)deleteLocation { + GTLQueryLatitude *query = nil; + BOOL isHistorySelected = [self isHistorySelected]; + if (isHistorySelected) { + // delete the selected location + GTLLatitudeLocation *selectedLocation = [self selectedLocationItem]; + if (selectedLocation) { + query = [GTLQueryLatitude queryForLocationDeleteWithLocationId:selectedLocation.timestampMs]; + } + } else { + // delete the current location + query = [GTLQueryLatitude queryForCurrentLocationDelete]; + } + + if (query) { + GTLServiceLatitude *service = self.latitudeService; + self.editLocationTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id object, NSError *error) { + // callback + self.editLocationTicket = nil; + + if (error == nil) { + [self displayAlert:@"Location Deleted" + format:@"Deleted location"]; + [self fetchLocations]; + } else { + [self displayAlert:@"Delete Location Error" + format:@"%@", error]; + [self updateUI]; + } + + }]; + [self updateUI]; + } +} + +#pragma mark - + +#pragma mark Client ID and Client Secret Sheet + +// Sample apps need this sheet to ask for the client ID and client secret +// strings +// +// Your application will just hardcode the client ID and client secret strings +// into the source rather than ask the user for them. +// +// The string values are obtained from the API Console, +// https://code.google.com/apis/console +// + +- (IBAction)clientIDClicked:(id)sender { + // show the sheet for developers to enter client ID and client secret + [NSApp beginSheet:clientIDSheet_ + modalForWindow:[self window] + modalDelegate:self + didEndSelector:@selector(clientIDSheetDidEnd:returnCode:contextInfo:) + contextInfo:NULL]; +} + +- (IBAction)clientIDDoneClicked:(id)sender { + [NSApp endSheet:clientIDSheet_ + returnCode:NSOKButton]; +} + +- (void)clientIDSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { + [sheet orderOut:self]; + [self updateUI]; +} + +#pragma mark Sign In + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel { + NSString *scope = [GTMOAuth2Authentication scopeWithStrings: + kGTLAuthScopeLatitudeAllBest, + kGTLAuthScopeLatitudeCurrentBest, + nil]; + + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + if ([clientID length] == 0 || [clientSecret length] == 0) { + // remind the developer that client ID and client secret are needed + [clientIDButton_ performSelector:@selector(performClick:) + withObject:self + afterDelay:0.5]; + return; + } + + NSBundle *frameworkBundle = [NSBundle bundleForClass:[GTMOAuth2WindowController class]]; + GTMOAuth2WindowController *windowController; + windowController = [GTMOAuth2WindowController controllerWithScope:scope + clientID:clientID + clientSecret:clientSecret + keychainItemName:kKeychainItemName + resourceBundle:frameworkBundle]; + + [windowController signInSheetModalForWindow:[self window] + completionHandler:^(GTMOAuth2Authentication *auth, + NSError *error) { + // callback + if (error == nil) { + self.latitudeService.authorizer = auth; + if (signInDoneSel) { + [self performSelector:signInDoneSel]; + } + } else { + self.locationsFetchError = error; + [self updateUI]; + } + }]; +} + +#pragma mark UI + +- (void)updateUI { + BOOL isSignedIn = [self isSignedIn]; + NSString *username = [self signedInUsername]; + [signedInButton_ setTitle:(isSignedIn ? @"Sign Out" : @"Sign In")]; + [signedInField_ setStringValue:(isSignedIn ? username : @"No")]; + + // locations table + [locationsTable_ reloadData]; + + if ([self locationsTicket] != nil || [self editLocationTicket] != nil) { + [locationsProgressIndicator_ startAnimation:self]; + [locationsCancelButton_ setEnabled:YES]; + } else { + [locationsProgressIndicator_ stopAnimation:self]; + [locationsCancelButton_ setEnabled:NO]; + } + + GTLLatitudeLocation *selectedLocation = [self selectedLocationItem]; + NSString *resultStr = @""; + NSError *fetchError = self.locationsFetchError; + if (fetchError != nil) { + resultStr = [fetchError description]; + // also display any server error data present + NSData *errData = [[fetchError userInfo] objectForKey:kGTMHTTPFetcherStatusDataKey]; + if (errData) { + NSString *dataStr = [[[NSString alloc] initWithData:errData + encoding:NSUTF8StringEncoding] autorelease]; + resultStr = [resultStr stringByAppendingFormat:@"\n%@", dataStr]; + } + } else { + if (selectedLocation) { + resultStr = [selectedLocation description]; + } + } + [locationsResultTextField_ setString:resultStr]; + + // enable buttons + BOOL hasLatitude = ([[latitudeField_ stringValue] length] > 0); + BOOL hasLongitude = ([[longitudeField_ stringValue] length] > 0); + BOOL hasLatLong = (hasLatitude && hasLongitude); + BOOL hasSelectedLocation = (selectedLocation != nil); + BOOL isHistorySelected = [self isHistorySelected]; + + [addLocationButton_ setEnabled:(hasLatLong && isHistorySelected)]; + [updateLocationButton_ setEnabled:((hasSelectedLocation || !isHistorySelected) + && hasLatLong)]; + [deleteLocationButton_ setEnabled:hasSelectedLocation]; + + [datePicker_ setEnabled:isHistorySelected]; + + // show or hide the text indicating that the client ID or client secret are + // needed + BOOL hasClientIDStrings = [[clientIDField_ stringValue] length] > 0 + && [[clientSecretField_ stringValue] length] > 0; + [clientIDRequiredTextField_ setHidden:hasClientIDStrings]; +} + +- (void)displayAlert:(NSString *)title format:(NSString *)format, ... { + NSString *result = format; + if (format) { + va_list argList; + va_start(argList, format); + result = [[[NSString alloc] initWithFormat:format + arguments:argList] autorelease]; + va_end(argList); + } + NSBeginAlertSheet(title, nil, nil, nil, [self window], nil, nil, + nil, nil, @"%@", result); +} + +#pragma mark Text field delegate methods + +- (void)controlTextDidChange:(NSNotification *)note { + [self updateUI]; // enabled/disable buttons +} + +#pragma mark TableView delegate and data source methods + +- (void)tableViewSelectionDidChange:(NSNotification *)notification { + [self updateUI]; +} + +// table view data source methods +- (int)numberOfRowsInTableView:(NSTableView *)tableView { + return [self.locationsFeed.items count]; +} + +- (id)tableView:(NSTableView *)tableView +objectValueForTableColumn:(NSTableColumn *)tableColumn + row:(int)row { + // make a string with the location date and lat/long + NSArray *items = self.locationsFeed.items; + GTLLatitudeLocation *location = [items objectAtIndex:row]; + NSDate *date = [[self class] dateForTimestamp:location.timestampMs]; + NSString *resultStr = [NSString stringWithFormat:@"%@ (%@, %@)", + date, location.latitude, location.longitude]; + return resultStr; +} + +@end diff --git a/GTL/Examples/LatitudeSample/README.txt b/GTL/Examples/LatitudeSample/README.txt new file mode 100644 index 0000000..ff257a0 --- /dev/null +++ b/GTL/Examples/LatitudeSample/README.txt @@ -0,0 +1 @@ +This sample should automatically build and copy over the GTL.framework as part of the build-and-run process. diff --git a/GTL/Examples/LatitudeSample/buildStripHeaders b/GTL/Examples/LatitudeSample/buildStripHeaders new file mode 100755 index 0000000..0238ef2 --- /dev/null +++ b/GTL/Examples/LatitudeSample/buildStripHeaders @@ -0,0 +1,17 @@ +#!/bin/sh +# +# buildStripHeaders +# +# Remove header files from the built copy of the framework inside our +# application. + +# Strip "*.h" files +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname '*.h' -delete + +# Strip "Headers" links +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type l -delete + +# Strip "Headers" directories +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type d -prune -delete + + diff --git a/GTL/Examples/LatitudeSample/main.m b/GTL/Examples/LatitudeSample/main.m new file mode 100644 index 0000000..3e35dea --- /dev/null +++ b/GTL/Examples/LatitudeSample/main.m @@ -0,0 +1,25 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// main.m +// + +#import + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **) argv); +} diff --git a/GTL/Examples/PlusSample/.svn/all-wcprops b/GTL/Examples/PlusSample/.svn/all-wcprops new file mode 100644 index 0000000..dd9e395 --- /dev/null +++ b/GTL/Examples/PlusSample/.svn/all-wcprops @@ -0,0 +1,53 @@ +K 25 +svn:wc:ra_dav:version-url +V 43 +/svn/!svn/ver/169/trunk/Examples/PlusSample +END +main.m +K 25 +svn:wc:ra_dav:version-url +V 49 +/svn/!svn/ver/51/trunk/Examples/PlusSample/main.m +END +PlusSampleAppController.h +K 25 +svn:wc:ra_dav:version-url +V 68 +/svn/!svn/ver/51/trunk/Examples/PlusSample/PlusSampleAppController.h +END +Info.plist +K 25 +svn:wc:ra_dav:version-url +V 53 +/svn/!svn/ver/51/trunk/Examples/PlusSample/Info.plist +END +PlusSampleAppController.m +K 25 +svn:wc:ra_dav:version-url +V 68 +/svn/!svn/ver/51/trunk/Examples/PlusSample/PlusSampleAppController.m +END +PlusSampleWindowController.h +K 25 +svn:wc:ra_dav:version-url +V 71 +/svn/!svn/ver/51/trunk/Examples/PlusSample/PlusSampleWindowController.h +END +README.txt +K 25 +svn:wc:ra_dav:version-url +V 53 +/svn/!svn/ver/51/trunk/Examples/PlusSample/README.txt +END +PlusSampleWindowController.m +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/169/trunk/Examples/PlusSample/PlusSampleWindowController.m +END +buildStripHeaders +K 25 +svn:wc:ra_dav:version-url +V 60 +/svn/!svn/ver/51/trunk/Examples/PlusSample/buildStripHeaders +END diff --git a/GTL/Examples/PlusSample/.svn/entries b/GTL/Examples/PlusSample/.svn/entries new file mode 100644 index 0000000..ce0eb46 --- /dev/null +++ b/GTL/Examples/PlusSample/.svn/entries @@ -0,0 +1,306 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/PlusSample +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-06-19T21:52:36.704909Z +169 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +main.m +file + + + + +2012-12-09T08:42:34.000000Z +246a89353f2c5021dce7384b100ff0fe +2011-09-15T18:50:00.895950Z +51 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +736 + +PlusSampleAppController.h +file + + + + +2012-12-09T08:42:34.000000Z +44e0b332a2e59627a74cf97a430792ad +2011-09-15T18:50:00.895950Z +51 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +710 + +PlusSample.xcodeproj +dir + +Info.plist +file + + + + +2012-12-09T08:42:34.000000Z +64cff2c779e6ddce65050205fe8960aa +2011-09-15T18:50:00.895950Z +51 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +835 + +PlusSampleAppController.m +file + + + + +2012-12-09T08:42:34.000000Z +51ff92540b916a37d972631dd68bfde0 +2011-09-15T18:50:00.895950Z +51 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1074 + +PlusSampleWindowController.h +file + + + + +2012-12-09T08:42:34.000000Z +43e0f9c7465c71fa34f2ba535a0f4279 +2011-09-15T18:50:00.895950Z +51 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2023 + +README.txt +file + + + + +2012-12-09T08:42:34.000000Z +0a3374a462b2cff6dcd19d0caf28958a +2011-09-15T18:50:00.895950Z +51 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +109 + +PlusSampleWindowController.m +file + + + + +2012-12-09T08:42:34.000000Z +23566990658cd43b4dcb0b5c48c29638 +2012-06-19T21:52:36.704909Z +169 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +15683 + +buildStripHeaders +file + + + + +2012-12-09T08:42:34.000000Z +38b5302dc0e4a662c40b288306a2f6ac +2011-09-15T18:50:00.895950Z +51 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +454 + +English.lproj +dir + diff --git a/GTL/Examples/PlusSample/.svn/prop-base/buildStripHeaders.svn-base b/GTL/Examples/PlusSample/.svn/prop-base/buildStripHeaders.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/GTL/Examples/PlusSample/.svn/prop-base/buildStripHeaders.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/GTL/Examples/PlusSample/.svn/text-base/Info.plist.svn-base b/GTL/Examples/PlusSample/.svn/text-base/Info.plist.svn-base new file mode 100644 index 0000000..1201b0f --- /dev/null +++ b/GTL/Examples/PlusSample/.svn/text-base/Info.plist.svn-base @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.example.PlusSample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/GTL/Examples/PlusSample/.svn/text-base/PlusSampleAppController.h.svn-base b/GTL/Examples/PlusSample/.svn/text-base/PlusSampleAppController.h.svn-base new file mode 100644 index 0000000..3572d27 --- /dev/null +++ b/GTL/Examples/PlusSample/.svn/text-base/PlusSampleAppController.h.svn-base @@ -0,0 +1,23 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// PlusSampleAppController.h +// + +#import + +@interface PlusSampleAppController : NSObject +@end diff --git a/GTL/Examples/PlusSample/.svn/text-base/PlusSampleAppController.m.svn-base b/GTL/Examples/PlusSample/.svn/text-base/PlusSampleAppController.m.svn-base new file mode 100644 index 0000000..7f29d5a --- /dev/null +++ b/GTL/Examples/PlusSample/.svn/text-base/PlusSampleAppController.m.svn-base @@ -0,0 +1,35 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// PlusSampleAppController.m +// + +#import "PlusSampleAppController.h" +#import "PlusSampleWindowController.h" + +@implementation PlusSampleAppController + +- (void)applicationWillFinishLaunching:(NSNotification *)notification { + PlusSampleWindowController* windowController + = [PlusSampleWindowController sharedWindowController]; + [windowController showWindow:self]; +} + +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { + return YES; +} + +@end diff --git a/GTL/Examples/PlusSample/.svn/text-base/PlusSampleWindowController.h.svn-base b/GTL/Examples/PlusSample/.svn/text-base/PlusSampleWindowController.h.svn-base new file mode 100644 index 0000000..b226cd3 --- /dev/null +++ b/GTL/Examples/PlusSample/.svn/text-base/PlusSampleWindowController.h.svn-base @@ -0,0 +1,68 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// PlusSampleWindowController.h +// + +#import + +#import "GTLPlus.h" +#import "GTL/GTMOAuth2WindowController.h" + +@interface PlusSampleWindowController : NSWindowController { + @private + IBOutlet NSTextField *signedInField_; + IBOutlet NSButton *signedInButton_; + + IBOutlet NSButton *profileFetchCancelButton_; + + IBOutlet NSTableView *profileTable_; + IBOutlet NSProgressIndicator *profileProgressIndicator_; + IBOutlet NSTextView *profileResultTextView_; + IBOutlet NSImageView *profileImageView_; + + IBOutlet NSTableView *activityFeedTable_; + IBOutlet NSTextView *activityFeedResultTextView_; + IBOutlet NSImageView *activityFeedImageView_; + + IBOutlet NSButton *clientIDButton_; + IBOutlet NSTextField *clientIDRequiredTextField_; + IBOutlet NSWindow *clientIDSheet_; + IBOutlet NSTextField *clientIDField_; + IBOutlet NSTextField *clientSecretField_; + + GTLPlusPerson *userProfile_; + GTLPlusActivityFeed *activityFeed_; + GTLServiceTicket *profileTicket_; + NSError *profileFetchError_; + NSError *activityFeedFetchError_; +} + ++ (PlusSampleWindowController *)sharedWindowController; + +- (IBAction)signInClicked:(id)sender; + +- (IBAction)getFeedClicked:(id)sender; +- (IBAction)cancelProfileFetch:(id)sender; + +- (IBAction)APIConsoleClicked:(id)sender; +- (IBAction)loggingCheckboxClicked:(id)sender; + +// Client ID sheet +- (IBAction)clientIDClicked:(id)sender; +- (IBAction)clientIDDoneClicked:(id)sender; + +@end diff --git a/GTL/Examples/PlusSample/.svn/text-base/PlusSampleWindowController.m.svn-base b/GTL/Examples/PlusSample/.svn/text-base/PlusSampleWindowController.m.svn-base new file mode 100644 index 0000000..ffc4518 --- /dev/null +++ b/GTL/Examples/PlusSample/.svn/text-base/PlusSampleWindowController.m.svn-base @@ -0,0 +1,497 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// PlusSampleWindowController.m +// + +#import "PlusSampleWindowController.h" + +#import "GTL/GTLUtilities.h" +#import "GTL/GTMHTTPFetcherLogging.h" + +@interface PlusSampleWindowController () + +@property (nonatomic, readonly) GTLServicePlus *plusService; + +@property (nonatomic, retain) GTLPlusPerson *userProfile; +@property (nonatomic, retain) GTLPlusActivityFeed *activityFeed; +@property (nonatomic, retain) GTLServiceTicket *profileTicket; +@property (nonatomic, retain) NSError *profileFetchError; +@property (nonatomic, retain) NSError *activityFeedFetchError; + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel; + +- (void)updateUI; +- (void)displayAlert:(NSString *)title format:(NSString *)format, ...; + +- (void)fetchUserProfile; + +- (id)selectedActivityFeedItem; +@end + + +NSString *const kKeychainItemName = @"Plus Sample: Google Plus"; + +@implementation PlusSampleWindowController + +@synthesize userProfile = userProfile_, + activityFeed = activityFeed_, + profileTicket = profileTicket_, + profileFetchError = profileFetchError_, + activityFeedFetchError = activityFeedFetchError_; + ++ (PlusSampleWindowController *)sharedWindowController { + static PlusSampleWindowController* gWindowController = nil; + if (!gWindowController) { + gWindowController = [[PlusSampleWindowController alloc] init]; + } + return gWindowController; +} + + +- (id)init { + return [self initWithWindowNibName:@"PlusSampleWindow"]; +} + +- (void)awakeFromNib { + // Load the OAuth token from the keychain, if it was previously saved + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + GTMOAuth2Authentication *auth; + auth = [GTMOAuth2WindowController authForGoogleFromKeychainForName:kKeychainItemName + clientID:clientID + clientSecret:clientSecret]; + self.plusService.authorizer = auth; + + // Set the result text fields to have a distinctive color and mono-spaced font + [profileResultTextView_ setTextColor:[NSColor darkGrayColor]]; + [activityFeedResultTextView_ setTextColor:[NSColor darkGrayColor]]; + + NSFont *resultTextFont = [NSFont fontWithName:@"Monaco" size:9]; + [profileResultTextView_ setFont:resultTextFont]; + [activityFeedResultTextView_ setFont:resultTextFont]; + + [self updateUI]; +} + +- (void)dealloc { + [userProfile_ release]; + [activityFeed_ release]; + [profileTicket_ release]; + [profileFetchError_ release]; + [activityFeedFetchError_ release]; + + [super dealloc]; +} + +#pragma mark - + +- (NSString *)signedInUsername { + GTMOAuth2Authentication *auth = self.plusService.authorizer; + BOOL isSignedIn = auth.canAuthorize; + if (isSignedIn) { + return auth.userEmail; + } else { + return nil; + } +} + +- (BOOL)isSignedIn { + NSString *name = [self signedInUsername]; + return (name != nil); +} + +#pragma mark IBActions + +- (IBAction)signInClicked:(id)sender { + if (![self isSignedIn]) { + // Sign in + [self runSigninThenInvokeSelector:@selector(updateUI)]; + } else { + // Sign out + GTLServicePlus *service = self.plusService; + + [GTMOAuth2WindowController removeAuthFromKeychainForName:kKeychainItemName]; + service.authorizer = nil; + [self updateUI]; + } +} + +- (IBAction)getFeedClicked:(id)sender { + if (![self isSignedIn]) { + [self runSigninThenInvokeSelector:@selector(fetchUserProfile)]; + } else { + [self fetchUserProfile]; + } +} + +- (IBAction)cancelProfileFetch:(id)sender { + [self.profileTicket cancelTicket]; + self.profileTicket = nil; + + [self updateUI]; +} + +- (IBAction)APIConsoleClicked:(id)sender { + NSURL *url = [NSURL URLWithString:@"https://code.google.com/apis/console"]; + [[NSWorkspace sharedWorkspace] openURL:url]; +} + +- (IBAction)loggingCheckboxClicked:(id)sender { + [GTMHTTPFetcher setLoggingEnabled:[sender state]]; +} + +#pragma mark - + +// Get a service object +// +// A "service" object handles networking tasks. Service objects +// contain user authentication information as well as networking +// state information (such as cookies and the "last modified" date for +// fetched data.) + +- (GTLServicePlus *)plusService { + + static GTLServicePlus* service = nil; + + if (!service) { + service = [[GTLServicePlus alloc] init]; + + // Have the service object set tickets to retry temporary error conditions + // automatically + service.retryEnabled = YES; + + // Have the service object set tickets to automatically fetch additional + // pages of feeds when the feed's maxResult value is less than the number + // of items in the feed + service.shouldFetchNextPages = YES; + } + return service; +} + +- (GTLPlusPerson *)selectedActivityFeedItem { + int rowIndex = [activityFeedTable_ selectedRow]; + if (rowIndex > -1) { + GTLPlusPerson *item = [activityFeed_ itemAtIndex:rowIndex]; + return item; + } + return nil; +} + +#pragma mark Fetch feed of the user's activities, circles, or albums + +- (void)fetchUserProfile { + self.userProfile = nil; + self.activityFeed = nil; + self.profileFetchError = nil; + self.activityFeedFetchError = nil; + + // Make a batch for fetching both the user's profile and the activity feed + GTLQueryPlus *profileQuery = [GTLQueryPlus queryForPeopleGetWithUserId:@"me"]; + profileQuery.completionBlock = ^(GTLServiceTicket *ticket, id object, NSError *error) { + if (error == nil) { + self.userProfile = object; + } else { + self.profileFetchError = error; + } + }; + + GTLQueryPlus *activitiesQuery = [GTLQueryPlus queryForActivitiesListWithUserId:@"me" + collection:kGTLPlusCollectionPublic]; + // Set an appropriate page size when requesting the activity items + activitiesQuery.maxResults = 100; + activitiesQuery.completionBlock = ^(GTLServiceTicket *ticket, id object, NSError *error) { + if (error == nil) { + self.activityFeed = object; + } else { + self.activityFeedFetchError = error; + } + }; + + GTLBatchQuery *batchQuery = [GTLBatchQuery batchQuery]; + [batchQuery addQuery:profileQuery]; + [batchQuery addQuery:activitiesQuery]; + + GTLServicePlus *service = self.plusService; + self.profileTicket = [service executeQuery:batchQuery + completionHandler:^(GTLServiceTicket *ticket, + id result, NSError *error) { + // Callback + // + // For batch queries with successful execution, + // the result is a GTLBatchResult object + // + // At this point, the query completion blocks + // have already been called + self.profileTicket = nil; + + [self updateUI]; + }]; + [self updateUI]; +} + +#pragma mark Sign In + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel { + // Applications should have client ID and client secret strings + // hardcoded into the source, but the sample application asks the + // developer for the strings + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + if ([clientID length] == 0 || [clientSecret length] == 0) { + // Remind the developer that client ID and client secret are needed + [clientIDButton_ performSelector:@selector(performClick:) + withObject:self + afterDelay:0.5]; + return; + } + + // Show the OAuth 2 sign-in controller + NSBundle *frameworkBundle = [NSBundle bundleForClass:[GTMOAuth2WindowController class]]; + GTMOAuth2WindowController *windowController; + windowController = [GTMOAuth2WindowController controllerWithScope:kGTLAuthScopePlusMe + clientID:clientID + clientSecret:clientSecret + keychainItemName:kKeychainItemName + resourceBundle:frameworkBundle]; + + [windowController signInSheetModalForWindow:[self window] + completionHandler:^(GTMOAuth2Authentication *auth, + NSError *error) { + // callback + if (error == nil) { + self.plusService.authorizer = auth; + if (signInDoneSel) { + [self performSelector:signInDoneSel]; + } + } else { + self.profileFetchError = error; + [self updateUI]; + } + }]; +} + +#pragma mark UI + +- (void)fetchURLString:(NSString *)urlString + forImageView:(NSImageView *)imageView { + // Common code to fetch an image for an NSImageView + [imageView setImage:nil]; + + if (urlString) { + // We can reuse the fetcher service from the API service object to make + // the image fetchers, though the image fetches should be unauthorized + GTMHTTPFetcherService *fetcherService = self.plusService.fetcherService; + GTMHTTPFetcher *fetcher = [fetcherService fetcherWithURLString:urlString]; + fetcher.authorizer = nil; + [fetcher setCommentWithFormat:@"image fetch"]; + + [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { + // Callback + if (error == nil) { + NSImage *image = [[[NSImage alloc] initWithData:data] autorelease]; + [imageView setImage:image]; + } else { + NSLog(@"Error %@ loading image %@", error, urlString); + } + }]; + } +} + +- (void)updateProfileImage { + static NSString* gPriorImageURLStr = nil; + + NSString *newImageURLStr = userProfile_.image.url; + + if (!GTL_AreEqualOrBothNil(newImageURLStr, gPriorImageURLStr)) { + // The image has changed + [gPriorImageURLStr release]; + gPriorImageURLStr = [newImageURLStr copy]; + + [self fetchURLString:newImageURLStr forImageView:profileImageView_]; + } +} + +- (void)updateActivityFeedImage { + static NSString* gPriorImageURLStr = nil; + + NSString *newImageURLStr = nil; + + GTLPlusActivity *activity = [self selectedActivityFeedItem]; + NSArray *attachments = activity.object.attachments; + if ([attachments count] > 0) { + GTLPlusActivityObjectAttachmentsItem *attachment = [attachments objectAtIndex:0]; + newImageURLStr = attachment.image.url; + } + if (!GTL_AreEqualOrBothNil(newImageURLStr, gPriorImageURLStr)) { + // The image has changed + [gPriorImageURLStr release]; + gPriorImageURLStr = [newImageURLStr copy]; + + [self fetchURLString:newImageURLStr forImageView:activityFeedImageView_]; + } +} + +- (void)updateUI { + BOOL isSignedIn = [self isSignedIn]; + NSString *username = [self signedInUsername]; + [signedInButton_ setTitle:(isSignedIn ? @"Sign Out" : @"Sign In")]; + [signedInField_ setStringValue:(isSignedIn ? username : @"No")]; + + // + // Main table: display just the user profile + // + // We don't really need a table for this, since there is only one + // user profile to display, but one day we may be glad there's a table + // here. + // + [profileTable_ reloadData]; + + if (profileTicket_ != nil) { + [profileProgressIndicator_ startAnimation:self]; + } else { + [profileProgressIndicator_ stopAnimation:self]; + } + + // Display the user profile, or a fetch error + NSString *resultStr = @""; + if (profileFetchError_) { + // Display the error + resultStr = [profileFetchError_ description]; + } else { + // Display the profile + if (userProfile_) { + resultStr = [userProfile_ description]; + } + } + [profileResultTextView_ setString:resultStr]; + + [self updateProfileImage]; + + // + // Lower table: display the activity feed + // + [activityFeedTable_ reloadData]; + + // Get the description of the selected item, or the feed fetch error + resultStr = @""; + + GTLPlusPerson *person = [self selectedActivityFeedItem]; + if (activityFeedFetchError_) { + resultStr = [activityFeedFetchError_ description]; + } else { + if (person) { + resultStr = [person description]; + } + } + + [activityFeedResultTextView_ setString:resultStr]; + + [self updateActivityFeedImage]; + + // Enable buttons + [profileFetchCancelButton_ setEnabled:(profileTicket_ != nil)]; + + // Show or hide the text indicating that the client ID or client secret are + // needed + BOOL hasClientIDStrings = [[clientIDField_ stringValue] length] > 0 + && [[clientSecretField_ stringValue] length] > 0; + [clientIDRequiredTextField_ setHidden:hasClientIDStrings]; +} + +- (void)displayAlert:(NSString *)title format:(NSString *)format, ... { + NSString *result = format; + if (format) { + va_list argList; + va_start(argList, format); + result = [[[NSString alloc] initWithFormat:format + arguments:argList] autorelease]; + va_end(argList); + } + NSBeginAlertSheet(title, nil, nil, nil, [self window], nil, nil, + nil, nil, @"%@", result); +} + +#pragma mark Client ID Sheet + +// Client ID and Client Secret Sheet +// +// Sample apps need this sheet to ask for the client ID and client secret +// strings +// +// Your application will just hardcode the client ID and client secret strings +// into the source rather than ask the user for them. +// +// The string values are obtained from the API Console, +// https://code.google.com/apis/console + +- (IBAction)clientIDClicked:(id)sender { + // Show the sheet for developers to enter their client ID and client secret + [NSApp beginSheet:clientIDSheet_ + modalForWindow:[self window] + modalDelegate:self + didEndSelector:@selector(clientIDSheetDidEnd:returnCode:contextInfo:) + contextInfo:NULL]; +} + +- (IBAction)clientIDDoneClicked:(id)sender { + [NSApp endSheet:clientIDSheet_ returnCode:NSOKButton]; +} + +- (void)clientIDSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { + [sheet orderOut:self]; + [self updateUI]; +} + +#pragma mark Text field delegate methods + +- (void)controlTextDidChange:(NSNotification *)note { + [self updateUI]; // enable and disable buttons +} + +#pragma mark TableView delegate and data source methods + +- (void)tableViewSelectionDidChange:(NSNotification *)notification { + [self updateUI]; +} + +- (int)numberOfRowsInTableView:(NSTableView *)tableView { + if (tableView == profileTable_) { + return (self.userProfile != nil ? 1 : 0); + } else { + return [self.activityFeed.items count]; + } +} + +- (id)tableView:(NSTableView *)tableView +objectValueForTableColumn:(NSTableColumn *)tableColumn + row:(int)row { + if (tableView == profileTable_) { + if (row == 0) { + return self.userProfile.displayName; + } else { + return nil; + } + } else { + // Activities + GTLPlusActivity *item = [self.activityFeed itemAtIndex:row]; + return item.object.content; + } +} + +@end diff --git a/GTL/Examples/PlusSample/.svn/text-base/README.txt.svn-base b/GTL/Examples/PlusSample/.svn/text-base/README.txt.svn-base new file mode 100644 index 0000000..ff257a0 --- /dev/null +++ b/GTL/Examples/PlusSample/.svn/text-base/README.txt.svn-base @@ -0,0 +1 @@ +This sample should automatically build and copy over the GTL.framework as part of the build-and-run process. diff --git a/GTL/Examples/PlusSample/.svn/text-base/buildStripHeaders.svn-base b/GTL/Examples/PlusSample/.svn/text-base/buildStripHeaders.svn-base new file mode 100644 index 0000000..0238ef2 --- /dev/null +++ b/GTL/Examples/PlusSample/.svn/text-base/buildStripHeaders.svn-base @@ -0,0 +1,17 @@ +#!/bin/sh +# +# buildStripHeaders +# +# Remove header files from the built copy of the framework inside our +# application. + +# Strip "*.h" files +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname '*.h' -delete + +# Strip "Headers" links +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type l -delete + +# Strip "Headers" directories +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type d -prune -delete + + diff --git a/GTL/Examples/PlusSample/.svn/text-base/main.m.svn-base b/GTL/Examples/PlusSample/.svn/text-base/main.m.svn-base new file mode 100644 index 0000000..3e35dea --- /dev/null +++ b/GTL/Examples/PlusSample/.svn/text-base/main.m.svn-base @@ -0,0 +1,25 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// main.m +// + +#import + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **) argv); +} diff --git a/GTL/Examples/PlusSample/English.lproj/.svn/all-wcprops b/GTL/Examples/PlusSample/English.lproj/.svn/all-wcprops new file mode 100644 index 0000000..7cb12e6 --- /dev/null +++ b/GTL/Examples/PlusSample/English.lproj/.svn/all-wcprops @@ -0,0 +1,23 @@ +K 25 +svn:wc:ra_dav:version-url +V 57 +/svn/!svn/ver/154/trunk/Examples/PlusSample/English.lproj +END +InfoPlist.strings +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/51/trunk/Examples/PlusSample/English.lproj/InfoPlist.strings +END +MainMenu.xib +K 25 +svn:wc:ra_dav:version-url +V 69 +/svn/!svn/ver/51/trunk/Examples/PlusSample/English.lproj/MainMenu.xib +END +PlusSampleWindow.xib +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/154/trunk/Examples/PlusSample/English.lproj/PlusSampleWindow.xib +END diff --git a/GTL/Examples/PlusSample/English.lproj/.svn/entries b/GTL/Examples/PlusSample/English.lproj/.svn/entries new file mode 100644 index 0000000..136735c --- /dev/null +++ b/GTL/Examples/PlusSample/English.lproj/.svn/entries @@ -0,0 +1,130 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/PlusSample/English.lproj +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +InfoPlist.strings +file + + + + +2012-12-09T08:42:34.000000Z +bc745a35febf3350074747882fc8b7e0 +2011-09-15T18:50:00.895950Z +51 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +95 + +MainMenu.xib +file + + + + +2012-12-09T08:42:34.000000Z +35dfa4b9a3e50f22fc58a99c317c59bc +2011-09-15T18:50:00.895950Z +51 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +103622 + +PlusSampleWindow.xib +file + + + + +2012-12-09T08:42:34.000000Z +80fce00fd2585582e6656c19cd6fd6ef +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +111634 + diff --git a/GTL/Examples/PlusSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base b/GTL/Examples/PlusSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base new file mode 100644 index 0000000..77831dd --- /dev/null +++ b/GTL/Examples/PlusSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "© Google Inc. 2011"; diff --git a/GTL/Examples/PlusSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base b/GTL/Examples/PlusSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base new file mode 100644 index 0000000..06128ee --- /dev/null +++ b/GTL/Examples/PlusSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base @@ -0,0 +1,2409 @@ + + + + 1050 + 10J869 + 851 + 1038.35 + 461.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 851 + + + YES + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + + NSApplication + + + + FirstResponder + + + NSApplication + + + MainMenu + + YES + + + SampleApp + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + SampleApp + + YES + + + About the Sample + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + + Services + + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + + File + + + YES + + + New + n + 1048576 + 2147483647 + + + + + + Open... + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + + Open Recent + + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + Save As… + S + 1048576 + 2147483647 + + + + + + Revert + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup… + P + 1048576 + 2147483647 + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + + Edit + + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + + Find + + + YES + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1048576 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling + + 1048576 + 2147483647 + + + submenuAction: + + Spelling + + YES + + + Spelling… + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling as You Type + + 1048576 + 2147483647 + + + + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + + Window + + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + Help + + YES + + + Help + ? + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + PlusSampleAppController + + + + + YES + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + showHelp: + + + + 122 + + + + clearRecentDocuments: + + + + 127 + + + + terminate: + + + + 139 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + hideOtherApplications: + + + + 146 + + + + hide: + + + + 152 + + + + unhideAllApplications: + + + + 153 + + + + cut: + + + + 175 + + + + paste: + + + + 176 + + + + redo: + + + + 178 + + + + selectAll: + + + + 179 + + + + undo: + + + + 180 + + + + copy: + + + + 181 + + + + showGuessPanel: + + + + 188 + + + + checkSpelling: + + + + 190 + + + + toggleContinuousSpellChecking: + + + + 192 + + + + performClose: + + + + 193 + + + + delete: + + + + 195 + + + + performZoom: + + + + 198 + + + + performFindPanelAction: + + + + 199 + + + + performFindPanelAction: + + + + 200 + + + + performFindPanelAction: + + + + 201 + + + + performFindPanelAction: + + + + 202 + + + + centerSelectionInVisibleArea: + + + + 203 + + + + pasteAsPlainText: + + + + 205 + + + + delegate + + + + 223 + + + + delegate + + + + 225 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + MainMenu + + + 19 + + + YES + + + + + + 24 + + + YES + + + + + + + + + 5 + + + + + 23 + + + + + 92 + + + + + 197 + + + + + 56 + + + YES + + + + + + 57 + + + YES + + + + + + + + + + + + + + + + 58 + + + + + 129 + + + + + 131 + + + YES + + + + + + 130 + + + + + 134 + + + + + 136 + + + + + 143 + + + + + 144 + + + + + 145 + + + + + 149 + + + + + 150 + + + + + 196 + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + + + + + + + + 72 + + + + + 73 + + + + + 74 + + + + + 75 + + + + + 77 + + + + + 78 + + + + + 79 + + + + + 80 + + + + + 82 + + + + + 112 + + + + + 124 + + + YES + + + + + + 125 + + + YES + + + + + + 126 + + + + + 103 + + + YES + + + + + + 106 + + + YES + + + + + + 111 + + + + + 163 + + + YES + + + + + + 169 + + + YES + + + + + + + + + + + + + + + + + 156 + + + + + 157 + + + + + 158 + + + + + 160 + + + + + 164 + + + + + 168 + + + YES + + + + + + 159 + + + YES + + + + + + + + + + 154 + + + + + 155 + + + + + 161 + + + + + 162 + + + + + 167 + + + + + 171 + + + + + 172 + + + + + 173 + + + + + 174 + + + + + 184 + + + YES + + + + + + 185 + + + YES + + + + + + + + 187 + + + + + 189 + + + + + 191 + + + + + 204 + + + + + 222 + + + BuzzSampleAppController + + + + + YES + + YES + -3.IBPluginDependency + -3.ImportedFromIB2 + 103.IBPluginDependency + 103.ImportedFromIB2 + 106.IBPluginDependency + 106.ImportedFromIB2 + 111.IBPluginDependency + 111.ImportedFromIB2 + 112.IBPluginDependency + 112.ImportedFromIB2 + 124.IBPluginDependency + 124.ImportedFromIB2 + 125.IBPluginDependency + 125.ImportedFromIB2 + 126.IBPluginDependency + 126.ImportedFromIB2 + 129.IBPluginDependency + 129.ImportedFromIB2 + 130.IBPluginDependency + 130.ImportedFromIB2 + 131.IBPluginDependency + 131.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 136.IBPluginDependency + 136.ImportedFromIB2 + 143.IBPluginDependency + 143.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 145.IBPluginDependency + 145.ImportedFromIB2 + 149.IBPluginDependency + 149.ImportedFromIB2 + 150.IBPluginDependency + 150.ImportedFromIB2 + 154.IBPluginDependency + 154.ImportedFromIB2 + 155.IBPluginDependency + 155.ImportedFromIB2 + 156.IBPluginDependency + 156.ImportedFromIB2 + 157.IBPluginDependency + 157.ImportedFromIB2 + 158.IBPluginDependency + 158.ImportedFromIB2 + 159.IBPluginDependency + 159.ImportedFromIB2 + 160.IBPluginDependency + 160.ImportedFromIB2 + 161.IBPluginDependency + 161.ImportedFromIB2 + 162.IBPluginDependency + 162.ImportedFromIB2 + 163.IBPluginDependency + 163.ImportedFromIB2 + 164.IBPluginDependency + 164.ImportedFromIB2 + 167.IBPluginDependency + 167.ImportedFromIB2 + 168.IBPluginDependency + 168.ImportedFromIB2 + 169.IBPluginDependency + 169.ImportedFromIB2 + 171.IBPluginDependency + 171.ImportedFromIB2 + 172.IBPluginDependency + 172.ImportedFromIB2 + 173.IBPluginDependency + 173.ImportedFromIB2 + 174.IBPluginDependency + 174.ImportedFromIB2 + 184.IBPluginDependency + 184.ImportedFromIB2 + 185.IBPluginDependency + 185.ImportedFromIB2 + 187.IBPluginDependency + 187.ImportedFromIB2 + 189.IBPluginDependency + 189.ImportedFromIB2 + 19.IBPluginDependency + 19.ImportedFromIB2 + 191.IBPluginDependency + 191.ImportedFromIB2 + 196.IBPluginDependency + 196.ImportedFromIB2 + 197.IBPluginDependency + 197.ImportedFromIB2 + 204.IBPluginDependency + 204.ImportedFromIB2 + 222.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 24.IBPluginDependency + 24.ImportedFromIB2 + 29.IBPluginDependency + 29.ImportedFromIB2 + 5.IBPluginDependency + 5.ImportedFromIB2 + 56.IBPluginDependency + 56.ImportedFromIB2 + 57.IBPluginDependency + 57.ImportedFromIB2 + 58.IBPluginDependency + 58.ImportedFromIB2 + 72.IBPluginDependency + 72.ImportedFromIB2 + 73.IBPluginDependency + 73.ImportedFromIB2 + 74.IBPluginDependency + 74.ImportedFromIB2 + 75.IBPluginDependency + 75.ImportedFromIB2 + 77.IBPluginDependency + 77.ImportedFromIB2 + 78.IBPluginDependency + 78.ImportedFromIB2 + 79.IBPluginDependency + 79.ImportedFromIB2 + 80.IBPluginDependency + 80.ImportedFromIB2 + 81.IBPluginDependency + 81.ImportedFromIB2 + 82.IBPluginDependency + 82.ImportedFromIB2 + 83.IBPluginDependency + 83.ImportedFromIB2 + 92.IBPluginDependency + 92.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + + YES + + + + + YES + + + YES + + + + 227 + + + + YES + + FirstResponder + NSObject + + IBUserSource + + + + + PlusSampleAppController + NSObject + + IBUserSource + + + + + + YES + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSBrowser + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSBrowser.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSDocument + NSObject + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + id + id + id + id + id + id + + + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + + printDocument: + id + + + revertDocumentToSaved: + id + + + runPageLayout: + id + + + saveDocument: + id + + + saveDocumentAs: + id + + + saveDocumentTo: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocument.h + + + + NSDocument + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentScripting.h + + + + NSDocumentController + NSObject + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + id + id + id + id + + + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + + clearRecentDocuments: + id + + + newDocument: + id + + + openDocument: + id + + + saveAllDocuments: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentController.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSMatrix + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSMatrix.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSMenuItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSMovieView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSMovieView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebEditingDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebFrameLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebJavaPlugIn.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPlugin.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPluginContainer.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPolicyDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebResourceLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebScriptObject.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebUIDelegate.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSTableView + NSControl + + + + NSText + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSText.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + + WebView + NSView + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + + goBack: + id + + + goForward: + id + + + makeTextLarger: + id + + + makeTextSmaller: + id + + + makeTextStandardSize: + id + + + reload: + id + + + reloadFromOrigin: + id + + + stopLoading: + id + + + takeStringURLFrom: + id + + + toggleContinuousSpellChecking: + id + + + toggleSmartInsertDelete: + id + + + + + IBFrameworkSource + WebKit.framework/Headers/WebView.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../BuzzSample.xcodeproj + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {9, 8} + {7, 2} + + + + diff --git a/GTL/Examples/PlusSample/English.lproj/.svn/text-base/PlusSampleWindow.xib.svn-base b/GTL/Examples/PlusSample/English.lproj/.svn/text-base/PlusSampleWindow.xib.svn-base new file mode 100644 index 0000000..83d4d12 --- /dev/null +++ b/GTL/Examples/PlusSample/English.lproj/.svn/text-base/PlusSampleWindow.xib.svn-base @@ -0,0 +1,2510 @@ + + + + 1070 + 11D50b + 2182 + 1138.32 + 568.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2182 + + + YES + NSTableColumn + NSScroller + NSSplitView + NSButton + NSTextFieldCell + NSImageView + NSButtonCell + NSScrollView + NSProgressIndicator + NSTableView + NSImageCell + NSCustomObject + NSTextView + NSView + NSWindowTemplate + NSTextField + NSUserDefaultsController + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + PlusSampleWindowController + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{16, 645}, {539, 493}} + 1886912512 + Sample App + + NSWindow + + + View + + + {539, 493} + + + 256 + + YES + + + 265 + {{427, 419}, {106, 32}} + + YES + + 67239424 + 134217728 + Get Profile + + LucidaGrande + 13 + 1044 + + + -2038284033 + 1 + + LucidaGrande + 13 + 16 + + + DQ + 200 + 25 + + + + + 1289 + + {{434, 396}, {16, 16}} + + 28938 + 100 + + + + 289 + {{400, 16}, {128, 18}} + + YES + + 67239424 + 131072 + Log http to desktop + + LucidaGrande + 11 + 3100 + + + 1211912703 + 2 + + NSImage + NSSwitch + + + NSSwitch + + + + 200 + 25 + + + + + 265 + {{467, 394}, {53, 16}} + + YES + + 67239424 + 134479872 + Cancel + + LucidaGrande + 9 + 3614 + + + -2038284033 + 1 + + LucidaGrande + 9 + 16 + + + + 200 + 25 + + + + + 264 + {{93, 429}, {71, 17}} + + YES + + 67239424 + 272629760 + Signed In: + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 266 + {{166, 429}, {247, 17}} + + YES + + 67239424 + 272629760 + No + + + + + + + + + 268 + {{18, 422}, {72, 28}} + + YES + + 67239424 + 134348800 + Sign Out + + + -2038284033 + 129 + + + 200 + 25 + + + + + 290 + {{20, 188}, {398, 17}} + + YES + + 67239424 + 272629760 + Activities - Select One + + + + + + + + + 268 + {{18, 449}, {83, 28}} + + YES + + -2080244224 + 134348800 + Client ID... + + + -2038284033 + 129 + + + 200 + 25 + + + + + 264 + {{105, 456}, {178, 14}} + + YES + + 67239424 + 272760832 + Client ID and Secret Required + + + + + + + + + 290 + + YES + + + 256 + + YES + + + 258 + + YES + + + 2304 + + YES + + + 256 + {415, 73} + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 412 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + + + + 337772096 + 2048 + + + + 6 + System + controlBackgroundColor + + + + + 3 + YES + + + + 3 + 2 + + 3 + MQA + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + 37748736 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {415, 73}} + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 68}} + + + _doScroller: + 0.35789470000000001 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + 1 + + _doScroller: + 0.99047620000000003 + + + {417, 75} + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{426, 0}, {73, 75}} + + YES + + 130560 + 33554432 + 0 + 0 + 2 + NO + + YES + + + {499, 75} + + YES + + + + 266 + + YES + + + 2304 + + YES + + + 2322 + {497, 14} + + + + + + results + + + YES + + YES + NSColor + NSFont + + + YES + + 1 + MC40NTEwODY5NCAwLjEwNDE0NTEyIDAuMDgyODYwMjE2AA + + + Geneva + 10 + 16 + + + + + + + YES + + + 6 + + + + 497 + 1 + + + 67119969 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + 1 + MCAwIDEAA + + + + + + + 1 + + 6 + {996, 10000000} + {463, 0} + + + + {{1, 1}, {497, 56}} + + + + + + {4, 5} + + 79691776 + + YES + + YES + + + + + file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff + + + + + + 3 + MCAwAA + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{0, 84}, {499, 58}} + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + {{20, 40}, {499, 142}} + + + + + 274 + + YES + + + 256 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 256 + {408, 74} + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 405 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + + + 337772096 + 2048 + + + + + + 3 + YES + + + + 3 + 2 + + + 17 + 37748736 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {408, 74}} + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 68}} + + + _doScroller: + 0.35789470000000001 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + 1 + + _doScroller: + 0.99047620000000003 + + + {410, 76} + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 264 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{419, 0}, {80, 76}} + + YES + + 130560 + 33554432 + 0 + 0 + 2 + NO + + YES + + + {499, 76} + + YES + + + + 290 + + YES + + + 2304 + + YES + + + 2322 + {497, 14} + + + + + + results + + + + + + YES + + + 6 + + + + 497 + 1 + + + 67119969 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + + + + + + 1 + + 6 + {996, 10000000} + {463, 0} + + + + {{1, 1}, {497, 56}} + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{0, 85}, {499, 58}} + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + {{20, 245}, {499, 143}} + + + + + 270 + {{20, 396}, {398, 17}} + + YES + + 67239424 + 272629760 + User Profile + + + + + + + + {539, 493} + + + {{0, 0}, {1920, 1178}} + {539, 515} + {10000000000000, 10000000000000} + YES + + + YES + + + 3 + 2 + {{235, 277}, {458, 282}} + 611844096 + Client ID Sheet + NSWindow + + + + + 256 + + YES + + + 266 + {{118, 141}, {320, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + 6 + System + textBackgroundColor + + + + 6 + System + textColor + + + + + + + 268 + {{17, 141}, {63, 17}} + + YES + + 68288064 + 272630784 + Client ID: + + + + + + + + + 266 + {{118, 110}, {320, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 115}, {88, 17}} + + YES + + 68288064 + 272630784 + Client Secret: + + + + + + + + + 268 + {{338, 78}, {82, 20}} + + YES + + 67239424 + 134348800 + API Console + + + -2038284033 + 134 + + + 200 + 25 + + + + + 268 + {{17, 80}, {316, 17}} + + YES + + 68288064 + 272630784 + Client ID and Client Secret are obtained from the + + + + + + + + + 268 + {{17, 202}, {424, 34}} + + YES + + 67239424 + 138412032 + Each application should have a client ID and client secret hardcoded into the source. + + + + + + + + + 268 + {{348, 12}, {96, 32}} + + YES + + 67239424 + 134217728 + Done + + + -2038284033 + 129 + + DQ + 200 + 25 + + + + {458, 282} + + {{0, 0}, {1920, 1178}} + {10000000000000, 10000000000000} + YES + + + + + YES + + + window + + + + 16 + + + + loggingCheckboxClicked: + + + + 600 + + + + getFeedClicked: + + + + 808 + + + + signInClicked: + + + + 836 + + + + APIConsoleClicked: + + + + 925 + + + + clientIDClicked: + + + + 931 + + + + clientIDDoneClicked: + + + + 932 + + + + signedInField_ + + + + 965 + + + + signedInButton_ + + + + 966 + + + + clientIDButton_ + + + + 985 + + + + clientIDRequiredTextField_ + + + + 986 + + + + clientIDSheet_ + + + + 987 + + + + clientIDField_ + + + + 988 + + + + clientSecretField_ + + + + 989 + + + + profileTable_ + + + + 990 + + + + profileProgressIndicator_ + + + + 991 + + + + profileResultTextView_ + + + + 992 + + + + profileImageView_ + + + + 993 + + + + profileFetchCancelButton_ + + + + 1001 + + + + cancelProfileFetch: + + + + 1002 + + + + activityFeedResultTextView_ + + + + 1003 + + + + activityFeedTable_ + + + + 1004 + + + + activityFeedImageView_ + + + + 1005 + + + + delegate + + + + 15 + + + + dataSource + + + + 588 + + + + delegate + + + + 589 + + + + delegate + + + + 874 + + + + dataSource + + + + 875 + + + + value: values.clientID + + + + + + value: values.clientID + value + values.clientID + + NSContinuouslyUpdatesValue + + + 2 + + + 940 + + + + value: values.clientSecret + + + + + + value: values.clientSecret + value + values.clientSecret + + NSContinuouslyUpdatesValue + + + 2 + + + 939 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 5 + + + YES + + + + Window + + + 6 + + + YES + + + + + + + + + + + + + + + + + + 17 + + + YES + + + + + + 40 + + + + + 139 + + + YES + + + + + + 44 + + + Shared Defaults + + + 744 + + + + + 746 + + + + + 796 + + + YES + + + + + + 797 + + + + + 828 + + + YES + + + + + + 829 + + + YES + + + + + + 830 + + + YES + + + + + + 831 + + + + + 832 + + + + + 833 + + + + + 900 + + + YES + + + + + + 901 + + + YES + + + + + + + + + + + + + 902 + + + YES + + + + + + 903 + + + YES + + + + + + 904 + + + YES + + + + + + 905 + + + YES + + + + + + 906 + + + YES + + + + + + 907 + + + YES + + + + + + 908 + + + YES + + + + + + 909 + + + + + 910 + + + + + 911 + + + + + 912 + + + + + 913 + + + + + 914 + + + + + 915 + + + + + 920 + + + YES + + + + + + 921 + + + + + 929 + + + YES + + + + + + 930 + + + + + 933 + + + YES + + + + + + 934 + + + + + 958 + + + YES + + + + + + + 957 + + + YES + + + + + + + 955 + + + YES + + + + + + 850 + + + YES + + + + + + + + 853 + + + + + 852 + + + + + 851 + + + YES + + + + + + 854 + + + YES + + + + + + 855 + + + + + 956 + + + + + 849 + + + YES + + + + + + + + 856 + + + + + 857 + + + + + 858 + + + + + 963 + + + YES + + + + + + + 962 + + + YES + + + + + + + 960 + + + YES + + + + + + 24 + + + YES + + + + + + + + 25 + + + YES + + + + + + 760 + + + + + 761 + + + + + 26 + + + YES + + + + + + 758 + + + + + 961 + + + + + 80 + + + YES + + + + + + + + 763 + + + + + 762 + + + + + 81 + + + + + 995 + + + YES + + + + + + 996 + + + + + 859 + + + YES + + + + + + 860 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 139.IBPluginDependency + 17.IBPluginDependency + 24.IBPluginDependency + 25.IBPluginDependency + 26.IBPluginDependency + 40.IBPluginDependency + 44.IBPluginDependency + 5.IBPluginDependency + 5.IBWindowTemplateEditedContentRect + 6.IBPluginDependency + 744.IBPluginDependency + 746.IBPluginDependency + 758.IBPluginDependency + 758.IBShouldRemoveOnLegacySave + 760.IBPluginDependency + 760.IBShouldRemoveOnLegacySave + 761.IBPluginDependency + 761.IBShouldRemoveOnLegacySave + 762.IBPluginDependency + 762.IBShouldRemoveOnLegacySave + 763.IBPluginDependency + 763.IBShouldRemoveOnLegacySave + 796.IBPluginDependency + 797.IBPluginDependency + 80.IBPluginDependency + 81.IBPluginDependency + 828.IBPluginDependency + 829.IBPluginDependency + 830.IBPluginDependency + 831.IBPluginDependency + 832.IBPluginDependency + 833.IBPluginDependency + 849.IBPluginDependency + 850.IBPluginDependency + 851.IBPluginDependency + 852.IBPluginDependency + 852.IBShouldRemoveOnLegacySave + 853.IBPluginDependency + 853.IBShouldRemoveOnLegacySave + 854.IBPluginDependency + 855.IBPluginDependency + 855.IBShouldRemoveOnLegacySave + 856.IBPluginDependency + 857.IBPluginDependency + 857.IBShouldRemoveOnLegacySave + 858.IBPluginDependency + 858.IBShouldRemoveOnLegacySave + 859.IBPluginDependency + 860.IBPluginDependency + 900.IBPluginDependency + 900.IBWindowTemplateEditedContentRect + 900.NSWindowTemplate.visibleAtLaunch + 901.IBPluginDependency + 902.IBPluginDependency + 903.IBPluginDependency + 904.IBPluginDependency + 905.IBPluginDependency + 906.IBPluginDependency + 907.IBPluginDependency + 908.IBPluginDependency + 909.IBPluginDependency + 910.IBPluginDependency + 911.IBPluginDependency + 912.IBPluginDependency + 913.IBPluginDependency + 914.IBPluginDependency + 915.IBPluginDependency + 920.IBPluginDependency + 921.IBPluginDependency + 929.IBPluginDependency + 930.IBPluginDependency + 933.IBPluginDependency + 934.IBPluginDependency + 955.IBPluginDependency + 956.IBPluginDependency + 957.IBPluginDependency + 958.IBPluginDependency + 960.IBPluginDependency + 961.IBPluginDependency + 962.IBPluginDependency + 963.IBPluginDependency + 995.IBPluginDependency + 996.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{32, 663}, {539, 493}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{196, 842}, {458, 282}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 1005 + + + + YES + + PlusSampleWindowController + NSWindowController + + YES + + YES + APIConsoleClicked: + addClicked: + cancelProfileFetch: + clientIDClicked: + clientIDDoneClicked: + deleteClicked: + deleteTableClicked: + getFeedClicked: + getSpreadsheetClicked: + loggingCheckboxClicked: + plusOneClicked: + randomizeTableClicked: + renameClicked: + segmentedControlClicked: + signInClicked: + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + APIConsoleClicked: + addClicked: + cancelProfileFetch: + clientIDClicked: + clientIDDoneClicked: + deleteClicked: + deleteTableClicked: + getFeedClicked: + getSpreadsheetClicked: + loggingCheckboxClicked: + plusOneClicked: + randomizeTableClicked: + renameClicked: + segmentedControlClicked: + signInClicked: + + + YES + + APIConsoleClicked: + id + + + addClicked: + id + + + cancelProfileFetch: + id + + + clientIDClicked: + id + + + clientIDDoneClicked: + id + + + deleteClicked: + id + + + deleteTableClicked: + id + + + getFeedClicked: + id + + + getSpreadsheetClicked: + id + + + loggingCheckboxClicked: + id + + + plusOneClicked: + id + + + randomizeTableClicked: + id + + + renameClicked: + id + + + segmentedControlClicked: + id + + + signInClicked: + id + + + + + YES + + YES + activityFeedImageView_ + activityFeedResultTextView_ + activityFeedTable_ + addButton_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + deleteButton_ + mRecordProgressIndicator + mRecordResultTextField + mRecordTable + mSpreadsheetProgressIndicator + mSpreadsheetResultTextField + mSpreadsheetTable + mTableProgressIndicator + mTableResultTextField + mTableTable + mWorksheetProgressIndicator + mWorksheetResultTextField + mWorksheetTable + nameField_ + profileFetchCancelButton_ + profileImageView_ + profileProgressIndicator_ + profileResultTextView_ + profileTable_ + renameButton_ + segmentedControl_ + signedInButton_ + signedInField_ + + + YES + NSImageView + NSTextView + NSTableView + NSButton + NSButton + NSTextField + NSTextField + NSWindow + NSTextField + NSButton + NSProgressIndicator + NSTextView + NSTableView + NSProgressIndicator + NSTextView + NSTableView + NSProgressIndicator + NSTextView + NSTableView + NSProgressIndicator + NSTextView + NSTableView + NSTextField + NSButton + NSImageView + NSProgressIndicator + NSTextView + NSTableView + NSButton + NSSegmentedControl + NSButton + NSTextField + + + + YES + + YES + activityFeedImageView_ + activityFeedResultTextView_ + activityFeedTable_ + addButton_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + deleteButton_ + mRecordProgressIndicator + mRecordResultTextField + mRecordTable + mSpreadsheetProgressIndicator + mSpreadsheetResultTextField + mSpreadsheetTable + mTableProgressIndicator + mTableResultTextField + mTableTable + mWorksheetProgressIndicator + mWorksheetResultTextField + mWorksheetTable + nameField_ + profileFetchCancelButton_ + profileImageView_ + profileProgressIndicator_ + profileResultTextView_ + profileTable_ + renameButton_ + segmentedControl_ + signedInButton_ + signedInField_ + + + YES + + activityFeedImageView_ + NSImageView + + + activityFeedResultTextView_ + NSTextView + + + activityFeedTable_ + NSTableView + + + addButton_ + NSButton + + + clientIDButton_ + NSButton + + + clientIDField_ + NSTextField + + + clientIDRequiredTextField_ + NSTextField + + + clientIDSheet_ + NSWindow + + + clientSecretField_ + NSTextField + + + deleteButton_ + NSButton + + + mRecordProgressIndicator + NSProgressIndicator + + + mRecordResultTextField + NSTextView + + + mRecordTable + NSTableView + + + mSpreadsheetProgressIndicator + NSProgressIndicator + + + mSpreadsheetResultTextField + NSTextView + + + mSpreadsheetTable + NSTableView + + + mTableProgressIndicator + NSProgressIndicator + + + mTableResultTextField + NSTextView + + + mTableTable + NSTableView + + + mWorksheetProgressIndicator + NSProgressIndicator + + + mWorksheetResultTextField + NSTextView + + + mWorksheetTable + NSTableView + + + nameField_ + NSTextField + + + profileFetchCancelButton_ + NSButton + + + profileImageView_ + NSImageView + + + profileProgressIndicator_ + NSProgressIndicator + + + profileResultTextView_ + NSTextView + + + profileTable_ + NSTableView + + + renameButton_ + NSButton + + + segmentedControl_ + NSSegmentedControl + + + signedInButton_ + NSButton + + + signedInField_ + NSTextField + + + + + IBProjectSource + ./Classes/PlusSampleWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + NSSwitch + {15, 15} + + + diff --git a/GTL/Examples/PlusSample/English.lproj/InfoPlist.strings b/GTL/Examples/PlusSample/English.lproj/InfoPlist.strings new file mode 100644 index 0000000..77831dd --- /dev/null +++ b/GTL/Examples/PlusSample/English.lproj/InfoPlist.strings @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "© Google Inc. 2011"; diff --git a/GTL/Examples/PlusSample/English.lproj/MainMenu.xib b/GTL/Examples/PlusSample/English.lproj/MainMenu.xib new file mode 100644 index 0000000..06128ee --- /dev/null +++ b/GTL/Examples/PlusSample/English.lproj/MainMenu.xib @@ -0,0 +1,2409 @@ + + + + 1050 + 10J869 + 851 + 1038.35 + 461.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 851 + + + YES + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + + NSApplication + + + + FirstResponder + + + NSApplication + + + MainMenu + + YES + + + SampleApp + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + SampleApp + + YES + + + About the Sample + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + + Services + + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + + File + + + YES + + + New + n + 1048576 + 2147483647 + + + + + + Open... + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + + Open Recent + + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + Save As… + S + 1048576 + 2147483647 + + + + + + Revert + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup… + P + 1048576 + 2147483647 + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + + Edit + + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + + Find + + + YES + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1048576 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling + + 1048576 + 2147483647 + + + submenuAction: + + Spelling + + YES + + + Spelling… + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling as You Type + + 1048576 + 2147483647 + + + + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + + Window + + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + Help + + YES + + + Help + ? + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + PlusSampleAppController + + + + + YES + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + showHelp: + + + + 122 + + + + clearRecentDocuments: + + + + 127 + + + + terminate: + + + + 139 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + hideOtherApplications: + + + + 146 + + + + hide: + + + + 152 + + + + unhideAllApplications: + + + + 153 + + + + cut: + + + + 175 + + + + paste: + + + + 176 + + + + redo: + + + + 178 + + + + selectAll: + + + + 179 + + + + undo: + + + + 180 + + + + copy: + + + + 181 + + + + showGuessPanel: + + + + 188 + + + + checkSpelling: + + + + 190 + + + + toggleContinuousSpellChecking: + + + + 192 + + + + performClose: + + + + 193 + + + + delete: + + + + 195 + + + + performZoom: + + + + 198 + + + + performFindPanelAction: + + + + 199 + + + + performFindPanelAction: + + + + 200 + + + + performFindPanelAction: + + + + 201 + + + + performFindPanelAction: + + + + 202 + + + + centerSelectionInVisibleArea: + + + + 203 + + + + pasteAsPlainText: + + + + 205 + + + + delegate + + + + 223 + + + + delegate + + + + 225 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + MainMenu + + + 19 + + + YES + + + + + + 24 + + + YES + + + + + + + + + 5 + + + + + 23 + + + + + 92 + + + + + 197 + + + + + 56 + + + YES + + + + + + 57 + + + YES + + + + + + + + + + + + + + + + 58 + + + + + 129 + + + + + 131 + + + YES + + + + + + 130 + + + + + 134 + + + + + 136 + + + + + 143 + + + + + 144 + + + + + 145 + + + + + 149 + + + + + 150 + + + + + 196 + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + + + + + + + + 72 + + + + + 73 + + + + + 74 + + + + + 75 + + + + + 77 + + + + + 78 + + + + + 79 + + + + + 80 + + + + + 82 + + + + + 112 + + + + + 124 + + + YES + + + + + + 125 + + + YES + + + + + + 126 + + + + + 103 + + + YES + + + + + + 106 + + + YES + + + + + + 111 + + + + + 163 + + + YES + + + + + + 169 + + + YES + + + + + + + + + + + + + + + + + 156 + + + + + 157 + + + + + 158 + + + + + 160 + + + + + 164 + + + + + 168 + + + YES + + + + + + 159 + + + YES + + + + + + + + + + 154 + + + + + 155 + + + + + 161 + + + + + 162 + + + + + 167 + + + + + 171 + + + + + 172 + + + + + 173 + + + + + 174 + + + + + 184 + + + YES + + + + + + 185 + + + YES + + + + + + + + 187 + + + + + 189 + + + + + 191 + + + + + 204 + + + + + 222 + + + BuzzSampleAppController + + + + + YES + + YES + -3.IBPluginDependency + -3.ImportedFromIB2 + 103.IBPluginDependency + 103.ImportedFromIB2 + 106.IBPluginDependency + 106.ImportedFromIB2 + 111.IBPluginDependency + 111.ImportedFromIB2 + 112.IBPluginDependency + 112.ImportedFromIB2 + 124.IBPluginDependency + 124.ImportedFromIB2 + 125.IBPluginDependency + 125.ImportedFromIB2 + 126.IBPluginDependency + 126.ImportedFromIB2 + 129.IBPluginDependency + 129.ImportedFromIB2 + 130.IBPluginDependency + 130.ImportedFromIB2 + 131.IBPluginDependency + 131.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 136.IBPluginDependency + 136.ImportedFromIB2 + 143.IBPluginDependency + 143.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 145.IBPluginDependency + 145.ImportedFromIB2 + 149.IBPluginDependency + 149.ImportedFromIB2 + 150.IBPluginDependency + 150.ImportedFromIB2 + 154.IBPluginDependency + 154.ImportedFromIB2 + 155.IBPluginDependency + 155.ImportedFromIB2 + 156.IBPluginDependency + 156.ImportedFromIB2 + 157.IBPluginDependency + 157.ImportedFromIB2 + 158.IBPluginDependency + 158.ImportedFromIB2 + 159.IBPluginDependency + 159.ImportedFromIB2 + 160.IBPluginDependency + 160.ImportedFromIB2 + 161.IBPluginDependency + 161.ImportedFromIB2 + 162.IBPluginDependency + 162.ImportedFromIB2 + 163.IBPluginDependency + 163.ImportedFromIB2 + 164.IBPluginDependency + 164.ImportedFromIB2 + 167.IBPluginDependency + 167.ImportedFromIB2 + 168.IBPluginDependency + 168.ImportedFromIB2 + 169.IBPluginDependency + 169.ImportedFromIB2 + 171.IBPluginDependency + 171.ImportedFromIB2 + 172.IBPluginDependency + 172.ImportedFromIB2 + 173.IBPluginDependency + 173.ImportedFromIB2 + 174.IBPluginDependency + 174.ImportedFromIB2 + 184.IBPluginDependency + 184.ImportedFromIB2 + 185.IBPluginDependency + 185.ImportedFromIB2 + 187.IBPluginDependency + 187.ImportedFromIB2 + 189.IBPluginDependency + 189.ImportedFromIB2 + 19.IBPluginDependency + 19.ImportedFromIB2 + 191.IBPluginDependency + 191.ImportedFromIB2 + 196.IBPluginDependency + 196.ImportedFromIB2 + 197.IBPluginDependency + 197.ImportedFromIB2 + 204.IBPluginDependency + 204.ImportedFromIB2 + 222.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 24.IBPluginDependency + 24.ImportedFromIB2 + 29.IBPluginDependency + 29.ImportedFromIB2 + 5.IBPluginDependency + 5.ImportedFromIB2 + 56.IBPluginDependency + 56.ImportedFromIB2 + 57.IBPluginDependency + 57.ImportedFromIB2 + 58.IBPluginDependency + 58.ImportedFromIB2 + 72.IBPluginDependency + 72.ImportedFromIB2 + 73.IBPluginDependency + 73.ImportedFromIB2 + 74.IBPluginDependency + 74.ImportedFromIB2 + 75.IBPluginDependency + 75.ImportedFromIB2 + 77.IBPluginDependency + 77.ImportedFromIB2 + 78.IBPluginDependency + 78.ImportedFromIB2 + 79.IBPluginDependency + 79.ImportedFromIB2 + 80.IBPluginDependency + 80.ImportedFromIB2 + 81.IBPluginDependency + 81.ImportedFromIB2 + 82.IBPluginDependency + 82.ImportedFromIB2 + 83.IBPluginDependency + 83.ImportedFromIB2 + 92.IBPluginDependency + 92.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + + YES + + + + + YES + + + YES + + + + 227 + + + + YES + + FirstResponder + NSObject + + IBUserSource + + + + + PlusSampleAppController + NSObject + + IBUserSource + + + + + + YES + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSBrowser + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSBrowser.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSDocument + NSObject + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + id + id + id + id + id + id + + + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + + printDocument: + id + + + revertDocumentToSaved: + id + + + runPageLayout: + id + + + saveDocument: + id + + + saveDocumentAs: + id + + + saveDocumentTo: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocument.h + + + + NSDocument + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentScripting.h + + + + NSDocumentController + NSObject + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + id + id + id + id + + + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + + clearRecentDocuments: + id + + + newDocument: + id + + + openDocument: + id + + + saveAllDocuments: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentController.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSMatrix + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSMatrix.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSMenuItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSMovieView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSMovieView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebEditingDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebFrameLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebJavaPlugIn.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPlugin.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPluginContainer.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPolicyDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebResourceLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebScriptObject.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebUIDelegate.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSTableView + NSControl + + + + NSText + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSText.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + + WebView + NSView + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + + goBack: + id + + + goForward: + id + + + makeTextLarger: + id + + + makeTextSmaller: + id + + + makeTextStandardSize: + id + + + reload: + id + + + reloadFromOrigin: + id + + + stopLoading: + id + + + takeStringURLFrom: + id + + + toggleContinuousSpellChecking: + id + + + toggleSmartInsertDelete: + id + + + + + IBFrameworkSource + WebKit.framework/Headers/WebView.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../BuzzSample.xcodeproj + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {9, 8} + {7, 2} + + + + diff --git a/GTL/Examples/PlusSample/English.lproj/PlusSampleWindow.xib b/GTL/Examples/PlusSample/English.lproj/PlusSampleWindow.xib new file mode 100644 index 0000000..83d4d12 --- /dev/null +++ b/GTL/Examples/PlusSample/English.lproj/PlusSampleWindow.xib @@ -0,0 +1,2510 @@ + + + + 1070 + 11D50b + 2182 + 1138.32 + 568.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2182 + + + YES + NSTableColumn + NSScroller + NSSplitView + NSButton + NSTextFieldCell + NSImageView + NSButtonCell + NSScrollView + NSProgressIndicator + NSTableView + NSImageCell + NSCustomObject + NSTextView + NSView + NSWindowTemplate + NSTextField + NSUserDefaultsController + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + PlusSampleWindowController + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{16, 645}, {539, 493}} + 1886912512 + Sample App + + NSWindow + + + View + + + {539, 493} + + + 256 + + YES + + + 265 + {{427, 419}, {106, 32}} + + YES + + 67239424 + 134217728 + Get Profile + + LucidaGrande + 13 + 1044 + + + -2038284033 + 1 + + LucidaGrande + 13 + 16 + + + DQ + 200 + 25 + + + + + 1289 + + {{434, 396}, {16, 16}} + + 28938 + 100 + + + + 289 + {{400, 16}, {128, 18}} + + YES + + 67239424 + 131072 + Log http to desktop + + LucidaGrande + 11 + 3100 + + + 1211912703 + 2 + + NSImage + NSSwitch + + + NSSwitch + + + + 200 + 25 + + + + + 265 + {{467, 394}, {53, 16}} + + YES + + 67239424 + 134479872 + Cancel + + LucidaGrande + 9 + 3614 + + + -2038284033 + 1 + + LucidaGrande + 9 + 16 + + + + 200 + 25 + + + + + 264 + {{93, 429}, {71, 17}} + + YES + + 67239424 + 272629760 + Signed In: + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 266 + {{166, 429}, {247, 17}} + + YES + + 67239424 + 272629760 + No + + + + + + + + + 268 + {{18, 422}, {72, 28}} + + YES + + 67239424 + 134348800 + Sign Out + + + -2038284033 + 129 + + + 200 + 25 + + + + + 290 + {{20, 188}, {398, 17}} + + YES + + 67239424 + 272629760 + Activities - Select One + + + + + + + + + 268 + {{18, 449}, {83, 28}} + + YES + + -2080244224 + 134348800 + Client ID... + + + -2038284033 + 129 + + + 200 + 25 + + + + + 264 + {{105, 456}, {178, 14}} + + YES + + 67239424 + 272760832 + Client ID and Secret Required + + + + + + + + + 290 + + YES + + + 256 + + YES + + + 258 + + YES + + + 2304 + + YES + + + 256 + {415, 73} + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 412 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + + + + 337772096 + 2048 + + + + 6 + System + controlBackgroundColor + + + + + 3 + YES + + + + 3 + 2 + + 3 + MQA + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + 37748736 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {415, 73}} + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 68}} + + + _doScroller: + 0.35789470000000001 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + 1 + + _doScroller: + 0.99047620000000003 + + + {417, 75} + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{426, 0}, {73, 75}} + + YES + + 130560 + 33554432 + 0 + 0 + 2 + NO + + YES + + + {499, 75} + + YES + + + + 266 + + YES + + + 2304 + + YES + + + 2322 + {497, 14} + + + + + + results + + + YES + + YES + NSColor + NSFont + + + YES + + 1 + MC40NTEwODY5NCAwLjEwNDE0NTEyIDAuMDgyODYwMjE2AA + + + Geneva + 10 + 16 + + + + + + + YES + + + 6 + + + + 497 + 1 + + + 67119969 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + 1 + MCAwIDEAA + + + + + + + 1 + + 6 + {996, 10000000} + {463, 0} + + + + {{1, 1}, {497, 56}} + + + + + + {4, 5} + + 79691776 + + YES + + YES + + + + + file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff + + + + + + 3 + MCAwAA + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{0, 84}, {499, 58}} + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + {{20, 40}, {499, 142}} + + + + + 274 + + YES + + + 256 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 256 + {408, 74} + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 405 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + + + 337772096 + 2048 + + + + + + 3 + YES + + + + 3 + 2 + + + 17 + 37748736 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {408, 74}} + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 68}} + + + _doScroller: + 0.35789470000000001 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + 1 + + _doScroller: + 0.99047620000000003 + + + {410, 76} + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 264 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{419, 0}, {80, 76}} + + YES + + 130560 + 33554432 + 0 + 0 + 2 + NO + + YES + + + {499, 76} + + YES + + + + 290 + + YES + + + 2304 + + YES + + + 2322 + {497, 14} + + + + + + results + + + + + + YES + + + 6 + + + + 497 + 1 + + + 67119969 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + + + + + + 1 + + 6 + {996, 10000000} + {463, 0} + + + + {{1, 1}, {497, 56}} + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{0, 85}, {499, 58}} + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + {{20, 245}, {499, 143}} + + + + + 270 + {{20, 396}, {398, 17}} + + YES + + 67239424 + 272629760 + User Profile + + + + + + + + {539, 493} + + + {{0, 0}, {1920, 1178}} + {539, 515} + {10000000000000, 10000000000000} + YES + + + YES + + + 3 + 2 + {{235, 277}, {458, 282}} + 611844096 + Client ID Sheet + NSWindow + + + + + 256 + + YES + + + 266 + {{118, 141}, {320, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + 6 + System + textBackgroundColor + + + + 6 + System + textColor + + + + + + + 268 + {{17, 141}, {63, 17}} + + YES + + 68288064 + 272630784 + Client ID: + + + + + + + + + 266 + {{118, 110}, {320, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 115}, {88, 17}} + + YES + + 68288064 + 272630784 + Client Secret: + + + + + + + + + 268 + {{338, 78}, {82, 20}} + + YES + + 67239424 + 134348800 + API Console + + + -2038284033 + 134 + + + 200 + 25 + + + + + 268 + {{17, 80}, {316, 17}} + + YES + + 68288064 + 272630784 + Client ID and Client Secret are obtained from the + + + + + + + + + 268 + {{17, 202}, {424, 34}} + + YES + + 67239424 + 138412032 + Each application should have a client ID and client secret hardcoded into the source. + + + + + + + + + 268 + {{348, 12}, {96, 32}} + + YES + + 67239424 + 134217728 + Done + + + -2038284033 + 129 + + DQ + 200 + 25 + + + + {458, 282} + + {{0, 0}, {1920, 1178}} + {10000000000000, 10000000000000} + YES + + + + + YES + + + window + + + + 16 + + + + loggingCheckboxClicked: + + + + 600 + + + + getFeedClicked: + + + + 808 + + + + signInClicked: + + + + 836 + + + + APIConsoleClicked: + + + + 925 + + + + clientIDClicked: + + + + 931 + + + + clientIDDoneClicked: + + + + 932 + + + + signedInField_ + + + + 965 + + + + signedInButton_ + + + + 966 + + + + clientIDButton_ + + + + 985 + + + + clientIDRequiredTextField_ + + + + 986 + + + + clientIDSheet_ + + + + 987 + + + + clientIDField_ + + + + 988 + + + + clientSecretField_ + + + + 989 + + + + profileTable_ + + + + 990 + + + + profileProgressIndicator_ + + + + 991 + + + + profileResultTextView_ + + + + 992 + + + + profileImageView_ + + + + 993 + + + + profileFetchCancelButton_ + + + + 1001 + + + + cancelProfileFetch: + + + + 1002 + + + + activityFeedResultTextView_ + + + + 1003 + + + + activityFeedTable_ + + + + 1004 + + + + activityFeedImageView_ + + + + 1005 + + + + delegate + + + + 15 + + + + dataSource + + + + 588 + + + + delegate + + + + 589 + + + + delegate + + + + 874 + + + + dataSource + + + + 875 + + + + value: values.clientID + + + + + + value: values.clientID + value + values.clientID + + NSContinuouslyUpdatesValue + + + 2 + + + 940 + + + + value: values.clientSecret + + + + + + value: values.clientSecret + value + values.clientSecret + + NSContinuouslyUpdatesValue + + + 2 + + + 939 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 5 + + + YES + + + + Window + + + 6 + + + YES + + + + + + + + + + + + + + + + + + 17 + + + YES + + + + + + 40 + + + + + 139 + + + YES + + + + + + 44 + + + Shared Defaults + + + 744 + + + + + 746 + + + + + 796 + + + YES + + + + + + 797 + + + + + 828 + + + YES + + + + + + 829 + + + YES + + + + + + 830 + + + YES + + + + + + 831 + + + + + 832 + + + + + 833 + + + + + 900 + + + YES + + + + + + 901 + + + YES + + + + + + + + + + + + + 902 + + + YES + + + + + + 903 + + + YES + + + + + + 904 + + + YES + + + + + + 905 + + + YES + + + + + + 906 + + + YES + + + + + + 907 + + + YES + + + + + + 908 + + + YES + + + + + + 909 + + + + + 910 + + + + + 911 + + + + + 912 + + + + + 913 + + + + + 914 + + + + + 915 + + + + + 920 + + + YES + + + + + + 921 + + + + + 929 + + + YES + + + + + + 930 + + + + + 933 + + + YES + + + + + + 934 + + + + + 958 + + + YES + + + + + + + 957 + + + YES + + + + + + + 955 + + + YES + + + + + + 850 + + + YES + + + + + + + + 853 + + + + + 852 + + + + + 851 + + + YES + + + + + + 854 + + + YES + + + + + + 855 + + + + + 956 + + + + + 849 + + + YES + + + + + + + + 856 + + + + + 857 + + + + + 858 + + + + + 963 + + + YES + + + + + + + 962 + + + YES + + + + + + + 960 + + + YES + + + + + + 24 + + + YES + + + + + + + + 25 + + + YES + + + + + + 760 + + + + + 761 + + + + + 26 + + + YES + + + + + + 758 + + + + + 961 + + + + + 80 + + + YES + + + + + + + + 763 + + + + + 762 + + + + + 81 + + + + + 995 + + + YES + + + + + + 996 + + + + + 859 + + + YES + + + + + + 860 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 139.IBPluginDependency + 17.IBPluginDependency + 24.IBPluginDependency + 25.IBPluginDependency + 26.IBPluginDependency + 40.IBPluginDependency + 44.IBPluginDependency + 5.IBPluginDependency + 5.IBWindowTemplateEditedContentRect + 6.IBPluginDependency + 744.IBPluginDependency + 746.IBPluginDependency + 758.IBPluginDependency + 758.IBShouldRemoveOnLegacySave + 760.IBPluginDependency + 760.IBShouldRemoveOnLegacySave + 761.IBPluginDependency + 761.IBShouldRemoveOnLegacySave + 762.IBPluginDependency + 762.IBShouldRemoveOnLegacySave + 763.IBPluginDependency + 763.IBShouldRemoveOnLegacySave + 796.IBPluginDependency + 797.IBPluginDependency + 80.IBPluginDependency + 81.IBPluginDependency + 828.IBPluginDependency + 829.IBPluginDependency + 830.IBPluginDependency + 831.IBPluginDependency + 832.IBPluginDependency + 833.IBPluginDependency + 849.IBPluginDependency + 850.IBPluginDependency + 851.IBPluginDependency + 852.IBPluginDependency + 852.IBShouldRemoveOnLegacySave + 853.IBPluginDependency + 853.IBShouldRemoveOnLegacySave + 854.IBPluginDependency + 855.IBPluginDependency + 855.IBShouldRemoveOnLegacySave + 856.IBPluginDependency + 857.IBPluginDependency + 857.IBShouldRemoveOnLegacySave + 858.IBPluginDependency + 858.IBShouldRemoveOnLegacySave + 859.IBPluginDependency + 860.IBPluginDependency + 900.IBPluginDependency + 900.IBWindowTemplateEditedContentRect + 900.NSWindowTemplate.visibleAtLaunch + 901.IBPluginDependency + 902.IBPluginDependency + 903.IBPluginDependency + 904.IBPluginDependency + 905.IBPluginDependency + 906.IBPluginDependency + 907.IBPluginDependency + 908.IBPluginDependency + 909.IBPluginDependency + 910.IBPluginDependency + 911.IBPluginDependency + 912.IBPluginDependency + 913.IBPluginDependency + 914.IBPluginDependency + 915.IBPluginDependency + 920.IBPluginDependency + 921.IBPluginDependency + 929.IBPluginDependency + 930.IBPluginDependency + 933.IBPluginDependency + 934.IBPluginDependency + 955.IBPluginDependency + 956.IBPluginDependency + 957.IBPluginDependency + 958.IBPluginDependency + 960.IBPluginDependency + 961.IBPluginDependency + 962.IBPluginDependency + 963.IBPluginDependency + 995.IBPluginDependency + 996.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{32, 663}, {539, 493}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{196, 842}, {458, 282}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 1005 + + + + YES + + PlusSampleWindowController + NSWindowController + + YES + + YES + APIConsoleClicked: + addClicked: + cancelProfileFetch: + clientIDClicked: + clientIDDoneClicked: + deleteClicked: + deleteTableClicked: + getFeedClicked: + getSpreadsheetClicked: + loggingCheckboxClicked: + plusOneClicked: + randomizeTableClicked: + renameClicked: + segmentedControlClicked: + signInClicked: + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + APIConsoleClicked: + addClicked: + cancelProfileFetch: + clientIDClicked: + clientIDDoneClicked: + deleteClicked: + deleteTableClicked: + getFeedClicked: + getSpreadsheetClicked: + loggingCheckboxClicked: + plusOneClicked: + randomizeTableClicked: + renameClicked: + segmentedControlClicked: + signInClicked: + + + YES + + APIConsoleClicked: + id + + + addClicked: + id + + + cancelProfileFetch: + id + + + clientIDClicked: + id + + + clientIDDoneClicked: + id + + + deleteClicked: + id + + + deleteTableClicked: + id + + + getFeedClicked: + id + + + getSpreadsheetClicked: + id + + + loggingCheckboxClicked: + id + + + plusOneClicked: + id + + + randomizeTableClicked: + id + + + renameClicked: + id + + + segmentedControlClicked: + id + + + signInClicked: + id + + + + + YES + + YES + activityFeedImageView_ + activityFeedResultTextView_ + activityFeedTable_ + addButton_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + deleteButton_ + mRecordProgressIndicator + mRecordResultTextField + mRecordTable + mSpreadsheetProgressIndicator + mSpreadsheetResultTextField + mSpreadsheetTable + mTableProgressIndicator + mTableResultTextField + mTableTable + mWorksheetProgressIndicator + mWorksheetResultTextField + mWorksheetTable + nameField_ + profileFetchCancelButton_ + profileImageView_ + profileProgressIndicator_ + profileResultTextView_ + profileTable_ + renameButton_ + segmentedControl_ + signedInButton_ + signedInField_ + + + YES + NSImageView + NSTextView + NSTableView + NSButton + NSButton + NSTextField + NSTextField + NSWindow + NSTextField + NSButton + NSProgressIndicator + NSTextView + NSTableView + NSProgressIndicator + NSTextView + NSTableView + NSProgressIndicator + NSTextView + NSTableView + NSProgressIndicator + NSTextView + NSTableView + NSTextField + NSButton + NSImageView + NSProgressIndicator + NSTextView + NSTableView + NSButton + NSSegmentedControl + NSButton + NSTextField + + + + YES + + YES + activityFeedImageView_ + activityFeedResultTextView_ + activityFeedTable_ + addButton_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + deleteButton_ + mRecordProgressIndicator + mRecordResultTextField + mRecordTable + mSpreadsheetProgressIndicator + mSpreadsheetResultTextField + mSpreadsheetTable + mTableProgressIndicator + mTableResultTextField + mTableTable + mWorksheetProgressIndicator + mWorksheetResultTextField + mWorksheetTable + nameField_ + profileFetchCancelButton_ + profileImageView_ + profileProgressIndicator_ + profileResultTextView_ + profileTable_ + renameButton_ + segmentedControl_ + signedInButton_ + signedInField_ + + + YES + + activityFeedImageView_ + NSImageView + + + activityFeedResultTextView_ + NSTextView + + + activityFeedTable_ + NSTableView + + + addButton_ + NSButton + + + clientIDButton_ + NSButton + + + clientIDField_ + NSTextField + + + clientIDRequiredTextField_ + NSTextField + + + clientIDSheet_ + NSWindow + + + clientSecretField_ + NSTextField + + + deleteButton_ + NSButton + + + mRecordProgressIndicator + NSProgressIndicator + + + mRecordResultTextField + NSTextView + + + mRecordTable + NSTableView + + + mSpreadsheetProgressIndicator + NSProgressIndicator + + + mSpreadsheetResultTextField + NSTextView + + + mSpreadsheetTable + NSTableView + + + mTableProgressIndicator + NSProgressIndicator + + + mTableResultTextField + NSTextView + + + mTableTable + NSTableView + + + mWorksheetProgressIndicator + NSProgressIndicator + + + mWorksheetResultTextField + NSTextView + + + mWorksheetTable + NSTableView + + + nameField_ + NSTextField + + + profileFetchCancelButton_ + NSButton + + + profileImageView_ + NSImageView + + + profileProgressIndicator_ + NSProgressIndicator + + + profileResultTextView_ + NSTextView + + + profileTable_ + NSTableView + + + renameButton_ + NSButton + + + segmentedControl_ + NSSegmentedControl + + + signedInButton_ + NSButton + + + signedInField_ + NSTextField + + + + + IBProjectSource + ./Classes/PlusSampleWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + NSSwitch + {15, 15} + + + diff --git a/GTL/Examples/PlusSample/Info.plist b/GTL/Examples/PlusSample/Info.plist new file mode 100644 index 0000000..1201b0f --- /dev/null +++ b/GTL/Examples/PlusSample/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.example.PlusSample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/GTL/Examples/PlusSample/PlusSample.xcodeproj/.svn/all-wcprops b/GTL/Examples/PlusSample/PlusSample.xcodeproj/.svn/all-wcprops new file mode 100644 index 0000000..846c318 --- /dev/null +++ b/GTL/Examples/PlusSample/PlusSample.xcodeproj/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 64 +/svn/!svn/ver/154/trunk/Examples/PlusSample/PlusSample.xcodeproj +END +project.pbxproj +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/154/trunk/Examples/PlusSample/PlusSample.xcodeproj/project.pbxproj +END diff --git a/GTL/Examples/PlusSample/PlusSample.xcodeproj/.svn/entries b/GTL/Examples/PlusSample/PlusSample.xcodeproj/.svn/entries new file mode 100644 index 0000000..5f9378c --- /dev/null +++ b/GTL/Examples/PlusSample/PlusSample.xcodeproj/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/PlusSample/PlusSample.xcodeproj +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +project.pbxproj +file + + + + +2012-12-09T08:42:33.000000Z +b530cb8bbab106defdcd658e06889e52 +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +26452 + diff --git a/GTL/Examples/PlusSample/PlusSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base b/GTL/Examples/PlusSample/PlusSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base new file mode 100644 index 0000000..04a98d0 --- /dev/null +++ b/GTL/Examples/PlusSample/PlusSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base @@ -0,0 +1,550 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F22A2141186315400FFBAB6 /* WebKit.framework */; }; + 4F2445C8121F0D2900FEE1DA /* GTL.framework in Copy GTL Framework */ = {isa = PBXBuildFile; fileRef = 4F2445BE121F0CF600FEE1DA /* GTL.framework */; }; + 4F2445C9121F0D2C00FEE1DA /* GTL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F2445BE121F0CF600FEE1DA /* GTL.framework */; }; + 4F346EEF1404678B00D3CE42 /* PlusSampleAppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F346EEC1404678B00D3CE42 /* PlusSampleAppController.m */; }; + 4F346EF01404678B00D3CE42 /* PlusSampleWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F346EEE1404678B00D3CE42 /* PlusSampleWindowController.m */; }; + 4F346F4F1404714200D3CE42 /* PlusSampleWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F346F4D1404714200D3CE42 /* PlusSampleWindow.xib */; }; + 4F93D7DE143CE411000A2029 /* GTLPlusAcl.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F93D7C9143CE411000A2029 /* GTLPlusAcl.m */; }; + 4F93D7DF143CE411000A2029 /* GTLPlusAclentryResource.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F93D7CB143CE411000A2029 /* GTLPlusAclentryResource.m */; }; + 4F93D7E0143CE411000A2029 /* GTLPlusActivity.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F93D7CD143CE411000A2029 /* GTLPlusActivity.m */; }; + 4F93D7E1143CE411000A2029 /* GTLPlusActivityFeed.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F93D7CF143CE411000A2029 /* GTLPlusActivityFeed.m */; }; + 4F93D7E2143CE411000A2029 /* GTLPlusComment.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F93D7D1143CE411000A2029 /* GTLPlusComment.m */; }; + 4F93D7E3143CE411000A2029 /* GTLPlusCommentFeed.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F93D7D3143CE411000A2029 /* GTLPlusCommentFeed.m */; }; + 4F93D7E4143CE411000A2029 /* GTLPlusConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F93D7D5143CE411000A2029 /* GTLPlusConstants.m */; }; + 4F93D7E5143CE411000A2029 /* GTLPlusPeopleFeed.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F93D7D7143CE411000A2029 /* GTLPlusPeopleFeed.m */; }; + 4F93D7E6143CE411000A2029 /* GTLPlusPerson.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F93D7D9143CE411000A2029 /* GTLPlusPerson.m */; }; + 4F93D7E7143CE411000A2029 /* GTLQueryPlus.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F93D7DB143CE411000A2029 /* GTLQueryPlus.m */; }; + 4F93D7E8143CE411000A2029 /* GTLServicePlus.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F93D7DD143CE411000A2029 /* GTLServicePlus.m */; }; + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */; }; + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4F2445BD121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F38F6A60B66E91D00B24B81; + remoteInfo = GTLFramework; + }; + 4F2445BF121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027C11A4CA2F00BEB470; + remoteInfo = GTLTouchStaticLib; + }; + 4F2445C1121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027D11A4CA2F00BEB470; + remoteInfo = GTLUnitTests; + }; + 4F2445C3121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F1AD9020B71603F00DC0485; + remoteInfo = DevelopmentTestTool; + }; + 4F72439E12233FAF001A4AD0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 4F38F6A50B66E91D00B24B81; + remoteInfo = GTLFramework; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 4F38F8970B66FAB700B24B81 /* Copy GTL Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4F2445C8121F0D2900FEE1DA /* GTL.framework in Copy GTL Framework */, + ); + name = "Copy GTL Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 4F22A2141186315400FFBAB6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; + 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GTL.xcodeproj; path = ../../Source/GTL.xcodeproj; sourceTree = SOURCE_ROOT; }; + 4F346EEB1404678B00D3CE42 /* PlusSampleAppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlusSampleAppController.h; sourceTree = ""; }; + 4F346EEC1404678B00D3CE42 /* PlusSampleAppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PlusSampleAppController.m; sourceTree = ""; }; + 4F346EED1404678B00D3CE42 /* PlusSampleWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlusSampleWindowController.h; sourceTree = ""; }; + 4F346EEE1404678B00D3CE42 /* PlusSampleWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PlusSampleWindowController.m; sourceTree = ""; }; + 4F346F4E1404714200D3CE42 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/PlusSampleWindow.xib; sourceTree = ""; }; + 4F93D7C7143CE411000A2029 /* GTLPlus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLPlus.h; sourceTree = ""; }; + 4F93D7C8143CE411000A2029 /* GTLPlusAcl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLPlusAcl.h; sourceTree = ""; }; + 4F93D7C9143CE411000A2029 /* GTLPlusAcl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLPlusAcl.m; sourceTree = ""; }; + 4F93D7CA143CE411000A2029 /* GTLPlusAclentryResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLPlusAclentryResource.h; sourceTree = ""; }; + 4F93D7CB143CE411000A2029 /* GTLPlusAclentryResource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLPlusAclentryResource.m; sourceTree = ""; }; + 4F93D7CC143CE411000A2029 /* GTLPlusActivity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLPlusActivity.h; sourceTree = ""; }; + 4F93D7CD143CE411000A2029 /* GTLPlusActivity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLPlusActivity.m; sourceTree = ""; }; + 4F93D7CE143CE411000A2029 /* GTLPlusActivityFeed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLPlusActivityFeed.h; sourceTree = ""; }; + 4F93D7CF143CE411000A2029 /* GTLPlusActivityFeed.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLPlusActivityFeed.m; sourceTree = ""; }; + 4F93D7D0143CE411000A2029 /* GTLPlusComment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLPlusComment.h; sourceTree = ""; }; + 4F93D7D1143CE411000A2029 /* GTLPlusComment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLPlusComment.m; sourceTree = ""; }; + 4F93D7D2143CE411000A2029 /* GTLPlusCommentFeed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLPlusCommentFeed.h; sourceTree = ""; }; + 4F93D7D3143CE411000A2029 /* GTLPlusCommentFeed.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLPlusCommentFeed.m; sourceTree = ""; }; + 4F93D7D4143CE411000A2029 /* GTLPlusConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLPlusConstants.h; sourceTree = ""; }; + 4F93D7D5143CE411000A2029 /* GTLPlusConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLPlusConstants.m; sourceTree = ""; }; + 4F93D7D6143CE411000A2029 /* GTLPlusPeopleFeed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLPlusPeopleFeed.h; sourceTree = ""; }; + 4F93D7D7143CE411000A2029 /* GTLPlusPeopleFeed.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLPlusPeopleFeed.m; sourceTree = ""; }; + 4F93D7D8143CE411000A2029 /* GTLPlusPerson.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLPlusPerson.h; sourceTree = ""; }; + 4F93D7D9143CE411000A2029 /* GTLPlusPerson.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLPlusPerson.m; sourceTree = ""; }; + 4F93D7DA143CE411000A2029 /* GTLQueryPlus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLQueryPlus.h; sourceTree = ""; }; + 4F93D7DB143CE411000A2029 /* GTLQueryPlus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLQueryPlus.m; sourceTree = ""; }; + 4F93D7DC143CE411000A2029 /* GTLServicePlus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLServicePlus.h; sourceTree = ""; }; + 4F93D7DD143CE411000A2029 /* GTLServicePlus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLServicePlus.m; sourceTree = ""; }; + 4FA6F3D21034AEC400C5DFA5 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = buildStripHeaders; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 8D1107320486CEB800E47090 /* PlusSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PlusSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F2445C9121F0D2C00FEE1DA /* GTL.framework in Frameworks */, + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 4F346EEB1404678B00D3CE42 /* PlusSampleAppController.h */, + 4F346EEC1404678B00D3CE42 /* PlusSampleAppController.m */, + 4F346EED1404678B00D3CE42 /* PlusSampleWindowController.h */, + 4F346EEE1404678B00D3CE42 /* PlusSampleWindowController.m */, + ); + name = Classes; + sourceTree = ""; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 4F22A2141186315400FFBAB6 /* WebKit.framework */, + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* PlusSample.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CalendarSample */ = { + isa = PBXGroup; + children = ( + 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */, + 080E96DDFE201D6D7F000001 /* Classes */, + 4FB2548E138C443100B5C1AE /* API Services */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CalendarSample; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 4F346F4D1404714200D3CE42 /* PlusSampleWindow.xib */, + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */, + 8D1107310486CEB800E47090 /* Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4F2445B7121F0CF600FEE1DA /* Products */ = { + isa = PBXGroup; + children = ( + 4F2445BE121F0CF600FEE1DA /* GTL.framework */, + 4F2445C0121F0CF600FEE1DA /* libGTLTouchStaticLib.a */, + 4F2445C2121F0CF600FEE1DA /* GTLUnitTests.octest */, + 4F2445C4121F0CF600FEE1DA /* DevelopmentTestTool */, + ); + name = Products; + sourceTree = ""; + }; + 4F76A1B0141A9D28005C07AA /* Plus */ = { + isa = PBXGroup; + children = ( + 4F93D7C6143CE411000A2029 /* Generated */, + ); + name = Plus; + path = ../../Source/Services/Plus; + sourceTree = SOURCE_ROOT; + }; + 4F93D7C6143CE411000A2029 /* Generated */ = { + isa = PBXGroup; + children = ( + 4F93D7C7143CE411000A2029 /* GTLPlus.h */, + 4F93D7C8143CE411000A2029 /* GTLPlusAcl.h */, + 4F93D7C9143CE411000A2029 /* GTLPlusAcl.m */, + 4F93D7CA143CE411000A2029 /* GTLPlusAclentryResource.h */, + 4F93D7CB143CE411000A2029 /* GTLPlusAclentryResource.m */, + 4F93D7CC143CE411000A2029 /* GTLPlusActivity.h */, + 4F93D7CD143CE411000A2029 /* GTLPlusActivity.m */, + 4F93D7CE143CE411000A2029 /* GTLPlusActivityFeed.h */, + 4F93D7CF143CE411000A2029 /* GTLPlusActivityFeed.m */, + 4F93D7D0143CE411000A2029 /* GTLPlusComment.h */, + 4F93D7D1143CE411000A2029 /* GTLPlusComment.m */, + 4F93D7D2143CE411000A2029 /* GTLPlusCommentFeed.h */, + 4F93D7D3143CE411000A2029 /* GTLPlusCommentFeed.m */, + 4F93D7D4143CE411000A2029 /* GTLPlusConstants.h */, + 4F93D7D5143CE411000A2029 /* GTLPlusConstants.m */, + 4F93D7D6143CE411000A2029 /* GTLPlusPeopleFeed.h */, + 4F93D7D7143CE411000A2029 /* GTLPlusPeopleFeed.m */, + 4F93D7D8143CE411000A2029 /* GTLPlusPerson.h */, + 4F93D7D9143CE411000A2029 /* GTLPlusPerson.m */, + 4F93D7DA143CE411000A2029 /* GTLQueryPlus.h */, + 4F93D7DB143CE411000A2029 /* GTLQueryPlus.m */, + 4F93D7DC143CE411000A2029 /* GTLServicePlus.h */, + 4F93D7DD143CE411000A2029 /* GTLServicePlus.m */, + ); + path = Generated; + sourceTree = ""; + }; + 4FB2548E138C443100B5C1AE /* API Services */ = { + isa = PBXGroup; + children = ( + 4F76A1B0141A9D28005C07AA /* Plus */, + ); + name = "API Services"; + sourceTree = ""; + }; + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */ = { + isa = PBXGroup; + children = ( + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */, + ); + name = "Build Scripts"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* PlusSample */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "PlusSample" */; + buildPhases = ( + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + 4F38F8970B66FAB700B24B81 /* Copy GTL Framework */, + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */, + ); + buildRules = ( + ); + dependencies = ( + 4F72439F12233FAF001A4AD0 /* PBXTargetDependency */, + ); + name = PlusSample; + productInstallPath = "$(HOME)/Applications"; + productName = CalendarSample; + productReference = 8D1107320486CEB800E47090 /* PlusSample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "PlusSample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CalendarSample */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 4F2445B7121F0CF600FEE1DA /* Products */; + ProjectRef = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* PlusSample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 4F2445BE121F0CF600FEE1DA /* GTL.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = GTL.framework; + remoteRef = 4F2445BD121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C0121F0CF600FEE1DA /* libGTLTouchStaticLib.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libGTLTouchStaticLib.a; + remoteRef = 4F2445BF121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C2121F0CF600FEE1DA /* GTLUnitTests.octest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = GTLUnitTests.octest; + remoteRef = 4F2445C1121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C4121F0CF600FEE1DA /* DevelopmentTestTool */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = DevelopmentTestTool; + remoteRef = 4F2445C3121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */, + 4F346F4F1404714200D3CE42 /* PlusSampleWindow.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Strip Headers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ./buildStripHeaders; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072D0486CEB800E47090 /* main.m in Sources */, + 4F346EEF1404678B00D3CE42 /* PlusSampleAppController.m in Sources */, + 4F346EF01404678B00D3CE42 /* PlusSampleWindowController.m in Sources */, + 4F93D7DE143CE411000A2029 /* GTLPlusAcl.m in Sources */, + 4F93D7DF143CE411000A2029 /* GTLPlusAclentryResource.m in Sources */, + 4F93D7E0143CE411000A2029 /* GTLPlusActivity.m in Sources */, + 4F93D7E1143CE411000A2029 /* GTLPlusActivityFeed.m in Sources */, + 4F93D7E2143CE411000A2029 /* GTLPlusComment.m in Sources */, + 4F93D7E3143CE411000A2029 /* GTLPlusCommentFeed.m in Sources */, + 4F93D7E4143CE411000A2029 /* GTLPlusConstants.m in Sources */, + 4F93D7E5143CE411000A2029 /* GTLPlusPeopleFeed.m in Sources */, + 4F93D7E6143CE411000A2029 /* GTLPlusPerson.m in Sources */, + 4F93D7E7143CE411000A2029 /* GTLQueryPlus.m in Sources */, + 4F93D7E8143CE411000A2029 /* GTLServicePlus.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 4F72439F12233FAF001A4AD0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = GTLFramework; + targetProxy = 4F72439E12233FAF001A4AD0 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C165DFE840E0CC02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 4F346F4D1404714200D3CE42 /* PlusSampleWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 4F346F4E1404714200D3CE42 /* English */, + ); + name = PlusSampleWindow.xib; + sourceTree = ""; + }; + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 4FA6F3D21034AEC400C5DFA5 /* English */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = PlusSample; + RUN_CLANG_STATIC_ANALYZER = YES; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = PlusSample; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = ( + "-DGTL_BUILT_AS_FRAMEWORK=1", + "-DDEBUG=1", + ); + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DGTL_BUILT_AS_FRAMEWORK=1"; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "PlusSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "PlusSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/GTL/Examples/PlusSample/PlusSample.xcodeproj/project.pbxproj b/GTL/Examples/PlusSample/PlusSample.xcodeproj/project.pbxproj new file mode 100644 index 0000000..04a98d0 --- /dev/null +++ b/GTL/Examples/PlusSample/PlusSample.xcodeproj/project.pbxproj @@ -0,0 +1,550 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F22A2141186315400FFBAB6 /* WebKit.framework */; }; + 4F2445C8121F0D2900FEE1DA /* GTL.framework in Copy GTL Framework */ = {isa = PBXBuildFile; fileRef = 4F2445BE121F0CF600FEE1DA /* GTL.framework */; }; + 4F2445C9121F0D2C00FEE1DA /* GTL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F2445BE121F0CF600FEE1DA /* GTL.framework */; }; + 4F346EEF1404678B00D3CE42 /* PlusSampleAppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F346EEC1404678B00D3CE42 /* PlusSampleAppController.m */; }; + 4F346EF01404678B00D3CE42 /* PlusSampleWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F346EEE1404678B00D3CE42 /* PlusSampleWindowController.m */; }; + 4F346F4F1404714200D3CE42 /* PlusSampleWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F346F4D1404714200D3CE42 /* PlusSampleWindow.xib */; }; + 4F93D7DE143CE411000A2029 /* GTLPlusAcl.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F93D7C9143CE411000A2029 /* GTLPlusAcl.m */; }; + 4F93D7DF143CE411000A2029 /* GTLPlusAclentryResource.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F93D7CB143CE411000A2029 /* GTLPlusAclentryResource.m */; }; + 4F93D7E0143CE411000A2029 /* GTLPlusActivity.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F93D7CD143CE411000A2029 /* GTLPlusActivity.m */; }; + 4F93D7E1143CE411000A2029 /* GTLPlusActivityFeed.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F93D7CF143CE411000A2029 /* GTLPlusActivityFeed.m */; }; + 4F93D7E2143CE411000A2029 /* GTLPlusComment.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F93D7D1143CE411000A2029 /* GTLPlusComment.m */; }; + 4F93D7E3143CE411000A2029 /* GTLPlusCommentFeed.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F93D7D3143CE411000A2029 /* GTLPlusCommentFeed.m */; }; + 4F93D7E4143CE411000A2029 /* GTLPlusConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F93D7D5143CE411000A2029 /* GTLPlusConstants.m */; }; + 4F93D7E5143CE411000A2029 /* GTLPlusPeopleFeed.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F93D7D7143CE411000A2029 /* GTLPlusPeopleFeed.m */; }; + 4F93D7E6143CE411000A2029 /* GTLPlusPerson.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F93D7D9143CE411000A2029 /* GTLPlusPerson.m */; }; + 4F93D7E7143CE411000A2029 /* GTLQueryPlus.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F93D7DB143CE411000A2029 /* GTLQueryPlus.m */; }; + 4F93D7E8143CE411000A2029 /* GTLServicePlus.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F93D7DD143CE411000A2029 /* GTLServicePlus.m */; }; + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */; }; + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4F2445BD121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F38F6A60B66E91D00B24B81; + remoteInfo = GTLFramework; + }; + 4F2445BF121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027C11A4CA2F00BEB470; + remoteInfo = GTLTouchStaticLib; + }; + 4F2445C1121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027D11A4CA2F00BEB470; + remoteInfo = GTLUnitTests; + }; + 4F2445C3121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F1AD9020B71603F00DC0485; + remoteInfo = DevelopmentTestTool; + }; + 4F72439E12233FAF001A4AD0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 4F38F6A50B66E91D00B24B81; + remoteInfo = GTLFramework; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 4F38F8970B66FAB700B24B81 /* Copy GTL Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4F2445C8121F0D2900FEE1DA /* GTL.framework in Copy GTL Framework */, + ); + name = "Copy GTL Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 4F22A2141186315400FFBAB6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; + 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GTL.xcodeproj; path = ../../Source/GTL.xcodeproj; sourceTree = SOURCE_ROOT; }; + 4F346EEB1404678B00D3CE42 /* PlusSampleAppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlusSampleAppController.h; sourceTree = ""; }; + 4F346EEC1404678B00D3CE42 /* PlusSampleAppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PlusSampleAppController.m; sourceTree = ""; }; + 4F346EED1404678B00D3CE42 /* PlusSampleWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlusSampleWindowController.h; sourceTree = ""; }; + 4F346EEE1404678B00D3CE42 /* PlusSampleWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PlusSampleWindowController.m; sourceTree = ""; }; + 4F346F4E1404714200D3CE42 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/PlusSampleWindow.xib; sourceTree = ""; }; + 4F93D7C7143CE411000A2029 /* GTLPlus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLPlus.h; sourceTree = ""; }; + 4F93D7C8143CE411000A2029 /* GTLPlusAcl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLPlusAcl.h; sourceTree = ""; }; + 4F93D7C9143CE411000A2029 /* GTLPlusAcl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLPlusAcl.m; sourceTree = ""; }; + 4F93D7CA143CE411000A2029 /* GTLPlusAclentryResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLPlusAclentryResource.h; sourceTree = ""; }; + 4F93D7CB143CE411000A2029 /* GTLPlusAclentryResource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLPlusAclentryResource.m; sourceTree = ""; }; + 4F93D7CC143CE411000A2029 /* GTLPlusActivity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLPlusActivity.h; sourceTree = ""; }; + 4F93D7CD143CE411000A2029 /* GTLPlusActivity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLPlusActivity.m; sourceTree = ""; }; + 4F93D7CE143CE411000A2029 /* GTLPlusActivityFeed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLPlusActivityFeed.h; sourceTree = ""; }; + 4F93D7CF143CE411000A2029 /* GTLPlusActivityFeed.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLPlusActivityFeed.m; sourceTree = ""; }; + 4F93D7D0143CE411000A2029 /* GTLPlusComment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLPlusComment.h; sourceTree = ""; }; + 4F93D7D1143CE411000A2029 /* GTLPlusComment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLPlusComment.m; sourceTree = ""; }; + 4F93D7D2143CE411000A2029 /* GTLPlusCommentFeed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLPlusCommentFeed.h; sourceTree = ""; }; + 4F93D7D3143CE411000A2029 /* GTLPlusCommentFeed.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLPlusCommentFeed.m; sourceTree = ""; }; + 4F93D7D4143CE411000A2029 /* GTLPlusConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLPlusConstants.h; sourceTree = ""; }; + 4F93D7D5143CE411000A2029 /* GTLPlusConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLPlusConstants.m; sourceTree = ""; }; + 4F93D7D6143CE411000A2029 /* GTLPlusPeopleFeed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLPlusPeopleFeed.h; sourceTree = ""; }; + 4F93D7D7143CE411000A2029 /* GTLPlusPeopleFeed.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLPlusPeopleFeed.m; sourceTree = ""; }; + 4F93D7D8143CE411000A2029 /* GTLPlusPerson.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLPlusPerson.h; sourceTree = ""; }; + 4F93D7D9143CE411000A2029 /* GTLPlusPerson.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLPlusPerson.m; sourceTree = ""; }; + 4F93D7DA143CE411000A2029 /* GTLQueryPlus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLQueryPlus.h; sourceTree = ""; }; + 4F93D7DB143CE411000A2029 /* GTLQueryPlus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLQueryPlus.m; sourceTree = ""; }; + 4F93D7DC143CE411000A2029 /* GTLServicePlus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLServicePlus.h; sourceTree = ""; }; + 4F93D7DD143CE411000A2029 /* GTLServicePlus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLServicePlus.m; sourceTree = ""; }; + 4FA6F3D21034AEC400C5DFA5 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = buildStripHeaders; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 8D1107320486CEB800E47090 /* PlusSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PlusSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F2445C9121F0D2C00FEE1DA /* GTL.framework in Frameworks */, + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 4F346EEB1404678B00D3CE42 /* PlusSampleAppController.h */, + 4F346EEC1404678B00D3CE42 /* PlusSampleAppController.m */, + 4F346EED1404678B00D3CE42 /* PlusSampleWindowController.h */, + 4F346EEE1404678B00D3CE42 /* PlusSampleWindowController.m */, + ); + name = Classes; + sourceTree = ""; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 4F22A2141186315400FFBAB6 /* WebKit.framework */, + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* PlusSample.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CalendarSample */ = { + isa = PBXGroup; + children = ( + 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */, + 080E96DDFE201D6D7F000001 /* Classes */, + 4FB2548E138C443100B5C1AE /* API Services */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CalendarSample; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 4F346F4D1404714200D3CE42 /* PlusSampleWindow.xib */, + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */, + 8D1107310486CEB800E47090 /* Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4F2445B7121F0CF600FEE1DA /* Products */ = { + isa = PBXGroup; + children = ( + 4F2445BE121F0CF600FEE1DA /* GTL.framework */, + 4F2445C0121F0CF600FEE1DA /* libGTLTouchStaticLib.a */, + 4F2445C2121F0CF600FEE1DA /* GTLUnitTests.octest */, + 4F2445C4121F0CF600FEE1DA /* DevelopmentTestTool */, + ); + name = Products; + sourceTree = ""; + }; + 4F76A1B0141A9D28005C07AA /* Plus */ = { + isa = PBXGroup; + children = ( + 4F93D7C6143CE411000A2029 /* Generated */, + ); + name = Plus; + path = ../../Source/Services/Plus; + sourceTree = SOURCE_ROOT; + }; + 4F93D7C6143CE411000A2029 /* Generated */ = { + isa = PBXGroup; + children = ( + 4F93D7C7143CE411000A2029 /* GTLPlus.h */, + 4F93D7C8143CE411000A2029 /* GTLPlusAcl.h */, + 4F93D7C9143CE411000A2029 /* GTLPlusAcl.m */, + 4F93D7CA143CE411000A2029 /* GTLPlusAclentryResource.h */, + 4F93D7CB143CE411000A2029 /* GTLPlusAclentryResource.m */, + 4F93D7CC143CE411000A2029 /* GTLPlusActivity.h */, + 4F93D7CD143CE411000A2029 /* GTLPlusActivity.m */, + 4F93D7CE143CE411000A2029 /* GTLPlusActivityFeed.h */, + 4F93D7CF143CE411000A2029 /* GTLPlusActivityFeed.m */, + 4F93D7D0143CE411000A2029 /* GTLPlusComment.h */, + 4F93D7D1143CE411000A2029 /* GTLPlusComment.m */, + 4F93D7D2143CE411000A2029 /* GTLPlusCommentFeed.h */, + 4F93D7D3143CE411000A2029 /* GTLPlusCommentFeed.m */, + 4F93D7D4143CE411000A2029 /* GTLPlusConstants.h */, + 4F93D7D5143CE411000A2029 /* GTLPlusConstants.m */, + 4F93D7D6143CE411000A2029 /* GTLPlusPeopleFeed.h */, + 4F93D7D7143CE411000A2029 /* GTLPlusPeopleFeed.m */, + 4F93D7D8143CE411000A2029 /* GTLPlusPerson.h */, + 4F93D7D9143CE411000A2029 /* GTLPlusPerson.m */, + 4F93D7DA143CE411000A2029 /* GTLQueryPlus.h */, + 4F93D7DB143CE411000A2029 /* GTLQueryPlus.m */, + 4F93D7DC143CE411000A2029 /* GTLServicePlus.h */, + 4F93D7DD143CE411000A2029 /* GTLServicePlus.m */, + ); + path = Generated; + sourceTree = ""; + }; + 4FB2548E138C443100B5C1AE /* API Services */ = { + isa = PBXGroup; + children = ( + 4F76A1B0141A9D28005C07AA /* Plus */, + ); + name = "API Services"; + sourceTree = ""; + }; + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */ = { + isa = PBXGroup; + children = ( + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */, + ); + name = "Build Scripts"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* PlusSample */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "PlusSample" */; + buildPhases = ( + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + 4F38F8970B66FAB700B24B81 /* Copy GTL Framework */, + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */, + ); + buildRules = ( + ); + dependencies = ( + 4F72439F12233FAF001A4AD0 /* PBXTargetDependency */, + ); + name = PlusSample; + productInstallPath = "$(HOME)/Applications"; + productName = CalendarSample; + productReference = 8D1107320486CEB800E47090 /* PlusSample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "PlusSample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CalendarSample */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 4F2445B7121F0CF600FEE1DA /* Products */; + ProjectRef = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* PlusSample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 4F2445BE121F0CF600FEE1DA /* GTL.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = GTL.framework; + remoteRef = 4F2445BD121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C0121F0CF600FEE1DA /* libGTLTouchStaticLib.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libGTLTouchStaticLib.a; + remoteRef = 4F2445BF121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C2121F0CF600FEE1DA /* GTLUnitTests.octest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = GTLUnitTests.octest; + remoteRef = 4F2445C1121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C4121F0CF600FEE1DA /* DevelopmentTestTool */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = DevelopmentTestTool; + remoteRef = 4F2445C3121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */, + 4F346F4F1404714200D3CE42 /* PlusSampleWindow.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Strip Headers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ./buildStripHeaders; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072D0486CEB800E47090 /* main.m in Sources */, + 4F346EEF1404678B00D3CE42 /* PlusSampleAppController.m in Sources */, + 4F346EF01404678B00D3CE42 /* PlusSampleWindowController.m in Sources */, + 4F93D7DE143CE411000A2029 /* GTLPlusAcl.m in Sources */, + 4F93D7DF143CE411000A2029 /* GTLPlusAclentryResource.m in Sources */, + 4F93D7E0143CE411000A2029 /* GTLPlusActivity.m in Sources */, + 4F93D7E1143CE411000A2029 /* GTLPlusActivityFeed.m in Sources */, + 4F93D7E2143CE411000A2029 /* GTLPlusComment.m in Sources */, + 4F93D7E3143CE411000A2029 /* GTLPlusCommentFeed.m in Sources */, + 4F93D7E4143CE411000A2029 /* GTLPlusConstants.m in Sources */, + 4F93D7E5143CE411000A2029 /* GTLPlusPeopleFeed.m in Sources */, + 4F93D7E6143CE411000A2029 /* GTLPlusPerson.m in Sources */, + 4F93D7E7143CE411000A2029 /* GTLQueryPlus.m in Sources */, + 4F93D7E8143CE411000A2029 /* GTLServicePlus.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 4F72439F12233FAF001A4AD0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = GTLFramework; + targetProxy = 4F72439E12233FAF001A4AD0 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C165DFE840E0CC02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 4F346F4D1404714200D3CE42 /* PlusSampleWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 4F346F4E1404714200D3CE42 /* English */, + ); + name = PlusSampleWindow.xib; + sourceTree = ""; + }; + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 4FA6F3D21034AEC400C5DFA5 /* English */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = PlusSample; + RUN_CLANG_STATIC_ANALYZER = YES; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = PlusSample; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = ( + "-DGTL_BUILT_AS_FRAMEWORK=1", + "-DDEBUG=1", + ); + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DGTL_BUILT_AS_FRAMEWORK=1"; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "PlusSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "PlusSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/GTL/Examples/PlusSample/PlusSampleAppController.h b/GTL/Examples/PlusSample/PlusSampleAppController.h new file mode 100644 index 0000000..3572d27 --- /dev/null +++ b/GTL/Examples/PlusSample/PlusSampleAppController.h @@ -0,0 +1,23 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// PlusSampleAppController.h +// + +#import + +@interface PlusSampleAppController : NSObject +@end diff --git a/GTL/Examples/PlusSample/PlusSampleAppController.m b/GTL/Examples/PlusSample/PlusSampleAppController.m new file mode 100644 index 0000000..7f29d5a --- /dev/null +++ b/GTL/Examples/PlusSample/PlusSampleAppController.m @@ -0,0 +1,35 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// PlusSampleAppController.m +// + +#import "PlusSampleAppController.h" +#import "PlusSampleWindowController.h" + +@implementation PlusSampleAppController + +- (void)applicationWillFinishLaunching:(NSNotification *)notification { + PlusSampleWindowController* windowController + = [PlusSampleWindowController sharedWindowController]; + [windowController showWindow:self]; +} + +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { + return YES; +} + +@end diff --git a/GTL/Examples/PlusSample/PlusSampleWindowController.h b/GTL/Examples/PlusSample/PlusSampleWindowController.h new file mode 100644 index 0000000..b226cd3 --- /dev/null +++ b/GTL/Examples/PlusSample/PlusSampleWindowController.h @@ -0,0 +1,68 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// PlusSampleWindowController.h +// + +#import + +#import "GTLPlus.h" +#import "GTL/GTMOAuth2WindowController.h" + +@interface PlusSampleWindowController : NSWindowController { + @private + IBOutlet NSTextField *signedInField_; + IBOutlet NSButton *signedInButton_; + + IBOutlet NSButton *profileFetchCancelButton_; + + IBOutlet NSTableView *profileTable_; + IBOutlet NSProgressIndicator *profileProgressIndicator_; + IBOutlet NSTextView *profileResultTextView_; + IBOutlet NSImageView *profileImageView_; + + IBOutlet NSTableView *activityFeedTable_; + IBOutlet NSTextView *activityFeedResultTextView_; + IBOutlet NSImageView *activityFeedImageView_; + + IBOutlet NSButton *clientIDButton_; + IBOutlet NSTextField *clientIDRequiredTextField_; + IBOutlet NSWindow *clientIDSheet_; + IBOutlet NSTextField *clientIDField_; + IBOutlet NSTextField *clientSecretField_; + + GTLPlusPerson *userProfile_; + GTLPlusActivityFeed *activityFeed_; + GTLServiceTicket *profileTicket_; + NSError *profileFetchError_; + NSError *activityFeedFetchError_; +} + ++ (PlusSampleWindowController *)sharedWindowController; + +- (IBAction)signInClicked:(id)sender; + +- (IBAction)getFeedClicked:(id)sender; +- (IBAction)cancelProfileFetch:(id)sender; + +- (IBAction)APIConsoleClicked:(id)sender; +- (IBAction)loggingCheckboxClicked:(id)sender; + +// Client ID sheet +- (IBAction)clientIDClicked:(id)sender; +- (IBAction)clientIDDoneClicked:(id)sender; + +@end diff --git a/GTL/Examples/PlusSample/PlusSampleWindowController.m b/GTL/Examples/PlusSample/PlusSampleWindowController.m new file mode 100644 index 0000000..ffc4518 --- /dev/null +++ b/GTL/Examples/PlusSample/PlusSampleWindowController.m @@ -0,0 +1,497 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// PlusSampleWindowController.m +// + +#import "PlusSampleWindowController.h" + +#import "GTL/GTLUtilities.h" +#import "GTL/GTMHTTPFetcherLogging.h" + +@interface PlusSampleWindowController () + +@property (nonatomic, readonly) GTLServicePlus *plusService; + +@property (nonatomic, retain) GTLPlusPerson *userProfile; +@property (nonatomic, retain) GTLPlusActivityFeed *activityFeed; +@property (nonatomic, retain) GTLServiceTicket *profileTicket; +@property (nonatomic, retain) NSError *profileFetchError; +@property (nonatomic, retain) NSError *activityFeedFetchError; + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel; + +- (void)updateUI; +- (void)displayAlert:(NSString *)title format:(NSString *)format, ...; + +- (void)fetchUserProfile; + +- (id)selectedActivityFeedItem; +@end + + +NSString *const kKeychainItemName = @"Plus Sample: Google Plus"; + +@implementation PlusSampleWindowController + +@synthesize userProfile = userProfile_, + activityFeed = activityFeed_, + profileTicket = profileTicket_, + profileFetchError = profileFetchError_, + activityFeedFetchError = activityFeedFetchError_; + ++ (PlusSampleWindowController *)sharedWindowController { + static PlusSampleWindowController* gWindowController = nil; + if (!gWindowController) { + gWindowController = [[PlusSampleWindowController alloc] init]; + } + return gWindowController; +} + + +- (id)init { + return [self initWithWindowNibName:@"PlusSampleWindow"]; +} + +- (void)awakeFromNib { + // Load the OAuth token from the keychain, if it was previously saved + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + GTMOAuth2Authentication *auth; + auth = [GTMOAuth2WindowController authForGoogleFromKeychainForName:kKeychainItemName + clientID:clientID + clientSecret:clientSecret]; + self.plusService.authorizer = auth; + + // Set the result text fields to have a distinctive color and mono-spaced font + [profileResultTextView_ setTextColor:[NSColor darkGrayColor]]; + [activityFeedResultTextView_ setTextColor:[NSColor darkGrayColor]]; + + NSFont *resultTextFont = [NSFont fontWithName:@"Monaco" size:9]; + [profileResultTextView_ setFont:resultTextFont]; + [activityFeedResultTextView_ setFont:resultTextFont]; + + [self updateUI]; +} + +- (void)dealloc { + [userProfile_ release]; + [activityFeed_ release]; + [profileTicket_ release]; + [profileFetchError_ release]; + [activityFeedFetchError_ release]; + + [super dealloc]; +} + +#pragma mark - + +- (NSString *)signedInUsername { + GTMOAuth2Authentication *auth = self.plusService.authorizer; + BOOL isSignedIn = auth.canAuthorize; + if (isSignedIn) { + return auth.userEmail; + } else { + return nil; + } +} + +- (BOOL)isSignedIn { + NSString *name = [self signedInUsername]; + return (name != nil); +} + +#pragma mark IBActions + +- (IBAction)signInClicked:(id)sender { + if (![self isSignedIn]) { + // Sign in + [self runSigninThenInvokeSelector:@selector(updateUI)]; + } else { + // Sign out + GTLServicePlus *service = self.plusService; + + [GTMOAuth2WindowController removeAuthFromKeychainForName:kKeychainItemName]; + service.authorizer = nil; + [self updateUI]; + } +} + +- (IBAction)getFeedClicked:(id)sender { + if (![self isSignedIn]) { + [self runSigninThenInvokeSelector:@selector(fetchUserProfile)]; + } else { + [self fetchUserProfile]; + } +} + +- (IBAction)cancelProfileFetch:(id)sender { + [self.profileTicket cancelTicket]; + self.profileTicket = nil; + + [self updateUI]; +} + +- (IBAction)APIConsoleClicked:(id)sender { + NSURL *url = [NSURL URLWithString:@"https://code.google.com/apis/console"]; + [[NSWorkspace sharedWorkspace] openURL:url]; +} + +- (IBAction)loggingCheckboxClicked:(id)sender { + [GTMHTTPFetcher setLoggingEnabled:[sender state]]; +} + +#pragma mark - + +// Get a service object +// +// A "service" object handles networking tasks. Service objects +// contain user authentication information as well as networking +// state information (such as cookies and the "last modified" date for +// fetched data.) + +- (GTLServicePlus *)plusService { + + static GTLServicePlus* service = nil; + + if (!service) { + service = [[GTLServicePlus alloc] init]; + + // Have the service object set tickets to retry temporary error conditions + // automatically + service.retryEnabled = YES; + + // Have the service object set tickets to automatically fetch additional + // pages of feeds when the feed's maxResult value is less than the number + // of items in the feed + service.shouldFetchNextPages = YES; + } + return service; +} + +- (GTLPlusPerson *)selectedActivityFeedItem { + int rowIndex = [activityFeedTable_ selectedRow]; + if (rowIndex > -1) { + GTLPlusPerson *item = [activityFeed_ itemAtIndex:rowIndex]; + return item; + } + return nil; +} + +#pragma mark Fetch feed of the user's activities, circles, or albums + +- (void)fetchUserProfile { + self.userProfile = nil; + self.activityFeed = nil; + self.profileFetchError = nil; + self.activityFeedFetchError = nil; + + // Make a batch for fetching both the user's profile and the activity feed + GTLQueryPlus *profileQuery = [GTLQueryPlus queryForPeopleGetWithUserId:@"me"]; + profileQuery.completionBlock = ^(GTLServiceTicket *ticket, id object, NSError *error) { + if (error == nil) { + self.userProfile = object; + } else { + self.profileFetchError = error; + } + }; + + GTLQueryPlus *activitiesQuery = [GTLQueryPlus queryForActivitiesListWithUserId:@"me" + collection:kGTLPlusCollectionPublic]; + // Set an appropriate page size when requesting the activity items + activitiesQuery.maxResults = 100; + activitiesQuery.completionBlock = ^(GTLServiceTicket *ticket, id object, NSError *error) { + if (error == nil) { + self.activityFeed = object; + } else { + self.activityFeedFetchError = error; + } + }; + + GTLBatchQuery *batchQuery = [GTLBatchQuery batchQuery]; + [batchQuery addQuery:profileQuery]; + [batchQuery addQuery:activitiesQuery]; + + GTLServicePlus *service = self.plusService; + self.profileTicket = [service executeQuery:batchQuery + completionHandler:^(GTLServiceTicket *ticket, + id result, NSError *error) { + // Callback + // + // For batch queries with successful execution, + // the result is a GTLBatchResult object + // + // At this point, the query completion blocks + // have already been called + self.profileTicket = nil; + + [self updateUI]; + }]; + [self updateUI]; +} + +#pragma mark Sign In + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel { + // Applications should have client ID and client secret strings + // hardcoded into the source, but the sample application asks the + // developer for the strings + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + if ([clientID length] == 0 || [clientSecret length] == 0) { + // Remind the developer that client ID and client secret are needed + [clientIDButton_ performSelector:@selector(performClick:) + withObject:self + afterDelay:0.5]; + return; + } + + // Show the OAuth 2 sign-in controller + NSBundle *frameworkBundle = [NSBundle bundleForClass:[GTMOAuth2WindowController class]]; + GTMOAuth2WindowController *windowController; + windowController = [GTMOAuth2WindowController controllerWithScope:kGTLAuthScopePlusMe + clientID:clientID + clientSecret:clientSecret + keychainItemName:kKeychainItemName + resourceBundle:frameworkBundle]; + + [windowController signInSheetModalForWindow:[self window] + completionHandler:^(GTMOAuth2Authentication *auth, + NSError *error) { + // callback + if (error == nil) { + self.plusService.authorizer = auth; + if (signInDoneSel) { + [self performSelector:signInDoneSel]; + } + } else { + self.profileFetchError = error; + [self updateUI]; + } + }]; +} + +#pragma mark UI + +- (void)fetchURLString:(NSString *)urlString + forImageView:(NSImageView *)imageView { + // Common code to fetch an image for an NSImageView + [imageView setImage:nil]; + + if (urlString) { + // We can reuse the fetcher service from the API service object to make + // the image fetchers, though the image fetches should be unauthorized + GTMHTTPFetcherService *fetcherService = self.plusService.fetcherService; + GTMHTTPFetcher *fetcher = [fetcherService fetcherWithURLString:urlString]; + fetcher.authorizer = nil; + [fetcher setCommentWithFormat:@"image fetch"]; + + [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { + // Callback + if (error == nil) { + NSImage *image = [[[NSImage alloc] initWithData:data] autorelease]; + [imageView setImage:image]; + } else { + NSLog(@"Error %@ loading image %@", error, urlString); + } + }]; + } +} + +- (void)updateProfileImage { + static NSString* gPriorImageURLStr = nil; + + NSString *newImageURLStr = userProfile_.image.url; + + if (!GTL_AreEqualOrBothNil(newImageURLStr, gPriorImageURLStr)) { + // The image has changed + [gPriorImageURLStr release]; + gPriorImageURLStr = [newImageURLStr copy]; + + [self fetchURLString:newImageURLStr forImageView:profileImageView_]; + } +} + +- (void)updateActivityFeedImage { + static NSString* gPriorImageURLStr = nil; + + NSString *newImageURLStr = nil; + + GTLPlusActivity *activity = [self selectedActivityFeedItem]; + NSArray *attachments = activity.object.attachments; + if ([attachments count] > 0) { + GTLPlusActivityObjectAttachmentsItem *attachment = [attachments objectAtIndex:0]; + newImageURLStr = attachment.image.url; + } + if (!GTL_AreEqualOrBothNil(newImageURLStr, gPriorImageURLStr)) { + // The image has changed + [gPriorImageURLStr release]; + gPriorImageURLStr = [newImageURLStr copy]; + + [self fetchURLString:newImageURLStr forImageView:activityFeedImageView_]; + } +} + +- (void)updateUI { + BOOL isSignedIn = [self isSignedIn]; + NSString *username = [self signedInUsername]; + [signedInButton_ setTitle:(isSignedIn ? @"Sign Out" : @"Sign In")]; + [signedInField_ setStringValue:(isSignedIn ? username : @"No")]; + + // + // Main table: display just the user profile + // + // We don't really need a table for this, since there is only one + // user profile to display, but one day we may be glad there's a table + // here. + // + [profileTable_ reloadData]; + + if (profileTicket_ != nil) { + [profileProgressIndicator_ startAnimation:self]; + } else { + [profileProgressIndicator_ stopAnimation:self]; + } + + // Display the user profile, or a fetch error + NSString *resultStr = @""; + if (profileFetchError_) { + // Display the error + resultStr = [profileFetchError_ description]; + } else { + // Display the profile + if (userProfile_) { + resultStr = [userProfile_ description]; + } + } + [profileResultTextView_ setString:resultStr]; + + [self updateProfileImage]; + + // + // Lower table: display the activity feed + // + [activityFeedTable_ reloadData]; + + // Get the description of the selected item, or the feed fetch error + resultStr = @""; + + GTLPlusPerson *person = [self selectedActivityFeedItem]; + if (activityFeedFetchError_) { + resultStr = [activityFeedFetchError_ description]; + } else { + if (person) { + resultStr = [person description]; + } + } + + [activityFeedResultTextView_ setString:resultStr]; + + [self updateActivityFeedImage]; + + // Enable buttons + [profileFetchCancelButton_ setEnabled:(profileTicket_ != nil)]; + + // Show or hide the text indicating that the client ID or client secret are + // needed + BOOL hasClientIDStrings = [[clientIDField_ stringValue] length] > 0 + && [[clientSecretField_ stringValue] length] > 0; + [clientIDRequiredTextField_ setHidden:hasClientIDStrings]; +} + +- (void)displayAlert:(NSString *)title format:(NSString *)format, ... { + NSString *result = format; + if (format) { + va_list argList; + va_start(argList, format); + result = [[[NSString alloc] initWithFormat:format + arguments:argList] autorelease]; + va_end(argList); + } + NSBeginAlertSheet(title, nil, nil, nil, [self window], nil, nil, + nil, nil, @"%@", result); +} + +#pragma mark Client ID Sheet + +// Client ID and Client Secret Sheet +// +// Sample apps need this sheet to ask for the client ID and client secret +// strings +// +// Your application will just hardcode the client ID and client secret strings +// into the source rather than ask the user for them. +// +// The string values are obtained from the API Console, +// https://code.google.com/apis/console + +- (IBAction)clientIDClicked:(id)sender { + // Show the sheet for developers to enter their client ID and client secret + [NSApp beginSheet:clientIDSheet_ + modalForWindow:[self window] + modalDelegate:self + didEndSelector:@selector(clientIDSheetDidEnd:returnCode:contextInfo:) + contextInfo:NULL]; +} + +- (IBAction)clientIDDoneClicked:(id)sender { + [NSApp endSheet:clientIDSheet_ returnCode:NSOKButton]; +} + +- (void)clientIDSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { + [sheet orderOut:self]; + [self updateUI]; +} + +#pragma mark Text field delegate methods + +- (void)controlTextDidChange:(NSNotification *)note { + [self updateUI]; // enable and disable buttons +} + +#pragma mark TableView delegate and data source methods + +- (void)tableViewSelectionDidChange:(NSNotification *)notification { + [self updateUI]; +} + +- (int)numberOfRowsInTableView:(NSTableView *)tableView { + if (tableView == profileTable_) { + return (self.userProfile != nil ? 1 : 0); + } else { + return [self.activityFeed.items count]; + } +} + +- (id)tableView:(NSTableView *)tableView +objectValueForTableColumn:(NSTableColumn *)tableColumn + row:(int)row { + if (tableView == profileTable_) { + if (row == 0) { + return self.userProfile.displayName; + } else { + return nil; + } + } else { + // Activities + GTLPlusActivity *item = [self.activityFeed itemAtIndex:row]; + return item.object.content; + } +} + +@end diff --git a/GTL/Examples/PlusSample/README.txt b/GTL/Examples/PlusSample/README.txt new file mode 100644 index 0000000..ff257a0 --- /dev/null +++ b/GTL/Examples/PlusSample/README.txt @@ -0,0 +1 @@ +This sample should automatically build and copy over the GTL.framework as part of the build-and-run process. diff --git a/GTL/Examples/PlusSample/buildStripHeaders b/GTL/Examples/PlusSample/buildStripHeaders new file mode 100755 index 0000000..0238ef2 --- /dev/null +++ b/GTL/Examples/PlusSample/buildStripHeaders @@ -0,0 +1,17 @@ +#!/bin/sh +# +# buildStripHeaders +# +# Remove header files from the built copy of the framework inside our +# application. + +# Strip "*.h" files +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname '*.h' -delete + +# Strip "Headers" links +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type l -delete + +# Strip "Headers" directories +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type d -prune -delete + + diff --git a/GTL/Examples/PlusSample/main.m b/GTL/Examples/PlusSample/main.m new file mode 100644 index 0000000..3e35dea --- /dev/null +++ b/GTL/Examples/PlusSample/main.m @@ -0,0 +1,25 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// main.m +// + +#import + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **) argv); +} diff --git a/GTL/Examples/ShoppingSample/.svn/all-wcprops b/GTL/Examples/ShoppingSample/.svn/all-wcprops new file mode 100644 index 0000000..5bc08bb --- /dev/null +++ b/GTL/Examples/ShoppingSample/.svn/all-wcprops @@ -0,0 +1,53 @@ +K 25 +svn:wc:ra_dav:version-url +V 47 +/svn/!svn/ver/154/trunk/Examples/ShoppingSample +END +main.m +K 25 +svn:wc:ra_dav:version-url +V 53 +/svn/!svn/ver/23/trunk/Examples/ShoppingSample/main.m +END +ShoppingSampleWindowController.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/23/trunk/Examples/ShoppingSample/ShoppingSampleWindowController.m +END +ShoppingSampleAppController.h +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/23/trunk/Examples/ShoppingSample/ShoppingSampleAppController.h +END +Info.plist +K 25 +svn:wc:ra_dav:version-url +V 57 +/svn/!svn/ver/23/trunk/Examples/ShoppingSample/Info.plist +END +ShoppingSampleAppController.m +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/23/trunk/Examples/ShoppingSample/ShoppingSampleAppController.m +END +README.txt +K 25 +svn:wc:ra_dav:version-url +V 57 +/svn/!svn/ver/23/trunk/Examples/ShoppingSample/README.txt +END +ShoppingSampleWindowController.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/23/trunk/Examples/ShoppingSample/ShoppingSampleWindowController.h +END +buildStripHeaders +K 25 +svn:wc:ra_dav:version-url +V 64 +/svn/!svn/ver/23/trunk/Examples/ShoppingSample/buildStripHeaders +END diff --git a/GTL/Examples/ShoppingSample/.svn/entries b/GTL/Examples/ShoppingSample/.svn/entries new file mode 100644 index 0000000..891e22f --- /dev/null +++ b/GTL/Examples/ShoppingSample/.svn/entries @@ -0,0 +1,306 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/ShoppingSample +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +main.m +file + + + + +2012-12-09T08:42:34.000000Z +246a89353f2c5021dce7384b100ff0fe +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +736 + +ShoppingSampleWindowController.m +file + + + + +2012-12-09T08:42:34.000000Z +32eb2d9151d38923b3be26a97b1e26a8 +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +10550 + +ShoppingSampleAppController.h +file + + + + +2012-12-09T08:42:34.000000Z +9aebb8de8113a4d411bc74b5d892f79b +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +718 + +ShoppingSample.xcodeproj +dir + +Info.plist +file + + + + +2012-12-09T08:42:34.000000Z +78974c4ba4e0d5561666362cd06b0327 +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +839 + +ShoppingSampleAppController.m +file + + + + +2012-12-09T08:42:34.000000Z +4260532c7ea58a5a06f4d3f541bcb0dd +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1098 + +README.txt +file + + + + +2012-12-09T08:42:34.000000Z +0a3374a462b2cff6dcd19d0caf28958a +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +109 + +ShoppingSampleWindowController.h +file + + + + +2012-12-09T08:42:34.000000Z +74f3f7e005a91eb9e07883ef3d56a2d2 +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2729 + +buildStripHeaders +file + + + + +2012-12-09T08:42:34.000000Z +38b5302dc0e4a662c40b288306a2f6ac +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +454 + +English.lproj +dir + diff --git a/GTL/Examples/ShoppingSample/.svn/prop-base/buildStripHeaders.svn-base b/GTL/Examples/ShoppingSample/.svn/prop-base/buildStripHeaders.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/GTL/Examples/ShoppingSample/.svn/prop-base/buildStripHeaders.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/GTL/Examples/ShoppingSample/.svn/text-base/Info.plist.svn-base b/GTL/Examples/ShoppingSample/.svn/text-base/Info.plist.svn-base new file mode 100644 index 0000000..bb4de48 --- /dev/null +++ b/GTL/Examples/ShoppingSample/.svn/text-base/Info.plist.svn-base @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.example.ShoppingSample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/GTL/Examples/ShoppingSample/.svn/text-base/README.txt.svn-base b/GTL/Examples/ShoppingSample/.svn/text-base/README.txt.svn-base new file mode 100644 index 0000000..ff257a0 --- /dev/null +++ b/GTL/Examples/ShoppingSample/.svn/text-base/README.txt.svn-base @@ -0,0 +1 @@ +This sample should automatically build and copy over the GTL.framework as part of the build-and-run process. diff --git a/GTL/Examples/ShoppingSample/.svn/text-base/ShoppingSampleAppController.h.svn-base b/GTL/Examples/ShoppingSample/.svn/text-base/ShoppingSampleAppController.h.svn-base new file mode 100644 index 0000000..de611bf --- /dev/null +++ b/GTL/Examples/ShoppingSample/.svn/text-base/ShoppingSampleAppController.h.svn-base @@ -0,0 +1,23 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// ShoppingSampleAppController.h +// + +#import + +@interface ShoppingSampleAppController : NSObject +@end diff --git a/GTL/Examples/ShoppingSample/.svn/text-base/ShoppingSampleAppController.m.svn-base b/GTL/Examples/ShoppingSample/.svn/text-base/ShoppingSampleAppController.m.svn-base new file mode 100644 index 0000000..ec19021 --- /dev/null +++ b/GTL/Examples/ShoppingSample/.svn/text-base/ShoppingSampleAppController.m.svn-base @@ -0,0 +1,35 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// ShoppingSampleAppController.m +// + +#import "ShoppingSampleAppController.h" +#import "ShoppingSampleWindowController.h" + +@implementation ShoppingSampleAppController + +- (void)applicationWillFinishLaunching:(NSNotification *)notification { + ShoppingSampleWindowController* windowController + = [ShoppingSampleWindowController sharedWindowController]; + [windowController showWindow:self]; +} + +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { + return YES; +} + +@end diff --git a/GTL/Examples/ShoppingSample/.svn/text-base/ShoppingSampleWindowController.h.svn-base b/GTL/Examples/ShoppingSample/.svn/text-base/ShoppingSampleWindowController.h.svn-base new file mode 100644 index 0000000..c42937f --- /dev/null +++ b/GTL/Examples/ShoppingSample/.svn/text-base/ShoppingSampleWindowController.h.svn-base @@ -0,0 +1,83 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// ShoppingSampleWindowController.h +// + +#import + +#import "GTLShopping.h" + +@interface ShoppingSampleWindowController : NSWindowController { + @private + // IBOutlets - main window + NSButton *searchButton_; + NSTextField *searchField_; + + NSPopUpButton *rankingPopup_; + + NSTableView *productsTable_; + NSImageView *productsImageView_; + NSProgressIndicator *productsProgressIndicator_; + NSTextView *productsResultTextField_; + NSButton *productsCancelButton_; + + // IBOutlets - client ID sheet + NSButton *accessKeyButton_; + NSTextField *accessKeyRequiredTextField_; + NSWindow *accessKeySheet_; + NSTextField *accessKeyField_; + + // property storage + GTLShoppingProducts *products_; + GTLServiceTicket *productsTicket_; + NSError *productsFetchError_; + + NSString *currentImageURLString_; + GTMHTTPFetcher *pendingImageFetcher_; +} + +// Main UI +@property (retain, nonatomic) IBOutlet NSButton *searchButton; +@property (retain, nonatomic) IBOutlet NSTextField *searchField; +@property (retain, nonatomic) IBOutlet NSPopUpButton *rankingPopup; + +@property (retain, nonatomic) IBOutlet NSTableView *productsTable; +@property (retain, nonatomic) IBOutlet NSImageView *productsImageView; +@property (retain, nonatomic) IBOutlet NSProgressIndicator *productsProgressIndicator; +@property (retain, nonatomic) IBOutlet NSTextView *productsResultTextField; +@property (retain, nonatomic) IBOutlet NSButton *productsCancelButton; + +// Client ID sheet +@property (retain, nonatomic) IBOutlet NSButton *accessKeyButton; +@property (retain, nonatomic) IBOutlet NSTextField *accessKeyRequiredTextField; +@property (retain, nonatomic) IBOutlet NSWindow *accessKeySheet; +@property (retain, nonatomic) IBOutlet NSTextField *accessKeyField; + ++ (ShoppingSampleWindowController *)sharedWindowController; + +// Main UI +- (IBAction)searchProductsClicked:(id)sender; +- (IBAction)rankByClicked:(id)sender; +- (IBAction)cancelProductsFetchClicked:(id)sender; + +// Access Key +- (IBAction)APIKeyClicked:(id)sender; +- (IBAction)APIKeyDoneClicked:(id)sender; +- (IBAction)APIConsoleClicked:(id)sender; + +- (IBAction)loggingCheckboxClicked:(id)sender; +@end diff --git a/GTL/Examples/ShoppingSample/.svn/text-base/ShoppingSampleWindowController.m.svn-base b/GTL/Examples/ShoppingSample/.svn/text-base/ShoppingSampleWindowController.m.svn-base new file mode 100644 index 0000000..0bc17f1 --- /dev/null +++ b/GTL/Examples/ShoppingSample/.svn/text-base/ShoppingSampleWindowController.m.svn-base @@ -0,0 +1,341 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// ShoppingSampleWindowController.m +// + +#import "ShoppingSampleWindowController.h" + +#import "GTL/GTMOAuth2WindowController.h" +#import "GTL/GTMHTTPFetcherLogging.h" +#import "GTL/GTLUtilities.h" + +@interface ShoppingSampleWindowController () + +// Product table properties +@property (retain, nonatomic) GTLShoppingProducts *products; +@property (retain, nonatomic) GTLServiceTicket *productsTicket; +@property (retain, nonatomic) NSError *productsFetchError; + +@property (retain, nonatomic) NSString *currentImageURLString; +@property (retain, nonatomic) GTMHTTPFetcher *pendingImageFetcher; + +// Other properties +@property (retain, nonatomic, readonly) GTLServiceShopping *shoppingService; + +- (void)updateUI; +- (void)updateSelectedProductImage; +- (GTLShoppingProduct *)selectedProduct; +- (void)searchProducts; +@end + + +@implementation ShoppingSampleWindowController + +@synthesize searchButton = searchButton_, + searchField = searchField_, + rankingPopup = rankingPopup_, + productsTable = productsTable_, + productsImageView = productsImageView_, + productsProgressIndicator = productsProgressIndicator_, + productsResultTextField = productsResultTextField_, + productsCancelButton = productsCancelButton_, + accessKeyButton = accessKeyButton_, + accessKeyRequiredTextField = accessKeyRequiredTextField_, + accessKeySheet = accessKeySheet_, + accessKeyField = accessKeyField_; + +@synthesize products = products_, + productsTicket = productsTicket_, + productsFetchError = productsFetchError_, + currentImageURLString = currentImageURLString_, + pendingImageFetcher = pendingImageFetcher_; + ++ (ShoppingSampleWindowController *)sharedWindowController { + static ShoppingSampleWindowController* gWindowController = nil; + if (!gWindowController) { + gWindowController = [[ShoppingSampleWindowController alloc] init]; + } + return gWindowController; +} + + +- (id)init { + return [self initWithWindowNibName:@"ShoppingSampleWindow"]; +} + +- (void)awakeFromNib { + // Set the result text fields to have a distinctive color and mono-spaced font + [self.productsResultTextField setTextColor:[NSColor darkGrayColor]]; + + NSFont *resultTextFont = [NSFont fontWithName:@"Monaco" size:9]; + [self.productsResultTextField setFont:resultTextFont]; + + NSString *accessKey = [self.accessKeyField stringValue]; + self.shoppingService.APIKey = accessKey; + + [self updateUI]; +} + +- (void)dealloc { + // IBOutlets + self.searchButton = nil; + self.searchField = nil; + self.rankingPopup = nil; + self.productsTable = nil; + self.productsImageView = nil; + self.productsProgressIndicator = nil; + self.productsResultTextField = nil; + self.productsCancelButton = nil; + self.accessKeyButton = nil; + self.accessKeyRequiredTextField = nil; + self.accessKeySheet = nil; + self.accessKeyField = nil; + + self.products = nil; + self.productsTicket = nil; + self.productsFetchError = nil; + self.currentImageURLString = nil; + + [self.pendingImageFetcher stopFetching]; + self.pendingImageFetcher = nil; + + [super dealloc]; +} + +#pragma mark - + +- (void)updateUI { + // Products table + [self.productsTable reloadData]; + + if (self.productsTicket != nil) { + [self.productsProgressIndicator startAnimation:self]; + [self.productsCancelButton setEnabled:YES]; + } else { + [self.productsProgressIndicator stopAnimation:self]; + [self.productsCancelButton setEnabled:NO]; + } + + // Display the selected product item, or the fetch error + GTLShoppingProduct *selectedItem = [self selectedProduct]; + NSString *resultStr = @""; + NSError *fetchError = self.productsFetchError; + if (fetchError != nil) { + resultStr = [fetchError description]; + } else { + if (selectedItem) { + resultStr = [selectedItem description]; + } + } + [self.productsResultTextField setString:resultStr]; + + [self updateSelectedProductImage]; + + // Enable buttons + BOOL hasSearchTerm = ([[self.searchField stringValue] length] > 0); + [self.searchButton setEnabled:hasSearchTerm]; + [self.rankingPopup setEnabled:hasSearchTerm]; + + // Show or hide the text indicating that the developer key is needed + BOOL hasAccessKey = [[self.accessKeyField stringValue] length] > 0; + [self.accessKeyRequiredTextField setHidden:hasAccessKey]; +} + +- (void)updateSelectedProductImage { + // Find the thumbnail URL for the selected product + GTLShoppingProduct *selectedItem = [self selectedProduct]; + NSArray *images = selectedItem.product.images; + if ([images count] > 0) { + GTLShoppingModelProductImagesItem *imageItem = [images objectAtIndex:0]; + NSArray *thumbnails = imageItem.thumbnails; + if ([thumbnails count] > 0) { + GTLShoppingModelProductImagesItemThumbnailsItem *thumbnail = [thumbnails objectAtIndex:0]; + NSString *thumbnailLink = thumbnail.link; + + // Compare the URL to the one for the image currently displayed + if (!GTL_AreEqualOrBothNil(self.currentImageURLString, thumbnailLink)) { + // The URLs are different; remove the old image and fetch the new image + self.productsImageView.image = nil; + self.currentImageURLString = thumbnailLink; + + [self.pendingImageFetcher stopFetching]; + + GTMHTTPFetcherService *fetcherService = self.shoppingService.fetcherService; + GTMHTTPFetcher *fetcher = [fetcherService fetcherWithURLString:thumbnailLink]; + self.pendingImageFetcher = fetcher; + + [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { + // Fetcher callback + if (error == nil) { + // Display the fetched image + NSImage *image = [[[NSImage alloc] initWithData:data] autorelease]; + self.productsImageView.image = image; + } else { + NSLog(@"error %@ fetching product image %@", + error, fetcher.mutableRequest); + } + self.pendingImageFetcher = nil; + }]; + } + } + } +} + + +#pragma mark IBActions + +- (IBAction)searchProductsClicked:(id)sender { + [self searchProducts]; +} + +- (IBAction)rankByClicked:(id)sender { + [self searchProducts]; +} + +- (IBAction)cancelProductsFetchClicked:(id)sender { + [self.productsTicket cancelTicket]; + self.productsTicket = nil; + + [self updateUI]; +} + +- (IBAction)APIConsoleClicked:(id)sender { + NSURL *url = [NSURL URLWithString:@"https://code.google.com/apis/console"]; + [[NSWorkspace sharedWorkspace] openURL:url]; +} + +- (IBAction)loggingCheckboxClicked:(id)sender { + [GTMHTTPFetcher setLoggingEnabled:[sender state]]; +} + +#pragma mark - + +// Get a service object with the current authorization +// +// A "service" object handles networking tasks. Service objects +// contain user authentication information as well as networking +// state information (such as cookies and cached fetch results.) + +- (GTLServiceShopping *)shoppingService { + + static GTLServiceShopping* service = nil; + if (!service) { + service = [[GTLServiceShopping alloc] init]; + + // Have the service object set tickets to retry temporary error conditions + // automatically + service.retryEnabled = YES; + } + return service; +} + +- (GTLShoppingProduct *)selectedProduct { + int rowIndex = [self.productsTable selectedRow]; + if (rowIndex > -1) { + GTLShoppingProduct *item = [self.products itemAtIndex:rowIndex]; + return item; + } + return nil; +} + +#pragma mark Fetch the products list + +- (void)searchProducts { + self.products = nil; + self.productsFetchError = nil; + + NSString *queryTerm = [self.searchField stringValue]; + NSString *rankBy = [self.rankingPopup titleOfSelectedItem]; + + GTLQueryShopping *query = [GTLQueryShopping queryForProductsListWithSource:@"public"]; + query.q = queryTerm; + query.rankBy = rankBy; + query.thumbnails = @"64:*"; + query.country = @"US"; + self.productsTicket = [self.shoppingService executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) { + // Save the returned object and error + self.products = object; + self.productsFetchError = error; + self.productsTicket = nil; + + [self updateUI]; + }]; + [self updateUI]; +} + +#pragma mark Access key sheet + +// Developer API key sheet +// +// Sample apps need this sheet to ask for the developer API key +// +// Your application will just hardcode the API key string +// into the source rather than ask the user for them. +// +// The key is obtained from the API Console, +// https://code.google.com/apis/console +// + +- (IBAction)APIKeyClicked:(id)sender { + // show the sheet for developers to enter client ID and client secret + [NSApp beginSheet:self.accessKeySheet + modalForWindow:[self window] + modalDelegate:self + didEndSelector:@selector(accessKeySheetDidEnd:returnCode:contextInfo:) + contextInfo:NULL]; +} + +- (IBAction)APIKeyDoneClicked:(id)sender { + [NSApp endSheet:self.accessKeySheet returnCode:NSOKButton]; + + self.shoppingService.APIKey = [self.accessKeyField stringValue]; +} + +- (void)accessKeySheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { + [sheet orderOut:self]; + + [self updateUI]; +} + +#pragma mark Text field delegate methods + +- (void)controlTextDidChange:(NSNotification *)note { + [self updateUI]; // enabled/disable buttons +} + +#pragma mark TableView delegate and data source methods + +- (void)tableViewSelectionDidChange:(NSNotification *)notification { + [self updateUI]; +} + +// Table view data source methods +- (int)numberOfRowsInTableView:(NSTableView *)tableView { + NSArray *items = self.products.items; + return [items count]; +} + +- (id)tableView:(NSTableView *)tableView +objectValueForTableColumn:(NSTableColumn *)tableColumn + row:(int)row { + GTLShoppingProduct *item = [self.products itemAtIndex:row]; + NSString *resultStr = item.product.title; + return resultStr; +} + +@end diff --git a/GTL/Examples/ShoppingSample/.svn/text-base/buildStripHeaders.svn-base b/GTL/Examples/ShoppingSample/.svn/text-base/buildStripHeaders.svn-base new file mode 100644 index 0000000..0238ef2 --- /dev/null +++ b/GTL/Examples/ShoppingSample/.svn/text-base/buildStripHeaders.svn-base @@ -0,0 +1,17 @@ +#!/bin/sh +# +# buildStripHeaders +# +# Remove header files from the built copy of the framework inside our +# application. + +# Strip "*.h" files +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname '*.h' -delete + +# Strip "Headers" links +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type l -delete + +# Strip "Headers" directories +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type d -prune -delete + + diff --git a/GTL/Examples/ShoppingSample/.svn/text-base/main.m.svn-base b/GTL/Examples/ShoppingSample/.svn/text-base/main.m.svn-base new file mode 100644 index 0000000..3e35dea --- /dev/null +++ b/GTL/Examples/ShoppingSample/.svn/text-base/main.m.svn-base @@ -0,0 +1,25 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// main.m +// + +#import + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **) argv); +} diff --git a/GTL/Examples/ShoppingSample/English.lproj/.svn/all-wcprops b/GTL/Examples/ShoppingSample/English.lproj/.svn/all-wcprops new file mode 100644 index 0000000..7c2f191 --- /dev/null +++ b/GTL/Examples/ShoppingSample/English.lproj/.svn/all-wcprops @@ -0,0 +1,23 @@ +K 25 +svn:wc:ra_dav:version-url +V 61 +/svn/!svn/ver/154/trunk/Examples/ShoppingSample/English.lproj +END +InfoPlist.strings +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/23/trunk/Examples/ShoppingSample/English.lproj/InfoPlist.strings +END +ShoppingSampleWindow.xib +K 25 +svn:wc:ra_dav:version-url +V 86 +/svn/!svn/ver/154/trunk/Examples/ShoppingSample/English.lproj/ShoppingSampleWindow.xib +END +MainMenu.xib +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/!svn/ver/28/trunk/Examples/ShoppingSample/English.lproj/MainMenu.xib +END diff --git a/GTL/Examples/ShoppingSample/English.lproj/.svn/entries b/GTL/Examples/ShoppingSample/English.lproj/.svn/entries new file mode 100644 index 0000000..51e7efa --- /dev/null +++ b/GTL/Examples/ShoppingSample/English.lproj/.svn/entries @@ -0,0 +1,130 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/ShoppingSample/English.lproj +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +InfoPlist.strings +file + + + + +2012-12-09T08:42:34.000000Z +bc745a35febf3350074747882fc8b7e0 +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +95 + +ShoppingSampleWindow.xib +file + + + + +2012-12-09T08:42:34.000000Z +d2ffd7d4f226f29ae41ab01b8c6d4d07 +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +82967 + +MainMenu.xib +file + + + + +2012-12-09T08:42:34.000000Z +68c1a6978fe396ce27d182fa3cdd14ee +2011-08-23T19:12:40.725509Z +28 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +103634 + diff --git a/GTL/Examples/ShoppingSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base b/GTL/Examples/ShoppingSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base new file mode 100644 index 0000000..77831dd --- /dev/null +++ b/GTL/Examples/ShoppingSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "© Google Inc. 2011"; diff --git a/GTL/Examples/ShoppingSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base b/GTL/Examples/ShoppingSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base new file mode 100644 index 0000000..5ee17a2 --- /dev/null +++ b/GTL/Examples/ShoppingSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base @@ -0,0 +1,2409 @@ + + + + 1050 + 10F569 + 823 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 823 + + + YES + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + + NSApplication + + + + FirstResponder + + + NSApplication + + + MainMenu + + YES + + + SampleApp + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + SampleApp + + YES + + + About the Sample + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + + Services + + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + + File + + + YES + + + New + n + 1048576 + 2147483647 + + + + + + Open... + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + + Open Recent + + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + Save As… + S + 1048576 + 2147483647 + + + + + + Revert + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup… + P + 1048576 + 2147483647 + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + + Edit + + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + + Find + + + YES + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1048576 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling + + 1048576 + 2147483647 + + + submenuAction: + + Spelling + + YES + + + Spelling… + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling as You Type + + 1048576 + 2147483647 + + + + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + + Window + + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + Help + + YES + + + Help + ? + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + ShoppingSampleAppController + + + + + YES + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + showHelp: + + + + 122 + + + + clearRecentDocuments: + + + + 127 + + + + terminate: + + + + 139 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + hideOtherApplications: + + + + 146 + + + + hide: + + + + 152 + + + + unhideAllApplications: + + + + 153 + + + + cut: + + + + 175 + + + + paste: + + + + 176 + + + + redo: + + + + 178 + + + + selectAll: + + + + 179 + + + + undo: + + + + 180 + + + + copy: + + + + 181 + + + + showGuessPanel: + + + + 188 + + + + checkSpelling: + + + + 190 + + + + toggleContinuousSpellChecking: + + + + 192 + + + + performClose: + + + + 193 + + + + delete: + + + + 195 + + + + performZoom: + + + + 198 + + + + performFindPanelAction: + + + + 199 + + + + performFindPanelAction: + + + + 200 + + + + performFindPanelAction: + + + + 201 + + + + performFindPanelAction: + + + + 202 + + + + centerSelectionInVisibleArea: + + + + 203 + + + + pasteAsPlainText: + + + + 205 + + + + delegate + + + + 223 + + + + delegate + + + + 225 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + MainMenu + + + 19 + + + YES + + + + + + 24 + + + YES + + + + + + + + + 5 + + + + + 23 + + + + + 92 + + + + + 197 + + + + + 56 + + + YES + + + + + + 57 + + + YES + + + + + + + + + + + + + + + + 58 + + + + + 129 + + + + + 131 + + + YES + + + + + + 130 + + + + + 134 + + + + + 136 + + + + + 143 + + + + + 144 + + + + + 145 + + + + + 149 + + + + + 150 + + + + + 196 + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + + + + + + + + 72 + + + + + 73 + + + + + 74 + + + + + 75 + + + + + 77 + + + + + 78 + + + + + 79 + + + + + 80 + + + + + 82 + + + + + 112 + + + + + 124 + + + YES + + + + + + 125 + + + YES + + + + + + 126 + + + + + 103 + + + YES + + + + + + 106 + + + YES + + + + + + 111 + + + + + 163 + + + YES + + + + + + 169 + + + YES + + + + + + + + + + + + + + + + + 156 + + + + + 157 + + + + + 158 + + + + + 160 + + + + + 164 + + + + + 168 + + + YES + + + + + + 159 + + + YES + + + + + + + + + + 154 + + + + + 155 + + + + + 161 + + + + + 162 + + + + + 167 + + + + + 171 + + + + + 172 + + + + + 173 + + + + + 174 + + + + + 184 + + + YES + + + + + + 185 + + + YES + + + + + + + + 187 + + + + + 189 + + + + + 191 + + + + + 204 + + + + + 222 + + + SampleAppController + + + + + YES + + YES + -3.IBPluginDependency + -3.ImportedFromIB2 + 103.IBPluginDependency + 103.ImportedFromIB2 + 106.IBPluginDependency + 106.ImportedFromIB2 + 111.IBPluginDependency + 111.ImportedFromIB2 + 112.IBPluginDependency + 112.ImportedFromIB2 + 124.IBPluginDependency + 124.ImportedFromIB2 + 125.IBPluginDependency + 125.ImportedFromIB2 + 126.IBPluginDependency + 126.ImportedFromIB2 + 129.IBPluginDependency + 129.ImportedFromIB2 + 130.IBPluginDependency + 130.ImportedFromIB2 + 131.IBPluginDependency + 131.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 136.IBPluginDependency + 136.ImportedFromIB2 + 143.IBPluginDependency + 143.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 145.IBPluginDependency + 145.ImportedFromIB2 + 149.IBPluginDependency + 149.ImportedFromIB2 + 150.IBPluginDependency + 150.ImportedFromIB2 + 154.IBPluginDependency + 154.ImportedFromIB2 + 155.IBPluginDependency + 155.ImportedFromIB2 + 156.IBPluginDependency + 156.ImportedFromIB2 + 157.IBPluginDependency + 157.ImportedFromIB2 + 158.IBPluginDependency + 158.ImportedFromIB2 + 159.IBPluginDependency + 159.ImportedFromIB2 + 160.IBPluginDependency + 160.ImportedFromIB2 + 161.IBPluginDependency + 161.ImportedFromIB2 + 162.IBPluginDependency + 162.ImportedFromIB2 + 163.IBPluginDependency + 163.ImportedFromIB2 + 164.IBPluginDependency + 164.ImportedFromIB2 + 167.IBPluginDependency + 167.ImportedFromIB2 + 168.IBPluginDependency + 168.ImportedFromIB2 + 169.IBPluginDependency + 169.ImportedFromIB2 + 171.IBPluginDependency + 171.ImportedFromIB2 + 172.IBPluginDependency + 172.ImportedFromIB2 + 173.IBPluginDependency + 173.ImportedFromIB2 + 174.IBPluginDependency + 174.ImportedFromIB2 + 184.IBPluginDependency + 184.ImportedFromIB2 + 185.IBPluginDependency + 185.ImportedFromIB2 + 187.IBPluginDependency + 187.ImportedFromIB2 + 189.IBPluginDependency + 189.ImportedFromIB2 + 19.IBPluginDependency + 19.ImportedFromIB2 + 191.IBPluginDependency + 191.ImportedFromIB2 + 196.IBPluginDependency + 196.ImportedFromIB2 + 197.IBPluginDependency + 197.ImportedFromIB2 + 204.IBPluginDependency + 204.ImportedFromIB2 + 222.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 24.IBPluginDependency + 24.ImportedFromIB2 + 29.IBPluginDependency + 29.ImportedFromIB2 + 5.IBPluginDependency + 5.ImportedFromIB2 + 56.IBPluginDependency + 56.ImportedFromIB2 + 57.IBPluginDependency + 57.ImportedFromIB2 + 58.IBPluginDependency + 58.ImportedFromIB2 + 72.IBPluginDependency + 72.ImportedFromIB2 + 73.IBPluginDependency + 73.ImportedFromIB2 + 74.IBPluginDependency + 74.ImportedFromIB2 + 75.IBPluginDependency + 75.ImportedFromIB2 + 77.IBPluginDependency + 77.ImportedFromIB2 + 78.IBPluginDependency + 78.ImportedFromIB2 + 79.IBPluginDependency + 79.ImportedFromIB2 + 80.IBPluginDependency + 80.ImportedFromIB2 + 81.IBPluginDependency + 81.ImportedFromIB2 + 82.IBPluginDependency + 82.ImportedFromIB2 + 83.IBPluginDependency + 83.ImportedFromIB2 + 92.IBPluginDependency + 92.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + + YES + + + + + YES + + + YES + + + + 227 + + + + YES + + FirstResponder + NSObject + + IBUserSource + + + + + ShoppingSampleAppController + NSObject + + IBUserSource + + + + + + YES + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSBrowser + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSBrowser.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSDocument + NSObject + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + id + id + id + id + id + id + + + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + + printDocument: + id + + + revertDocumentToSaved: + id + + + runPageLayout: + id + + + saveDocument: + id + + + saveDocumentAs: + id + + + saveDocumentTo: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocument.h + + + + NSDocument + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentScripting.h + + + + NSDocumentController + NSObject + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + id + id + id + id + + + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + + clearRecentDocuments: + id + + + newDocument: + id + + + openDocument: + id + + + saveAllDocuments: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentController.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSMatrix + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSMatrix.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSMenuItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSMovieView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSMovieView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebEditingDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebFrameLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebJavaPlugIn.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPlugin.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPluginContainer.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPolicyDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebResourceLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebScriptObject.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebUIDelegate.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSTableView + NSControl + + + + NSText + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSText.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + + WebView + NSView + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + + goBack: + id + + + goForward: + id + + + makeTextLarger: + id + + + makeTextSmaller: + id + + + makeTextStandardSize: + id + + + reload: + id + + + reloadFromOrigin: + id + + + stopLoading: + id + + + takeStringURLFrom: + id + + + toggleContinuousSpellChecking: + id + + + toggleSmartInsertDelete: + id + + + + + IBFrameworkSource + WebKit.framework/Headers/WebView.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../LatitudeSample.xcodeproj + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {9, 8} + {7, 2} + + + + diff --git a/GTL/Examples/ShoppingSample/English.lproj/.svn/text-base/ShoppingSampleWindow.xib.svn-base b/GTL/Examples/ShoppingSample/English.lproj/.svn/text-base/ShoppingSampleWindow.xib.svn-base new file mode 100644 index 0000000..9e6125b --- /dev/null +++ b/GTL/Examples/ShoppingSample/English.lproj/.svn/text-base/ShoppingSampleWindow.xib.svn-base @@ -0,0 +1,1889 @@ + + + + 1070 + 11D50b + 2182 + 1138.32 + 568.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2182 + + + YES + NSTextView + NSMenu + NSButton + NSCustomObject + NSSplitView + NSImageView + NSTableView + NSImageCell + NSTextField + NSWindowTemplate + NSTextFieldCell + NSButtonCell + NSTableColumn + NSView + NSPopUpButtonCell + NSScrollView + NSUserDefaultsController + NSProgressIndicator + NSPopUpButton + NSMenuItem + NSScroller + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + ShoppingSampleWindowController + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{64, 494}, {567, 339}} + 1886912512 + Sample App + + NSWindow + + + View + + + {567, 339} + + + 256 + + YES + + + 265 + {{398, 263}, {134, 32}} + + YES + + 67239424 + 134217728 + Find Products + + LucidaGrande + 13 + 1044 + + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + + 264 + {{20, 271}, {54, 17}} + + YES + + 67239424 + 272629760 + Query: + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 1289 + + {{469, 236}, {16, 16}} + + 28938 + 100 + + + + 265 + {{492, 235}, {54, 16}} + + YES + + 67239424 + 134479872 + Cancel + + LucidaGrande + 9 + 3614 + + + -2038284033 + 1 + + LucidaGrande + 9 + 16 + + + + + + 200 + 25 + + + + + 289 + {{421, 11}, {128, 18}} + + YES + + 67239424 + 131072 + Log http to desktop + + LucidaGrande + 11 + 3100 + + + 1211912703 + 2 + + NSSwitch + + + + 200 + 25 + + + + + 268 + {{18, 295}, {76, 28}} + + YES + + -2080244224 + 134348800 + API Key... + + + -2038284033 + 129 + + + 200 + 25 + + + + + 264 + {{94, 303}, {178, 14}} + + YES + + 67239424 + 272760832 + API Key Required + + + + + + + + + 268 + {{73, 268}, {303, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 6 + System + textColor + + + + + + + 268 + {{67, 232}, {100, 22}} + + YES + + -2076049856 + 133120 + + + 109199615 + 129 + + + 400 + 75 + + + price + + 1048576 + 2147483647 + 1 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + _popUpItemAction: + + + YES + + OtherViews + + YES + + + relevancy + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + modificationTime + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + + + 2 + 1 + YES + YES + 2 + + + + + 264 + {{17, 237}, {47, 14}} + + YES + + 67239424 + 272760832 + Rank by + + + + + + + + + 274 + + YES + + + 258 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 256 + {426, 102} + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 423 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + + + + 337772096 + 2048 + + + + 6 + System + controlBackgroundColor + + + + + 3 + YES + + + + 3 + 2 + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + 37748736 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {426, 102}} + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 95}} + + + _doScroller: + 0.5 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + 1 + + _doScroller: + 0.99047620000000003 + + + {428, 104} + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 289 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{437, 0}, {95, 104}} + + YES + + 130560 + 33554432 + 0 + 0 + 2 + NO + + YES + + + {532, 104} + + YES + + + + 290 + + YES + + + 2304 + + YES + + + 2322 + {530, 14} + + + + + + results + + + YES + + YES + NSColor + NSFont + + + YES + + 1 + MC40NTEwODY5NCAwLjEwNDE0NTEyIDAuMDgyODYwMjE2AA + + + Geneva + 10 + 16 + + + + + + + YES + + + 6 + + + + 530 + 1 + + + 67119969 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + 1 + MCAwIDEAA + + + + + + + 1 + + 6 + {1052, 10000000} + {463, 0} + + + + {{1, 1}, {530, 76}} + + + + + + {4, 5} + + 79691776 + + YES + + YES + + + + + file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff + + + + + + 3 + MCAwAA + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{0, 113}, {532, 78}} + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + {{20, 35}, {532, 191}} + + + + {567, 339} + + + {{0, 0}, {1440, 878}} + {567, 361} + {10000000000000, 10000000000000} + YES + + + YES + + + 3 + 2 + {{235, 277}, {458, 282}} + 611844096 + Client ID Sheet + NSWindow + + + + + 256 + + YES + + + 266 + {{77, 141}, {361, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 143}, {55, 17}} + + YES + + 68288064 + 272630784 + API Key: + + + + + + + + + 268 + {{225, 78}, {82, 20}} + + YES + + 67239424 + 134348800 + API Console + + + -2038284033 + 134 + + + 200 + 25 + + + + + 268 + {{17, 80}, {203, 17}} + + YES + + 68288064 + 272630784 + API keys are obtained from the + + LucidaGrande + 13 + 16 + + + + + + + + + 268 + {{17, 202}, {424, 34}} + + YES + + 67239424 + 138412032 + Each application should have an API key hardcoded into the source. + + + + + + + + + 268 + {{348, 12}, {96, 32}} + + YES + + 67239424 + 134217728 + Done + + + -2038284033 + 129 + + DQ + 200 + 25 + + + + {458, 282} + + {{0, 0}, {1920, 1178}} + {10000000000000, 10000000000000} + YES + + + + + YES + + + loggingCheckboxClicked: + + + + 151 + + + + window + + + + 383 + + + + APIConsoleClicked: + + + + 468 + + + + productsTable + + + + 564 + + + + productsProgressIndicator + + + + 565 + + + + productsResultTextField + + + + 566 + + + + productsCancelButton + + + + 567 + + + + searchField + + + + 568 + + + + searchButton + + + + 569 + + + + rankingPopup + + + + 570 + + + + searchProductsClicked: + + + + 572 + + + + accessKeyField + + + + 575 + + + + accessKeySheet + + + + 576 + + + + accessKeyRequiredTextField + + + + 577 + + + + accessKeyButton + + + + 578 + + + + rankByClicked: + + + + 580 + + + + productsImageView + + + + 597 + + + + cancelProductsFetchClicked: + + + + 598 + + + + APIKeyClicked: + + + + 599 + + + + APIKeyDoneClicked: + + + + 600 + + + + delegate + + + + 15 + + + + dataSource + + + + 34 + + + + delegate + + + + 35 + + + + value: values.accessKey + + + + + + value: values.accessKey + value + values.accessKey + + NSContinuouslyUpdatesValue + + + 2 + + + 579 + + + + delegate + + + + 581 + + + + value: values.queryString + + + + + + value: values.queryString + value + values.queryString + 2 + + + 582 + + + + selectedIndex: values.rankBy + + + + + + selectedIndex: values.rankBy + selectedIndex + values.rankBy + 2 + + + 587 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 5 + + + YES + + + + Window + + + 6 + + + YES + + + + + + + + + + + + + + + + 17 + + + YES + + + + + + 40 + + + + + 86 + + + YES + + + + + + 150 + + + YES + + + + + + 44 + + + Shared Defaults + + + 251 + + + + + 253 + + + + + 254 + + + + + 38 + + + YES + + + + + + 252 + + + + + 438 + + + YES + + + + + + 439 + + + YES + + + + + + + + + + + 440 + + + YES + + + + + + 441 + + + YES + + + + + + 444 + + + YES + + + + + + 445 + + + YES + + + + + + 446 + + + YES + + + + + + 447 + + + YES + + + + + + 448 + + + + + 449 + + + + + 450 + + + + + 451 + + + + + 454 + + + + + 455 + + + + + 461 + + + YES + + + + + + 462 + + + + + 460 + + + YES + + + + + + 463 + + + + + 554 + + + YES + + + + + + 555 + + + + + 556 + + + YES + + + + + + 557 + + + YES + + + + + + 558 + + + YES + + + + + + + + 559 + + + + + 560 + + + + + 561 + + + + + 562 + + + YES + + + + + + 563 + + + + + 595 + + + YES + + + + + + + 594 + + + YES + + + + + + + 588 + + + YES + + + + + + 24 + + + YES + + + + + + + + 265 + + + + + 264 + + + + + 25 + + + YES + + + + + + 26 + + + YES + + + + + + 263 + + + + + 589 + + + + + 80 + + + YES + + + + + + + + 267 + + + + + 266 + + + + + 81 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 150.IBPluginDependency + 17.IBPluginDependency + 24.IBPluginDependency + 25.IBPluginDependency + 251.IBPluginDependency + 252.IBPluginDependency + 253.IBPluginDependency + 254.IBPluginDependency + 26.IBPluginDependency + 263.IBPluginDependency + 263.IBShouldRemoveOnLegacySave + 264.IBPluginDependency + 264.IBShouldRemoveOnLegacySave + 265.IBPluginDependency + 265.IBShouldRemoveOnLegacySave + 266.IBPluginDependency + 266.IBShouldRemoveOnLegacySave + 267.IBPluginDependency + 267.IBShouldRemoveOnLegacySave + 38.IBPluginDependency + 40.IBPluginDependency + 438.IBPluginDependency + 438.IBWindowTemplateEditedContentRect + 438.NSWindowTemplate.visibleAtLaunch + 439.IBPluginDependency + 44.IBPluginDependency + 440.IBPluginDependency + 441.IBPluginDependency + 444.IBPluginDependency + 445.IBPluginDependency + 446.IBPluginDependency + 447.IBPluginDependency + 448.IBPluginDependency + 449.IBPluginDependency + 450.IBPluginDependency + 451.IBPluginDependency + 454.IBPluginDependency + 455.IBPluginDependency + 460.IBPluginDependency + 461.IBPluginDependency + 462.IBPluginDependency + 463.IBPluginDependency + 5.IBPluginDependency + 5.IBWindowTemplateEditedContentRect + 554.IBPluginDependency + 555.IBPluginDependency + 556.IBPluginDependency + 557.IBPluginDependency + 558.IBPluginDependency + 559.IBPluginDependency + 560.IBPluginDependency + 561.IBPluginDependency + 562.IBPluginDependency + 563.IBPluginDependency + 588.IBPluginDependency + 589.IBPluginDependency + 594.IBPluginDependency + 595.IBPluginDependency + 6.IBPluginDependency + 6.IBUserGuides + 80.IBPluginDependency + 81.IBPluginDependency + 86.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{196, 842}, {458, 282}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{18, 816}, {567, 339}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + YES + + + 744 + 1 + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 600 + + + + YES + + ShoppingSampleWindowController + NSWindowController + + YES + + YES + APIConsoleClicked: + APIKeyClicked: + APIKeyDoneClicked: + cancelProductsFetchClicked: + loggingCheckboxClicked: + rankByClicked: + searchProductsClicked: + + + YES + id + id + id + id + id + id + id + + + + YES + + YES + APIConsoleClicked: + APIKeyClicked: + APIKeyDoneClicked: + cancelProductsFetchClicked: + loggingCheckboxClicked: + rankByClicked: + searchProductsClicked: + + + YES + + APIConsoleClicked: + id + + + APIKeyClicked: + id + + + APIKeyDoneClicked: + id + + + cancelProductsFetchClicked: + id + + + loggingCheckboxClicked: + id + + + rankByClicked: + id + + + searchProductsClicked: + id + + + + + YES + + YES + accessKeyButton + accessKeyField + accessKeyRequiredTextField + accessKeySheet + productsCancelButton + productsImageView + productsProgressIndicator + productsResultTextField + productsTable + rankingPopup + searchButton + searchField + + + YES + NSButton + NSTextField + NSTextField + NSWindow + NSButton + NSImageView + NSProgressIndicator + NSTextView + NSTableView + NSPopUpButton + NSButton + NSTextField + + + + YES + + YES + accessKeyButton + accessKeyField + accessKeyRequiredTextField + accessKeySheet + productsCancelButton + productsImageView + productsProgressIndicator + productsResultTextField + productsTable + rankingPopup + searchButton + searchField + + + YES + + accessKeyButton + NSButton + + + accessKeyField + NSTextField + + + accessKeyRequiredTextField + NSTextField + + + accessKeySheet + NSWindow + + + productsCancelButton + NSButton + + + productsImageView + NSImageView + + + productsProgressIndicator + NSProgressIndicator + + + productsResultTextField + NSTextView + + + productsTable + NSTableView + + + rankingPopup + NSPopUpButton + + + searchButton + NSButton + + + searchField + NSTextField + + + + + IBProjectSource + ./Classes/ShoppingSampleWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {11, 11} + {10, 3} + + + + diff --git a/GTL/Examples/ShoppingSample/English.lproj/InfoPlist.strings b/GTL/Examples/ShoppingSample/English.lproj/InfoPlist.strings new file mode 100644 index 0000000..77831dd --- /dev/null +++ b/GTL/Examples/ShoppingSample/English.lproj/InfoPlist.strings @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "© Google Inc. 2011"; diff --git a/GTL/Examples/ShoppingSample/English.lproj/MainMenu.xib b/GTL/Examples/ShoppingSample/English.lproj/MainMenu.xib new file mode 100644 index 0000000..5ee17a2 --- /dev/null +++ b/GTL/Examples/ShoppingSample/English.lproj/MainMenu.xib @@ -0,0 +1,2409 @@ + + + + 1050 + 10F569 + 823 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 823 + + + YES + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + + NSApplication + + + + FirstResponder + + + NSApplication + + + MainMenu + + YES + + + SampleApp + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + SampleApp + + YES + + + About the Sample + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + + Services + + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + + File + + + YES + + + New + n + 1048576 + 2147483647 + + + + + + Open... + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + + Open Recent + + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + Save As… + S + 1048576 + 2147483647 + + + + + + Revert + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup… + P + 1048576 + 2147483647 + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + + Edit + + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + + Find + + + YES + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1048576 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling + + 1048576 + 2147483647 + + + submenuAction: + + Spelling + + YES + + + Spelling… + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling as You Type + + 1048576 + 2147483647 + + + + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + + Window + + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + Help + + YES + + + Help + ? + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + ShoppingSampleAppController + + + + + YES + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + showHelp: + + + + 122 + + + + clearRecentDocuments: + + + + 127 + + + + terminate: + + + + 139 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + hideOtherApplications: + + + + 146 + + + + hide: + + + + 152 + + + + unhideAllApplications: + + + + 153 + + + + cut: + + + + 175 + + + + paste: + + + + 176 + + + + redo: + + + + 178 + + + + selectAll: + + + + 179 + + + + undo: + + + + 180 + + + + copy: + + + + 181 + + + + showGuessPanel: + + + + 188 + + + + checkSpelling: + + + + 190 + + + + toggleContinuousSpellChecking: + + + + 192 + + + + performClose: + + + + 193 + + + + delete: + + + + 195 + + + + performZoom: + + + + 198 + + + + performFindPanelAction: + + + + 199 + + + + performFindPanelAction: + + + + 200 + + + + performFindPanelAction: + + + + 201 + + + + performFindPanelAction: + + + + 202 + + + + centerSelectionInVisibleArea: + + + + 203 + + + + pasteAsPlainText: + + + + 205 + + + + delegate + + + + 223 + + + + delegate + + + + 225 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + MainMenu + + + 19 + + + YES + + + + + + 24 + + + YES + + + + + + + + + 5 + + + + + 23 + + + + + 92 + + + + + 197 + + + + + 56 + + + YES + + + + + + 57 + + + YES + + + + + + + + + + + + + + + + 58 + + + + + 129 + + + + + 131 + + + YES + + + + + + 130 + + + + + 134 + + + + + 136 + + + + + 143 + + + + + 144 + + + + + 145 + + + + + 149 + + + + + 150 + + + + + 196 + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + + + + + + + + 72 + + + + + 73 + + + + + 74 + + + + + 75 + + + + + 77 + + + + + 78 + + + + + 79 + + + + + 80 + + + + + 82 + + + + + 112 + + + + + 124 + + + YES + + + + + + 125 + + + YES + + + + + + 126 + + + + + 103 + + + YES + + + + + + 106 + + + YES + + + + + + 111 + + + + + 163 + + + YES + + + + + + 169 + + + YES + + + + + + + + + + + + + + + + + 156 + + + + + 157 + + + + + 158 + + + + + 160 + + + + + 164 + + + + + 168 + + + YES + + + + + + 159 + + + YES + + + + + + + + + + 154 + + + + + 155 + + + + + 161 + + + + + 162 + + + + + 167 + + + + + 171 + + + + + 172 + + + + + 173 + + + + + 174 + + + + + 184 + + + YES + + + + + + 185 + + + YES + + + + + + + + 187 + + + + + 189 + + + + + 191 + + + + + 204 + + + + + 222 + + + SampleAppController + + + + + YES + + YES + -3.IBPluginDependency + -3.ImportedFromIB2 + 103.IBPluginDependency + 103.ImportedFromIB2 + 106.IBPluginDependency + 106.ImportedFromIB2 + 111.IBPluginDependency + 111.ImportedFromIB2 + 112.IBPluginDependency + 112.ImportedFromIB2 + 124.IBPluginDependency + 124.ImportedFromIB2 + 125.IBPluginDependency + 125.ImportedFromIB2 + 126.IBPluginDependency + 126.ImportedFromIB2 + 129.IBPluginDependency + 129.ImportedFromIB2 + 130.IBPluginDependency + 130.ImportedFromIB2 + 131.IBPluginDependency + 131.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 136.IBPluginDependency + 136.ImportedFromIB2 + 143.IBPluginDependency + 143.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 145.IBPluginDependency + 145.ImportedFromIB2 + 149.IBPluginDependency + 149.ImportedFromIB2 + 150.IBPluginDependency + 150.ImportedFromIB2 + 154.IBPluginDependency + 154.ImportedFromIB2 + 155.IBPluginDependency + 155.ImportedFromIB2 + 156.IBPluginDependency + 156.ImportedFromIB2 + 157.IBPluginDependency + 157.ImportedFromIB2 + 158.IBPluginDependency + 158.ImportedFromIB2 + 159.IBPluginDependency + 159.ImportedFromIB2 + 160.IBPluginDependency + 160.ImportedFromIB2 + 161.IBPluginDependency + 161.ImportedFromIB2 + 162.IBPluginDependency + 162.ImportedFromIB2 + 163.IBPluginDependency + 163.ImportedFromIB2 + 164.IBPluginDependency + 164.ImportedFromIB2 + 167.IBPluginDependency + 167.ImportedFromIB2 + 168.IBPluginDependency + 168.ImportedFromIB2 + 169.IBPluginDependency + 169.ImportedFromIB2 + 171.IBPluginDependency + 171.ImportedFromIB2 + 172.IBPluginDependency + 172.ImportedFromIB2 + 173.IBPluginDependency + 173.ImportedFromIB2 + 174.IBPluginDependency + 174.ImportedFromIB2 + 184.IBPluginDependency + 184.ImportedFromIB2 + 185.IBPluginDependency + 185.ImportedFromIB2 + 187.IBPluginDependency + 187.ImportedFromIB2 + 189.IBPluginDependency + 189.ImportedFromIB2 + 19.IBPluginDependency + 19.ImportedFromIB2 + 191.IBPluginDependency + 191.ImportedFromIB2 + 196.IBPluginDependency + 196.ImportedFromIB2 + 197.IBPluginDependency + 197.ImportedFromIB2 + 204.IBPluginDependency + 204.ImportedFromIB2 + 222.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 24.IBPluginDependency + 24.ImportedFromIB2 + 29.IBPluginDependency + 29.ImportedFromIB2 + 5.IBPluginDependency + 5.ImportedFromIB2 + 56.IBPluginDependency + 56.ImportedFromIB2 + 57.IBPluginDependency + 57.ImportedFromIB2 + 58.IBPluginDependency + 58.ImportedFromIB2 + 72.IBPluginDependency + 72.ImportedFromIB2 + 73.IBPluginDependency + 73.ImportedFromIB2 + 74.IBPluginDependency + 74.ImportedFromIB2 + 75.IBPluginDependency + 75.ImportedFromIB2 + 77.IBPluginDependency + 77.ImportedFromIB2 + 78.IBPluginDependency + 78.ImportedFromIB2 + 79.IBPluginDependency + 79.ImportedFromIB2 + 80.IBPluginDependency + 80.ImportedFromIB2 + 81.IBPluginDependency + 81.ImportedFromIB2 + 82.IBPluginDependency + 82.ImportedFromIB2 + 83.IBPluginDependency + 83.ImportedFromIB2 + 92.IBPluginDependency + 92.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + + YES + + + + + YES + + + YES + + + + 227 + + + + YES + + FirstResponder + NSObject + + IBUserSource + + + + + ShoppingSampleAppController + NSObject + + IBUserSource + + + + + + YES + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSBrowser + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSBrowser.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSDocument + NSObject + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + id + id + id + id + id + id + + + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + + printDocument: + id + + + revertDocumentToSaved: + id + + + runPageLayout: + id + + + saveDocument: + id + + + saveDocumentAs: + id + + + saveDocumentTo: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocument.h + + + + NSDocument + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentScripting.h + + + + NSDocumentController + NSObject + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + id + id + id + id + + + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + + clearRecentDocuments: + id + + + newDocument: + id + + + openDocument: + id + + + saveAllDocuments: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentController.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSMatrix + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSMatrix.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSMenuItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSMovieView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSMovieView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebEditingDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebFrameLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebJavaPlugIn.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPlugin.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPluginContainer.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPolicyDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebResourceLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebScriptObject.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebUIDelegate.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSTableView + NSControl + + + + NSText + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSText.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + + WebView + NSView + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + + goBack: + id + + + goForward: + id + + + makeTextLarger: + id + + + makeTextSmaller: + id + + + makeTextStandardSize: + id + + + reload: + id + + + reloadFromOrigin: + id + + + stopLoading: + id + + + takeStringURLFrom: + id + + + toggleContinuousSpellChecking: + id + + + toggleSmartInsertDelete: + id + + + + + IBFrameworkSource + WebKit.framework/Headers/WebView.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../LatitudeSample.xcodeproj + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {9, 8} + {7, 2} + + + + diff --git a/GTL/Examples/ShoppingSample/English.lproj/ShoppingSampleWindow.xib b/GTL/Examples/ShoppingSample/English.lproj/ShoppingSampleWindow.xib new file mode 100644 index 0000000..9e6125b --- /dev/null +++ b/GTL/Examples/ShoppingSample/English.lproj/ShoppingSampleWindow.xib @@ -0,0 +1,1889 @@ + + + + 1070 + 11D50b + 2182 + 1138.32 + 568.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2182 + + + YES + NSTextView + NSMenu + NSButton + NSCustomObject + NSSplitView + NSImageView + NSTableView + NSImageCell + NSTextField + NSWindowTemplate + NSTextFieldCell + NSButtonCell + NSTableColumn + NSView + NSPopUpButtonCell + NSScrollView + NSUserDefaultsController + NSProgressIndicator + NSPopUpButton + NSMenuItem + NSScroller + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + ShoppingSampleWindowController + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{64, 494}, {567, 339}} + 1886912512 + Sample App + + NSWindow + + + View + + + {567, 339} + + + 256 + + YES + + + 265 + {{398, 263}, {134, 32}} + + YES + + 67239424 + 134217728 + Find Products + + LucidaGrande + 13 + 1044 + + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + + 264 + {{20, 271}, {54, 17}} + + YES + + 67239424 + 272629760 + Query: + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 1289 + + {{469, 236}, {16, 16}} + + 28938 + 100 + + + + 265 + {{492, 235}, {54, 16}} + + YES + + 67239424 + 134479872 + Cancel + + LucidaGrande + 9 + 3614 + + + -2038284033 + 1 + + LucidaGrande + 9 + 16 + + + + + + 200 + 25 + + + + + 289 + {{421, 11}, {128, 18}} + + YES + + 67239424 + 131072 + Log http to desktop + + LucidaGrande + 11 + 3100 + + + 1211912703 + 2 + + NSSwitch + + + + 200 + 25 + + + + + 268 + {{18, 295}, {76, 28}} + + YES + + -2080244224 + 134348800 + API Key... + + + -2038284033 + 129 + + + 200 + 25 + + + + + 264 + {{94, 303}, {178, 14}} + + YES + + 67239424 + 272760832 + API Key Required + + + + + + + + + 268 + {{73, 268}, {303, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 6 + System + textColor + + + + + + + 268 + {{67, 232}, {100, 22}} + + YES + + -2076049856 + 133120 + + + 109199615 + 129 + + + 400 + 75 + + + price + + 1048576 + 2147483647 + 1 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + _popUpItemAction: + + + YES + + OtherViews + + YES + + + relevancy + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + modificationTime + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + + + 2 + 1 + YES + YES + 2 + + + + + 264 + {{17, 237}, {47, 14}} + + YES + + 67239424 + 272760832 + Rank by + + + + + + + + + 274 + + YES + + + 258 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 256 + {426, 102} + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 423 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + + + + 337772096 + 2048 + + + + 6 + System + controlBackgroundColor + + + + + 3 + YES + + + + 3 + 2 + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + 37748736 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {426, 102}} + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 95}} + + + _doScroller: + 0.5 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + 1 + + _doScroller: + 0.99047620000000003 + + + {428, 104} + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 289 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{437, 0}, {95, 104}} + + YES + + 130560 + 33554432 + 0 + 0 + 2 + NO + + YES + + + {532, 104} + + YES + + + + 290 + + YES + + + 2304 + + YES + + + 2322 + {530, 14} + + + + + + results + + + YES + + YES + NSColor + NSFont + + + YES + + 1 + MC40NTEwODY5NCAwLjEwNDE0NTEyIDAuMDgyODYwMjE2AA + + + Geneva + 10 + 16 + + + + + + + YES + + + 6 + + + + 530 + 1 + + + 67119969 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + 1 + MCAwIDEAA + + + + + + + 1 + + 6 + {1052, 10000000} + {463, 0} + + + + {{1, 1}, {530, 76}} + + + + + + {4, 5} + + 79691776 + + YES + + YES + + + + + file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff + + + + + + 3 + MCAwAA + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{0, 113}, {532, 78}} + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + {{20, 35}, {532, 191}} + + + + {567, 339} + + + {{0, 0}, {1440, 878}} + {567, 361} + {10000000000000, 10000000000000} + YES + + + YES + + + 3 + 2 + {{235, 277}, {458, 282}} + 611844096 + Client ID Sheet + NSWindow + + + + + 256 + + YES + + + 266 + {{77, 141}, {361, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 143}, {55, 17}} + + YES + + 68288064 + 272630784 + API Key: + + + + + + + + + 268 + {{225, 78}, {82, 20}} + + YES + + 67239424 + 134348800 + API Console + + + -2038284033 + 134 + + + 200 + 25 + + + + + 268 + {{17, 80}, {203, 17}} + + YES + + 68288064 + 272630784 + API keys are obtained from the + + LucidaGrande + 13 + 16 + + + + + + + + + 268 + {{17, 202}, {424, 34}} + + YES + + 67239424 + 138412032 + Each application should have an API key hardcoded into the source. + + + + + + + + + 268 + {{348, 12}, {96, 32}} + + YES + + 67239424 + 134217728 + Done + + + -2038284033 + 129 + + DQ + 200 + 25 + + + + {458, 282} + + {{0, 0}, {1920, 1178}} + {10000000000000, 10000000000000} + YES + + + + + YES + + + loggingCheckboxClicked: + + + + 151 + + + + window + + + + 383 + + + + APIConsoleClicked: + + + + 468 + + + + productsTable + + + + 564 + + + + productsProgressIndicator + + + + 565 + + + + productsResultTextField + + + + 566 + + + + productsCancelButton + + + + 567 + + + + searchField + + + + 568 + + + + searchButton + + + + 569 + + + + rankingPopup + + + + 570 + + + + searchProductsClicked: + + + + 572 + + + + accessKeyField + + + + 575 + + + + accessKeySheet + + + + 576 + + + + accessKeyRequiredTextField + + + + 577 + + + + accessKeyButton + + + + 578 + + + + rankByClicked: + + + + 580 + + + + productsImageView + + + + 597 + + + + cancelProductsFetchClicked: + + + + 598 + + + + APIKeyClicked: + + + + 599 + + + + APIKeyDoneClicked: + + + + 600 + + + + delegate + + + + 15 + + + + dataSource + + + + 34 + + + + delegate + + + + 35 + + + + value: values.accessKey + + + + + + value: values.accessKey + value + values.accessKey + + NSContinuouslyUpdatesValue + + + 2 + + + 579 + + + + delegate + + + + 581 + + + + value: values.queryString + + + + + + value: values.queryString + value + values.queryString + 2 + + + 582 + + + + selectedIndex: values.rankBy + + + + + + selectedIndex: values.rankBy + selectedIndex + values.rankBy + 2 + + + 587 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 5 + + + YES + + + + Window + + + 6 + + + YES + + + + + + + + + + + + + + + + 17 + + + YES + + + + + + 40 + + + + + 86 + + + YES + + + + + + 150 + + + YES + + + + + + 44 + + + Shared Defaults + + + 251 + + + + + 253 + + + + + 254 + + + + + 38 + + + YES + + + + + + 252 + + + + + 438 + + + YES + + + + + + 439 + + + YES + + + + + + + + + + + 440 + + + YES + + + + + + 441 + + + YES + + + + + + 444 + + + YES + + + + + + 445 + + + YES + + + + + + 446 + + + YES + + + + + + 447 + + + YES + + + + + + 448 + + + + + 449 + + + + + 450 + + + + + 451 + + + + + 454 + + + + + 455 + + + + + 461 + + + YES + + + + + + 462 + + + + + 460 + + + YES + + + + + + 463 + + + + + 554 + + + YES + + + + + + 555 + + + + + 556 + + + YES + + + + + + 557 + + + YES + + + + + + 558 + + + YES + + + + + + + + 559 + + + + + 560 + + + + + 561 + + + + + 562 + + + YES + + + + + + 563 + + + + + 595 + + + YES + + + + + + + 594 + + + YES + + + + + + + 588 + + + YES + + + + + + 24 + + + YES + + + + + + + + 265 + + + + + 264 + + + + + 25 + + + YES + + + + + + 26 + + + YES + + + + + + 263 + + + + + 589 + + + + + 80 + + + YES + + + + + + + + 267 + + + + + 266 + + + + + 81 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 150.IBPluginDependency + 17.IBPluginDependency + 24.IBPluginDependency + 25.IBPluginDependency + 251.IBPluginDependency + 252.IBPluginDependency + 253.IBPluginDependency + 254.IBPluginDependency + 26.IBPluginDependency + 263.IBPluginDependency + 263.IBShouldRemoveOnLegacySave + 264.IBPluginDependency + 264.IBShouldRemoveOnLegacySave + 265.IBPluginDependency + 265.IBShouldRemoveOnLegacySave + 266.IBPluginDependency + 266.IBShouldRemoveOnLegacySave + 267.IBPluginDependency + 267.IBShouldRemoveOnLegacySave + 38.IBPluginDependency + 40.IBPluginDependency + 438.IBPluginDependency + 438.IBWindowTemplateEditedContentRect + 438.NSWindowTemplate.visibleAtLaunch + 439.IBPluginDependency + 44.IBPluginDependency + 440.IBPluginDependency + 441.IBPluginDependency + 444.IBPluginDependency + 445.IBPluginDependency + 446.IBPluginDependency + 447.IBPluginDependency + 448.IBPluginDependency + 449.IBPluginDependency + 450.IBPluginDependency + 451.IBPluginDependency + 454.IBPluginDependency + 455.IBPluginDependency + 460.IBPluginDependency + 461.IBPluginDependency + 462.IBPluginDependency + 463.IBPluginDependency + 5.IBPluginDependency + 5.IBWindowTemplateEditedContentRect + 554.IBPluginDependency + 555.IBPluginDependency + 556.IBPluginDependency + 557.IBPluginDependency + 558.IBPluginDependency + 559.IBPluginDependency + 560.IBPluginDependency + 561.IBPluginDependency + 562.IBPluginDependency + 563.IBPluginDependency + 588.IBPluginDependency + 589.IBPluginDependency + 594.IBPluginDependency + 595.IBPluginDependency + 6.IBPluginDependency + 6.IBUserGuides + 80.IBPluginDependency + 81.IBPluginDependency + 86.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{196, 842}, {458, 282}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{18, 816}, {567, 339}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + YES + + + 744 + 1 + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 600 + + + + YES + + ShoppingSampleWindowController + NSWindowController + + YES + + YES + APIConsoleClicked: + APIKeyClicked: + APIKeyDoneClicked: + cancelProductsFetchClicked: + loggingCheckboxClicked: + rankByClicked: + searchProductsClicked: + + + YES + id + id + id + id + id + id + id + + + + YES + + YES + APIConsoleClicked: + APIKeyClicked: + APIKeyDoneClicked: + cancelProductsFetchClicked: + loggingCheckboxClicked: + rankByClicked: + searchProductsClicked: + + + YES + + APIConsoleClicked: + id + + + APIKeyClicked: + id + + + APIKeyDoneClicked: + id + + + cancelProductsFetchClicked: + id + + + loggingCheckboxClicked: + id + + + rankByClicked: + id + + + searchProductsClicked: + id + + + + + YES + + YES + accessKeyButton + accessKeyField + accessKeyRequiredTextField + accessKeySheet + productsCancelButton + productsImageView + productsProgressIndicator + productsResultTextField + productsTable + rankingPopup + searchButton + searchField + + + YES + NSButton + NSTextField + NSTextField + NSWindow + NSButton + NSImageView + NSProgressIndicator + NSTextView + NSTableView + NSPopUpButton + NSButton + NSTextField + + + + YES + + YES + accessKeyButton + accessKeyField + accessKeyRequiredTextField + accessKeySheet + productsCancelButton + productsImageView + productsProgressIndicator + productsResultTextField + productsTable + rankingPopup + searchButton + searchField + + + YES + + accessKeyButton + NSButton + + + accessKeyField + NSTextField + + + accessKeyRequiredTextField + NSTextField + + + accessKeySheet + NSWindow + + + productsCancelButton + NSButton + + + productsImageView + NSImageView + + + productsProgressIndicator + NSProgressIndicator + + + productsResultTextField + NSTextView + + + productsTable + NSTableView + + + rankingPopup + NSPopUpButton + + + searchButton + NSButton + + + searchField + NSTextField + + + + + IBProjectSource + ./Classes/ShoppingSampleWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {11, 11} + {10, 3} + + + + diff --git a/GTL/Examples/ShoppingSample/Info.plist b/GTL/Examples/ShoppingSample/Info.plist new file mode 100644 index 0000000..bb4de48 --- /dev/null +++ b/GTL/Examples/ShoppingSample/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.example.ShoppingSample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/GTL/Examples/ShoppingSample/README.txt b/GTL/Examples/ShoppingSample/README.txt new file mode 100644 index 0000000..ff257a0 --- /dev/null +++ b/GTL/Examples/ShoppingSample/README.txt @@ -0,0 +1 @@ +This sample should automatically build and copy over the GTL.framework as part of the build-and-run process. diff --git a/GTL/Examples/ShoppingSample/ShoppingSample.xcodeproj/.svn/all-wcprops b/GTL/Examples/ShoppingSample/ShoppingSample.xcodeproj/.svn/all-wcprops new file mode 100644 index 0000000..7ab33f7 --- /dev/null +++ b/GTL/Examples/ShoppingSample/ShoppingSample.xcodeproj/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/154/trunk/Examples/ShoppingSample/ShoppingSample.xcodeproj +END +project.pbxproj +K 25 +svn:wc:ra_dav:version-url +V 88 +/svn/!svn/ver/154/trunk/Examples/ShoppingSample/ShoppingSample.xcodeproj/project.pbxproj +END diff --git a/GTL/Examples/ShoppingSample/ShoppingSample.xcodeproj/.svn/entries b/GTL/Examples/ShoppingSample/ShoppingSample.xcodeproj/.svn/entries new file mode 100644 index 0000000..bbd86e8 --- /dev/null +++ b/GTL/Examples/ShoppingSample/ShoppingSample.xcodeproj/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/ShoppingSample/ShoppingSample.xcodeproj +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +project.pbxproj +file + + + + +2012-12-09T08:42:34.000000Z +880e1058bc01ec46c5e0318943b61777 +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +26151 + diff --git a/GTL/Examples/ShoppingSample/ShoppingSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base b/GTL/Examples/ShoppingSample/ShoppingSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base new file mode 100644 index 0000000..095ad20 --- /dev/null +++ b/GTL/Examples/ShoppingSample/ShoppingSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base @@ -0,0 +1,549 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F22A2141186315400FFBAB6 /* WebKit.framework */; }; + 4F244586121F0B8700FEE1DA /* GTL.framework in Copy GTL.framework */ = {isa = PBXBuildFile; fileRef = 4F24457F121F0B8300FEE1DA /* GTL.framework */; }; + 4F244587121F0B8A00FEE1DA /* GTL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F24457F121F0B8300FEE1DA /* GTL.framework */; }; + 4F6293CE11CC193500BE36DD /* ShoppingSampleAppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F6293CB11CC193500BE36DD /* ShoppingSampleAppController.m */; }; + 4F6293CF11CC193500BE36DD /* ShoppingSampleWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F6293CD11CC193500BE36DD /* ShoppingSampleWindowController.m */; }; + 4F6293F811CC21A000BE36DD /* ShoppingSampleWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F6293F611CC21A000BE36DD /* ShoppingSampleWindow.xib */; }; + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */; }; + 4FCCF56A155C519B009947E5 /* GTLQueryShopping.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCCF558155C519B009947E5 /* GTLQueryShopping.m */; }; + 4FCCF56B155C519B009947E5 /* GTLServiceShopping.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCCF55A155C519B009947E5 /* GTLServiceShopping.m */; }; + 4FCCF56C155C519B009947E5 /* GTLShoppingConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCCF55D155C519B009947E5 /* GTLShoppingConstants.m */; }; + 4FCCF56D155C519B009947E5 /* GTLShoppingModelCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCCF55F155C519B009947E5 /* GTLShoppingModelCategory.m */; }; + 4FCCF56E155C519B009947E5 /* GTLShoppingModelDebug.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCCF561155C519B009947E5 /* GTLShoppingModelDebug.m */; }; + 4FCCF56F155C519B009947E5 /* GTLShoppingModelProduct.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCCF563155C519B009947E5 /* GTLShoppingModelProduct.m */; }; + 4FCCF570155C519B009947E5 /* GTLShoppingModelRecommendations.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCCF565155C519B009947E5 /* GTLShoppingModelRecommendations.m */; }; + 4FCCF571155C519B009947E5 /* GTLShoppingProduct.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCCF567155C519B009947E5 /* GTLShoppingProduct.m */; }; + 4FCCF572155C519B009947E5 /* GTLShoppingProducts.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCCF569155C519B009947E5 /* GTLShoppingProducts.m */; }; + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4F24457E121F0B8300FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F38F6A60B66E91D00B24B81; + remoteInfo = GTLFramework; + }; + 4F244580121F0B8300FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027C11A4CA2F00BEB470; + remoteInfo = GTLTouchStaticLib; + }; + 4F244582121F0B8300FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027D11A4CA2F00BEB470; + remoteInfo = GTLUnitTests; + }; + 4F244584121F0B8300FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F1AD9020B71603F00DC0485; + remoteInfo = DevelopmentTestTool; + }; + 4F72435E12233E7D001A4AD0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 4F38F6A50B66E91D00B24B81; + remoteInfo = GTLFramework; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 4F38F8970B66FAB700B24B81 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4F62921C11CAE5F700BE36DD /* Copy GTL.framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4F244586121F0B8700FEE1DA /* GTL.framework in Copy GTL.framework */, + ); + name = "Copy GTL.framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 4F22A2141186315400FFBAB6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; + 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GTL.xcodeproj; path = ../../Source/GTL.xcodeproj; sourceTree = SOURCE_ROOT; }; + 4F6293CA11CC193500BE36DD /* ShoppingSampleAppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShoppingSampleAppController.h; sourceTree = ""; }; + 4F6293CB11CC193500BE36DD /* ShoppingSampleAppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShoppingSampleAppController.m; sourceTree = ""; }; + 4F6293CC11CC193500BE36DD /* ShoppingSampleWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShoppingSampleWindowController.h; sourceTree = ""; }; + 4F6293CD11CC193500BE36DD /* ShoppingSampleWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShoppingSampleWindowController.m; sourceTree = ""; }; + 4F6293F711CC21A000BE36DD /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/ShoppingSampleWindow.xib; sourceTree = ""; }; + 4FA6F3D21034AEC400C5DFA5 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; + 4FCCF557155C519B009947E5 /* GTLQueryShopping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLQueryShopping.h; sourceTree = ""; }; + 4FCCF558155C519B009947E5 /* GTLQueryShopping.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLQueryShopping.m; sourceTree = ""; }; + 4FCCF559155C519B009947E5 /* GTLServiceShopping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLServiceShopping.h; sourceTree = ""; }; + 4FCCF55A155C519B009947E5 /* GTLServiceShopping.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLServiceShopping.m; sourceTree = ""; }; + 4FCCF55B155C519B009947E5 /* GTLShopping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLShopping.h; sourceTree = ""; }; + 4FCCF55C155C519B009947E5 /* GTLShoppingConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLShoppingConstants.h; sourceTree = ""; }; + 4FCCF55D155C519B009947E5 /* GTLShoppingConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLShoppingConstants.m; sourceTree = ""; }; + 4FCCF55E155C519B009947E5 /* GTLShoppingModelCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLShoppingModelCategory.h; sourceTree = ""; }; + 4FCCF55F155C519B009947E5 /* GTLShoppingModelCategory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLShoppingModelCategory.m; sourceTree = ""; }; + 4FCCF560155C519B009947E5 /* GTLShoppingModelDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLShoppingModelDebug.h; sourceTree = ""; }; + 4FCCF561155C519B009947E5 /* GTLShoppingModelDebug.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLShoppingModelDebug.m; sourceTree = ""; }; + 4FCCF562155C519B009947E5 /* GTLShoppingModelProduct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLShoppingModelProduct.h; sourceTree = ""; }; + 4FCCF563155C519B009947E5 /* GTLShoppingModelProduct.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLShoppingModelProduct.m; sourceTree = ""; }; + 4FCCF564155C519B009947E5 /* GTLShoppingModelRecommendations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLShoppingModelRecommendations.h; sourceTree = ""; }; + 4FCCF565155C519B009947E5 /* GTLShoppingModelRecommendations.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLShoppingModelRecommendations.m; sourceTree = ""; }; + 4FCCF566155C519B009947E5 /* GTLShoppingProduct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLShoppingProduct.h; sourceTree = ""; }; + 4FCCF567155C519B009947E5 /* GTLShoppingProduct.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLShoppingProduct.m; sourceTree = ""; }; + 4FCCF568155C519B009947E5 /* GTLShoppingProducts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLShoppingProducts.h; sourceTree = ""; }; + 4FCCF569155C519B009947E5 /* GTLShoppingProducts.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLShoppingProducts.m; sourceTree = ""; }; + 4FD0F1D90CBC68F300059DC1 /* buildCopyScript */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = buildCopyScript; sourceTree = ""; }; + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = buildStripHeaders; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 8D1107320486CEB800E47090 /* ShoppingSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ShoppingSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F244587121F0B8A00FEE1DA /* GTL.framework in Frameworks */, + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 4F6293CA11CC193500BE36DD /* ShoppingSampleAppController.h */, + 4F6293CB11CC193500BE36DD /* ShoppingSampleAppController.m */, + 4F6293CC11CC193500BE36DD /* ShoppingSampleWindowController.h */, + 4F6293CD11CC193500BE36DD /* ShoppingSampleWindowController.m */, + ); + name = Classes; + sourceTree = ""; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 4F22A2141186315400FFBAB6 /* WebKit.framework */, + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* ShoppingSample.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CalendarSample */ = { + isa = PBXGroup; + children = ( + 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */, + 080E96DDFE201D6D7F000001 /* Classes */, + 4FB2552C138C456800B5C1AE /* API Services */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CalendarSample; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 4F6293F611CC21A000BE36DD /* ShoppingSampleWindow.xib */, + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */, + 8D1107310486CEB800E47090 /* Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4F244578121F0B8300FEE1DA /* Products */ = { + isa = PBXGroup; + children = ( + 4F24457F121F0B8300FEE1DA /* GTL.framework */, + 4F244581121F0B8300FEE1DA /* libGTLTouchStaticLib.a */, + 4F244583121F0B8300FEE1DA /* GTLUnitTests.octest */, + 4F244585121F0B8300FEE1DA /* DevelopmentTestTool */, + ); + name = Products; + sourceTree = ""; + }; + 4FB25510138C456400B5C1AE /* Shopping */ = { + isa = PBXGroup; + children = ( + 4FCCF556155C519B009947E5 /* Generated */, + ); + name = Shopping; + path = ../../Source/Services/Shopping; + sourceTree = SOURCE_ROOT; + }; + 4FB2552C138C456800B5C1AE /* API Services */ = { + isa = PBXGroup; + children = ( + 4FB25510138C456400B5C1AE /* Shopping */, + ); + name = "API Services"; + sourceTree = ""; + }; + 4FCCF556155C519B009947E5 /* Generated */ = { + isa = PBXGroup; + children = ( + 4FCCF557155C519B009947E5 /* GTLQueryShopping.h */, + 4FCCF558155C519B009947E5 /* GTLQueryShopping.m */, + 4FCCF559155C519B009947E5 /* GTLServiceShopping.h */, + 4FCCF55A155C519B009947E5 /* GTLServiceShopping.m */, + 4FCCF55B155C519B009947E5 /* GTLShopping.h */, + 4FCCF55C155C519B009947E5 /* GTLShoppingConstants.h */, + 4FCCF55D155C519B009947E5 /* GTLShoppingConstants.m */, + 4FCCF55E155C519B009947E5 /* GTLShoppingModelCategory.h */, + 4FCCF55F155C519B009947E5 /* GTLShoppingModelCategory.m */, + 4FCCF560155C519B009947E5 /* GTLShoppingModelDebug.h */, + 4FCCF561155C519B009947E5 /* GTLShoppingModelDebug.m */, + 4FCCF562155C519B009947E5 /* GTLShoppingModelProduct.h */, + 4FCCF563155C519B009947E5 /* GTLShoppingModelProduct.m */, + 4FCCF564155C519B009947E5 /* GTLShoppingModelRecommendations.h */, + 4FCCF565155C519B009947E5 /* GTLShoppingModelRecommendations.m */, + 4FCCF566155C519B009947E5 /* GTLShoppingProduct.h */, + 4FCCF567155C519B009947E5 /* GTLShoppingProduct.m */, + 4FCCF568155C519B009947E5 /* GTLShoppingProducts.h */, + 4FCCF569155C519B009947E5 /* GTLShoppingProducts.m */, + ); + path = Generated; + sourceTree = ""; + }; + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */ = { + isa = PBXGroup; + children = ( + 4FD0F1D90CBC68F300059DC1 /* buildCopyScript */, + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */, + ); + name = "Build Scripts"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* ShoppingSample */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "ShoppingSample" */; + buildPhases = ( + 4F62921C11CAE5F700BE36DD /* Copy GTL.framework */, + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + 4F38F8970B66FAB700B24B81 /* CopyFiles */, + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */, + ); + buildRules = ( + ); + dependencies = ( + 4F72435F12233E7D001A4AD0 /* PBXTargetDependency */, + ); + name = ShoppingSample; + productInstallPath = "$(HOME)/Applications"; + productName = CalendarSample; + productReference = 8D1107320486CEB800E47090 /* ShoppingSample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ShoppingSample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CalendarSample */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 4F244578121F0B8300FEE1DA /* Products */; + ProjectRef = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* ShoppingSample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 4F24457F121F0B8300FEE1DA /* GTL.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = GTL.framework; + remoteRef = 4F24457E121F0B8300FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F244581121F0B8300FEE1DA /* libGTLTouchStaticLib.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libGTLTouchStaticLib.a; + remoteRef = 4F244580121F0B8300FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F244583121F0B8300FEE1DA /* GTLUnitTests.octest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = GTLUnitTests.octest; + remoteRef = 4F244582121F0B8300FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F244585121F0B8300FEE1DA /* DevelopmentTestTool */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = DevelopmentTestTool; + remoteRef = 4F244584121F0B8300FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */, + 4F6293F811CC21A000BE36DD /* ShoppingSampleWindow.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Strip Headers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ./buildStripHeaders; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072D0486CEB800E47090 /* main.m in Sources */, + 4F6293CE11CC193500BE36DD /* ShoppingSampleAppController.m in Sources */, + 4F6293CF11CC193500BE36DD /* ShoppingSampleWindowController.m in Sources */, + 4FCCF56A155C519B009947E5 /* GTLQueryShopping.m in Sources */, + 4FCCF56B155C519B009947E5 /* GTLServiceShopping.m in Sources */, + 4FCCF56C155C519B009947E5 /* GTLShoppingConstants.m in Sources */, + 4FCCF56D155C519B009947E5 /* GTLShoppingModelCategory.m in Sources */, + 4FCCF56E155C519B009947E5 /* GTLShoppingModelDebug.m in Sources */, + 4FCCF56F155C519B009947E5 /* GTLShoppingModelProduct.m in Sources */, + 4FCCF570155C519B009947E5 /* GTLShoppingModelRecommendations.m in Sources */, + 4FCCF571155C519B009947E5 /* GTLShoppingProduct.m in Sources */, + 4FCCF572155C519B009947E5 /* GTLShoppingProducts.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 4F72435F12233E7D001A4AD0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = GTLFramework; + targetProxy = 4F72435E12233E7D001A4AD0 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C165DFE840E0CC02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 4F6293F611CC21A000BE36DD /* ShoppingSampleWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 4F6293F711CC21A000BE36DD /* English */, + ); + name = ShoppingSampleWindow.xib; + sourceTree = ""; + }; + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 4FA6F3D21034AEC400C5DFA5 /* English */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = ShoppingSample; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = ShoppingSample; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = ( + "-DGTL_BUILT_AS_FRAMEWORK=1", + "-DDEBUG=1", + ); + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DGTL_BUILT_AS_FRAMEWORK=1"; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "ShoppingSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ShoppingSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/GTL/Examples/ShoppingSample/ShoppingSample.xcodeproj/project.pbxproj b/GTL/Examples/ShoppingSample/ShoppingSample.xcodeproj/project.pbxproj new file mode 100644 index 0000000..095ad20 --- /dev/null +++ b/GTL/Examples/ShoppingSample/ShoppingSample.xcodeproj/project.pbxproj @@ -0,0 +1,549 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F22A2141186315400FFBAB6 /* WebKit.framework */; }; + 4F244586121F0B8700FEE1DA /* GTL.framework in Copy GTL.framework */ = {isa = PBXBuildFile; fileRef = 4F24457F121F0B8300FEE1DA /* GTL.framework */; }; + 4F244587121F0B8A00FEE1DA /* GTL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F24457F121F0B8300FEE1DA /* GTL.framework */; }; + 4F6293CE11CC193500BE36DD /* ShoppingSampleAppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F6293CB11CC193500BE36DD /* ShoppingSampleAppController.m */; }; + 4F6293CF11CC193500BE36DD /* ShoppingSampleWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F6293CD11CC193500BE36DD /* ShoppingSampleWindowController.m */; }; + 4F6293F811CC21A000BE36DD /* ShoppingSampleWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F6293F611CC21A000BE36DD /* ShoppingSampleWindow.xib */; }; + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */; }; + 4FCCF56A155C519B009947E5 /* GTLQueryShopping.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCCF558155C519B009947E5 /* GTLQueryShopping.m */; }; + 4FCCF56B155C519B009947E5 /* GTLServiceShopping.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCCF55A155C519B009947E5 /* GTLServiceShopping.m */; }; + 4FCCF56C155C519B009947E5 /* GTLShoppingConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCCF55D155C519B009947E5 /* GTLShoppingConstants.m */; }; + 4FCCF56D155C519B009947E5 /* GTLShoppingModelCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCCF55F155C519B009947E5 /* GTLShoppingModelCategory.m */; }; + 4FCCF56E155C519B009947E5 /* GTLShoppingModelDebug.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCCF561155C519B009947E5 /* GTLShoppingModelDebug.m */; }; + 4FCCF56F155C519B009947E5 /* GTLShoppingModelProduct.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCCF563155C519B009947E5 /* GTLShoppingModelProduct.m */; }; + 4FCCF570155C519B009947E5 /* GTLShoppingModelRecommendations.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCCF565155C519B009947E5 /* GTLShoppingModelRecommendations.m */; }; + 4FCCF571155C519B009947E5 /* GTLShoppingProduct.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCCF567155C519B009947E5 /* GTLShoppingProduct.m */; }; + 4FCCF572155C519B009947E5 /* GTLShoppingProducts.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCCF569155C519B009947E5 /* GTLShoppingProducts.m */; }; + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4F24457E121F0B8300FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F38F6A60B66E91D00B24B81; + remoteInfo = GTLFramework; + }; + 4F244580121F0B8300FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027C11A4CA2F00BEB470; + remoteInfo = GTLTouchStaticLib; + }; + 4F244582121F0B8300FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027D11A4CA2F00BEB470; + remoteInfo = GTLUnitTests; + }; + 4F244584121F0B8300FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F1AD9020B71603F00DC0485; + remoteInfo = DevelopmentTestTool; + }; + 4F72435E12233E7D001A4AD0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 4F38F6A50B66E91D00B24B81; + remoteInfo = GTLFramework; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 4F38F8970B66FAB700B24B81 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4F62921C11CAE5F700BE36DD /* Copy GTL.framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4F244586121F0B8700FEE1DA /* GTL.framework in Copy GTL.framework */, + ); + name = "Copy GTL.framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 4F22A2141186315400FFBAB6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; + 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GTL.xcodeproj; path = ../../Source/GTL.xcodeproj; sourceTree = SOURCE_ROOT; }; + 4F6293CA11CC193500BE36DD /* ShoppingSampleAppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShoppingSampleAppController.h; sourceTree = ""; }; + 4F6293CB11CC193500BE36DD /* ShoppingSampleAppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShoppingSampleAppController.m; sourceTree = ""; }; + 4F6293CC11CC193500BE36DD /* ShoppingSampleWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShoppingSampleWindowController.h; sourceTree = ""; }; + 4F6293CD11CC193500BE36DD /* ShoppingSampleWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShoppingSampleWindowController.m; sourceTree = ""; }; + 4F6293F711CC21A000BE36DD /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/ShoppingSampleWindow.xib; sourceTree = ""; }; + 4FA6F3D21034AEC400C5DFA5 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; + 4FCCF557155C519B009947E5 /* GTLQueryShopping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLQueryShopping.h; sourceTree = ""; }; + 4FCCF558155C519B009947E5 /* GTLQueryShopping.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLQueryShopping.m; sourceTree = ""; }; + 4FCCF559155C519B009947E5 /* GTLServiceShopping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLServiceShopping.h; sourceTree = ""; }; + 4FCCF55A155C519B009947E5 /* GTLServiceShopping.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLServiceShopping.m; sourceTree = ""; }; + 4FCCF55B155C519B009947E5 /* GTLShopping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLShopping.h; sourceTree = ""; }; + 4FCCF55C155C519B009947E5 /* GTLShoppingConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLShoppingConstants.h; sourceTree = ""; }; + 4FCCF55D155C519B009947E5 /* GTLShoppingConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLShoppingConstants.m; sourceTree = ""; }; + 4FCCF55E155C519B009947E5 /* GTLShoppingModelCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLShoppingModelCategory.h; sourceTree = ""; }; + 4FCCF55F155C519B009947E5 /* GTLShoppingModelCategory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLShoppingModelCategory.m; sourceTree = ""; }; + 4FCCF560155C519B009947E5 /* GTLShoppingModelDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLShoppingModelDebug.h; sourceTree = ""; }; + 4FCCF561155C519B009947E5 /* GTLShoppingModelDebug.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLShoppingModelDebug.m; sourceTree = ""; }; + 4FCCF562155C519B009947E5 /* GTLShoppingModelProduct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLShoppingModelProduct.h; sourceTree = ""; }; + 4FCCF563155C519B009947E5 /* GTLShoppingModelProduct.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLShoppingModelProduct.m; sourceTree = ""; }; + 4FCCF564155C519B009947E5 /* GTLShoppingModelRecommendations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLShoppingModelRecommendations.h; sourceTree = ""; }; + 4FCCF565155C519B009947E5 /* GTLShoppingModelRecommendations.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLShoppingModelRecommendations.m; sourceTree = ""; }; + 4FCCF566155C519B009947E5 /* GTLShoppingProduct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLShoppingProduct.h; sourceTree = ""; }; + 4FCCF567155C519B009947E5 /* GTLShoppingProduct.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLShoppingProduct.m; sourceTree = ""; }; + 4FCCF568155C519B009947E5 /* GTLShoppingProducts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLShoppingProducts.h; sourceTree = ""; }; + 4FCCF569155C519B009947E5 /* GTLShoppingProducts.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLShoppingProducts.m; sourceTree = ""; }; + 4FD0F1D90CBC68F300059DC1 /* buildCopyScript */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = buildCopyScript; sourceTree = ""; }; + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = buildStripHeaders; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 8D1107320486CEB800E47090 /* ShoppingSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ShoppingSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F244587121F0B8A00FEE1DA /* GTL.framework in Frameworks */, + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 4F6293CA11CC193500BE36DD /* ShoppingSampleAppController.h */, + 4F6293CB11CC193500BE36DD /* ShoppingSampleAppController.m */, + 4F6293CC11CC193500BE36DD /* ShoppingSampleWindowController.h */, + 4F6293CD11CC193500BE36DD /* ShoppingSampleWindowController.m */, + ); + name = Classes; + sourceTree = ""; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 4F22A2141186315400FFBAB6 /* WebKit.framework */, + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* ShoppingSample.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CalendarSample */ = { + isa = PBXGroup; + children = ( + 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */, + 080E96DDFE201D6D7F000001 /* Classes */, + 4FB2552C138C456800B5C1AE /* API Services */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CalendarSample; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 4F6293F611CC21A000BE36DD /* ShoppingSampleWindow.xib */, + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */, + 8D1107310486CEB800E47090 /* Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4F244578121F0B8300FEE1DA /* Products */ = { + isa = PBXGroup; + children = ( + 4F24457F121F0B8300FEE1DA /* GTL.framework */, + 4F244581121F0B8300FEE1DA /* libGTLTouchStaticLib.a */, + 4F244583121F0B8300FEE1DA /* GTLUnitTests.octest */, + 4F244585121F0B8300FEE1DA /* DevelopmentTestTool */, + ); + name = Products; + sourceTree = ""; + }; + 4FB25510138C456400B5C1AE /* Shopping */ = { + isa = PBXGroup; + children = ( + 4FCCF556155C519B009947E5 /* Generated */, + ); + name = Shopping; + path = ../../Source/Services/Shopping; + sourceTree = SOURCE_ROOT; + }; + 4FB2552C138C456800B5C1AE /* API Services */ = { + isa = PBXGroup; + children = ( + 4FB25510138C456400B5C1AE /* Shopping */, + ); + name = "API Services"; + sourceTree = ""; + }; + 4FCCF556155C519B009947E5 /* Generated */ = { + isa = PBXGroup; + children = ( + 4FCCF557155C519B009947E5 /* GTLQueryShopping.h */, + 4FCCF558155C519B009947E5 /* GTLQueryShopping.m */, + 4FCCF559155C519B009947E5 /* GTLServiceShopping.h */, + 4FCCF55A155C519B009947E5 /* GTLServiceShopping.m */, + 4FCCF55B155C519B009947E5 /* GTLShopping.h */, + 4FCCF55C155C519B009947E5 /* GTLShoppingConstants.h */, + 4FCCF55D155C519B009947E5 /* GTLShoppingConstants.m */, + 4FCCF55E155C519B009947E5 /* GTLShoppingModelCategory.h */, + 4FCCF55F155C519B009947E5 /* GTLShoppingModelCategory.m */, + 4FCCF560155C519B009947E5 /* GTLShoppingModelDebug.h */, + 4FCCF561155C519B009947E5 /* GTLShoppingModelDebug.m */, + 4FCCF562155C519B009947E5 /* GTLShoppingModelProduct.h */, + 4FCCF563155C519B009947E5 /* GTLShoppingModelProduct.m */, + 4FCCF564155C519B009947E5 /* GTLShoppingModelRecommendations.h */, + 4FCCF565155C519B009947E5 /* GTLShoppingModelRecommendations.m */, + 4FCCF566155C519B009947E5 /* GTLShoppingProduct.h */, + 4FCCF567155C519B009947E5 /* GTLShoppingProduct.m */, + 4FCCF568155C519B009947E5 /* GTLShoppingProducts.h */, + 4FCCF569155C519B009947E5 /* GTLShoppingProducts.m */, + ); + path = Generated; + sourceTree = ""; + }; + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */ = { + isa = PBXGroup; + children = ( + 4FD0F1D90CBC68F300059DC1 /* buildCopyScript */, + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */, + ); + name = "Build Scripts"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* ShoppingSample */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "ShoppingSample" */; + buildPhases = ( + 4F62921C11CAE5F700BE36DD /* Copy GTL.framework */, + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + 4F38F8970B66FAB700B24B81 /* CopyFiles */, + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */, + ); + buildRules = ( + ); + dependencies = ( + 4F72435F12233E7D001A4AD0 /* PBXTargetDependency */, + ); + name = ShoppingSample; + productInstallPath = "$(HOME)/Applications"; + productName = CalendarSample; + productReference = 8D1107320486CEB800E47090 /* ShoppingSample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ShoppingSample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CalendarSample */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 4F244578121F0B8300FEE1DA /* Products */; + ProjectRef = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* ShoppingSample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 4F24457F121F0B8300FEE1DA /* GTL.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = GTL.framework; + remoteRef = 4F24457E121F0B8300FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F244581121F0B8300FEE1DA /* libGTLTouchStaticLib.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libGTLTouchStaticLib.a; + remoteRef = 4F244580121F0B8300FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F244583121F0B8300FEE1DA /* GTLUnitTests.octest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = GTLUnitTests.octest; + remoteRef = 4F244582121F0B8300FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F244585121F0B8300FEE1DA /* DevelopmentTestTool */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = DevelopmentTestTool; + remoteRef = 4F244584121F0B8300FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */, + 4F6293F811CC21A000BE36DD /* ShoppingSampleWindow.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Strip Headers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ./buildStripHeaders; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072D0486CEB800E47090 /* main.m in Sources */, + 4F6293CE11CC193500BE36DD /* ShoppingSampleAppController.m in Sources */, + 4F6293CF11CC193500BE36DD /* ShoppingSampleWindowController.m in Sources */, + 4FCCF56A155C519B009947E5 /* GTLQueryShopping.m in Sources */, + 4FCCF56B155C519B009947E5 /* GTLServiceShopping.m in Sources */, + 4FCCF56C155C519B009947E5 /* GTLShoppingConstants.m in Sources */, + 4FCCF56D155C519B009947E5 /* GTLShoppingModelCategory.m in Sources */, + 4FCCF56E155C519B009947E5 /* GTLShoppingModelDebug.m in Sources */, + 4FCCF56F155C519B009947E5 /* GTLShoppingModelProduct.m in Sources */, + 4FCCF570155C519B009947E5 /* GTLShoppingModelRecommendations.m in Sources */, + 4FCCF571155C519B009947E5 /* GTLShoppingProduct.m in Sources */, + 4FCCF572155C519B009947E5 /* GTLShoppingProducts.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 4F72435F12233E7D001A4AD0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = GTLFramework; + targetProxy = 4F72435E12233E7D001A4AD0 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C165DFE840E0CC02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 4F6293F611CC21A000BE36DD /* ShoppingSampleWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 4F6293F711CC21A000BE36DD /* English */, + ); + name = ShoppingSampleWindow.xib; + sourceTree = ""; + }; + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 4FA6F3D21034AEC400C5DFA5 /* English */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = ShoppingSample; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = ShoppingSample; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = ( + "-DGTL_BUILT_AS_FRAMEWORK=1", + "-DDEBUG=1", + ); + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DGTL_BUILT_AS_FRAMEWORK=1"; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "ShoppingSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ShoppingSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/GTL/Examples/ShoppingSample/ShoppingSampleAppController.h b/GTL/Examples/ShoppingSample/ShoppingSampleAppController.h new file mode 100644 index 0000000..de611bf --- /dev/null +++ b/GTL/Examples/ShoppingSample/ShoppingSampleAppController.h @@ -0,0 +1,23 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// ShoppingSampleAppController.h +// + +#import + +@interface ShoppingSampleAppController : NSObject +@end diff --git a/GTL/Examples/ShoppingSample/ShoppingSampleAppController.m b/GTL/Examples/ShoppingSample/ShoppingSampleAppController.m new file mode 100644 index 0000000..ec19021 --- /dev/null +++ b/GTL/Examples/ShoppingSample/ShoppingSampleAppController.m @@ -0,0 +1,35 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// ShoppingSampleAppController.m +// + +#import "ShoppingSampleAppController.h" +#import "ShoppingSampleWindowController.h" + +@implementation ShoppingSampleAppController + +- (void)applicationWillFinishLaunching:(NSNotification *)notification { + ShoppingSampleWindowController* windowController + = [ShoppingSampleWindowController sharedWindowController]; + [windowController showWindow:self]; +} + +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { + return YES; +} + +@end diff --git a/GTL/Examples/ShoppingSample/ShoppingSampleWindowController.h b/GTL/Examples/ShoppingSample/ShoppingSampleWindowController.h new file mode 100644 index 0000000..c42937f --- /dev/null +++ b/GTL/Examples/ShoppingSample/ShoppingSampleWindowController.h @@ -0,0 +1,83 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// ShoppingSampleWindowController.h +// + +#import + +#import "GTLShopping.h" + +@interface ShoppingSampleWindowController : NSWindowController { + @private + // IBOutlets - main window + NSButton *searchButton_; + NSTextField *searchField_; + + NSPopUpButton *rankingPopup_; + + NSTableView *productsTable_; + NSImageView *productsImageView_; + NSProgressIndicator *productsProgressIndicator_; + NSTextView *productsResultTextField_; + NSButton *productsCancelButton_; + + // IBOutlets - client ID sheet + NSButton *accessKeyButton_; + NSTextField *accessKeyRequiredTextField_; + NSWindow *accessKeySheet_; + NSTextField *accessKeyField_; + + // property storage + GTLShoppingProducts *products_; + GTLServiceTicket *productsTicket_; + NSError *productsFetchError_; + + NSString *currentImageURLString_; + GTMHTTPFetcher *pendingImageFetcher_; +} + +// Main UI +@property (retain, nonatomic) IBOutlet NSButton *searchButton; +@property (retain, nonatomic) IBOutlet NSTextField *searchField; +@property (retain, nonatomic) IBOutlet NSPopUpButton *rankingPopup; + +@property (retain, nonatomic) IBOutlet NSTableView *productsTable; +@property (retain, nonatomic) IBOutlet NSImageView *productsImageView; +@property (retain, nonatomic) IBOutlet NSProgressIndicator *productsProgressIndicator; +@property (retain, nonatomic) IBOutlet NSTextView *productsResultTextField; +@property (retain, nonatomic) IBOutlet NSButton *productsCancelButton; + +// Client ID sheet +@property (retain, nonatomic) IBOutlet NSButton *accessKeyButton; +@property (retain, nonatomic) IBOutlet NSTextField *accessKeyRequiredTextField; +@property (retain, nonatomic) IBOutlet NSWindow *accessKeySheet; +@property (retain, nonatomic) IBOutlet NSTextField *accessKeyField; + ++ (ShoppingSampleWindowController *)sharedWindowController; + +// Main UI +- (IBAction)searchProductsClicked:(id)sender; +- (IBAction)rankByClicked:(id)sender; +- (IBAction)cancelProductsFetchClicked:(id)sender; + +// Access Key +- (IBAction)APIKeyClicked:(id)sender; +- (IBAction)APIKeyDoneClicked:(id)sender; +- (IBAction)APIConsoleClicked:(id)sender; + +- (IBAction)loggingCheckboxClicked:(id)sender; +@end diff --git a/GTL/Examples/ShoppingSample/ShoppingSampleWindowController.m b/GTL/Examples/ShoppingSample/ShoppingSampleWindowController.m new file mode 100644 index 0000000..0bc17f1 --- /dev/null +++ b/GTL/Examples/ShoppingSample/ShoppingSampleWindowController.m @@ -0,0 +1,341 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// ShoppingSampleWindowController.m +// + +#import "ShoppingSampleWindowController.h" + +#import "GTL/GTMOAuth2WindowController.h" +#import "GTL/GTMHTTPFetcherLogging.h" +#import "GTL/GTLUtilities.h" + +@interface ShoppingSampleWindowController () + +// Product table properties +@property (retain, nonatomic) GTLShoppingProducts *products; +@property (retain, nonatomic) GTLServiceTicket *productsTicket; +@property (retain, nonatomic) NSError *productsFetchError; + +@property (retain, nonatomic) NSString *currentImageURLString; +@property (retain, nonatomic) GTMHTTPFetcher *pendingImageFetcher; + +// Other properties +@property (retain, nonatomic, readonly) GTLServiceShopping *shoppingService; + +- (void)updateUI; +- (void)updateSelectedProductImage; +- (GTLShoppingProduct *)selectedProduct; +- (void)searchProducts; +@end + + +@implementation ShoppingSampleWindowController + +@synthesize searchButton = searchButton_, + searchField = searchField_, + rankingPopup = rankingPopup_, + productsTable = productsTable_, + productsImageView = productsImageView_, + productsProgressIndicator = productsProgressIndicator_, + productsResultTextField = productsResultTextField_, + productsCancelButton = productsCancelButton_, + accessKeyButton = accessKeyButton_, + accessKeyRequiredTextField = accessKeyRequiredTextField_, + accessKeySheet = accessKeySheet_, + accessKeyField = accessKeyField_; + +@synthesize products = products_, + productsTicket = productsTicket_, + productsFetchError = productsFetchError_, + currentImageURLString = currentImageURLString_, + pendingImageFetcher = pendingImageFetcher_; + ++ (ShoppingSampleWindowController *)sharedWindowController { + static ShoppingSampleWindowController* gWindowController = nil; + if (!gWindowController) { + gWindowController = [[ShoppingSampleWindowController alloc] init]; + } + return gWindowController; +} + + +- (id)init { + return [self initWithWindowNibName:@"ShoppingSampleWindow"]; +} + +- (void)awakeFromNib { + // Set the result text fields to have a distinctive color and mono-spaced font + [self.productsResultTextField setTextColor:[NSColor darkGrayColor]]; + + NSFont *resultTextFont = [NSFont fontWithName:@"Monaco" size:9]; + [self.productsResultTextField setFont:resultTextFont]; + + NSString *accessKey = [self.accessKeyField stringValue]; + self.shoppingService.APIKey = accessKey; + + [self updateUI]; +} + +- (void)dealloc { + // IBOutlets + self.searchButton = nil; + self.searchField = nil; + self.rankingPopup = nil; + self.productsTable = nil; + self.productsImageView = nil; + self.productsProgressIndicator = nil; + self.productsResultTextField = nil; + self.productsCancelButton = nil; + self.accessKeyButton = nil; + self.accessKeyRequiredTextField = nil; + self.accessKeySheet = nil; + self.accessKeyField = nil; + + self.products = nil; + self.productsTicket = nil; + self.productsFetchError = nil; + self.currentImageURLString = nil; + + [self.pendingImageFetcher stopFetching]; + self.pendingImageFetcher = nil; + + [super dealloc]; +} + +#pragma mark - + +- (void)updateUI { + // Products table + [self.productsTable reloadData]; + + if (self.productsTicket != nil) { + [self.productsProgressIndicator startAnimation:self]; + [self.productsCancelButton setEnabled:YES]; + } else { + [self.productsProgressIndicator stopAnimation:self]; + [self.productsCancelButton setEnabled:NO]; + } + + // Display the selected product item, or the fetch error + GTLShoppingProduct *selectedItem = [self selectedProduct]; + NSString *resultStr = @""; + NSError *fetchError = self.productsFetchError; + if (fetchError != nil) { + resultStr = [fetchError description]; + } else { + if (selectedItem) { + resultStr = [selectedItem description]; + } + } + [self.productsResultTextField setString:resultStr]; + + [self updateSelectedProductImage]; + + // Enable buttons + BOOL hasSearchTerm = ([[self.searchField stringValue] length] > 0); + [self.searchButton setEnabled:hasSearchTerm]; + [self.rankingPopup setEnabled:hasSearchTerm]; + + // Show or hide the text indicating that the developer key is needed + BOOL hasAccessKey = [[self.accessKeyField stringValue] length] > 0; + [self.accessKeyRequiredTextField setHidden:hasAccessKey]; +} + +- (void)updateSelectedProductImage { + // Find the thumbnail URL for the selected product + GTLShoppingProduct *selectedItem = [self selectedProduct]; + NSArray *images = selectedItem.product.images; + if ([images count] > 0) { + GTLShoppingModelProductImagesItem *imageItem = [images objectAtIndex:0]; + NSArray *thumbnails = imageItem.thumbnails; + if ([thumbnails count] > 0) { + GTLShoppingModelProductImagesItemThumbnailsItem *thumbnail = [thumbnails objectAtIndex:0]; + NSString *thumbnailLink = thumbnail.link; + + // Compare the URL to the one for the image currently displayed + if (!GTL_AreEqualOrBothNil(self.currentImageURLString, thumbnailLink)) { + // The URLs are different; remove the old image and fetch the new image + self.productsImageView.image = nil; + self.currentImageURLString = thumbnailLink; + + [self.pendingImageFetcher stopFetching]; + + GTMHTTPFetcherService *fetcherService = self.shoppingService.fetcherService; + GTMHTTPFetcher *fetcher = [fetcherService fetcherWithURLString:thumbnailLink]; + self.pendingImageFetcher = fetcher; + + [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { + // Fetcher callback + if (error == nil) { + // Display the fetched image + NSImage *image = [[[NSImage alloc] initWithData:data] autorelease]; + self.productsImageView.image = image; + } else { + NSLog(@"error %@ fetching product image %@", + error, fetcher.mutableRequest); + } + self.pendingImageFetcher = nil; + }]; + } + } + } +} + + +#pragma mark IBActions + +- (IBAction)searchProductsClicked:(id)sender { + [self searchProducts]; +} + +- (IBAction)rankByClicked:(id)sender { + [self searchProducts]; +} + +- (IBAction)cancelProductsFetchClicked:(id)sender { + [self.productsTicket cancelTicket]; + self.productsTicket = nil; + + [self updateUI]; +} + +- (IBAction)APIConsoleClicked:(id)sender { + NSURL *url = [NSURL URLWithString:@"https://code.google.com/apis/console"]; + [[NSWorkspace sharedWorkspace] openURL:url]; +} + +- (IBAction)loggingCheckboxClicked:(id)sender { + [GTMHTTPFetcher setLoggingEnabled:[sender state]]; +} + +#pragma mark - + +// Get a service object with the current authorization +// +// A "service" object handles networking tasks. Service objects +// contain user authentication information as well as networking +// state information (such as cookies and cached fetch results.) + +- (GTLServiceShopping *)shoppingService { + + static GTLServiceShopping* service = nil; + if (!service) { + service = [[GTLServiceShopping alloc] init]; + + // Have the service object set tickets to retry temporary error conditions + // automatically + service.retryEnabled = YES; + } + return service; +} + +- (GTLShoppingProduct *)selectedProduct { + int rowIndex = [self.productsTable selectedRow]; + if (rowIndex > -1) { + GTLShoppingProduct *item = [self.products itemAtIndex:rowIndex]; + return item; + } + return nil; +} + +#pragma mark Fetch the products list + +- (void)searchProducts { + self.products = nil; + self.productsFetchError = nil; + + NSString *queryTerm = [self.searchField stringValue]; + NSString *rankBy = [self.rankingPopup titleOfSelectedItem]; + + GTLQueryShopping *query = [GTLQueryShopping queryForProductsListWithSource:@"public"]; + query.q = queryTerm; + query.rankBy = rankBy; + query.thumbnails = @"64:*"; + query.country = @"US"; + self.productsTicket = [self.shoppingService executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) { + // Save the returned object and error + self.products = object; + self.productsFetchError = error; + self.productsTicket = nil; + + [self updateUI]; + }]; + [self updateUI]; +} + +#pragma mark Access key sheet + +// Developer API key sheet +// +// Sample apps need this sheet to ask for the developer API key +// +// Your application will just hardcode the API key string +// into the source rather than ask the user for them. +// +// The key is obtained from the API Console, +// https://code.google.com/apis/console +// + +- (IBAction)APIKeyClicked:(id)sender { + // show the sheet for developers to enter client ID and client secret + [NSApp beginSheet:self.accessKeySheet + modalForWindow:[self window] + modalDelegate:self + didEndSelector:@selector(accessKeySheetDidEnd:returnCode:contextInfo:) + contextInfo:NULL]; +} + +- (IBAction)APIKeyDoneClicked:(id)sender { + [NSApp endSheet:self.accessKeySheet returnCode:NSOKButton]; + + self.shoppingService.APIKey = [self.accessKeyField stringValue]; +} + +- (void)accessKeySheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { + [sheet orderOut:self]; + + [self updateUI]; +} + +#pragma mark Text field delegate methods + +- (void)controlTextDidChange:(NSNotification *)note { + [self updateUI]; // enabled/disable buttons +} + +#pragma mark TableView delegate and data source methods + +- (void)tableViewSelectionDidChange:(NSNotification *)notification { + [self updateUI]; +} + +// Table view data source methods +- (int)numberOfRowsInTableView:(NSTableView *)tableView { + NSArray *items = self.products.items; + return [items count]; +} + +- (id)tableView:(NSTableView *)tableView +objectValueForTableColumn:(NSTableColumn *)tableColumn + row:(int)row { + GTLShoppingProduct *item = [self.products itemAtIndex:row]; + NSString *resultStr = item.product.title; + return resultStr; +} + +@end diff --git a/GTL/Examples/ShoppingSample/buildStripHeaders b/GTL/Examples/ShoppingSample/buildStripHeaders new file mode 100755 index 0000000..0238ef2 --- /dev/null +++ b/GTL/Examples/ShoppingSample/buildStripHeaders @@ -0,0 +1,17 @@ +#!/bin/sh +# +# buildStripHeaders +# +# Remove header files from the built copy of the framework inside our +# application. + +# Strip "*.h" files +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname '*.h' -delete + +# Strip "Headers" links +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type l -delete + +# Strip "Headers" directories +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type d -prune -delete + + diff --git a/GTL/Examples/ShoppingSample/main.m b/GTL/Examples/ShoppingSample/main.m new file mode 100644 index 0000000..3e35dea --- /dev/null +++ b/GTL/Examples/ShoppingSample/main.m @@ -0,0 +1,25 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// main.m +// + +#import + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **) argv); +} diff --git a/GTL/Examples/TasksSample/.svn/all-wcprops b/GTL/Examples/TasksSample/.svn/all-wcprops new file mode 100644 index 0000000..77b4af5 --- /dev/null +++ b/GTL/Examples/TasksSample/.svn/all-wcprops @@ -0,0 +1,53 @@ +K 25 +svn:wc:ra_dav:version-url +V 44 +/svn/!svn/ver/169/trunk/Examples/TasksSample +END +main.m +K 25 +svn:wc:ra_dav:version-url +V 50 +/svn/!svn/ver/14/trunk/Examples/TasksSample/main.m +END +TasksSampleAppController.h +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/14/trunk/Examples/TasksSample/TasksSampleAppController.h +END +Info.plist +K 25 +svn:wc:ra_dav:version-url +V 54 +/svn/!svn/ver/14/trunk/Examples/TasksSample/Info.plist +END +TasksSampleAppController.m +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/14/trunk/Examples/TasksSample/TasksSampleAppController.m +END +TasksSampleWindowController.h +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/!svn/ver/22/trunk/Examples/TasksSample/TasksSampleWindowController.h +END +README.txt +K 25 +svn:wc:ra_dav:version-url +V 54 +/svn/!svn/ver/14/trunk/Examples/TasksSample/README.txt +END +buildStripHeaders +K 25 +svn:wc:ra_dav:version-url +V 61 +/svn/!svn/ver/14/trunk/Examples/TasksSample/buildStripHeaders +END +TasksSampleWindowController.m +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/169/trunk/Examples/TasksSample/TasksSampleWindowController.m +END diff --git a/GTL/Examples/TasksSample/.svn/entries b/GTL/Examples/TasksSample/.svn/entries new file mode 100644 index 0000000..e7352d6 --- /dev/null +++ b/GTL/Examples/TasksSample/.svn/entries @@ -0,0 +1,306 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/TasksSample +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-06-19T21:52:36.704909Z +169 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +main.m +file + + + + +2012-12-09T08:42:34.000000Z +af9c2e77a713a1097860676cdace71b7 +2011-06-24T20:24:16.908736Z +14 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +736 + +TasksSampleAppController.h +file + + + + +2012-12-09T08:42:34.000000Z +230e9eb41b6c01d157d3823e9f6ccef1 +2011-06-24T20:24:16.908736Z +14 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +712 + +TasksSample.xcodeproj +dir + +Info.plist +file + + + + +2012-12-09T08:42:34.000000Z +6f3df9c6f604144f55ee9865c4d60ecc +2011-06-24T20:24:16.908736Z +14 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +836 + +TasksSampleAppController.m +file + + + + +2012-12-09T08:42:34.000000Z +277b72d2876be9abb60d00e7929a557a +2011-06-24T20:24:16.908736Z +14 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1080 + +TasksSampleWindowController.h +file + + + + +2012-12-09T08:42:34.000000Z +75b32b1f7e770d1740a4b9ef70cd2dc6 +2011-08-16T23:06:51.401103Z +22 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3317 + +README.txt +file + + + + +2012-12-09T08:42:34.000000Z +0a3374a462b2cff6dcd19d0caf28958a +2011-06-24T20:24:16.908736Z +14 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +109 + +buildStripHeaders +file + + + + +2012-12-09T08:42:34.000000Z +38b5302dc0e4a662c40b288306a2f6ac +2011-06-24T20:24:16.908736Z +14 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +454 + +English.lproj +dir + +TasksSampleWindowController.m +file + + + + +2012-12-09T08:42:34.000000Z +df2a76047b63fca81943d780c25f6329 +2012-06-19T21:52:36.704909Z +169 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +45801 + diff --git a/GTL/Examples/TasksSample/.svn/prop-base/buildStripHeaders.svn-base b/GTL/Examples/TasksSample/.svn/prop-base/buildStripHeaders.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/GTL/Examples/TasksSample/.svn/prop-base/buildStripHeaders.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/GTL/Examples/TasksSample/.svn/text-base/Info.plist.svn-base b/GTL/Examples/TasksSample/.svn/text-base/Info.plist.svn-base new file mode 100644 index 0000000..0f7ed84 --- /dev/null +++ b/GTL/Examples/TasksSample/.svn/text-base/Info.plist.svn-base @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.example.TasksSample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/GTL/Examples/TasksSample/.svn/text-base/README.txt.svn-base b/GTL/Examples/TasksSample/.svn/text-base/README.txt.svn-base new file mode 100644 index 0000000..ff257a0 --- /dev/null +++ b/GTL/Examples/TasksSample/.svn/text-base/README.txt.svn-base @@ -0,0 +1 @@ +This sample should automatically build and copy over the GTL.framework as part of the build-and-run process. diff --git a/GTL/Examples/TasksSample/.svn/text-base/TasksSampleAppController.h.svn-base b/GTL/Examples/TasksSample/.svn/text-base/TasksSampleAppController.h.svn-base new file mode 100644 index 0000000..d093654 --- /dev/null +++ b/GTL/Examples/TasksSample/.svn/text-base/TasksSampleAppController.h.svn-base @@ -0,0 +1,23 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// TasksSampleAppController.h +// + +#import + +@interface TasksSampleAppController : NSObject +@end diff --git a/GTL/Examples/TasksSample/.svn/text-base/TasksSampleAppController.m.svn-base b/GTL/Examples/TasksSample/.svn/text-base/TasksSampleAppController.m.svn-base new file mode 100644 index 0000000..02bb651 --- /dev/null +++ b/GTL/Examples/TasksSample/.svn/text-base/TasksSampleAppController.m.svn-base @@ -0,0 +1,35 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// TasksSampleAppController.m +// + +#import "TasksSampleAppController.h" +#import "TasksSampleWindowController.h" + +@implementation TasksSampleAppController + +- (void)applicationWillFinishLaunching:(NSNotification *)notification { + TasksSampleWindowController* windowController + = [TasksSampleWindowController sharedWindowController]; + [windowController showWindow:self]; +} + +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { + return YES; +} + +@end diff --git a/GTL/Examples/TasksSample/.svn/text-base/TasksSampleWindowController.h.svn-base b/GTL/Examples/TasksSample/.svn/text-base/TasksSampleWindowController.h.svn-base new file mode 100644 index 0000000..343d10e --- /dev/null +++ b/GTL/Examples/TasksSample/.svn/text-base/TasksSampleWindowController.h.svn-base @@ -0,0 +1,106 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// TasksSampleWindowController.h +// + +#import + +#import "GTLTasks.h" +#import "GTL/GTMOAuth2WindowController.h" + +@interface TasksSampleWindowController : NSWindowController { + @private + IBOutlet NSTextField *signedInField_; + IBOutlet NSButton *signedInButton_; + + IBOutlet NSTableView *taskListsTable__; + IBOutlet NSProgressIndicator *taskListsProgressIndicator_; + IBOutlet NSTextView *taskListsResultTextView_; + + IBOutlet NSButton *taskListsCancelButton_; + + IBOutlet NSButton *addTaskListButton_; + IBOutlet NSButton *renameTaskListButton_; + IBOutlet NSButton *deleteTaskListButton_; + IBOutlet NSTextField *taskListNameField_; + + IBOutlet NSOutlineView *tasksOutline_; + IBOutlet NSProgressIndicator *tasksProgressIndicator_; + IBOutlet NSTextView *tasksResultTextView_; + + IBOutlet NSButton *showCompletedTasksCheckbox_; + IBOutlet NSButton *showHiddenTasksCheckbox_; + IBOutlet NSButton *showDeletedTasksCheckbox_; + IBOutlet NSButton *tasksCancelButton_; + + IBOutlet NSButton *addTaskButton_; + IBOutlet NSButton *renameTaskButton_; + IBOutlet NSButton *deleteTaskButton_; + IBOutlet NSButton *completeTaskButton_; + IBOutlet NSButton *clearTasksButton_; + IBOutlet NSButton *completeAllTasksButton_; + IBOutlet NSButton *deleteAllTasksButton_; + IBOutlet NSTextField *taskNameField_; + + IBOutlet NSButton *clientIDButton_; + IBOutlet NSTextField *clientIDRequiredTextField_; + IBOutlet NSWindow *clientIDSheet_; + IBOutlet NSTextField *clientIDField_; + IBOutlet NSTextField *clientSecretField_; + + GTLTasksTaskLists *tasksLists_; + GTLServiceTicket *taskListsTicket_; + NSError *taskListsFetchError_; + + GTLServiceTicket *editTaskListTicket_; + + GTLTasksTasks *tasks_; + GTLServiceTicket *tasksTicket_; + NSError *tasksFetchError_; + + GTLServiceTicket *editTaskTicket_; +} + ++ (TasksSampleWindowController *)sharedWindowController; + +- (IBAction)signInClicked:(id)sender; + +- (IBAction)getTaskListsClicked:(id)sender; +- (IBAction)cancelTaskListsFetch:(id)sender; +- (IBAction)cancelTasksFetch:(id)sender; + +- (IBAction)addTaskListClicked:(id)sender; +- (IBAction)renameTaskListClicked:(id)sender; +- (IBAction)deleteTaskListClicked:(id)sender; + +- (IBAction)addTaskClicked:(id)sender; +- (IBAction)renameTaskClicked:(id)sender; +- (IBAction)deleteTaskClicked:(id)sender; +- (IBAction)completeTaskClicked:(id)sender; +- (IBAction)clearTasksClicked:(id)sender; +- (IBAction)completeAllTasksClicked:(id)sender; +- (IBAction)deleteAllTasksClicked:(id)sender; +- (IBAction)showTasksCheckboxClicked:(id)sender; + +- (IBAction)APIConsoleClicked:(id)sender; +- (IBAction)loggingCheckboxClicked:(id)sender; + +// Client ID sheet +- (IBAction)clientIDClicked:(id)sender; +- (IBAction)clientIDDoneClicked:(id)sender; + +@end diff --git a/GTL/Examples/TasksSample/.svn/text-base/TasksSampleWindowController.m.svn-base b/GTL/Examples/TasksSample/.svn/text-base/TasksSampleWindowController.m.svn-base new file mode 100644 index 0000000..8c9d5c2 --- /dev/null +++ b/GTL/Examples/TasksSample/.svn/text-base/TasksSampleWindowController.m.svn-base @@ -0,0 +1,1245 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// TasksSampleWindowController.m +// + +#import "TasksSampleWindowController.h" + +#import "GTL/GTLUtilities.h" +#import "GTL/GTMHTTPFetcherLogging.h" + +@interface TasksSampleWindowController () + +@property (readonly) GTLServiceTasks *tasksService; + +@property (retain) GTLTasksTaskLists *taskLists; +@property (retain) GTLServiceTicket *taskListsTicket; +@property (retain) NSError *taskListsFetchError; + +@property (retain) GTLServiceTicket *editTaskListTicket; + +@property (retain) GTLTasksTasks *tasks; +@property (retain) GTLServiceTicket *tasksTicket; +@property (retain) NSError *tasksFetchError; + +@property (retain) GTLServiceTicket *editTaskTicket; + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel; + +- (void)updateUI; +- (void)displayAlert:(NSString *)title format:(NSString *)format, ...; + +- (void)fetchTaskLists; +- (void)fetchTasksForSelectedList; + +- (void)addATaskList; +- (void)renameSelectedTaskList; +- (void)deleteSelectedTaskList; + +- (void)addATask; +- (void)renameSelectedTask; +- (void)deleteSelectedTask; +- (void)completeSelectedTask; +- (void)hideCompletedTasks; +- (void)completeAllTasks; +- (void)deleteAllTasks; + +- (GTLTasksTaskList *)selectedTaskList; +- (GTLTasksTask *)selectedTask; + +@end + +// Constants that ought to be defined by the API +NSString *const kTaskStatusCompleted = @"completed"; +NSString *const kTaskStatusNeedsAction = @"needsAction"; + +// Keychain item name for saving the user's authentication information +NSString *const kKeychainItemName = @"TasksSample: Google Tasks"; + +@implementation TasksSampleWindowController + +@synthesize taskLists = tasksLists_, + taskListsTicket = taskListsTicket_, + taskListsFetchError = taskListsFetchError_, + editTaskListTicket = editTaskListTicket_, + tasks = tasks_, + tasksTicket = tasksTicket_, + tasksFetchError = tasksFetchError_, + editTaskTicket = editTaskTicket_; + ++ (TasksSampleWindowController *)sharedWindowController { + static TasksSampleWindowController* gWindowController = nil; + if (!gWindowController) { + gWindowController = [[TasksSampleWindowController alloc] init]; + } + return gWindowController; +} + +- (id)init { + return [self initWithWindowNibName:@"TasksSampleWindow"]; +} + +- (void)awakeFromNib { + // Load the OAuth token from the keychain, if it was previously saved + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + GTMOAuth2Authentication *auth; + auth = [GTMOAuth2WindowController authForGoogleFromKeychainForName:kKeychainItemName + clientID:clientID + clientSecret:clientSecret]; + self.tasksService.authorizer = auth; + + // Set the result text fields to have a distinctive color and mono-spaced font + [taskListsResultTextView_ setTextColor:[NSColor darkGrayColor]]; + [tasksResultTextView_ setTextColor:[NSColor darkGrayColor]]; + + NSFont *resultTextFont = [NSFont fontWithName:@"Monaco" size:9]; + [taskListsResultTextView_ setFont:resultTextFont]; + [tasksResultTextView_ setFont:resultTextFont]; + + [tasksOutline_ registerForDraggedTypes:[NSArray arrayWithObject:NSPasteboardTypeString]]; + [self updateUI]; +} + +- (void)dealloc { + [tasksLists_ release]; + [taskListsTicket_ release]; + [taskListsFetchError_ release]; + + [editTaskListTicket_ release]; + + [tasks_ release]; + [tasksTicket_ release]; + [tasksFetchError_ release]; + + [editTaskTicket_ release]; + + [super dealloc]; +} + +#pragma mark - + +- (NSString *)signedInUsername { + // Get the email address of the signed-in user + GTMOAuth2Authentication *auth = self.tasksService.authorizer; + BOOL isSignedIn = auth.canAuthorize; + if (isSignedIn) { + return auth.userEmail; + } else { + return nil; + } +} + +- (BOOL)isSignedIn { + NSString *name = [self signedInUsername]; + return (name != nil); +} + +#pragma mark IBActions + +- (IBAction)signInClicked:(id)sender { + if (![self isSignedIn]) { + // Sign in + [self runSigninThenInvokeSelector:@selector(updateUI)]; + } else { + // Sign out + GTLServiceTasks *service = self.tasksService; + + [GTMOAuth2WindowController removeAuthFromKeychainForName:kKeychainItemName]; + service.authorizer = nil; + [self updateUI]; + } +} + +- (IBAction)getTaskListsClicked:(id)sender { + if (![self isSignedIn]) { + [self runSigninThenInvokeSelector:@selector(fetchTaskLists)]; + } else { + [self fetchTaskLists]; + } +} + +- (IBAction)cancelTaskListsFetch:(id)sender { + [self.taskListsTicket cancelTicket]; + self.taskListsTicket = nil; + + [self.editTaskListTicket cancelTicket]; + self.editTaskListTicket = nil; + + [self updateUI]; +} + +- (IBAction)cancelTasksFetch:(id)sender { + [self.tasksTicket cancelTicket]; + self.tasksTicket = nil; + + [self.editTaskTicket cancelTicket]; + self.editTaskTicket = nil; + + [self updateUI]; +} + +- (IBAction)addTaskListClicked:(id)sender { + [self addATaskList]; +} + +- (IBAction)renameTaskListClicked:(id)sender { + [self renameSelectedTaskList]; +} + +- (IBAction)deleteTaskListClicked:(id)sender { + GTLTasksTaskList *tasklist = [self selectedTaskList]; + NSString *title = tasklist.title; + + NSBeginAlertSheet(@"Delete", nil, @"Cancel", nil, + [self window], self, + @selector(deleteTaskListSheetDidEnd:returnCode:contextInfo:), + nil, nil, @"Delete \"%@\"?", title); +} + +- (void)deleteTaskListSheetDidEnd:(NSWindow *)sheet + returnCode:(int)returnCode + contextInfo:(void *)contextInfo { + if (returnCode == NSAlertDefaultReturn) { + [self deleteSelectedTaskList]; + } +} + +- (IBAction)addTaskClicked:(id)sender { + [self addATask]; +} + +- (IBAction)renameTaskClicked:(id)sender { + [self renameSelectedTask]; +} + +- (IBAction)deleteTaskClicked:(id)sender { + GTLTasksTask *task = [self selectedTask]; + NSString *title = task.title; + + NSBeginAlertSheet(@"Delete", nil, @"Cancel", nil, + [self window], self, + @selector(deleteTaskSheetDidEnd:returnCode:contextInfo:), + nil, nil, @"Delete \"%@\"?", title); +} + +- (void)deleteTaskSheetDidEnd:(NSWindow *)sheet + returnCode:(int)returnCode + contextInfo:(void *)contextInfo { + if (returnCode == NSAlertDefaultReturn) { + [self deleteSelectedTask]; + } +} + +- (IBAction)completeTaskClicked:(id)sender { + [self completeSelectedTask]; +} + +- (IBAction)clearTasksClicked:(id)sender { + [self hideCompletedTasks]; +} + +- (IBAction)completeAllTasksClicked:(id)sender { + [self completeAllTasks]; +} + +- (IBAction)deleteAllTasksClicked:(id)sender { + [self deleteAllTasks]; +} + +- (IBAction)showTasksCheckboxClicked:(id)sender { + [self fetchTasksForSelectedList]; +} + +- (IBAction)APIConsoleClicked:(id)sender { + NSURL *url = [NSURL URLWithString:@"https://code.google.com/apis/console"]; + [[NSWorkspace sharedWorkspace] openURL:url]; +} + +- (IBAction)loggingCheckboxClicked:(id)sender { + [GTMHTTPFetcher setLoggingEnabled:[sender state]]; +} + +#pragma mark - + +// get a service object with the current username/password +// +// A "service" object handles networking tasks. Service objects +// contain user authentication information as well as networking +// state information (such as cookies and the "last modified" date for +// fetched data.) + +- (GTLServiceTasks *)tasksService { + static GTLServiceTasks *service = nil; + + if (!service) { + service = [[GTLServiceTasks alloc] init]; + + // Have the service object set tickets to fetch consecutive pages + // of the feed so we do not need to manually fetch them + service.shouldFetchNextPages = YES; + + // Have the service object set tickets to retry temporary error conditions + // automatically + service.retryEnabled = YES; + } + return service; +} + +- (GTLTasksTaskList *)selectedTaskList { + int rowIndex = [taskListsTable__ selectedRow]; + if (rowIndex > -1) { + GTLTasksTaskList *item = [self.taskLists itemAtIndex:rowIndex]; + return item; + } + return nil; +} + +- (GTLTasksTask *)selectedTask { + int rowIndex = [tasksOutline_ selectedRow]; + GTLTasksTask *item = [tasksOutline_ itemAtRow:rowIndex]; + return item; +} + +- (NSArray *)completedTasks { + NSArray *array = [GTLUtilities objectsFromArray:self.tasks.items + withValue:kTaskStatusCompleted + forKeyPath:@"status"]; + return array; +} + +#pragma mark Create ID Map and Ordered Child Arrays + +// For the efficient access to tasks in the tasks object, we'll +// build a map from task identifier to each task item, and arrays +// for the children of the top-level object and for the children +// of every parent task + +static NSString *const kGTLTaskMapProperty = @"taskMap"; +static NSString *const kGTLChildTasksProperty = @"childTasks"; + +- (void)createPropertiesForTasks:(GTLTasksTasks *)tasks { + // First, build a dictionary, mapping item identifier strings to items objects + // + // This will allow for much faster lookup than would linear search of + // task list's items + NSMutableDictionary *taskMap = [NSMutableDictionary dictionary]; + for (GTLTasksTask *task in tasks) { + [taskMap setObject:task + forKey:task.identifier]; + } + [tasks setProperty:taskMap + forKey:kGTLTaskMapProperty]; + + // Make an array for each parent with pointers to its immediate children, in + // the order the children occur in the list. We'll store the array in a + // property of the parent task item. + // + // For top-level tasks, we'll store the array in a property of the list + // object. + NSMutableArray *topTasks = [NSMutableArray array]; + [tasks setProperty:topTasks + forKey:kGTLChildTasksProperty]; + + for (GTLTasksTask *task in tasks) { + NSString *parentID = task.parent; + if (parentID == nil) { + // this is a top-level task in the list, so the task's parent is the + // main list + [topTasks addObject:task]; + } else { + // this task is child of another task; add it to the parent's list + GTLTasksTask *parentTask = [taskMap objectForKey:parentID]; + NSMutableArray *childTasks = [parentTask propertyForKey:kGTLChildTasksProperty]; + if (childTasks == nil) { + childTasks = [NSMutableArray array]; + [parentTask setProperty:childTasks + forKey:kGTLChildTasksProperty]; + } + [childTasks addObject:task]; + } + } +} + +- (GTLTasksTask *)taskWithIdentifier:(NSString *)taskID + fromTasks:(GTLTasksTasks *)tasks { + NSDictionary *taskMap = [tasks propertyForKey:kGTLTaskMapProperty]; + GTLTasksTask *task = [taskMap valueForKey:taskID]; + return task; +} + +- (NSArray *)taskChildrenForObject:(GTLObject *)obj { + // Object is either a GTLTasksTasks (the top-level tasks list) + // or a GTLTasksTask (a task which may be a parent of other tasks) + NSArray *array = [obj propertyForKey:kGTLChildTasksProperty]; + return array; +} + +#pragma mark Fetch Task Lists + +- (void)fetchTaskLists { + self.taskLists = nil; + self.taskListsFetchError = nil; + + GTLServiceTasks *service = self.tasksService; + + GTLQueryTasks *query = [GTLQueryTasks queryForTasklistsList]; + + self.taskListsTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id taskLists, NSError *error) { + // callback + self.taskLists = taskLists; + self.taskListsFetchError = error; + self.taskListsTicket = nil; + + [self updateUI]; + }]; + [self updateUI]; +} + +#pragma mark Fetch Tasks + +- (void)fetchTasksForSelectedList { + self.tasks = nil; + self.tasksFetchError = nil; + + GTLServiceTasks *service = self.tasksService; + + GTLTasksTaskList *selectedTasklist = [self selectedTaskList]; + if (selectedTasklist) { + NSString *tasklistID = selectedTasklist.identifier; + + GTLQueryTasks *query = [GTLQueryTasks queryForTasksListWithTasklist:tasklistID]; + query.showCompleted = [showCompletedTasksCheckbox_ state]; + query.showHidden = [showHiddenTasksCheckbox_ state]; + query.showDeleted = [showDeletedTasksCheckbox_ state]; + + self.tasksTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id tasks, NSError *error) { + // callback + [self createPropertiesForTasks:tasks]; + + self.tasks = tasks; + self.tasksFetchError = error; + self.tasksTicket = nil; + + [self updateUI]; + }]; + [self updateUI]; + } +} + +#pragma mark Add a Task List + +- (void)addATaskList { + NSString *title = [taskListNameField_ stringValue]; + if ([title length] > 0) { + // Make a new task list + GTLTasksTaskList *tasklist = [GTLTasksTaskList object]; + tasklist.title = title; + + GTLQueryTasks *query = [GTLQueryTasks queryForTasklistsInsertWithObject:tasklist]; + + GTLServiceTasks *service = self.tasksService; + self.editTaskListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id item, NSError *error) { + // callback + self.editTaskListTicket = nil; + GTLTasksTaskList *tasklist = item; + + if (error == nil) { + [self displayAlert:@"Task List Added" + format:@"Added task list \"%@\"", tasklist.title]; + [self fetchTaskLists]; + [taskListNameField_ setStringValue:@""]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; + } +} + +#pragma mark Rename a Task List + +- (void)renameSelectedTaskList { + NSString *title = [taskListNameField_ stringValue]; + if ([title length] > 0) { + // Rename the selected task list + + // Rather than update the object with a complete replacement, we'll make + // a patch object containing just the changed title + GTLTasksTaskList *patchObject = [GTLTasksTaskList object]; + patchObject.title = title; + + GTLTasksTaskList *selectedTaskList = [self selectedTaskList]; + + GTLQueryTasks *query = [GTLQueryTasks queryForTasklistsPatchWithObject:patchObject + tasklist:selectedTaskList.identifier]; + GTLServiceTasks *service = self.tasksService; + self.editTaskListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id item, NSError *error) { + // callback + self.editTaskListTicket = nil; + GTLTasksTaskList *tasklist = item; + + if (error == nil) { + [self displayAlert:@"Task List Updated" + format:@"Updated task list \"%@\"", tasklist.title]; + [self fetchTaskLists]; + [taskListNameField_ setStringValue:@""]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; + } +} + +#pragma mark Delete a Task List + +- (void)deleteSelectedTaskList { + GTLTasksTaskList *tasklist = [self selectedTaskList]; + + GTLQueryTasks *query = [GTLQueryTasks queryForTasklistsDeleteWithTasklist:tasklist.identifier]; + + GTLServiceTasks *service = self.tasksService; + self.editTaskListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id item, NSError *error) { + // callback + self.editTaskListTicket = nil; + + if (error == nil) { + [self displayAlert:@"Task List Deleted" + format:@"Deleted task list \"%@\"", tasklist.title]; + [self fetchTaskLists]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; +} + +#pragma mark Add a Task + +- (void)addATask { + NSString *title = [taskNameField_ stringValue]; + if ([title length] > 0) { + // Make a new task + GTLTasksTask *task = [GTLTasksTask object]; + task.title = title; + + GTLTasksTaskList *tasklist = [self selectedTaskList]; + GTLQueryTasks *query = [GTLQueryTasks queryForTasksInsertWithObject:task + tasklist:tasklist.identifier]; + GTLServiceTasks *service = self.tasksService; + self.editTaskTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id item, NSError *error) { + // callback + self.editTaskTicket = nil; + GTLTasksTask *task = item; + + if (error == nil) { + [self displayAlert:@"Task Added" + format:@"Added task \"%@\"", task.title]; + [self fetchTasksForSelectedList]; + [taskNameField_ setStringValue:@""]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; + } +} + +#pragma mark Rename a Task + +- (void)renameSelectedTask { + NSString *title = [taskNameField_ stringValue]; + if ([title length] > 0) { + // Rename the selected task + + // Rather than update the object with a complete replacement, we'll make + // a patch object containing just the changes + GTLTasksTask *patchObject = [GTLTasksTask object]; + patchObject.title = title; + + GTLTasksTask *task = [self selectedTask]; + GTLTasksTaskList *tasklist = [self selectedTaskList]; + GTLQueryTasks *query = [GTLQueryTasks queryForTasksPatchWithObject:patchObject + tasklist:tasklist.identifier + task:task.identifier]; + GTLServiceTasks *service = self.tasksService; + self.editTaskTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id item, NSError *error) { + // callback + self.editTaskTicket = nil; + GTLTasksTask *task = item; + + if (error == nil) { + [self displayAlert:@"Task Updated" + format:@"Renamed task to \"%@\"", task.title]; + [self fetchTasksForSelectedList]; + [taskNameField_ setStringValue:@""]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; + } +} + +#pragma mark Delete a Task + +- (void)deleteSelectedTask { + // Delete a task + GTLTasksTask *task = [self selectedTask]; + NSString *taskTitle = task.title; + + GTLTasksTaskList *tasklist = [self selectedTaskList]; + GTLQueryTasks *query = [GTLQueryTasks queryForTasksDeleteWithTasklist:tasklist.identifier + task:task.identifier]; + GTLServiceTasks *service = self.tasksService; + self.editTaskTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id item, NSError *error) { + // callback + self.editTaskTicket = nil; + + if (error == nil) { + [self displayAlert:@"Task Deleted" + format:@"Deleted task \"%@\"", taskTitle]; + [self fetchTasksForSelectedList]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; +} + +#pragma mark Change a Task's Complete Status + +- (void)completeSelectedTask { + // Mark a task as completed or incomplete + GTLTasksTask *selectedTask = [self selectedTask]; + GTLTasksTask *patchObject = [GTLTasksTask object]; + + if ([selectedTask.status isEqual:kTaskStatusCompleted]) { + // Change the status to not complete + patchObject.status = kTaskStatusNeedsAction; + patchObject.completed = [GTLObject nullValue]; // remove the completed date + } else { + // Change the status to complete + patchObject.status = kTaskStatusCompleted; + } + + GTLTasksTaskList *tasklist = [self selectedTaskList]; + GTLQueryTasks *query = [GTLQueryTasks queryForTasksPatchWithObject:patchObject + tasklist:tasklist.identifier + task:selectedTask.identifier]; + GTLServiceTasks *service = self.tasksService; + self.editTaskTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id item, NSError *error) { + // callback + self.editTaskTicket = nil; + GTLTasksTask *task = item; + + if (error == nil) { + NSString *displayStatus; + if ([task.status isEqual:kTaskStatusCompleted]) { + displayStatus = @"complete"; + } else { + displayStatus = @"incomplete"; + } + + [self displayAlert:@"Task Updated" + format:@"Marked task \"%@\" %@", task.title, displayStatus]; + [self fetchTasksForSelectedList]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; +} + +#pragma mark Hide Completed Tasks + +- (void)hideCompletedTasks { + // Make all completed tasks hidden + NSArray *previouslyCompletedTasks = [self completedTasks]; + GTLTasksTaskList *tasklist = [self selectedTaskList]; + GTLQueryTasks *query = [GTLQueryTasks queryForTasksClearWithTasklist:tasklist.identifier]; + + GTLServiceTasks *service = self.tasksService; + self.editTaskTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id item, NSError *error) { + // callback + self.editTaskTicket = nil; + + if (error == nil) { + [self displayAlert:@"Task List Clear" + format:@"Made %lu tasks hidden", (unsigned long) [previouslyCompletedTasks count]]; + [self fetchTasksForSelectedList]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; +} + +#pragma mark Complete All Tasks + +- (void)completeAllTasks { + // Change all tasks to be completed or uncompleted + NSArray *completedTasks = [self completedTasks]; + NSUInteger numberOfCompletedTasks = [completedTasks count]; + NSUInteger numberOfTasks = [self.tasks.items count]; + BOOL wereAllTasksCompleted = (numberOfCompletedTasks == numberOfTasks); + + // Make a batch of queries to set all tasks to completed or uncompleted + GTLTasksTaskList *tasklist = [self selectedTaskList]; + + GTLBatchQuery *batchQuery = [GTLBatchQuery batchQuery]; + + for (GTLTasksTask *task in self.tasks) { + GTLTasksTask *patchObject = [GTLTasksTask object]; + + if (wereAllTasksCompleted) { + // Change the status to not complete + patchObject.status = kTaskStatusNeedsAction; + patchObject.completed = [GTLObject nullValue]; // remove the completed date + } else { + // Change the status to complete + patchObject.status = kTaskStatusCompleted; + } + + GTLQueryTasks *query = [GTLQueryTasks queryForTasksPatchWithObject:patchObject + tasklist:tasklist.identifier + task:task.identifier]; + [batchQuery addQuery:query]; + } + + GTLServiceTasks *service = self.tasksService; + self.editTaskTicket = [service executeQuery:batchQuery + completionHandler:^(GTLServiceTicket *ticket, + id object, NSError *error) { + // callback + self.editTaskTicket = nil; + + if (error == nil) { + GTLBatchResult *batchResults = (GTLBatchResult *)object; + NSString *status = wereAllTasksCompleted ? @"Uncompleted" : @"Completed"; + + NSDictionary *successes = batchResults.successes; + NSDictionary *failures = batchResults.failures; + + NSUInteger numberUpdated = [successes count]; + NSUInteger numberFailed = [failures count]; + + NSArray *successTasks = [successes allValues]; + NSArray *titles = [successTasks valueForKey:@"title"]; + NSString *titlesStr = [titles componentsJoinedByString:@", "]; + + [self displayAlert:@"Tasks Updated" + format:@"%@: %lu\n%@\nErrors: %lu\n%@", + status, + (unsigned long) numberUpdated, titlesStr, + (unsigned long) numberFailed, failures]; + + [self fetchTasksForSelectedList]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; +} + +#pragma mark Delete All Tasks + +- (void)deleteAllTasks { + // Make a batch of queries to delete all tasks + GTLTasksTaskList *tasklist = [self selectedTaskList]; + + GTLBatchQuery *batch = [GTLBatchQuery batchQuery]; + + for (GTLTasksTask *task in self.tasks) { + GTLQueryTasks *query = [GTLQueryTasks queryForTasksDeleteWithTasklist:tasklist.identifier + task:task.identifier]; + [batch addQuery:query]; + } + + GTLServiceTasks *service = self.tasksService; + self.editTaskTicket = [service executeQuery:batch + completionHandler:^(GTLServiceTicket *ticket, + id object, NSError *error) { + // callback + self.editTaskTicket = nil; + + if (error == nil) { + GTLBatchResult *batch = (GTLBatchResult *)object; + + NSUInteger numberDeleted = [batch.successes count]; + + [self displayAlert:@"Tasks Deleted" + format:@"Deleted: %lu\nErrors: %@", + (unsigned long) numberDeleted, + batch.failures]; + + [self fetchTasksForSelectedList]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; +} + +#pragma mark Move Task + +- (void)moveTaskWithIdentifier:(NSString *)taskID + toParentID:(NSString *)destinationParentIDorNil + index:(NSInteger)destinationIndex { + // Make all completed tasks hidden + GTLTasksTaskList *tasklist = [self selectedTaskList]; + GTLQueryTasks *query = [GTLQueryTasks queryForTasksMoveWithTasklist:tasklist.identifier + task:taskID]; + query.parent = destinationParentIDorNil; + + // Determine the ID of the task preceding the new location + if (destinationIndex > 0) { + GTLObject *parentTask; + if (destinationParentIDorNil) { + parentTask = [self taskWithIdentifier:destinationParentIDorNil + fromTasks:self.tasks]; + } else { + // There is no parent; it's a top-level task + parentTask = self.tasks; + } + NSArray *children = [self taskChildrenForObject:parentTask]; + + GTLTasksTask *previousTask = [children objectAtIndex:(destinationIndex - 1)]; + query.previous = previousTask.identifier; + } + + GTLServiceTasks *service = self.tasksService; + self.editTaskTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id item, NSError *error) { + // callback + self.editTaskTicket = nil; + + if (error == nil) { + [self fetchTasksForSelectedList]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; +} + +#pragma mark Sign In + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel { + // Applications should have client ID and client secret strings + // hardcoded into the source, but the sample application asks the + // developer for the strings + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + if ([clientID length] == 0 || [clientSecret length] == 0) { + // Remind the developer that client ID and client secret are needed + [clientIDButton_ performSelector:@selector(performClick:) + withObject:self + afterDelay:0.5]; + return; + } + + // Show the OAuth 2 sign-in controller + NSBundle *frameworkBundle = [NSBundle bundleForClass:[GTMOAuth2WindowController class]]; + GTMOAuth2WindowController *windowController; + windowController = [GTMOAuth2WindowController controllerWithScope:kGTLAuthScopeTasks + clientID:clientID + clientSecret:clientSecret + keychainItemName:kKeychainItemName + resourceBundle:frameworkBundle]; + + [windowController signInSheetModalForWindow:[self window] + completionHandler:^(GTMOAuth2Authentication *auth, + NSError *error) { + // callback + if (error == nil) { + self.tasksService.authorizer = auth; + if (signInDoneSel) { + [self performSelector:signInDoneSel]; + } + } else { + self.taskListsFetchError = error; + [self updateUI]; + } + }]; +} + +#pragma mark UI + +- (void)updateUI { + BOOL isSignedIn = [self isSignedIn]; + NSString *username = [self signedInUsername]; + [signedInButton_ setTitle:(isSignedIn ? @"Sign Out" : @"Sign In")]; + [signedInField_ setStringValue:(isSignedIn ? username : @"No")]; + + // + // Task lists table + // + [taskListsTable__ reloadData]; + + if (self.taskListsTicket != nil || self.editTaskListTicket != nil) { + [taskListsProgressIndicator_ startAnimation:self]; + } else { + [taskListsProgressIndicator_ stopAnimation:self]; + } + + // Get the description of the selected item, or the feed fetch error + NSString *resultStr = @""; + + if (self.taskListsFetchError) { + // Display the error + resultStr = [self.taskListsFetchError description]; + + // Also display any server data present + NSData *errData = [[self.taskListsFetchError userInfo] objectForKey:kGTMHTTPFetcherStatusDataKey]; + if (errData) { + NSString *dataStr = [[[NSString alloc] initWithData:errData + encoding:NSUTF8StringEncoding] autorelease]; + resultStr = [resultStr stringByAppendingFormat:@"\n%@", dataStr]; + } + } else { + // Display the selected item + GTLTasksTaskList *item = [self selectedTaskList]; + if (item) { + resultStr = [item description]; + } + } + [taskListsResultTextView_ setString:resultStr]; + + // + // Tasks outline + // + [tasksOutline_ reloadData]; + + if (self.tasksTicket != nil) { + [tasksProgressIndicator_ startAnimation:self]; + } else { + [tasksProgressIndicator_ stopAnimation:self]; + } + + // Get the description of the selected item, or the feed fetch error + resultStr = @""; + if (self.tasksFetchError) { + resultStr = [self.tasksFetchError description]; + } else { + GTLTasksTask *item = [self selectedTask]; + if (item) { + resultStr = [item description]; + } + } + [tasksResultTextView_ setString:resultStr]; + + // Enable task lists buttons + BOOL hasTaskLists = (self.taskLists != nil); + BOOL isTaskListSelected = ([self selectedTaskList] != nil); + BOOL hasTaskListTitle = ([[taskListNameField_ stringValue] length] > 0); + + [addTaskListButton_ setEnabled:(hasTaskListTitle && hasTaskLists)]; + [renameTaskListButton_ setEnabled:(hasTaskListTitle && isTaskListSelected)]; + [deleteTaskListButton_ setEnabled:(isTaskListSelected)]; + + BOOL isFetchingTaskLists = (self.taskListsTicket != nil); + BOOL isEditingTaskList = (self.editTaskListTicket != nil); + [taskListsCancelButton_ setEnabled:(isFetchingTaskLists || isEditingTaskList)]; + + // Enable tasks buttons + GTLTasksTask *selectedTask = [self selectedTask]; + BOOL hasTasks = (self.tasks != nil); + BOOL isTaskSelected = (selectedTask != nil); + BOOL hasTaskTitle = ([[taskNameField_ stringValue] length] > 0); + + [addTaskButton_ setEnabled:(hasTaskTitle && hasTasks)]; + [renameTaskButton_ setEnabled:(hasTaskTitle && isTaskSelected)]; + [deleteTaskButton_ setEnabled:(isTaskSelected)]; + + BOOL isCompleted = [selectedTask.status isEqual:kTaskStatusCompleted]; + [completeTaskButton_ setEnabled:isTaskSelected]; + [completeTaskButton_ setTitle:(isCompleted ? @"Uncomplete" : @"Complete")]; + + NSArray *completedTasks = [self completedTasks]; + NSUInteger numberOfCompletedTasks = [completedTasks count]; + [clearTasksButton_ setEnabled:(numberOfCompletedTasks > 0)]; + + NSUInteger numberOfTasks = [self.tasks.items count]; + [deleteAllTasksButton_ setEnabled:(numberOfTasks > 0)]; + + BOOL areAllTasksCompleted = (numberOfCompletedTasks == numberOfTasks); + [completeAllTasksButton_ setEnabled:(numberOfTasks > 0)]; + [completeAllTasksButton_ setTitle:(areAllTasksCompleted ? + @"Uncomplete All" : @"Complete All")]; + + BOOL isFetchingTasks = (self.tasksTicket != nil); + BOOL isEditingTask = (self.editTaskTicket != nil); + [tasksCancelButton_ setEnabled:(isFetchingTasks || isEditingTask)]; + + // Show or hide the text indicating that the client ID or client secret are + // needed + BOOL hasClientIDStrings = [[clientIDField_ stringValue] length] > 0 + && [[clientSecretField_ stringValue] length] > 0; + [clientIDRequiredTextField_ setHidden:hasClientIDStrings]; +} + +- (void)displayAlert:(NSString *)title format:(NSString *)format, ... { + NSString *result = format; + if (format) { + va_list argList; + va_start(argList, format); + result = [[[NSString alloc] initWithFormat:format + arguments:argList] autorelease]; + va_end(argList); + } + NSBeginAlertSheet(title, nil, nil, nil, [self window], nil, nil, + nil, nil, @"%@", result); +} + +#pragma mark Client ID Sheet + +// Client ID and Client Secret Sheet +// +// Sample apps need this sheet to ask for the client ID and client secret +// strings +// +// Your application will just hardcode the client ID and client secret strings +// into the source rather than ask the user for them. +// +// The string values are obtained from the API Console, +// https://code.google.com/apis/console + +- (IBAction)clientIDClicked:(id)sender { + // Show the sheet for developers to enter their client ID and client secret + [NSApp beginSheet:clientIDSheet_ + modalForWindow:[self window] + modalDelegate:self + didEndSelector:@selector(clientIDSheetDidEnd:returnCode:contextInfo:) + contextInfo:NULL]; +} + +- (IBAction)clientIDDoneClicked:(id)sender { + [NSApp endSheet:clientIDSheet_ returnCode:NSOKButton]; +} + +- (void)clientIDSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { + [sheet orderOut:self]; + [self updateUI]; +} + +#pragma mark Text field delegate methods + +- (void)controlTextDidChange:(NSNotification *)note { + [self updateUI]; // enable and disable buttons +} + +#pragma mark TableView delegate and data source methods + +- (void)tableViewSelectionDidChange:(NSNotification *)notification { + // The task list selection changed + [self fetchTasksForSelectedList]; +} + +// Table view data source methods +- (int)numberOfRowsInTableView:(NSTableView *)tableView { + return [self.taskLists.items count]; +} + +- (id)tableView:(NSTableView *)tableView +objectValueForTableColumn:(NSTableColumn *)tableColumn + row:(int)row { + GTLTasksTaskList *item = [self.taskLists itemAtIndex:row]; + NSString *title = item.title; + return title; +} + +#pragma mark OutlineView delegate and data source methods + +- (NSArray *)childTasksOfItem:(GTLTasksTask *)item { + // This is a utility routine for getting the children of a task + // list or of a task + // + // We added child task arrays by calling -createPropertiesForTasks + // above after fetching the tasks + NSArray *children; + if (item == nil) { + // item is the top level + children = [self taskChildrenForObject:self.tasks]; + } else { + // item is a task entry + children = [self taskChildrenForObject:item]; + } + return children; +} + +- (id)outlineView:(NSOutlineView *)outlineView child:(NSInteger)index ofItem:(id)item { + NSArray *childTasks = [self childTasksOfItem:item]; + GTLTasksTask *task = [childTasks objectAtIndex:index]; + return task; +} + +- (BOOL)outlineView:(NSOutlineView *)outlineView isItemExpandable:(id)item { + NSArray *childTasks = [self childTasksOfItem:item]; + NSUInteger numberOfChildren = [childTasks count]; + return (numberOfChildren > 0); +} + +- (NSInteger)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id)item { + NSArray *childTasks = [self childTasksOfItem:item]; + NSUInteger numberOfChildren = [childTasks count]; + return numberOfChildren; +} + +- (id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item { + GTLTasksTask *task = (GTLTasksTask *)item; + NSString *str = task.title; + + if ([str length] == 0) { + // If the task has no title, make one from its identifier + str = [NSString stringWithFormat:@"", task.identifier]; + } + + if ([task.notes length] > 0) { + // append a pencil to indicate this task has notes + str = [str stringByAppendingFormat:@" %C", 0x270E]; + } + + if ([task.status isEqual:kTaskStatusCompleted]) { + // append a checkmark to indicate this task has been completed + str = [str stringByAppendingFormat:@" %C", 0x2713]; + } + + if ([task.hidden boolValue]) { + // append a moon to indicate this task is hidden + str = [str stringByAppendingFormat:@" %C", 0x263E]; + } + + if ([task.deleted boolValue]) { + // prepend an X mark if this is a deleted task + str = [NSString stringWithFormat:@"%C %@", 0x2717, str]; + } + return str; +} + +- (void)outlineViewSelectionDidChange:(NSNotification *)notification { + // We want to update the UI when the selection changes, but we need to avoid + // doing so immediately as a result of selection changes from reloading the + // data when updating the UI, since that would cause recursive calls to + // reloadData + [self performSelector:@selector(updateUI) + withObject:nil + afterDelay:0.01]; +} + +// OutlineView Dragging Support + +- (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)flag { + return NSDragOperationMove; +} + +- (BOOL)outlineView:(NSOutlineView *)outlineView + writeItems:(NSArray *)items + toPasteboard:(NSPasteboard *)pasteboard { + // Only one task can be selected, so one task will be in the items; + // we'll put its identifier into an array for the pasteboard + NSArray *identifiers = [items valueForKey:@"identifier"]; + + [pasteboard clearContents]; + [pasteboard writeObjects:identifiers]; + return YES; +} + +- (NSDragOperation)outlineView:(NSOutlineView *)outlineView + validateDrop:(id )info + proposedItem:(id)item + proposedChildIndex:(NSInteger)index { + // Verify that the item being dragged is a task ID + NSPasteboard *pb = [info draggingPasteboard]; + NSArray *classes = [NSArray arrayWithObject:[NSString class]]; + NSArray *taskIDs = [pb readObjectsForClasses:classes + options:nil]; + if ([taskIDs count] == 1) { + NSString *taskID = [taskIDs lastObject]; + GTLTasksTask *task = [self taskWithIdentifier:taskID + fromTasks:self.tasks]; + if (task != nil) { + // There is a task object for this ID + return NSDragOperationMove; + } + } + return NSDragOperationNone; +} + +- (BOOL)outlineView:(NSOutlineView *)outlineView + acceptDrop:(id )info + item:(id)item + childIndex:(NSInteger)index { + // A task was dropped at a new location + NSPasteboard *pb = [info draggingPasteboard]; + NSArray *classes = [NSArray arrayWithObject:[NSString class]]; + NSArray *taskIDs = [pb readObjectsForClasses:classes + options:nil]; + + [self moveTaskWithIdentifier:[taskIDs objectAtIndex:0] + toParentID:[item identifier] + index:index]; + return YES; +} + +@end diff --git a/GTL/Examples/TasksSample/.svn/text-base/buildStripHeaders.svn-base b/GTL/Examples/TasksSample/.svn/text-base/buildStripHeaders.svn-base new file mode 100644 index 0000000..0238ef2 --- /dev/null +++ b/GTL/Examples/TasksSample/.svn/text-base/buildStripHeaders.svn-base @@ -0,0 +1,17 @@ +#!/bin/sh +# +# buildStripHeaders +# +# Remove header files from the built copy of the framework inside our +# application. + +# Strip "*.h" files +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname '*.h' -delete + +# Strip "Headers" links +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type l -delete + +# Strip "Headers" directories +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type d -prune -delete + + diff --git a/GTL/Examples/TasksSample/.svn/text-base/main.m.svn-base b/GTL/Examples/TasksSample/.svn/text-base/main.m.svn-base new file mode 100644 index 0000000..a1649ce --- /dev/null +++ b/GTL/Examples/TasksSample/.svn/text-base/main.m.svn-base @@ -0,0 +1,24 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// main.m +// + +#import + +int main(int argc, char *argv[]) { + return NSApplicationMain(argc, (const char **) argv); +} diff --git a/GTL/Examples/TasksSample/English.lproj/.svn/all-wcprops b/GTL/Examples/TasksSample/English.lproj/.svn/all-wcprops new file mode 100644 index 0000000..971afea --- /dev/null +++ b/GTL/Examples/TasksSample/English.lproj/.svn/all-wcprops @@ -0,0 +1,23 @@ +K 25 +svn:wc:ra_dav:version-url +V 58 +/svn/!svn/ver/154/trunk/Examples/TasksSample/English.lproj +END +InfoPlist.strings +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/14/trunk/Examples/TasksSample/English.lproj/InfoPlist.strings +END +TasksSampleWindow.xib +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/154/trunk/Examples/TasksSample/English.lproj/TasksSampleWindow.xib +END +MainMenu.xib +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/28/trunk/Examples/TasksSample/English.lproj/MainMenu.xib +END diff --git a/GTL/Examples/TasksSample/English.lproj/.svn/entries b/GTL/Examples/TasksSample/English.lproj/.svn/entries new file mode 100644 index 0000000..ad1058d --- /dev/null +++ b/GTL/Examples/TasksSample/English.lproj/.svn/entries @@ -0,0 +1,130 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/TasksSample/English.lproj +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +InfoPlist.strings +file + + + + +2012-12-09T08:42:34.000000Z +bc745a35febf3350074747882fc8b7e0 +2011-06-24T20:24:16.908736Z +14 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +95 + +TasksSampleWindow.xib +file + + + + +2012-12-09T08:42:34.000000Z +6862b53e911a3ee9c486b19849e05145 +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +151492 + +MainMenu.xib +file + + + + +2012-12-09T08:42:34.000000Z +ce41bc3925821691162d496cf1b20af0 +2011-08-23T19:12:40.725509Z +28 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +103624 + diff --git a/GTL/Examples/TasksSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base b/GTL/Examples/TasksSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base new file mode 100644 index 0000000..77831dd --- /dev/null +++ b/GTL/Examples/TasksSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "© Google Inc. 2011"; diff --git a/GTL/Examples/TasksSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base b/GTL/Examples/TasksSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base new file mode 100644 index 0000000..2c8e377 --- /dev/null +++ b/GTL/Examples/TasksSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base @@ -0,0 +1,2409 @@ + + + + 1050 + 10F569 + 823 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 823 + + + YES + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + + NSApplication + + + + FirstResponder + + + NSApplication + + + MainMenu + + YES + + + SampleApp + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + SampleApp + + YES + + + About the Sample + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + + Services + + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + + File + + + YES + + + New + n + 1048576 + 2147483647 + + + + + + Open... + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + + Open Recent + + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + Save As… + S + 1048576 + 2147483647 + + + + + + Revert + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup… + P + 1048576 + 2147483647 + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + + Edit + + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + + Find + + + YES + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1048576 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling + + 1048576 + 2147483647 + + + submenuAction: + + Spelling + + YES + + + Spelling… + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling as You Type + + 1048576 + 2147483647 + + + + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + + Window + + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + Help + + YES + + + Help + ? + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + TasksSampleAppController + + + + + YES + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + showHelp: + + + + 122 + + + + clearRecentDocuments: + + + + 127 + + + + terminate: + + + + 139 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + hideOtherApplications: + + + + 146 + + + + hide: + + + + 152 + + + + unhideAllApplications: + + + + 153 + + + + cut: + + + + 175 + + + + paste: + + + + 176 + + + + redo: + + + + 178 + + + + selectAll: + + + + 179 + + + + undo: + + + + 180 + + + + copy: + + + + 181 + + + + showGuessPanel: + + + + 188 + + + + checkSpelling: + + + + 190 + + + + toggleContinuousSpellChecking: + + + + 192 + + + + performClose: + + + + 193 + + + + delete: + + + + 195 + + + + performZoom: + + + + 198 + + + + performFindPanelAction: + + + + 199 + + + + performFindPanelAction: + + + + 200 + + + + performFindPanelAction: + + + + 201 + + + + performFindPanelAction: + + + + 202 + + + + centerSelectionInVisibleArea: + + + + 203 + + + + pasteAsPlainText: + + + + 205 + + + + delegate + + + + 223 + + + + delegate + + + + 225 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + MainMenu + + + 19 + + + YES + + + + + + 24 + + + YES + + + + + + + + + 5 + + + + + 23 + + + + + 92 + + + + + 197 + + + + + 56 + + + YES + + + + + + 57 + + + YES + + + + + + + + + + + + + + + + 58 + + + + + 129 + + + + + 131 + + + YES + + + + + + 130 + + + + + 134 + + + + + 136 + + + + + 143 + + + + + 144 + + + + + 145 + + + + + 149 + + + + + 150 + + + + + 196 + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + + + + + + + + 72 + + + + + 73 + + + + + 74 + + + + + 75 + + + + + 77 + + + + + 78 + + + + + 79 + + + + + 80 + + + + + 82 + + + + + 112 + + + + + 124 + + + YES + + + + + + 125 + + + YES + + + + + + 126 + + + + + 103 + + + YES + + + + + + 106 + + + YES + + + + + + 111 + + + + + 163 + + + YES + + + + + + 169 + + + YES + + + + + + + + + + + + + + + + + 156 + + + + + 157 + + + + + 158 + + + + + 160 + + + + + 164 + + + + + 168 + + + YES + + + + + + 159 + + + YES + + + + + + + + + + 154 + + + + + 155 + + + + + 161 + + + + + 162 + + + + + 167 + + + + + 171 + + + + + 172 + + + + + 173 + + + + + 174 + + + + + 184 + + + YES + + + + + + 185 + + + YES + + + + + + + + 187 + + + + + 189 + + + + + 191 + + + + + 204 + + + + + 222 + + + BuzzSampleAppController + + + + + YES + + YES + -3.IBPluginDependency + -3.ImportedFromIB2 + 103.IBPluginDependency + 103.ImportedFromIB2 + 106.IBPluginDependency + 106.ImportedFromIB2 + 111.IBPluginDependency + 111.ImportedFromIB2 + 112.IBPluginDependency + 112.ImportedFromIB2 + 124.IBPluginDependency + 124.ImportedFromIB2 + 125.IBPluginDependency + 125.ImportedFromIB2 + 126.IBPluginDependency + 126.ImportedFromIB2 + 129.IBPluginDependency + 129.ImportedFromIB2 + 130.IBPluginDependency + 130.ImportedFromIB2 + 131.IBPluginDependency + 131.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 136.IBPluginDependency + 136.ImportedFromIB2 + 143.IBPluginDependency + 143.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 145.IBPluginDependency + 145.ImportedFromIB2 + 149.IBPluginDependency + 149.ImportedFromIB2 + 150.IBPluginDependency + 150.ImportedFromIB2 + 154.IBPluginDependency + 154.ImportedFromIB2 + 155.IBPluginDependency + 155.ImportedFromIB2 + 156.IBPluginDependency + 156.ImportedFromIB2 + 157.IBPluginDependency + 157.ImportedFromIB2 + 158.IBPluginDependency + 158.ImportedFromIB2 + 159.IBPluginDependency + 159.ImportedFromIB2 + 160.IBPluginDependency + 160.ImportedFromIB2 + 161.IBPluginDependency + 161.ImportedFromIB2 + 162.IBPluginDependency + 162.ImportedFromIB2 + 163.IBPluginDependency + 163.ImportedFromIB2 + 164.IBPluginDependency + 164.ImportedFromIB2 + 167.IBPluginDependency + 167.ImportedFromIB2 + 168.IBPluginDependency + 168.ImportedFromIB2 + 169.IBPluginDependency + 169.ImportedFromIB2 + 171.IBPluginDependency + 171.ImportedFromIB2 + 172.IBPluginDependency + 172.ImportedFromIB2 + 173.IBPluginDependency + 173.ImportedFromIB2 + 174.IBPluginDependency + 174.ImportedFromIB2 + 184.IBPluginDependency + 184.ImportedFromIB2 + 185.IBPluginDependency + 185.ImportedFromIB2 + 187.IBPluginDependency + 187.ImportedFromIB2 + 189.IBPluginDependency + 189.ImportedFromIB2 + 19.IBPluginDependency + 19.ImportedFromIB2 + 191.IBPluginDependency + 191.ImportedFromIB2 + 196.IBPluginDependency + 196.ImportedFromIB2 + 197.IBPluginDependency + 197.ImportedFromIB2 + 204.IBPluginDependency + 204.ImportedFromIB2 + 222.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 24.IBPluginDependency + 24.ImportedFromIB2 + 29.IBPluginDependency + 29.ImportedFromIB2 + 5.IBPluginDependency + 5.ImportedFromIB2 + 56.IBPluginDependency + 56.ImportedFromIB2 + 57.IBPluginDependency + 57.ImportedFromIB2 + 58.IBPluginDependency + 58.ImportedFromIB2 + 72.IBPluginDependency + 72.ImportedFromIB2 + 73.IBPluginDependency + 73.ImportedFromIB2 + 74.IBPluginDependency + 74.ImportedFromIB2 + 75.IBPluginDependency + 75.ImportedFromIB2 + 77.IBPluginDependency + 77.ImportedFromIB2 + 78.IBPluginDependency + 78.ImportedFromIB2 + 79.IBPluginDependency + 79.ImportedFromIB2 + 80.IBPluginDependency + 80.ImportedFromIB2 + 81.IBPluginDependency + 81.ImportedFromIB2 + 82.IBPluginDependency + 82.ImportedFromIB2 + 83.IBPluginDependency + 83.ImportedFromIB2 + 92.IBPluginDependency + 92.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + + YES + + + + + YES + + + YES + + + + 227 + + + + YES + + FirstResponder + NSObject + + IBUserSource + + + + + TasksSampleAppController + NSObject + + IBUserSource + + + + + + YES + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSBrowser + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSBrowser.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSDocument + NSObject + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + id + id + id + id + id + id + + + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + + printDocument: + id + + + revertDocumentToSaved: + id + + + runPageLayout: + id + + + saveDocument: + id + + + saveDocumentAs: + id + + + saveDocumentTo: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocument.h + + + + NSDocument + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentScripting.h + + + + NSDocumentController + NSObject + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + id + id + id + id + + + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + + clearRecentDocuments: + id + + + newDocument: + id + + + openDocument: + id + + + saveAllDocuments: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentController.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSMatrix + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSMatrix.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSMenuItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSMovieView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSMovieView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebEditingDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebFrameLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebJavaPlugIn.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPlugin.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPluginContainer.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPolicyDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebResourceLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebScriptObject.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebUIDelegate.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSTableView + NSControl + + + + NSText + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSText.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + + WebView + NSView + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + + goBack: + id + + + goForward: + id + + + makeTextLarger: + id + + + makeTextSmaller: + id + + + makeTextStandardSize: + id + + + reload: + id + + + reloadFromOrigin: + id + + + stopLoading: + id + + + takeStringURLFrom: + id + + + toggleContinuousSpellChecking: + id + + + toggleSmartInsertDelete: + id + + + + + IBFrameworkSource + WebKit.framework/Headers/WebView.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../BuzzSample.xcodeproj + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {9, 8} + {7, 2} + + + + diff --git a/GTL/Examples/TasksSample/English.lproj/.svn/text-base/TasksSampleWindow.xib.svn-base b/GTL/Examples/TasksSample/English.lproj/.svn/text-base/TasksSampleWindow.xib.svn-base new file mode 100644 index 0000000..eb41256 --- /dev/null +++ b/GTL/Examples/TasksSample/English.lproj/.svn/text-base/TasksSampleWindow.xib.svn-base @@ -0,0 +1,3477 @@ + + + + 1070 + 11D50b + 2182 + 1138.32 + 568.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2182 + + + YES + NSTableColumn + NSScroller + NSButton + NSTextFieldCell + NSScrollView + NSButtonCell + NSProgressIndicator + NSTableView + NSOutlineView + NSCustomObject + NSTextView + NSView + NSWindowTemplate + NSTextField + NSUserDefaultsController + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + TasksSampleWindowController + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{16, 600}, {539, 538}} + 1886912512 + Sample App + + NSWindow + + + View + + + {539, 493} + + + 256 + + YES + + + 265 + {{396, 464}, {129, 32}} + + YES + + 67239424 + 134217728 + Get Task Lists + + LucidaGrande + 13 + 1044 + + + -2038284033 + 1 + + LucidaGrande + 13 + 16 + + + DQ + 200 + 25 + + + + + 1289 + + {{434, 441}, {16, 16}} + + 28938 + 100 + + + + 292 + {{17, 18}, {128, 18}} + + YES + + 67239424 + 131072 + Log http to desktop + + LucidaGrande + 11 + 3100 + + + 1211912703 + 2 + + NSImage + NSSwitch + + + NSSwitch + + + + 200 + 25 + + + + + 265 + {{251, 266}, {42, 16}} + + YES + + 67239424 + 134479872 + Add + + LucidaGrande + 9 + 3614 + + + -2038284033 + 1 + + LucidaGrande + 9 + 16 + + + + 200 + 25 + + + + + 265 + {{364, 266}, {52, 16}} + + YES + + 67239424 + 134479872 + Delete + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 265 + {{299, 266}, {59, 16}} + + YES + + 67239424 + 134479872 + Rename + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 266 + {{57, 265}, {187, 19}} + + YES + + -1804468671 + 272761856 + + + + YES + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 6 + System + textColor + + 3 + MAA + + + + + + + 264 + {{17, 268}, {35, 14}} + + YES + + 67239424 + 272760832 + Title + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + + + + + + 265 + {{467, 439}, {53, 16}} + + YES + + 67239424 + 134479872 + Cancel + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 264 + {{93, 474}, {71, 17}} + + YES + + 67239424 + 272629760 + Signed In: + + + + + + + + + 266 + {{166, 474}, {247, 17}} + + YES + + 67239424 + 272629760 + No + + + + + + + + + 268 + {{18, 467}, {72, 28}} + + YES + + 67239424 + 134348800 + Sign Out + + + -2038284033 + 129 + + + 200 + 25 + + + + + 266 + {{20, 233}, {398, 17}} + + YES + + 67239424 + 272629760 + Tasks - select or drag + + + + + + + + + 265 + {{467, 231}, {53, 16}} + + YES + + 67239424 + 134479872 + Cancel + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 1289 + + {{444, 232}, {16, 16}} + + 28938 + 100 + + + + 268 + {{18, 494}, {83, 28}} + + YES + + -2080244224 + 134348800 + Client ID... + + + -2038284033 + 129 + + + 200 + 25 + + + + + 264 + {{105, 501}, {178, 14}} + + YES + + 67239424 + 272760832 + Client ID and Secret Required + + + + + + + + + 268 + {{20, 441}, {398, 17}} + + YES + + 67239424 + 272629760 + Tasks Lists - select one + + + + + + + + + 266 + + YES + + + 2304 + + YES + + + 2322 + {497, 14} + + + + + + results + + + YES + + YES + NSColor + NSFont + + + YES + + 1 + MC40NTEwODY5NCAwLjEwNDE0NTEyIDAuMDgyODYwMjE2AA + + + Geneva + 10 + 16 + + + + + + + YES + + + 6 + + + + 497 + 1 + + + 67119969 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + 1 + MCAwIDEAA + + + + + + + 1 + + 6 + {996, 10000000} + {463, 0} + + + + {{1, 1}, {497, 56}} + + + + + + {4, 5} + + 79691776 + + YES + + YES + + + + + file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff + + + + + + 3 + MCAwAA + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{20, 290}, {499, 58}} + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + + 266 + + YES + + + 2304 + + YES + + + 256 + {497, 74} + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 494 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + + + + 337772096 + 2048 + + + + 6 + System + controlBackgroundColor + + + + + 3 + YES + + + + 3 + 2 + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + 37748736 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {497, 74}} + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 68}} + + + _doScroller: + 0.35789470000000001 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + 1 + + _doScroller: + 0.99047620000000003 + + + {{20, 357}, {499, 76}} + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 290 + + YES + + + 2304 + + YES + + + 2322 + {497, 14} + + + + + + results + + + + + + YES + + + 6 + + + + 497 + 1 + + + 67119969 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + + + + + + 1 + + 6 + {996, 10000000} + {463, 0} + + + + {{1, 1}, {497, 56}} + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{20, 85}, {499, 58}} + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + + 274 + + YES + + + 2304 + + YES + + + 256 + {497, 73} + + YES + + + -2147483392 + {{483, 0}, {16, 17}} + + + YES + + 494 + 16 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5ODU2AA + + + + + 67239488 + 2048 + Text Cell + + + + + + 3 + YES + YES + + + + 3 + 2 + + + 17 + -767557632 + + + tasksOutline + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {497, 73}} + + + + + 4 + + + + -2147483392 + {{483, 17}, {15, 42}} + + + _doScroller: + 0.98648648648648651 + + + + -2147483392 + {{1, 59}, {497, 15}} + + 1 + + _doScroller: + 0.99799196787148592 + + + {{20, 151}, {499, 75}} + + + 133682 + + + + QSAAAEEgAABBmAAAQZgAAA + + + + 289 + {{202, 60}, {42, 16}} + + YES + + 67239424 + 134479872 + Add + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 289 + {{315, 60}, {52, 16}} + + YES + + 67239424 + 134479872 + Delete + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 289 + {{250, 60}, {59, 16}} + + YES + + 67239424 + 134479872 + Rename + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 290 + {{57, 58}, {138, 19}} + + YES + + -1804468671 + 272761856 + + + + YES + + + + + + + 292 + {{17, 61}, {35, 14}} + + YES + + 67239424 + 272760832 + Title + + + + + + + + + 289 + {{373, 60}, {76, 16}} + + YES + + 67239424 + 134479872 + Uncomplete + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 265 + {{229, 232}, {80, 18}} + + YES + + -2080244224 + 131072 + Completed + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 265 + {{312, 232}, {60, 18}} + + YES + + 67239424 + 131072 + Hidden + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 265 + {{375, 232}, {63, 18}} + + YES + + 67239424 + 131072 + Deleted + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 289 + {{202, 38}, {125, 16}} + + YES + + -2080244224 + 134479872 + Clear Completed Tasks + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 289 + {{430, 38}, {66, 16}} + + YES + + -2080244224 + 134479872 + Delete All + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 289 + {{333, 38}, {91, 16}} + + YES + + -2080244224 + 134479872 + Uncomplete All + + + -2038284033 + 1 + + + + 200 + 25 + + + + {539, 538} + + + {{0, 0}, {1920, 1178}} + {539, 515} + {10000000000000, 10000000000000} + YES + + + YES + + + 3 + 2 + {{235, 275}, {458, 284}} + 611844096 + Client ID Sheet + NSWindow + + + + + 256 + + YES + + + 266 + {{118, 143}, {320, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 143}, {63, 17}} + + YES + + 68288064 + 272630784 + Client ID: + + + + + + + + + 266 + {{118, 112}, {320, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 117}, {88, 17}} + + YES + + 68288064 + 272630784 + Client Secret: + + + + + + + + + 268 + {{338, 80}, {82, 20}} + + YES + + 67239424 + 134348800 + API Console + + + -2038284033 + 134 + + + 200 + 25 + + + + + 268 + {{17, 82}, {316, 17}} + + YES + + 68288064 + 272630784 + Client ID and Client Secret are obtained from the + + + + + + + + + 268 + {{17, 204}, {424, 34}} + + YES + + 67239424 + 138412032 + Each application should have a client ID and client secret hardcoded into the source. + + + + + + + + + 268 + {{348, 12}, {96, 32}} + + YES + + 67239424 + 134217728 + Done + + + -2038284033 + 129 + + DQ + 200 + 25 + + + + {458, 284} + + {{0, 0}, {1920, 1178}} + {10000000000000, 10000000000000} + YES + + + + + YES + + + window + + + + 16 + + + + mSpreadsheetTable + + + + 355 + + + + mSpreadsheetResultTextField + + + + 356 + + + + mSpreadsheetProgressIndicator + + + + 366 + + + + loggingCheckboxClicked: + + + + 600 + + + + signInClicked: + + + + 836 + + + + mTableTable + + + + 867 + + + + APIConsoleClicked: + + + + 925 + + + + clientIDClicked: + + + + 931 + + + + clientIDDoneClicked: + + + + 932 + + + + addTaskListClicked: + + + + 1003 + + + + renameTaskListClicked: + + + + 1005 + + + + deleteTaskListClicked: + + + + 1007 + + + + cancelTaskListsFetch: + + + + 1009 + + + + cancelTasksFetch: + + + + 1010 + + + + getTaskListsClicked: + + + + 1012 + + + + renameTaskClicked: + + + + 1021 + + + + addTaskClicked: + + + + 1022 + + + + deleteTaskClicked: + + + + 1023 + + + + completeTaskClicked: + + + + 1032 + + + + showTasksCheckboxClicked: + + + + 1043 + + + + showTasksCheckboxClicked: + + + + 1044 + + + + showTasksCheckboxClicked: + + + + 1045 + + + + clearTasksClicked: + + + + 1050 + + + + deleteAllTasksClicked: + + + + 1054 + + + + completeAllTasksClicked: + + + + 1059 + + + + signedInField_ + + + + 1062 + + + + signedInButton_ + + + + 1063 + + + + taskListsTable__ + + + + 1064 + + + + taskListsProgressIndicator_ + + + + 1065 + + + + taskListsResultTextView_ + + + + 1066 + + + + taskListsCancelButton_ + + + + 1067 + + + + addTaskListButton_ + + + + 1068 + + + + renameTaskListButton_ + + + + 1069 + + + + deleteTaskListButton_ + + + + 1070 + + + + taskListNameField_ + + + + 1071 + + + + tasksOutline_ + + + + 1072 + + + + tasksProgressIndicator_ + + + + 1073 + + + + tasksResultTextView_ + + + + 1074 + + + + showCompletedTasksCheckbox_ + + + + 1075 + + + + showHiddenTasksCheckbox_ + + + + 1076 + + + + showDeletedTasksCheckbox_ + + + + 1077 + + + + tasksCancelButton_ + + + + 1078 + + + + addTaskButton_ + + + + 1079 + + + + renameTaskButton_ + + + + 1080 + + + + deleteTaskButton_ + + + + 1081 + + + + completeTaskButton_ + + + + 1082 + + + + clearTasksButton_ + + + + 1083 + + + + completeAllTasksButton_ + + + + 1084 + + + + deleteAllTasksButton_ + + + + 1085 + + + + taskNameField_ + + + + 1086 + + + + clientIDButton_ + + + + 1087 + + + + clientIDRequiredTextField_ + + + + 1088 + + + + clientIDSheet_ + + + + 1089 + + + + clientIDField_ + + + + 1090 + + + + clientSecretField_ + + + + 1091 + + + + delegate + + + + 15 + + + + dataSource + + + + 588 + + + + delegate + + + + 589 + + + + delegate + + + + 736 + + + + value: values.clientID + + + + + + value: values.clientID + value + values.clientID + + NSContinuouslyUpdatesValue + + + 2 + + + 940 + + + + value: values.clientSecret + + + + + + value: values.clientSecret + value + values.clientSecret + + NSContinuouslyUpdatesValue + + + 2 + + + 939 + + + + dataSource + + + + 1013 + + + + delegate + + + + 1014 + + + + delegate + + + + 989 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 5 + + + YES + + + + Window + + + 6 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 17 + + + YES + + + + + + 40 + + + + + 139 + + + YES + + + + + + 556 + + + YES + + + + + + 558 + + + YES + + + + + + 653 + + + YES + + + + + + 655 + + + YES + + + + + + 657 + + + YES + + + + + + 44 + + + Shared Defaults + + + 744 + + + + + 746 + + + + + 749 + + + + + 750 + + + + + 752 + + + + + 753 + + + + + 754 + + + + + 796 + + + YES + + + + + + 797 + + + + + 828 + + + YES + + + + + + 829 + + + YES + + + + + + 830 + + + YES + + + + + + 831 + + + + + 832 + + + + + 833 + + + + + 861 + + + YES + + + + + + 862 + + + + + 863 + + + + + 900 + + + YES + + + + + + 901 + + + YES + + + + + + + + + + + + + 902 + + + YES + + + + + + 903 + + + YES + + + + + + 904 + + + YES + + + + + + 905 + + + YES + + + + + + 906 + + + YES + + + + + + 907 + + + YES + + + + + + 908 + + + YES + + + + + + 909 + + + + + 910 + + + + + 911 + + + + + 912 + + + + + 913 + + + + + 914 + + + + + 915 + + + + + 920 + + + YES + + + + + + 921 + + + + + 929 + + + YES + + + + + + 930 + + + + + 933 + + + YES + + + + + + 934 + + + + + 859 + + + YES + + + + + + 860 + + + + + 965 + + + YES + + + + + + 966 + + + + + 80 + + + YES + + + + + + + + 81 + + + + + 762 + + + + + 763 + + + + + 24 + + + YES + + + + + + + + 25 + + + YES + + + + + + 760 + + + + + 761 + + + + + 26 + + + YES + + + + + + 758 + + + + + 849 + + + YES + + + + + + + + 858 + + + + + 857 + + + + + 856 + + + + + 967 + + + YES + + + + + + + + 968 + + + + + 969 + + + + + 970 + + + YES + + + + + + 972 + + + YES + + + + + + 975 + + + + + 976 + + + YES + + + + + + 977 + + + YES + + + + + + 978 + + + YES + + + + + + 979 + + + YES + + + + + + 980 + + + YES + + + + + + 981 + + + + + 982 + + + + + 983 + + + + + 984 + + + + + 985 + + + + + 1029 + + + YES + + + + + + 1030 + + + + + 1034 + + + YES + + + + + + 1035 + + + + + 1036 + + + YES + + + + + + 1037 + + + + + 1038 + + + YES + + + + + + 1039 + + + + + 1046 + + + YES + + + + + + 1047 + + + + + 1051 + + + YES + + + + + + 1052 + + + + + 1056 + + + YES + + + + + + 1057 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 1029.IBPluginDependency + 1030.IBPluginDependency + 1034.IBPluginDependency + 1035.IBPluginDependency + 1036.IBPluginDependency + 1037.IBPluginDependency + 1038.IBPluginDependency + 1039.IBPluginDependency + 1046.IBAttributePlaceholdersKey + 1046.IBPluginDependency + 1047.IBPluginDependency + 1051.IBAttributePlaceholdersKey + 1051.IBPluginDependency + 1052.IBPluginDependency + 1056.IBAttributePlaceholdersKey + 1056.IBPluginDependency + 1057.IBPluginDependency + 139.IBPluginDependency + 17.IBPluginDependency + 24.IBPluginDependency + 25.IBPluginDependency + 26.IBPluginDependency + 40.IBPluginDependency + 44.IBPluginDependency + 5.IBPluginDependency + 5.IBWindowTemplateEditedContentRect + 556.IBPluginDependency + 558.IBPluginDependency + 6.IBPluginDependency + 653.IBPluginDependency + 655.IBPluginDependency + 657.IBPluginDependency + 744.IBPluginDependency + 746.IBPluginDependency + 749.IBPluginDependency + 750.IBPluginDependency + 752.IBPluginDependency + 753.IBPluginDependency + 754.IBPluginDependency + 758.IBPluginDependency + 758.IBShouldRemoveOnLegacySave + 760.IBPluginDependency + 760.IBShouldRemoveOnLegacySave + 761.IBPluginDependency + 761.IBShouldRemoveOnLegacySave + 762.IBPluginDependency + 762.IBShouldRemoveOnLegacySave + 763.IBPluginDependency + 763.IBShouldRemoveOnLegacySave + 796.IBPluginDependency + 797.IBPluginDependency + 80.IBPluginDependency + 81.IBPluginDependency + 828.IBPluginDependency + 829.IBPluginDependency + 830.IBPluginDependency + 831.IBPluginDependency + 832.IBPluginDependency + 833.IBPluginDependency + 849.IBPluginDependency + 856.IBPluginDependency + 857.IBPluginDependency + 857.IBShouldRemoveOnLegacySave + 858.IBPluginDependency + 858.IBShouldRemoveOnLegacySave + 859.IBPluginDependency + 860.IBPluginDependency + 861.IBPluginDependency + 862.IBPluginDependency + 863.IBPluginDependency + 900.IBPluginDependency + 900.IBWindowTemplateEditedContentRect + 900.NSWindowTemplate.visibleAtLaunch + 901.IBPluginDependency + 902.IBPluginDependency + 903.IBPluginDependency + 904.IBPluginDependency + 905.IBPluginDependency + 906.IBPluginDependency + 907.IBPluginDependency + 908.IBPluginDependency + 909.IBPluginDependency + 910.IBPluginDependency + 911.IBPluginDependency + 912.IBPluginDependency + 913.IBPluginDependency + 914.IBPluginDependency + 915.IBPluginDependency + 920.IBPluginDependency + 921.IBPluginDependency + 929.IBPluginDependency + 930.IBPluginDependency + 933.IBPluginDependency + 934.IBPluginDependency + 965.IBPluginDependency + 966.IBPluginDependency + 967.IBPluginDependency + 968.IBPluginDependency + 969.IBPluginDependency + 970.IBPluginDependency + 972.IBPluginDependency + 975.IBPluginDependency + 976.IBPluginDependency + 977.IBPluginDependency + 978.IBPluginDependency + 979.IBPluginDependency + 980.IBPluginDependency + 981.IBPluginDependency + 982.IBPluginDependency + 983.IBPluginDependency + 984.IBPluginDependency + 985.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Hides all tasks marked completed + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Hides all tasks marked completed + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Mark all tasks as complete or incomplete + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{37, 470}, {539, 538}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{319, 856}, {458, 284}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 1091 + + + + YES + + TasksSampleWindowController + NSWindowController + + YES + + YES + APIConsoleClicked: + addTaskClicked: + addTaskListClicked: + cancelTaskListsFetch: + cancelTasksFetch: + clearTasksClicked: + clientIDClicked: + clientIDDoneClicked: + completeAllTasksClicked: + completeTaskClicked: + deleteAllTasksClicked: + deleteTableClicked: + deleteTaskClicked: + deleteTaskListClicked: + getSpreadsheetClicked: + getTaskListsClicked: + loggingCheckboxClicked: + randomizeTableClicked: + renameTaskClicked: + renameTaskListClicked: + showTasksCheckboxClicked: + signInClicked: + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + APIConsoleClicked: + addTaskClicked: + addTaskListClicked: + cancelTaskListsFetch: + cancelTasksFetch: + clearTasksClicked: + clientIDClicked: + clientIDDoneClicked: + completeAllTasksClicked: + completeTaskClicked: + deleteAllTasksClicked: + deleteTableClicked: + deleteTaskClicked: + deleteTaskListClicked: + getSpreadsheetClicked: + getTaskListsClicked: + loggingCheckboxClicked: + randomizeTableClicked: + renameTaskClicked: + renameTaskListClicked: + showTasksCheckboxClicked: + signInClicked: + + + YES + + APIConsoleClicked: + id + + + addTaskClicked: + id + + + addTaskListClicked: + id + + + cancelTaskListsFetch: + id + + + cancelTasksFetch: + id + + + clearTasksClicked: + id + + + clientIDClicked: + id + + + clientIDDoneClicked: + id + + + completeAllTasksClicked: + id + + + completeTaskClicked: + id + + + deleteAllTasksClicked: + id + + + deleteTableClicked: + id + + + deleteTaskClicked: + id + + + deleteTaskListClicked: + id + + + getSpreadsheetClicked: + id + + + getTaskListsClicked: + id + + + loggingCheckboxClicked: + id + + + randomizeTableClicked: + id + + + renameTaskClicked: + id + + + renameTaskListClicked: + id + + + showTasksCheckboxClicked: + id + + + signInClicked: + id + + + + + YES + + YES + addTaskButton_ + addTaskListButton_ + clearTasksButton_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + completeAllTasksButton_ + completeTaskButton_ + deleteAllTasksButton_ + deleteTaskButton_ + deleteTaskListButton_ + mRecordProgressIndicator + mRecordResultTextField + mRecordTable + mSpreadsheetProgressIndicator + mSpreadsheetResultTextField + mSpreadsheetTable + mTableProgressIndicator + mTableResultTextField + mTableTable + mWorksheetProgressIndicator + mWorksheetResultTextField + mWorksheetTable + renameTaskButton_ + renameTaskListButton_ + showCompletedTasksCheckbox_ + showDeletedTasksCheckbox_ + showHiddenTasksCheckbox_ + signedInButton_ + signedInField_ + taskListNameField_ + taskListsCancelButton_ + taskListsProgressIndicator_ + taskListsResultTextView_ + taskListsTable__ + taskNameField_ + tasksCancelButton_ + tasksOutline_ + tasksProgressIndicator_ + tasksResultTextView_ + + + YES + NSButton + NSButton + NSButton + NSButton + NSTextField + NSTextField + NSWindow + NSTextField + NSButton + NSButton + NSButton + NSButton + NSButton + NSProgressIndicator + NSTextView + NSTableView + NSProgressIndicator + NSTextView + NSTableView + NSProgressIndicator + NSTextView + NSTableView + NSProgressIndicator + NSTextView + NSTableView + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSTextField + NSTextField + NSButton + NSProgressIndicator + NSTextView + NSTableView + NSTextField + NSButton + NSOutlineView + NSProgressIndicator + NSTextView + + + + YES + + YES + addTaskButton_ + addTaskListButton_ + clearTasksButton_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + completeAllTasksButton_ + completeTaskButton_ + deleteAllTasksButton_ + deleteTaskButton_ + deleteTaskListButton_ + mRecordProgressIndicator + mRecordResultTextField + mRecordTable + mSpreadsheetProgressIndicator + mSpreadsheetResultTextField + mSpreadsheetTable + mTableProgressIndicator + mTableResultTextField + mTableTable + mWorksheetProgressIndicator + mWorksheetResultTextField + mWorksheetTable + renameTaskButton_ + renameTaskListButton_ + showCompletedTasksCheckbox_ + showDeletedTasksCheckbox_ + showHiddenTasksCheckbox_ + signedInButton_ + signedInField_ + taskListNameField_ + taskListsCancelButton_ + taskListsProgressIndicator_ + taskListsResultTextView_ + taskListsTable__ + taskNameField_ + tasksCancelButton_ + tasksOutline_ + tasksProgressIndicator_ + tasksResultTextView_ + + + YES + + addTaskButton_ + NSButton + + + addTaskListButton_ + NSButton + + + clearTasksButton_ + NSButton + + + clientIDButton_ + NSButton + + + clientIDField_ + NSTextField + + + clientIDRequiredTextField_ + NSTextField + + + clientIDSheet_ + NSWindow + + + clientSecretField_ + NSTextField + + + completeAllTasksButton_ + NSButton + + + completeTaskButton_ + NSButton + + + deleteAllTasksButton_ + NSButton + + + deleteTaskButton_ + NSButton + + + deleteTaskListButton_ + NSButton + + + mRecordProgressIndicator + NSProgressIndicator + + + mRecordResultTextField + NSTextView + + + mRecordTable + NSTableView + + + mSpreadsheetProgressIndicator + NSProgressIndicator + + + mSpreadsheetResultTextField + NSTextView + + + mSpreadsheetTable + NSTableView + + + mTableProgressIndicator + NSProgressIndicator + + + mTableResultTextField + NSTextView + + + mTableTable + NSTableView + + + mWorksheetProgressIndicator + NSProgressIndicator + + + mWorksheetResultTextField + NSTextView + + + mWorksheetTable + NSTableView + + + renameTaskButton_ + NSButton + + + renameTaskListButton_ + NSButton + + + showCompletedTasksCheckbox_ + NSButton + + + showDeletedTasksCheckbox_ + NSButton + + + showHiddenTasksCheckbox_ + NSButton + + + signedInButton_ + NSButton + + + signedInField_ + NSTextField + + + taskListNameField_ + NSTextField + + + taskListsCancelButton_ + NSButton + + + taskListsProgressIndicator_ + NSProgressIndicator + + + taskListsResultTextView_ + NSTextView + + + taskListsTable__ + NSTableView + + + taskNameField_ + NSTextField + + + tasksCancelButton_ + NSButton + + + tasksOutline_ + NSOutlineView + + + tasksProgressIndicator_ + NSProgressIndicator + + + tasksResultTextView_ + NSTextView + + + + + IBProjectSource + ./Classes/TasksSampleWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + NSSwitch + {15, 15} + + + diff --git a/GTL/Examples/TasksSample/English.lproj/InfoPlist.strings b/GTL/Examples/TasksSample/English.lproj/InfoPlist.strings new file mode 100644 index 0000000..77831dd --- /dev/null +++ b/GTL/Examples/TasksSample/English.lproj/InfoPlist.strings @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "© Google Inc. 2011"; diff --git a/GTL/Examples/TasksSample/English.lproj/MainMenu.xib b/GTL/Examples/TasksSample/English.lproj/MainMenu.xib new file mode 100644 index 0000000..2c8e377 --- /dev/null +++ b/GTL/Examples/TasksSample/English.lproj/MainMenu.xib @@ -0,0 +1,2409 @@ + + + + 1050 + 10F569 + 823 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 823 + + + YES + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + + NSApplication + + + + FirstResponder + + + NSApplication + + + MainMenu + + YES + + + SampleApp + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + SampleApp + + YES + + + About the Sample + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + + Services + + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + + File + + + YES + + + New + n + 1048576 + 2147483647 + + + + + + Open... + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + + Open Recent + + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + Save As… + S + 1048576 + 2147483647 + + + + + + Revert + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup… + P + 1048576 + 2147483647 + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + + Edit + + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + + Find + + + YES + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1048576 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling + + 1048576 + 2147483647 + + + submenuAction: + + Spelling + + YES + + + Spelling… + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling as You Type + + 1048576 + 2147483647 + + + + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + + Window + + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + Help + + YES + + + Help + ? + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + TasksSampleAppController + + + + + YES + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + showHelp: + + + + 122 + + + + clearRecentDocuments: + + + + 127 + + + + terminate: + + + + 139 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + hideOtherApplications: + + + + 146 + + + + hide: + + + + 152 + + + + unhideAllApplications: + + + + 153 + + + + cut: + + + + 175 + + + + paste: + + + + 176 + + + + redo: + + + + 178 + + + + selectAll: + + + + 179 + + + + undo: + + + + 180 + + + + copy: + + + + 181 + + + + showGuessPanel: + + + + 188 + + + + checkSpelling: + + + + 190 + + + + toggleContinuousSpellChecking: + + + + 192 + + + + performClose: + + + + 193 + + + + delete: + + + + 195 + + + + performZoom: + + + + 198 + + + + performFindPanelAction: + + + + 199 + + + + performFindPanelAction: + + + + 200 + + + + performFindPanelAction: + + + + 201 + + + + performFindPanelAction: + + + + 202 + + + + centerSelectionInVisibleArea: + + + + 203 + + + + pasteAsPlainText: + + + + 205 + + + + delegate + + + + 223 + + + + delegate + + + + 225 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + MainMenu + + + 19 + + + YES + + + + + + 24 + + + YES + + + + + + + + + 5 + + + + + 23 + + + + + 92 + + + + + 197 + + + + + 56 + + + YES + + + + + + 57 + + + YES + + + + + + + + + + + + + + + + 58 + + + + + 129 + + + + + 131 + + + YES + + + + + + 130 + + + + + 134 + + + + + 136 + + + + + 143 + + + + + 144 + + + + + 145 + + + + + 149 + + + + + 150 + + + + + 196 + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + + + + + + + + 72 + + + + + 73 + + + + + 74 + + + + + 75 + + + + + 77 + + + + + 78 + + + + + 79 + + + + + 80 + + + + + 82 + + + + + 112 + + + + + 124 + + + YES + + + + + + 125 + + + YES + + + + + + 126 + + + + + 103 + + + YES + + + + + + 106 + + + YES + + + + + + 111 + + + + + 163 + + + YES + + + + + + 169 + + + YES + + + + + + + + + + + + + + + + + 156 + + + + + 157 + + + + + 158 + + + + + 160 + + + + + 164 + + + + + 168 + + + YES + + + + + + 159 + + + YES + + + + + + + + + + 154 + + + + + 155 + + + + + 161 + + + + + 162 + + + + + 167 + + + + + 171 + + + + + 172 + + + + + 173 + + + + + 174 + + + + + 184 + + + YES + + + + + + 185 + + + YES + + + + + + + + 187 + + + + + 189 + + + + + 191 + + + + + 204 + + + + + 222 + + + BuzzSampleAppController + + + + + YES + + YES + -3.IBPluginDependency + -3.ImportedFromIB2 + 103.IBPluginDependency + 103.ImportedFromIB2 + 106.IBPluginDependency + 106.ImportedFromIB2 + 111.IBPluginDependency + 111.ImportedFromIB2 + 112.IBPluginDependency + 112.ImportedFromIB2 + 124.IBPluginDependency + 124.ImportedFromIB2 + 125.IBPluginDependency + 125.ImportedFromIB2 + 126.IBPluginDependency + 126.ImportedFromIB2 + 129.IBPluginDependency + 129.ImportedFromIB2 + 130.IBPluginDependency + 130.ImportedFromIB2 + 131.IBPluginDependency + 131.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 136.IBPluginDependency + 136.ImportedFromIB2 + 143.IBPluginDependency + 143.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 145.IBPluginDependency + 145.ImportedFromIB2 + 149.IBPluginDependency + 149.ImportedFromIB2 + 150.IBPluginDependency + 150.ImportedFromIB2 + 154.IBPluginDependency + 154.ImportedFromIB2 + 155.IBPluginDependency + 155.ImportedFromIB2 + 156.IBPluginDependency + 156.ImportedFromIB2 + 157.IBPluginDependency + 157.ImportedFromIB2 + 158.IBPluginDependency + 158.ImportedFromIB2 + 159.IBPluginDependency + 159.ImportedFromIB2 + 160.IBPluginDependency + 160.ImportedFromIB2 + 161.IBPluginDependency + 161.ImportedFromIB2 + 162.IBPluginDependency + 162.ImportedFromIB2 + 163.IBPluginDependency + 163.ImportedFromIB2 + 164.IBPluginDependency + 164.ImportedFromIB2 + 167.IBPluginDependency + 167.ImportedFromIB2 + 168.IBPluginDependency + 168.ImportedFromIB2 + 169.IBPluginDependency + 169.ImportedFromIB2 + 171.IBPluginDependency + 171.ImportedFromIB2 + 172.IBPluginDependency + 172.ImportedFromIB2 + 173.IBPluginDependency + 173.ImportedFromIB2 + 174.IBPluginDependency + 174.ImportedFromIB2 + 184.IBPluginDependency + 184.ImportedFromIB2 + 185.IBPluginDependency + 185.ImportedFromIB2 + 187.IBPluginDependency + 187.ImportedFromIB2 + 189.IBPluginDependency + 189.ImportedFromIB2 + 19.IBPluginDependency + 19.ImportedFromIB2 + 191.IBPluginDependency + 191.ImportedFromIB2 + 196.IBPluginDependency + 196.ImportedFromIB2 + 197.IBPluginDependency + 197.ImportedFromIB2 + 204.IBPluginDependency + 204.ImportedFromIB2 + 222.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 24.IBPluginDependency + 24.ImportedFromIB2 + 29.IBPluginDependency + 29.ImportedFromIB2 + 5.IBPluginDependency + 5.ImportedFromIB2 + 56.IBPluginDependency + 56.ImportedFromIB2 + 57.IBPluginDependency + 57.ImportedFromIB2 + 58.IBPluginDependency + 58.ImportedFromIB2 + 72.IBPluginDependency + 72.ImportedFromIB2 + 73.IBPluginDependency + 73.ImportedFromIB2 + 74.IBPluginDependency + 74.ImportedFromIB2 + 75.IBPluginDependency + 75.ImportedFromIB2 + 77.IBPluginDependency + 77.ImportedFromIB2 + 78.IBPluginDependency + 78.ImportedFromIB2 + 79.IBPluginDependency + 79.ImportedFromIB2 + 80.IBPluginDependency + 80.ImportedFromIB2 + 81.IBPluginDependency + 81.ImportedFromIB2 + 82.IBPluginDependency + 82.ImportedFromIB2 + 83.IBPluginDependency + 83.ImportedFromIB2 + 92.IBPluginDependency + 92.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + + YES + + + + + YES + + + YES + + + + 227 + + + + YES + + FirstResponder + NSObject + + IBUserSource + + + + + TasksSampleAppController + NSObject + + IBUserSource + + + + + + YES + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSBrowser + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSBrowser.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSDocument + NSObject + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + id + id + id + id + id + id + + + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + + printDocument: + id + + + revertDocumentToSaved: + id + + + runPageLayout: + id + + + saveDocument: + id + + + saveDocumentAs: + id + + + saveDocumentTo: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocument.h + + + + NSDocument + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentScripting.h + + + + NSDocumentController + NSObject + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + id + id + id + id + + + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + + clearRecentDocuments: + id + + + newDocument: + id + + + openDocument: + id + + + saveAllDocuments: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentController.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSMatrix + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSMatrix.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSMenuItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSMovieView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSMovieView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebEditingDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebFrameLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebJavaPlugIn.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPlugin.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPluginContainer.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPolicyDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebResourceLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebScriptObject.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebUIDelegate.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSTableView + NSControl + + + + NSText + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSText.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + + WebView + NSView + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + + goBack: + id + + + goForward: + id + + + makeTextLarger: + id + + + makeTextSmaller: + id + + + makeTextStandardSize: + id + + + reload: + id + + + reloadFromOrigin: + id + + + stopLoading: + id + + + takeStringURLFrom: + id + + + toggleContinuousSpellChecking: + id + + + toggleSmartInsertDelete: + id + + + + + IBFrameworkSource + WebKit.framework/Headers/WebView.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../BuzzSample.xcodeproj + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {9, 8} + {7, 2} + + + + diff --git a/GTL/Examples/TasksSample/English.lproj/TasksSampleWindow.xib b/GTL/Examples/TasksSample/English.lproj/TasksSampleWindow.xib new file mode 100644 index 0000000..eb41256 --- /dev/null +++ b/GTL/Examples/TasksSample/English.lproj/TasksSampleWindow.xib @@ -0,0 +1,3477 @@ + + + + 1070 + 11D50b + 2182 + 1138.32 + 568.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2182 + + + YES + NSTableColumn + NSScroller + NSButton + NSTextFieldCell + NSScrollView + NSButtonCell + NSProgressIndicator + NSTableView + NSOutlineView + NSCustomObject + NSTextView + NSView + NSWindowTemplate + NSTextField + NSUserDefaultsController + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + TasksSampleWindowController + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{16, 600}, {539, 538}} + 1886912512 + Sample App + + NSWindow + + + View + + + {539, 493} + + + 256 + + YES + + + 265 + {{396, 464}, {129, 32}} + + YES + + 67239424 + 134217728 + Get Task Lists + + LucidaGrande + 13 + 1044 + + + -2038284033 + 1 + + LucidaGrande + 13 + 16 + + + DQ + 200 + 25 + + + + + 1289 + + {{434, 441}, {16, 16}} + + 28938 + 100 + + + + 292 + {{17, 18}, {128, 18}} + + YES + + 67239424 + 131072 + Log http to desktop + + LucidaGrande + 11 + 3100 + + + 1211912703 + 2 + + NSImage + NSSwitch + + + NSSwitch + + + + 200 + 25 + + + + + 265 + {{251, 266}, {42, 16}} + + YES + + 67239424 + 134479872 + Add + + LucidaGrande + 9 + 3614 + + + -2038284033 + 1 + + LucidaGrande + 9 + 16 + + + + 200 + 25 + + + + + 265 + {{364, 266}, {52, 16}} + + YES + + 67239424 + 134479872 + Delete + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 265 + {{299, 266}, {59, 16}} + + YES + + 67239424 + 134479872 + Rename + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 266 + {{57, 265}, {187, 19}} + + YES + + -1804468671 + 272761856 + + + + YES + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 6 + System + textColor + + 3 + MAA + + + + + + + 264 + {{17, 268}, {35, 14}} + + YES + + 67239424 + 272760832 + Title + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + + + + + + 265 + {{467, 439}, {53, 16}} + + YES + + 67239424 + 134479872 + Cancel + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 264 + {{93, 474}, {71, 17}} + + YES + + 67239424 + 272629760 + Signed In: + + + + + + + + + 266 + {{166, 474}, {247, 17}} + + YES + + 67239424 + 272629760 + No + + + + + + + + + 268 + {{18, 467}, {72, 28}} + + YES + + 67239424 + 134348800 + Sign Out + + + -2038284033 + 129 + + + 200 + 25 + + + + + 266 + {{20, 233}, {398, 17}} + + YES + + 67239424 + 272629760 + Tasks - select or drag + + + + + + + + + 265 + {{467, 231}, {53, 16}} + + YES + + 67239424 + 134479872 + Cancel + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 1289 + + {{444, 232}, {16, 16}} + + 28938 + 100 + + + + 268 + {{18, 494}, {83, 28}} + + YES + + -2080244224 + 134348800 + Client ID... + + + -2038284033 + 129 + + + 200 + 25 + + + + + 264 + {{105, 501}, {178, 14}} + + YES + + 67239424 + 272760832 + Client ID and Secret Required + + + + + + + + + 268 + {{20, 441}, {398, 17}} + + YES + + 67239424 + 272629760 + Tasks Lists - select one + + + + + + + + + 266 + + YES + + + 2304 + + YES + + + 2322 + {497, 14} + + + + + + results + + + YES + + YES + NSColor + NSFont + + + YES + + 1 + MC40NTEwODY5NCAwLjEwNDE0NTEyIDAuMDgyODYwMjE2AA + + + Geneva + 10 + 16 + + + + + + + YES + + + 6 + + + + 497 + 1 + + + 67119969 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + 1 + MCAwIDEAA + + + + + + + 1 + + 6 + {996, 10000000} + {463, 0} + + + + {{1, 1}, {497, 56}} + + + + + + {4, 5} + + 79691776 + + YES + + YES + + + + + file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff + + + + + + 3 + MCAwAA + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{20, 290}, {499, 58}} + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + + 266 + + YES + + + 2304 + + YES + + + 256 + {497, 74} + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 494 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + + + + 337772096 + 2048 + + + + 6 + System + controlBackgroundColor + + + + + 3 + YES + + + + 3 + 2 + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + 37748736 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {497, 74}} + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 68}} + + + _doScroller: + 0.35789470000000001 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + 1 + + _doScroller: + 0.99047620000000003 + + + {{20, 357}, {499, 76}} + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 290 + + YES + + + 2304 + + YES + + + 2322 + {497, 14} + + + + + + results + + + + + + YES + + + 6 + + + + 497 + 1 + + + 67119969 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + + + + + + 1 + + 6 + {996, 10000000} + {463, 0} + + + + {{1, 1}, {497, 56}} + + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{20, 85}, {499, 58}} + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + + 274 + + YES + + + 2304 + + YES + + + 256 + {497, 73} + + YES + + + -2147483392 + {{483, 0}, {16, 17}} + + + YES + + 494 + 16 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5ODU2AA + + + + + 67239488 + 2048 + Text Cell + + + + + + 3 + YES + YES + + + + 3 + 2 + + + 17 + -767557632 + + + tasksOutline + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {497, 73}} + + + + + 4 + + + + -2147483392 + {{483, 17}, {15, 42}} + + + _doScroller: + 0.98648648648648651 + + + + -2147483392 + {{1, 59}, {497, 15}} + + 1 + + _doScroller: + 0.99799196787148592 + + + {{20, 151}, {499, 75}} + + + 133682 + + + + QSAAAEEgAABBmAAAQZgAAA + + + + 289 + {{202, 60}, {42, 16}} + + YES + + 67239424 + 134479872 + Add + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 289 + {{315, 60}, {52, 16}} + + YES + + 67239424 + 134479872 + Delete + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 289 + {{250, 60}, {59, 16}} + + YES + + 67239424 + 134479872 + Rename + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 290 + {{57, 58}, {138, 19}} + + YES + + -1804468671 + 272761856 + + + + YES + + + + + + + 292 + {{17, 61}, {35, 14}} + + YES + + 67239424 + 272760832 + Title + + + + + + + + + 289 + {{373, 60}, {76, 16}} + + YES + + 67239424 + 134479872 + Uncomplete + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 265 + {{229, 232}, {80, 18}} + + YES + + -2080244224 + 131072 + Completed + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 265 + {{312, 232}, {60, 18}} + + YES + + 67239424 + 131072 + Hidden + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 265 + {{375, 232}, {63, 18}} + + YES + + 67239424 + 131072 + Deleted + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 289 + {{202, 38}, {125, 16}} + + YES + + -2080244224 + 134479872 + Clear Completed Tasks + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 289 + {{430, 38}, {66, 16}} + + YES + + -2080244224 + 134479872 + Delete All + + + -2038284033 + 1 + + + + 200 + 25 + + + + + 289 + {{333, 38}, {91, 16}} + + YES + + -2080244224 + 134479872 + Uncomplete All + + + -2038284033 + 1 + + + + 200 + 25 + + + + {539, 538} + + + {{0, 0}, {1920, 1178}} + {539, 515} + {10000000000000, 10000000000000} + YES + + + YES + + + 3 + 2 + {{235, 275}, {458, 284}} + 611844096 + Client ID Sheet + NSWindow + + + + + 256 + + YES + + + 266 + {{118, 143}, {320, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 143}, {63, 17}} + + YES + + 68288064 + 272630784 + Client ID: + + + + + + + + + 266 + {{118, 112}, {320, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 117}, {88, 17}} + + YES + + 68288064 + 272630784 + Client Secret: + + + + + + + + + 268 + {{338, 80}, {82, 20}} + + YES + + 67239424 + 134348800 + API Console + + + -2038284033 + 134 + + + 200 + 25 + + + + + 268 + {{17, 82}, {316, 17}} + + YES + + 68288064 + 272630784 + Client ID and Client Secret are obtained from the + + + + + + + + + 268 + {{17, 204}, {424, 34}} + + YES + + 67239424 + 138412032 + Each application should have a client ID and client secret hardcoded into the source. + + + + + + + + + 268 + {{348, 12}, {96, 32}} + + YES + + 67239424 + 134217728 + Done + + + -2038284033 + 129 + + DQ + 200 + 25 + + + + {458, 284} + + {{0, 0}, {1920, 1178}} + {10000000000000, 10000000000000} + YES + + + + + YES + + + window + + + + 16 + + + + mSpreadsheetTable + + + + 355 + + + + mSpreadsheetResultTextField + + + + 356 + + + + mSpreadsheetProgressIndicator + + + + 366 + + + + loggingCheckboxClicked: + + + + 600 + + + + signInClicked: + + + + 836 + + + + mTableTable + + + + 867 + + + + APIConsoleClicked: + + + + 925 + + + + clientIDClicked: + + + + 931 + + + + clientIDDoneClicked: + + + + 932 + + + + addTaskListClicked: + + + + 1003 + + + + renameTaskListClicked: + + + + 1005 + + + + deleteTaskListClicked: + + + + 1007 + + + + cancelTaskListsFetch: + + + + 1009 + + + + cancelTasksFetch: + + + + 1010 + + + + getTaskListsClicked: + + + + 1012 + + + + renameTaskClicked: + + + + 1021 + + + + addTaskClicked: + + + + 1022 + + + + deleteTaskClicked: + + + + 1023 + + + + completeTaskClicked: + + + + 1032 + + + + showTasksCheckboxClicked: + + + + 1043 + + + + showTasksCheckboxClicked: + + + + 1044 + + + + showTasksCheckboxClicked: + + + + 1045 + + + + clearTasksClicked: + + + + 1050 + + + + deleteAllTasksClicked: + + + + 1054 + + + + completeAllTasksClicked: + + + + 1059 + + + + signedInField_ + + + + 1062 + + + + signedInButton_ + + + + 1063 + + + + taskListsTable__ + + + + 1064 + + + + taskListsProgressIndicator_ + + + + 1065 + + + + taskListsResultTextView_ + + + + 1066 + + + + taskListsCancelButton_ + + + + 1067 + + + + addTaskListButton_ + + + + 1068 + + + + renameTaskListButton_ + + + + 1069 + + + + deleteTaskListButton_ + + + + 1070 + + + + taskListNameField_ + + + + 1071 + + + + tasksOutline_ + + + + 1072 + + + + tasksProgressIndicator_ + + + + 1073 + + + + tasksResultTextView_ + + + + 1074 + + + + showCompletedTasksCheckbox_ + + + + 1075 + + + + showHiddenTasksCheckbox_ + + + + 1076 + + + + showDeletedTasksCheckbox_ + + + + 1077 + + + + tasksCancelButton_ + + + + 1078 + + + + addTaskButton_ + + + + 1079 + + + + renameTaskButton_ + + + + 1080 + + + + deleteTaskButton_ + + + + 1081 + + + + completeTaskButton_ + + + + 1082 + + + + clearTasksButton_ + + + + 1083 + + + + completeAllTasksButton_ + + + + 1084 + + + + deleteAllTasksButton_ + + + + 1085 + + + + taskNameField_ + + + + 1086 + + + + clientIDButton_ + + + + 1087 + + + + clientIDRequiredTextField_ + + + + 1088 + + + + clientIDSheet_ + + + + 1089 + + + + clientIDField_ + + + + 1090 + + + + clientSecretField_ + + + + 1091 + + + + delegate + + + + 15 + + + + dataSource + + + + 588 + + + + delegate + + + + 589 + + + + delegate + + + + 736 + + + + value: values.clientID + + + + + + value: values.clientID + value + values.clientID + + NSContinuouslyUpdatesValue + + + 2 + + + 940 + + + + value: values.clientSecret + + + + + + value: values.clientSecret + value + values.clientSecret + + NSContinuouslyUpdatesValue + + + 2 + + + 939 + + + + dataSource + + + + 1013 + + + + delegate + + + + 1014 + + + + delegate + + + + 989 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 5 + + + YES + + + + Window + + + 6 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 17 + + + YES + + + + + + 40 + + + + + 139 + + + YES + + + + + + 556 + + + YES + + + + + + 558 + + + YES + + + + + + 653 + + + YES + + + + + + 655 + + + YES + + + + + + 657 + + + YES + + + + + + 44 + + + Shared Defaults + + + 744 + + + + + 746 + + + + + 749 + + + + + 750 + + + + + 752 + + + + + 753 + + + + + 754 + + + + + 796 + + + YES + + + + + + 797 + + + + + 828 + + + YES + + + + + + 829 + + + YES + + + + + + 830 + + + YES + + + + + + 831 + + + + + 832 + + + + + 833 + + + + + 861 + + + YES + + + + + + 862 + + + + + 863 + + + + + 900 + + + YES + + + + + + 901 + + + YES + + + + + + + + + + + + + 902 + + + YES + + + + + + 903 + + + YES + + + + + + 904 + + + YES + + + + + + 905 + + + YES + + + + + + 906 + + + YES + + + + + + 907 + + + YES + + + + + + 908 + + + YES + + + + + + 909 + + + + + 910 + + + + + 911 + + + + + 912 + + + + + 913 + + + + + 914 + + + + + 915 + + + + + 920 + + + YES + + + + + + 921 + + + + + 929 + + + YES + + + + + + 930 + + + + + 933 + + + YES + + + + + + 934 + + + + + 859 + + + YES + + + + + + 860 + + + + + 965 + + + YES + + + + + + 966 + + + + + 80 + + + YES + + + + + + + + 81 + + + + + 762 + + + + + 763 + + + + + 24 + + + YES + + + + + + + + 25 + + + YES + + + + + + 760 + + + + + 761 + + + + + 26 + + + YES + + + + + + 758 + + + + + 849 + + + YES + + + + + + + + 858 + + + + + 857 + + + + + 856 + + + + + 967 + + + YES + + + + + + + + 968 + + + + + 969 + + + + + 970 + + + YES + + + + + + 972 + + + YES + + + + + + 975 + + + + + 976 + + + YES + + + + + + 977 + + + YES + + + + + + 978 + + + YES + + + + + + 979 + + + YES + + + + + + 980 + + + YES + + + + + + 981 + + + + + 982 + + + + + 983 + + + + + 984 + + + + + 985 + + + + + 1029 + + + YES + + + + + + 1030 + + + + + 1034 + + + YES + + + + + + 1035 + + + + + 1036 + + + YES + + + + + + 1037 + + + + + 1038 + + + YES + + + + + + 1039 + + + + + 1046 + + + YES + + + + + + 1047 + + + + + 1051 + + + YES + + + + + + 1052 + + + + + 1056 + + + YES + + + + + + 1057 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 1029.IBPluginDependency + 1030.IBPluginDependency + 1034.IBPluginDependency + 1035.IBPluginDependency + 1036.IBPluginDependency + 1037.IBPluginDependency + 1038.IBPluginDependency + 1039.IBPluginDependency + 1046.IBAttributePlaceholdersKey + 1046.IBPluginDependency + 1047.IBPluginDependency + 1051.IBAttributePlaceholdersKey + 1051.IBPluginDependency + 1052.IBPluginDependency + 1056.IBAttributePlaceholdersKey + 1056.IBPluginDependency + 1057.IBPluginDependency + 139.IBPluginDependency + 17.IBPluginDependency + 24.IBPluginDependency + 25.IBPluginDependency + 26.IBPluginDependency + 40.IBPluginDependency + 44.IBPluginDependency + 5.IBPluginDependency + 5.IBWindowTemplateEditedContentRect + 556.IBPluginDependency + 558.IBPluginDependency + 6.IBPluginDependency + 653.IBPluginDependency + 655.IBPluginDependency + 657.IBPluginDependency + 744.IBPluginDependency + 746.IBPluginDependency + 749.IBPluginDependency + 750.IBPluginDependency + 752.IBPluginDependency + 753.IBPluginDependency + 754.IBPluginDependency + 758.IBPluginDependency + 758.IBShouldRemoveOnLegacySave + 760.IBPluginDependency + 760.IBShouldRemoveOnLegacySave + 761.IBPluginDependency + 761.IBShouldRemoveOnLegacySave + 762.IBPluginDependency + 762.IBShouldRemoveOnLegacySave + 763.IBPluginDependency + 763.IBShouldRemoveOnLegacySave + 796.IBPluginDependency + 797.IBPluginDependency + 80.IBPluginDependency + 81.IBPluginDependency + 828.IBPluginDependency + 829.IBPluginDependency + 830.IBPluginDependency + 831.IBPluginDependency + 832.IBPluginDependency + 833.IBPluginDependency + 849.IBPluginDependency + 856.IBPluginDependency + 857.IBPluginDependency + 857.IBShouldRemoveOnLegacySave + 858.IBPluginDependency + 858.IBShouldRemoveOnLegacySave + 859.IBPluginDependency + 860.IBPluginDependency + 861.IBPluginDependency + 862.IBPluginDependency + 863.IBPluginDependency + 900.IBPluginDependency + 900.IBWindowTemplateEditedContentRect + 900.NSWindowTemplate.visibleAtLaunch + 901.IBPluginDependency + 902.IBPluginDependency + 903.IBPluginDependency + 904.IBPluginDependency + 905.IBPluginDependency + 906.IBPluginDependency + 907.IBPluginDependency + 908.IBPluginDependency + 909.IBPluginDependency + 910.IBPluginDependency + 911.IBPluginDependency + 912.IBPluginDependency + 913.IBPluginDependency + 914.IBPluginDependency + 915.IBPluginDependency + 920.IBPluginDependency + 921.IBPluginDependency + 929.IBPluginDependency + 930.IBPluginDependency + 933.IBPluginDependency + 934.IBPluginDependency + 965.IBPluginDependency + 966.IBPluginDependency + 967.IBPluginDependency + 968.IBPluginDependency + 969.IBPluginDependency + 970.IBPluginDependency + 972.IBPluginDependency + 975.IBPluginDependency + 976.IBPluginDependency + 977.IBPluginDependency + 978.IBPluginDependency + 979.IBPluginDependency + 980.IBPluginDependency + 981.IBPluginDependency + 982.IBPluginDependency + 983.IBPluginDependency + 984.IBPluginDependency + 985.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Hides all tasks marked completed + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Hides all tasks marked completed + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Mark all tasks as complete or incomplete + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{37, 470}, {539, 538}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{319, 856}, {458, 284}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 1091 + + + + YES + + TasksSampleWindowController + NSWindowController + + YES + + YES + APIConsoleClicked: + addTaskClicked: + addTaskListClicked: + cancelTaskListsFetch: + cancelTasksFetch: + clearTasksClicked: + clientIDClicked: + clientIDDoneClicked: + completeAllTasksClicked: + completeTaskClicked: + deleteAllTasksClicked: + deleteTableClicked: + deleteTaskClicked: + deleteTaskListClicked: + getSpreadsheetClicked: + getTaskListsClicked: + loggingCheckboxClicked: + randomizeTableClicked: + renameTaskClicked: + renameTaskListClicked: + showTasksCheckboxClicked: + signInClicked: + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + APIConsoleClicked: + addTaskClicked: + addTaskListClicked: + cancelTaskListsFetch: + cancelTasksFetch: + clearTasksClicked: + clientIDClicked: + clientIDDoneClicked: + completeAllTasksClicked: + completeTaskClicked: + deleteAllTasksClicked: + deleteTableClicked: + deleteTaskClicked: + deleteTaskListClicked: + getSpreadsheetClicked: + getTaskListsClicked: + loggingCheckboxClicked: + randomizeTableClicked: + renameTaskClicked: + renameTaskListClicked: + showTasksCheckboxClicked: + signInClicked: + + + YES + + APIConsoleClicked: + id + + + addTaskClicked: + id + + + addTaskListClicked: + id + + + cancelTaskListsFetch: + id + + + cancelTasksFetch: + id + + + clearTasksClicked: + id + + + clientIDClicked: + id + + + clientIDDoneClicked: + id + + + completeAllTasksClicked: + id + + + completeTaskClicked: + id + + + deleteAllTasksClicked: + id + + + deleteTableClicked: + id + + + deleteTaskClicked: + id + + + deleteTaskListClicked: + id + + + getSpreadsheetClicked: + id + + + getTaskListsClicked: + id + + + loggingCheckboxClicked: + id + + + randomizeTableClicked: + id + + + renameTaskClicked: + id + + + renameTaskListClicked: + id + + + showTasksCheckboxClicked: + id + + + signInClicked: + id + + + + + YES + + YES + addTaskButton_ + addTaskListButton_ + clearTasksButton_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + completeAllTasksButton_ + completeTaskButton_ + deleteAllTasksButton_ + deleteTaskButton_ + deleteTaskListButton_ + mRecordProgressIndicator + mRecordResultTextField + mRecordTable + mSpreadsheetProgressIndicator + mSpreadsheetResultTextField + mSpreadsheetTable + mTableProgressIndicator + mTableResultTextField + mTableTable + mWorksheetProgressIndicator + mWorksheetResultTextField + mWorksheetTable + renameTaskButton_ + renameTaskListButton_ + showCompletedTasksCheckbox_ + showDeletedTasksCheckbox_ + showHiddenTasksCheckbox_ + signedInButton_ + signedInField_ + taskListNameField_ + taskListsCancelButton_ + taskListsProgressIndicator_ + taskListsResultTextView_ + taskListsTable__ + taskNameField_ + tasksCancelButton_ + tasksOutline_ + tasksProgressIndicator_ + tasksResultTextView_ + + + YES + NSButton + NSButton + NSButton + NSButton + NSTextField + NSTextField + NSWindow + NSTextField + NSButton + NSButton + NSButton + NSButton + NSButton + NSProgressIndicator + NSTextView + NSTableView + NSProgressIndicator + NSTextView + NSTableView + NSProgressIndicator + NSTextView + NSTableView + NSProgressIndicator + NSTextView + NSTableView + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSTextField + NSTextField + NSButton + NSProgressIndicator + NSTextView + NSTableView + NSTextField + NSButton + NSOutlineView + NSProgressIndicator + NSTextView + + + + YES + + YES + addTaskButton_ + addTaskListButton_ + clearTasksButton_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + completeAllTasksButton_ + completeTaskButton_ + deleteAllTasksButton_ + deleteTaskButton_ + deleteTaskListButton_ + mRecordProgressIndicator + mRecordResultTextField + mRecordTable + mSpreadsheetProgressIndicator + mSpreadsheetResultTextField + mSpreadsheetTable + mTableProgressIndicator + mTableResultTextField + mTableTable + mWorksheetProgressIndicator + mWorksheetResultTextField + mWorksheetTable + renameTaskButton_ + renameTaskListButton_ + showCompletedTasksCheckbox_ + showDeletedTasksCheckbox_ + showHiddenTasksCheckbox_ + signedInButton_ + signedInField_ + taskListNameField_ + taskListsCancelButton_ + taskListsProgressIndicator_ + taskListsResultTextView_ + taskListsTable__ + taskNameField_ + tasksCancelButton_ + tasksOutline_ + tasksProgressIndicator_ + tasksResultTextView_ + + + YES + + addTaskButton_ + NSButton + + + addTaskListButton_ + NSButton + + + clearTasksButton_ + NSButton + + + clientIDButton_ + NSButton + + + clientIDField_ + NSTextField + + + clientIDRequiredTextField_ + NSTextField + + + clientIDSheet_ + NSWindow + + + clientSecretField_ + NSTextField + + + completeAllTasksButton_ + NSButton + + + completeTaskButton_ + NSButton + + + deleteAllTasksButton_ + NSButton + + + deleteTaskButton_ + NSButton + + + deleteTaskListButton_ + NSButton + + + mRecordProgressIndicator + NSProgressIndicator + + + mRecordResultTextField + NSTextView + + + mRecordTable + NSTableView + + + mSpreadsheetProgressIndicator + NSProgressIndicator + + + mSpreadsheetResultTextField + NSTextView + + + mSpreadsheetTable + NSTableView + + + mTableProgressIndicator + NSProgressIndicator + + + mTableResultTextField + NSTextView + + + mTableTable + NSTableView + + + mWorksheetProgressIndicator + NSProgressIndicator + + + mWorksheetResultTextField + NSTextView + + + mWorksheetTable + NSTableView + + + renameTaskButton_ + NSButton + + + renameTaskListButton_ + NSButton + + + showCompletedTasksCheckbox_ + NSButton + + + showDeletedTasksCheckbox_ + NSButton + + + showHiddenTasksCheckbox_ + NSButton + + + signedInButton_ + NSButton + + + signedInField_ + NSTextField + + + taskListNameField_ + NSTextField + + + taskListsCancelButton_ + NSButton + + + taskListsProgressIndicator_ + NSProgressIndicator + + + taskListsResultTextView_ + NSTextView + + + taskListsTable__ + NSTableView + + + taskNameField_ + NSTextField + + + tasksCancelButton_ + NSButton + + + tasksOutline_ + NSOutlineView + + + tasksProgressIndicator_ + NSProgressIndicator + + + tasksResultTextView_ + NSTextView + + + + + IBProjectSource + ./Classes/TasksSampleWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + NSSwitch + {15, 15} + + + diff --git a/GTL/Examples/TasksSample/Info.plist b/GTL/Examples/TasksSample/Info.plist new file mode 100644 index 0000000..0f7ed84 --- /dev/null +++ b/GTL/Examples/TasksSample/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.example.TasksSample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/GTL/Examples/TasksSample/README.txt b/GTL/Examples/TasksSample/README.txt new file mode 100644 index 0000000..ff257a0 --- /dev/null +++ b/GTL/Examples/TasksSample/README.txt @@ -0,0 +1 @@ +This sample should automatically build and copy over the GTL.framework as part of the build-and-run process. diff --git a/GTL/Examples/TasksSample/TasksSample.xcodeproj/.svn/all-wcprops b/GTL/Examples/TasksSample/TasksSample.xcodeproj/.svn/all-wcprops new file mode 100644 index 0000000..016bcd5 --- /dev/null +++ b/GTL/Examples/TasksSample/TasksSample.xcodeproj/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 66 +/svn/!svn/ver/154/trunk/Examples/TasksSample/TasksSample.xcodeproj +END +project.pbxproj +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/154/trunk/Examples/TasksSample/TasksSample.xcodeproj/project.pbxproj +END diff --git a/GTL/Examples/TasksSample/TasksSample.xcodeproj/.svn/entries b/GTL/Examples/TasksSample/TasksSample.xcodeproj/.svn/entries new file mode 100644 index 0000000..d26789f --- /dev/null +++ b/GTL/Examples/TasksSample/TasksSample.xcodeproj/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/TasksSample/TasksSample.xcodeproj +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +project.pbxproj +file + + + + +2012-12-09T08:42:34.000000Z +016396ecc20f450619704d082bd73ba7 +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +23649 + diff --git a/GTL/Examples/TasksSample/TasksSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base b/GTL/Examples/TasksSample/TasksSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base new file mode 100644 index 0000000..e513ad2 --- /dev/null +++ b/GTL/Examples/TasksSample/TasksSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base @@ -0,0 +1,526 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F22A2141186315400FFBAB6 /* WebKit.framework */; }; + 4F2445C8121F0D2900FEE1DA /* GTL.framework in Copy GTL Framework */ = {isa = PBXBuildFile; fileRef = 4F2445BE121F0CF600FEE1DA /* GTL.framework */; }; + 4F2445C9121F0D2C00FEE1DA /* GTL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F2445BE121F0CF600FEE1DA /* GTL.framework */; }; + 4F82A5140FCDFECC00C477D4 /* TasksSampleAppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F82A5100FCDFECC00C477D4 /* TasksSampleAppController.m */; }; + 4F82A5150FCDFECC00C477D4 /* TasksSampleWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F82A5120FCDFECC00C477D4 /* TasksSampleWindowController.m */; }; + 4FA544A3134E93EE00068326 /* TasksSampleWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA544A1134E93EE00068326 /* TasksSampleWindow.xib */; }; + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */; }; + 4FB2539C138C3FE500B5C1AE /* GTLQueryTasks.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FB2538E138C3FE500B5C1AE /* GTLQueryTasks.m */; }; + 4FB2539D138C3FE500B5C1AE /* GTLServiceTasks.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FB25390138C3FE500B5C1AE /* GTLServiceTasks.m */; }; + 4FB2539E138C3FE500B5C1AE /* GTLTasksConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FB25393138C3FE500B5C1AE /* GTLTasksConstants.m */; }; + 4FB2539F138C3FE500B5C1AE /* GTLTasksTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FB25395138C3FE500B5C1AE /* GTLTasksTask.m */; }; + 4FB253A0138C3FE500B5C1AE /* GTLTasksTaskList.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FB25397138C3FE500B5C1AE /* GTLTasksTaskList.m */; }; + 4FB253A1138C3FE500B5C1AE /* GTLTasksTaskLists.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FB25399138C3FE500B5C1AE /* GTLTasksTaskLists.m */; }; + 4FB253A2138C3FE500B5C1AE /* GTLTasksTasks.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FB2539B138C3FE500B5C1AE /* GTLTasksTasks.m */; }; + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4F2445BD121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F38F6A60B66E91D00B24B81; + remoteInfo = GTLFramework; + }; + 4F2445BF121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027C11A4CA2F00BEB470; + remoteInfo = GTLTouchStaticLib; + }; + 4F2445C1121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027D11A4CA2F00BEB470; + remoteInfo = GTLUnitTests; + }; + 4F2445C3121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F1AD9020B71603F00DC0485; + remoteInfo = DevelopmentTestTool; + }; + 4F72439E12233FAF001A4AD0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 4F38F6A50B66E91D00B24B81; + remoteInfo = GTLFramework; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 4F38F8970B66FAB700B24B81 /* Copy GTL Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4F2445C8121F0D2900FEE1DA /* GTL.framework in Copy GTL Framework */, + ); + name = "Copy GTL Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 4F22A2141186315400FFBAB6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; + 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GTL.xcodeproj; path = ../../Source/GTL.xcodeproj; sourceTree = SOURCE_ROOT; }; + 4F82A5100FCDFECC00C477D4 /* TasksSampleAppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TasksSampleAppController.m; sourceTree = ""; }; + 4F82A5110FCDFECC00C477D4 /* TasksSampleAppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TasksSampleAppController.h; sourceTree = ""; }; + 4F82A5120FCDFECC00C477D4 /* TasksSampleWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TasksSampleWindowController.m; sourceTree = ""; }; + 4F82A5130FCDFECC00C477D4 /* TasksSampleWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TasksSampleWindowController.h; sourceTree = ""; }; + 4FA544A2134E93EE00068326 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/TasksSampleWindow.xib; sourceTree = ""; }; + 4FA6F3D21034AEC400C5DFA5 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; + 4FB2538D138C3FE500B5C1AE /* GTLQueryTasks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLQueryTasks.h; sourceTree = ""; }; + 4FB2538E138C3FE500B5C1AE /* GTLQueryTasks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLQueryTasks.m; sourceTree = ""; }; + 4FB2538F138C3FE500B5C1AE /* GTLServiceTasks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLServiceTasks.h; sourceTree = ""; }; + 4FB25390138C3FE500B5C1AE /* GTLServiceTasks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLServiceTasks.m; sourceTree = ""; }; + 4FB25391138C3FE500B5C1AE /* GTLTasks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLTasks.h; sourceTree = ""; }; + 4FB25392138C3FE500B5C1AE /* GTLTasksConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLTasksConstants.h; sourceTree = ""; }; + 4FB25393138C3FE500B5C1AE /* GTLTasksConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLTasksConstants.m; sourceTree = ""; }; + 4FB25394138C3FE500B5C1AE /* GTLTasksTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLTasksTask.h; sourceTree = ""; }; + 4FB25395138C3FE500B5C1AE /* GTLTasksTask.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLTasksTask.m; sourceTree = ""; }; + 4FB25396138C3FE500B5C1AE /* GTLTasksTaskList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLTasksTaskList.h; sourceTree = ""; }; + 4FB25397138C3FE500B5C1AE /* GTLTasksTaskList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLTasksTaskList.m; sourceTree = ""; }; + 4FB25398138C3FE500B5C1AE /* GTLTasksTaskLists.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLTasksTaskLists.h; sourceTree = ""; }; + 4FB25399138C3FE500B5C1AE /* GTLTasksTaskLists.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLTasksTaskLists.m; sourceTree = ""; }; + 4FB2539A138C3FE500B5C1AE /* GTLTasksTasks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLTasksTasks.h; sourceTree = ""; }; + 4FB2539B138C3FE500B5C1AE /* GTLTasksTasks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLTasksTasks.m; sourceTree = ""; }; + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = buildStripHeaders; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 8D1107320486CEB800E47090 /* TasksSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TasksSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F2445C9121F0D2C00FEE1DA /* GTL.framework in Frameworks */, + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 4F82A5110FCDFECC00C477D4 /* TasksSampleAppController.h */, + 4F82A5100FCDFECC00C477D4 /* TasksSampleAppController.m */, + 4F82A5130FCDFECC00C477D4 /* TasksSampleWindowController.h */, + 4F82A5120FCDFECC00C477D4 /* TasksSampleWindowController.m */, + ); + name = Classes; + sourceTree = ""; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 4F22A2141186315400FFBAB6 /* WebKit.framework */, + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* TasksSample.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CalendarSample */ = { + isa = PBXGroup; + children = ( + 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */, + 080E96DDFE201D6D7F000001 /* Classes */, + 4FB25385138C3F9E00B5C1AE /* API Services */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CalendarSample; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 4FA544A1134E93EE00068326 /* TasksSampleWindow.xib */, + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */, + 8D1107310486CEB800E47090 /* Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4F2445B7121F0CF600FEE1DA /* Products */ = { + isa = PBXGroup; + children = ( + 4F2445BE121F0CF600FEE1DA /* GTL.framework */, + 4F2445C0121F0CF600FEE1DA /* libGTLTouchStaticLib.a */, + 4F2445C2121F0CF600FEE1DA /* GTLUnitTests.octest */, + 4F2445C4121F0CF600FEE1DA /* DevelopmentTestTool */, + ); + name = Products; + sourceTree = ""; + }; + 4FB25385138C3F9E00B5C1AE /* API Services */ = { + isa = PBXGroup; + children = ( + 4FB2538B138C3FE500B5C1AE /* Tasks */, + ); + name = "API Services"; + sourceTree = ""; + }; + 4FB2538B138C3FE500B5C1AE /* Tasks */ = { + isa = PBXGroup; + children = ( + 4FB2538C138C3FE500B5C1AE /* Generated */, + ); + name = Tasks; + path = ../../Source/Services/Tasks; + sourceTree = SOURCE_ROOT; + }; + 4FB2538C138C3FE500B5C1AE /* Generated */ = { + isa = PBXGroup; + children = ( + 4FB2538D138C3FE500B5C1AE /* GTLQueryTasks.h */, + 4FB2538E138C3FE500B5C1AE /* GTLQueryTasks.m */, + 4FB2538F138C3FE500B5C1AE /* GTLServiceTasks.h */, + 4FB25390138C3FE500B5C1AE /* GTLServiceTasks.m */, + 4FB25391138C3FE500B5C1AE /* GTLTasks.h */, + 4FB25392138C3FE500B5C1AE /* GTLTasksConstants.h */, + 4FB25393138C3FE500B5C1AE /* GTLTasksConstants.m */, + 4FB25394138C3FE500B5C1AE /* GTLTasksTask.h */, + 4FB25395138C3FE500B5C1AE /* GTLTasksTask.m */, + 4FB25396138C3FE500B5C1AE /* GTLTasksTaskList.h */, + 4FB25397138C3FE500B5C1AE /* GTLTasksTaskList.m */, + 4FB25398138C3FE500B5C1AE /* GTLTasksTaskLists.h */, + 4FB25399138C3FE500B5C1AE /* GTLTasksTaskLists.m */, + 4FB2539A138C3FE500B5C1AE /* GTLTasksTasks.h */, + 4FB2539B138C3FE500B5C1AE /* GTLTasksTasks.m */, + ); + path = Generated; + sourceTree = ""; + }; + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */ = { + isa = PBXGroup; + children = ( + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */, + ); + name = "Build Scripts"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* TasksSample */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "TasksSample" */; + buildPhases = ( + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + 4F38F8970B66FAB700B24B81 /* Copy GTL Framework */, + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */, + ); + buildRules = ( + ); + dependencies = ( + 4F72439F12233FAF001A4AD0 /* PBXTargetDependency */, + ); + name = TasksSample; + productInstallPath = "$(HOME)/Applications"; + productName = CalendarSample; + productReference = 8D1107320486CEB800E47090 /* TasksSample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TasksSample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CalendarSample */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 4F2445B7121F0CF600FEE1DA /* Products */; + ProjectRef = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* TasksSample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 4F2445BE121F0CF600FEE1DA /* GTL.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = GTL.framework; + remoteRef = 4F2445BD121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C0121F0CF600FEE1DA /* libGTLTouchStaticLib.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libGTLTouchStaticLib.a; + remoteRef = 4F2445BF121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C2121F0CF600FEE1DA /* GTLUnitTests.octest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = GTLUnitTests.octest; + remoteRef = 4F2445C1121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C4121F0CF600FEE1DA /* DevelopmentTestTool */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = DevelopmentTestTool; + remoteRef = 4F2445C3121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */, + 4FA544A3134E93EE00068326 /* TasksSampleWindow.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Strip Headers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ./buildStripHeaders; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072D0486CEB800E47090 /* main.m in Sources */, + 4F82A5140FCDFECC00C477D4 /* TasksSampleAppController.m in Sources */, + 4F82A5150FCDFECC00C477D4 /* TasksSampleWindowController.m in Sources */, + 4FB2539C138C3FE500B5C1AE /* GTLQueryTasks.m in Sources */, + 4FB2539D138C3FE500B5C1AE /* GTLServiceTasks.m in Sources */, + 4FB2539E138C3FE500B5C1AE /* GTLTasksConstants.m in Sources */, + 4FB2539F138C3FE500B5C1AE /* GTLTasksTask.m in Sources */, + 4FB253A0138C3FE500B5C1AE /* GTLTasksTaskList.m in Sources */, + 4FB253A1138C3FE500B5C1AE /* GTLTasksTaskLists.m in Sources */, + 4FB253A2138C3FE500B5C1AE /* GTLTasksTasks.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 4F72439F12233FAF001A4AD0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = GTLFramework; + targetProxy = 4F72439E12233FAF001A4AD0 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C165DFE840E0CC02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 4FA544A1134E93EE00068326 /* TasksSampleWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 4FA544A2134E93EE00068326 /* English */, + ); + name = TasksSampleWindow.xib; + sourceTree = ""; + }; + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 4FA6F3D21034AEC400C5DFA5 /* English */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = TasksSample; + RUN_CLANG_STATIC_ANALYZER = YES; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = TasksSample; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = ( + "-DGTL_BUILT_AS_FRAMEWORK=1", + "-DDEBUG=1", + ); + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DGTL_BUILT_AS_FRAMEWORK=1"; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "TasksSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TasksSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/GTL/Examples/TasksSample/TasksSample.xcodeproj/project.pbxproj b/GTL/Examples/TasksSample/TasksSample.xcodeproj/project.pbxproj new file mode 100644 index 0000000..e513ad2 --- /dev/null +++ b/GTL/Examples/TasksSample/TasksSample.xcodeproj/project.pbxproj @@ -0,0 +1,526 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F22A2141186315400FFBAB6 /* WebKit.framework */; }; + 4F2445C8121F0D2900FEE1DA /* GTL.framework in Copy GTL Framework */ = {isa = PBXBuildFile; fileRef = 4F2445BE121F0CF600FEE1DA /* GTL.framework */; }; + 4F2445C9121F0D2C00FEE1DA /* GTL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F2445BE121F0CF600FEE1DA /* GTL.framework */; }; + 4F82A5140FCDFECC00C477D4 /* TasksSampleAppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F82A5100FCDFECC00C477D4 /* TasksSampleAppController.m */; }; + 4F82A5150FCDFECC00C477D4 /* TasksSampleWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F82A5120FCDFECC00C477D4 /* TasksSampleWindowController.m */; }; + 4FA544A3134E93EE00068326 /* TasksSampleWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA544A1134E93EE00068326 /* TasksSampleWindow.xib */; }; + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */; }; + 4FB2539C138C3FE500B5C1AE /* GTLQueryTasks.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FB2538E138C3FE500B5C1AE /* GTLQueryTasks.m */; }; + 4FB2539D138C3FE500B5C1AE /* GTLServiceTasks.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FB25390138C3FE500B5C1AE /* GTLServiceTasks.m */; }; + 4FB2539E138C3FE500B5C1AE /* GTLTasksConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FB25393138C3FE500B5C1AE /* GTLTasksConstants.m */; }; + 4FB2539F138C3FE500B5C1AE /* GTLTasksTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FB25395138C3FE500B5C1AE /* GTLTasksTask.m */; }; + 4FB253A0138C3FE500B5C1AE /* GTLTasksTaskList.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FB25397138C3FE500B5C1AE /* GTLTasksTaskList.m */; }; + 4FB253A1138C3FE500B5C1AE /* GTLTasksTaskLists.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FB25399138C3FE500B5C1AE /* GTLTasksTaskLists.m */; }; + 4FB253A2138C3FE500B5C1AE /* GTLTasksTasks.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FB2539B138C3FE500B5C1AE /* GTLTasksTasks.m */; }; + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4F2445BD121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F38F6A60B66E91D00B24B81; + remoteInfo = GTLFramework; + }; + 4F2445BF121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027C11A4CA2F00BEB470; + remoteInfo = GTLTouchStaticLib; + }; + 4F2445C1121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027D11A4CA2F00BEB470; + remoteInfo = GTLUnitTests; + }; + 4F2445C3121F0CF600FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F1AD9020B71603F00DC0485; + remoteInfo = DevelopmentTestTool; + }; + 4F72439E12233FAF001A4AD0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 4F38F6A50B66E91D00B24B81; + remoteInfo = GTLFramework; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 4F38F8970B66FAB700B24B81 /* Copy GTL Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4F2445C8121F0D2900FEE1DA /* GTL.framework in Copy GTL Framework */, + ); + name = "Copy GTL Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 4F22A2141186315400FFBAB6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; + 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GTL.xcodeproj; path = ../../Source/GTL.xcodeproj; sourceTree = SOURCE_ROOT; }; + 4F82A5100FCDFECC00C477D4 /* TasksSampleAppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TasksSampleAppController.m; sourceTree = ""; }; + 4F82A5110FCDFECC00C477D4 /* TasksSampleAppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TasksSampleAppController.h; sourceTree = ""; }; + 4F82A5120FCDFECC00C477D4 /* TasksSampleWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TasksSampleWindowController.m; sourceTree = ""; }; + 4F82A5130FCDFECC00C477D4 /* TasksSampleWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TasksSampleWindowController.h; sourceTree = ""; }; + 4FA544A2134E93EE00068326 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/TasksSampleWindow.xib; sourceTree = ""; }; + 4FA6F3D21034AEC400C5DFA5 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; + 4FB2538D138C3FE500B5C1AE /* GTLQueryTasks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLQueryTasks.h; sourceTree = ""; }; + 4FB2538E138C3FE500B5C1AE /* GTLQueryTasks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLQueryTasks.m; sourceTree = ""; }; + 4FB2538F138C3FE500B5C1AE /* GTLServiceTasks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLServiceTasks.h; sourceTree = ""; }; + 4FB25390138C3FE500B5C1AE /* GTLServiceTasks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLServiceTasks.m; sourceTree = ""; }; + 4FB25391138C3FE500B5C1AE /* GTLTasks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLTasks.h; sourceTree = ""; }; + 4FB25392138C3FE500B5C1AE /* GTLTasksConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLTasksConstants.h; sourceTree = ""; }; + 4FB25393138C3FE500B5C1AE /* GTLTasksConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLTasksConstants.m; sourceTree = ""; }; + 4FB25394138C3FE500B5C1AE /* GTLTasksTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLTasksTask.h; sourceTree = ""; }; + 4FB25395138C3FE500B5C1AE /* GTLTasksTask.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLTasksTask.m; sourceTree = ""; }; + 4FB25396138C3FE500B5C1AE /* GTLTasksTaskList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLTasksTaskList.h; sourceTree = ""; }; + 4FB25397138C3FE500B5C1AE /* GTLTasksTaskList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLTasksTaskList.m; sourceTree = ""; }; + 4FB25398138C3FE500B5C1AE /* GTLTasksTaskLists.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLTasksTaskLists.h; sourceTree = ""; }; + 4FB25399138C3FE500B5C1AE /* GTLTasksTaskLists.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLTasksTaskLists.m; sourceTree = ""; }; + 4FB2539A138C3FE500B5C1AE /* GTLTasksTasks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLTasksTasks.h; sourceTree = ""; }; + 4FB2539B138C3FE500B5C1AE /* GTLTasksTasks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLTasksTasks.m; sourceTree = ""; }; + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = buildStripHeaders; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 8D1107320486CEB800E47090 /* TasksSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TasksSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F2445C9121F0D2C00FEE1DA /* GTL.framework in Frameworks */, + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 4F82A5110FCDFECC00C477D4 /* TasksSampleAppController.h */, + 4F82A5100FCDFECC00C477D4 /* TasksSampleAppController.m */, + 4F82A5130FCDFECC00C477D4 /* TasksSampleWindowController.h */, + 4F82A5120FCDFECC00C477D4 /* TasksSampleWindowController.m */, + ); + name = Classes; + sourceTree = ""; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 4F22A2141186315400FFBAB6 /* WebKit.framework */, + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* TasksSample.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CalendarSample */ = { + isa = PBXGroup; + children = ( + 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */, + 080E96DDFE201D6D7F000001 /* Classes */, + 4FB25385138C3F9E00B5C1AE /* API Services */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CalendarSample; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 4FA544A1134E93EE00068326 /* TasksSampleWindow.xib */, + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */, + 8D1107310486CEB800E47090 /* Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4F2445B7121F0CF600FEE1DA /* Products */ = { + isa = PBXGroup; + children = ( + 4F2445BE121F0CF600FEE1DA /* GTL.framework */, + 4F2445C0121F0CF600FEE1DA /* libGTLTouchStaticLib.a */, + 4F2445C2121F0CF600FEE1DA /* GTLUnitTests.octest */, + 4F2445C4121F0CF600FEE1DA /* DevelopmentTestTool */, + ); + name = Products; + sourceTree = ""; + }; + 4FB25385138C3F9E00B5C1AE /* API Services */ = { + isa = PBXGroup; + children = ( + 4FB2538B138C3FE500B5C1AE /* Tasks */, + ); + name = "API Services"; + sourceTree = ""; + }; + 4FB2538B138C3FE500B5C1AE /* Tasks */ = { + isa = PBXGroup; + children = ( + 4FB2538C138C3FE500B5C1AE /* Generated */, + ); + name = Tasks; + path = ../../Source/Services/Tasks; + sourceTree = SOURCE_ROOT; + }; + 4FB2538C138C3FE500B5C1AE /* Generated */ = { + isa = PBXGroup; + children = ( + 4FB2538D138C3FE500B5C1AE /* GTLQueryTasks.h */, + 4FB2538E138C3FE500B5C1AE /* GTLQueryTasks.m */, + 4FB2538F138C3FE500B5C1AE /* GTLServiceTasks.h */, + 4FB25390138C3FE500B5C1AE /* GTLServiceTasks.m */, + 4FB25391138C3FE500B5C1AE /* GTLTasks.h */, + 4FB25392138C3FE500B5C1AE /* GTLTasksConstants.h */, + 4FB25393138C3FE500B5C1AE /* GTLTasksConstants.m */, + 4FB25394138C3FE500B5C1AE /* GTLTasksTask.h */, + 4FB25395138C3FE500B5C1AE /* GTLTasksTask.m */, + 4FB25396138C3FE500B5C1AE /* GTLTasksTaskList.h */, + 4FB25397138C3FE500B5C1AE /* GTLTasksTaskList.m */, + 4FB25398138C3FE500B5C1AE /* GTLTasksTaskLists.h */, + 4FB25399138C3FE500B5C1AE /* GTLTasksTaskLists.m */, + 4FB2539A138C3FE500B5C1AE /* GTLTasksTasks.h */, + 4FB2539B138C3FE500B5C1AE /* GTLTasksTasks.m */, + ); + path = Generated; + sourceTree = ""; + }; + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */ = { + isa = PBXGroup; + children = ( + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */, + ); + name = "Build Scripts"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* TasksSample */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "TasksSample" */; + buildPhases = ( + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + 4F38F8970B66FAB700B24B81 /* Copy GTL Framework */, + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */, + ); + buildRules = ( + ); + dependencies = ( + 4F72439F12233FAF001A4AD0 /* PBXTargetDependency */, + ); + name = TasksSample; + productInstallPath = "$(HOME)/Applications"; + productName = CalendarSample; + productReference = 8D1107320486CEB800E47090 /* TasksSample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TasksSample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CalendarSample */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 4F2445B7121F0CF600FEE1DA /* Products */; + ProjectRef = 4F2445B6121F0CF600FEE1DA /* GTL.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* TasksSample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 4F2445BE121F0CF600FEE1DA /* GTL.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = GTL.framework; + remoteRef = 4F2445BD121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C0121F0CF600FEE1DA /* libGTLTouchStaticLib.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libGTLTouchStaticLib.a; + remoteRef = 4F2445BF121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C2121F0CF600FEE1DA /* GTLUnitTests.octest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = GTLUnitTests.octest; + remoteRef = 4F2445C1121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F2445C4121F0CF600FEE1DA /* DevelopmentTestTool */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = DevelopmentTestTool; + remoteRef = 4F2445C3121F0CF600FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */, + 4FA544A3134E93EE00068326 /* TasksSampleWindow.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Strip Headers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ./buildStripHeaders; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072D0486CEB800E47090 /* main.m in Sources */, + 4F82A5140FCDFECC00C477D4 /* TasksSampleAppController.m in Sources */, + 4F82A5150FCDFECC00C477D4 /* TasksSampleWindowController.m in Sources */, + 4FB2539C138C3FE500B5C1AE /* GTLQueryTasks.m in Sources */, + 4FB2539D138C3FE500B5C1AE /* GTLServiceTasks.m in Sources */, + 4FB2539E138C3FE500B5C1AE /* GTLTasksConstants.m in Sources */, + 4FB2539F138C3FE500B5C1AE /* GTLTasksTask.m in Sources */, + 4FB253A0138C3FE500B5C1AE /* GTLTasksTaskList.m in Sources */, + 4FB253A1138C3FE500B5C1AE /* GTLTasksTaskLists.m in Sources */, + 4FB253A2138C3FE500B5C1AE /* GTLTasksTasks.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 4F72439F12233FAF001A4AD0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = GTLFramework; + targetProxy = 4F72439E12233FAF001A4AD0 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C165DFE840E0CC02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 4FA544A1134E93EE00068326 /* TasksSampleWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 4FA544A2134E93EE00068326 /* English */, + ); + name = TasksSampleWindow.xib; + sourceTree = ""; + }; + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 4FA6F3D21034AEC400C5DFA5 /* English */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = TasksSample; + RUN_CLANG_STATIC_ANALYZER = YES; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = TasksSample; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = ( + "-DGTL_BUILT_AS_FRAMEWORK=1", + "-DDEBUG=1", + ); + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DGTL_BUILT_AS_FRAMEWORK=1"; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "TasksSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TasksSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/GTL/Examples/TasksSample/TasksSampleAppController.h b/GTL/Examples/TasksSample/TasksSampleAppController.h new file mode 100644 index 0000000..d093654 --- /dev/null +++ b/GTL/Examples/TasksSample/TasksSampleAppController.h @@ -0,0 +1,23 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// TasksSampleAppController.h +// + +#import + +@interface TasksSampleAppController : NSObject +@end diff --git a/GTL/Examples/TasksSample/TasksSampleAppController.m b/GTL/Examples/TasksSample/TasksSampleAppController.m new file mode 100644 index 0000000..02bb651 --- /dev/null +++ b/GTL/Examples/TasksSample/TasksSampleAppController.m @@ -0,0 +1,35 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// TasksSampleAppController.m +// + +#import "TasksSampleAppController.h" +#import "TasksSampleWindowController.h" + +@implementation TasksSampleAppController + +- (void)applicationWillFinishLaunching:(NSNotification *)notification { + TasksSampleWindowController* windowController + = [TasksSampleWindowController sharedWindowController]; + [windowController showWindow:self]; +} + +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { + return YES; +} + +@end diff --git a/GTL/Examples/TasksSample/TasksSampleWindowController.h b/GTL/Examples/TasksSample/TasksSampleWindowController.h new file mode 100644 index 0000000..343d10e --- /dev/null +++ b/GTL/Examples/TasksSample/TasksSampleWindowController.h @@ -0,0 +1,106 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// TasksSampleWindowController.h +// + +#import + +#import "GTLTasks.h" +#import "GTL/GTMOAuth2WindowController.h" + +@interface TasksSampleWindowController : NSWindowController { + @private + IBOutlet NSTextField *signedInField_; + IBOutlet NSButton *signedInButton_; + + IBOutlet NSTableView *taskListsTable__; + IBOutlet NSProgressIndicator *taskListsProgressIndicator_; + IBOutlet NSTextView *taskListsResultTextView_; + + IBOutlet NSButton *taskListsCancelButton_; + + IBOutlet NSButton *addTaskListButton_; + IBOutlet NSButton *renameTaskListButton_; + IBOutlet NSButton *deleteTaskListButton_; + IBOutlet NSTextField *taskListNameField_; + + IBOutlet NSOutlineView *tasksOutline_; + IBOutlet NSProgressIndicator *tasksProgressIndicator_; + IBOutlet NSTextView *tasksResultTextView_; + + IBOutlet NSButton *showCompletedTasksCheckbox_; + IBOutlet NSButton *showHiddenTasksCheckbox_; + IBOutlet NSButton *showDeletedTasksCheckbox_; + IBOutlet NSButton *tasksCancelButton_; + + IBOutlet NSButton *addTaskButton_; + IBOutlet NSButton *renameTaskButton_; + IBOutlet NSButton *deleteTaskButton_; + IBOutlet NSButton *completeTaskButton_; + IBOutlet NSButton *clearTasksButton_; + IBOutlet NSButton *completeAllTasksButton_; + IBOutlet NSButton *deleteAllTasksButton_; + IBOutlet NSTextField *taskNameField_; + + IBOutlet NSButton *clientIDButton_; + IBOutlet NSTextField *clientIDRequiredTextField_; + IBOutlet NSWindow *clientIDSheet_; + IBOutlet NSTextField *clientIDField_; + IBOutlet NSTextField *clientSecretField_; + + GTLTasksTaskLists *tasksLists_; + GTLServiceTicket *taskListsTicket_; + NSError *taskListsFetchError_; + + GTLServiceTicket *editTaskListTicket_; + + GTLTasksTasks *tasks_; + GTLServiceTicket *tasksTicket_; + NSError *tasksFetchError_; + + GTLServiceTicket *editTaskTicket_; +} + ++ (TasksSampleWindowController *)sharedWindowController; + +- (IBAction)signInClicked:(id)sender; + +- (IBAction)getTaskListsClicked:(id)sender; +- (IBAction)cancelTaskListsFetch:(id)sender; +- (IBAction)cancelTasksFetch:(id)sender; + +- (IBAction)addTaskListClicked:(id)sender; +- (IBAction)renameTaskListClicked:(id)sender; +- (IBAction)deleteTaskListClicked:(id)sender; + +- (IBAction)addTaskClicked:(id)sender; +- (IBAction)renameTaskClicked:(id)sender; +- (IBAction)deleteTaskClicked:(id)sender; +- (IBAction)completeTaskClicked:(id)sender; +- (IBAction)clearTasksClicked:(id)sender; +- (IBAction)completeAllTasksClicked:(id)sender; +- (IBAction)deleteAllTasksClicked:(id)sender; +- (IBAction)showTasksCheckboxClicked:(id)sender; + +- (IBAction)APIConsoleClicked:(id)sender; +- (IBAction)loggingCheckboxClicked:(id)sender; + +// Client ID sheet +- (IBAction)clientIDClicked:(id)sender; +- (IBAction)clientIDDoneClicked:(id)sender; + +@end diff --git a/GTL/Examples/TasksSample/TasksSampleWindowController.m b/GTL/Examples/TasksSample/TasksSampleWindowController.m new file mode 100644 index 0000000..8c9d5c2 --- /dev/null +++ b/GTL/Examples/TasksSample/TasksSampleWindowController.m @@ -0,0 +1,1245 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// TasksSampleWindowController.m +// + +#import "TasksSampleWindowController.h" + +#import "GTL/GTLUtilities.h" +#import "GTL/GTMHTTPFetcherLogging.h" + +@interface TasksSampleWindowController () + +@property (readonly) GTLServiceTasks *tasksService; + +@property (retain) GTLTasksTaskLists *taskLists; +@property (retain) GTLServiceTicket *taskListsTicket; +@property (retain) NSError *taskListsFetchError; + +@property (retain) GTLServiceTicket *editTaskListTicket; + +@property (retain) GTLTasksTasks *tasks; +@property (retain) GTLServiceTicket *tasksTicket; +@property (retain) NSError *tasksFetchError; + +@property (retain) GTLServiceTicket *editTaskTicket; + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel; + +- (void)updateUI; +- (void)displayAlert:(NSString *)title format:(NSString *)format, ...; + +- (void)fetchTaskLists; +- (void)fetchTasksForSelectedList; + +- (void)addATaskList; +- (void)renameSelectedTaskList; +- (void)deleteSelectedTaskList; + +- (void)addATask; +- (void)renameSelectedTask; +- (void)deleteSelectedTask; +- (void)completeSelectedTask; +- (void)hideCompletedTasks; +- (void)completeAllTasks; +- (void)deleteAllTasks; + +- (GTLTasksTaskList *)selectedTaskList; +- (GTLTasksTask *)selectedTask; + +@end + +// Constants that ought to be defined by the API +NSString *const kTaskStatusCompleted = @"completed"; +NSString *const kTaskStatusNeedsAction = @"needsAction"; + +// Keychain item name for saving the user's authentication information +NSString *const kKeychainItemName = @"TasksSample: Google Tasks"; + +@implementation TasksSampleWindowController + +@synthesize taskLists = tasksLists_, + taskListsTicket = taskListsTicket_, + taskListsFetchError = taskListsFetchError_, + editTaskListTicket = editTaskListTicket_, + tasks = tasks_, + tasksTicket = tasksTicket_, + tasksFetchError = tasksFetchError_, + editTaskTicket = editTaskTicket_; + ++ (TasksSampleWindowController *)sharedWindowController { + static TasksSampleWindowController* gWindowController = nil; + if (!gWindowController) { + gWindowController = [[TasksSampleWindowController alloc] init]; + } + return gWindowController; +} + +- (id)init { + return [self initWithWindowNibName:@"TasksSampleWindow"]; +} + +- (void)awakeFromNib { + // Load the OAuth token from the keychain, if it was previously saved + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + GTMOAuth2Authentication *auth; + auth = [GTMOAuth2WindowController authForGoogleFromKeychainForName:kKeychainItemName + clientID:clientID + clientSecret:clientSecret]; + self.tasksService.authorizer = auth; + + // Set the result text fields to have a distinctive color and mono-spaced font + [taskListsResultTextView_ setTextColor:[NSColor darkGrayColor]]; + [tasksResultTextView_ setTextColor:[NSColor darkGrayColor]]; + + NSFont *resultTextFont = [NSFont fontWithName:@"Monaco" size:9]; + [taskListsResultTextView_ setFont:resultTextFont]; + [tasksResultTextView_ setFont:resultTextFont]; + + [tasksOutline_ registerForDraggedTypes:[NSArray arrayWithObject:NSPasteboardTypeString]]; + [self updateUI]; +} + +- (void)dealloc { + [tasksLists_ release]; + [taskListsTicket_ release]; + [taskListsFetchError_ release]; + + [editTaskListTicket_ release]; + + [tasks_ release]; + [tasksTicket_ release]; + [tasksFetchError_ release]; + + [editTaskTicket_ release]; + + [super dealloc]; +} + +#pragma mark - + +- (NSString *)signedInUsername { + // Get the email address of the signed-in user + GTMOAuth2Authentication *auth = self.tasksService.authorizer; + BOOL isSignedIn = auth.canAuthorize; + if (isSignedIn) { + return auth.userEmail; + } else { + return nil; + } +} + +- (BOOL)isSignedIn { + NSString *name = [self signedInUsername]; + return (name != nil); +} + +#pragma mark IBActions + +- (IBAction)signInClicked:(id)sender { + if (![self isSignedIn]) { + // Sign in + [self runSigninThenInvokeSelector:@selector(updateUI)]; + } else { + // Sign out + GTLServiceTasks *service = self.tasksService; + + [GTMOAuth2WindowController removeAuthFromKeychainForName:kKeychainItemName]; + service.authorizer = nil; + [self updateUI]; + } +} + +- (IBAction)getTaskListsClicked:(id)sender { + if (![self isSignedIn]) { + [self runSigninThenInvokeSelector:@selector(fetchTaskLists)]; + } else { + [self fetchTaskLists]; + } +} + +- (IBAction)cancelTaskListsFetch:(id)sender { + [self.taskListsTicket cancelTicket]; + self.taskListsTicket = nil; + + [self.editTaskListTicket cancelTicket]; + self.editTaskListTicket = nil; + + [self updateUI]; +} + +- (IBAction)cancelTasksFetch:(id)sender { + [self.tasksTicket cancelTicket]; + self.tasksTicket = nil; + + [self.editTaskTicket cancelTicket]; + self.editTaskTicket = nil; + + [self updateUI]; +} + +- (IBAction)addTaskListClicked:(id)sender { + [self addATaskList]; +} + +- (IBAction)renameTaskListClicked:(id)sender { + [self renameSelectedTaskList]; +} + +- (IBAction)deleteTaskListClicked:(id)sender { + GTLTasksTaskList *tasklist = [self selectedTaskList]; + NSString *title = tasklist.title; + + NSBeginAlertSheet(@"Delete", nil, @"Cancel", nil, + [self window], self, + @selector(deleteTaskListSheetDidEnd:returnCode:contextInfo:), + nil, nil, @"Delete \"%@\"?", title); +} + +- (void)deleteTaskListSheetDidEnd:(NSWindow *)sheet + returnCode:(int)returnCode + contextInfo:(void *)contextInfo { + if (returnCode == NSAlertDefaultReturn) { + [self deleteSelectedTaskList]; + } +} + +- (IBAction)addTaskClicked:(id)sender { + [self addATask]; +} + +- (IBAction)renameTaskClicked:(id)sender { + [self renameSelectedTask]; +} + +- (IBAction)deleteTaskClicked:(id)sender { + GTLTasksTask *task = [self selectedTask]; + NSString *title = task.title; + + NSBeginAlertSheet(@"Delete", nil, @"Cancel", nil, + [self window], self, + @selector(deleteTaskSheetDidEnd:returnCode:contextInfo:), + nil, nil, @"Delete \"%@\"?", title); +} + +- (void)deleteTaskSheetDidEnd:(NSWindow *)sheet + returnCode:(int)returnCode + contextInfo:(void *)contextInfo { + if (returnCode == NSAlertDefaultReturn) { + [self deleteSelectedTask]; + } +} + +- (IBAction)completeTaskClicked:(id)sender { + [self completeSelectedTask]; +} + +- (IBAction)clearTasksClicked:(id)sender { + [self hideCompletedTasks]; +} + +- (IBAction)completeAllTasksClicked:(id)sender { + [self completeAllTasks]; +} + +- (IBAction)deleteAllTasksClicked:(id)sender { + [self deleteAllTasks]; +} + +- (IBAction)showTasksCheckboxClicked:(id)sender { + [self fetchTasksForSelectedList]; +} + +- (IBAction)APIConsoleClicked:(id)sender { + NSURL *url = [NSURL URLWithString:@"https://code.google.com/apis/console"]; + [[NSWorkspace sharedWorkspace] openURL:url]; +} + +- (IBAction)loggingCheckboxClicked:(id)sender { + [GTMHTTPFetcher setLoggingEnabled:[sender state]]; +} + +#pragma mark - + +// get a service object with the current username/password +// +// A "service" object handles networking tasks. Service objects +// contain user authentication information as well as networking +// state information (such as cookies and the "last modified" date for +// fetched data.) + +- (GTLServiceTasks *)tasksService { + static GTLServiceTasks *service = nil; + + if (!service) { + service = [[GTLServiceTasks alloc] init]; + + // Have the service object set tickets to fetch consecutive pages + // of the feed so we do not need to manually fetch them + service.shouldFetchNextPages = YES; + + // Have the service object set tickets to retry temporary error conditions + // automatically + service.retryEnabled = YES; + } + return service; +} + +- (GTLTasksTaskList *)selectedTaskList { + int rowIndex = [taskListsTable__ selectedRow]; + if (rowIndex > -1) { + GTLTasksTaskList *item = [self.taskLists itemAtIndex:rowIndex]; + return item; + } + return nil; +} + +- (GTLTasksTask *)selectedTask { + int rowIndex = [tasksOutline_ selectedRow]; + GTLTasksTask *item = [tasksOutline_ itemAtRow:rowIndex]; + return item; +} + +- (NSArray *)completedTasks { + NSArray *array = [GTLUtilities objectsFromArray:self.tasks.items + withValue:kTaskStatusCompleted + forKeyPath:@"status"]; + return array; +} + +#pragma mark Create ID Map and Ordered Child Arrays + +// For the efficient access to tasks in the tasks object, we'll +// build a map from task identifier to each task item, and arrays +// for the children of the top-level object and for the children +// of every parent task + +static NSString *const kGTLTaskMapProperty = @"taskMap"; +static NSString *const kGTLChildTasksProperty = @"childTasks"; + +- (void)createPropertiesForTasks:(GTLTasksTasks *)tasks { + // First, build a dictionary, mapping item identifier strings to items objects + // + // This will allow for much faster lookup than would linear search of + // task list's items + NSMutableDictionary *taskMap = [NSMutableDictionary dictionary]; + for (GTLTasksTask *task in tasks) { + [taskMap setObject:task + forKey:task.identifier]; + } + [tasks setProperty:taskMap + forKey:kGTLTaskMapProperty]; + + // Make an array for each parent with pointers to its immediate children, in + // the order the children occur in the list. We'll store the array in a + // property of the parent task item. + // + // For top-level tasks, we'll store the array in a property of the list + // object. + NSMutableArray *topTasks = [NSMutableArray array]; + [tasks setProperty:topTasks + forKey:kGTLChildTasksProperty]; + + for (GTLTasksTask *task in tasks) { + NSString *parentID = task.parent; + if (parentID == nil) { + // this is a top-level task in the list, so the task's parent is the + // main list + [topTasks addObject:task]; + } else { + // this task is child of another task; add it to the parent's list + GTLTasksTask *parentTask = [taskMap objectForKey:parentID]; + NSMutableArray *childTasks = [parentTask propertyForKey:kGTLChildTasksProperty]; + if (childTasks == nil) { + childTasks = [NSMutableArray array]; + [parentTask setProperty:childTasks + forKey:kGTLChildTasksProperty]; + } + [childTasks addObject:task]; + } + } +} + +- (GTLTasksTask *)taskWithIdentifier:(NSString *)taskID + fromTasks:(GTLTasksTasks *)tasks { + NSDictionary *taskMap = [tasks propertyForKey:kGTLTaskMapProperty]; + GTLTasksTask *task = [taskMap valueForKey:taskID]; + return task; +} + +- (NSArray *)taskChildrenForObject:(GTLObject *)obj { + // Object is either a GTLTasksTasks (the top-level tasks list) + // or a GTLTasksTask (a task which may be a parent of other tasks) + NSArray *array = [obj propertyForKey:kGTLChildTasksProperty]; + return array; +} + +#pragma mark Fetch Task Lists + +- (void)fetchTaskLists { + self.taskLists = nil; + self.taskListsFetchError = nil; + + GTLServiceTasks *service = self.tasksService; + + GTLQueryTasks *query = [GTLQueryTasks queryForTasklistsList]; + + self.taskListsTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id taskLists, NSError *error) { + // callback + self.taskLists = taskLists; + self.taskListsFetchError = error; + self.taskListsTicket = nil; + + [self updateUI]; + }]; + [self updateUI]; +} + +#pragma mark Fetch Tasks + +- (void)fetchTasksForSelectedList { + self.tasks = nil; + self.tasksFetchError = nil; + + GTLServiceTasks *service = self.tasksService; + + GTLTasksTaskList *selectedTasklist = [self selectedTaskList]; + if (selectedTasklist) { + NSString *tasklistID = selectedTasklist.identifier; + + GTLQueryTasks *query = [GTLQueryTasks queryForTasksListWithTasklist:tasklistID]; + query.showCompleted = [showCompletedTasksCheckbox_ state]; + query.showHidden = [showHiddenTasksCheckbox_ state]; + query.showDeleted = [showDeletedTasksCheckbox_ state]; + + self.tasksTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id tasks, NSError *error) { + // callback + [self createPropertiesForTasks:tasks]; + + self.tasks = tasks; + self.tasksFetchError = error; + self.tasksTicket = nil; + + [self updateUI]; + }]; + [self updateUI]; + } +} + +#pragma mark Add a Task List + +- (void)addATaskList { + NSString *title = [taskListNameField_ stringValue]; + if ([title length] > 0) { + // Make a new task list + GTLTasksTaskList *tasklist = [GTLTasksTaskList object]; + tasklist.title = title; + + GTLQueryTasks *query = [GTLQueryTasks queryForTasklistsInsertWithObject:tasklist]; + + GTLServiceTasks *service = self.tasksService; + self.editTaskListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id item, NSError *error) { + // callback + self.editTaskListTicket = nil; + GTLTasksTaskList *tasklist = item; + + if (error == nil) { + [self displayAlert:@"Task List Added" + format:@"Added task list \"%@\"", tasklist.title]; + [self fetchTaskLists]; + [taskListNameField_ setStringValue:@""]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; + } +} + +#pragma mark Rename a Task List + +- (void)renameSelectedTaskList { + NSString *title = [taskListNameField_ stringValue]; + if ([title length] > 0) { + // Rename the selected task list + + // Rather than update the object with a complete replacement, we'll make + // a patch object containing just the changed title + GTLTasksTaskList *patchObject = [GTLTasksTaskList object]; + patchObject.title = title; + + GTLTasksTaskList *selectedTaskList = [self selectedTaskList]; + + GTLQueryTasks *query = [GTLQueryTasks queryForTasklistsPatchWithObject:patchObject + tasklist:selectedTaskList.identifier]; + GTLServiceTasks *service = self.tasksService; + self.editTaskListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id item, NSError *error) { + // callback + self.editTaskListTicket = nil; + GTLTasksTaskList *tasklist = item; + + if (error == nil) { + [self displayAlert:@"Task List Updated" + format:@"Updated task list \"%@\"", tasklist.title]; + [self fetchTaskLists]; + [taskListNameField_ setStringValue:@""]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; + } +} + +#pragma mark Delete a Task List + +- (void)deleteSelectedTaskList { + GTLTasksTaskList *tasklist = [self selectedTaskList]; + + GTLQueryTasks *query = [GTLQueryTasks queryForTasklistsDeleteWithTasklist:tasklist.identifier]; + + GTLServiceTasks *service = self.tasksService; + self.editTaskListTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id item, NSError *error) { + // callback + self.editTaskListTicket = nil; + + if (error == nil) { + [self displayAlert:@"Task List Deleted" + format:@"Deleted task list \"%@\"", tasklist.title]; + [self fetchTaskLists]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; +} + +#pragma mark Add a Task + +- (void)addATask { + NSString *title = [taskNameField_ stringValue]; + if ([title length] > 0) { + // Make a new task + GTLTasksTask *task = [GTLTasksTask object]; + task.title = title; + + GTLTasksTaskList *tasklist = [self selectedTaskList]; + GTLQueryTasks *query = [GTLQueryTasks queryForTasksInsertWithObject:task + tasklist:tasklist.identifier]; + GTLServiceTasks *service = self.tasksService; + self.editTaskTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id item, NSError *error) { + // callback + self.editTaskTicket = nil; + GTLTasksTask *task = item; + + if (error == nil) { + [self displayAlert:@"Task Added" + format:@"Added task \"%@\"", task.title]; + [self fetchTasksForSelectedList]; + [taskNameField_ setStringValue:@""]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; + } +} + +#pragma mark Rename a Task + +- (void)renameSelectedTask { + NSString *title = [taskNameField_ stringValue]; + if ([title length] > 0) { + // Rename the selected task + + // Rather than update the object with a complete replacement, we'll make + // a patch object containing just the changes + GTLTasksTask *patchObject = [GTLTasksTask object]; + patchObject.title = title; + + GTLTasksTask *task = [self selectedTask]; + GTLTasksTaskList *tasklist = [self selectedTaskList]; + GTLQueryTasks *query = [GTLQueryTasks queryForTasksPatchWithObject:patchObject + tasklist:tasklist.identifier + task:task.identifier]; + GTLServiceTasks *service = self.tasksService; + self.editTaskTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id item, NSError *error) { + // callback + self.editTaskTicket = nil; + GTLTasksTask *task = item; + + if (error == nil) { + [self displayAlert:@"Task Updated" + format:@"Renamed task to \"%@\"", task.title]; + [self fetchTasksForSelectedList]; + [taskNameField_ setStringValue:@""]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; + } +} + +#pragma mark Delete a Task + +- (void)deleteSelectedTask { + // Delete a task + GTLTasksTask *task = [self selectedTask]; + NSString *taskTitle = task.title; + + GTLTasksTaskList *tasklist = [self selectedTaskList]; + GTLQueryTasks *query = [GTLQueryTasks queryForTasksDeleteWithTasklist:tasklist.identifier + task:task.identifier]; + GTLServiceTasks *service = self.tasksService; + self.editTaskTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id item, NSError *error) { + // callback + self.editTaskTicket = nil; + + if (error == nil) { + [self displayAlert:@"Task Deleted" + format:@"Deleted task \"%@\"", taskTitle]; + [self fetchTasksForSelectedList]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; +} + +#pragma mark Change a Task's Complete Status + +- (void)completeSelectedTask { + // Mark a task as completed or incomplete + GTLTasksTask *selectedTask = [self selectedTask]; + GTLTasksTask *patchObject = [GTLTasksTask object]; + + if ([selectedTask.status isEqual:kTaskStatusCompleted]) { + // Change the status to not complete + patchObject.status = kTaskStatusNeedsAction; + patchObject.completed = [GTLObject nullValue]; // remove the completed date + } else { + // Change the status to complete + patchObject.status = kTaskStatusCompleted; + } + + GTLTasksTaskList *tasklist = [self selectedTaskList]; + GTLQueryTasks *query = [GTLQueryTasks queryForTasksPatchWithObject:patchObject + tasklist:tasklist.identifier + task:selectedTask.identifier]; + GTLServiceTasks *service = self.tasksService; + self.editTaskTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id item, NSError *error) { + // callback + self.editTaskTicket = nil; + GTLTasksTask *task = item; + + if (error == nil) { + NSString *displayStatus; + if ([task.status isEqual:kTaskStatusCompleted]) { + displayStatus = @"complete"; + } else { + displayStatus = @"incomplete"; + } + + [self displayAlert:@"Task Updated" + format:@"Marked task \"%@\" %@", task.title, displayStatus]; + [self fetchTasksForSelectedList]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; +} + +#pragma mark Hide Completed Tasks + +- (void)hideCompletedTasks { + // Make all completed tasks hidden + NSArray *previouslyCompletedTasks = [self completedTasks]; + GTLTasksTaskList *tasklist = [self selectedTaskList]; + GTLQueryTasks *query = [GTLQueryTasks queryForTasksClearWithTasklist:tasklist.identifier]; + + GTLServiceTasks *service = self.tasksService; + self.editTaskTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id item, NSError *error) { + // callback + self.editTaskTicket = nil; + + if (error == nil) { + [self displayAlert:@"Task List Clear" + format:@"Made %lu tasks hidden", (unsigned long) [previouslyCompletedTasks count]]; + [self fetchTasksForSelectedList]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; +} + +#pragma mark Complete All Tasks + +- (void)completeAllTasks { + // Change all tasks to be completed or uncompleted + NSArray *completedTasks = [self completedTasks]; + NSUInteger numberOfCompletedTasks = [completedTasks count]; + NSUInteger numberOfTasks = [self.tasks.items count]; + BOOL wereAllTasksCompleted = (numberOfCompletedTasks == numberOfTasks); + + // Make a batch of queries to set all tasks to completed or uncompleted + GTLTasksTaskList *tasklist = [self selectedTaskList]; + + GTLBatchQuery *batchQuery = [GTLBatchQuery batchQuery]; + + for (GTLTasksTask *task in self.tasks) { + GTLTasksTask *patchObject = [GTLTasksTask object]; + + if (wereAllTasksCompleted) { + // Change the status to not complete + patchObject.status = kTaskStatusNeedsAction; + patchObject.completed = [GTLObject nullValue]; // remove the completed date + } else { + // Change the status to complete + patchObject.status = kTaskStatusCompleted; + } + + GTLQueryTasks *query = [GTLQueryTasks queryForTasksPatchWithObject:patchObject + tasklist:tasklist.identifier + task:task.identifier]; + [batchQuery addQuery:query]; + } + + GTLServiceTasks *service = self.tasksService; + self.editTaskTicket = [service executeQuery:batchQuery + completionHandler:^(GTLServiceTicket *ticket, + id object, NSError *error) { + // callback + self.editTaskTicket = nil; + + if (error == nil) { + GTLBatchResult *batchResults = (GTLBatchResult *)object; + NSString *status = wereAllTasksCompleted ? @"Uncompleted" : @"Completed"; + + NSDictionary *successes = batchResults.successes; + NSDictionary *failures = batchResults.failures; + + NSUInteger numberUpdated = [successes count]; + NSUInteger numberFailed = [failures count]; + + NSArray *successTasks = [successes allValues]; + NSArray *titles = [successTasks valueForKey:@"title"]; + NSString *titlesStr = [titles componentsJoinedByString:@", "]; + + [self displayAlert:@"Tasks Updated" + format:@"%@: %lu\n%@\nErrors: %lu\n%@", + status, + (unsigned long) numberUpdated, titlesStr, + (unsigned long) numberFailed, failures]; + + [self fetchTasksForSelectedList]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; +} + +#pragma mark Delete All Tasks + +- (void)deleteAllTasks { + // Make a batch of queries to delete all tasks + GTLTasksTaskList *tasklist = [self selectedTaskList]; + + GTLBatchQuery *batch = [GTLBatchQuery batchQuery]; + + for (GTLTasksTask *task in self.tasks) { + GTLQueryTasks *query = [GTLQueryTasks queryForTasksDeleteWithTasklist:tasklist.identifier + task:task.identifier]; + [batch addQuery:query]; + } + + GTLServiceTasks *service = self.tasksService; + self.editTaskTicket = [service executeQuery:batch + completionHandler:^(GTLServiceTicket *ticket, + id object, NSError *error) { + // callback + self.editTaskTicket = nil; + + if (error == nil) { + GTLBatchResult *batch = (GTLBatchResult *)object; + + NSUInteger numberDeleted = [batch.successes count]; + + [self displayAlert:@"Tasks Deleted" + format:@"Deleted: %lu\nErrors: %@", + (unsigned long) numberDeleted, + batch.failures]; + + [self fetchTasksForSelectedList]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; +} + +#pragma mark Move Task + +- (void)moveTaskWithIdentifier:(NSString *)taskID + toParentID:(NSString *)destinationParentIDorNil + index:(NSInteger)destinationIndex { + // Make all completed tasks hidden + GTLTasksTaskList *tasklist = [self selectedTaskList]; + GTLQueryTasks *query = [GTLQueryTasks queryForTasksMoveWithTasklist:tasklist.identifier + task:taskID]; + query.parent = destinationParentIDorNil; + + // Determine the ID of the task preceding the new location + if (destinationIndex > 0) { + GTLObject *parentTask; + if (destinationParentIDorNil) { + parentTask = [self taskWithIdentifier:destinationParentIDorNil + fromTasks:self.tasks]; + } else { + // There is no parent; it's a top-level task + parentTask = self.tasks; + } + NSArray *children = [self taskChildrenForObject:parentTask]; + + GTLTasksTask *previousTask = [children objectAtIndex:(destinationIndex - 1)]; + query.previous = previousTask.identifier; + } + + GTLServiceTasks *service = self.tasksService; + self.editTaskTicket = [service executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, + id item, NSError *error) { + // callback + self.editTaskTicket = nil; + + if (error == nil) { + [self fetchTasksForSelectedList]; + } else { + [self displayAlert:@"Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + [self updateUI]; +} + +#pragma mark Sign In + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel { + // Applications should have client ID and client secret strings + // hardcoded into the source, but the sample application asks the + // developer for the strings + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + if ([clientID length] == 0 || [clientSecret length] == 0) { + // Remind the developer that client ID and client secret are needed + [clientIDButton_ performSelector:@selector(performClick:) + withObject:self + afterDelay:0.5]; + return; + } + + // Show the OAuth 2 sign-in controller + NSBundle *frameworkBundle = [NSBundle bundleForClass:[GTMOAuth2WindowController class]]; + GTMOAuth2WindowController *windowController; + windowController = [GTMOAuth2WindowController controllerWithScope:kGTLAuthScopeTasks + clientID:clientID + clientSecret:clientSecret + keychainItemName:kKeychainItemName + resourceBundle:frameworkBundle]; + + [windowController signInSheetModalForWindow:[self window] + completionHandler:^(GTMOAuth2Authentication *auth, + NSError *error) { + // callback + if (error == nil) { + self.tasksService.authorizer = auth; + if (signInDoneSel) { + [self performSelector:signInDoneSel]; + } + } else { + self.taskListsFetchError = error; + [self updateUI]; + } + }]; +} + +#pragma mark UI + +- (void)updateUI { + BOOL isSignedIn = [self isSignedIn]; + NSString *username = [self signedInUsername]; + [signedInButton_ setTitle:(isSignedIn ? @"Sign Out" : @"Sign In")]; + [signedInField_ setStringValue:(isSignedIn ? username : @"No")]; + + // + // Task lists table + // + [taskListsTable__ reloadData]; + + if (self.taskListsTicket != nil || self.editTaskListTicket != nil) { + [taskListsProgressIndicator_ startAnimation:self]; + } else { + [taskListsProgressIndicator_ stopAnimation:self]; + } + + // Get the description of the selected item, or the feed fetch error + NSString *resultStr = @""; + + if (self.taskListsFetchError) { + // Display the error + resultStr = [self.taskListsFetchError description]; + + // Also display any server data present + NSData *errData = [[self.taskListsFetchError userInfo] objectForKey:kGTMHTTPFetcherStatusDataKey]; + if (errData) { + NSString *dataStr = [[[NSString alloc] initWithData:errData + encoding:NSUTF8StringEncoding] autorelease]; + resultStr = [resultStr stringByAppendingFormat:@"\n%@", dataStr]; + } + } else { + // Display the selected item + GTLTasksTaskList *item = [self selectedTaskList]; + if (item) { + resultStr = [item description]; + } + } + [taskListsResultTextView_ setString:resultStr]; + + // + // Tasks outline + // + [tasksOutline_ reloadData]; + + if (self.tasksTicket != nil) { + [tasksProgressIndicator_ startAnimation:self]; + } else { + [tasksProgressIndicator_ stopAnimation:self]; + } + + // Get the description of the selected item, or the feed fetch error + resultStr = @""; + if (self.tasksFetchError) { + resultStr = [self.tasksFetchError description]; + } else { + GTLTasksTask *item = [self selectedTask]; + if (item) { + resultStr = [item description]; + } + } + [tasksResultTextView_ setString:resultStr]; + + // Enable task lists buttons + BOOL hasTaskLists = (self.taskLists != nil); + BOOL isTaskListSelected = ([self selectedTaskList] != nil); + BOOL hasTaskListTitle = ([[taskListNameField_ stringValue] length] > 0); + + [addTaskListButton_ setEnabled:(hasTaskListTitle && hasTaskLists)]; + [renameTaskListButton_ setEnabled:(hasTaskListTitle && isTaskListSelected)]; + [deleteTaskListButton_ setEnabled:(isTaskListSelected)]; + + BOOL isFetchingTaskLists = (self.taskListsTicket != nil); + BOOL isEditingTaskList = (self.editTaskListTicket != nil); + [taskListsCancelButton_ setEnabled:(isFetchingTaskLists || isEditingTaskList)]; + + // Enable tasks buttons + GTLTasksTask *selectedTask = [self selectedTask]; + BOOL hasTasks = (self.tasks != nil); + BOOL isTaskSelected = (selectedTask != nil); + BOOL hasTaskTitle = ([[taskNameField_ stringValue] length] > 0); + + [addTaskButton_ setEnabled:(hasTaskTitle && hasTasks)]; + [renameTaskButton_ setEnabled:(hasTaskTitle && isTaskSelected)]; + [deleteTaskButton_ setEnabled:(isTaskSelected)]; + + BOOL isCompleted = [selectedTask.status isEqual:kTaskStatusCompleted]; + [completeTaskButton_ setEnabled:isTaskSelected]; + [completeTaskButton_ setTitle:(isCompleted ? @"Uncomplete" : @"Complete")]; + + NSArray *completedTasks = [self completedTasks]; + NSUInteger numberOfCompletedTasks = [completedTasks count]; + [clearTasksButton_ setEnabled:(numberOfCompletedTasks > 0)]; + + NSUInteger numberOfTasks = [self.tasks.items count]; + [deleteAllTasksButton_ setEnabled:(numberOfTasks > 0)]; + + BOOL areAllTasksCompleted = (numberOfCompletedTasks == numberOfTasks); + [completeAllTasksButton_ setEnabled:(numberOfTasks > 0)]; + [completeAllTasksButton_ setTitle:(areAllTasksCompleted ? + @"Uncomplete All" : @"Complete All")]; + + BOOL isFetchingTasks = (self.tasksTicket != nil); + BOOL isEditingTask = (self.editTaskTicket != nil); + [tasksCancelButton_ setEnabled:(isFetchingTasks || isEditingTask)]; + + // Show or hide the text indicating that the client ID or client secret are + // needed + BOOL hasClientIDStrings = [[clientIDField_ stringValue] length] > 0 + && [[clientSecretField_ stringValue] length] > 0; + [clientIDRequiredTextField_ setHidden:hasClientIDStrings]; +} + +- (void)displayAlert:(NSString *)title format:(NSString *)format, ... { + NSString *result = format; + if (format) { + va_list argList; + va_start(argList, format); + result = [[[NSString alloc] initWithFormat:format + arguments:argList] autorelease]; + va_end(argList); + } + NSBeginAlertSheet(title, nil, nil, nil, [self window], nil, nil, + nil, nil, @"%@", result); +} + +#pragma mark Client ID Sheet + +// Client ID and Client Secret Sheet +// +// Sample apps need this sheet to ask for the client ID and client secret +// strings +// +// Your application will just hardcode the client ID and client secret strings +// into the source rather than ask the user for them. +// +// The string values are obtained from the API Console, +// https://code.google.com/apis/console + +- (IBAction)clientIDClicked:(id)sender { + // Show the sheet for developers to enter their client ID and client secret + [NSApp beginSheet:clientIDSheet_ + modalForWindow:[self window] + modalDelegate:self + didEndSelector:@selector(clientIDSheetDidEnd:returnCode:contextInfo:) + contextInfo:NULL]; +} + +- (IBAction)clientIDDoneClicked:(id)sender { + [NSApp endSheet:clientIDSheet_ returnCode:NSOKButton]; +} + +- (void)clientIDSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { + [sheet orderOut:self]; + [self updateUI]; +} + +#pragma mark Text field delegate methods + +- (void)controlTextDidChange:(NSNotification *)note { + [self updateUI]; // enable and disable buttons +} + +#pragma mark TableView delegate and data source methods + +- (void)tableViewSelectionDidChange:(NSNotification *)notification { + // The task list selection changed + [self fetchTasksForSelectedList]; +} + +// Table view data source methods +- (int)numberOfRowsInTableView:(NSTableView *)tableView { + return [self.taskLists.items count]; +} + +- (id)tableView:(NSTableView *)tableView +objectValueForTableColumn:(NSTableColumn *)tableColumn + row:(int)row { + GTLTasksTaskList *item = [self.taskLists itemAtIndex:row]; + NSString *title = item.title; + return title; +} + +#pragma mark OutlineView delegate and data source methods + +- (NSArray *)childTasksOfItem:(GTLTasksTask *)item { + // This is a utility routine for getting the children of a task + // list or of a task + // + // We added child task arrays by calling -createPropertiesForTasks + // above after fetching the tasks + NSArray *children; + if (item == nil) { + // item is the top level + children = [self taskChildrenForObject:self.tasks]; + } else { + // item is a task entry + children = [self taskChildrenForObject:item]; + } + return children; +} + +- (id)outlineView:(NSOutlineView *)outlineView child:(NSInteger)index ofItem:(id)item { + NSArray *childTasks = [self childTasksOfItem:item]; + GTLTasksTask *task = [childTasks objectAtIndex:index]; + return task; +} + +- (BOOL)outlineView:(NSOutlineView *)outlineView isItemExpandable:(id)item { + NSArray *childTasks = [self childTasksOfItem:item]; + NSUInteger numberOfChildren = [childTasks count]; + return (numberOfChildren > 0); +} + +- (NSInteger)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id)item { + NSArray *childTasks = [self childTasksOfItem:item]; + NSUInteger numberOfChildren = [childTasks count]; + return numberOfChildren; +} + +- (id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item { + GTLTasksTask *task = (GTLTasksTask *)item; + NSString *str = task.title; + + if ([str length] == 0) { + // If the task has no title, make one from its identifier + str = [NSString stringWithFormat:@"", task.identifier]; + } + + if ([task.notes length] > 0) { + // append a pencil to indicate this task has notes + str = [str stringByAppendingFormat:@" %C", 0x270E]; + } + + if ([task.status isEqual:kTaskStatusCompleted]) { + // append a checkmark to indicate this task has been completed + str = [str stringByAppendingFormat:@" %C", 0x2713]; + } + + if ([task.hidden boolValue]) { + // append a moon to indicate this task is hidden + str = [str stringByAppendingFormat:@" %C", 0x263E]; + } + + if ([task.deleted boolValue]) { + // prepend an X mark if this is a deleted task + str = [NSString stringWithFormat:@"%C %@", 0x2717, str]; + } + return str; +} + +- (void)outlineViewSelectionDidChange:(NSNotification *)notification { + // We want to update the UI when the selection changes, but we need to avoid + // doing so immediately as a result of selection changes from reloading the + // data when updating the UI, since that would cause recursive calls to + // reloadData + [self performSelector:@selector(updateUI) + withObject:nil + afterDelay:0.01]; +} + +// OutlineView Dragging Support + +- (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)flag { + return NSDragOperationMove; +} + +- (BOOL)outlineView:(NSOutlineView *)outlineView + writeItems:(NSArray *)items + toPasteboard:(NSPasteboard *)pasteboard { + // Only one task can be selected, so one task will be in the items; + // we'll put its identifier into an array for the pasteboard + NSArray *identifiers = [items valueForKey:@"identifier"]; + + [pasteboard clearContents]; + [pasteboard writeObjects:identifiers]; + return YES; +} + +- (NSDragOperation)outlineView:(NSOutlineView *)outlineView + validateDrop:(id )info + proposedItem:(id)item + proposedChildIndex:(NSInteger)index { + // Verify that the item being dragged is a task ID + NSPasteboard *pb = [info draggingPasteboard]; + NSArray *classes = [NSArray arrayWithObject:[NSString class]]; + NSArray *taskIDs = [pb readObjectsForClasses:classes + options:nil]; + if ([taskIDs count] == 1) { + NSString *taskID = [taskIDs lastObject]; + GTLTasksTask *task = [self taskWithIdentifier:taskID + fromTasks:self.tasks]; + if (task != nil) { + // There is a task object for this ID + return NSDragOperationMove; + } + } + return NSDragOperationNone; +} + +- (BOOL)outlineView:(NSOutlineView *)outlineView + acceptDrop:(id )info + item:(id)item + childIndex:(NSInteger)index { + // A task was dropped at a new location + NSPasteboard *pb = [info draggingPasteboard]; + NSArray *classes = [NSArray arrayWithObject:[NSString class]]; + NSArray *taskIDs = [pb readObjectsForClasses:classes + options:nil]; + + [self moveTaskWithIdentifier:[taskIDs objectAtIndex:0] + toParentID:[item identifier] + index:index]; + return YES; +} + +@end diff --git a/GTL/Examples/TasksSample/buildStripHeaders b/GTL/Examples/TasksSample/buildStripHeaders new file mode 100755 index 0000000..0238ef2 --- /dev/null +++ b/GTL/Examples/TasksSample/buildStripHeaders @@ -0,0 +1,17 @@ +#!/bin/sh +# +# buildStripHeaders +# +# Remove header files from the built copy of the framework inside our +# application. + +# Strip "*.h" files +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname '*.h' -delete + +# Strip "Headers" links +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type l -delete + +# Strip "Headers" directories +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type d -prune -delete + + diff --git a/GTL/Examples/TasksSample/main.m b/GTL/Examples/TasksSample/main.m new file mode 100644 index 0000000..a1649ce --- /dev/null +++ b/GTL/Examples/TasksSample/main.m @@ -0,0 +1,24 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// main.m +// + +#import + +int main(int argc, char *argv[]) { + return NSApplicationMain(argc, (const char **) argv); +} diff --git a/GTL/Examples/URLShortenerSample/.svn/all-wcprops b/GTL/Examples/URLShortenerSample/.svn/all-wcprops new file mode 100644 index 0000000..cc276b8 --- /dev/null +++ b/GTL/Examples/URLShortenerSample/.svn/all-wcprops @@ -0,0 +1,53 @@ +K 25 +svn:wc:ra_dav:version-url +V 51 +/svn/!svn/ver/169/trunk/Examples/URLShortenerSample +END +main.m +K 25 +svn:wc:ra_dav:version-url +V 57 +/svn/!svn/ver/23/trunk/Examples/URLShortenerSample/main.m +END +URLShortenerSampleWindowController.h +K 25 +svn:wc:ra_dav:version-url +V 87 +/svn/!svn/ver/23/trunk/Examples/URLShortenerSample/URLShortenerSampleWindowController.h +END +Info.plist +K 25 +svn:wc:ra_dav:version-url +V 61 +/svn/!svn/ver/23/trunk/Examples/URLShortenerSample/Info.plist +END +URLShortenerSampleWindowController.m +K 25 +svn:wc:ra_dav:version-url +V 88 +/svn/!svn/ver/169/trunk/Examples/URLShortenerSample/URLShortenerSampleWindowController.m +END +URLShortenerAppController.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/23/trunk/Examples/URLShortenerSample/URLShortenerAppController.h +END +README.txt +K 25 +svn:wc:ra_dav:version-url +V 61 +/svn/!svn/ver/23/trunk/Examples/URLShortenerSample/README.txt +END +URLShortenerAppController.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/23/trunk/Examples/URLShortenerSample/URLShortenerAppController.m +END +buildStripHeaders +K 25 +svn:wc:ra_dav:version-url +V 68 +/svn/!svn/ver/23/trunk/Examples/URLShortenerSample/buildStripHeaders +END diff --git a/GTL/Examples/URLShortenerSample/.svn/entries b/GTL/Examples/URLShortenerSample/.svn/entries new file mode 100644 index 0000000..25f1496 --- /dev/null +++ b/GTL/Examples/URLShortenerSample/.svn/entries @@ -0,0 +1,306 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/URLShortenerSample +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-06-19T21:52:36.704909Z +169 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +main.m +file + + + + +2012-12-09T08:42:34.000000Z +246a89353f2c5021dce7384b100ff0fe +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +736 + +URLShortenerSampleWindowController.h +file + + + + +2012-12-09T08:42:34.000000Z +9f6254e1f4f8a76448221daa1f6425e0 +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2503 + +Info.plist +file + + + + +2012-12-09T08:42:34.000000Z +e757d11b5b6c5ed78f7d4c1e8d9af291 +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +843 + +URLShortenerSampleWindowController.m +file + + + + +2012-12-09T08:42:34.000000Z +d018ee2581629cbf9dedf895a5b33d77 +2012-06-19T21:52:36.704909Z +169 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +16476 + +URLShortenerAppController.h +file + + + + +2012-12-09T08:42:34.000000Z +a628355beb4ccd94fd2e80a96bca8ab1 +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +720 + +URLShortenerSample.xcodeproj +dir + +README.txt +file + + + + +2012-12-09T08:42:34.000000Z +0a3374a462b2cff6dcd19d0caf28958a +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +109 + +URLShortenerAppController.m +file + + + + +2012-12-09T08:42:34.000000Z +a617f2896afb4bc3e3deb8066066d2a3 +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1110 + +buildStripHeaders +file + + + + +2012-12-09T08:42:34.000000Z +38b5302dc0e4a662c40b288306a2f6ac +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +454 + +English.lproj +dir + diff --git a/GTL/Examples/URLShortenerSample/.svn/prop-base/buildStripHeaders.svn-base b/GTL/Examples/URLShortenerSample/.svn/prop-base/buildStripHeaders.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/GTL/Examples/URLShortenerSample/.svn/prop-base/buildStripHeaders.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/GTL/Examples/URLShortenerSample/.svn/text-base/Info.plist.svn-base b/GTL/Examples/URLShortenerSample/.svn/text-base/Info.plist.svn-base new file mode 100644 index 0000000..6856da5 --- /dev/null +++ b/GTL/Examples/URLShortenerSample/.svn/text-base/Info.plist.svn-base @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.example.URLShortenerSample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/GTL/Examples/URLShortenerSample/.svn/text-base/README.txt.svn-base b/GTL/Examples/URLShortenerSample/.svn/text-base/README.txt.svn-base new file mode 100644 index 0000000..ff257a0 --- /dev/null +++ b/GTL/Examples/URLShortenerSample/.svn/text-base/README.txt.svn-base @@ -0,0 +1 @@ +This sample should automatically build and copy over the GTL.framework as part of the build-and-run process. diff --git a/GTL/Examples/URLShortenerSample/.svn/text-base/URLShortenerAppController.h.svn-base b/GTL/Examples/URLShortenerSample/.svn/text-base/URLShortenerAppController.h.svn-base new file mode 100644 index 0000000..2319f8d --- /dev/null +++ b/GTL/Examples/URLShortenerSample/.svn/text-base/URLShortenerAppController.h.svn-base @@ -0,0 +1,23 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// URLShortenerSampleAppController.h +// + +#import + +@interface URLShortenerAppController : NSObject +@end diff --git a/GTL/Examples/URLShortenerSample/.svn/text-base/URLShortenerAppController.m.svn-base b/GTL/Examples/URLShortenerSample/.svn/text-base/URLShortenerAppController.m.svn-base new file mode 100644 index 0000000..b1ff5a4 --- /dev/null +++ b/GTL/Examples/URLShortenerSample/.svn/text-base/URLShortenerAppController.m.svn-base @@ -0,0 +1,35 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// URLShortenerSampleAppController.m +// + +#import "URLShortenerAppController.h" +#import "URLShortenerSampleWindowController.h" + +@implementation URLShortenerAppController + +- (void)applicationWillFinishLaunching:(NSNotification *)notification { + URLShortenerSampleWindowController* windowController + = [URLShortenerSampleWindowController sharedWindowController]; + [windowController showWindow:self]; +} + +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { + return YES; +} + +@end diff --git a/GTL/Examples/URLShortenerSample/.svn/text-base/URLShortenerSampleWindowController.h.svn-base b/GTL/Examples/URLShortenerSample/.svn/text-base/URLShortenerSampleWindowController.h.svn-base new file mode 100644 index 0000000..2c4f47b --- /dev/null +++ b/GTL/Examples/URLShortenerSample/.svn/text-base/URLShortenerSampleWindowController.h.svn-base @@ -0,0 +1,78 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// URLShortenerSampleWindowController.h +// + +#import + +#import "GTLUrlshortener.h" + +@interface URLShortenerSampleWindowController : NSWindowController { + @private + // IBOutlets - main window + IBOutlet NSTextField *signedInField_; + IBOutlet NSButton *signedInButton_; + + IBOutlet NSTableView *historyTable_; + IBOutlet NSProgressIndicator *historyProgressIndicator_; + IBOutlet NSTextView *historyResultTextField_; + IBOutlet NSButton *historyCancelButton_; + + IBOutlet NSSegmentedControl *analyticsSegmentedControl_; + IBOutlet NSTableView *analyticsTable_; + IBOutlet NSProgressIndicator *analyticsProgressIndicator_; + IBOutlet NSButton *analyticsCancelButton_; + IBOutlet NSTextField *shortURLClicksField_; + IBOutlet NSTextField *longURLClicksField_; + + IBOutlet NSTextField *addShortenedURLField_; + IBOutlet NSButton *addShortenedURLButton_; + + // IBOutlets - client ID sheet + IBOutlet NSButton *clientIDButton_; + IBOutlet NSTextField *clientIDRequiredTextField_; + IBOutlet NSWindow *clientIDSheet_; + IBOutlet NSTextField *clientIDField_; + IBOutlet NSTextField *clientSecretField_; + + // property storage + GTLUrlshortenerUrlHistory *historyFeed_; + GTLServiceTicket *historyTicket_; + NSError *historyFetchError_; + + GTLUrlshortenerUrl *analyticsItem_; + GTLServiceTicket *analyticsTicket_; + NSError *analyticsFetchError_; +} + ++ (URLShortenerSampleWindowController *)sharedWindowController; + +// Sign-in +- (IBAction)signInClicked:(id)sender; +- (IBAction)clientIDClicked:(id)sender; +- (IBAction)clientIDDoneClicked:(id)sender; +- (IBAction)APIConsoleClicked:(id)sender; + +// Main UI +- (IBAction)getHistoryClicked:(id)sender; +- (IBAction)analyticsSegmentClicked:(id)sender; +- (IBAction)cancelHistoryFetchClicked:(id)sender; +- (IBAction)cancelAnalyticsFetchClicked:(id)sender; +- (IBAction)addShortenedURLClicked:(id)sender; + +- (IBAction)loggingCheckboxClicked:(id)sender; +@end diff --git a/GTL/Examples/URLShortenerSample/.svn/text-base/URLShortenerSampleWindowController.m.svn-base b/GTL/Examples/URLShortenerSample/.svn/text-base/URLShortenerSampleWindowController.m.svn-base new file mode 100644 index 0000000..2a3fc9e --- /dev/null +++ b/GTL/Examples/URLShortenerSample/.svn/text-base/URLShortenerSampleWindowController.m.svn-base @@ -0,0 +1,490 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// URLShortenerSampleWindowController.m +// + +#import "URLShortenerSampleWindowController.h" + +#import "GTL/GTMOAuth2WindowController.h" +#import "GTL/GTMHTTPFetcherLogging.h" + +@interface URLShortenerSampleWindowController () + +// History table properties +@property (retain, nonatomic) GTLUrlshortenerUrlHistory *historyFeed; +@property (retain, nonatomic) GTLServiceTicket *historyTicket; +@property (retain, nonatomic) NSError *historyFetchError; + +// Analytics table properties +@property (retain, nonatomic) GTLUrlshortenerUrl *analyticsItem; +@property (retain, nonatomic) GTLServiceTicket *analyticsTicket; +@property (retain, nonatomic) NSError *analyticsFetchError; + +// Other properties +@property (retain, nonatomic, readonly) GTLServiceUrlshortener *URLShortenerService; + +- (NSString *)signedInUsername; +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel; +- (void)updateUI; +- (void)displayAlert:(NSString *)title format:(NSString *)format, ...; +- (GTLUrlshortenerUrl *)selectedHistoryItem; +- (NSArray *)selectedAnalyticsCounts; +- (void)fetchHistory; +- (void)addAShortenedURL; +@end + +// Keychain item name used to store the user's auth credential +NSString *const kKeychainItemName = @"URL Shortener Sample: Google URL Shortener"; + + +@implementation URLShortenerSampleWindowController + +@synthesize historyFeed = historyFeed_, + historyTicket = historyTicket_, + historyFetchError = historyFetchError_, + analyticsItem = analyticsItem_, + analyticsTicket = analyticsTicket_, + analyticsFetchError = analyticsFetchError_; + ++ (URLShortenerSampleWindowController *)sharedWindowController { + + static URLShortenerSampleWindowController* gWindowController = nil; + + if (!gWindowController) { + gWindowController = [[URLShortenerSampleWindowController alloc] init]; + } + return gWindowController; +} + + +- (id)init { + return [self initWithWindowNibName:@"URLShortenerSampleWindow"]; +} + +- (void)awakeFromNib { + // Set the result text fields to have a distinctive color and mono-spaced font + [historyResultTextField_ setTextColor:[NSColor darkGrayColor]]; + + NSFont *resultTextFont = [NSFont fontWithName:@"Monaco" size:9]; + [historyResultTextField_ setFont:resultTextFont]; + + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + GTMOAuth2Authentication *auth; + auth = [GTMOAuth2WindowController authForGoogleFromKeychainForName:kKeychainItemName + clientID:clientID + clientSecret:clientSecret]; + self.URLShortenerService.authorizer = auth; + + [self updateUI]; +} + +- (void)dealloc { + [historyFeed_ release]; + [historyTicket_ release]; + [historyFetchError_ release]; + + [analyticsItem_ release]; + [analyticsTicket_ release]; + [analyticsFetchError_ release]; + + [super dealloc]; +} + +#pragma mark - + +- (NSString *)signedInUsername { + GTMOAuth2Authentication *auth = self.URLShortenerService.authorizer; + if (auth.canAuthorize) { + return auth.userEmail; + } else { + return nil; + } +} + +- (BOOL)isSignedIn { + NSString *name = [self signedInUsername]; + return (name != nil); +} + +#pragma mark IBActions + +- (IBAction)signInClicked:(id)sender { + if (![self isSignedIn]) { + // Sign in + [self runSigninThenInvokeSelector:@selector(updateUI)]; + } else { + // Sign out + [GTMOAuth2WindowController removeAuthFromKeychainForName:kKeychainItemName]; + self.URLShortenerService.authorizer = nil; + [self updateUI]; + } +} + +- (IBAction)getHistoryClicked:(id)sender { + if (![self isSignedIn]) { + [self runSigninThenInvokeSelector:@selector(fetchHistory)]; + } else { + [self fetchHistory]; + } +} + +- (IBAction)addShortenedURLClicked:(id)sender { + [self addAShortenedURL]; +} + +- (IBAction)cancelHistoryFetchClicked:(id)sender { + [self.historyTicket cancelTicket]; + self.historyTicket = nil; + + [self updateUI]; +} + +- (IBAction)cancelAnalyticsFetchClicked:(id)sender { + [self.analyticsTicket cancelTicket]; + self.analyticsTicket = nil; + + [self updateUI]; +} + +- (IBAction)analyticsSegmentClicked:(id)sender { + [self updateUI]; +} + +- (IBAction)APIConsoleClicked:(id)sender { + NSURL *url = [NSURL URLWithString:@"https://code.google.com/apis/console"]; + [[NSWorkspace sharedWorkspace] openURL:url]; +} + +- (IBAction)loggingCheckboxClicked:(id)sender { + [GTMHTTPFetcher setLoggingEnabled:[sender state]]; +} + +#pragma mark - + +// Get a service object with the current authorization +// +// A "service" object handles networking tasks. Service objects +// contain user authentication information as well as networking +// state information (such as cookies and cached fetch results.) + +- (GTLServiceUrlshortener *)URLShortenerService { + + static GTLServiceUrlshortener* service = nil; + if (!service) { + service = [[GTLServiceUrlshortener alloc] init]; + + // Have the service object set tickets to fetch consecutive pages + // of the feed so we do not need to manually fetch them + service.shouldFetchNextPages = YES; + + // Have the service object set tickets to retry temporary error conditions + // automatically + service.retryEnabled = YES; + } + return service; +} + +- (GTLUrlshortenerUrl *)selectedHistoryItem { + int rowIndex = [historyTable_ selectedRow]; + if (rowIndex > -1) { + GTLUrlshortenerUrl *item = [self.historyFeed itemAtIndex:rowIndex]; + return item; + } + return nil; +} + +- (NSArray *)selectedAnalyticsCounts { + // segment names are the array fields of the analytics snapshot + NSSegmentedControl *segments = analyticsSegmentedControl_; + NSInteger segmentIndex = segments.selectedSegment; + NSString *fieldName = [segments labelForSegment:segmentIndex]; + + GTLUrlshortenerUrl *item = self.analyticsItem; + GTLUrlshortenerAnalyticsSummary *summary = item.analytics; + GTLUrlshortenerAnalyticsSnapshot *snapshot = summary.allTime; + NSArray *counts = [snapshot valueForKey:fieldName]; + return counts; +} + +#pragma mark Fetch the locations feed + +// begin retrieving the feed +- (void)fetchHistory { + self.historyFeed = nil; + self.historyFetchError = nil; + + GTLQueryUrlshortener *query = [GTLQueryUrlshortener queryForUrlList]; + self.historyTicket = [self.URLShortenerService executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id feed, NSError *error) { + // callback + self.historyFeed = feed; + self.historyFetchError = error; + self.historyTicket = nil; + + [self updateUI]; + }]; + [self updateUI]; +} + +#pragma mark Fetch an analytics items + +- (void)fetchAnalyticsForSelectedHistoryItem { + self.analyticsItem = nil; + self.analyticsFetchError = nil; + + GTLUrlshortenerUrl *item = [self selectedHistoryItem]; + if (item) { + GTLQueryUrlshortener *query = [GTLQueryUrlshortener queryForUrlGetWithShortUrl:item.identifier]; + query.projection = kGTLUrlshortenerProjectionFull; + + self.analyticsTicket = [self.URLShortenerService executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id item, NSError *error) { + // callback + self.analyticsItem = item; + self.analyticsFetchError = error; + self.analyticsTicket = nil; + + [self updateUI]; + }]; + [self updateUI]; + } +} + +#pragma mark Add a new short URL + +- (void)addAShortenedURL { + NSString *newURLStr = [addShortenedURLField_ stringValue]; + if ([newURLStr length] > 0) { + // make an object with the URL to be shortened + GTLUrlshortenerUrl *obj = [GTLUrlshortenerUrl object]; + obj.longUrl = newURLStr; + + GTLQueryUrlshortener *query = [GTLQueryUrlshortener queryForUrlInsertWithObject:obj]; + [self.URLShortenerService executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) { + // callback + if (error == nil) { + GTLUrlshortenerUrl *item = object; + [self displayAlert:@"Add URL" + format:@"Added URL \"%@\" for \n\"%@\"", item.identifier, item.longUrl]; + [self fetchHistory]; + [addShortenedURLField_ setStringValue:@""]; + } else { + [self displayAlert:@"Add URL Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + } +} + +#pragma mark Sign-In Sheet + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel { + // Your app should have clientID and clientSecret hardcoded into the source + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + if ([clientID length] == 0 || [clientSecret length] == 0) { + // remind the developer that client ID and client secret are needed + [clientIDButton_ performSelector:@selector(performClick:) + withObject:self + afterDelay:0.5]; + return; + } + + NSBundle *frameworkBundle = [NSBundle bundleForClass:[GTMOAuth2WindowController class]]; + GTMOAuth2WindowController *windowController; + windowController = [GTMOAuth2WindowController controllerWithScope:kGTLAuthScopeUrlshortener + clientID:clientID + clientSecret:clientSecret + keychainItemName:kKeychainItemName + resourceBundle:frameworkBundle]; + + [windowController signInSheetModalForWindow:[self window] + completionHandler:^(GTMOAuth2Authentication *auth, NSError *error) { + if (error == nil) { + self.URLShortenerService.authorizer = auth; + + if (signInDoneSel) { + [self performSelector:signInDoneSel]; + } + } else { + self.historyFetchError = error; + [self updateUI]; + } + }]; +} + +#pragma mark UI + +- (void)updateUI { + // History table + [historyTable_ reloadData]; + + if (self.historyTicket != nil) { + [historyProgressIndicator_ startAnimation:self]; + [historyCancelButton_ setEnabled:YES]; + } else { + [historyProgressIndicator_ stopAnimation:self]; + [historyCancelButton_ setEnabled:NO]; + } + + // Display the selected history item, or the fetch error + GTLUrlshortenerUrl *selectedItem = [self selectedHistoryItem]; + NSString *resultStr = @""; + NSError *fetchError = self.historyFetchError; + if (fetchError != nil) { + resultStr = [fetchError description]; + } else { + if (selectedItem) { + resultStr = [selectedItem description]; + } + } + [historyResultTextField_ setString:resultStr]; + + // Analytics table + [analyticsTable_ reloadData]; + + if (self.analyticsTicket != nil) { + [analyticsProgressIndicator_ startAnimation:self]; + [analyticsCancelButton_ setEnabled:YES]; + } else { + [analyticsProgressIndicator_ stopAnimation:self]; + [analyticsCancelButton_ setEnabled:NO]; + } + + NSString *shortClicksStr = @"Short URL Clicks: -"; + NSString *longClicksStr = @"Long URL Clicks: -"; + if (self.analyticsItem.analytics) { + NSNumber *shortClicks = self.analyticsItem.analytics.allTime.shortUrlClicks; + NSNumber *longClicks = self.analyticsItem.analytics.allTime.shortUrlClicks; + + shortClicksStr = [NSString stringWithFormat:@"Short URL Clicks: %@", shortClicks]; + longClicksStr = [NSString stringWithFormat:@"Long URL Clicks: %@", longClicks]; + } + [shortURLClicksField_ setStringValue:shortClicksStr]; + [longURLClicksField_ setStringValue:longClicksStr]; + + // Enable buttons + BOOL isSignedIn = ([self signedInUsername] != nil); + [signedInButton_ setTitle:(isSignedIn ? @"Sign Out" : @"Sign In")]; + [signedInField_ setStringValue:(isSignedIn ? [self signedInUsername] : @"No")]; + + BOOL hasALongURL = ([[addShortenedURLField_ stringValue] length] > 0); + [addShortenedURLButton_ setEnabled:(isSignedIn && hasALongURL)]; + + // Show or hide the text indicating that the client ID or client secret are + // needed + BOOL hasClientIDStrings = [[clientIDField_ stringValue] length] > 0 + && [[clientSecretField_ stringValue] length] > 0; + [clientIDRequiredTextField_ setHidden:hasClientIDStrings]; +} + +- (void)displayAlert:(NSString *)title format:(NSString *)format, ... { + NSString *result = format; + if (format) { + va_list argList; + va_start(argList, format); + result = [[[NSString alloc] initWithFormat:format + arguments:argList] autorelease]; + va_end(argList); + } + NSBeginAlertSheet(title, nil, nil, nil, [self window], nil, nil, + nil, nil, @"%@", result); +} + +#pragma mark Client ID Sheet + +// Client ID and Client Secret Sheet +// +// Sample apps need this sheet to ask for the client ID and client secret +// strings +// +// Your application will just hardcode the client ID and client secret strings +// into the source rather than ask the user for them. +// +// The string values are obtained from the API Console, +// https://code.google.com/apis/console +// + +- (IBAction)clientIDClicked:(id)sender { + // show the sheet for developers to enter client ID and client secret + [NSApp beginSheet:clientIDSheet_ + modalForWindow:[self window] + modalDelegate:self + didEndSelector:@selector(clientIDSheetDidEnd:returnCode:contextInfo:) + contextInfo:NULL]; +} + +- (IBAction)clientIDDoneClicked:(id)sender { + [NSApp endSheet:clientIDSheet_ returnCode:NSOKButton]; +} + +- (void)clientIDSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { + [sheet orderOut:self]; + + [self updateUI]; +} + +#pragma mark Text field delegate methods + +- (void)controlTextDidChange:(NSNotification *)note { + [self updateUI]; // enabled/disable buttons +} + +#pragma mark TableView delegate and data source methods + +- (void)tableViewSelectionDidChange:(NSNotification *)notification { + if ([notification object] == historyTable_) { + [self fetchAnalyticsForSelectedHistoryItem]; + } else { + [self updateUI]; + } +} + +// table view data source methods +- (int)numberOfRowsInTableView:(NSTableView *)tableView { + if (tableView == historyTable_) { + NSArray *items = self.historyFeed.items; + return [items count]; + } else { + NSArray *items = [self selectedAnalyticsCounts]; + return [items count]; + } +} + +- (id)tableView:(NSTableView *)tableView +objectValueForTableColumn:(NSTableColumn *)tableColumn + row:(int)row { + if (tableView == historyTable_) { + GTLUrlshortenerUrl *item = [self.historyFeed itemAtIndex:row]; + NSString *resultStr = [NSString stringWithFormat:@"%@ → %@", + item.identifier, item.longUrl]; + return resultStr; + } else { + NSArray *counts = [self selectedAnalyticsCounts]; + GTLUrlshortenerStringCount *countPair = [counts objectAtIndex:row]; + NSString *resultStr = [NSString stringWithFormat:@"%@: %@", + countPair.count, countPair.identifier]; + return resultStr; + } +} + +@end diff --git a/GTL/Examples/URLShortenerSample/.svn/text-base/buildStripHeaders.svn-base b/GTL/Examples/URLShortenerSample/.svn/text-base/buildStripHeaders.svn-base new file mode 100644 index 0000000..0238ef2 --- /dev/null +++ b/GTL/Examples/URLShortenerSample/.svn/text-base/buildStripHeaders.svn-base @@ -0,0 +1,17 @@ +#!/bin/sh +# +# buildStripHeaders +# +# Remove header files from the built copy of the framework inside our +# application. + +# Strip "*.h" files +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname '*.h' -delete + +# Strip "Headers" links +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type l -delete + +# Strip "Headers" directories +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type d -prune -delete + + diff --git a/GTL/Examples/URLShortenerSample/.svn/text-base/main.m.svn-base b/GTL/Examples/URLShortenerSample/.svn/text-base/main.m.svn-base new file mode 100644 index 0000000..3e35dea --- /dev/null +++ b/GTL/Examples/URLShortenerSample/.svn/text-base/main.m.svn-base @@ -0,0 +1,25 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// main.m +// + +#import + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **) argv); +} diff --git a/GTL/Examples/URLShortenerSample/English.lproj/.svn/all-wcprops b/GTL/Examples/URLShortenerSample/English.lproj/.svn/all-wcprops new file mode 100644 index 0000000..f1dd1fe --- /dev/null +++ b/GTL/Examples/URLShortenerSample/English.lproj/.svn/all-wcprops @@ -0,0 +1,23 @@ +K 25 +svn:wc:ra_dav:version-url +V 65 +/svn/!svn/ver/154/trunk/Examples/URLShortenerSample/English.lproj +END +InfoPlist.strings +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/23/trunk/Examples/URLShortenerSample/English.lproj/InfoPlist.strings +END +URLShortenerSampleWindow.xib +K 25 +svn:wc:ra_dav:version-url +V 94 +/svn/!svn/ver/154/trunk/Examples/URLShortenerSample/English.lproj/URLShortenerSampleWindow.xib +END +MainMenu.xib +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/28/trunk/Examples/URLShortenerSample/English.lproj/MainMenu.xib +END diff --git a/GTL/Examples/URLShortenerSample/English.lproj/.svn/entries b/GTL/Examples/URLShortenerSample/English.lproj/.svn/entries new file mode 100644 index 0000000..1f9904e --- /dev/null +++ b/GTL/Examples/URLShortenerSample/English.lproj/.svn/entries @@ -0,0 +1,130 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/URLShortenerSample/English.lproj +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +InfoPlist.strings +file + + + + +2012-12-09T08:42:34.000000Z +bc745a35febf3350074747882fc8b7e0 +2011-08-16T23:18:18.014234Z +23 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +95 + +URLShortenerSampleWindow.xib +file + + + + +2012-12-09T08:42:34.000000Z +763c6ef56723ab34509e556b2466208a +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +107085 + +MainMenu.xib +file + + + + +2012-12-09T08:42:34.000000Z +24062b8986fb5ca97ff67f311d62358d +2011-08-23T19:12:40.725509Z +28 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +103630 + diff --git a/GTL/Examples/URLShortenerSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base b/GTL/Examples/URLShortenerSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base new file mode 100644 index 0000000..77831dd --- /dev/null +++ b/GTL/Examples/URLShortenerSample/English.lproj/.svn/text-base/InfoPlist.strings.svn-base @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "© Google Inc. 2011"; diff --git a/GTL/Examples/URLShortenerSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base b/GTL/Examples/URLShortenerSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base new file mode 100644 index 0000000..4f7a401 --- /dev/null +++ b/GTL/Examples/URLShortenerSample/English.lproj/.svn/text-base/MainMenu.xib.svn-base @@ -0,0 +1,2409 @@ + + + + 1050 + 10F569 + 823 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 823 + + + YES + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + + NSApplication + + + + FirstResponder + + + NSApplication + + + MainMenu + + YES + + + SampleApp + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + SampleApp + + YES + + + About the Sample + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + + Services + + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + + File + + + YES + + + New + n + 1048576 + 2147483647 + + + + + + Open... + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + + Open Recent + + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + Save As… + S + 1048576 + 2147483647 + + + + + + Revert + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup… + P + 1048576 + 2147483647 + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + + Edit + + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + + Find + + + YES + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1048576 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling + + 1048576 + 2147483647 + + + submenuAction: + + Spelling + + YES + + + Spelling… + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling as You Type + + 1048576 + 2147483647 + + + + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + + Window + + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + Help + + YES + + + Help + ? + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + URLShortenerAppController + + + + + YES + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + showHelp: + + + + 122 + + + + clearRecentDocuments: + + + + 127 + + + + terminate: + + + + 139 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + hideOtherApplications: + + + + 146 + + + + hide: + + + + 152 + + + + unhideAllApplications: + + + + 153 + + + + cut: + + + + 175 + + + + paste: + + + + 176 + + + + redo: + + + + 178 + + + + selectAll: + + + + 179 + + + + undo: + + + + 180 + + + + copy: + + + + 181 + + + + showGuessPanel: + + + + 188 + + + + checkSpelling: + + + + 190 + + + + toggleContinuousSpellChecking: + + + + 192 + + + + performClose: + + + + 193 + + + + delete: + + + + 195 + + + + performZoom: + + + + 198 + + + + performFindPanelAction: + + + + 199 + + + + performFindPanelAction: + + + + 200 + + + + performFindPanelAction: + + + + 201 + + + + performFindPanelAction: + + + + 202 + + + + centerSelectionInVisibleArea: + + + + 203 + + + + pasteAsPlainText: + + + + 205 + + + + delegate + + + + 223 + + + + delegate + + + + 225 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + MainMenu + + + 19 + + + YES + + + + + + 24 + + + YES + + + + + + + + + 5 + + + + + 23 + + + + + 92 + + + + + 197 + + + + + 56 + + + YES + + + + + + 57 + + + YES + + + + + + + + + + + + + + + + 58 + + + + + 129 + + + + + 131 + + + YES + + + + + + 130 + + + + + 134 + + + + + 136 + + + + + 143 + + + + + 144 + + + + + 145 + + + + + 149 + + + + + 150 + + + + + 196 + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + + + + + + + + 72 + + + + + 73 + + + + + 74 + + + + + 75 + + + + + 77 + + + + + 78 + + + + + 79 + + + + + 80 + + + + + 82 + + + + + 112 + + + + + 124 + + + YES + + + + + + 125 + + + YES + + + + + + 126 + + + + + 103 + + + YES + + + + + + 106 + + + YES + + + + + + 111 + + + + + 163 + + + YES + + + + + + 169 + + + YES + + + + + + + + + + + + + + + + + 156 + + + + + 157 + + + + + 158 + + + + + 160 + + + + + 164 + + + + + 168 + + + YES + + + + + + 159 + + + YES + + + + + + + + + + 154 + + + + + 155 + + + + + 161 + + + + + 162 + + + + + 167 + + + + + 171 + + + + + 172 + + + + + 173 + + + + + 174 + + + + + 184 + + + YES + + + + + + 185 + + + YES + + + + + + + + 187 + + + + + 189 + + + + + 191 + + + + + 204 + + + + + 222 + + + SampleAppController + + + + + YES + + YES + -3.IBPluginDependency + -3.ImportedFromIB2 + 103.IBPluginDependency + 103.ImportedFromIB2 + 106.IBPluginDependency + 106.ImportedFromIB2 + 111.IBPluginDependency + 111.ImportedFromIB2 + 112.IBPluginDependency + 112.ImportedFromIB2 + 124.IBPluginDependency + 124.ImportedFromIB2 + 125.IBPluginDependency + 125.ImportedFromIB2 + 126.IBPluginDependency + 126.ImportedFromIB2 + 129.IBPluginDependency + 129.ImportedFromIB2 + 130.IBPluginDependency + 130.ImportedFromIB2 + 131.IBPluginDependency + 131.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 136.IBPluginDependency + 136.ImportedFromIB2 + 143.IBPluginDependency + 143.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 145.IBPluginDependency + 145.ImportedFromIB2 + 149.IBPluginDependency + 149.ImportedFromIB2 + 150.IBPluginDependency + 150.ImportedFromIB2 + 154.IBPluginDependency + 154.ImportedFromIB2 + 155.IBPluginDependency + 155.ImportedFromIB2 + 156.IBPluginDependency + 156.ImportedFromIB2 + 157.IBPluginDependency + 157.ImportedFromIB2 + 158.IBPluginDependency + 158.ImportedFromIB2 + 159.IBPluginDependency + 159.ImportedFromIB2 + 160.IBPluginDependency + 160.ImportedFromIB2 + 161.IBPluginDependency + 161.ImportedFromIB2 + 162.IBPluginDependency + 162.ImportedFromIB2 + 163.IBPluginDependency + 163.ImportedFromIB2 + 164.IBPluginDependency + 164.ImportedFromIB2 + 167.IBPluginDependency + 167.ImportedFromIB2 + 168.IBPluginDependency + 168.ImportedFromIB2 + 169.IBPluginDependency + 169.ImportedFromIB2 + 171.IBPluginDependency + 171.ImportedFromIB2 + 172.IBPluginDependency + 172.ImportedFromIB2 + 173.IBPluginDependency + 173.ImportedFromIB2 + 174.IBPluginDependency + 174.ImportedFromIB2 + 184.IBPluginDependency + 184.ImportedFromIB2 + 185.IBPluginDependency + 185.ImportedFromIB2 + 187.IBPluginDependency + 187.ImportedFromIB2 + 189.IBPluginDependency + 189.ImportedFromIB2 + 19.IBPluginDependency + 19.ImportedFromIB2 + 191.IBPluginDependency + 191.ImportedFromIB2 + 196.IBPluginDependency + 196.ImportedFromIB2 + 197.IBPluginDependency + 197.ImportedFromIB2 + 204.IBPluginDependency + 204.ImportedFromIB2 + 222.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 24.IBPluginDependency + 24.ImportedFromIB2 + 29.IBPluginDependency + 29.ImportedFromIB2 + 5.IBPluginDependency + 5.ImportedFromIB2 + 56.IBPluginDependency + 56.ImportedFromIB2 + 57.IBPluginDependency + 57.ImportedFromIB2 + 58.IBPluginDependency + 58.ImportedFromIB2 + 72.IBPluginDependency + 72.ImportedFromIB2 + 73.IBPluginDependency + 73.ImportedFromIB2 + 74.IBPluginDependency + 74.ImportedFromIB2 + 75.IBPluginDependency + 75.ImportedFromIB2 + 77.IBPluginDependency + 77.ImportedFromIB2 + 78.IBPluginDependency + 78.ImportedFromIB2 + 79.IBPluginDependency + 79.ImportedFromIB2 + 80.IBPluginDependency + 80.ImportedFromIB2 + 81.IBPluginDependency + 81.ImportedFromIB2 + 82.IBPluginDependency + 82.ImportedFromIB2 + 83.IBPluginDependency + 83.ImportedFromIB2 + 92.IBPluginDependency + 92.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + + YES + + + + + YES + + + YES + + + + 227 + + + + YES + + FirstResponder + NSObject + + IBUserSource + + + + + URLShortenerAppController + NSObject + + IBUserSource + + + + + + YES + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSBrowser + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSBrowser.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSDocument + NSObject + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + id + id + id + id + id + id + + + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + + printDocument: + id + + + revertDocumentToSaved: + id + + + runPageLayout: + id + + + saveDocument: + id + + + saveDocumentAs: + id + + + saveDocumentTo: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocument.h + + + + NSDocument + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentScripting.h + + + + NSDocumentController + NSObject + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + id + id + id + id + + + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + + clearRecentDocuments: + id + + + newDocument: + id + + + openDocument: + id + + + saveAllDocuments: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentController.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSMatrix + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSMatrix.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSMenuItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSMovieView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSMovieView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebEditingDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebFrameLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebJavaPlugIn.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPlugin.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPluginContainer.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPolicyDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebResourceLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebScriptObject.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebUIDelegate.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSTableView + NSControl + + + + NSText + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSText.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + + WebView + NSView + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + + goBack: + id + + + goForward: + id + + + makeTextLarger: + id + + + makeTextSmaller: + id + + + makeTextStandardSize: + id + + + reload: + id + + + reloadFromOrigin: + id + + + stopLoading: + id + + + takeStringURLFrom: + id + + + toggleContinuousSpellChecking: + id + + + toggleSmartInsertDelete: + id + + + + + IBFrameworkSource + WebKit.framework/Headers/WebView.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../LatitudeSample.xcodeproj + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {9, 8} + {7, 2} + + + + diff --git a/GTL/Examples/URLShortenerSample/English.lproj/.svn/text-base/URLShortenerSampleWindow.xib.svn-base b/GTL/Examples/URLShortenerSample/English.lproj/.svn/text-base/URLShortenerSampleWindow.xib.svn-base new file mode 100644 index 0000000..ea9d031 --- /dev/null +++ b/GTL/Examples/URLShortenerSample/English.lproj/.svn/text-base/URLShortenerSampleWindow.xib.svn-base @@ -0,0 +1,2437 @@ + + + + 1070 + 11D50b + 2182 + 1138.32 + 568.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2182 + + + YES + NSTableColumn + NSSegmentedControl + NSScroller + NSSplitView + NSButton + NSSegmentedCell + NSTextFieldCell + NSScrollView + NSButtonCell + NSProgressIndicator + NSTableView + NSCustomObject + NSTextView + NSView + NSWindowTemplate + NSTextField + NSUserDefaultsController + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + URLShortenerSampleWindowController + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{64, 259}, {567, 574}} + 1886912512 + Sample App + + NSWindow + + + View + + + {567, 574} + + + 256 + + YES + + + 265 + {{419, 526}, {134, 32}} + + YES + + 67239424 + 134217728 + Get Short URLs + + LucidaGrande + 13 + 1044 + + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + + 264 + {{20, 469}, {162, 17}} + + YES + + 67239424 + 272629760 + Short URLs - select one + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 1289 + + {{469, 471}, {16, 16}} + + 28938 + 100 + + + + 265 + {{492, 470}, {54, 16}} + + YES + + 67239424 + 134479872 + Cancel + + LucidaGrande + 9 + 3614 + + + -2038284033 + 1 + + LucidaGrande + 9 + 16 + + + + + + 200 + 25 + + + + + 289 + {{419, 18}, {128, 18}} + + YES + + 67239424 + 131072 + Log http to desktop + + LucidaGrande + 11 + 3100 + + + 1211912703 + 2 + + NSSwitch + + + + 200 + 25 + + + + + 264 + {{90, 510}, {71, 17}} + + YES + + 67239424 + 272629760 + Signed In: + + + + + + + + + 266 + {{163, 510}, {373, 17}} + + YES + + 67239424 + 272629760 + No + + + + + + + + + 268 + {{15, 503}, {72, 28}} + + YES + + 67239424 + 134348800 + Sign Out + + + -2038284033 + 129 + + + 200 + 25 + + + + + 274 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 256 + {525, 102} + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 522 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + + + + 337772096 + 2048 + + + + 6 + System + controlBackgroundColor + + + + + 3 + YES + + + + 3 + 2 + + 3 + MQA + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + 306184192 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {525, 102}} + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 95}} + + + _doScroller: + 0.5 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + 1 + + _doScroller: + 0.99047620000000003 + + + {527, 104} + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 290 + + YES + + + 2304 + + YES + + + 2322 + {525, 14} + + + + + + results + + + YES + + YES + NSColor + NSFont + + + YES + + 1 + MC40NTEwODY5NCAwLjEwNDE0NTEyIDAuMDgyODYwMjE2AA + + + Geneva + 10 + 16 + + + + + + + YES + + + 6 + + + + 525 + 1 + + + 67119969 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + 1 + MCAwIDEAA + + + + + + + 1 + + 6 + {1052, 10000000} + {463, 0} + + + + {{1, 1}, {525, 76}} + + + + + + {4, 5} + + 79691776 + + YES + + YES + + + + + file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff + + + + + + 3 + MCAwAA + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{0, 113}, {527, 78}} + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + {{20, 270}, {527, 191}} + + + + + 289 + {{353, 46}, {64, 28}} + + YES + + 67239424 + 134348800 + Add + + LucidaGrande + 11 + 16 + + + -2038284033 + 129 + + + 200 + 25 + + + + + 268 + {{15, 530}, {83, 28}} + + YES + + -2080244224 + 134348800 + Client ID... + + + -2038284033 + 129 + + + 200 + 25 + + + + + 264 + {{102, 537}, {178, 14}} + + YES + + 67239424 + 272760832 + Client ID and Secret Required + + + + + + + + + 292 + {{20, 235}, {65, 17}} + + YES + + 67239424 + 272629760 + Analytics + + + + + + + + + 1313 + + {{469, 237}, {16, 16}} + + 28938 + 100 + + + + 289 + {{492, 236}, {54, 16}} + + YES + + 67239424 + 134479872 + Cancel + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 292 + {{17, 53}, {57, 17}} + + YES + + 67239424 + 272629760 + Shorten: + + + + + + + + + 290 + {{79, 51}, {271, 22}} + + YES + + -1804468671 + 272630784 + + + http:// + + YES + + 6 + System + textBackgroundColor + + + + 6 + System + textColor + + + + + + + 292 + {{88, 231}, {315, 20}} + + YES + + 67239424 + 131072 + + + + YES + + 80 + referrers + YES + 0 + + + 79 + countries + 1 + 0 + + + 79 + browsers + 0 + + + platforms + 0 + + + 1 + + + + + 290 + + YES + + + 2304 + + YES + + + 256 + {525, 102} + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 522 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + + + 337772096 + 2048 + + + + + + 3 + YES + + + + 3 + 2 + + + 17 + 306184192 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {525, 102}} + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 95}} + + + _doScroller: + 0.5 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + 1 + + _doScroller: + 0.99047620000000003 + + + {{20, 123}, {527, 104}} + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 292 + {{20, 101}, {133, 14}} + + YES + + 67239424 + 272760832 + Short URL Clicks: 12345 + + + + + + + + + 289 + {{417, 101}, {132, 14}} + + YES + + 67239424 + 272760832 + Long URL Clicks: 12345 + + + + + + + + {567, 574} + + + {{0, 0}, {1440, 878}} + {567, 596} + {10000000000000, 10000000000000} + YES + + + YES + + + 3 + 2 + {{235, 277}, {458, 282}} + 611844096 + Client ID Sheet + NSWindow + + + + + 256 + + YES + + + 266 + {{118, 141}, {320, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 141}, {63, 17}} + + YES + + 68288064 + 272630784 + Client ID: + + + + + + + + + 266 + {{118, 110}, {320, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 115}, {88, 17}} + + YES + + 68288064 + 272630784 + Client Secret: + + + + + + + + + 268 + {{338, 78}, {82, 20}} + + YES + + 67239424 + 134348800 + API Console + + + -2038284033 + 134 + + + 200 + 25 + + + + + 268 + {{17, 80}, {316, 17}} + + YES + + 68288064 + 272630784 + Client ID and Client Secret are obtained from the + + + + + + + + + 268 + {{17, 202}, {424, 34}} + + YES + + 67239424 + 138412032 + Each application should have a client ID and client secret hardcoded into the source. + + + + + + + + + 268 + {{348, 12}, {96, 32}} + + YES + + 67239424 + 134217728 + Done + + + -2038284033 + 129 + + DQ + 200 + 25 + + + + {458, 282} + + {{0, 0}, {1920, 1178}} + {10000000000000, 10000000000000} + YES + + + + + YES + + + loggingCheckboxClicked: + + + + 151 + + + + signInClicked: + + + + 364 + + + + window + + + + 383 + + + + clientIDClicked: + + + + 466 + + + + clientIDDoneClicked: + + + + 467 + + + + APIConsoleClicked: + + + + 468 + + + + getHistoryClicked: + + + + 494 + + + + cancelHistoryFetchClicked: + + + + 495 + + + + analyticsSegmentClicked: + + + + 528 + + + + cancelAnalyticsFetchClicked: + + + + 538 + + + + addShortenedURLClicked: + + + + 549 + + + + signedInField_ + + + + 570 + + + + signedInButton_ + + + + 571 + + + + historyTable_ + + + + 572 + + + + historyProgressIndicator_ + + + + 573 + + + + historyResultTextField_ + + + + 574 + + + + historyCancelButton_ + + + + 575 + + + + analyticsSegmentedControl_ + + + + 576 + + + + analyticsTable_ + + + + 577 + + + + analyticsProgressIndicator_ + + + + 578 + + + + analyticsCancelButton_ + + + + 579 + + + + shortURLClicksField_ + + + + 580 + + + + longURLClicksField_ + + + + 581 + + + + addShortenedURLField_ + + + + 582 + + + + addShortenedURLButton_ + + + + 583 + + + + clientIDButton_ + + + + 584 + + + + clientIDRequiredTextField_ + + + + 585 + + + + clientIDSheet_ + + + + 586 + + + + clientIDField_ + + + + 587 + + + + clientSecretField_ + + + + 588 + + + + delegate + + + + 15 + + + + dataSource + + + + 34 + + + + delegate + + + + 35 + + + + value: values.clientID + + + + + + value: values.clientID + value + values.clientID + + NSContinuouslyUpdatesValue + + + 2 + + + 470 + + + + value: values.clientSecret + + + + + + value: values.clientSecret + value + values.clientSecret + + NSContinuouslyUpdatesValue + + + 2 + + + 472 + + + + dataSource + + + + 514 + + + + delegate + + + + 515 + + + + delegate + + + + 550 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 5 + + + YES + + + + Window + + + 6 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + 17 + + + YES + + + + + + 40 + + + + + 86 + + + YES + + + + + + 150 + + + YES + + + + + + 44 + + + Shared Defaults + + + 251 + + + + + 253 + + + + + 254 + + + + + 38 + + + YES + + + + + + 252 + + + + + 358 + + + YES + + + + + + 359 + + + YES + + + + + + 360 + + + YES + + + + + + 361 + + + + + 362 + + + + + 363 + + + + + 384 + + + YES + + + + + + + 24 + + + YES + + + + + + + + 265 + + + + + 264 + + + + + 25 + + + YES + + + + + + 26 + + + YES + + + + + + 263 + + + + + 80 + + + YES + + + + + + + + 267 + + + + + 266 + + + + + 81 + + + + + 399 + + + YES + + + + + + 400 + + + + + 438 + + + YES + + + + + + 439 + + + YES + + + + + + + + + + + + + 440 + + + YES + + + + + + 441 + + + YES + + + + + + 442 + + + YES + + + + + + 443 + + + YES + + + + + + 444 + + + YES + + + + + + 445 + + + YES + + + + + + 446 + + + YES + + + + + + 447 + + + YES + + + + + + 448 + + + + + 449 + + + + + 450 + + + + + 451 + + + + + 452 + + + + + 453 + + + + + 454 + + + + + 455 + + + + + 460 + + + YES + + + + + + 461 + + + YES + + + + + + 462 + + + + + 463 + + + + + 497 + + + YES + + + + + + 498 + + + + + 499 + + + YES + + + + + + 511 + + + + + 512 + + + + + 516 + + + YES + + + + + + 517 + + + + + 518 + + + YES + + + + + + 519 + + + + + 526 + + + YES + + + + + + 527 + + + + + 502 + + + YES + + + + + + + + 505 + + + + + 504 + + + + + 503 + + + YES + + + + + + 506 + + + YES + + + + + + 507 + + + + + 539 + + + YES + + + + + + 540 + + + + + 545 + + + YES + + + + + + 546 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 150.IBPluginDependency + 17.IBPluginDependency + 24.IBPluginDependency + 25.IBPluginDependency + 251.IBPluginDependency + 252.IBPluginDependency + 253.IBPluginDependency + 254.IBPluginDependency + 26.IBPluginDependency + 263.IBPluginDependency + 263.IBShouldRemoveOnLegacySave + 264.IBPluginDependency + 264.IBShouldRemoveOnLegacySave + 265.IBPluginDependency + 265.IBShouldRemoveOnLegacySave + 266.IBPluginDependency + 266.IBShouldRemoveOnLegacySave + 267.IBPluginDependency + 267.IBShouldRemoveOnLegacySave + 358.IBPluginDependency + 359.IBPluginDependency + 360.IBPluginDependency + 361.IBPluginDependency + 362.IBPluginDependency + 363.IBPluginDependency + 38.IBPluginDependency + 384.IBPluginDependency + 399.IBPluginDependency + 40.IBPluginDependency + 400.IBPluginDependency + 438.IBPluginDependency + 438.IBWindowTemplateEditedContentRect + 438.NSWindowTemplate.visibleAtLaunch + 439.IBPluginDependency + 44.IBPluginDependency + 440.IBPluginDependency + 441.IBPluginDependency + 442.IBPluginDependency + 443.IBPluginDependency + 444.IBPluginDependency + 445.IBPluginDependency + 446.IBPluginDependency + 447.IBPluginDependency + 448.IBPluginDependency + 449.IBPluginDependency + 450.IBPluginDependency + 451.IBPluginDependency + 452.IBPluginDependency + 453.IBPluginDependency + 454.IBPluginDependency + 455.IBPluginDependency + 460.IBPluginDependency + 461.IBPluginDependency + 462.IBPluginDependency + 463.IBPluginDependency + 497.IBPluginDependency + 498.IBPluginDependency + 499.IBPluginDependency + 5.IBPluginDependency + 5.IBWindowTemplateEditedContentRect + 502.IBPluginDependency + 503.IBPluginDependency + 504.IBPluginDependency + 504.IBShouldRemoveOnLegacySave + 505.IBPluginDependency + 505.IBShouldRemoveOnLegacySave + 506.IBPluginDependency + 507.IBPluginDependency + 507.IBShouldRemoveOnLegacySave + 511.IBPluginDependency + 512.IBPluginDependency + 516.IBPluginDependency + 517.IBPluginDependency + 518.IBPluginDependency + 519.IBPluginDependency + 526.IBPluginDependency + 527.IBPluginDependency + 527.IBSegmentedControlInspectorSelectedSegmentMetadataKey + 539.IBPluginDependency + 540.IBPluginDependency + 545.IBPluginDependency + 546.IBPluginDependency + 6.IBPluginDependency + 6.IBUserGuides + 80.IBPluginDependency + 81.IBPluginDependency + 86.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{645, 782}, {458, 282}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{18, 581}, {567, 574}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + YES + + + 744 + 1 + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 588 + + + + YES + + URLShortenerSampleWindowController + NSWindowController + + YES + + YES + APIConsoleClicked: + addShortenedURLClicked: + analyticsSegmentClicked: + cancelAnalyticsFetchClicked: + cancelHistoryFetchClicked: + clientIDClicked: + clientIDDoneClicked: + getHistoryClicked: + loggingCheckboxClicked: + signInClicked: + + + YES + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + APIConsoleClicked: + addShortenedURLClicked: + analyticsSegmentClicked: + cancelAnalyticsFetchClicked: + cancelHistoryFetchClicked: + clientIDClicked: + clientIDDoneClicked: + getHistoryClicked: + loggingCheckboxClicked: + signInClicked: + + + YES + + APIConsoleClicked: + id + + + addShortenedURLClicked: + id + + + analyticsSegmentClicked: + id + + + cancelAnalyticsFetchClicked: + id + + + cancelHistoryFetchClicked: + id + + + clientIDClicked: + id + + + clientIDDoneClicked: + id + + + getHistoryClicked: + id + + + loggingCheckboxClicked: + id + + + signInClicked: + id + + + + + YES + + YES + addShortenedURLButton_ + addShortenedURLField_ + analyticsCancelButton_ + analyticsProgressIndicator_ + analyticsSegmentedControl_ + analyticsTable_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + historyCancelButton_ + historyProgressIndicator_ + historyResultTextField_ + historyTable_ + longURLClicksField_ + shortURLClicksField_ + signedInButton_ + signedInField_ + + + YES + NSButton + NSTextField + NSButton + NSProgressIndicator + NSSegmentedControl + NSTableView + NSButton + NSTextField + NSTextField + NSWindow + NSTextField + NSButton + NSProgressIndicator + NSTextView + NSTableView + NSTextField + NSTextField + NSButton + NSTextField + + + + YES + + YES + addShortenedURLButton_ + addShortenedURLField_ + analyticsCancelButton_ + analyticsProgressIndicator_ + analyticsSegmentedControl_ + analyticsTable_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + historyCancelButton_ + historyProgressIndicator_ + historyResultTextField_ + historyTable_ + longURLClicksField_ + shortURLClicksField_ + signedInButton_ + signedInField_ + + + YES + + addShortenedURLButton_ + NSButton + + + addShortenedURLField_ + NSTextField + + + analyticsCancelButton_ + NSButton + + + analyticsProgressIndicator_ + NSProgressIndicator + + + analyticsSegmentedControl_ + NSSegmentedControl + + + analyticsTable_ + NSTableView + + + clientIDButton_ + NSButton + + + clientIDField_ + NSTextField + + + clientIDRequiredTextField_ + NSTextField + + + clientIDSheet_ + NSWindow + + + clientSecretField_ + NSTextField + + + historyCancelButton_ + NSButton + + + historyProgressIndicator_ + NSProgressIndicator + + + historyResultTextField_ + NSTextView + + + historyTable_ + NSTableView + + + longURLClicksField_ + NSTextField + + + shortURLClicksField_ + NSTextField + + + signedInButton_ + NSButton + + + signedInField_ + NSTextField + + + + + IBProjectSource + ./Classes/URLShortenerSampleWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + diff --git a/GTL/Examples/URLShortenerSample/English.lproj/InfoPlist.strings b/GTL/Examples/URLShortenerSample/English.lproj/InfoPlist.strings new file mode 100644 index 0000000..77831dd --- /dev/null +++ b/GTL/Examples/URLShortenerSample/English.lproj/InfoPlist.strings @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "© Google Inc. 2011"; diff --git a/GTL/Examples/URLShortenerSample/English.lproj/MainMenu.xib b/GTL/Examples/URLShortenerSample/English.lproj/MainMenu.xib new file mode 100644 index 0000000..4f7a401 --- /dev/null +++ b/GTL/Examples/URLShortenerSample/English.lproj/MainMenu.xib @@ -0,0 +1,2409 @@ + + + + 1050 + 10F569 + 823 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 823 + + + YES + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + + NSApplication + + + + FirstResponder + + + NSApplication + + + MainMenu + + YES + + + SampleApp + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + SampleApp + + YES + + + About the Sample + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + + Services + + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + + File + + + YES + + + New + n + 1048576 + 2147483647 + + + + + + Open... + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + + Open Recent + + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + Save As… + S + 1048576 + 2147483647 + + + + + + Revert + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup… + P + 1048576 + 2147483647 + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + + Edit + + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + + Find + + + YES + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1048576 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling + + 1048576 + 2147483647 + + + submenuAction: + + Spelling + + YES + + + Spelling… + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling as You Type + + 1048576 + 2147483647 + + + + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + + Window + + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + Help + + YES + + + Help + ? + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + URLShortenerAppController + + + + + YES + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + showHelp: + + + + 122 + + + + clearRecentDocuments: + + + + 127 + + + + terminate: + + + + 139 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + hideOtherApplications: + + + + 146 + + + + hide: + + + + 152 + + + + unhideAllApplications: + + + + 153 + + + + cut: + + + + 175 + + + + paste: + + + + 176 + + + + redo: + + + + 178 + + + + selectAll: + + + + 179 + + + + undo: + + + + 180 + + + + copy: + + + + 181 + + + + showGuessPanel: + + + + 188 + + + + checkSpelling: + + + + 190 + + + + toggleContinuousSpellChecking: + + + + 192 + + + + performClose: + + + + 193 + + + + delete: + + + + 195 + + + + performZoom: + + + + 198 + + + + performFindPanelAction: + + + + 199 + + + + performFindPanelAction: + + + + 200 + + + + performFindPanelAction: + + + + 201 + + + + performFindPanelAction: + + + + 202 + + + + centerSelectionInVisibleArea: + + + + 203 + + + + pasteAsPlainText: + + + + 205 + + + + delegate + + + + 223 + + + + delegate + + + + 225 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + MainMenu + + + 19 + + + YES + + + + + + 24 + + + YES + + + + + + + + + 5 + + + + + 23 + + + + + 92 + + + + + 197 + + + + + 56 + + + YES + + + + + + 57 + + + YES + + + + + + + + + + + + + + + + 58 + + + + + 129 + + + + + 131 + + + YES + + + + + + 130 + + + + + 134 + + + + + 136 + + + + + 143 + + + + + 144 + + + + + 145 + + + + + 149 + + + + + 150 + + + + + 196 + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + + + + + + + + 72 + + + + + 73 + + + + + 74 + + + + + 75 + + + + + 77 + + + + + 78 + + + + + 79 + + + + + 80 + + + + + 82 + + + + + 112 + + + + + 124 + + + YES + + + + + + 125 + + + YES + + + + + + 126 + + + + + 103 + + + YES + + + + + + 106 + + + YES + + + + + + 111 + + + + + 163 + + + YES + + + + + + 169 + + + YES + + + + + + + + + + + + + + + + + 156 + + + + + 157 + + + + + 158 + + + + + 160 + + + + + 164 + + + + + 168 + + + YES + + + + + + 159 + + + YES + + + + + + + + + + 154 + + + + + 155 + + + + + 161 + + + + + 162 + + + + + 167 + + + + + 171 + + + + + 172 + + + + + 173 + + + + + 174 + + + + + 184 + + + YES + + + + + + 185 + + + YES + + + + + + + + 187 + + + + + 189 + + + + + 191 + + + + + 204 + + + + + 222 + + + SampleAppController + + + + + YES + + YES + -3.IBPluginDependency + -3.ImportedFromIB2 + 103.IBPluginDependency + 103.ImportedFromIB2 + 106.IBPluginDependency + 106.ImportedFromIB2 + 111.IBPluginDependency + 111.ImportedFromIB2 + 112.IBPluginDependency + 112.ImportedFromIB2 + 124.IBPluginDependency + 124.ImportedFromIB2 + 125.IBPluginDependency + 125.ImportedFromIB2 + 126.IBPluginDependency + 126.ImportedFromIB2 + 129.IBPluginDependency + 129.ImportedFromIB2 + 130.IBPluginDependency + 130.ImportedFromIB2 + 131.IBPluginDependency + 131.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 136.IBPluginDependency + 136.ImportedFromIB2 + 143.IBPluginDependency + 143.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 145.IBPluginDependency + 145.ImportedFromIB2 + 149.IBPluginDependency + 149.ImportedFromIB2 + 150.IBPluginDependency + 150.ImportedFromIB2 + 154.IBPluginDependency + 154.ImportedFromIB2 + 155.IBPluginDependency + 155.ImportedFromIB2 + 156.IBPluginDependency + 156.ImportedFromIB2 + 157.IBPluginDependency + 157.ImportedFromIB2 + 158.IBPluginDependency + 158.ImportedFromIB2 + 159.IBPluginDependency + 159.ImportedFromIB2 + 160.IBPluginDependency + 160.ImportedFromIB2 + 161.IBPluginDependency + 161.ImportedFromIB2 + 162.IBPluginDependency + 162.ImportedFromIB2 + 163.IBPluginDependency + 163.ImportedFromIB2 + 164.IBPluginDependency + 164.ImportedFromIB2 + 167.IBPluginDependency + 167.ImportedFromIB2 + 168.IBPluginDependency + 168.ImportedFromIB2 + 169.IBPluginDependency + 169.ImportedFromIB2 + 171.IBPluginDependency + 171.ImportedFromIB2 + 172.IBPluginDependency + 172.ImportedFromIB2 + 173.IBPluginDependency + 173.ImportedFromIB2 + 174.IBPluginDependency + 174.ImportedFromIB2 + 184.IBPluginDependency + 184.ImportedFromIB2 + 185.IBPluginDependency + 185.ImportedFromIB2 + 187.IBPluginDependency + 187.ImportedFromIB2 + 189.IBPluginDependency + 189.ImportedFromIB2 + 19.IBPluginDependency + 19.ImportedFromIB2 + 191.IBPluginDependency + 191.ImportedFromIB2 + 196.IBPluginDependency + 196.ImportedFromIB2 + 197.IBPluginDependency + 197.ImportedFromIB2 + 204.IBPluginDependency + 204.ImportedFromIB2 + 222.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 24.IBPluginDependency + 24.ImportedFromIB2 + 29.IBPluginDependency + 29.ImportedFromIB2 + 5.IBPluginDependency + 5.ImportedFromIB2 + 56.IBPluginDependency + 56.ImportedFromIB2 + 57.IBPluginDependency + 57.ImportedFromIB2 + 58.IBPluginDependency + 58.ImportedFromIB2 + 72.IBPluginDependency + 72.ImportedFromIB2 + 73.IBPluginDependency + 73.ImportedFromIB2 + 74.IBPluginDependency + 74.ImportedFromIB2 + 75.IBPluginDependency + 75.ImportedFromIB2 + 77.IBPluginDependency + 77.ImportedFromIB2 + 78.IBPluginDependency + 78.ImportedFromIB2 + 79.IBPluginDependency + 79.ImportedFromIB2 + 80.IBPluginDependency + 80.ImportedFromIB2 + 81.IBPluginDependency + 81.ImportedFromIB2 + 82.IBPluginDependency + 82.ImportedFromIB2 + 83.IBPluginDependency + 83.ImportedFromIB2 + 92.IBPluginDependency + 92.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + + YES + + + + + YES + + + YES + + + + 227 + + + + YES + + FirstResponder + NSObject + + IBUserSource + + + + + URLShortenerAppController + NSObject + + IBUserSource + + + + + + YES + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSBrowser + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSBrowser.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSDocument + NSObject + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + id + id + id + id + id + id + + + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + + printDocument: + id + + + revertDocumentToSaved: + id + + + runPageLayout: + id + + + saveDocument: + id + + + saveDocumentAs: + id + + + saveDocumentTo: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocument.h + + + + NSDocument + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentScripting.h + + + + NSDocumentController + NSObject + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + id + id + id + id + + + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + + clearRecentDocuments: + id + + + newDocument: + id + + + openDocument: + id + + + saveAllDocuments: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentController.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSMatrix + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSMatrix.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSMenuItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSMovieView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSMovieView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebEditingDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebFrameLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebJavaPlugIn.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPlugin.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPluginContainer.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPolicyDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebResourceLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebScriptObject.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebUIDelegate.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSTableView + NSControl + + + + NSText + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSText.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + + WebView + NSView + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + + goBack: + id + + + goForward: + id + + + makeTextLarger: + id + + + makeTextSmaller: + id + + + makeTextStandardSize: + id + + + reload: + id + + + reloadFromOrigin: + id + + + stopLoading: + id + + + takeStringURLFrom: + id + + + toggleContinuousSpellChecking: + id + + + toggleSmartInsertDelete: + id + + + + + IBFrameworkSource + WebKit.framework/Headers/WebView.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../LatitudeSample.xcodeproj + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {9, 8} + {7, 2} + + + + diff --git a/GTL/Examples/URLShortenerSample/English.lproj/URLShortenerSampleWindow.xib b/GTL/Examples/URLShortenerSample/English.lproj/URLShortenerSampleWindow.xib new file mode 100644 index 0000000..ea9d031 --- /dev/null +++ b/GTL/Examples/URLShortenerSample/English.lproj/URLShortenerSampleWindow.xib @@ -0,0 +1,2437 @@ + + + + 1070 + 11D50b + 2182 + 1138.32 + 568.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2182 + + + YES + NSTableColumn + NSSegmentedControl + NSScroller + NSSplitView + NSButton + NSSegmentedCell + NSTextFieldCell + NSScrollView + NSButtonCell + NSProgressIndicator + NSTableView + NSCustomObject + NSTextView + NSView + NSWindowTemplate + NSTextField + NSUserDefaultsController + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + URLShortenerSampleWindowController + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{64, 259}, {567, 574}} + 1886912512 + Sample App + + NSWindow + + + View + + + {567, 574} + + + 256 + + YES + + + 265 + {{419, 526}, {134, 32}} + + YES + + 67239424 + 134217728 + Get Short URLs + + LucidaGrande + 13 + 1044 + + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + + 264 + {{20, 469}, {162, 17}} + + YES + + 67239424 + 272629760 + Short URLs - select one + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 1289 + + {{469, 471}, {16, 16}} + + 28938 + 100 + + + + 265 + {{492, 470}, {54, 16}} + + YES + + 67239424 + 134479872 + Cancel + + LucidaGrande + 9 + 3614 + + + -2038284033 + 1 + + LucidaGrande + 9 + 16 + + + + + + 200 + 25 + + + + + 289 + {{419, 18}, {128, 18}} + + YES + + 67239424 + 131072 + Log http to desktop + + LucidaGrande + 11 + 3100 + + + 1211912703 + 2 + + NSSwitch + + + + 200 + 25 + + + + + 264 + {{90, 510}, {71, 17}} + + YES + + 67239424 + 272629760 + Signed In: + + + + + + + + + 266 + {{163, 510}, {373, 17}} + + YES + + 67239424 + 272629760 + No + + + + + + + + + 268 + {{15, 503}, {72, 28}} + + YES + + 67239424 + 134348800 + Sign Out + + + -2038284033 + 129 + + + 200 + 25 + + + + + 274 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 256 + {525, 102} + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 522 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + + + + 337772096 + 2048 + + + + 6 + System + controlBackgroundColor + + + + + 3 + YES + + + + 3 + 2 + + 3 + MQA + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + 306184192 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {525, 102}} + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 95}} + + + _doScroller: + 0.5 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + 1 + + _doScroller: + 0.99047620000000003 + + + {527, 104} + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 290 + + YES + + + 2304 + + YES + + + 2322 + {525, 14} + + + + + + results + + + YES + + YES + NSColor + NSFont + + + YES + + 1 + MC40NTEwODY5NCAwLjEwNDE0NTEyIDAuMDgyODYwMjE2AA + + + Geneva + 10 + 16 + + + + + + + YES + + + 6 + + + + 525 + 1 + + + 67119969 + 0 + + + 1 + MC45NjczOTEzMSAwLjk2NzM5MTMxIDAuOTY3MzkxMzEAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + 1 + MCAwIDEAA + + + + + + + 1 + + 6 + {1052, 10000000} + {463, 0} + + + + {{1, 1}, {525, 76}} + + + + + + {4, 5} + + 79691776 + + YES + + YES + + + + + file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff + + + + + + 3 + MCAwAA + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 56}} + + + _doScroller: + 1 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{0, 113}, {527, 78}} + + + 133650 + + + + AAAAAAAAAAAAAAAAAAAAAA + + + {{20, 270}, {527, 191}} + + + + + 289 + {{353, 46}, {64, 28}} + + YES + + 67239424 + 134348800 + Add + + LucidaGrande + 11 + 16 + + + -2038284033 + 129 + + + 200 + 25 + + + + + 268 + {{15, 530}, {83, 28}} + + YES + + -2080244224 + 134348800 + Client ID... + + + -2038284033 + 129 + + + 200 + 25 + + + + + 264 + {{102, 537}, {178, 14}} + + YES + + 67239424 + 272760832 + Client ID and Secret Required + + + + + + + + + 292 + {{20, 235}, {65, 17}} + + YES + + 67239424 + 272629760 + Analytics + + + + + + + + + 1313 + + {{469, 237}, {16, 16}} + + 28938 + 100 + + + + 289 + {{492, 236}, {54, 16}} + + YES + + 67239424 + 134479872 + Cancel + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 292 + {{17, 53}, {57, 17}} + + YES + + 67239424 + 272629760 + Shorten: + + + + + + + + + 290 + {{79, 51}, {271, 22}} + + YES + + -1804468671 + 272630784 + + + http:// + + YES + + 6 + System + textBackgroundColor + + + + 6 + System + textColor + + + + + + + 292 + {{88, 231}, {315, 20}} + + YES + + 67239424 + 131072 + + + + YES + + 80 + referrers + YES + 0 + + + 79 + countries + 1 + 0 + + + 79 + browsers + 0 + + + platforms + 0 + + + 1 + + + + + 290 + + YES + + + 2304 + + YES + + + 256 + {525, 102} + + YES + + + 256 + {{449, 0}, {16, 17}} + + + YES + + 522 + 8 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + + + 337772096 + 2048 + + + + + + 3 + YES + + + + 3 + 2 + + + 17 + 306184192 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {525, 102}} + + + + + 4 + + + + -2147483392 + {{-30, 1}, {15, 95}} + + + _doScroller: + 0.5 + + + + -2147483392 + {{-100, -100}, {448, 15}} + + 1 + + _doScroller: + 0.99047620000000003 + + + {{20, 123}, {527, 104}} + + + 133650 + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 292 + {{20, 101}, {133, 14}} + + YES + + 67239424 + 272760832 + Short URL Clicks: 12345 + + + + + + + + + 289 + {{417, 101}, {132, 14}} + + YES + + 67239424 + 272760832 + Long URL Clicks: 12345 + + + + + + + + {567, 574} + + + {{0, 0}, {1440, 878}} + {567, 596} + {10000000000000, 10000000000000} + YES + + + YES + + + 3 + 2 + {{235, 277}, {458, 282}} + 611844096 + Client ID Sheet + NSWindow + + + + + 256 + + YES + + + 266 + {{118, 141}, {320, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 141}, {63, 17}} + + YES + + 68288064 + 272630784 + Client ID: + + + + + + + + + 266 + {{118, 110}, {320, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 115}, {88, 17}} + + YES + + 68288064 + 272630784 + Client Secret: + + + + + + + + + 268 + {{338, 78}, {82, 20}} + + YES + + 67239424 + 134348800 + API Console + + + -2038284033 + 134 + + + 200 + 25 + + + + + 268 + {{17, 80}, {316, 17}} + + YES + + 68288064 + 272630784 + Client ID and Client Secret are obtained from the + + + + + + + + + 268 + {{17, 202}, {424, 34}} + + YES + + 67239424 + 138412032 + Each application should have a client ID and client secret hardcoded into the source. + + + + + + + + + 268 + {{348, 12}, {96, 32}} + + YES + + 67239424 + 134217728 + Done + + + -2038284033 + 129 + + DQ + 200 + 25 + + + + {458, 282} + + {{0, 0}, {1920, 1178}} + {10000000000000, 10000000000000} + YES + + + + + YES + + + loggingCheckboxClicked: + + + + 151 + + + + signInClicked: + + + + 364 + + + + window + + + + 383 + + + + clientIDClicked: + + + + 466 + + + + clientIDDoneClicked: + + + + 467 + + + + APIConsoleClicked: + + + + 468 + + + + getHistoryClicked: + + + + 494 + + + + cancelHistoryFetchClicked: + + + + 495 + + + + analyticsSegmentClicked: + + + + 528 + + + + cancelAnalyticsFetchClicked: + + + + 538 + + + + addShortenedURLClicked: + + + + 549 + + + + signedInField_ + + + + 570 + + + + signedInButton_ + + + + 571 + + + + historyTable_ + + + + 572 + + + + historyProgressIndicator_ + + + + 573 + + + + historyResultTextField_ + + + + 574 + + + + historyCancelButton_ + + + + 575 + + + + analyticsSegmentedControl_ + + + + 576 + + + + analyticsTable_ + + + + 577 + + + + analyticsProgressIndicator_ + + + + 578 + + + + analyticsCancelButton_ + + + + 579 + + + + shortURLClicksField_ + + + + 580 + + + + longURLClicksField_ + + + + 581 + + + + addShortenedURLField_ + + + + 582 + + + + addShortenedURLButton_ + + + + 583 + + + + clientIDButton_ + + + + 584 + + + + clientIDRequiredTextField_ + + + + 585 + + + + clientIDSheet_ + + + + 586 + + + + clientIDField_ + + + + 587 + + + + clientSecretField_ + + + + 588 + + + + delegate + + + + 15 + + + + dataSource + + + + 34 + + + + delegate + + + + 35 + + + + value: values.clientID + + + + + + value: values.clientID + value + values.clientID + + NSContinuouslyUpdatesValue + + + 2 + + + 470 + + + + value: values.clientSecret + + + + + + value: values.clientSecret + value + values.clientSecret + + NSContinuouslyUpdatesValue + + + 2 + + + 472 + + + + dataSource + + + + 514 + + + + delegate + + + + 515 + + + + delegate + + + + 550 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 5 + + + YES + + + + Window + + + 6 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + 17 + + + YES + + + + + + 40 + + + + + 86 + + + YES + + + + + + 150 + + + YES + + + + + + 44 + + + Shared Defaults + + + 251 + + + + + 253 + + + + + 254 + + + + + 38 + + + YES + + + + + + 252 + + + + + 358 + + + YES + + + + + + 359 + + + YES + + + + + + 360 + + + YES + + + + + + 361 + + + + + 362 + + + + + 363 + + + + + 384 + + + YES + + + + + + + 24 + + + YES + + + + + + + + 265 + + + + + 264 + + + + + 25 + + + YES + + + + + + 26 + + + YES + + + + + + 263 + + + + + 80 + + + YES + + + + + + + + 267 + + + + + 266 + + + + + 81 + + + + + 399 + + + YES + + + + + + 400 + + + + + 438 + + + YES + + + + + + 439 + + + YES + + + + + + + + + + + + + 440 + + + YES + + + + + + 441 + + + YES + + + + + + 442 + + + YES + + + + + + 443 + + + YES + + + + + + 444 + + + YES + + + + + + 445 + + + YES + + + + + + 446 + + + YES + + + + + + 447 + + + YES + + + + + + 448 + + + + + 449 + + + + + 450 + + + + + 451 + + + + + 452 + + + + + 453 + + + + + 454 + + + + + 455 + + + + + 460 + + + YES + + + + + + 461 + + + YES + + + + + + 462 + + + + + 463 + + + + + 497 + + + YES + + + + + + 498 + + + + + 499 + + + YES + + + + + + 511 + + + + + 512 + + + + + 516 + + + YES + + + + + + 517 + + + + + 518 + + + YES + + + + + + 519 + + + + + 526 + + + YES + + + + + + 527 + + + + + 502 + + + YES + + + + + + + + 505 + + + + + 504 + + + + + 503 + + + YES + + + + + + 506 + + + YES + + + + + + 507 + + + + + 539 + + + YES + + + + + + 540 + + + + + 545 + + + YES + + + + + + 546 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 150.IBPluginDependency + 17.IBPluginDependency + 24.IBPluginDependency + 25.IBPluginDependency + 251.IBPluginDependency + 252.IBPluginDependency + 253.IBPluginDependency + 254.IBPluginDependency + 26.IBPluginDependency + 263.IBPluginDependency + 263.IBShouldRemoveOnLegacySave + 264.IBPluginDependency + 264.IBShouldRemoveOnLegacySave + 265.IBPluginDependency + 265.IBShouldRemoveOnLegacySave + 266.IBPluginDependency + 266.IBShouldRemoveOnLegacySave + 267.IBPluginDependency + 267.IBShouldRemoveOnLegacySave + 358.IBPluginDependency + 359.IBPluginDependency + 360.IBPluginDependency + 361.IBPluginDependency + 362.IBPluginDependency + 363.IBPluginDependency + 38.IBPluginDependency + 384.IBPluginDependency + 399.IBPluginDependency + 40.IBPluginDependency + 400.IBPluginDependency + 438.IBPluginDependency + 438.IBWindowTemplateEditedContentRect + 438.NSWindowTemplate.visibleAtLaunch + 439.IBPluginDependency + 44.IBPluginDependency + 440.IBPluginDependency + 441.IBPluginDependency + 442.IBPluginDependency + 443.IBPluginDependency + 444.IBPluginDependency + 445.IBPluginDependency + 446.IBPluginDependency + 447.IBPluginDependency + 448.IBPluginDependency + 449.IBPluginDependency + 450.IBPluginDependency + 451.IBPluginDependency + 452.IBPluginDependency + 453.IBPluginDependency + 454.IBPluginDependency + 455.IBPluginDependency + 460.IBPluginDependency + 461.IBPluginDependency + 462.IBPluginDependency + 463.IBPluginDependency + 497.IBPluginDependency + 498.IBPluginDependency + 499.IBPluginDependency + 5.IBPluginDependency + 5.IBWindowTemplateEditedContentRect + 502.IBPluginDependency + 503.IBPluginDependency + 504.IBPluginDependency + 504.IBShouldRemoveOnLegacySave + 505.IBPluginDependency + 505.IBShouldRemoveOnLegacySave + 506.IBPluginDependency + 507.IBPluginDependency + 507.IBShouldRemoveOnLegacySave + 511.IBPluginDependency + 512.IBPluginDependency + 516.IBPluginDependency + 517.IBPluginDependency + 518.IBPluginDependency + 519.IBPluginDependency + 526.IBPluginDependency + 527.IBPluginDependency + 527.IBSegmentedControlInspectorSelectedSegmentMetadataKey + 539.IBPluginDependency + 540.IBPluginDependency + 545.IBPluginDependency + 546.IBPluginDependency + 6.IBPluginDependency + 6.IBUserGuides + 80.IBPluginDependency + 81.IBPluginDependency + 86.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{645, 782}, {458, 282}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{18, 581}, {567, 574}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + YES + + + 744 + 1 + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 588 + + + + YES + + URLShortenerSampleWindowController + NSWindowController + + YES + + YES + APIConsoleClicked: + addShortenedURLClicked: + analyticsSegmentClicked: + cancelAnalyticsFetchClicked: + cancelHistoryFetchClicked: + clientIDClicked: + clientIDDoneClicked: + getHistoryClicked: + loggingCheckboxClicked: + signInClicked: + + + YES + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + APIConsoleClicked: + addShortenedURLClicked: + analyticsSegmentClicked: + cancelAnalyticsFetchClicked: + cancelHistoryFetchClicked: + clientIDClicked: + clientIDDoneClicked: + getHistoryClicked: + loggingCheckboxClicked: + signInClicked: + + + YES + + APIConsoleClicked: + id + + + addShortenedURLClicked: + id + + + analyticsSegmentClicked: + id + + + cancelAnalyticsFetchClicked: + id + + + cancelHistoryFetchClicked: + id + + + clientIDClicked: + id + + + clientIDDoneClicked: + id + + + getHistoryClicked: + id + + + loggingCheckboxClicked: + id + + + signInClicked: + id + + + + + YES + + YES + addShortenedURLButton_ + addShortenedURLField_ + analyticsCancelButton_ + analyticsProgressIndicator_ + analyticsSegmentedControl_ + analyticsTable_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + historyCancelButton_ + historyProgressIndicator_ + historyResultTextField_ + historyTable_ + longURLClicksField_ + shortURLClicksField_ + signedInButton_ + signedInField_ + + + YES + NSButton + NSTextField + NSButton + NSProgressIndicator + NSSegmentedControl + NSTableView + NSButton + NSTextField + NSTextField + NSWindow + NSTextField + NSButton + NSProgressIndicator + NSTextView + NSTableView + NSTextField + NSTextField + NSButton + NSTextField + + + + YES + + YES + addShortenedURLButton_ + addShortenedURLField_ + analyticsCancelButton_ + analyticsProgressIndicator_ + analyticsSegmentedControl_ + analyticsTable_ + clientIDButton_ + clientIDField_ + clientIDRequiredTextField_ + clientIDSheet_ + clientSecretField_ + historyCancelButton_ + historyProgressIndicator_ + historyResultTextField_ + historyTable_ + longURLClicksField_ + shortURLClicksField_ + signedInButton_ + signedInField_ + + + YES + + addShortenedURLButton_ + NSButton + + + addShortenedURLField_ + NSTextField + + + analyticsCancelButton_ + NSButton + + + analyticsProgressIndicator_ + NSProgressIndicator + + + analyticsSegmentedControl_ + NSSegmentedControl + + + analyticsTable_ + NSTableView + + + clientIDButton_ + NSButton + + + clientIDField_ + NSTextField + + + clientIDRequiredTextField_ + NSTextField + + + clientIDSheet_ + NSWindow + + + clientSecretField_ + NSTextField + + + historyCancelButton_ + NSButton + + + historyProgressIndicator_ + NSProgressIndicator + + + historyResultTextField_ + NSTextView + + + historyTable_ + NSTableView + + + longURLClicksField_ + NSTextField + + + shortURLClicksField_ + NSTextField + + + signedInButton_ + NSButton + + + signedInField_ + NSTextField + + + + + IBProjectSource + ./Classes/URLShortenerSampleWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + diff --git a/GTL/Examples/URLShortenerSample/Info.plist b/GTL/Examples/URLShortenerSample/Info.plist new file mode 100644 index 0000000..6856da5 --- /dev/null +++ b/GTL/Examples/URLShortenerSample/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.example.URLShortenerSample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/GTL/Examples/URLShortenerSample/README.txt b/GTL/Examples/URLShortenerSample/README.txt new file mode 100644 index 0000000..ff257a0 --- /dev/null +++ b/GTL/Examples/URLShortenerSample/README.txt @@ -0,0 +1 @@ +This sample should automatically build and copy over the GTL.framework as part of the build-and-run process. diff --git a/GTL/Examples/URLShortenerSample/URLShortenerAppController.h b/GTL/Examples/URLShortenerSample/URLShortenerAppController.h new file mode 100644 index 0000000..2319f8d --- /dev/null +++ b/GTL/Examples/URLShortenerSample/URLShortenerAppController.h @@ -0,0 +1,23 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// URLShortenerSampleAppController.h +// + +#import + +@interface URLShortenerAppController : NSObject +@end diff --git a/GTL/Examples/URLShortenerSample/URLShortenerAppController.m b/GTL/Examples/URLShortenerSample/URLShortenerAppController.m new file mode 100644 index 0000000..b1ff5a4 --- /dev/null +++ b/GTL/Examples/URLShortenerSample/URLShortenerAppController.m @@ -0,0 +1,35 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// URLShortenerSampleAppController.m +// + +#import "URLShortenerAppController.h" +#import "URLShortenerSampleWindowController.h" + +@implementation URLShortenerAppController + +- (void)applicationWillFinishLaunching:(NSNotification *)notification { + URLShortenerSampleWindowController* windowController + = [URLShortenerSampleWindowController sharedWindowController]; + [windowController showWindow:self]; +} + +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { + return YES; +} + +@end diff --git a/GTL/Examples/URLShortenerSample/URLShortenerSample.xcodeproj/.svn/all-wcprops b/GTL/Examples/URLShortenerSample/URLShortenerSample.xcodeproj/.svn/all-wcprops new file mode 100644 index 0000000..94429f4 --- /dev/null +++ b/GTL/Examples/URLShortenerSample/URLShortenerSample.xcodeproj/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/154/trunk/Examples/URLShortenerSample/URLShortenerSample.xcodeproj +END +project.pbxproj +K 25 +svn:wc:ra_dav:version-url +V 96 +/svn/!svn/ver/154/trunk/Examples/URLShortenerSample/URLShortenerSample.xcodeproj/project.pbxproj +END diff --git a/GTL/Examples/URLShortenerSample/URLShortenerSample.xcodeproj/.svn/entries b/GTL/Examples/URLShortenerSample/URLShortenerSample.xcodeproj/.svn/entries new file mode 100644 index 0000000..fa7f9df --- /dev/null +++ b/GTL/Examples/URLShortenerSample/URLShortenerSample.xcodeproj/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Examples/URLShortenerSample/URLShortenerSample.xcodeproj +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +project.pbxproj +file + + + + +2012-12-09T08:42:34.000000Z +67dff64ca4d60db9dae8d5996ff7bf26 +2012-05-10T20:34:24.463283Z +154 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +25811 + diff --git a/GTL/Examples/URLShortenerSample/URLShortenerSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base b/GTL/Examples/URLShortenerSample/URLShortenerSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base new file mode 100644 index 0000000..2297672 --- /dev/null +++ b/GTL/Examples/URLShortenerSample/URLShortenerSample.xcodeproj/.svn/text-base/project.pbxproj.svn-base @@ -0,0 +1,544 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F22A2141186315400FFBAB6 /* WebKit.framework */; }; + 4F244586121F0B8700FEE1DA /* GTL.framework in Copy GTL.framework */ = {isa = PBXBuildFile; fileRef = 4F24457F121F0B8300FEE1DA /* GTL.framework */; }; + 4F244587121F0B8A00FEE1DA /* GTL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F24457F121F0B8300FEE1DA /* GTL.framework */; }; + 4F2E9EC713A811A700E9C96E /* GTLQueryUrlshortener.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F2E9EB713A811A700E9C96E /* GTLQueryUrlshortener.m */; }; + 4F2E9EC813A811A700E9C96E /* GTLServiceUrlshortener.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F2E9EB913A811A700E9C96E /* GTLServiceUrlshortener.m */; }; + 4F2E9EC913A811A700E9C96E /* GTLUrlshortenerAnalyticsSnapshot.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F2E9EBC13A811A700E9C96E /* GTLUrlshortenerAnalyticsSnapshot.m */; }; + 4F2E9ECA13A811A700E9C96E /* GTLUrlshortenerAnalyticsSummary.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F2E9EBE13A811A700E9C96E /* GTLUrlshortenerAnalyticsSummary.m */; }; + 4F2E9ECB13A811A700E9C96E /* GTLUrlshortenerConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F2E9EC013A811A700E9C96E /* GTLUrlshortenerConstants.m */; }; + 4F2E9ECC13A811A700E9C96E /* GTLUrlshortenerStringCount.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F2E9EC213A811A700E9C96E /* GTLUrlshortenerStringCount.m */; }; + 4F2E9ECD13A811A700E9C96E /* GTLUrlshortenerUrl.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F2E9EC413A811A700E9C96E /* GTLUrlshortenerUrl.m */; }; + 4F2E9ECE13A811A700E9C96E /* GTLUrlshortenerUrlHistory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F2E9EC613A811A700E9C96E /* GTLUrlshortenerUrlHistory.m */; }; + 4F6293CE11CC193500BE36DD /* URLShortenerAppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F6293CB11CC193500BE36DD /* URLShortenerAppController.m */; }; + 4F6293CF11CC193500BE36DD /* URLShortenerSampleWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F6293CD11CC193500BE36DD /* URLShortenerSampleWindowController.m */; }; + 4F6293F811CC21A000BE36DD /* URLShortenerSampleWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F6293F611CC21A000BE36DD /* URLShortenerSampleWindow.xib */; }; + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */; }; + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4F24457E121F0B8300FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F38F6A60B66E91D00B24B81; + remoteInfo = GTLFramework; + }; + 4F244580121F0B8300FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027C11A4CA2F00BEB470; + remoteInfo = GTLTouchStaticLib; + }; + 4F244582121F0B8300FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027D11A4CA2F00BEB470; + remoteInfo = GTLUnitTests; + }; + 4F244584121F0B8300FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F1AD9020B71603F00DC0485; + remoteInfo = DevelopmentTestTool; + }; + 4F72435E12233E7D001A4AD0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 4F38F6A50B66E91D00B24B81; + remoteInfo = GTLFramework; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 4F38F8970B66FAB700B24B81 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4F62921C11CAE5F700BE36DD /* Copy GTL.framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4F244586121F0B8700FEE1DA /* GTL.framework in Copy GTL.framework */, + ); + name = "Copy GTL.framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 4F22A2141186315400FFBAB6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; + 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GTL.xcodeproj; path = ../../Source/GTL.xcodeproj; sourceTree = SOURCE_ROOT; }; + 4F2E9EB613A811A700E9C96E /* GTLQueryUrlshortener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLQueryUrlshortener.h; sourceTree = ""; }; + 4F2E9EB713A811A700E9C96E /* GTLQueryUrlshortener.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLQueryUrlshortener.m; sourceTree = ""; }; + 4F2E9EB813A811A700E9C96E /* GTLServiceUrlshortener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLServiceUrlshortener.h; sourceTree = ""; }; + 4F2E9EB913A811A700E9C96E /* GTLServiceUrlshortener.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLServiceUrlshortener.m; sourceTree = ""; }; + 4F2E9EBA13A811A700E9C96E /* GTLUrlshortener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLUrlshortener.h; sourceTree = ""; }; + 4F2E9EBB13A811A700E9C96E /* GTLUrlshortenerAnalyticsSnapshot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLUrlshortenerAnalyticsSnapshot.h; sourceTree = ""; }; + 4F2E9EBC13A811A700E9C96E /* GTLUrlshortenerAnalyticsSnapshot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLUrlshortenerAnalyticsSnapshot.m; sourceTree = ""; }; + 4F2E9EBD13A811A700E9C96E /* GTLUrlshortenerAnalyticsSummary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLUrlshortenerAnalyticsSummary.h; sourceTree = ""; }; + 4F2E9EBE13A811A700E9C96E /* GTLUrlshortenerAnalyticsSummary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLUrlshortenerAnalyticsSummary.m; sourceTree = ""; }; + 4F2E9EBF13A811A700E9C96E /* GTLUrlshortenerConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLUrlshortenerConstants.h; sourceTree = ""; }; + 4F2E9EC013A811A700E9C96E /* GTLUrlshortenerConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLUrlshortenerConstants.m; sourceTree = ""; }; + 4F2E9EC113A811A700E9C96E /* GTLUrlshortenerStringCount.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLUrlshortenerStringCount.h; sourceTree = ""; }; + 4F2E9EC213A811A700E9C96E /* GTLUrlshortenerStringCount.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLUrlshortenerStringCount.m; sourceTree = ""; }; + 4F2E9EC313A811A700E9C96E /* GTLUrlshortenerUrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLUrlshortenerUrl.h; sourceTree = ""; }; + 4F2E9EC413A811A700E9C96E /* GTLUrlshortenerUrl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLUrlshortenerUrl.m; sourceTree = ""; }; + 4F2E9EC513A811A700E9C96E /* GTLUrlshortenerUrlHistory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLUrlshortenerUrlHistory.h; sourceTree = ""; }; + 4F2E9EC613A811A700E9C96E /* GTLUrlshortenerUrlHistory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLUrlshortenerUrlHistory.m; sourceTree = ""; }; + 4F6293CA11CC193500BE36DD /* URLShortenerAppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = URLShortenerAppController.h; sourceTree = ""; }; + 4F6293CB11CC193500BE36DD /* URLShortenerAppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = URLShortenerAppController.m; sourceTree = ""; }; + 4F6293CC11CC193500BE36DD /* URLShortenerSampleWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = URLShortenerSampleWindowController.h; sourceTree = ""; }; + 4F6293CD11CC193500BE36DD /* URLShortenerSampleWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = URLShortenerSampleWindowController.m; sourceTree = ""; }; + 4F6293F711CC21A000BE36DD /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/URLShortenerSampleWindow.xib; sourceTree = ""; }; + 4FA6F3D21034AEC400C5DFA5 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; + 4FD0F1D90CBC68F300059DC1 /* buildCopyScript */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = buildCopyScript; sourceTree = ""; }; + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = buildStripHeaders; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 8D1107320486CEB800E47090 /* URLShortenerSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = URLShortenerSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F244587121F0B8A00FEE1DA /* GTL.framework in Frameworks */, + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 4F6293CA11CC193500BE36DD /* URLShortenerAppController.h */, + 4F6293CB11CC193500BE36DD /* URLShortenerAppController.m */, + 4F6293CC11CC193500BE36DD /* URLShortenerSampleWindowController.h */, + 4F6293CD11CC193500BE36DD /* URLShortenerSampleWindowController.m */, + ); + name = Classes; + sourceTree = ""; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 4F22A2141186315400FFBAB6 /* WebKit.framework */, + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* URLShortenerSample.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CalendarSample */ = { + isa = PBXGroup; + children = ( + 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */, + 080E96DDFE201D6D7F000001 /* Classes */, + 4FB25567138C463800B5C1AE /* API Services */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CalendarSample; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 4F6293F611CC21A000BE36DD /* URLShortenerSampleWindow.xib */, + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */, + 8D1107310486CEB800E47090 /* Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4F244578121F0B8300FEE1DA /* Products */ = { + isa = PBXGroup; + children = ( + 4F24457F121F0B8300FEE1DA /* GTL.framework */, + 4F244581121F0B8300FEE1DA /* libGTLTouchStaticLib.a */, + 4F244583121F0B8300FEE1DA /* GTLUnitTests.octest */, + 4F244585121F0B8300FEE1DA /* DevelopmentTestTool */, + ); + name = Products; + sourceTree = ""; + }; + 4F2E9EB513A811A700E9C96E /* Generated */ = { + isa = PBXGroup; + children = ( + 4F2E9EB613A811A700E9C96E /* GTLQueryUrlshortener.h */, + 4F2E9EB713A811A700E9C96E /* GTLQueryUrlshortener.m */, + 4F2E9EB813A811A700E9C96E /* GTLServiceUrlshortener.h */, + 4F2E9EB913A811A700E9C96E /* GTLServiceUrlshortener.m */, + 4F2E9EBA13A811A700E9C96E /* GTLUrlshortener.h */, + 4F2E9EBB13A811A700E9C96E /* GTLUrlshortenerAnalyticsSnapshot.h */, + 4F2E9EBC13A811A700E9C96E /* GTLUrlshortenerAnalyticsSnapshot.m */, + 4F2E9EBD13A811A700E9C96E /* GTLUrlshortenerAnalyticsSummary.h */, + 4F2E9EBE13A811A700E9C96E /* GTLUrlshortenerAnalyticsSummary.m */, + 4F2E9EBF13A811A700E9C96E /* GTLUrlshortenerConstants.h */, + 4F2E9EC013A811A700E9C96E /* GTLUrlshortenerConstants.m */, + 4F2E9EC113A811A700E9C96E /* GTLUrlshortenerStringCount.h */, + 4F2E9EC213A811A700E9C96E /* GTLUrlshortenerStringCount.m */, + 4F2E9EC313A811A700E9C96E /* GTLUrlshortenerUrl.h */, + 4F2E9EC413A811A700E9C96E /* GTLUrlshortenerUrl.m */, + 4F2E9EC513A811A700E9C96E /* GTLUrlshortenerUrlHistory.h */, + 4F2E9EC613A811A700E9C96E /* GTLUrlshortenerUrlHistory.m */, + ); + path = Generated; + sourceTree = ""; + }; + 4FB25567138C463800B5C1AE /* API Services */ = { + isa = PBXGroup; + children = ( + 4FB2556F138C466400B5C1AE /* UrlShortener */, + ); + name = "API Services"; + sourceTree = ""; + }; + 4FB2556F138C466400B5C1AE /* UrlShortener */ = { + isa = PBXGroup; + children = ( + 4F2E9EB513A811A700E9C96E /* Generated */, + ); + name = UrlShortener; + path = ../../Source/Services/UrlShortener; + sourceTree = SOURCE_ROOT; + }; + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */ = { + isa = PBXGroup; + children = ( + 4FD0F1D90CBC68F300059DC1 /* buildCopyScript */, + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */, + ); + name = "Build Scripts"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* URLShortenerSample */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "URLShortenerSample" */; + buildPhases = ( + 4F62921C11CAE5F700BE36DD /* Copy GTL.framework */, + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + 4F38F8970B66FAB700B24B81 /* CopyFiles */, + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */, + ); + buildRules = ( + ); + dependencies = ( + 4F72435F12233E7D001A4AD0 /* PBXTargetDependency */, + ); + name = URLShortenerSample; + productInstallPath = "$(HOME)/Applications"; + productName = CalendarSample; + productReference = 8D1107320486CEB800E47090 /* URLShortenerSample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "URLShortenerSample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CalendarSample */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 4F244578121F0B8300FEE1DA /* Products */; + ProjectRef = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* URLShortenerSample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 4F24457F121F0B8300FEE1DA /* GTL.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = GTL.framework; + remoteRef = 4F24457E121F0B8300FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F244581121F0B8300FEE1DA /* libGTLTouchStaticLib.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libGTLTouchStaticLib.a; + remoteRef = 4F244580121F0B8300FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F244583121F0B8300FEE1DA /* GTLUnitTests.octest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = GTLUnitTests.octest; + remoteRef = 4F244582121F0B8300FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F244585121F0B8300FEE1DA /* DevelopmentTestTool */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = DevelopmentTestTool; + remoteRef = 4F244584121F0B8300FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */, + 4F6293F811CC21A000BE36DD /* URLShortenerSampleWindow.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Strip Headers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ./buildStripHeaders; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072D0486CEB800E47090 /* main.m in Sources */, + 4F6293CE11CC193500BE36DD /* URLShortenerAppController.m in Sources */, + 4F6293CF11CC193500BE36DD /* URLShortenerSampleWindowController.m in Sources */, + 4F2E9EC713A811A700E9C96E /* GTLQueryUrlshortener.m in Sources */, + 4F2E9EC813A811A700E9C96E /* GTLServiceUrlshortener.m in Sources */, + 4F2E9EC913A811A700E9C96E /* GTLUrlshortenerAnalyticsSnapshot.m in Sources */, + 4F2E9ECA13A811A700E9C96E /* GTLUrlshortenerAnalyticsSummary.m in Sources */, + 4F2E9ECB13A811A700E9C96E /* GTLUrlshortenerConstants.m in Sources */, + 4F2E9ECC13A811A700E9C96E /* GTLUrlshortenerStringCount.m in Sources */, + 4F2E9ECD13A811A700E9C96E /* GTLUrlshortenerUrl.m in Sources */, + 4F2E9ECE13A811A700E9C96E /* GTLUrlshortenerUrlHistory.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 4F72435F12233E7D001A4AD0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = GTLFramework; + targetProxy = 4F72435E12233E7D001A4AD0 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C165DFE840E0CC02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 4F6293F611CC21A000BE36DD /* URLShortenerSampleWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 4F6293F711CC21A000BE36DD /* English */, + ); + name = URLShortenerSampleWindow.xib; + sourceTree = ""; + }; + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 4FA6F3D21034AEC400C5DFA5 /* English */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = URLShortenerSample; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = URLShortenerSample; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = ( + "-DGTL_BUILT_AS_FRAMEWORK=1", + "-DDEBUG=1", + ); + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DGTL_BUILT_AS_FRAMEWORK=1"; + PREBINDING = NO; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "URLShortenerSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "URLShortenerSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/GTL/Examples/URLShortenerSample/URLShortenerSample.xcodeproj/project.pbxproj b/GTL/Examples/URLShortenerSample/URLShortenerSample.xcodeproj/project.pbxproj new file mode 100644 index 0000000..2297672 --- /dev/null +++ b/GTL/Examples/URLShortenerSample/URLShortenerSample.xcodeproj/project.pbxproj @@ -0,0 +1,544 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F22A2141186315400FFBAB6 /* WebKit.framework */; }; + 4F244586121F0B8700FEE1DA /* GTL.framework in Copy GTL.framework */ = {isa = PBXBuildFile; fileRef = 4F24457F121F0B8300FEE1DA /* GTL.framework */; }; + 4F244587121F0B8A00FEE1DA /* GTL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F24457F121F0B8300FEE1DA /* GTL.framework */; }; + 4F2E9EC713A811A700E9C96E /* GTLQueryUrlshortener.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F2E9EB713A811A700E9C96E /* GTLQueryUrlshortener.m */; }; + 4F2E9EC813A811A700E9C96E /* GTLServiceUrlshortener.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F2E9EB913A811A700E9C96E /* GTLServiceUrlshortener.m */; }; + 4F2E9EC913A811A700E9C96E /* GTLUrlshortenerAnalyticsSnapshot.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F2E9EBC13A811A700E9C96E /* GTLUrlshortenerAnalyticsSnapshot.m */; }; + 4F2E9ECA13A811A700E9C96E /* GTLUrlshortenerAnalyticsSummary.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F2E9EBE13A811A700E9C96E /* GTLUrlshortenerAnalyticsSummary.m */; }; + 4F2E9ECB13A811A700E9C96E /* GTLUrlshortenerConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F2E9EC013A811A700E9C96E /* GTLUrlshortenerConstants.m */; }; + 4F2E9ECC13A811A700E9C96E /* GTLUrlshortenerStringCount.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F2E9EC213A811A700E9C96E /* GTLUrlshortenerStringCount.m */; }; + 4F2E9ECD13A811A700E9C96E /* GTLUrlshortenerUrl.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F2E9EC413A811A700E9C96E /* GTLUrlshortenerUrl.m */; }; + 4F2E9ECE13A811A700E9C96E /* GTLUrlshortenerUrlHistory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F2E9EC613A811A700E9C96E /* GTLUrlshortenerUrlHistory.m */; }; + 4F6293CE11CC193500BE36DD /* URLShortenerAppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F6293CB11CC193500BE36DD /* URLShortenerAppController.m */; }; + 4F6293CF11CC193500BE36DD /* URLShortenerSampleWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F6293CD11CC193500BE36DD /* URLShortenerSampleWindowController.m */; }; + 4F6293F811CC21A000BE36DD /* URLShortenerSampleWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F6293F611CC21A000BE36DD /* URLShortenerSampleWindow.xib */; }; + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */; }; + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4F24457E121F0B8300FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F38F6A60B66E91D00B24B81; + remoteInfo = GTLFramework; + }; + 4F244580121F0B8300FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027C11A4CA2F00BEB470; + remoteInfo = GTLTouchStaticLib; + }; + 4F244582121F0B8300FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F12027D11A4CA2F00BEB470; + remoteInfo = GTLUnitTests; + }; + 4F244584121F0B8300FEE1DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4F1AD9020B71603F00DC0485; + remoteInfo = DevelopmentTestTool; + }; + 4F72435E12233E7D001A4AD0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 4F38F6A50B66E91D00B24B81; + remoteInfo = GTLFramework; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 4F38F8970B66FAB700B24B81 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4F62921C11CAE5F700BE36DD /* Copy GTL.framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4F244586121F0B8700FEE1DA /* GTL.framework in Copy GTL.framework */, + ); + name = "Copy GTL.framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 4F22A2141186315400FFBAB6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; + 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GTL.xcodeproj; path = ../../Source/GTL.xcodeproj; sourceTree = SOURCE_ROOT; }; + 4F2E9EB613A811A700E9C96E /* GTLQueryUrlshortener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLQueryUrlshortener.h; sourceTree = ""; }; + 4F2E9EB713A811A700E9C96E /* GTLQueryUrlshortener.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLQueryUrlshortener.m; sourceTree = ""; }; + 4F2E9EB813A811A700E9C96E /* GTLServiceUrlshortener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLServiceUrlshortener.h; sourceTree = ""; }; + 4F2E9EB913A811A700E9C96E /* GTLServiceUrlshortener.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLServiceUrlshortener.m; sourceTree = ""; }; + 4F2E9EBA13A811A700E9C96E /* GTLUrlshortener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLUrlshortener.h; sourceTree = ""; }; + 4F2E9EBB13A811A700E9C96E /* GTLUrlshortenerAnalyticsSnapshot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLUrlshortenerAnalyticsSnapshot.h; sourceTree = ""; }; + 4F2E9EBC13A811A700E9C96E /* GTLUrlshortenerAnalyticsSnapshot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLUrlshortenerAnalyticsSnapshot.m; sourceTree = ""; }; + 4F2E9EBD13A811A700E9C96E /* GTLUrlshortenerAnalyticsSummary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLUrlshortenerAnalyticsSummary.h; sourceTree = ""; }; + 4F2E9EBE13A811A700E9C96E /* GTLUrlshortenerAnalyticsSummary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLUrlshortenerAnalyticsSummary.m; sourceTree = ""; }; + 4F2E9EBF13A811A700E9C96E /* GTLUrlshortenerConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLUrlshortenerConstants.h; sourceTree = ""; }; + 4F2E9EC013A811A700E9C96E /* GTLUrlshortenerConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLUrlshortenerConstants.m; sourceTree = ""; }; + 4F2E9EC113A811A700E9C96E /* GTLUrlshortenerStringCount.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLUrlshortenerStringCount.h; sourceTree = ""; }; + 4F2E9EC213A811A700E9C96E /* GTLUrlshortenerStringCount.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLUrlshortenerStringCount.m; sourceTree = ""; }; + 4F2E9EC313A811A700E9C96E /* GTLUrlshortenerUrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLUrlshortenerUrl.h; sourceTree = ""; }; + 4F2E9EC413A811A700E9C96E /* GTLUrlshortenerUrl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLUrlshortenerUrl.m; sourceTree = ""; }; + 4F2E9EC513A811A700E9C96E /* GTLUrlshortenerUrlHistory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLUrlshortenerUrlHistory.h; sourceTree = ""; }; + 4F2E9EC613A811A700E9C96E /* GTLUrlshortenerUrlHistory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLUrlshortenerUrlHistory.m; sourceTree = ""; }; + 4F6293CA11CC193500BE36DD /* URLShortenerAppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = URLShortenerAppController.h; sourceTree = ""; }; + 4F6293CB11CC193500BE36DD /* URLShortenerAppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = URLShortenerAppController.m; sourceTree = ""; }; + 4F6293CC11CC193500BE36DD /* URLShortenerSampleWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = URLShortenerSampleWindowController.h; sourceTree = ""; }; + 4F6293CD11CC193500BE36DD /* URLShortenerSampleWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = URLShortenerSampleWindowController.m; sourceTree = ""; }; + 4F6293F711CC21A000BE36DD /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/URLShortenerSampleWindow.xib; sourceTree = ""; }; + 4FA6F3D21034AEC400C5DFA5 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; + 4FD0F1D90CBC68F300059DC1 /* buildCopyScript */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = buildCopyScript; sourceTree = ""; }; + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = buildStripHeaders; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 8D1107320486CEB800E47090 /* URLShortenerSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = URLShortenerSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F244587121F0B8A00FEE1DA /* GTL.framework in Frameworks */, + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + 4F22A2151186315400FFBAB6 /* WebKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 4F6293CA11CC193500BE36DD /* URLShortenerAppController.h */, + 4F6293CB11CC193500BE36DD /* URLShortenerAppController.m */, + 4F6293CC11CC193500BE36DD /* URLShortenerSampleWindowController.h */, + 4F6293CD11CC193500BE36DD /* URLShortenerSampleWindowController.m */, + ); + name = Classes; + sourceTree = ""; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 4F22A2141186315400FFBAB6 /* WebKit.framework */, + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* URLShortenerSample.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CalendarSample */ = { + isa = PBXGroup; + children = ( + 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */, + 080E96DDFE201D6D7F000001 /* Classes */, + 4FB25567138C463800B5C1AE /* API Services */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CalendarSample; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 4F6293F611CC21A000BE36DD /* URLShortenerSampleWindow.xib */, + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */, + 8D1107310486CEB800E47090 /* Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4F244578121F0B8300FEE1DA /* Products */ = { + isa = PBXGroup; + children = ( + 4F24457F121F0B8300FEE1DA /* GTL.framework */, + 4F244581121F0B8300FEE1DA /* libGTLTouchStaticLib.a */, + 4F244583121F0B8300FEE1DA /* GTLUnitTests.octest */, + 4F244585121F0B8300FEE1DA /* DevelopmentTestTool */, + ); + name = Products; + sourceTree = ""; + }; + 4F2E9EB513A811A700E9C96E /* Generated */ = { + isa = PBXGroup; + children = ( + 4F2E9EB613A811A700E9C96E /* GTLQueryUrlshortener.h */, + 4F2E9EB713A811A700E9C96E /* GTLQueryUrlshortener.m */, + 4F2E9EB813A811A700E9C96E /* GTLServiceUrlshortener.h */, + 4F2E9EB913A811A700E9C96E /* GTLServiceUrlshortener.m */, + 4F2E9EBA13A811A700E9C96E /* GTLUrlshortener.h */, + 4F2E9EBB13A811A700E9C96E /* GTLUrlshortenerAnalyticsSnapshot.h */, + 4F2E9EBC13A811A700E9C96E /* GTLUrlshortenerAnalyticsSnapshot.m */, + 4F2E9EBD13A811A700E9C96E /* GTLUrlshortenerAnalyticsSummary.h */, + 4F2E9EBE13A811A700E9C96E /* GTLUrlshortenerAnalyticsSummary.m */, + 4F2E9EBF13A811A700E9C96E /* GTLUrlshortenerConstants.h */, + 4F2E9EC013A811A700E9C96E /* GTLUrlshortenerConstants.m */, + 4F2E9EC113A811A700E9C96E /* GTLUrlshortenerStringCount.h */, + 4F2E9EC213A811A700E9C96E /* GTLUrlshortenerStringCount.m */, + 4F2E9EC313A811A700E9C96E /* GTLUrlshortenerUrl.h */, + 4F2E9EC413A811A700E9C96E /* GTLUrlshortenerUrl.m */, + 4F2E9EC513A811A700E9C96E /* GTLUrlshortenerUrlHistory.h */, + 4F2E9EC613A811A700E9C96E /* GTLUrlshortenerUrlHistory.m */, + ); + path = Generated; + sourceTree = ""; + }; + 4FB25567138C463800B5C1AE /* API Services */ = { + isa = PBXGroup; + children = ( + 4FB2556F138C466400B5C1AE /* UrlShortener */, + ); + name = "API Services"; + sourceTree = ""; + }; + 4FB2556F138C466400B5C1AE /* UrlShortener */ = { + isa = PBXGroup; + children = ( + 4F2E9EB513A811A700E9C96E /* Generated */, + ); + name = UrlShortener; + path = ../../Source/Services/UrlShortener; + sourceTree = SOURCE_ROOT; + }; + 4FD0F1D80CBC68E100059DC1 /* Build Scripts */ = { + isa = PBXGroup; + children = ( + 4FD0F1D90CBC68F300059DC1 /* buildCopyScript */, + 4FD0F1DA0CBC68F300059DC1 /* buildStripHeaders */, + ); + name = "Build Scripts"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* URLShortenerSample */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "URLShortenerSample" */; + buildPhases = ( + 4F62921C11CAE5F700BE36DD /* Copy GTL.framework */, + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + 4F38F8970B66FAB700B24B81 /* CopyFiles */, + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */, + ); + buildRules = ( + ); + dependencies = ( + 4F72435F12233E7D001A4AD0 /* PBXTargetDependency */, + ); + name = URLShortenerSample; + productInstallPath = "$(HOME)/Applications"; + productName = CalendarSample; + productReference = 8D1107320486CEB800E47090 /* URLShortenerSample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "URLShortenerSample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CalendarSample */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 4F244578121F0B8300FEE1DA /* Products */; + ProjectRef = 4F244577121F0B8300FEE1DA /* GTL.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* URLShortenerSample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 4F24457F121F0B8300FEE1DA /* GTL.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = GTL.framework; + remoteRef = 4F24457E121F0B8300FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F244581121F0B8300FEE1DA /* libGTLTouchStaticLib.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libGTLTouchStaticLib.a; + remoteRef = 4F244580121F0B8300FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F244583121F0B8300FEE1DA /* GTLUnitTests.octest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = GTLUnitTests.octest; + remoteRef = 4F244582121F0B8300FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4F244585121F0B8300FEE1DA /* DevelopmentTestTool */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = DevelopmentTestTool; + remoteRef = 4F244584121F0B8300FEE1DA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + 4FA6F3D41034AEC400C5DFA5 /* MainMenu.xib in Resources */, + 4F6293F811CC21A000BE36DD /* URLShortenerSampleWindow.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4FD0F1DB0CBC690400059DC1 /* Strip Headers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Strip Headers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ./buildStripHeaders; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072D0486CEB800E47090 /* main.m in Sources */, + 4F6293CE11CC193500BE36DD /* URLShortenerAppController.m in Sources */, + 4F6293CF11CC193500BE36DD /* URLShortenerSampleWindowController.m in Sources */, + 4F2E9EC713A811A700E9C96E /* GTLQueryUrlshortener.m in Sources */, + 4F2E9EC813A811A700E9C96E /* GTLServiceUrlshortener.m in Sources */, + 4F2E9EC913A811A700E9C96E /* GTLUrlshortenerAnalyticsSnapshot.m in Sources */, + 4F2E9ECA13A811A700E9C96E /* GTLUrlshortenerAnalyticsSummary.m in Sources */, + 4F2E9ECB13A811A700E9C96E /* GTLUrlshortenerConstants.m in Sources */, + 4F2E9ECC13A811A700E9C96E /* GTLUrlshortenerStringCount.m in Sources */, + 4F2E9ECD13A811A700E9C96E /* GTLUrlshortenerUrl.m in Sources */, + 4F2E9ECE13A811A700E9C96E /* GTLUrlshortenerUrlHistory.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 4F72435F12233E7D001A4AD0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = GTLFramework; + targetProxy = 4F72435E12233E7D001A4AD0 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C165DFE840E0CC02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 4F6293F611CC21A000BE36DD /* URLShortenerSampleWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 4F6293F711CC21A000BE36DD /* English */, + ); + name = URLShortenerSampleWindow.xib; + sourceTree = ""; + }; + 4FA6F3D11034AEC400C5DFA5 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 4FA6F3D21034AEC400C5DFA5 /* English */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = URLShortenerSample; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../Source/build/$(CONFIGURATION)/"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = URLShortenerSample; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = ( + "-DGTL_BUILT_AS_FRAMEWORK=1", + "-DDEBUG=1", + ); + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DGTL_BUILT_AS_FRAMEWORK=1"; + PREBINDING = NO; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "URLShortenerSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "URLShortenerSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/GTL/Examples/URLShortenerSample/URLShortenerSampleWindowController.h b/GTL/Examples/URLShortenerSample/URLShortenerSampleWindowController.h new file mode 100644 index 0000000..2c4f47b --- /dev/null +++ b/GTL/Examples/URLShortenerSample/URLShortenerSampleWindowController.h @@ -0,0 +1,78 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// URLShortenerSampleWindowController.h +// + +#import + +#import "GTLUrlshortener.h" + +@interface URLShortenerSampleWindowController : NSWindowController { + @private + // IBOutlets - main window + IBOutlet NSTextField *signedInField_; + IBOutlet NSButton *signedInButton_; + + IBOutlet NSTableView *historyTable_; + IBOutlet NSProgressIndicator *historyProgressIndicator_; + IBOutlet NSTextView *historyResultTextField_; + IBOutlet NSButton *historyCancelButton_; + + IBOutlet NSSegmentedControl *analyticsSegmentedControl_; + IBOutlet NSTableView *analyticsTable_; + IBOutlet NSProgressIndicator *analyticsProgressIndicator_; + IBOutlet NSButton *analyticsCancelButton_; + IBOutlet NSTextField *shortURLClicksField_; + IBOutlet NSTextField *longURLClicksField_; + + IBOutlet NSTextField *addShortenedURLField_; + IBOutlet NSButton *addShortenedURLButton_; + + // IBOutlets - client ID sheet + IBOutlet NSButton *clientIDButton_; + IBOutlet NSTextField *clientIDRequiredTextField_; + IBOutlet NSWindow *clientIDSheet_; + IBOutlet NSTextField *clientIDField_; + IBOutlet NSTextField *clientSecretField_; + + // property storage + GTLUrlshortenerUrlHistory *historyFeed_; + GTLServiceTicket *historyTicket_; + NSError *historyFetchError_; + + GTLUrlshortenerUrl *analyticsItem_; + GTLServiceTicket *analyticsTicket_; + NSError *analyticsFetchError_; +} + ++ (URLShortenerSampleWindowController *)sharedWindowController; + +// Sign-in +- (IBAction)signInClicked:(id)sender; +- (IBAction)clientIDClicked:(id)sender; +- (IBAction)clientIDDoneClicked:(id)sender; +- (IBAction)APIConsoleClicked:(id)sender; + +// Main UI +- (IBAction)getHistoryClicked:(id)sender; +- (IBAction)analyticsSegmentClicked:(id)sender; +- (IBAction)cancelHistoryFetchClicked:(id)sender; +- (IBAction)cancelAnalyticsFetchClicked:(id)sender; +- (IBAction)addShortenedURLClicked:(id)sender; + +- (IBAction)loggingCheckboxClicked:(id)sender; +@end diff --git a/GTL/Examples/URLShortenerSample/URLShortenerSampleWindowController.m b/GTL/Examples/URLShortenerSample/URLShortenerSampleWindowController.m new file mode 100644 index 0000000..2a3fc9e --- /dev/null +++ b/GTL/Examples/URLShortenerSample/URLShortenerSampleWindowController.m @@ -0,0 +1,490 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// URLShortenerSampleWindowController.m +// + +#import "URLShortenerSampleWindowController.h" + +#import "GTL/GTMOAuth2WindowController.h" +#import "GTL/GTMHTTPFetcherLogging.h" + +@interface URLShortenerSampleWindowController () + +// History table properties +@property (retain, nonatomic) GTLUrlshortenerUrlHistory *historyFeed; +@property (retain, nonatomic) GTLServiceTicket *historyTicket; +@property (retain, nonatomic) NSError *historyFetchError; + +// Analytics table properties +@property (retain, nonatomic) GTLUrlshortenerUrl *analyticsItem; +@property (retain, nonatomic) GTLServiceTicket *analyticsTicket; +@property (retain, nonatomic) NSError *analyticsFetchError; + +// Other properties +@property (retain, nonatomic, readonly) GTLServiceUrlshortener *URLShortenerService; + +- (NSString *)signedInUsername; +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel; +- (void)updateUI; +- (void)displayAlert:(NSString *)title format:(NSString *)format, ...; +- (GTLUrlshortenerUrl *)selectedHistoryItem; +- (NSArray *)selectedAnalyticsCounts; +- (void)fetchHistory; +- (void)addAShortenedURL; +@end + +// Keychain item name used to store the user's auth credential +NSString *const kKeychainItemName = @"URL Shortener Sample: Google URL Shortener"; + + +@implementation URLShortenerSampleWindowController + +@synthesize historyFeed = historyFeed_, + historyTicket = historyTicket_, + historyFetchError = historyFetchError_, + analyticsItem = analyticsItem_, + analyticsTicket = analyticsTicket_, + analyticsFetchError = analyticsFetchError_; + ++ (URLShortenerSampleWindowController *)sharedWindowController { + + static URLShortenerSampleWindowController* gWindowController = nil; + + if (!gWindowController) { + gWindowController = [[URLShortenerSampleWindowController alloc] init]; + } + return gWindowController; +} + + +- (id)init { + return [self initWithWindowNibName:@"URLShortenerSampleWindow"]; +} + +- (void)awakeFromNib { + // Set the result text fields to have a distinctive color and mono-spaced font + [historyResultTextField_ setTextColor:[NSColor darkGrayColor]]; + + NSFont *resultTextFont = [NSFont fontWithName:@"Monaco" size:9]; + [historyResultTextField_ setFont:resultTextFont]; + + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + GTMOAuth2Authentication *auth; + auth = [GTMOAuth2WindowController authForGoogleFromKeychainForName:kKeychainItemName + clientID:clientID + clientSecret:clientSecret]; + self.URLShortenerService.authorizer = auth; + + [self updateUI]; +} + +- (void)dealloc { + [historyFeed_ release]; + [historyTicket_ release]; + [historyFetchError_ release]; + + [analyticsItem_ release]; + [analyticsTicket_ release]; + [analyticsFetchError_ release]; + + [super dealloc]; +} + +#pragma mark - + +- (NSString *)signedInUsername { + GTMOAuth2Authentication *auth = self.URLShortenerService.authorizer; + if (auth.canAuthorize) { + return auth.userEmail; + } else { + return nil; + } +} + +- (BOOL)isSignedIn { + NSString *name = [self signedInUsername]; + return (name != nil); +} + +#pragma mark IBActions + +- (IBAction)signInClicked:(id)sender { + if (![self isSignedIn]) { + // Sign in + [self runSigninThenInvokeSelector:@selector(updateUI)]; + } else { + // Sign out + [GTMOAuth2WindowController removeAuthFromKeychainForName:kKeychainItemName]; + self.URLShortenerService.authorizer = nil; + [self updateUI]; + } +} + +- (IBAction)getHistoryClicked:(id)sender { + if (![self isSignedIn]) { + [self runSigninThenInvokeSelector:@selector(fetchHistory)]; + } else { + [self fetchHistory]; + } +} + +- (IBAction)addShortenedURLClicked:(id)sender { + [self addAShortenedURL]; +} + +- (IBAction)cancelHistoryFetchClicked:(id)sender { + [self.historyTicket cancelTicket]; + self.historyTicket = nil; + + [self updateUI]; +} + +- (IBAction)cancelAnalyticsFetchClicked:(id)sender { + [self.analyticsTicket cancelTicket]; + self.analyticsTicket = nil; + + [self updateUI]; +} + +- (IBAction)analyticsSegmentClicked:(id)sender { + [self updateUI]; +} + +- (IBAction)APIConsoleClicked:(id)sender { + NSURL *url = [NSURL URLWithString:@"https://code.google.com/apis/console"]; + [[NSWorkspace sharedWorkspace] openURL:url]; +} + +- (IBAction)loggingCheckboxClicked:(id)sender { + [GTMHTTPFetcher setLoggingEnabled:[sender state]]; +} + +#pragma mark - + +// Get a service object with the current authorization +// +// A "service" object handles networking tasks. Service objects +// contain user authentication information as well as networking +// state information (such as cookies and cached fetch results.) + +- (GTLServiceUrlshortener *)URLShortenerService { + + static GTLServiceUrlshortener* service = nil; + if (!service) { + service = [[GTLServiceUrlshortener alloc] init]; + + // Have the service object set tickets to fetch consecutive pages + // of the feed so we do not need to manually fetch them + service.shouldFetchNextPages = YES; + + // Have the service object set tickets to retry temporary error conditions + // automatically + service.retryEnabled = YES; + } + return service; +} + +- (GTLUrlshortenerUrl *)selectedHistoryItem { + int rowIndex = [historyTable_ selectedRow]; + if (rowIndex > -1) { + GTLUrlshortenerUrl *item = [self.historyFeed itemAtIndex:rowIndex]; + return item; + } + return nil; +} + +- (NSArray *)selectedAnalyticsCounts { + // segment names are the array fields of the analytics snapshot + NSSegmentedControl *segments = analyticsSegmentedControl_; + NSInteger segmentIndex = segments.selectedSegment; + NSString *fieldName = [segments labelForSegment:segmentIndex]; + + GTLUrlshortenerUrl *item = self.analyticsItem; + GTLUrlshortenerAnalyticsSummary *summary = item.analytics; + GTLUrlshortenerAnalyticsSnapshot *snapshot = summary.allTime; + NSArray *counts = [snapshot valueForKey:fieldName]; + return counts; +} + +#pragma mark Fetch the locations feed + +// begin retrieving the feed +- (void)fetchHistory { + self.historyFeed = nil; + self.historyFetchError = nil; + + GTLQueryUrlshortener *query = [GTLQueryUrlshortener queryForUrlList]; + self.historyTicket = [self.URLShortenerService executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id feed, NSError *error) { + // callback + self.historyFeed = feed; + self.historyFetchError = error; + self.historyTicket = nil; + + [self updateUI]; + }]; + [self updateUI]; +} + +#pragma mark Fetch an analytics items + +- (void)fetchAnalyticsForSelectedHistoryItem { + self.analyticsItem = nil; + self.analyticsFetchError = nil; + + GTLUrlshortenerUrl *item = [self selectedHistoryItem]; + if (item) { + GTLQueryUrlshortener *query = [GTLQueryUrlshortener queryForUrlGetWithShortUrl:item.identifier]; + query.projection = kGTLUrlshortenerProjectionFull; + + self.analyticsTicket = [self.URLShortenerService executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id item, NSError *error) { + // callback + self.analyticsItem = item; + self.analyticsFetchError = error; + self.analyticsTicket = nil; + + [self updateUI]; + }]; + [self updateUI]; + } +} + +#pragma mark Add a new short URL + +- (void)addAShortenedURL { + NSString *newURLStr = [addShortenedURLField_ stringValue]; + if ([newURLStr length] > 0) { + // make an object with the URL to be shortened + GTLUrlshortenerUrl *obj = [GTLUrlshortenerUrl object]; + obj.longUrl = newURLStr; + + GTLQueryUrlshortener *query = [GTLQueryUrlshortener queryForUrlInsertWithObject:obj]; + [self.URLShortenerService executeQuery:query + completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) { + // callback + if (error == nil) { + GTLUrlshortenerUrl *item = object; + [self displayAlert:@"Add URL" + format:@"Added URL \"%@\" for \n\"%@\"", item.identifier, item.longUrl]; + [self fetchHistory]; + [addShortenedURLField_ setStringValue:@""]; + } else { + [self displayAlert:@"Add URL Error" + format:@"%@", error]; + [self updateUI]; + } + }]; + } +} + +#pragma mark Sign-In Sheet + +- (void)runSigninThenInvokeSelector:(SEL)signInDoneSel { + // Your app should have clientID and clientSecret hardcoded into the source + NSString *clientID = [clientIDField_ stringValue]; + NSString *clientSecret = [clientSecretField_ stringValue]; + + if ([clientID length] == 0 || [clientSecret length] == 0) { + // remind the developer that client ID and client secret are needed + [clientIDButton_ performSelector:@selector(performClick:) + withObject:self + afterDelay:0.5]; + return; + } + + NSBundle *frameworkBundle = [NSBundle bundleForClass:[GTMOAuth2WindowController class]]; + GTMOAuth2WindowController *windowController; + windowController = [GTMOAuth2WindowController controllerWithScope:kGTLAuthScopeUrlshortener + clientID:clientID + clientSecret:clientSecret + keychainItemName:kKeychainItemName + resourceBundle:frameworkBundle]; + + [windowController signInSheetModalForWindow:[self window] + completionHandler:^(GTMOAuth2Authentication *auth, NSError *error) { + if (error == nil) { + self.URLShortenerService.authorizer = auth; + + if (signInDoneSel) { + [self performSelector:signInDoneSel]; + } + } else { + self.historyFetchError = error; + [self updateUI]; + } + }]; +} + +#pragma mark UI + +- (void)updateUI { + // History table + [historyTable_ reloadData]; + + if (self.historyTicket != nil) { + [historyProgressIndicator_ startAnimation:self]; + [historyCancelButton_ setEnabled:YES]; + } else { + [historyProgressIndicator_ stopAnimation:self]; + [historyCancelButton_ setEnabled:NO]; + } + + // Display the selected history item, or the fetch error + GTLUrlshortenerUrl *selectedItem = [self selectedHistoryItem]; + NSString *resultStr = @""; + NSError *fetchError = self.historyFetchError; + if (fetchError != nil) { + resultStr = [fetchError description]; + } else { + if (selectedItem) { + resultStr = [selectedItem description]; + } + } + [historyResultTextField_ setString:resultStr]; + + // Analytics table + [analyticsTable_ reloadData]; + + if (self.analyticsTicket != nil) { + [analyticsProgressIndicator_ startAnimation:self]; + [analyticsCancelButton_ setEnabled:YES]; + } else { + [analyticsProgressIndicator_ stopAnimation:self]; + [analyticsCancelButton_ setEnabled:NO]; + } + + NSString *shortClicksStr = @"Short URL Clicks: -"; + NSString *longClicksStr = @"Long URL Clicks: -"; + if (self.analyticsItem.analytics) { + NSNumber *shortClicks = self.analyticsItem.analytics.allTime.shortUrlClicks; + NSNumber *longClicks = self.analyticsItem.analytics.allTime.shortUrlClicks; + + shortClicksStr = [NSString stringWithFormat:@"Short URL Clicks: %@", shortClicks]; + longClicksStr = [NSString stringWithFormat:@"Long URL Clicks: %@", longClicks]; + } + [shortURLClicksField_ setStringValue:shortClicksStr]; + [longURLClicksField_ setStringValue:longClicksStr]; + + // Enable buttons + BOOL isSignedIn = ([self signedInUsername] != nil); + [signedInButton_ setTitle:(isSignedIn ? @"Sign Out" : @"Sign In")]; + [signedInField_ setStringValue:(isSignedIn ? [self signedInUsername] : @"No")]; + + BOOL hasALongURL = ([[addShortenedURLField_ stringValue] length] > 0); + [addShortenedURLButton_ setEnabled:(isSignedIn && hasALongURL)]; + + // Show or hide the text indicating that the client ID or client secret are + // needed + BOOL hasClientIDStrings = [[clientIDField_ stringValue] length] > 0 + && [[clientSecretField_ stringValue] length] > 0; + [clientIDRequiredTextField_ setHidden:hasClientIDStrings]; +} + +- (void)displayAlert:(NSString *)title format:(NSString *)format, ... { + NSString *result = format; + if (format) { + va_list argList; + va_start(argList, format); + result = [[[NSString alloc] initWithFormat:format + arguments:argList] autorelease]; + va_end(argList); + } + NSBeginAlertSheet(title, nil, nil, nil, [self window], nil, nil, + nil, nil, @"%@", result); +} + +#pragma mark Client ID Sheet + +// Client ID and Client Secret Sheet +// +// Sample apps need this sheet to ask for the client ID and client secret +// strings +// +// Your application will just hardcode the client ID and client secret strings +// into the source rather than ask the user for them. +// +// The string values are obtained from the API Console, +// https://code.google.com/apis/console +// + +- (IBAction)clientIDClicked:(id)sender { + // show the sheet for developers to enter client ID and client secret + [NSApp beginSheet:clientIDSheet_ + modalForWindow:[self window] + modalDelegate:self + didEndSelector:@selector(clientIDSheetDidEnd:returnCode:contextInfo:) + contextInfo:NULL]; +} + +- (IBAction)clientIDDoneClicked:(id)sender { + [NSApp endSheet:clientIDSheet_ returnCode:NSOKButton]; +} + +- (void)clientIDSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { + [sheet orderOut:self]; + + [self updateUI]; +} + +#pragma mark Text field delegate methods + +- (void)controlTextDidChange:(NSNotification *)note { + [self updateUI]; // enabled/disable buttons +} + +#pragma mark TableView delegate and data source methods + +- (void)tableViewSelectionDidChange:(NSNotification *)notification { + if ([notification object] == historyTable_) { + [self fetchAnalyticsForSelectedHistoryItem]; + } else { + [self updateUI]; + } +} + +// table view data source methods +- (int)numberOfRowsInTableView:(NSTableView *)tableView { + if (tableView == historyTable_) { + NSArray *items = self.historyFeed.items; + return [items count]; + } else { + NSArray *items = [self selectedAnalyticsCounts]; + return [items count]; + } +} + +- (id)tableView:(NSTableView *)tableView +objectValueForTableColumn:(NSTableColumn *)tableColumn + row:(int)row { + if (tableView == historyTable_) { + GTLUrlshortenerUrl *item = [self.historyFeed itemAtIndex:row]; + NSString *resultStr = [NSString stringWithFormat:@"%@ → %@", + item.identifier, item.longUrl]; + return resultStr; + } else { + NSArray *counts = [self selectedAnalyticsCounts]; + GTLUrlshortenerStringCount *countPair = [counts objectAtIndex:row]; + NSString *resultStr = [NSString stringWithFormat:@"%@: %@", + countPair.count, countPair.identifier]; + return resultStr; + } +} + +@end diff --git a/GTL/Examples/URLShortenerSample/buildStripHeaders b/GTL/Examples/URLShortenerSample/buildStripHeaders new file mode 100755 index 0000000..0238ef2 --- /dev/null +++ b/GTL/Examples/URLShortenerSample/buildStripHeaders @@ -0,0 +1,17 @@ +#!/bin/sh +# +# buildStripHeaders +# +# Remove header files from the built copy of the framework inside our +# application. + +# Strip "*.h" files +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname '*.h' -delete + +# Strip "Headers" links +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type l -delete + +# Strip "Headers" directories +find "${BUILD_ROOT}/${CONFIGURATION}/${WRAPPER_NAME}" -iname 'Headers' -type d -prune -delete + + diff --git a/GTL/Examples/URLShortenerSample/main.m b/GTL/Examples/URLShortenerSample/main.m new file mode 100644 index 0000000..3e35dea --- /dev/null +++ b/GTL/Examples/URLShortenerSample/main.m @@ -0,0 +1,25 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// main.m +// + +#import + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **) argv); +} diff --git a/GTL/Source/.svn/all-wcprops b/GTL/Source/.svn/all-wcprops new file mode 100644 index 0000000..5ff40ca --- /dev/null +++ b/GTL/Source/.svn/all-wcprops @@ -0,0 +1,17 @@ +K 25 +svn:wc:ra_dav:version-url +V 30 +/svn/!svn/ver/249/trunk/Source +END +ReleaseNotes.txt +K 25 +svn:wc:ra_dav:version-url +V 47 +/svn/!svn/ver/249/trunk/Source/ReleaseNotes.txt +END +GTLDefines.h +K 25 +svn:wc:ra_dav:version-url +V 42 +/svn/!svn/ver/97/trunk/Source/GTLDefines.h +END diff --git a/GTL/Source/.svn/dir-prop-base b/GTL/Source/.svn/dir-prop-base new file mode 100644 index 0000000..a53e58b --- /dev/null +++ b/GTL/Source/.svn/dir-prop-base @@ -0,0 +1,13 @@ +K 13 +svn:externals +V 193 +HTTPFetcher http://gtm-http-fetcher.googlecode.com/svn/trunk/Source +OAuth2 http://gtm-oauth2.googlecode.com/svn/trunk/Source +JSON https://github.com/stig/json-framework.git/tags/v2.3.2/Classes + +K 10 +svn:ignore +V 6 +build + +END diff --git a/GTL/Source/.svn/entries b/GTL/Source/.svn/entries new file mode 100644 index 0000000..8a02170 --- /dev/null +++ b/GTL/Source/.svn/entries @@ -0,0 +1,124 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-12-06T21:45:46.693811Z +249 +grobbins@google.com +has-props + + +svn:externals + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +Tools +dir + +GTL.xcodeproj +dir + + + +delete + +Tests +dir + +Services +dir + +Networking +dir + +ReleaseNotes.txt +file + + + + +2012-12-09T08:42:33.000000Z +4c52682c3e0db963d6180784b69c6748 +2012-12-06T21:45:46.693811Z +249 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1934 + +Objects +dir + +Resources +dir + +GTLDefines.h +file + + + + +2012-12-09T08:42:33.000000Z +be2c3ce7a8099b117fe26aba44ba3701 +2011-11-15T21:19:21.150444Z +97 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4073 + +Utilities +dir + diff --git a/GTL/Source/.svn/text-base/GTLDefines.h.svn-base b/GTL/Source/.svn/text-base/GTLDefines.h.svn-base new file mode 100644 index 0000000..ebd9655 --- /dev/null +++ b/GTL/Source/.svn/text-base/GTLDefines.h.svn-base @@ -0,0 +1,128 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDefines.h +// + +// Ensure Apple's conditionals we depend on are defined. +#import +#import + +// +// The developer may choose to define these in the project: +// +// #define GTL_TARGET_NAMESPACE Xxx // preface all GTL class names with Xxx (recommended for building plug-ins) +// #define GTL_FOUNDATION_ONLY 1 // builds without AppKit or Carbon (default for iPhone builds) +// #define STRIP_GTM_FETCH_LOGGING 1 // omit http logging code (default for iPhone release builds) +// +// Mac developers may find GTL_SIMPLE_DESCRIPTIONS and STRIP_GTM_FETCH_LOGGING useful for +// reducing code size. +// + +// Define later OS versions when building on earlier versions +#ifdef MAC_OS_X_VERSION_10_0 + #ifndef MAC_OS_X_VERSION_10_6 + #define MAC_OS_X_VERSION_10_6 1060 + #endif +#endif + + +#ifdef GTL_TARGET_NAMESPACE +// prefix all GTL class names with GTL_TARGET_NAMESPACE for this target + #import "GTLTargetNamespace.h" +#endif + +// Provide a common definition for externing constants/functions +#if defined(__cplusplus) + #define GTL_EXTERN extern "C" +#else + #define GTL_EXTERN extern +#endif + +#if TARGET_OS_IPHONE // iPhone SDK + + #define GTL_IPHONE 1 + +#endif + +#if GTL_IPHONE + + #define GTL_FOUNDATION_ONLY 1 + +#endif + +// +// GTL_ASSERT is like NSAssert, but takes a variable number of arguments: +// +// GTL_ASSERT(condition, @"Problem in argument %@", argStr); +// +// GTL_DEBUG_ASSERT is similar, but compiles in only for debug builds +// + +#ifndef GTL_ASSERT + // we directly invoke the NSAssert handler so we can pass on the varargs + #if !defined(NS_BLOCK_ASSERTIONS) + #define GTL_ASSERT(condition, ...) \ + do { \ + if (!(condition)) { \ + [[NSAssertionHandler currentHandler] \ + handleFailureInFunction:[NSString stringWithUTF8String:__PRETTY_FUNCTION__] \ + file:[NSString stringWithUTF8String:__FILE__] \ + lineNumber:__LINE__ \ + description:__VA_ARGS__]; \ + } \ + } while(0) + #else + #define GTL_ASSERT(condition, ...) do { } while (0) + #endif // !defined(NS_BLOCK_ASSERTIONS) +#endif // GTL_ASSERT + +#ifndef GTL_DEBUG_ASSERT + #if DEBUG + #define GTL_DEBUG_ASSERT(condition, ...) GTL_ASSERT(condition, __VA_ARGS__) + #else + #define GTL_DEBUG_ASSERT(condition, ...) do { } while (0) + #endif +#endif + +#ifndef GTL_DEBUG_LOG + #if DEBUG + #define GTL_DEBUG_LOG(...) NSLog(__VA_ARGS__) + #else + #define GTL_DEBUG_LOG(...) do { } while (0) + #endif +#endif + +#ifndef STRIP_GTM_FETCH_LOGGING + #if GTL_IPHONE && !DEBUG + #define STRIP_GTM_FETCH_LOGGING 1 + #else + #define STRIP_GTM_FETCH_LOGGING 0 + #endif +#endif + +// Some support for advanced clang static analysis functionality +// See http://clang-analyzer.llvm.org/annotations.html +#ifndef __has_feature // Optional. + #define __has_feature(x) 0 // Compatibility with non-clang compilers. +#endif +#ifndef NS_RETURNS_NOT_RETAINED + #if __has_feature(attribute_ns_returns_not_retained) + #define NS_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained)) + #else + #define NS_RETURNS_NOT_RETAINED + #endif +#endif diff --git a/GTL/Source/.svn/text-base/ReleaseNotes.txt.svn-base b/GTL/Source/.svn/text-base/ReleaseNotes.txt.svn-base new file mode 100644 index 0000000..28b3272 --- /dev/null +++ b/GTL/Source/.svn/text-base/ReleaseNotes.txt.svn-base @@ -0,0 +1,92 @@ +Google APIs Client Library for Objective-C +Release Notes + +Project site: http://code.google.com/p/google-api-objectivec-client/ +Discussion group: http://groups.google.com/group/google-api-objectivec-client + +6-Dec-2012 + +Added support for additional compiler warnings (thanks noloader). + +Worked around limitations in NSDecimalNumber's handling of 64-bit integers. + +Removed SBJSON from the GTL project. Individual apps my choose to include the +SBJSON files for compatibility with older operating systems that do not have +NSJSONSerialization. + + +6-Aug-2012 + +GTLObject now supports indexed subscript access to items as a synonym for itemAtIndex: + +GTLDateTime is now an immutable class, to avoid accidental changes to instances +that have been added to an object tree. + + +30-May-2012 + +Calendar API now properly exposes GTLDateTimes for max/min times. + + +15-March-2012 + +Moved base64 encoding and decoding support to GTLBase64 file. + + +22-December-2011 + +Fixed waitForTicket's return value on delete fetches. + + +12-December-2011 + +String properties in objects are now copied rather than retained. + + +1-December-2011 + +Fixed handling of nil date-time fields in server responses. + + +17-November-2011 + +Added interfaces for Calendar. + + +17-October-2011 + +Added chunked (resumable) upload support and additional http headers to +query class. + + +20-September-2011 + +Added per-query callback blocks, especially useful for queries executes in +a batch. + +Added shouldFetchNextPages support for collections fetched in batch queries + +Added interfaces for orkut + + +15-September-2011 + +Added interfaces for Google Plus. + + +13-September-2011 + +Added interfaces for Blogger. + + +7-September-2011 + +Added generated interfaces for Google Analytics. + + +Release 2.0.0 +29-August-2011 + +Initial public release of the JSON-based API library. Includes standard object, +service, and query classes, and unit tests. Includes classes for Books, +Latitude, Shopping, Tasks and URL Shortener. diff --git a/GTL/Source/GTL.xcodeproj/.svn/all-wcprops b/GTL/Source/GTL.xcodeproj/.svn/all-wcprops new file mode 100644 index 0000000..823c2a8 --- /dev/null +++ b/GTL/Source/GTL.xcodeproj/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 44 +/svn/!svn/ver/249/trunk/Source/GTL.xcodeproj +END +project.pbxproj +K 25 +svn:wc:ra_dav:version-url +V 60 +/svn/!svn/ver/249/trunk/Source/GTL.xcodeproj/project.pbxproj +END diff --git a/GTL/Source/GTL.xcodeproj/.svn/dir-prop-base b/GTL/Source/GTL.xcodeproj/.svn/dir-prop-base new file mode 100644 index 0000000..60aefe0 --- /dev/null +++ b/GTL/Source/GTL.xcodeproj/.svn/dir-prop-base @@ -0,0 +1,7 @@ +K 10 +svn:ignore +V 20 +*.pbxuser +*.mode?v? + +END diff --git a/GTL/Source/GTL.xcodeproj/.svn/entries b/GTL/Source/GTL.xcodeproj/.svn/entries new file mode 100644 index 0000000..34cdd6c --- /dev/null +++ b/GTL/Source/GTL.xcodeproj/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/GTL.xcodeproj +http://google-api-objectivec-client.googlecode.com/svn +delete + + +2012-12-06T21:45:46.693811Z +249 +grobbins@google.com +has-props + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +project.pbxproj +file + + + +delete +2012-12-09T08:42:30.000000Z +f47d0bee0d59f24701133dd4697695bb +2012-12-06T21:45:46.693811Z +249 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +94829 + diff --git a/GTL/Source/GTL.xcodeproj/.svn/text-base/project.pbxproj.svn-base b/GTL/Source/GTL.xcodeproj/.svn/text-base/project.pbxproj.svn-base new file mode 100644 index 0000000..3688b5c --- /dev/null +++ b/GTL/Source/GTL.xcodeproj/.svn/text-base/project.pbxproj.svn-base @@ -0,0 +1,1316 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4F0C4FBC13CFA7E5007E5E92 /* GTLUploadParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F0C4FBA13CFA7E5007E5E92 /* GTLUploadParameters.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F0C4FBD13CFA7E5007E5E92 /* GTLUploadParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F0C4FBB13CFA7E5007E5E92 /* GTLUploadParameters.m */; }; + 4F0C4FBE13CFA7E5007E5E92 /* GTLUploadParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F0C4FBB13CFA7E5007E5E92 /* GTLUploadParameters.m */; }; + 4F0C4FBF13CFA7E5007E5E92 /* GTLUploadParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F0C4FBB13CFA7E5007E5E92 /* GTLUploadParameters.m */; }; + 4F0C4FC013CFA7E5007E5E92 /* GTLUploadParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F0C4FBB13CFA7E5007E5E92 /* GTLUploadParameters.m */; }; + 4F14A9E70B1277290072EBB8 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F14A9E60B1277290072EBB8 /* SenTestingKit.framework */; }; + 4F164608137098C80096E878 /* Task1.request.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4F164606137098C80096E878 /* Task1.request.txt */; }; + 4F164609137098C80096E878 /* Task1.response.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4F164607137098C80096E878 /* Task1.response.txt */; }; + 4F16476B1370C8F80096E878 /* TaskBatch1.request.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4F1647691370C8F80096E878 /* TaskBatch1.request.txt */; }; + 4F16476C1370C8F80096E878 /* TaskBatch1.response.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4F16476A1370C8F80096E878 /* TaskBatch1.response.txt */; }; + 4F18174E1134982E009F7FD1 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F18174C1134982E009F7FD1 /* Security.framework */; }; + 4F18174F1134982E009F7FD1 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F18174C1134982E009F7FD1 /* Security.framework */; }; + 4F1817511134982E009F7FD1 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F18174C1134982E009F7FD1 /* Security.framework */; }; + 4F1AD90D0B71607400DC0485 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F1AD90C0B71607400DC0485 /* main.m */; }; + 4F1ADAB10B7168F300DC0485 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; }; + 4F2449B7121F3E2A00FEE1DA /* GTMHTTPFetcherTestServer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F2449B4121F3E2A00FEE1DA /* GTMHTTPFetcherTestServer.m */; }; + 4F2449B8121F3E2A00FEE1DA /* GTMHTTPServer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F2449B6121F3E2A00FEE1DA /* GTMHTTPServer.m */; }; + 4F31A3D7142AA6BA00A58EAD /* TaskBatchPage1a.request.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4F31A3D3142AA6BA00A58EAD /* TaskBatchPage1a.request.txt */; }; + 4F31A3D8142AA6BA00A58EAD /* TaskBatchPage1a.response.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4F31A3D4142AA6BA00A58EAD /* TaskBatchPage1a.response.txt */; }; + 4F31A3D9142AA6BA00A58EAD /* TaskBatchPage1b.request.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4F31A3D5142AA6BA00A58EAD /* TaskBatchPage1b.request.txt */; }; + 4F31A3DA142AA6BA00A58EAD /* TaskBatchPage1b.response.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4F31A3D6142AA6BA00A58EAD /* TaskBatchPage1b.response.txt */; }; + 4F35B4B11385F9270082F64E /* Task1.rest.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4F35B4B01385F9270082F64E /* Task1.rest.txt */; }; + 4F35D4B4117787F600BDFA97 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F35D4B3117787F600BDFA97 /* SystemConfiguration.framework */; }; + 4F35D4C71177880300BDFA97 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F35D4B3117787F600BDFA97 /* SystemConfiguration.framework */; }; + 4F35D4C91177880500BDFA97 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F35D4B3117787F600BDFA97 /* SystemConfiguration.framework */; }; + 4F3DE995119CCE49006926D1 /* GTLDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F3DE994119CCE49006926D1 /* GTLDefines.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F4DE9091371DD6F00F5C554 /* TaskError1.request.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4F4DE9071371DD6F00F5C554 /* TaskError1.request.txt */; }; + 4F4DE90A1371DD6F00F5C554 /* TaskError1.response.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4F4DE9081371DD6F00F5C554 /* TaskError1.response.txt */; }; + 4F4DEB6F1372170300F5C554 /* TaskPage1a.request.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4F4DEB6B1372170300F5C554 /* TaskPage1a.request.txt */; }; + 4F4DEB701372170300F5C554 /* TaskPage1a.response.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4F4DEB6C1372170300F5C554 /* TaskPage1a.response.txt */; }; + 4F4DEB711372170300F5C554 /* TaskPage1b.request.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4F4DEB6D1372170300F5C554 /* TaskPage1b.request.txt */; }; + 4F4DEB721372170300F5C554 /* TaskPage1b.response.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4F4DEB6E1372170300F5C554 /* TaskPage1b.response.txt */; }; + 4F697FA7131C1A4100A5AB6A /* GTMOAuth2Authentication.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F697FA3131C1A4100A5AB6A /* GTMOAuth2Authentication.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F697FA8131C1A4100A5AB6A /* GTMOAuth2Authentication.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F697FA4131C1A4100A5AB6A /* GTMOAuth2Authentication.m */; }; + 4F697FA9131C1A4100A5AB6A /* GTMOAuth2SignIn.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F697FA5131C1A4100A5AB6A /* GTMOAuth2SignIn.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F697FAA131C1A4100A5AB6A /* GTMOAuth2SignIn.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F697FA6131C1A4100A5AB6A /* GTMOAuth2SignIn.m */; }; + 4F697FAB131C1A4100A5AB6A /* GTMOAuth2Authentication.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F697FA4131C1A4100A5AB6A /* GTMOAuth2Authentication.m */; }; + 4F697FAC131C1A4100A5AB6A /* GTMOAuth2SignIn.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F697FA6131C1A4100A5AB6A /* GTMOAuth2SignIn.m */; }; + 4F697FAD131C1A4100A5AB6A /* GTMOAuth2Authentication.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F697FA4131C1A4100A5AB6A /* GTMOAuth2Authentication.m */; }; + 4F697FAE131C1A4100A5AB6A /* GTMOAuth2SignIn.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F697FA6131C1A4100A5AB6A /* GTMOAuth2SignIn.m */; }; + 4F697FAF131C1A4100A5AB6A /* GTMOAuth2Authentication.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F697FA4131C1A4100A5AB6A /* GTMOAuth2Authentication.m */; }; + 4F697FB6131C1A5800A5AB6A /* GTMOAuth2Window.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F697FB3131C1A5800A5AB6A /* GTMOAuth2Window.xib */; }; + 4F697FB7131C1A5800A5AB6A /* GTMOAuth2WindowController.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F697FB4131C1A5800A5AB6A /* GTMOAuth2WindowController.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F697FB8131C1A5800A5AB6A /* GTMOAuth2WindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F697FB5131C1A5800A5AB6A /* GTMOAuth2WindowController.m */; }; + 4F697FBE131C1A6800A5AB6A /* GTMOAuth2ViewControllerTouch.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F697FBC131C1A6800A5AB6A /* GTMOAuth2ViewControllerTouch.m */; }; + 4F697FC2131C1A7A00A5AB6A /* GTMOAuth2SignIn.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F697FA6131C1A4100A5AB6A /* GTMOAuth2SignIn.m */; }; + 4F698059131C1F1D00A5AB6A /* GTMGatherInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F69804C131C1F1D00A5AB6A /* GTMGatherInputStream.m */; }; + 4F69805A131C1F1D00A5AB6A /* GTMHTTPFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F69804E131C1F1D00A5AB6A /* GTMHTTPFetcher.m */; }; + 4F69805B131C1F1D00A5AB6A /* GTMHTTPFetcherLogging.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F698050131C1F1D00A5AB6A /* GTMHTTPFetcherLogging.m */; }; + 4F69805D131C1F1D00A5AB6A /* GTMHTTPFetchHistory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F698054131C1F1D00A5AB6A /* GTMHTTPFetchHistory.m */; }; + 4F69805E131C1F1D00A5AB6A /* GTMHTTPUploadFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F698056131C1F1D00A5AB6A /* GTMHTTPUploadFetcher.m */; }; + 4F69805F131C1F1D00A5AB6A /* GTMMIMEDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F698058131C1F1D00A5AB6A /* GTMMIMEDocument.m */; }; + 4F698060131C1F1D00A5AB6A /* GTMGatherInputStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F69804B131C1F1D00A5AB6A /* GTMGatherInputStream.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F698061131C1F1D00A5AB6A /* GTMGatherInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F69804C131C1F1D00A5AB6A /* GTMGatherInputStream.m */; }; + 4F698062131C1F1D00A5AB6A /* GTMHTTPFetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F69804D131C1F1D00A5AB6A /* GTMHTTPFetcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F698063131C1F1D00A5AB6A /* GTMHTTPFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F69804E131C1F1D00A5AB6A /* GTMHTTPFetcher.m */; }; + 4F698064131C1F1D00A5AB6A /* GTMHTTPFetcherLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F69804F131C1F1D00A5AB6A /* GTMHTTPFetcherLogging.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F698065131C1F1D00A5AB6A /* GTMHTTPFetcherLogging.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F698050131C1F1D00A5AB6A /* GTMHTTPFetcherLogging.m */; }; + 4F698066131C1F1D00A5AB6A /* GTMHTTPFetcherService.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F698051131C1F1D00A5AB6A /* GTMHTTPFetcherService.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F698068131C1F1D00A5AB6A /* GTMHTTPFetchHistory.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F698053131C1F1D00A5AB6A /* GTMHTTPFetchHistory.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F698069131C1F1D00A5AB6A /* GTMHTTPFetchHistory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F698054131C1F1D00A5AB6A /* GTMHTTPFetchHistory.m */; }; + 4F69806A131C1F1D00A5AB6A /* GTMHTTPUploadFetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F698055131C1F1D00A5AB6A /* GTMHTTPUploadFetcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F69806B131C1F1D00A5AB6A /* GTMHTTPUploadFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F698056131C1F1D00A5AB6A /* GTMHTTPUploadFetcher.m */; }; + 4F69806C131C1F1D00A5AB6A /* GTMMIMEDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F698057131C1F1D00A5AB6A /* GTMMIMEDocument.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F69806D131C1F1D00A5AB6A /* GTMMIMEDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F698058131C1F1D00A5AB6A /* GTMMIMEDocument.m */; }; + 4F69806E131C1F1D00A5AB6A /* GTMGatherInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F69804C131C1F1D00A5AB6A /* GTMGatherInputStream.m */; }; + 4F69806F131C1F1D00A5AB6A /* GTMHTTPFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F69804E131C1F1D00A5AB6A /* GTMHTTPFetcher.m */; }; + 4F698070131C1F1D00A5AB6A /* GTMHTTPFetcherLogging.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F698050131C1F1D00A5AB6A /* GTMHTTPFetcherLogging.m */; }; + 4F698072131C1F1D00A5AB6A /* GTMHTTPFetchHistory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F698054131C1F1D00A5AB6A /* GTMHTTPFetchHistory.m */; }; + 4F698073131C1F1D00A5AB6A /* GTMHTTPUploadFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F698056131C1F1D00A5AB6A /* GTMHTTPUploadFetcher.m */; }; + 4F698074131C1F1D00A5AB6A /* GTMMIMEDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F698058131C1F1D00A5AB6A /* GTMMIMEDocument.m */; }; + 4F698075131C1F1D00A5AB6A /* GTMGatherInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F69804C131C1F1D00A5AB6A /* GTMGatherInputStream.m */; }; + 4F698076131C1F1D00A5AB6A /* GTMHTTPFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F69804E131C1F1D00A5AB6A /* GTMHTTPFetcher.m */; }; + 4F698077131C1F1D00A5AB6A /* GTMHTTPFetcherLogging.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F698050131C1F1D00A5AB6A /* GTMHTTPFetcherLogging.m */; }; + 4F698079131C1F1D00A5AB6A /* GTMHTTPFetchHistory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F698054131C1F1D00A5AB6A /* GTMHTTPFetchHistory.m */; }; + 4F69807A131C1F1D00A5AB6A /* GTMHTTPUploadFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F698056131C1F1D00A5AB6A /* GTMHTTPUploadFetcher.m */; }; + 4F69807B131C1F1D00A5AB6A /* GTMMIMEDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F698058131C1F1D00A5AB6A /* GTMMIMEDocument.m */; }; + 4F69808F131C20DA00A5AB6A /* GTMHTTPFetcherService.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F69808E131C20DA00A5AB6A /* GTMHTTPFetcherService.m */; }; + 4F698090131C20DA00A5AB6A /* GTMHTTPFetcherService.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F69808E131C20DA00A5AB6A /* GTMHTTPFetcherService.m */; }; + 4F698091131C20DA00A5AB6A /* GTMHTTPFetcherService.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F69808E131C20DA00A5AB6A /* GTMHTTPFetcherService.m */; }; + 4F698092131C20DA00A5AB6A /* GTMHTTPFetcherService.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F69808E131C20DA00A5AB6A /* GTMHTTPFetcherService.m */; }; + 4F76C07613B120A6009154C6 /* TaskPage1c.request.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4F76C06D13B1208F009154C6 /* TaskPage1c.request.txt */; }; + 4F76C07713B120A6009154C6 /* TaskPage1c.response.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4F76C06E13B1208F009154C6 /* TaskPage1c.response.txt */; }; + 4F76C07813B120A6009154C6 /* TaskPage1d.request.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4F76C06F13B1208F009154C6 /* TaskPage1d.request.txt */; }; + 4F76C07913B120A6009154C6 /* TaskPage1d.response.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4F76C07013B1208F009154C6 /* TaskPage1d.response.txt */; }; + 4F8DB61913FDAC160001DD6C /* GTMReadMonitorInputStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F8DB61713FDAC160001DD6C /* GTMReadMonitorInputStream.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F8DB61A13FDAC160001DD6C /* GTMReadMonitorInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F8DB61813FDAC160001DD6C /* GTMReadMonitorInputStream.m */; }; + 4F8DB61B13FDAC160001DD6C /* GTMReadMonitorInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F8DB61813FDAC160001DD6C /* GTMReadMonitorInputStream.m */; }; + 4F8DB61C13FDAC160001DD6C /* GTMReadMonitorInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F8DB61813FDAC160001DD6C /* GTMReadMonitorInputStream.m */; }; + 4F8DB61D13FDAC160001DD6C /* GTMReadMonitorInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F8DB61813FDAC160001DD6C /* GTMReadMonitorInputStream.m */; }; + 4F8DB6DE13FDC0F50001DD6C /* GTLBatchQuery.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4FDE22491384818E005AEFAA /* GTLBatchQuery.h */; }; + 4F8DB6DF13FDC0F50001DD6C /* GTLBatchResult.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4FDE224B1384818E005AEFAA /* GTLBatchResult.h */; }; + 4F8DB6E013FDC0F50001DD6C /* GTLDateTime.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4FDE224D1384818E005AEFAA /* GTLDateTime.h */; }; + 4F8DB6E113FDC0F50001DD6C /* GTLDefines.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4F3DE994119CCE49006926D1 /* GTLDefines.h */; }; + 4F8DB6E213FDC0F50001DD6C /* GTLErrorObject.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4FDE224F1384818E005AEFAA /* GTLErrorObject.h */; }; + 4F8DB6E313FDC0F50001DD6C /* GTLFramework.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4FDE223213848173005AEFAA /* GTLFramework.h */; }; + 4F8DB6E413FDC0F50001DD6C /* GTLJSONParser.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4FDE223413848173005AEFAA /* GTLJSONParser.h */; }; + 4F8DB6E513FDC0F50001DD6C /* GTLObject.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4FDE22511384818E005AEFAA /* GTLObject.h */; }; + 4F8DB6E613FDC0F50001DD6C /* GTLQuery.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4FDE22531384818E005AEFAA /* GTLQuery.h */; }; + 4F8DB6E713FDC0F50001DD6C /* GTLRuntimeCommon.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4FDE22551384818E005AEFAA /* GTLRuntimeCommon.h */; }; + 4F8DB6E813FDC0F50001DD6C /* GTLService.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4FDE22571384818E005AEFAA /* GTLService.h */; }; + 4F8DB6E913FDC0F50001DD6C /* GTLTargetNamespace.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4FDE223613848173005AEFAA /* GTLTargetNamespace.h */; }; + 4F8DB6EA13FDC0F50001DD6C /* GTLUploadParameters.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4F0C4FBA13CFA7E5007E5E92 /* GTLUploadParameters.h */; }; + 4F8DB6EB13FDC0F50001DD6C /* GTLUtilities.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4FDE223713848173005AEFAA /* GTLUtilities.h */; }; + 4F8DB6EC13FDC0F50001DD6C /* GTMGatherInputStream.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4F69804B131C1F1D00A5AB6A /* GTMGatherInputStream.h */; }; + 4F8DB6ED13FDC0F50001DD6C /* GTMHTTPFetcher.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4F69804D131C1F1D00A5AB6A /* GTMHTTPFetcher.h */; }; + 4F8DB6EE13FDC0F50001DD6C /* GTMHTTPFetcherLogging.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4F69804F131C1F1D00A5AB6A /* GTMHTTPFetcherLogging.h */; }; + 4F8DB6EF13FDC0F50001DD6C /* GTMHTTPFetcherService.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4F698051131C1F1D00A5AB6A /* GTMHTTPFetcherService.h */; }; + 4F8DB6F013FDC0F50001DD6C /* GTMHTTPFetchHistory.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4F698053131C1F1D00A5AB6A /* GTMHTTPFetchHistory.h */; }; + 4F8DB6F113FDC0F50001DD6C /* GTMHTTPUploadFetcher.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4F698055131C1F1D00A5AB6A /* GTMHTTPUploadFetcher.h */; }; + 4F8DB6F213FDC0F50001DD6C /* GTMMIMEDocument.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4F698057131C1F1D00A5AB6A /* GTMMIMEDocument.h */; }; + 4F8DB6F313FDC0F50001DD6C /* GTMOAuth2Authentication.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4F697FA3131C1A4100A5AB6A /* GTMOAuth2Authentication.h */; }; + 4F8DB6F413FDC0F50001DD6C /* GTMOAuth2SignIn.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4F697FA5131C1A4100A5AB6A /* GTMOAuth2SignIn.h */; }; + 4F8DB6F513FDC0F50001DD6C /* GTMOAuth2ViewControllerTouch.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4F697FBB131C1A6800A5AB6A /* GTMOAuth2ViewControllerTouch.h */; }; + 4F8DB6F613FDC0F50001DD6C /* GTMOAuth2WindowController.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4F697FB4131C1A5800A5AB6A /* GTMOAuth2WindowController.h */; }; + 4F8DB6F713FDC0F50001DD6C /* GTMReadMonitorInputStream.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4F8DB61713FDAC160001DD6C /* GTMReadMonitorInputStream.h */; }; + 4F934E671512712100C4EA34 /* GTLBase64.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F934E651512712100C4EA34 /* GTLBase64.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F934E681512712100C4EA34 /* GTLBase64.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F934E661512712100C4EA34 /* GTLBase64.m */; }; + 4F934E691512712100C4EA34 /* GTLBase64.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F934E661512712100C4EA34 /* GTLBase64.m */; }; + 4F934E6A1512712100C4EA34 /* GTLBase64.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F934E661512712100C4EA34 /* GTLBase64.m */; }; + 4F934E6B1512712100C4EA34 /* GTLBase64.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F934E661512712100C4EA34 /* GTLBase64.m */; }; + 4F934E6C1512713000C4EA34 /* GTLBase64.h in Copy Static Library Headers */ = {isa = PBXBuildFile; fileRef = 4F934E651512712100C4EA34 /* GTLBase64.h */; }; + 4F934F51151286FE00C4EA34 /* GTLBase64Test.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F934F50151286FE00C4EA34 /* GTLBase64Test.m */; }; + 4F9F7E3911F5103B0033A2C1 /* GTLDateTimeTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F9F7E3811F5103B0033A2C1 /* GTLDateTimeTest.m */; }; + 4F9F7E3C11F510430033A2C1 /* GTLFrameworkTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F9F7E3A11F510430033A2C1 /* GTLFrameworkTest.m */; }; + 4F9F7E3D11F510430033A2C1 /* GTLUtilitiesTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F9F7E3B11F510430033A2C1 /* GTLUtilitiesTest.m */; }; + 4FCC7A1D11EFD9EA0097924C /* GTLServiceTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCC7A1C11EFD9EA0097924C /* GTLServiceTest.m */; }; + 4FDE223913848173005AEFAA /* GTLFramework.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE223313848173005AEFAA /* GTLFramework.m */; }; + 4FDE223A13848173005AEFAA /* GTLJSONParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE223513848173005AEFAA /* GTLJSONParser.m */; }; + 4FDE223B13848173005AEFAA /* GTLUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE223813848173005AEFAA /* GTLUtilities.m */; }; + 4FDE223C13848173005AEFAA /* GTLFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDE223213848173005AEFAA /* GTLFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FDE223D13848173005AEFAA /* GTLFramework.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE223313848173005AEFAA /* GTLFramework.m */; }; + 4FDE223E13848173005AEFAA /* GTLJSONParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDE223413848173005AEFAA /* GTLJSONParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FDE223F13848173005AEFAA /* GTLJSONParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE223513848173005AEFAA /* GTLJSONParser.m */; }; + 4FDE224013848173005AEFAA /* GTLTargetNamespace.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDE223613848173005AEFAA /* GTLTargetNamespace.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FDE224113848173005AEFAA /* GTLUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDE223713848173005AEFAA /* GTLUtilities.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FDE224213848173005AEFAA /* GTLUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE223813848173005AEFAA /* GTLUtilities.m */; }; + 4FDE224313848173005AEFAA /* GTLFramework.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE223313848173005AEFAA /* GTLFramework.m */; }; + 4FDE224413848173005AEFAA /* GTLJSONParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE223513848173005AEFAA /* GTLJSONParser.m */; }; + 4FDE224513848173005AEFAA /* GTLUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE223813848173005AEFAA /* GTLUtilities.m */; }; + 4FDE224613848173005AEFAA /* GTLFramework.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE223313848173005AEFAA /* GTLFramework.m */; }; + 4FDE224713848173005AEFAA /* GTLJSONParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE223513848173005AEFAA /* GTLJSONParser.m */; }; + 4FDE224813848173005AEFAA /* GTLUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE223813848173005AEFAA /* GTLUtilities.m */; }; + 4FDE22591384818E005AEFAA /* GTLBatchQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE224A1384818E005AEFAA /* GTLBatchQuery.m */; }; + 4FDE225A1384818E005AEFAA /* GTLBatchResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE224C1384818E005AEFAA /* GTLBatchResult.m */; }; + 4FDE225B1384818E005AEFAA /* GTLDateTime.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE224E1384818E005AEFAA /* GTLDateTime.m */; }; + 4FDE225C1384818E005AEFAA /* GTLErrorObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE22501384818E005AEFAA /* GTLErrorObject.m */; }; + 4FDE225D1384818E005AEFAA /* GTLObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE22521384818E005AEFAA /* GTLObject.m */; }; + 4FDE225E1384818E005AEFAA /* GTLQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE22541384818E005AEFAA /* GTLQuery.m */; }; + 4FDE225F1384818E005AEFAA /* GTLRuntimeCommon.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE22561384818E005AEFAA /* GTLRuntimeCommon.m */; }; + 4FDE22601384818E005AEFAA /* GTLService.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE22581384818E005AEFAA /* GTLService.m */; }; + 4FDE22611384818E005AEFAA /* GTLBatchQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDE22491384818E005AEFAA /* GTLBatchQuery.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FDE22621384818E005AEFAA /* GTLBatchQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE224A1384818E005AEFAA /* GTLBatchQuery.m */; }; + 4FDE22631384818E005AEFAA /* GTLBatchResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDE224B1384818E005AEFAA /* GTLBatchResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FDE22641384818E005AEFAA /* GTLBatchResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE224C1384818E005AEFAA /* GTLBatchResult.m */; }; + 4FDE22651384818E005AEFAA /* GTLDateTime.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDE224D1384818E005AEFAA /* GTLDateTime.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FDE22661384818E005AEFAA /* GTLDateTime.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE224E1384818E005AEFAA /* GTLDateTime.m */; }; + 4FDE22671384818E005AEFAA /* GTLErrorObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDE224F1384818E005AEFAA /* GTLErrorObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FDE22681384818E005AEFAA /* GTLErrorObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE22501384818E005AEFAA /* GTLErrorObject.m */; }; + 4FDE22691384818E005AEFAA /* GTLObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDE22511384818E005AEFAA /* GTLObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FDE226A1384818E005AEFAA /* GTLObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE22521384818E005AEFAA /* GTLObject.m */; }; + 4FDE226B1384818E005AEFAA /* GTLQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDE22531384818E005AEFAA /* GTLQuery.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FDE226C1384818E005AEFAA /* GTLQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE22541384818E005AEFAA /* GTLQuery.m */; }; + 4FDE226D1384818E005AEFAA /* GTLRuntimeCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDE22551384818E005AEFAA /* GTLRuntimeCommon.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FDE226E1384818E005AEFAA /* GTLRuntimeCommon.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE22561384818E005AEFAA /* GTLRuntimeCommon.m */; }; + 4FDE226F1384818E005AEFAA /* GTLService.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDE22571384818E005AEFAA /* GTLService.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FDE22701384818E005AEFAA /* GTLService.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE22581384818E005AEFAA /* GTLService.m */; }; + 4FDE22711384818E005AEFAA /* GTLBatchQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE224A1384818E005AEFAA /* GTLBatchQuery.m */; }; + 4FDE22721384818E005AEFAA /* GTLBatchResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE224C1384818E005AEFAA /* GTLBatchResult.m */; }; + 4FDE22731384818E005AEFAA /* GTLDateTime.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE224E1384818E005AEFAA /* GTLDateTime.m */; }; + 4FDE22741384818E005AEFAA /* GTLErrorObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE22501384818E005AEFAA /* GTLErrorObject.m */; }; + 4FDE22751384818E005AEFAA /* GTLObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE22521384818E005AEFAA /* GTLObject.m */; }; + 4FDE22761384818E005AEFAA /* GTLQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE22541384818E005AEFAA /* GTLQuery.m */; }; + 4FDE22771384818E005AEFAA /* GTLRuntimeCommon.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE22561384818E005AEFAA /* GTLRuntimeCommon.m */; }; + 4FDE22781384818E005AEFAA /* GTLService.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE22581384818E005AEFAA /* GTLService.m */; }; + 4FDE22791384818E005AEFAA /* GTLBatchQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE224A1384818E005AEFAA /* GTLBatchQuery.m */; }; + 4FDE227A1384818E005AEFAA /* GTLBatchResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE224C1384818E005AEFAA /* GTLBatchResult.m */; }; + 4FDE227B1384818E005AEFAA /* GTLDateTime.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE224E1384818E005AEFAA /* GTLDateTime.m */; }; + 4FDE227C1384818E005AEFAA /* GTLErrorObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE22501384818E005AEFAA /* GTLErrorObject.m */; }; + 4FDE227D1384818E005AEFAA /* GTLObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE22521384818E005AEFAA /* GTLObject.m */; }; + 4FDE227E1384818E005AEFAA /* GTLQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE22541384818E005AEFAA /* GTLQuery.m */; }; + 4FDE227F1384818E005AEFAA /* GTLRuntimeCommon.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE22561384818E005AEFAA /* GTLRuntimeCommon.m */; }; + 4FDE22801384818E005AEFAA /* GTLService.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDE22581384818E005AEFAA /* GTLService.m */; }; + F40E7366138A03CA00EE3F02 /* GTLQueryTasks.m in Sources */ = {isa = PBXBuildFile; fileRef = F47C37F7134B08EF00CCF631 /* GTLQueryTasks.m */; }; + F40E7367138A03CA00EE3F02 /* GTLServiceTasks.m in Sources */ = {isa = PBXBuildFile; fileRef = F47C37F9134B08EF00CCF631 /* GTLServiceTasks.m */; }; + F40E7368138A03CA00EE3F02 /* GTLTasksConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = F407F0FF136F948A005A4866 /* GTLTasksConstants.m */; }; + F40E7369138A03CA00EE3F02 /* GTLTasksTask.m in Sources */ = {isa = PBXBuildFile; fileRef = F47C37FC134B08EF00CCF631 /* GTLTasksTask.m */; }; + F40E736A138A03CA00EE3F02 /* GTLTasksTaskList.m in Sources */ = {isa = PBXBuildFile; fileRef = F47C37FE134B08EF00CCF631 /* GTLTasksTaskList.m */; }; + F40E736B138A03CA00EE3F02 /* GTLTasksTaskLists.m in Sources */ = {isa = PBXBuildFile; fileRef = F47C3800134B08EF00CCF631 /* GTLTasksTaskLists.m */; }; + F40E736C138A03CA00EE3F02 /* GTLTasksTasks.m in Sources */ = {isa = PBXBuildFile; fileRef = F47C3802134B08EF00CCF631 /* GTLTasksTasks.m */; }; + F45D6A4112F0B2140091E9D9 /* GTLObjectTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F45D6A4012F0B2140091E9D9 /* GTLObjectTest.m */; }; + F4CC6A111239450100522D45 /* GTLQueryTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F4CC6A101239450100522D45 /* GTLQueryTest.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4F1AD9040B71604300DC0485 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 089C1669FE841209C02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 4F38F6A50B66E91D00B24B81; + remoteInfo = GTLFramework; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 4F8DB6DC13FDC0240001DD6C /* Copy Static Library Headers */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = Headers; + dstSubfolderSpec = 16; + files = ( + 4F934E6C1512713000C4EA34 /* GTLBase64.h in Copy Static Library Headers */, + 4F8DB6DE13FDC0F50001DD6C /* GTLBatchQuery.h in Copy Static Library Headers */, + 4F8DB6DF13FDC0F50001DD6C /* GTLBatchResult.h in Copy Static Library Headers */, + 4F8DB6E013FDC0F50001DD6C /* GTLDateTime.h in Copy Static Library Headers */, + 4F8DB6E113FDC0F50001DD6C /* GTLDefines.h in Copy Static Library Headers */, + 4F8DB6E213FDC0F50001DD6C /* GTLErrorObject.h in Copy Static Library Headers */, + 4F8DB6E313FDC0F50001DD6C /* GTLFramework.h in Copy Static Library Headers */, + 4F8DB6E413FDC0F50001DD6C /* GTLJSONParser.h in Copy Static Library Headers */, + 4F8DB6E513FDC0F50001DD6C /* GTLObject.h in Copy Static Library Headers */, + 4F8DB6E613FDC0F50001DD6C /* GTLQuery.h in Copy Static Library Headers */, + 4F8DB6E713FDC0F50001DD6C /* GTLRuntimeCommon.h in Copy Static Library Headers */, + 4F8DB6E813FDC0F50001DD6C /* GTLService.h in Copy Static Library Headers */, + 4F8DB6E913FDC0F50001DD6C /* GTLTargetNamespace.h in Copy Static Library Headers */, + 4F8DB6EA13FDC0F50001DD6C /* GTLUploadParameters.h in Copy Static Library Headers */, + 4F8DB6EB13FDC0F50001DD6C /* GTLUtilities.h in Copy Static Library Headers */, + 4F8DB6EC13FDC0F50001DD6C /* GTMGatherInputStream.h in Copy Static Library Headers */, + 4F8DB6ED13FDC0F50001DD6C /* GTMHTTPFetcher.h in Copy Static Library Headers */, + 4F8DB6EE13FDC0F50001DD6C /* GTMHTTPFetcherLogging.h in Copy Static Library Headers */, + 4F8DB6EF13FDC0F50001DD6C /* GTMHTTPFetcherService.h in Copy Static Library Headers */, + 4F8DB6F013FDC0F50001DD6C /* GTMHTTPFetchHistory.h in Copy Static Library Headers */, + 4F8DB6F113FDC0F50001DD6C /* GTMHTTPUploadFetcher.h in Copy Static Library Headers */, + 4F8DB6F213FDC0F50001DD6C /* GTMMIMEDocument.h in Copy Static Library Headers */, + 4F8DB6F313FDC0F50001DD6C /* GTMOAuth2Authentication.h in Copy Static Library Headers */, + 4F8DB6F413FDC0F50001DD6C /* GTMOAuth2SignIn.h in Copy Static Library Headers */, + 4F8DB6F513FDC0F50001DD6C /* GTMOAuth2ViewControllerTouch.h in Copy Static Library Headers */, + 4F8DB6F613FDC0F50001DD6C /* GTMOAuth2WindowController.h in Copy Static Library Headers */, + 4F8DB6F713FDC0F50001DD6C /* GTMReadMonitorInputStream.h in Copy Static Library Headers */, + ); + name = "Copy Static Library Headers"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 4F0C4FBA13CFA7E5007E5E92 /* GTLUploadParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTLUploadParameters.h; path = Objects/GTLUploadParameters.h; sourceTree = ""; }; + 4F0C4FBB13CFA7E5007E5E92 /* GTLUploadParameters.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLUploadParameters.m; path = Objects/GTLUploadParameters.m; sourceTree = ""; }; + 4F12027C11A4CA2F00BEB470 /* libGTLTouchStaticLib.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libGTLTouchStaticLib.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 4F12027D11A4CA2F00BEB470 /* GTLUnitTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GTLUnitTests.octest; sourceTree = BUILT_PRODUCTS_DIR; }; + 4F14A9E60B1277290072EBB8 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; }; + 4F14B13A0B13A6150072EBB8 /* GTLUnitTests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; name = "GTLUnitTests-Info.plist"; path = "Resources/GTLUnitTests-Info.plist"; sourceTree = ""; }; + 4F164606137098C80096E878 /* Task1.request.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Task1.request.txt; path = Tests/Data/Task1.request.txt; sourceTree = ""; }; + 4F164607137098C80096E878 /* Task1.response.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Task1.response.txt; path = Tests/Data/Task1.response.txt; sourceTree = ""; }; + 4F1647691370C8F80096E878 /* TaskBatch1.request.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TaskBatch1.request.txt; path = Tests/Data/TaskBatch1.request.txt; sourceTree = ""; }; + 4F16476A1370C8F80096E878 /* TaskBatch1.response.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TaskBatch1.response.txt; path = Tests/Data/TaskBatch1.response.txt; sourceTree = ""; }; + 4F18174C1134982E009F7FD1 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = ""; }; + 4F1AD9020B71603F00DC0485 /* DevelopmentTestTool */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = DevelopmentTestTool; sourceTree = BUILT_PRODUCTS_DIR; }; + 4F1AD90C0B71607400DC0485 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Tests/main.m; sourceTree = ""; }; + 4F2449B3121F3E2A00FEE1DA /* GTMHTTPFetcherTestServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMHTTPFetcherTestServer.h; path = HTTPFetcher/Tests/GTMHTTPFetcherTestServer.h; sourceTree = ""; }; + 4F2449B4121F3E2A00FEE1DA /* GTMHTTPFetcherTestServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPFetcherTestServer.m; path = HTTPFetcher/Tests/GTMHTTPFetcherTestServer.m; sourceTree = ""; }; + 4F2449B5121F3E2A00FEE1DA /* GTMHTTPServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMHTTPServer.h; path = HTTPFetcher/Tests/GTMHTTPServer.h; sourceTree = ""; }; + 4F2449B6121F3E2A00FEE1DA /* GTMHTTPServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPServer.m; path = HTTPFetcher/Tests/GTMHTTPServer.m; sourceTree = ""; }; + 4F2E11F10BA778C900237907 /* DevTestTool-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; name = "DevTestTool-Info.plist"; path = "Resources/DevTestTool-Info.plist"; sourceTree = ""; }; + 4F2E11F20BA778D700237907 /* GTLFramework-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; name = "GTLFramework-Info.plist"; path = "Resources/GTLFramework-Info.plist"; sourceTree = ""; }; + 4F31A3D3142AA6BA00A58EAD /* TaskBatchPage1a.request.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TaskBatchPage1a.request.txt; path = Tests/Data/TaskBatchPage1a.request.txt; sourceTree = ""; }; + 4F31A3D4142AA6BA00A58EAD /* TaskBatchPage1a.response.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TaskBatchPage1a.response.txt; path = Tests/Data/TaskBatchPage1a.response.txt; sourceTree = ""; }; + 4F31A3D5142AA6BA00A58EAD /* TaskBatchPage1b.request.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TaskBatchPage1b.request.txt; path = Tests/Data/TaskBatchPage1b.request.txt; sourceTree = ""; }; + 4F31A3D6142AA6BA00A58EAD /* TaskBatchPage1b.response.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TaskBatchPage1b.response.txt; path = Tests/Data/TaskBatchPage1b.response.txt; sourceTree = ""; }; + 4F35B4B01385F9270082F64E /* Task1.rest.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Task1.rest.txt; path = Tests/Data/Task1.rest.txt; sourceTree = ""; }; + 4F35D4B3117787F600BDFA97 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = /System/Library/Frameworks/SystemConfiguration.framework; sourceTree = ""; }; + 4F38F6A60B66E91D00B24B81 /* GTL.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = GTL.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 4F3DE994119CCE49006926D1 /* GTLDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLDefines.h; sourceTree = ""; }; + 4F4DE9071371DD6F00F5C554 /* TaskError1.request.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TaskError1.request.txt; path = Tests/Data/TaskError1.request.txt; sourceTree = ""; }; + 4F4DE9081371DD6F00F5C554 /* TaskError1.response.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TaskError1.response.txt; path = Tests/Data/TaskError1.response.txt; sourceTree = ""; }; + 4F4DEB6B1372170300F5C554 /* TaskPage1a.request.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TaskPage1a.request.txt; path = Tests/Data/TaskPage1a.request.txt; sourceTree = ""; }; + 4F4DEB6C1372170300F5C554 /* TaskPage1a.response.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TaskPage1a.response.txt; path = Tests/Data/TaskPage1a.response.txt; sourceTree = ""; }; + 4F4DEB6D1372170300F5C554 /* TaskPage1b.request.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TaskPage1b.request.txt; path = Tests/Data/TaskPage1b.request.txt; sourceTree = ""; }; + 4F4DEB6E1372170300F5C554 /* TaskPage1b.response.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TaskPage1b.response.txt; path = Tests/Data/TaskPage1b.response.txt; sourceTree = ""; }; + 4F5A6FA914081D6200019FCD /* ReleaseNotes.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReleaseNotes.txt; sourceTree = ""; }; + 4F697FA3131C1A4100A5AB6A /* GTMOAuth2Authentication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMOAuth2Authentication.h; path = OAuth2/GTMOAuth2Authentication.h; sourceTree = ""; }; + 4F697FA4131C1A4100A5AB6A /* GTMOAuth2Authentication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMOAuth2Authentication.m; path = OAuth2/GTMOAuth2Authentication.m; sourceTree = ""; }; + 4F697FA5131C1A4100A5AB6A /* GTMOAuth2SignIn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMOAuth2SignIn.h; path = OAuth2/GTMOAuth2SignIn.h; sourceTree = ""; }; + 4F697FA6131C1A4100A5AB6A /* GTMOAuth2SignIn.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMOAuth2SignIn.m; path = OAuth2/GTMOAuth2SignIn.m; sourceTree = ""; }; + 4F697FB3131C1A5800A5AB6A /* GTMOAuth2Window.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = GTMOAuth2Window.xib; path = OAuth2/Mac/GTMOAuth2Window.xib; sourceTree = ""; }; + 4F697FB4131C1A5800A5AB6A /* GTMOAuth2WindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMOAuth2WindowController.h; path = OAuth2/Mac/GTMOAuth2WindowController.h; sourceTree = ""; }; + 4F697FB5131C1A5800A5AB6A /* GTMOAuth2WindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMOAuth2WindowController.m; path = OAuth2/Mac/GTMOAuth2WindowController.m; sourceTree = ""; }; + 4F697FBB131C1A6800A5AB6A /* GTMOAuth2ViewControllerTouch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMOAuth2ViewControllerTouch.h; path = OAuth2/Touch/GTMOAuth2ViewControllerTouch.h; sourceTree = ""; }; + 4F697FBC131C1A6800A5AB6A /* GTMOAuth2ViewControllerTouch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMOAuth2ViewControllerTouch.m; path = OAuth2/Touch/GTMOAuth2ViewControllerTouch.m; sourceTree = ""; }; + 4F697FBD131C1A6800A5AB6A /* GTMOAuth2ViewTouch.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = GTMOAuth2ViewTouch.xib; path = OAuth2/Touch/GTMOAuth2ViewTouch.xib; sourceTree = ""; }; + 4F69804B131C1F1D00A5AB6A /* GTMGatherInputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMGatherInputStream.h; path = HTTPFetcher/GTMGatherInputStream.h; sourceTree = ""; }; + 4F69804C131C1F1D00A5AB6A /* GTMGatherInputStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMGatherInputStream.m; path = HTTPFetcher/GTMGatherInputStream.m; sourceTree = ""; }; + 4F69804D131C1F1D00A5AB6A /* GTMHTTPFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMHTTPFetcher.h; path = HTTPFetcher/GTMHTTPFetcher.h; sourceTree = ""; }; + 4F69804E131C1F1D00A5AB6A /* GTMHTTPFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPFetcher.m; path = HTTPFetcher/GTMHTTPFetcher.m; sourceTree = ""; }; + 4F69804F131C1F1D00A5AB6A /* GTMHTTPFetcherLogging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMHTTPFetcherLogging.h; path = HTTPFetcher/GTMHTTPFetcherLogging.h; sourceTree = ""; }; + 4F698050131C1F1D00A5AB6A /* GTMHTTPFetcherLogging.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPFetcherLogging.m; path = HTTPFetcher/GTMHTTPFetcherLogging.m; sourceTree = ""; }; + 4F698051131C1F1D00A5AB6A /* GTMHTTPFetcherService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMHTTPFetcherService.h; path = HTTPFetcher/GTMHTTPFetcherService.h; sourceTree = ""; }; + 4F698053131C1F1D00A5AB6A /* GTMHTTPFetchHistory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMHTTPFetchHistory.h; path = HTTPFetcher/GTMHTTPFetchHistory.h; sourceTree = ""; }; + 4F698054131C1F1D00A5AB6A /* GTMHTTPFetchHistory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPFetchHistory.m; path = HTTPFetcher/GTMHTTPFetchHistory.m; sourceTree = ""; }; + 4F698055131C1F1D00A5AB6A /* GTMHTTPUploadFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMHTTPUploadFetcher.h; path = HTTPFetcher/GTMHTTPUploadFetcher.h; sourceTree = ""; }; + 4F698056131C1F1D00A5AB6A /* GTMHTTPUploadFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPUploadFetcher.m; path = HTTPFetcher/GTMHTTPUploadFetcher.m; sourceTree = ""; }; + 4F698057131C1F1D00A5AB6A /* GTMMIMEDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMMIMEDocument.h; path = HTTPFetcher/GTMMIMEDocument.h; sourceTree = ""; }; + 4F698058131C1F1D00A5AB6A /* GTMMIMEDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMMIMEDocument.m; path = HTTPFetcher/GTMMIMEDocument.m; sourceTree = ""; }; + 4F69808E131C20DA00A5AB6A /* GTMHTTPFetcherService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPFetcherService.m; path = HTTPFetcher/GTMHTTPFetcherService.m; sourceTree = ""; }; + 4F76C06D13B1208F009154C6 /* TaskPage1c.request.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TaskPage1c.request.txt; path = Tests/Data/TaskPage1c.request.txt; sourceTree = ""; }; + 4F76C06E13B1208F009154C6 /* TaskPage1c.response.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TaskPage1c.response.txt; path = Tests/Data/TaskPage1c.response.txt; sourceTree = ""; }; + 4F76C06F13B1208F009154C6 /* TaskPage1d.request.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TaskPage1d.request.txt; path = Tests/Data/TaskPage1d.request.txt; sourceTree = ""; }; + 4F76C07013B1208F009154C6 /* TaskPage1d.response.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TaskPage1d.response.txt; path = Tests/Data/TaskPage1d.response.txt; sourceTree = ""; }; + 4F8DB61713FDAC160001DD6C /* GTMReadMonitorInputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMReadMonitorInputStream.h; path = HTTPFetcher/GTMReadMonitorInputStream.h; sourceTree = SOURCE_ROOT; }; + 4F8DB61813FDAC160001DD6C /* GTMReadMonitorInputStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMReadMonitorInputStream.m; path = HTTPFetcher/GTMReadMonitorInputStream.m; sourceTree = SOURCE_ROOT; }; + 4F934E651512712100C4EA34 /* GTLBase64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTLBase64.h; path = Utilities/GTLBase64.h; sourceTree = ""; }; + 4F934E661512712100C4EA34 /* GTLBase64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLBase64.m; path = Utilities/GTLBase64.m; sourceTree = ""; }; + 4F934F50151286FE00C4EA34 /* GTLBase64Test.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLBase64Test.m; path = Tests/GTLBase64Test.m; sourceTree = ""; }; + 4F9F7E3811F5103B0033A2C1 /* GTLDateTimeTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLDateTimeTest.m; path = Tests/GTLDateTimeTest.m; sourceTree = ""; }; + 4F9F7E3A11F510430033A2C1 /* GTLFrameworkTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLFrameworkTest.m; path = Tests/GTLFrameworkTest.m; sourceTree = ""; }; + 4F9F7E3B11F510430033A2C1 /* GTLUtilitiesTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLUtilitiesTest.m; path = Tests/GTLUtilitiesTest.m; sourceTree = ""; }; + 4FCC7A1C11EFD9EA0097924C /* GTLServiceTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLServiceTest.m; path = Tests/GTLServiceTest.m; sourceTree = ""; }; + 4FDE223213848173005AEFAA /* GTLFramework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTLFramework.h; path = Utilities/GTLFramework.h; sourceTree = ""; }; + 4FDE223313848173005AEFAA /* GTLFramework.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLFramework.m; path = Utilities/GTLFramework.m; sourceTree = ""; }; + 4FDE223413848173005AEFAA /* GTLJSONParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTLJSONParser.h; path = Utilities/GTLJSONParser.h; sourceTree = ""; }; + 4FDE223513848173005AEFAA /* GTLJSONParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLJSONParser.m; path = Utilities/GTLJSONParser.m; sourceTree = ""; }; + 4FDE223613848173005AEFAA /* GTLTargetNamespace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTLTargetNamespace.h; path = Utilities/GTLTargetNamespace.h; sourceTree = ""; }; + 4FDE223713848173005AEFAA /* GTLUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTLUtilities.h; path = Utilities/GTLUtilities.h; sourceTree = ""; }; + 4FDE223813848173005AEFAA /* GTLUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLUtilities.m; path = Utilities/GTLUtilities.m; sourceTree = ""; }; + 4FDE22491384818E005AEFAA /* GTLBatchQuery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTLBatchQuery.h; path = Objects/GTLBatchQuery.h; sourceTree = ""; }; + 4FDE224A1384818E005AEFAA /* GTLBatchQuery.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLBatchQuery.m; path = Objects/GTLBatchQuery.m; sourceTree = ""; }; + 4FDE224B1384818E005AEFAA /* GTLBatchResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTLBatchResult.h; path = Objects/GTLBatchResult.h; sourceTree = ""; }; + 4FDE224C1384818E005AEFAA /* GTLBatchResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLBatchResult.m; path = Objects/GTLBatchResult.m; sourceTree = ""; }; + 4FDE224D1384818E005AEFAA /* GTLDateTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTLDateTime.h; path = Objects/GTLDateTime.h; sourceTree = ""; }; + 4FDE224E1384818E005AEFAA /* GTLDateTime.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLDateTime.m; path = Objects/GTLDateTime.m; sourceTree = ""; }; + 4FDE224F1384818E005AEFAA /* GTLErrorObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTLErrorObject.h; path = Objects/GTLErrorObject.h; sourceTree = ""; }; + 4FDE22501384818E005AEFAA /* GTLErrorObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLErrorObject.m; path = Objects/GTLErrorObject.m; sourceTree = ""; }; + 4FDE22511384818E005AEFAA /* GTLObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTLObject.h; path = Objects/GTLObject.h; sourceTree = ""; }; + 4FDE22521384818E005AEFAA /* GTLObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLObject.m; path = Objects/GTLObject.m; sourceTree = ""; }; + 4FDE22531384818E005AEFAA /* GTLQuery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTLQuery.h; path = Objects/GTLQuery.h; sourceTree = ""; }; + 4FDE22541384818E005AEFAA /* GTLQuery.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLQuery.m; path = Objects/GTLQuery.m; sourceTree = ""; }; + 4FDE22551384818E005AEFAA /* GTLRuntimeCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTLRuntimeCommon.h; path = Objects/GTLRuntimeCommon.h; sourceTree = ""; }; + 4FDE22561384818E005AEFAA /* GTLRuntimeCommon.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLRuntimeCommon.m; path = Objects/GTLRuntimeCommon.m; sourceTree = ""; }; + 4FDE22571384818E005AEFAA /* GTLService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTLService.h; path = Objects/GTLService.h; sourceTree = ""; }; + 4FDE22581384818E005AEFAA /* GTLService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLService.m; path = Objects/GTLService.m; sourceTree = ""; }; + F407F0FE136F948A005A4866 /* GTLTasksConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTLTasksConstants.h; path = Generated/GTLTasksConstants.h; sourceTree = ""; }; + F407F0FF136F948A005A4866 /* GTLTasksConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLTasksConstants.m; path = Generated/GTLTasksConstants.m; sourceTree = ""; }; + F45D6A4012F0B2140091E9D9 /* GTLObjectTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLObjectTest.m; path = Tests/GTLObjectTest.m; sourceTree = ""; }; + F47C37F6134B08EF00CCF631 /* GTLQueryTasks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTLQueryTasks.h; path = Generated/GTLQueryTasks.h; sourceTree = ""; }; + F47C37F7134B08EF00CCF631 /* GTLQueryTasks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLQueryTasks.m; path = Generated/GTLQueryTasks.m; sourceTree = ""; }; + F47C37F8134B08EF00CCF631 /* GTLServiceTasks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTLServiceTasks.h; path = Generated/GTLServiceTasks.h; sourceTree = ""; }; + F47C37F9134B08EF00CCF631 /* GTLServiceTasks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLServiceTasks.m; path = Generated/GTLServiceTasks.m; sourceTree = ""; }; + F47C37FA134B08EF00CCF631 /* GTLTasks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTLTasks.h; path = Generated/GTLTasks.h; sourceTree = ""; }; + F47C37FB134B08EF00CCF631 /* GTLTasksTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTLTasksTask.h; path = Generated/GTLTasksTask.h; sourceTree = ""; }; + F47C37FC134B08EF00CCF631 /* GTLTasksTask.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLTasksTask.m; path = Generated/GTLTasksTask.m; sourceTree = ""; }; + F47C37FD134B08EF00CCF631 /* GTLTasksTaskList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTLTasksTaskList.h; path = Generated/GTLTasksTaskList.h; sourceTree = ""; }; + F47C37FE134B08EF00CCF631 /* GTLTasksTaskList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLTasksTaskList.m; path = Generated/GTLTasksTaskList.m; sourceTree = ""; }; + F47C37FF134B08EF00CCF631 /* GTLTasksTaskLists.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTLTasksTaskLists.h; path = Generated/GTLTasksTaskLists.h; sourceTree = ""; }; + F47C3800134B08EF00CCF631 /* GTLTasksTaskLists.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLTasksTaskLists.m; path = Generated/GTLTasksTaskLists.m; sourceTree = ""; }; + F47C3801134B08EF00CCF631 /* GTLTasksTasks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTLTasksTasks.h; path = Generated/GTLTasksTasks.h; sourceTree = ""; }; + F47C3802134B08EF00CCF631 /* GTLTasksTasks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLTasksTasks.m; path = Generated/GTLTasksTasks.m; sourceTree = ""; }; + F4CC6A101239450100522D45 /* GTLQueryTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTLQueryTest.m; path = Tests/GTLQueryTest.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 4F14A9DA0B1276B70072EBB8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F14A9E70B1277290072EBB8 /* SenTestingKit.framework in Frameworks */, + 4F18174E1134982E009F7FD1 /* Security.framework in Frameworks */, + 4F35D4C71177880300BDFA97 /* SystemConfiguration.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4F1AD9000B71603F00DC0485 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F1ADAB10B7168F300DC0485 /* Cocoa.framework in Frameworks */, + 4F1817511134982E009F7FD1 /* Security.framework in Frameworks */, + 4F35D4C91177880500BDFA97 /* SystemConfiguration.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4F1C6E0D1027B3CE00B46459 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4F38F6A40B66E91D00B24B81 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F18174F1134982E009F7FD1 /* Security.framework in Frameworks */, + 4F35D4B4117787F600BDFA97 /* SystemConfiguration.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 089C166AFE841209C02AAC07 /* GoogleBundle */ = { + isa = PBXGroup; + children = ( + 32C88E010371C26100C91783 /* GTL Source */, + 4FCC7A1B11EFD9C80097924C /* Tests */, + 4FA9C7410B72AB1600DA5920 /* Test Tool */, + 089C167CFE841241C02AAC07 /* Resources */, + 089C1671FE841209C02AAC07 /* Frameworks and Libraries */, + 19C28FB8FE9D52D311CA2CBB /* Products */, + 4F5A6FA914081D6200019FCD /* ReleaseNotes.txt */, + ); + name = GoogleBundle; + sourceTree = ""; + }; + 089C1671FE841209C02AAC07 /* Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + 1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */, + ); + name = "Frameworks and Libraries"; + sourceTree = ""; + }; + 089C167CFE841241C02AAC07 /* Resources */ = { + isa = PBXGroup; + children = ( + 4F2E11F20BA778D700237907 /* GTLFramework-Info.plist */, + 4F14B13A0B13A6150072EBB8 /* GTLUnitTests-Info.plist */, + 4F2E11F10BA778C900237907 /* DevTestTool-Info.plist */, + ); + name = Resources; + sourceTree = ""; + }; + 1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 4F35D4B3117787F600BDFA97 /* SystemConfiguration.framework */, + 4F18174C1134982E009F7FD1 /* Security.framework */, + 4F14A9E60B1277290072EBB8 /* SenTestingKit.framework */, + 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 19C28FB8FE9D52D311CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 4F38F6A60B66E91D00B24B81 /* GTL.framework */, + 4F1AD9020B71603F00DC0485 /* DevelopmentTestTool */, + 4F12027C11A4CA2F00BEB470 /* libGTLTouchStaticLib.a */, + 4F12027D11A4CA2F00BEB470 /* GTLUnitTests.octest */, + ); + name = Products; + sourceTree = ""; + }; + 32C88E010371C26100C91783 /* GTL Source */ = { + isa = PBXGroup; + children = ( + 4F346DD20D7500C9006033E0 /* Common */, + ); + name = "GTL Source"; + sourceTree = ""; + }; + 4F244248121E0A8D00FEE1DA /* Touch */ = { + isa = PBXGroup; + children = ( + 4F697FBB131C1A6800A5AB6A /* GTMOAuth2ViewControllerTouch.h */, + 4F697FBC131C1A6800A5AB6A /* GTMOAuth2ViewControllerTouch.m */, + 4F697FBD131C1A6800A5AB6A /* GTMOAuth2ViewTouch.xib */, + ); + name = Touch; + sourceTree = ""; + }; + 4F244249121E0A9500FEE1DA /* Mac */ = { + isa = PBXGroup; + children = ( + 4F697FB3131C1A5800A5AB6A /* GTMOAuth2Window.xib */, + 4F697FB4131C1A5800A5AB6A /* GTMOAuth2WindowController.h */, + 4F697FB5131C1A5800A5AB6A /* GTMOAuth2WindowController.m */, + ); + name = Mac; + sourceTree = ""; + }; + 4F346DD20D7500C9006033E0 /* Common */ = { + isa = PBXGroup; + children = ( + 4F3DE994119CCE49006926D1 /* GTLDefines.h */, + 4F5CC88E1381EC7300D1D4CF /* Objects */, + 4F5CC88F1381EC7F00D1D4CF /* Utilities */, + 4FB730D70BE27A92000C493E /* HTTPFetcher */, + 4FDE39371134948400700DC8 /* OAuth2 */, + ); + name = Common; + sourceTree = ""; + }; + 4F5CC88E1381EC7300D1D4CF /* Objects */ = { + isa = PBXGroup; + children = ( + 4FDE22511384818E005AEFAA /* GTLObject.h */, + 4FDE22521384818E005AEFAA /* GTLObject.m */, + 4FDE22531384818E005AEFAA /* GTLQuery.h */, + 4FDE22541384818E005AEFAA /* GTLQuery.m */, + 4FDE22491384818E005AEFAA /* GTLBatchQuery.h */, + 4FDE224A1384818E005AEFAA /* GTLBatchQuery.m */, + 4FDE22571384818E005AEFAA /* GTLService.h */, + 4FDE22581384818E005AEFAA /* GTLService.m */, + 4FDE224B1384818E005AEFAA /* GTLBatchResult.h */, + 4FDE224C1384818E005AEFAA /* GTLBatchResult.m */, + 4F0C4FBA13CFA7E5007E5E92 /* GTLUploadParameters.h */, + 4F0C4FBB13CFA7E5007E5E92 /* GTLUploadParameters.m */, + 4FDE224D1384818E005AEFAA /* GTLDateTime.h */, + 4FDE224E1384818E005AEFAA /* GTLDateTime.m */, + 4FDE224F1384818E005AEFAA /* GTLErrorObject.h */, + 4FDE22501384818E005AEFAA /* GTLErrorObject.m */, + 4FDE22551384818E005AEFAA /* GTLRuntimeCommon.h */, + 4FDE22561384818E005AEFAA /* GTLRuntimeCommon.m */, + ); + name = Objects; + sourceTree = ""; + }; + 4F5CC88F1381EC7F00D1D4CF /* Utilities */ = { + isa = PBXGroup; + children = ( + 4FDE223213848173005AEFAA /* GTLFramework.h */, + 4FDE223313848173005AEFAA /* GTLFramework.m */, + 4FDE223413848173005AEFAA /* GTLJSONParser.h */, + 4FDE223513848173005AEFAA /* GTLJSONParser.m */, + 4FDE223613848173005AEFAA /* GTLTargetNamespace.h */, + 4FDE223713848173005AEFAA /* GTLUtilities.h */, + 4FDE223813848173005AEFAA /* GTLUtilities.m */, + 4F934E651512712100C4EA34 /* GTLBase64.h */, + 4F934E661512712100C4EA34 /* GTLBase64.m */, + ); + name = Utilities; + sourceTree = ""; + }; + 4F5CC8921381ED1F00D1D4CF /* Services */ = { + isa = PBXGroup; + children = ( + F47C37F5134B08C500CCF631 /* Tasks */, + ); + name = Services; + sourceTree = ""; + }; + 4FA9C7410B72AB1600DA5920 /* Test Tool */ = { + isa = PBXGroup; + children = ( + 4F1AD90C0B71607400DC0485 /* main.m */, + ); + name = "Test Tool"; + sourceTree = ""; + }; + 4FB730D70BE27A92000C493E /* HTTPFetcher */ = { + isa = PBXGroup; + children = ( + 4F698051131C1F1D00A5AB6A /* GTMHTTPFetcherService.h */, + 4F69808E131C20DA00A5AB6A /* GTMHTTPFetcherService.m */, + 4F69804D131C1F1D00A5AB6A /* GTMHTTPFetcher.h */, + 4F69804E131C1F1D00A5AB6A /* GTMHTTPFetcher.m */, + 4F69804F131C1F1D00A5AB6A /* GTMHTTPFetcherLogging.h */, + 4F698050131C1F1D00A5AB6A /* GTMHTTPFetcherLogging.m */, + 4F698053131C1F1D00A5AB6A /* GTMHTTPFetchHistory.h */, + 4F698054131C1F1D00A5AB6A /* GTMHTTPFetchHistory.m */, + 4F698055131C1F1D00A5AB6A /* GTMHTTPUploadFetcher.h */, + 4F698056131C1F1D00A5AB6A /* GTMHTTPUploadFetcher.m */, + 4F69804B131C1F1D00A5AB6A /* GTMGatherInputStream.h */, + 4F69804C131C1F1D00A5AB6A /* GTMGatherInputStream.m */, + 4F698057131C1F1D00A5AB6A /* GTMMIMEDocument.h */, + 4F698058131C1F1D00A5AB6A /* GTMMIMEDocument.m */, + 4F8DB61713FDAC160001DD6C /* GTMReadMonitorInputStream.h */, + 4F8DB61813FDAC160001DD6C /* GTMReadMonitorInputStream.m */, + ); + name = HTTPFetcher; + sourceTree = ""; + }; + 4FCC7A1B11EFD9C80097924C /* Tests */ = { + isa = PBXGroup; + children = ( + 4F9F7E3811F5103B0033A2C1 /* GTLDateTimeTest.m */, + 4F9F7E3A11F510430033A2C1 /* GTLFrameworkTest.m */, + F45D6A4012F0B2140091E9D9 /* GTLObjectTest.m */, + F4CC6A101239450100522D45 /* GTLQueryTest.m */, + 4FCC7A1C11EFD9EA0097924C /* GTLServiceTest.m */, + 4F9F7E3B11F510430033A2C1 /* GTLUtilitiesTest.m */, + 4F934F50151286FE00C4EA34 /* GTLBase64Test.m */, + 4F5CC8921381ED1F00D1D4CF /* Services */, + 4FCC7A3E11EFDB7E0097924C /* Data */, + 4FCC7A2211EFDA090097924C /* Server */, + ); + name = Tests; + sourceTree = ""; + }; + 4FCC7A2211EFDA090097924C /* Server */ = { + isa = PBXGroup; + children = ( + 4F2449B3121F3E2A00FEE1DA /* GTMHTTPFetcherTestServer.h */, + 4F2449B4121F3E2A00FEE1DA /* GTMHTTPFetcherTestServer.m */, + 4F2449B5121F3E2A00FEE1DA /* GTMHTTPServer.h */, + 4F2449B6121F3E2A00FEE1DA /* GTMHTTPServer.m */, + ); + name = Server; + sourceTree = ""; + }; + 4FCC7A3E11EFDB7E0097924C /* Data */ = { + isa = PBXGroup; + children = ( + 4F35B4B01385F9270082F64E /* Task1.rest.txt */, + 4F164606137098C80096E878 /* Task1.request.txt */, + 4F164607137098C80096E878 /* Task1.response.txt */, + 4F4DE9071371DD6F00F5C554 /* TaskError1.request.txt */, + 4F4DE9081371DD6F00F5C554 /* TaskError1.response.txt */, + 4F4DEB6B1372170300F5C554 /* TaskPage1a.request.txt */, + 4F4DEB6C1372170300F5C554 /* TaskPage1a.response.txt */, + 4F4DEB6D1372170300F5C554 /* TaskPage1b.request.txt */, + 4F4DEB6E1372170300F5C554 /* TaskPage1b.response.txt */, + 4F76C06D13B1208F009154C6 /* TaskPage1c.request.txt */, + 4F76C06E13B1208F009154C6 /* TaskPage1c.response.txt */, + 4F76C06F13B1208F009154C6 /* TaskPage1d.request.txt */, + 4F76C07013B1208F009154C6 /* TaskPage1d.response.txt */, + 4F1647691370C8F80096E878 /* TaskBatch1.request.txt */, + 4F16476A1370C8F80096E878 /* TaskBatch1.response.txt */, + 4F31A3D3142AA6BA00A58EAD /* TaskBatchPage1a.request.txt */, + 4F31A3D4142AA6BA00A58EAD /* TaskBatchPage1a.response.txt */, + 4F31A3D5142AA6BA00A58EAD /* TaskBatchPage1b.request.txt */, + 4F31A3D6142AA6BA00A58EAD /* TaskBatchPage1b.response.txt */, + ); + name = Data; + sourceTree = ""; + }; + 4FDE39371134948400700DC8 /* OAuth2 */ = { + isa = PBXGroup; + children = ( + 4F697FA3131C1A4100A5AB6A /* GTMOAuth2Authentication.h */, + 4F697FA4131C1A4100A5AB6A /* GTMOAuth2Authentication.m */, + 4F697FA5131C1A4100A5AB6A /* GTMOAuth2SignIn.h */, + 4F697FA6131C1A4100A5AB6A /* GTMOAuth2SignIn.m */, + 4F244249121E0A9500FEE1DA /* Mac */, + 4F244248121E0A8D00FEE1DA /* Touch */, + ); + name = OAuth2; + sourceTree = ""; + }; + F47C37F5134B08C500CCF631 /* Tasks */ = { + isa = PBXGroup; + children = ( + F47C37F6134B08EF00CCF631 /* GTLQueryTasks.h */, + F47C37F7134B08EF00CCF631 /* GTLQueryTasks.m */, + F47C37F8134B08EF00CCF631 /* GTLServiceTasks.h */, + F47C37F9134B08EF00CCF631 /* GTLServiceTasks.m */, + F47C37FA134B08EF00CCF631 /* GTLTasks.h */, + F407F0FE136F948A005A4866 /* GTLTasksConstants.h */, + F407F0FF136F948A005A4866 /* GTLTasksConstants.m */, + F47C37FB134B08EF00CCF631 /* GTLTasksTask.h */, + F47C37FC134B08EF00CCF631 /* GTLTasksTask.m */, + F47C37FD134B08EF00CCF631 /* GTLTasksTaskList.h */, + F47C37FE134B08EF00CCF631 /* GTLTasksTaskList.m */, + F47C37FF134B08EF00CCF631 /* GTLTasksTaskLists.h */, + F47C3800134B08EF00CCF631 /* GTLTasksTaskLists.m */, + F47C3801134B08EF00CCF631 /* GTLTasksTasks.h */, + F47C3802134B08EF00CCF631 /* GTLTasksTasks.m */, + ); + name = Tasks; + path = Services/Tasks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 4F38F6A10B66E91D00B24B81 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F3DE995119CCE49006926D1 /* GTLDefines.h in Headers */, + 4F697FA7131C1A4100A5AB6A /* GTMOAuth2Authentication.h in Headers */, + 4F697FA9131C1A4100A5AB6A /* GTMOAuth2SignIn.h in Headers */, + 4F697FB7131C1A5800A5AB6A /* GTMOAuth2WindowController.h in Headers */, + 4F698060131C1F1D00A5AB6A /* GTMGatherInputStream.h in Headers */, + 4F698062131C1F1D00A5AB6A /* GTMHTTPFetcher.h in Headers */, + 4F698064131C1F1D00A5AB6A /* GTMHTTPFetcherLogging.h in Headers */, + 4F698066131C1F1D00A5AB6A /* GTMHTTPFetcherService.h in Headers */, + 4F698068131C1F1D00A5AB6A /* GTMHTTPFetchHistory.h in Headers */, + 4F69806A131C1F1D00A5AB6A /* GTMHTTPUploadFetcher.h in Headers */, + 4F69806C131C1F1D00A5AB6A /* GTMMIMEDocument.h in Headers */, + 4FDE223C13848173005AEFAA /* GTLFramework.h in Headers */, + 4FDE223E13848173005AEFAA /* GTLJSONParser.h in Headers */, + 4FDE224013848173005AEFAA /* GTLTargetNamespace.h in Headers */, + 4FDE224113848173005AEFAA /* GTLUtilities.h in Headers */, + 4FDE22611384818E005AEFAA /* GTLBatchQuery.h in Headers */, + 4FDE22631384818E005AEFAA /* GTLBatchResult.h in Headers */, + 4FDE22651384818E005AEFAA /* GTLDateTime.h in Headers */, + 4FDE22671384818E005AEFAA /* GTLErrorObject.h in Headers */, + 4FDE22691384818E005AEFAA /* GTLObject.h in Headers */, + 4FDE226B1384818E005AEFAA /* GTLQuery.h in Headers */, + 4FDE226D1384818E005AEFAA /* GTLRuntimeCommon.h in Headers */, + 4FDE226F1384818E005AEFAA /* GTLService.h in Headers */, + 4F0C4FBC13CFA7E5007E5E92 /* GTLUploadParameters.h in Headers */, + 4F8DB61913FDAC160001DD6C /* GTMReadMonitorInputStream.h in Headers */, + 4F934E671512712100C4EA34 /* GTLBase64.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 4F14A9DC0B1276B70072EBB8 /* GTLUnitTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4F14A9DF0B1276B70072EBB8 /* Build configuration list for PBXNativeTarget "GTLUnitTests" */; + buildPhases = ( + 4F14A9D80B1276B70072EBB8 /* Resources */, + 4F14A9D90B1276B70072EBB8 /* Sources */, + 4F14A9DA0B1276B70072EBB8 /* Frameworks */, + 4F14A9DB0B1276B70072EBB8 /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = GTLUnitTests; + productName = GTLUnitTests; + productReference = 4F12027D11A4CA2F00BEB470 /* GTLUnitTests.octest */; + productType = "com.apple.product-type.bundle"; + }; + 4F1AD9010B71603F00DC0485 /* DevelopmentTestTool */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4F1AD9080B71606100DC0485 /* Build configuration list for PBXNativeTarget "DevelopmentTestTool" */; + buildPhases = ( + 4F1AD8FF0B71603F00DC0485 /* Sources */, + 4F1AD9000B71603F00DC0485 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 4F1AD9050B71604300DC0485 /* PBXTargetDependency */, + ); + name = DevelopmentTestTool; + productName = DevelopmentTestTool; + productReference = 4F1AD9020B71603F00DC0485 /* DevelopmentTestTool */; + productType = "com.apple.product-type.tool"; + }; + 4F1C6E0E1027B3CE00B46459 /* GTLTouchStaticLib */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4F1C6E121027B3ED00B46459 /* Build configuration list for PBXNativeTarget "GTLTouchStaticLib" */; + buildPhases = ( + 4F8DB6DC13FDC0240001DD6C /* Copy Static Library Headers */, + 4F1C6E0C1027B3CE00B46459 /* Sources */, + 4F1C6E0D1027B3CE00B46459 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = GTLTouchStaticLib; + productName = GTLTouchStaticLib; + productReference = 4F12027C11A4CA2F00BEB470 /* libGTLTouchStaticLib.a */; + productType = "com.apple.product-type.library.static"; + }; + 4F38F6A50B66E91D00B24B81 /* GTLFramework */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4F38F7110B66EF2C00B24B81 /* Build configuration list for PBXNativeTarget "GTLFramework" */; + buildPhases = ( + 4F38F6A10B66E91D00B24B81 /* Headers */, + 4F38F6A20B66E91D00B24B81 /* Resources */, + 4F38F6A30B66E91D00B24B81 /* Sources */, + 4F38F6A40B66E91D00B24B81 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = GTLFramework; + productName = GTLFramework; + productReference = 4F38F6A60B66E91D00B24B81 /* GTL.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 089C1669FE841209C02AAC07 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0440; + }; + buildConfigurationList = 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "GTL" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 089C166AFE841209C02AAC07 /* GoogleBundle */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 4F38F6A50B66E91D00B24B81 /* GTLFramework */, + 4F1C6E0E1027B3CE00B46459 /* GTLTouchStaticLib */, + 4F14A9DC0B1276B70072EBB8 /* GTLUnitTests */, + 4F1AD9010B71603F00DC0485 /* DevelopmentTestTool */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 4F14A9D80B1276B70072EBB8 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F164608137098C80096E878 /* Task1.request.txt in Resources */, + 4F164609137098C80096E878 /* Task1.response.txt in Resources */, + 4F16476B1370C8F80096E878 /* TaskBatch1.request.txt in Resources */, + 4F16476C1370C8F80096E878 /* TaskBatch1.response.txt in Resources */, + 4F4DE9091371DD6F00F5C554 /* TaskError1.request.txt in Resources */, + 4F4DE90A1371DD6F00F5C554 /* TaskError1.response.txt in Resources */, + 4F4DEB6F1372170300F5C554 /* TaskPage1a.request.txt in Resources */, + 4F4DEB701372170300F5C554 /* TaskPage1a.response.txt in Resources */, + 4F4DEB711372170300F5C554 /* TaskPage1b.request.txt in Resources */, + 4F4DEB721372170300F5C554 /* TaskPage1b.response.txt in Resources */, + 4F76C07613B120A6009154C6 /* TaskPage1c.request.txt in Resources */, + 4F76C07713B120A6009154C6 /* TaskPage1c.response.txt in Resources */, + 4F76C07813B120A6009154C6 /* TaskPage1d.request.txt in Resources */, + 4F76C07913B120A6009154C6 /* TaskPage1d.response.txt in Resources */, + 4F35B4B11385F9270082F64E /* Task1.rest.txt in Resources */, + 4F31A3D7142AA6BA00A58EAD /* TaskBatchPage1a.request.txt in Resources */, + 4F31A3D8142AA6BA00A58EAD /* TaskBatchPage1a.response.txt in Resources */, + 4F31A3D9142AA6BA00A58EAD /* TaskBatchPage1b.request.txt in Resources */, + 4F31A3DA142AA6BA00A58EAD /* TaskBatchPage1b.response.txt in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4F38F6A20B66E91D00B24B81 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F697FB6131C1A5800A5AB6A /* GTMOAuth2Window.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4F14A9DB0B1276B70072EBB8 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 4F14A9D90B1276B70072EBB8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4FCC7A1D11EFD9EA0097924C /* GTLServiceTest.m in Sources */, + 4F9F7E3911F5103B0033A2C1 /* GTLDateTimeTest.m in Sources */, + 4F9F7E3C11F510430033A2C1 /* GTLFrameworkTest.m in Sources */, + 4F9F7E3D11F510430033A2C1 /* GTLUtilitiesTest.m in Sources */, + 4F2449B7121F3E2A00FEE1DA /* GTMHTTPFetcherTestServer.m in Sources */, + 4F2449B8121F3E2A00FEE1DA /* GTMHTTPServer.m in Sources */, + F4CC6A111239450100522D45 /* GTLQueryTest.m in Sources */, + F45D6A4112F0B2140091E9D9 /* GTLObjectTest.m in Sources */, + 4F697FAD131C1A4100A5AB6A /* GTMOAuth2Authentication.m in Sources */, + 4F697FAE131C1A4100A5AB6A /* GTMOAuth2SignIn.m in Sources */, + 4F69806E131C1F1D00A5AB6A /* GTMGatherInputStream.m in Sources */, + 4F69806F131C1F1D00A5AB6A /* GTMHTTPFetcher.m in Sources */, + 4F698070131C1F1D00A5AB6A /* GTMHTTPFetcherLogging.m in Sources */, + 4F698072131C1F1D00A5AB6A /* GTMHTTPFetchHistory.m in Sources */, + 4F698073131C1F1D00A5AB6A /* GTMHTTPUploadFetcher.m in Sources */, + 4F698074131C1F1D00A5AB6A /* GTMMIMEDocument.m in Sources */, + 4F698091131C20DA00A5AB6A /* GTMHTTPFetcherService.m in Sources */, + 4FDE223913848173005AEFAA /* GTLFramework.m in Sources */, + 4FDE223A13848173005AEFAA /* GTLJSONParser.m in Sources */, + 4FDE223B13848173005AEFAA /* GTLUtilities.m in Sources */, + 4FDE22591384818E005AEFAA /* GTLBatchQuery.m in Sources */, + 4FDE225A1384818E005AEFAA /* GTLBatchResult.m in Sources */, + 4FDE225B1384818E005AEFAA /* GTLDateTime.m in Sources */, + 4FDE225C1384818E005AEFAA /* GTLErrorObject.m in Sources */, + 4FDE225D1384818E005AEFAA /* GTLObject.m in Sources */, + 4FDE225E1384818E005AEFAA /* GTLQuery.m in Sources */, + 4FDE225F1384818E005AEFAA /* GTLRuntimeCommon.m in Sources */, + 4FDE22601384818E005AEFAA /* GTLService.m in Sources */, + F40E7366138A03CA00EE3F02 /* GTLQueryTasks.m in Sources */, + F40E7367138A03CA00EE3F02 /* GTLServiceTasks.m in Sources */, + F40E7368138A03CA00EE3F02 /* GTLTasksConstants.m in Sources */, + F40E7369138A03CA00EE3F02 /* GTLTasksTask.m in Sources */, + F40E736A138A03CA00EE3F02 /* GTLTasksTaskList.m in Sources */, + F40E736B138A03CA00EE3F02 /* GTLTasksTaskLists.m in Sources */, + F40E736C138A03CA00EE3F02 /* GTLTasksTasks.m in Sources */, + 4F0C4FBF13CFA7E5007E5E92 /* GTLUploadParameters.m in Sources */, + 4F8DB61C13FDAC160001DD6C /* GTMReadMonitorInputStream.m in Sources */, + 4F934E6A1512712100C4EA34 /* GTLBase64.m in Sources */, + 4F934F51151286FE00C4EA34 /* GTLBase64Test.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4F1AD8FF0B71603F00DC0485 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F1AD90D0B71607400DC0485 /* main.m in Sources */, + 4F697FAF131C1A4100A5AB6A /* GTMOAuth2Authentication.m in Sources */, + 4F697FC2131C1A7A00A5AB6A /* GTMOAuth2SignIn.m in Sources */, + 4F698075131C1F1D00A5AB6A /* GTMGatherInputStream.m in Sources */, + 4F698076131C1F1D00A5AB6A /* GTMHTTPFetcher.m in Sources */, + 4F698077131C1F1D00A5AB6A /* GTMHTTPFetcherLogging.m in Sources */, + 4F698079131C1F1D00A5AB6A /* GTMHTTPFetchHistory.m in Sources */, + 4F69807A131C1F1D00A5AB6A /* GTMHTTPUploadFetcher.m in Sources */, + 4F69807B131C1F1D00A5AB6A /* GTMMIMEDocument.m in Sources */, + 4F698092131C20DA00A5AB6A /* GTMHTTPFetcherService.m in Sources */, + 4FDE224613848173005AEFAA /* GTLFramework.m in Sources */, + 4FDE224713848173005AEFAA /* GTLJSONParser.m in Sources */, + 4FDE224813848173005AEFAA /* GTLUtilities.m in Sources */, + 4FDE22791384818E005AEFAA /* GTLBatchQuery.m in Sources */, + 4FDE227A1384818E005AEFAA /* GTLBatchResult.m in Sources */, + 4FDE227B1384818E005AEFAA /* GTLDateTime.m in Sources */, + 4FDE227C1384818E005AEFAA /* GTLErrorObject.m in Sources */, + 4FDE227D1384818E005AEFAA /* GTLObject.m in Sources */, + 4FDE227E1384818E005AEFAA /* GTLQuery.m in Sources */, + 4FDE227F1384818E005AEFAA /* GTLRuntimeCommon.m in Sources */, + 4FDE22801384818E005AEFAA /* GTLService.m in Sources */, + 4F0C4FC013CFA7E5007E5E92 /* GTLUploadParameters.m in Sources */, + 4F8DB61D13FDAC160001DD6C /* GTMReadMonitorInputStream.m in Sources */, + 4F934E6B1512712100C4EA34 /* GTLBase64.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4F1C6E0C1027B3CE00B46459 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F697FAB131C1A4100A5AB6A /* GTMOAuth2Authentication.m in Sources */, + 4F697FAC131C1A4100A5AB6A /* GTMOAuth2SignIn.m in Sources */, + 4F697FBE131C1A6800A5AB6A /* GTMOAuth2ViewControllerTouch.m in Sources */, + 4F698059131C1F1D00A5AB6A /* GTMGatherInputStream.m in Sources */, + 4F69805A131C1F1D00A5AB6A /* GTMHTTPFetcher.m in Sources */, + 4F69805B131C1F1D00A5AB6A /* GTMHTTPFetcherLogging.m in Sources */, + 4F69805D131C1F1D00A5AB6A /* GTMHTTPFetchHistory.m in Sources */, + 4F69805E131C1F1D00A5AB6A /* GTMHTTPUploadFetcher.m in Sources */, + 4F69805F131C1F1D00A5AB6A /* GTMMIMEDocument.m in Sources */, + 4F69808F131C20DA00A5AB6A /* GTMHTTPFetcherService.m in Sources */, + 4FDE224313848173005AEFAA /* GTLFramework.m in Sources */, + 4FDE224413848173005AEFAA /* GTLJSONParser.m in Sources */, + 4FDE224513848173005AEFAA /* GTLUtilities.m in Sources */, + 4FDE22711384818E005AEFAA /* GTLBatchQuery.m in Sources */, + 4FDE22721384818E005AEFAA /* GTLBatchResult.m in Sources */, + 4FDE22731384818E005AEFAA /* GTLDateTime.m in Sources */, + 4FDE22741384818E005AEFAA /* GTLErrorObject.m in Sources */, + 4FDE22751384818E005AEFAA /* GTLObject.m in Sources */, + 4FDE22761384818E005AEFAA /* GTLQuery.m in Sources */, + 4FDE22771384818E005AEFAA /* GTLRuntimeCommon.m in Sources */, + 4FDE22781384818E005AEFAA /* GTLService.m in Sources */, + 4F0C4FBE13CFA7E5007E5E92 /* GTLUploadParameters.m in Sources */, + 4F8DB61B13FDAC160001DD6C /* GTMReadMonitorInputStream.m in Sources */, + 4F934E691512712100C4EA34 /* GTLBase64.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4F38F6A30B66E91D00B24B81 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F697FA8131C1A4100A5AB6A /* GTMOAuth2Authentication.m in Sources */, + 4F697FAA131C1A4100A5AB6A /* GTMOAuth2SignIn.m in Sources */, + 4F697FB8131C1A5800A5AB6A /* GTMOAuth2WindowController.m in Sources */, + 4F698061131C1F1D00A5AB6A /* GTMGatherInputStream.m in Sources */, + 4F698063131C1F1D00A5AB6A /* GTMHTTPFetcher.m in Sources */, + 4F698065131C1F1D00A5AB6A /* GTMHTTPFetcherLogging.m in Sources */, + 4F698069131C1F1D00A5AB6A /* GTMHTTPFetchHistory.m in Sources */, + 4F69806B131C1F1D00A5AB6A /* GTMHTTPUploadFetcher.m in Sources */, + 4F69806D131C1F1D00A5AB6A /* GTMMIMEDocument.m in Sources */, + 4F698090131C20DA00A5AB6A /* GTMHTTPFetcherService.m in Sources */, + 4FDE223D13848173005AEFAA /* GTLFramework.m in Sources */, + 4FDE223F13848173005AEFAA /* GTLJSONParser.m in Sources */, + 4FDE224213848173005AEFAA /* GTLUtilities.m in Sources */, + 4FDE22621384818E005AEFAA /* GTLBatchQuery.m in Sources */, + 4FDE22641384818E005AEFAA /* GTLBatchResult.m in Sources */, + 4FDE22661384818E005AEFAA /* GTLDateTime.m in Sources */, + 4FDE22681384818E005AEFAA /* GTLErrorObject.m in Sources */, + 4FDE226A1384818E005AEFAA /* GTLObject.m in Sources */, + 4FDE226C1384818E005AEFAA /* GTLQuery.m in Sources */, + 4FDE226E1384818E005AEFAA /* GTLRuntimeCommon.m in Sources */, + 4FDE22701384818E005AEFAA /* GTLService.m in Sources */, + 4F0C4FBD13CFA7E5007E5E92 /* GTLUploadParameters.m in Sources */, + 4F8DB61A13FDAC160001DD6C /* GTMReadMonitorInputStream.m in Sources */, + 4F934E681512712100C4EA34 /* GTLBase64.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 4F1AD9050B71604300DC0485 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 4F38F6A50B66E91D00B24B81 /* GTLFramework */; + targetProxy = 4F1AD9040B71604300DC0485 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 1DEB913F08733D840010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = NO; + DEPLOYMENT_POSTPROCESSING = NO; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_ENABLE_OBJC_GC = supported; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = ""; + OTHER_CFLAGS = "-DDEBUG=1"; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + "-Wendif-labels", + "-Wnewline-eof", + "-Wfloat-equal", + "-Wundeclared-selector", + "-Wextra", + "-Wstrict-overflow", + "-Wconversion", + "-Wformat=2", + "-Wformat-security", + "-Wreorder", + "-Wsign-promo", + "-Wstrict-selector-match", + "-Wno-unused-parameter", + "-Wno-pragmas", + "-Wno-unknown-pragmas", + ); + }; + name = Debug; + }; + 1DEB914008733D840010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + DEPLOYMENT_POSTPROCESSING = YES; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_ENABLE_OBJC_GC = supported; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = s; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = ""; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wall", + "-Werror", + "-Wendif-labels", + "-Wnewline-eof", + "-Wfloat-equal", + "-Wundeclared-selector", + "-Wextra", + "-Wstrict-overflow", + "-Wconversion", + "-Wformat=2", + "-Wformat-security", + "-Wreorder", + "-Wsign-promo", + "-Wstrict-selector-match", + "-Wno-unused-parameter", + "-Wno-pragmas", + "-Wno-unknown-pragmas", + ); + }; + name = Release; + }; + 4F14A9E00B1276B70072EBB8 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(value)", + "$(DEVELOPER_FRAMEWORKS_DIR_QUOTED)", + ); + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Cocoa.framework/Headers/Cocoa.h"; + INFOPLIST_FILE = "Resources/GTLUnitTests-Info.plist"; + MACOSX_DEPLOYMENT_TARGET = 10.7; + OTHER_CFLAGS = ( + "$(inherited)", + "-DGTL_UTILITIES_BASE64=1", + ); + OTHER_LDFLAGS = ( + "-framework", + Cocoa, + "-framework", + SenTestingKit, + ); + PRODUCT_NAME = GTLUnitTests; + RUN_CLANG_STATIC_ANALYZER = YES; + STRIP_STYLE = "non-global"; + WRAPPER_EXTENSION = octest; + }; + name = Debug; + }; + 4F14A9E10B1276B70072EBB8 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(value)", + "$(DEVELOPER_FRAMEWORKS_DIR_QUOTED)", + ); + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Cocoa.framework/Headers/Cocoa.h"; + INFOPLIST_FILE = "Resources/GTLUnitTests-Info.plist"; + MACOSX_DEPLOYMENT_TARGET = 10.7; + OTHER_CFLAGS = ( + "$(inherited)", + "-DGTL_UTILITIES_BASE64=1", + ); + OTHER_LDFLAGS = ( + "-framework", + Cocoa, + "-framework", + SenTestingKit, + ); + PRODUCT_NAME = GTLUnitTests; + RUN_CLANG_STATIC_ANALYZER = YES; + STRIP_STYLE = "non-global"; + WRAPPER_EXTENSION = octest; + }; + name = Release; + }; + 4F1AD9090B71606100DC0485 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + GCC_ENABLE_OBJC_GC = unsupported; + INFOPLIST_FILE = "Resources/DevTestTool-Info.plist"; + MACOSX_DEPLOYMENT_TARGET = 10.6; + PRODUCT_NAME = DevelopmentTestTool; + }; + name = Debug; + }; + 4F1AD90A0B71606100DC0485 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + GCC_ENABLE_OBJC_GC = unsupported; + INFOPLIST_FILE = "Resources/DevTestTool-Info.plist"; + MACOSX_DEPLOYMENT_TARGET = 10.6; + PRODUCT_NAME = DevelopmentTestTool; + }; + name = Release; + }; + 4F1C6E101027B3CF00B46459 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + GCC_ENABLE_OBJC_GC = unsupported; + OTHER_CFLAGS = ( + "$(inherited)", + "-DGTL_IPHONE=1", + ); + PRODUCT_NAME = GTLTouchStaticLib; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 4F1C6E111027B3CF00B46459 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + GCC_ENABLE_OBJC_GC = unsupported; + OTHER_CFLAGS = ( + "$(inherited)", + "-DGTL_IPHONE=1", + ); + PRODUCT_NAME = GTLTouchStaticLib; + SDKROOT = iphoneos; + }; + name = Release; + }; + 4F38F7120B66EF2C00B24B81 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + COMBINE_HIDPI_IMAGES = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + FRAMEWORK_VERSION = A; + GCC_DYNAMIC_NO_PIC = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; + INFOPLIST_FILE = "Resources/GTLFramework-Info.plist"; + INSTALL_PATH = "@loader_path/../Frameworks"; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PRODUCT_NAME = GTL; + STRIP_STYLE = "non-global"; + }; + name = Debug; + }; + 4F38F7130B66EF2C00B24B81 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + COMBINE_HIDPI_IMAGES = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + FRAMEWORK_VERSION = A; + GCC_DYNAMIC_NO_PIC = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; + INFOPLIST_FILE = "Resources/GTLFramework-Info.plist"; + INSTALL_PATH = "@loader_path/../Frameworks"; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PRODUCT_NAME = GTL; + STRIP_STYLE = "non-global"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "GTL" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB913F08733D840010E9CD /* Debug */, + 1DEB914008733D840010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4F14A9DF0B1276B70072EBB8 /* Build configuration list for PBXNativeTarget "GTLUnitTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4F14A9E00B1276B70072EBB8 /* Debug */, + 4F14A9E10B1276B70072EBB8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4F1AD9080B71606100DC0485 /* Build configuration list for PBXNativeTarget "DevelopmentTestTool" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4F1AD9090B71606100DC0485 /* Debug */, + 4F1AD90A0B71606100DC0485 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4F1C6E121027B3ED00B46459 /* Build configuration list for PBXNativeTarget "GTLTouchStaticLib" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4F1C6E101027B3CF00B46459 /* Debug */, + 4F1C6E111027B3CF00B46459 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4F38F7110B66EF2C00B24B81 /* Build configuration list for PBXNativeTarget "GTLFramework" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4F38F7120B66EF2C00B24B81 /* Debug */, + 4F38F7130B66EF2C00B24B81 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 089C1669FE841209C02AAC07 /* Project object */; +} diff --git a/GTL/Source/GTLDefines.h b/GTL/Source/GTLDefines.h new file mode 100644 index 0000000..ebd9655 --- /dev/null +++ b/GTL/Source/GTLDefines.h @@ -0,0 +1,128 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDefines.h +// + +// Ensure Apple's conditionals we depend on are defined. +#import +#import + +// +// The developer may choose to define these in the project: +// +// #define GTL_TARGET_NAMESPACE Xxx // preface all GTL class names with Xxx (recommended for building plug-ins) +// #define GTL_FOUNDATION_ONLY 1 // builds without AppKit or Carbon (default for iPhone builds) +// #define STRIP_GTM_FETCH_LOGGING 1 // omit http logging code (default for iPhone release builds) +// +// Mac developers may find GTL_SIMPLE_DESCRIPTIONS and STRIP_GTM_FETCH_LOGGING useful for +// reducing code size. +// + +// Define later OS versions when building on earlier versions +#ifdef MAC_OS_X_VERSION_10_0 + #ifndef MAC_OS_X_VERSION_10_6 + #define MAC_OS_X_VERSION_10_6 1060 + #endif +#endif + + +#ifdef GTL_TARGET_NAMESPACE +// prefix all GTL class names with GTL_TARGET_NAMESPACE for this target + #import "GTLTargetNamespace.h" +#endif + +// Provide a common definition for externing constants/functions +#if defined(__cplusplus) + #define GTL_EXTERN extern "C" +#else + #define GTL_EXTERN extern +#endif + +#if TARGET_OS_IPHONE // iPhone SDK + + #define GTL_IPHONE 1 + +#endif + +#if GTL_IPHONE + + #define GTL_FOUNDATION_ONLY 1 + +#endif + +// +// GTL_ASSERT is like NSAssert, but takes a variable number of arguments: +// +// GTL_ASSERT(condition, @"Problem in argument %@", argStr); +// +// GTL_DEBUG_ASSERT is similar, but compiles in only for debug builds +// + +#ifndef GTL_ASSERT + // we directly invoke the NSAssert handler so we can pass on the varargs + #if !defined(NS_BLOCK_ASSERTIONS) + #define GTL_ASSERT(condition, ...) \ + do { \ + if (!(condition)) { \ + [[NSAssertionHandler currentHandler] \ + handleFailureInFunction:[NSString stringWithUTF8String:__PRETTY_FUNCTION__] \ + file:[NSString stringWithUTF8String:__FILE__] \ + lineNumber:__LINE__ \ + description:__VA_ARGS__]; \ + } \ + } while(0) + #else + #define GTL_ASSERT(condition, ...) do { } while (0) + #endif // !defined(NS_BLOCK_ASSERTIONS) +#endif // GTL_ASSERT + +#ifndef GTL_DEBUG_ASSERT + #if DEBUG + #define GTL_DEBUG_ASSERT(condition, ...) GTL_ASSERT(condition, __VA_ARGS__) + #else + #define GTL_DEBUG_ASSERT(condition, ...) do { } while (0) + #endif +#endif + +#ifndef GTL_DEBUG_LOG + #if DEBUG + #define GTL_DEBUG_LOG(...) NSLog(__VA_ARGS__) + #else + #define GTL_DEBUG_LOG(...) do { } while (0) + #endif +#endif + +#ifndef STRIP_GTM_FETCH_LOGGING + #if GTL_IPHONE && !DEBUG + #define STRIP_GTM_FETCH_LOGGING 1 + #else + #define STRIP_GTM_FETCH_LOGGING 0 + #endif +#endif + +// Some support for advanced clang static analysis functionality +// See http://clang-analyzer.llvm.org/annotations.html +#ifndef __has_feature // Optional. + #define __has_feature(x) 0 // Compatibility with non-clang compilers. +#endif +#ifndef NS_RETURNS_NOT_RETAINED + #if __has_feature(attribute_ns_returns_not_retained) + #define NS_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained)) + #else + #define NS_RETURNS_NOT_RETAINED + #endif +#endif diff --git a/GTL/Source/HTTPFetcher/.svn/all-wcprops b/GTL/Source/HTTPFetcher/.svn/all-wcprops new file mode 100644 index 0000000..ad93a75 --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/all-wcprops @@ -0,0 +1,113 @@ +K 25 +svn:wc:ra_dav:version-url +V 30 +/svn/!svn/ver/111/trunk/Source +END +GTMReadMonitorInputStream.m +K 25 +svn:wc:ra_dav:version-url +V 58 +/svn/!svn/ver/111/trunk/Source/GTMReadMonitorInputStream.m +END +GTMHTTPUploadFetcher.h +K 25 +svn:wc:ra_dav:version-url +V 52 +/svn/!svn/ver/77/trunk/Source/GTMHTTPUploadFetcher.h +END +GTMHTTPFetcher.m +K 25 +svn:wc:ra_dav:version-url +V 47 +/svn/!svn/ver/111/trunk/Source/GTMHTTPFetcher.m +END +GTMMIMEDocument.h +K 25 +svn:wc:ra_dav:version-url +V 47 +/svn/!svn/ver/79/trunk/Source/GTMMIMEDocument.h +END +GTMHTTPFetcherLogging.h +K 25 +svn:wc:ra_dav:version-url +V 54 +/svn/!svn/ver/111/trunk/Source/GTMHTTPFetcherLogging.h +END +UnitTests-Info.plist +K 25 +svn:wc:ra_dav:version-url +V 49 +/svn/!svn/ver/7/trunk/Source/UnitTests-Info.plist +END +GTMHTTPUploadFetcher.m +K 25 +svn:wc:ra_dav:version-url +V 53 +/svn/!svn/ver/111/trunk/Source/GTMHTTPUploadFetcher.m +END +GTMMIMEDocument.m +K 25 +svn:wc:ra_dav:version-url +V 48 +/svn/!svn/ver/111/trunk/Source/GTMMIMEDocument.m +END +GTMHTTPFetcherLogging.m +K 25 +svn:wc:ra_dav:version-url +V 54 +/svn/!svn/ver/111/trunk/Source/GTMHTTPFetcherLogging.m +END +GTMHTTPFetcherService.h +K 25 +svn:wc:ra_dav:version-url +V 54 +/svn/!svn/ver/109/trunk/Source/GTMHTTPFetcherService.h +END +GTMGatherInputStream.h +K 25 +svn:wc:ra_dav:version-url +V 52 +/svn/!svn/ver/90/trunk/Source/GTMGatherInputStream.h +END +GTMHTTPFetcherService.m +K 25 +svn:wc:ra_dav:version-url +V 54 +/svn/!svn/ver/109/trunk/Source/GTMHTTPFetcherService.m +END +ReleaseNotes.txt +K 25 +svn:wc:ra_dav:version-url +V 47 +/svn/!svn/ver/109/trunk/Source/ReleaseNotes.txt +END +GTMHTTPFetchHistory.h +K 25 +svn:wc:ra_dav:version-url +V 51 +/svn/!svn/ver/50/trunk/Source/GTMHTTPFetchHistory.h +END +GTMGatherInputStream.m +K 25 +svn:wc:ra_dav:version-url +V 53 +/svn/!svn/ver/111/trunk/Source/GTMGatherInputStream.m +END +GTMReadMonitorInputStream.h +K 25 +svn:wc:ra_dav:version-url +V 57 +/svn/!svn/ver/64/trunk/Source/GTMReadMonitorInputStream.h +END +GTMHTTPFetcher.h +K 25 +svn:wc:ra_dav:version-url +V 47 +/svn/!svn/ver/111/trunk/Source/GTMHTTPFetcher.h +END +GTMHTTPFetchHistory.m +K 25 +svn:wc:ra_dav:version-url +V 52 +/svn/!svn/ver/111/trunk/Source/GTMHTTPFetchHistory.m +END diff --git a/GTL/Source/HTTPFetcher/.svn/entries b/GTL/Source/HTTPFetcher/.svn/entries new file mode 100644 index 0000000..d38e18d --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/entries @@ -0,0 +1,646 @@ +10 + +dir +111 +http://gtm-http-fetcher.googlecode.com/svn/trunk/Source +http://gtm-http-fetcher.googlecode.com/svn + + + +2012-12-06T21:20:50.206628Z +111 +grobbins@google.com + + + + + + + + + + + + + + +b3aa69f0-f65c-a609-0a27-78855af037c1 + +GTMReadMonitorInputStream.m +file + + + + +2012-12-09T08:42:38.000000Z +e2dee0fbe837644e302f6ee74f747914 +2012-12-06T21:20:50.206628Z +111 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +5357 + +GTMHTTPUploadFetcher.h +file + + + + +2012-12-09T08:42:38.000000Z +a35dd747a70e8c2387cf51872c100359 +2011-10-17T20:08:12.682048Z +77 +gregrobbins +has-props + + + + + + + + + + + + + + + + + + + + +5102 + +GTMHTTPFetcher.m +file + + + + +2012-12-09T08:42:38.000000Z +e6f5dc6f4d04c33ebb329b90c5beffd6 +2012-12-06T21:20:50.206628Z +111 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +62617 + +GTMMIMEDocument.h +file + + + + +2012-12-09T08:42:38.000000Z +e11e120c6a7331538767896836c202c4 +2011-10-19T23:26:43.796967Z +79 +gregrobbins + + + + + + + + + + + + + + + + + + + + + +2047 + +GTMHTTPFetcher.xcodeproj +dir + +GTMHTTPFetcherLogging.h +file + + + + +2012-12-09T08:42:38.000000Z +85ea36c6bc0f40520e78552818146b51 +2012-12-06T21:20:50.206628Z +111 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3585 + +UnitTests-Info.plist +file + + + + +2012-12-09T08:42:38.000000Z +37506ef0d81d26d7e9e75c5ae54882c6 +2010-08-26T01:42:03.064224Z +7 +gregrobbins + + + + + + + + + + + + + + + + + + + + + +700 + +GTMHTTPUploadFetcher.m +file + + + + +2012-12-09T08:42:38.000000Z +b6fcfb07a954442361fda7db79b9981d +2012-12-06T21:20:50.206628Z +111 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +31186 + +GTMMIMEDocument.m +file + + + + +2012-12-09T08:42:38.000000Z +8a71a603573bd44ef5c0e04133f72ec4 +2012-12-06T21:20:50.206628Z +111 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +8743 + +GTMHTTPFetcherLogging.m +file + + + + +2012-12-09T08:42:38.000000Z +a0b275582f15dd06c968d5290e46aa48 +2012-12-06T21:20:50.206628Z +111 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +40949 + +GTMHTTPFetcherService.h +file + + + + +2012-12-09T08:42:38.000000Z +b1739d82b7b69d59c918cd836c49ed09 +2012-09-29T05:22:16.253611Z +109 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +4649 + +Tests +dir + +GTMGatherInputStream.h +file + + + + +2012-12-09T08:42:38.000000Z +70f68ae849f39cacb742b3b81a5c5e39 +2011-11-23T18:52:34.771138Z +90 +gregrobbins + + + + + + + + + + + + + + + + + + + + + +2548 + +GTMHTTPFetcherService.m +file + + + + +2012-12-09T08:42:38.000000Z +d8d2595240cf3a679d545981d2faf712 +2012-09-29T05:22:16.253611Z +109 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +14962 + +ReleaseNotes.txt +file + + + + +2012-12-09T08:42:38.000000Z +2b6ba05ce2586f03cdef2f9cb7ca9dbe +2012-09-29T05:22:16.253611Z +109 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1783 + +GTMGatherInputStream.m +file + + + + +2012-12-09T08:42:38.000000Z +334d21190094c21e1a31b86f4774dffb +2012-12-06T21:20:50.206628Z +111 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +5126 + +GTMHTTPFetchHistory.h +file + + + + +2012-12-09T08:42:38.000000Z +b2bdb2797c7d6d70d7b22a0aaa93aa91 +2011-06-03T18:00:11.727236Z +50 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +6512 + +GTMReadMonitorInputStream.h +file + + + + +2012-12-09T08:42:38.000000Z +e8645b7844771e968b7fd1aa7ef611e0 +2011-08-18T20:01:53.058247Z +64 +gregrobbins + + + + + + + + + + + + + + + + + + + + + +2134 + +GTMHTTPFetcher.h +file + + + + +2012-12-09T08:42:38.000000Z +f950904385b1efa3f49a8c4b1f185bbf +2012-12-06T21:20:50.206628Z +111 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +29113 + +GTMHTTPFetchHistory.m +file + + + + +2012-12-09T08:42:38.000000Z +4fe41573846c5a7ed2983c6771d8b4a8 +2012-12-06T21:20:50.206628Z +111 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +17517 + diff --git a/GTL/Source/HTTPFetcher/.svn/prop-base/GTMHTTPFetchHistory.h.svn-base b/GTL/Source/HTTPFetcher/.svn/prop-base/GTMHTTPFetchHistory.h.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/prop-base/GTMHTTPFetchHistory.h.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/GTL/Source/HTTPFetcher/.svn/prop-base/GTMHTTPFetchHistory.m.svn-base b/GTL/Source/HTTPFetcher/.svn/prop-base/GTMHTTPFetchHistory.m.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/prop-base/GTMHTTPFetchHistory.m.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/GTL/Source/HTTPFetcher/.svn/prop-base/GTMHTTPFetcher.h.svn-base b/GTL/Source/HTTPFetcher/.svn/prop-base/GTMHTTPFetcher.h.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/prop-base/GTMHTTPFetcher.h.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/GTL/Source/HTTPFetcher/.svn/prop-base/GTMHTTPFetcher.m.svn-base b/GTL/Source/HTTPFetcher/.svn/prop-base/GTMHTTPFetcher.m.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/prop-base/GTMHTTPFetcher.m.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/GTL/Source/HTTPFetcher/.svn/prop-base/GTMHTTPFetcherService.h.svn-base b/GTL/Source/HTTPFetcher/.svn/prop-base/GTMHTTPFetcherService.h.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/prop-base/GTMHTTPFetcherService.h.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/GTL/Source/HTTPFetcher/.svn/prop-base/GTMHTTPFetcherService.m.svn-base b/GTL/Source/HTTPFetcher/.svn/prop-base/GTMHTTPFetcherService.m.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/prop-base/GTMHTTPFetcherService.m.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/GTL/Source/HTTPFetcher/.svn/prop-base/GTMHTTPUploadFetcher.h.svn-base b/GTL/Source/HTTPFetcher/.svn/prop-base/GTMHTTPUploadFetcher.h.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/prop-base/GTMHTTPUploadFetcher.h.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/GTL/Source/HTTPFetcher/.svn/prop-base/GTMHTTPUploadFetcher.m.svn-base b/GTL/Source/HTTPFetcher/.svn/prop-base/GTMHTTPUploadFetcher.m.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/prop-base/GTMHTTPUploadFetcher.m.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/GTL/Source/HTTPFetcher/.svn/text-base/GTMGatherInputStream.h.svn-base b/GTL/Source/HTTPFetcher/.svn/text-base/GTMGatherInputStream.h.svn-base new file mode 100644 index 0000000..280ff97 --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/text-base/GTMGatherInputStream.h.svn-base @@ -0,0 +1,64 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +// The GTMGatherInput stream is an input stream implementation that is to be +// instantiated with an NSArray of NSData objects. It works in the traditional +// scatter/gather vector I/O model. Rather than allocating a big NSData object +// to hold all of the data and performing a copy into that object, the +// GTMGatherInputStream will maintain a reference to the NSArray and read from +// each NSData in turn as the read method is called. You should not alter the +// underlying set of NSData objects until all read operations on this input +// stream have completed. + +#import + +#if defined(GTL_TARGET_NAMESPACE) + // we need NSInteger for the 10.4 SDK, or we're using target namespace macros + #import "GTLDefines.h" +#elif defined(GDATA_TARGET_NAMESPACE) + #import "GDataDefines.h" +#endif + +// Define only for Mac OS X 10.6+ or iPhone OS 4.0+. +#undef GTM_NSSTREAM_DELEGATE +#if (TARGET_OS_MAC && !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1060)) || \ + (TARGET_OS_IPHONE && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 40000)) + #define GTM_NSSTREAM_DELEGATE +#else + #define GTM_NSSTREAM_DELEGATE +#endif + +@interface GTMGatherInputStream : NSInputStream GTM_NSSTREAM_DELEGATE { + + NSArray* dataArray_; // NSDatas that should be "gathered" and streamed. + NSUInteger arrayIndex_; // Index in the array of the current NSData. + long long dataOffset_; // Offset in the current NSData we are processing. + + id delegate_; // WEAK, stream delegate, defaults to self + + // Since various undocumented methods get called on a stream, we'll + // use a 1-byte dummy stream object to handle all unexpected messages. + // Actual reads from the stream we will perform using the data array, not + // from the dummy stream. + NSInputStream* dummyStream_; + NSData* dummyData_; +} + ++ (NSInputStream *)streamWithArray:(NSArray *)dataArray; + +- (id)initWithArray:(NSArray *)dataArray; + +@end diff --git a/GTL/Source/HTTPFetcher/.svn/text-base/GTMGatherInputStream.m.svn-base b/GTL/Source/HTTPFetcher/.svn/text-base/GTMGatherInputStream.m.svn-base new file mode 100644 index 0000000..fd72e93 --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/text-base/GTMGatherInputStream.m.svn-base @@ -0,0 +1,193 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "GTMGatherInputStream.h" + +@implementation GTMGatherInputStream + ++ (NSInputStream *)streamWithArray:(NSArray *)dataArray { + return [[[self alloc] initWithArray:dataArray] autorelease]; +} + +- (id)initWithArray:(NSArray *)dataArray { + self = [super init]; + if (self) { + dataArray_ = [dataArray retain]; + arrayIndex_ = 0; + dataOffset_ = 0; + + [self setDelegate:self]; // An NSStream's default delegate should be self. + + // We use a dummy input stream to handle all the various undocumented + // messages the system sends to an input stream. + // + // Contrary to documentation, inputStreamWithData neither copies nor + // retains the data in Mac OS X 10.4, so we must retain it. + // (Radar 5167591) + + dummyData_ = [[NSData alloc] initWithBytes:"x" length:1]; + dummyStream_ = [[NSInputStream alloc] initWithData:dummyData_]; + } + return self; +} + +- (void)dealloc { + [dataArray_ release]; + [dummyStream_ release]; + [dummyData_ release]; + + [super dealloc]; +} + +- (NSInteger)read:(uint8_t *)buffer maxLength:(NSUInteger)len { + + NSInteger bytesRead = 0; + NSUInteger bytesRemaining = len; + + // read bytes from the currently-indexed array + while ((bytesRemaining > 0) && (arrayIndex_ < [dataArray_ count])) { + + NSData* data = [dataArray_ objectAtIndex:arrayIndex_]; + + NSUInteger dataLen = [data length]; + NSUInteger dataBytesLeft = dataLen - (NSUInteger)dataOffset_; + + NSUInteger bytesToCopy = MIN(bytesRemaining, dataBytesLeft); + NSRange range = NSMakeRange((NSUInteger) dataOffset_, bytesToCopy); + + [data getBytes:(buffer + bytesRead) range:range]; + + bytesRead += bytesToCopy; + dataOffset_ += bytesToCopy; + bytesRemaining -= bytesToCopy; + + if (dataOffset_ == (long long)dataLen) { + dataOffset_ = 0; + arrayIndex_++; + } + } + + if (bytesRead == 0) { + // We are at the end our our stream, so we read all of the data on our + // dummy input stream to make sure it is in the "fully read" state. + uint8_t leftOverBytes[2]; + (void) [dummyStream_ read:leftOverBytes maxLength:sizeof(leftOverBytes)]; + } + + return bytesRead; +} + +- (BOOL)getBuffer:(uint8_t **)buffer length:(NSUInteger *)len { + return NO; // We don't support this style of reading. +} + +- (BOOL)hasBytesAvailable { + // if we return no, the read never finishes, even if we've already + // delivered all the bytes + return YES; +} + +#pragma mark - + +// Pass other expected messages on to the dummy input stream + +- (void)open { + [dummyStream_ open]; +} + +- (void)close { + [dummyStream_ close]; + + // 10.4's NSURLConnection tends to retain streams needlessly, + // so we'll free up the data array right away + [dataArray_ release]; + dataArray_ = nil; +} + +- (void)stream:(NSStream *)theStream handleEvent:(NSStreamEvent)streamEvent { + if (delegate_ != self) { + [delegate_ stream:self handleEvent:streamEvent]; + } +} + +- (id)delegate { + return delegate_; +} + +- (void)setDelegate:(id)delegate { + if (delegate == nil) { + delegate_ = self; + [dummyStream_ setDelegate:nil]; + } else { + delegate_ = delegate; + [dummyStream_ setDelegate:self]; + } +} + +- (id)propertyForKey:(NSString *)key { + return [dummyStream_ propertyForKey:key]; +} + +- (BOOL)setProperty:(id)property forKey:(NSString *)key { + return [dummyStream_ setProperty:property forKey:key]; +} + +- (void)scheduleInRunLoop:(NSRunLoop *)aRunLoop forMode:(NSString *)mode { + [dummyStream_ scheduleInRunLoop:aRunLoop forMode:mode]; +} + +- (void)removeFromRunLoop:(NSRunLoop *)aRunLoop forMode:(NSString *)mode { + [dummyStream_ removeFromRunLoop:aRunLoop forMode:mode]; +} + +- (NSStreamStatus)streamStatus { + return [dummyStream_ streamStatus]; +} +- (NSError *)streamError { + return [dummyStream_ streamError]; +} + +#pragma mark - + +// We'll forward all unexpected messages to our dummy stream + ++ (NSMethodSignature*)methodSignatureForSelector:(SEL)selector { + return [NSInputStream methodSignatureForSelector:selector]; +} + ++ (void)forwardInvocation:(NSInvocation*)invocation { + [invocation invokeWithTarget:[NSInputStream class]]; +} + +- (NSMethodSignature*)methodSignatureForSelector:(SEL)selector { + return [dummyStream_ methodSignatureForSelector:(SEL)selector]; +} + +- (void)forwardInvocation:(NSInvocation*)invocation { + +#if 0 + // uncomment this section to see the messages the NSInputStream receives + SEL selector; + NSString *selName; + + selector=[invocation selector]; + selName=NSStringFromSelector(selector); + NSLog(@"-forwardInvocation: %@",selName); +#endif + + [invocation invokeWithTarget:dummyStream_]; +} + +@end diff --git a/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPFetchHistory.h.svn-base b/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPFetchHistory.h.svn-base new file mode 100644 index 0000000..96018f5 --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPFetchHistory.h.svn-base @@ -0,0 +1,187 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMHTTPFetchHistory.h +// + +// +// Users of the GTMHTTPFetcher class may optionally create and set a fetch +// history object. The fetch history provides "memory" between subsequent +// fetches, including: +// +// - For fetch responses with Etag headers, the fetch history +// remembers the response headers. Future fetcher requests to the same URL +// will be given an "If-None-Match" header, telling the server to return +// a 304 Not Modified status if the response is unchanged, reducing the +// server load and network traffic. +// +// - Optionally, the fetch history can cache the ETagged data that was returned +// in the responses that contained Etag headers. If a later fetch +// results in a 304 status, the fetcher will return the cached ETagged data +// to the client along with a 200 status, hiding the 304. +// +// - The fetch history can track cookies. +// + +#pragma once + +#import + +#import "GTMHTTPFetcher.h" + +#undef _EXTERN +#undef _INITIALIZE_AS +#ifdef GTMHTTPFETCHHISTORY_DEFINE_GLOBALS + #define _EXTERN + #define _INITIALIZE_AS(x) =x +#else + #if defined(__cplusplus) + #define _EXTERN extern "C" + #else + #define _EXTERN extern + #endif + #define _INITIALIZE_AS(x) +#endif + + +// default data cache size for when we're caching responses to handle "not +// modified" errors for the client +#if GTM_IPHONE +// iPhone: up to 1MB memory +_EXTERN const NSUInteger kGTMDefaultETaggedDataCacheMemoryCapacity _INITIALIZE_AS(1*1024*1024); +#else +// Mac OS X: up to 15MB memory +_EXTERN const NSUInteger kGTMDefaultETaggedDataCacheMemoryCapacity _INITIALIZE_AS(15*1024*1024); +#endif + +// forward declarations +@class GTMURLCache; +@class GTMCookieStorage; + +@interface GTMHTTPFetchHistory : NSObject { + @private + GTMURLCache *etaggedDataCache_; + BOOL shouldRememberETags_; + BOOL shouldCacheETaggedData_; // if NO, then only headers are cached + GTMCookieStorage *cookieStorage_; +} + +// With caching enabled, previously-cached data will be returned instead of +// 304 Not Modified responses when repeating a fetch of an URL that previously +// included an ETag header in its response +@property (assign) BOOL shouldRememberETags; // default: NO +@property (assign) BOOL shouldCacheETaggedData; // default: NO + +// the default ETag data cache capacity is kGTMDefaultETaggedDataCacheMemoryCapacity +@property (assign) NSUInteger memoryCapacity; + +@property (retain) GTMCookieStorage *cookieStorage; + +- (id)initWithMemoryCapacity:(NSUInteger)totalBytes + shouldCacheETaggedData:(BOOL)shouldCacheETaggedData; + +- (void)updateRequest:(NSMutableURLRequest *)request isHTTPGet:(BOOL)isHTTPGet; + +- (void)clearETaggedDataCache; +- (void)clearHistory; + +- (void)removeAllCookies; + +@end + + +// GTMURLCache and GTMCachedURLResponse have interfaces similar to their +// NSURLCache counterparts, in hopes that someday the NSURLCache versions +// can be used. But in 10.5.8, those are not reliable enough except when +// used with +setSharedURLCache. Our goal here is just to cache +// responses for handling If-None-Match requests that return +// "Not Modified" responses, not for replacing the general URL +// caches. + +@interface GTMCachedURLResponse : NSObject { + @private + NSURLResponse *response_; + NSData *data_; + NSDate *useDate_; // date this response was last saved or used + NSDate *reservationDate_; // date this response's ETag was used +} + +@property (readonly) NSURLResponse* response; +@property (readonly) NSData* data; + +// date the response was saved or last accessed +@property (retain) NSDate *useDate; + +// date the response's ETag header was last used for a fetch request +@property (retain) NSDate *reservationDate; + +- (id)initWithResponse:(NSURLResponse *)response data:(NSData *)data; +@end + +@interface GTMURLCache : NSObject { + NSMutableDictionary *responses_; // maps request URL to GTMCachedURLResponse + NSUInteger memoryCapacity_; // capacity of NSDatas in the responses + NSUInteger totalDataSize_; // sum of sizes of NSDatas of all responses + NSTimeInterval reservationInterval_; // reservation expiration interval +} + +@property (assign) NSUInteger memoryCapacity; + +- (id)initWithMemoryCapacity:(NSUInteger)totalBytes; + +- (GTMCachedURLResponse *)cachedResponseForRequest:(NSURLRequest *)request; +- (void)storeCachedResponse:(GTMCachedURLResponse *)cachedResponse forRequest:(NSURLRequest *)request; +- (void)removeCachedResponseForRequest:(NSURLRequest *)request; +- (void)removeAllCachedResponses; + +// for unit testing +- (void)setReservationInterval:(NSTimeInterval)secs; +- (NSDictionary *)responses; +- (NSUInteger)totalDataSize; +@end + +@interface GTMCookieStorage : NSObject { + @private + // The cookie storage object manages an array holding cookies, but the array + // is allocated externally (it may be in a fetcher object or the static + // fetcher cookie array.) See the fetcher's setCookieStorageMethod: + // for allocation of this object and assignment of its cookies array. + NSMutableArray *cookies_; +} + +// add all NSHTTPCookies in the supplied array to the storage array, +// replacing cookies in the storage array as appropriate +// Side effect: removes expired cookies from the storage array +- (void)setCookies:(NSArray *)newCookies; + +// retrieve all cookies appropriate for the given URL, considering +// domain, path, cookie name, expiration, security setting. +// Side effect: removes expired cookies from the storage array +- (NSArray *)cookiesForURL:(NSURL *)theURL; + +// return a cookie with the same name, domain, and path as the +// given cookie, or else return nil if none found +// +// Both the cookie being tested and all stored cookies should +// be valid (non-nil name, domains, paths) +- (NSHTTPCookie *)cookieMatchingCookie:(NSHTTPCookie *)cookie; + +// remove any expired cookies, excluding cookies with nil expirations +- (void)removeExpiredCookies; + +- (void)removeAllCookies; + +@end diff --git a/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPFetchHistory.m.svn-base b/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPFetchHistory.m.svn-base new file mode 100644 index 0000000..2c85923 --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPFetchHistory.m.svn-base @@ -0,0 +1,605 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMHTTPFetchHistory.m +// + +#define GTMHTTPFETCHHISTORY_DEFINE_GLOBALS 1 + +#import "GTMHTTPFetchHistory.h" + +const NSTimeInterval kCachedURLReservationInterval = 60.0; // 1 minute +static NSString* const kGTMIfNoneMatchHeader = @"If-None-Match"; +static NSString* const kGTMETagHeader = @"Etag"; + +@implementation GTMCookieStorage + +- (id)init { + self = [super init]; + if (self != nil) { + cookies_ = [[NSMutableArray alloc] init]; + } + return self; +} + +- (void)dealloc { + [cookies_ release]; + [super dealloc]; +} + +// Add all cookies in the new cookie array to the storage, +// replacing stored cookies as appropriate. +// +// Side effect: removes expired cookies from the storage array. +- (void)setCookies:(NSArray *)newCookies { + + @synchronized(cookies_) { + [self removeExpiredCookies]; + + for (NSHTTPCookie *newCookie in newCookies) { + if ([[newCookie name] length] > 0 + && [[newCookie domain] length] > 0 + && [[newCookie path] length] > 0) { + + // remove the cookie if it's currently in the array + NSHTTPCookie *oldCookie = [self cookieMatchingCookie:newCookie]; + if (oldCookie) { + [cookies_ removeObjectIdenticalTo:oldCookie]; + } + + // make sure the cookie hasn't already expired + NSDate *expiresDate = [newCookie expiresDate]; + if ((!expiresDate) || [expiresDate timeIntervalSinceNow] > 0) { + [cookies_ addObject:newCookie]; + } + + } else { + NSAssert1(NO, @"Cookie incomplete: %@", newCookie); + } + } + } +} + +- (void)deleteCookie:(NSHTTPCookie *)cookie { + @synchronized(cookies_) { + NSHTTPCookie *foundCookie = [self cookieMatchingCookie:cookie]; + if (foundCookie) { + [cookies_ removeObjectIdenticalTo:foundCookie]; + } + } +} + +// Retrieve all cookies appropriate for the given URL, considering +// domain, path, cookie name, expiration, security setting. +// Side effect: removed expired cookies from the storage array. +- (NSArray *)cookiesForURL:(NSURL *)theURL { + + NSMutableArray *foundCookies = nil; + + @synchronized(cookies_) { + [self removeExpiredCookies]; + + // We'll prepend "." to the desired domain, since we want the + // actual domain "nytimes.com" to still match the cookie domain + // ".nytimes.com" when we check it below with hasSuffix. + NSString *host = [[theURL host] lowercaseString]; + NSString *path = [theURL path]; + NSString *scheme = [theURL scheme]; + + NSString *domain = nil; + BOOL isLocalhostRetrieval = NO; + + if ([host isEqual:@"localhost"]) { + isLocalhostRetrieval = YES; + } else { + if (host) { + domain = [@"." stringByAppendingString:host]; + } + } + + NSUInteger numberOfCookies = [cookies_ count]; + for (NSUInteger idx = 0; idx < numberOfCookies; idx++) { + + NSHTTPCookie *storedCookie = [cookies_ objectAtIndex:idx]; + + NSString *cookieDomain = [[storedCookie domain] lowercaseString]; + NSString *cookiePath = [storedCookie path]; + BOOL cookieIsSecure = [storedCookie isSecure]; + + BOOL isDomainOK; + + if (isLocalhostRetrieval) { + // prior to 10.5.6, the domain stored into NSHTTPCookies for localhost + // is "localhost.local" + isDomainOK = [cookieDomain isEqual:@"localhost"] + || [cookieDomain isEqual:@"localhost.local"]; + } else { + isDomainOK = [domain hasSuffix:cookieDomain]; + } + + BOOL isPathOK = [cookiePath isEqual:@"/"] || [path hasPrefix:cookiePath]; + BOOL isSecureOK = (!cookieIsSecure) || [scheme isEqual:@"https"]; + + if (isDomainOK && isPathOK && isSecureOK) { + if (foundCookies == nil) { + foundCookies = [NSMutableArray arrayWithCapacity:1]; + } + [foundCookies addObject:storedCookie]; + } + } + } + return foundCookies; +} + +// Return a cookie from the array with the same name, domain, and path as the +// given cookie, or else return nil if none found. +// +// Both the cookie being tested and all cookies in the storage array should +// be valid (non-nil name, domains, paths). +// +// Note: this should only be called from inside a @synchronized(cookies_) block +- (NSHTTPCookie *)cookieMatchingCookie:(NSHTTPCookie *)cookie { + + NSUInteger numberOfCookies = [cookies_ count]; + NSString *name = [cookie name]; + NSString *domain = [cookie domain]; + NSString *path = [cookie path]; + + NSAssert3(name && domain && path, @"Invalid cookie (name:%@ domain:%@ path:%@)", + name, domain, path); + + for (NSUInteger idx = 0; idx < numberOfCookies; idx++) { + + NSHTTPCookie *storedCookie = [cookies_ objectAtIndex:idx]; + + if ([[storedCookie name] isEqual:name] + && [[storedCookie domain] isEqual:domain] + && [[storedCookie path] isEqual:path]) { + + return storedCookie; + } + } + return nil; +} + + +// Internal routine to remove any expired cookies from the array, excluding +// cookies with nil expirations. +// +// Note: this should only be called from inside a @synchronized(cookies_) block +- (void)removeExpiredCookies { + + // count backwards since we're deleting items from the array + for (NSInteger idx = (NSInteger)[cookies_ count] - 1; idx >= 0; idx--) { + + NSHTTPCookie *storedCookie = [cookies_ objectAtIndex:(NSUInteger)idx]; + + NSDate *expiresDate = [storedCookie expiresDate]; + if (expiresDate && [expiresDate timeIntervalSinceNow] < 0) { + [cookies_ removeObjectAtIndex:(NSUInteger)idx]; + } + } +} + +- (void)removeAllCookies { + @synchronized(cookies_) { + [cookies_ removeAllObjects]; + } +} +@end + +// +// GTMCachedURLResponse +// + +@implementation GTMCachedURLResponse + +@synthesize response = response_; +@synthesize data = data_; +@synthesize reservationDate = reservationDate_; +@synthesize useDate = useDate_; + +- (id)initWithResponse:(NSURLResponse *)response data:(NSData *)data { + self = [super init]; + if (self != nil) { + response_ = [response retain]; + data_ = [data retain]; + useDate_ = [[NSDate alloc] init]; + } + return self; +} + +- (void)dealloc { + [response_ release]; + [data_ release]; + [useDate_ release]; + [reservationDate_ release]; + [super dealloc]; +} + +- (NSString *)description { + NSString *reservationStr = reservationDate_ ? + [NSString stringWithFormat:@" resDate:%@", reservationDate_] : @""; + + return [NSString stringWithFormat:@"%@ %p: {bytes:%@ useDate:%@%@}", + [self class], self, + data_ ? [NSNumber numberWithInt:(int)[data_ length]] : nil, + useDate_, + reservationStr]; +} + +- (NSComparisonResult)compareUseDate:(GTMCachedURLResponse *)other { + return [useDate_ compare:[other useDate]]; +} + +@end + +// +// GTMURLCache +// + +@implementation GTMURLCache + +@dynamic memoryCapacity; + +- (id)init { + return [self initWithMemoryCapacity:kGTMDefaultETaggedDataCacheMemoryCapacity]; +} + +- (id)initWithMemoryCapacity:(NSUInteger)totalBytes { + self = [super init]; + if (self != nil) { + memoryCapacity_ = totalBytes; + + responses_ = [[NSMutableDictionary alloc] initWithCapacity:5]; + + reservationInterval_ = kCachedURLReservationInterval; + } + return self; +} + +- (void)dealloc { + [responses_ release]; + [super dealloc]; +} + +- (NSString *)description { + return [NSString stringWithFormat:@"%@ %p: {responses:%@}", + [self class], self, [responses_ allValues]]; +} + +// Setters/getters + +- (void)pruneCacheResponses { + // Internal routine to remove the least-recently-used responses when the + // cache has grown too large + if (memoryCapacity_ >= totalDataSize_) return; + + // Sort keys by date + SEL sel = @selector(compareUseDate:); + NSArray *sortedKeys = [responses_ keysSortedByValueUsingSelector:sel]; + + // The least-recently-used keys are at the beginning of the sorted array; + // remove those (except ones still reserved) until the total data size is + // reduced sufficiently + for (NSURL *key in sortedKeys) { + GTMCachedURLResponse *response = [responses_ objectForKey:key]; + + NSDate *resDate = [response reservationDate]; + BOOL isResponseReserved = (resDate != nil) + && ([resDate timeIntervalSinceNow] > -reservationInterval_); + + if (!isResponseReserved) { + // We can remove this response from the cache + NSUInteger storedSize = [[response data] length]; + totalDataSize_ -= storedSize; + [responses_ removeObjectForKey:key]; + } + + // If we've removed enough response data, then we're done + if (memoryCapacity_ >= totalDataSize_) break; + } +} + +- (void)storeCachedResponse:(GTMCachedURLResponse *)cachedResponse + forRequest:(NSURLRequest *)request { + @synchronized(self) { + // Remove any previous entry for this request + [self removeCachedResponseForRequest:request]; + + // cache this one only if it's not bigger than our cache + NSUInteger storedSize = [[cachedResponse data] length]; + if (storedSize < memoryCapacity_) { + + NSURL *key = [request URL]; + [responses_ setObject:cachedResponse forKey:key]; + totalDataSize_ += storedSize; + + [self pruneCacheResponses]; + } + } +} + +- (GTMCachedURLResponse *)cachedResponseForRequest:(NSURLRequest *)request { + GTMCachedURLResponse *response; + + @synchronized(self) { + NSURL *key = [request URL]; + response = [[[responses_ objectForKey:key] retain] autorelease]; + + // Touch the date to indicate this was recently retrieved + [response setUseDate:[NSDate date]]; + } + return response; +} + +- (void)removeCachedResponseForRequest:(NSURLRequest *)request { + @synchronized(self) { + NSURL *key = [request URL]; + totalDataSize_ -= [[[responses_ objectForKey:key] data] length]; + [responses_ removeObjectForKey:key]; + } +} + +- (void)removeAllCachedResponses { + @synchronized(self) { + [responses_ removeAllObjects]; + totalDataSize_ = 0; + } +} + +- (NSUInteger)memoryCapacity { + return memoryCapacity_; +} + +- (void)setMemoryCapacity:(NSUInteger)totalBytes { + @synchronized(self) { + BOOL didShrink = (totalBytes < memoryCapacity_); + memoryCapacity_ = totalBytes; + + if (didShrink) { + [self pruneCacheResponses]; + } + } +} + +// Methods for unit testing. +- (void)setReservationInterval:(NSTimeInterval)secs { + reservationInterval_ = secs; +} + +- (NSDictionary *)responses { + return responses_; +} + +- (NSUInteger)totalDataSize { + return totalDataSize_; +} + +@end + +// +// GTMHTTPFetchHistory +// + +@interface GTMHTTPFetchHistory () +- (NSString *)cachedETagForRequest:(NSURLRequest *)request; +- (void)removeCachedDataForRequest:(NSURLRequest *)request; +@end + +@implementation GTMHTTPFetchHistory + +@synthesize cookieStorage = cookieStorage_; + +@dynamic shouldRememberETags; +@dynamic shouldCacheETaggedData; +@dynamic memoryCapacity; + +- (id)init { + return [self initWithMemoryCapacity:kGTMDefaultETaggedDataCacheMemoryCapacity + shouldCacheETaggedData:NO]; +} + +- (id)initWithMemoryCapacity:(NSUInteger)totalBytes + shouldCacheETaggedData:(BOOL)shouldCacheETaggedData { + self = [super init]; + if (self != nil) { + etaggedDataCache_ = [[GTMURLCache alloc] initWithMemoryCapacity:totalBytes]; + shouldRememberETags_ = shouldCacheETaggedData; + shouldCacheETaggedData_ = shouldCacheETaggedData; + cookieStorage_ = [[GTMCookieStorage alloc] init]; + } + return self; +} + +- (void)dealloc { + [etaggedDataCache_ release]; + [cookieStorage_ release]; + [super dealloc]; +} + +- (void)updateRequest:(NSMutableURLRequest *)request isHTTPGet:(BOOL)isHTTPGet { + @synchronized(self) { + if ([self shouldRememberETags]) { + // If this URL is in the history, and no ETag has been set, then + // set the ETag header field + + // If we have a history, we're tracking across fetches, so we don't + // want to pull results from any other cache + [request setCachePolicy:NSURLRequestReloadIgnoringCacheData]; + + if (isHTTPGet) { + // We'll only add an ETag if there's no ETag specified in the user's + // request + NSString *specifiedETag = [request valueForHTTPHeaderField:kGTMIfNoneMatchHeader]; + if (specifiedETag == nil) { + // No ETag: extract the previous ETag for this request from the + // fetch history, and add it to the request + NSString *cachedETag = [self cachedETagForRequest:request]; + + if (cachedETag != nil) { + [request addValue:cachedETag forHTTPHeaderField:kGTMIfNoneMatchHeader]; + } + } else { + // Has an ETag: remove any stored response in the fetch history + // for this request, as the If-None-Match header could lead to + // a 304 Not Modified, and we want that error delivered to the + // user since they explicitly specified the ETag + [self removeCachedDataForRequest:request]; + } + } + } + } +} + +- (void)updateFetchHistoryWithRequest:(NSURLRequest *)request + response:(NSURLResponse *)response + downloadedData:(NSData *)downloadedData { + @synchronized(self) { + if (![self shouldRememberETags]) return; + + if (![response respondsToSelector:@selector(allHeaderFields)]) return; + + NSInteger statusCode = [(NSHTTPURLResponse *)response statusCode]; + + if (statusCode != kGTMHTTPFetcherStatusNotModified) { + // Save this ETag string for successful results (<300) + // If there's no last modified string, clear the dictionary + // entry for this URL. Also cache or delete the data, if appropriate + // (when etaggedDataCache is non-nil.) + NSDictionary *headers = [(NSHTTPURLResponse *)response allHeaderFields]; + NSString* etag = [headers objectForKey:kGTMETagHeader]; + + if (etag != nil && statusCode < 300) { + + // we want to cache responses for the headers, even if the client + // doesn't want the response body data caches + NSData *dataToStore = shouldCacheETaggedData_ ? downloadedData : nil; + + GTMCachedURLResponse *cachedResponse; + cachedResponse = [[[GTMCachedURLResponse alloc] initWithResponse:response + data:dataToStore] autorelease]; + [etaggedDataCache_ storeCachedResponse:cachedResponse + forRequest:request]; + } else { + [etaggedDataCache_ removeCachedResponseForRequest:request]; + } + } + } +} + +- (NSString *)cachedETagForRequest:(NSURLRequest *)request { + // Internal routine. + GTMCachedURLResponse *cachedResponse; + cachedResponse = [etaggedDataCache_ cachedResponseForRequest:request]; + + NSURLResponse *response = [cachedResponse response]; + NSDictionary *headers = [(NSHTTPURLResponse *)response allHeaderFields]; + NSString *cachedETag = [headers objectForKey:kGTMETagHeader]; + if (cachedETag) { + // Since the request having an ETag implies this request is about + // to be fetched again, reserve the cached response to ensure that + // that it will be around at least until the fetch completes. + // + // When the fetch completes, either the cached response will be replaced + // with a new response, or the cachedDataForRequest: method below will + // clear the reservation. + [cachedResponse setReservationDate:[NSDate date]]; + } + return cachedETag; +} + +- (NSData *)cachedDataForRequest:(NSURLRequest *)request { + @synchronized(self) { + GTMCachedURLResponse *cachedResponse; + cachedResponse = [etaggedDataCache_ cachedResponseForRequest:request]; + + NSData *cachedData = [cachedResponse data]; + + // Since the data for this cached request is being obtained from the cache, + // we can clear the reservation as the fetch has completed. + [cachedResponse setReservationDate:nil]; + + return cachedData; + } +} + +- (void)removeCachedDataForRequest:(NSURLRequest *)request { + @synchronized(self) { + [etaggedDataCache_ removeCachedResponseForRequest:request]; + } +} + +- (void)clearETaggedDataCache { + @synchronized(self) { + [etaggedDataCache_ removeAllCachedResponses]; + } +} + +- (void)clearHistory { + @synchronized(self) { + [self clearETaggedDataCache]; + [cookieStorage_ removeAllCookies]; + } +} + +- (void)removeAllCookies { + @synchronized(self) { + [cookieStorage_ removeAllCookies]; + } +} + +- (BOOL)shouldRememberETags { + return shouldRememberETags_; +} + +- (void)setShouldRememberETags:(BOOL)flag { + BOOL wasRemembering = shouldRememberETags_; + shouldRememberETags_ = flag; + + if (wasRemembering && !flag) { + // Free up the cache memory + [self clearETaggedDataCache]; + } +} + +- (BOOL)shouldCacheETaggedData { + return shouldCacheETaggedData_; +} + +- (void)setShouldCacheETaggedData:(BOOL)flag { + BOOL wasCaching = shouldCacheETaggedData_; + shouldCacheETaggedData_ = flag; + + if (flag) { + self.shouldRememberETags = YES; + } + + if (wasCaching && !flag) { + // users expect turning off caching to free up the cache memory + [self clearETaggedDataCache]; + } +} + +- (NSUInteger)memoryCapacity { + return [etaggedDataCache_ memoryCapacity]; +} + +- (void)setMemoryCapacity:(NSUInteger)totalBytes { + [etaggedDataCache_ setMemoryCapacity:totalBytes]; +} + +@end diff --git a/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPFetcher.h.svn-base b/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPFetcher.h.svn-base new file mode 100644 index 0000000..e497737 --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPFetcher.h.svn-base @@ -0,0 +1,748 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMHTTPFetcher.h +// + +// This is essentially a wrapper around NSURLConnection for POSTs and GETs. +// If setPostData: is called, then POST is assumed. +// +// When would you use this instead of NSURLConnection? +// +// - When you just want the result from a GET, POST, or PUT +// - When you want the "standard" behavior for connections (redirection handling +// an so on) +// - When you want automatic retry on failures +// - When you want to avoid cookie collisions with Safari and other applications +// - When you are fetching resources with ETags and want to avoid the overhead +// of repeated fetches of unchanged data +// - When you need to set a credential for the http operation +// +// This is assumed to be a one-shot fetch request; don't reuse the object +// for a second fetch. +// +// The fetcher may be created auto-released, in which case it will release +// itself after the fetch completion callback. The fetcher is implicitly +// retained as long as a connection is pending. +// +// But if you may need to cancel the fetcher, retain it and have the delegate +// release the fetcher in the callbacks. +// +// Sample usage: +// +// NSURLRequest *request = [NSURLRequest requestWithURL:myURL]; +// GTMHTTPFetcher* myFetcher = [GTMHTTPFetcher fetcherWithRequest:request]; +// +// // optional upload body data +// [myFetcher setPostData:[postString dataUsingEncoding:NSUTF8StringEncoding]]; +// +// [myFetcher beginFetchWithDelegate:self +// didFinishSelector:@selector(myFetcher:finishedWithData:error:)]; +// +// Upon fetch completion, the callback selector is invoked; it should have +// this signature (you can use any callback method name you want so long as +// the signature matches this): +// +// - (void)myFetcher:(GTMHTTPFetcher *)fetcher finishedWithData:(NSData *)retrievedData error:(NSError *)error; +// +// The block callback version looks like: +// +// [myFetcher beginFetchWithCompletionHandler:^(NSData *retrievedData, NSError *error) { +// if (error != nil) { +// // status code or network error +// } else { +// // succeeded +// } +// }]; + +// +// NOTE: Fetches may retrieve data from the server even though the server +// returned an error. The failure selector is called when the server +// status is >= 300, with an NSError having domain +// kGTMHTTPFetcherStatusDomain and code set to the server status. +// +// Status codes are at +// +// +// Threading and queue support: +// +// Callbacks require either that the thread used to start the fetcher have a run +// loop spinning (typically the main thread), or that an NSOperationQueue be +// provided upon which the delegate callbacks will be called. Starting with +// iOS 6 and Mac OS X 10.7, clients may simply create an operation queue for +// callbacks on a background thread: +// +// fetcher.delegateQueue = [[[NSOperationQueue alloc] init] autorelease]; +// +// or specify the main queue for callbacks on the main thread: +// +// fetcher.delegateQueue = [NSOperationQueue mainQueue]; +// +// The client may also re-dispatch from the callbacks and notifications to +// a known dispatch queue: +// +// [myFetcher beginFetchWithCompletionHandler:^(NSData *retrievedData, NSError *error) { +// if (error == nil) { +// dispatch_async(myDispatchQueue, ^{ +// ... +// }); +// } +// }]; +// +// +// +// Downloading to disk: +// +// To have downloaded data saved directly to disk, specify either a path for the +// downloadPath property, or a file handle for the downloadFileHandle property. +// When downloading to disk, callbacks will be passed a nil for the NSData* +// arguments. +// +// +// HTTP methods and headers: +// +// Alternative HTTP methods, like PUT, and custom headers can be specified by +// creating the fetcher with an appropriate NSMutableURLRequest +// +// +// Proxies: +// +// Proxy handling is invisible so long as the system has a valid credential in +// the keychain, which is normally true (else most NSURL-based apps would have +// difficulty.) But when there is a proxy authetication error, the the fetcher +// will call the failedWithError: method with the NSURLChallenge in the error's +// userInfo. The error method can get the challenge info like this: +// +// NSURLAuthenticationChallenge *challenge +// = [[error userInfo] objectForKey:kGTMHTTPFetcherErrorChallengeKey]; +// BOOL isProxyChallenge = [[challenge protectionSpace] isProxy]; +// +// If a proxy error occurs, you can ask the user for the proxy username/password +// and call fetcher's setProxyCredential: to provide those for the +// next attempt to fetch. +// +// +// Cookies: +// +// There are three supported mechanisms for remembering cookies between fetches. +// +// By default, GTMHTTPFetcher uses a mutable array held statically to track +// cookies for all instantiated fetchers. This avoids server cookies being set +// by servers for the application from interfering with Safari cookie settings, +// and vice versa. The fetcher cookies are lost when the application quits. +// +// To rely instead on WebKit's global NSHTTPCookieStorage, call +// setCookieStorageMethod: with kGTMHTTPFetcherCookieStorageMethodSystemDefault. +// +// If the fetcher is created from a GTMHTTPFetcherService object +// then the cookie storage mechanism is set to use the cookie storage in the +// service object rather than the static storage. +// +// +// Fetching for periodic checks: +// +// The fetcher object tracks ETag headers from responses and +// provide an "If-None-Match" header. This allows the server to save +// bandwidth by providing a status message instead of repeated response +// data. +// +// To get this behavior, create the fetcher from an GTMHTTPFetcherService object +// and look for a fetch callback error with code 304 +// (kGTMHTTPFetcherStatusNotModified) like this: +// +// - (void)myFetcher:(GTMHTTPFetcher *)fetcher finishedWithData:(NSData *)data error:(NSError *)error { +// if ([error code] == kGTMHTTPFetcherStatusNotModified) { +// // |data| is empty; use the data from the previous finishedWithData: for this URL +// } else { +// // handle other server status code +// } +// } +// +// +// Monitoring received data +// +// The optional received data selector can be set with setReceivedDataSelector: +// and should have the signature +// +// - (void)myFetcher:(GTMHTTPFetcher *)fetcher receivedData:(NSData *)dataReceivedSoFar; +// +// The number bytes received so far is available as [fetcher downloadedLength]. +// This number may go down if a redirect causes the download to begin again from +// a new server. +// +// If supplied by the server, the anticipated total download size is available +// as [[myFetcher response] expectedContentLength] (and may be -1 for unknown +// download sizes.) +// +// +// Automatic retrying of fetches +// +// The fetcher can optionally create a timer and reattempt certain kinds of +// fetch failures (status codes 408, request timeout; 503, service unavailable; +// 504, gateway timeout; networking errors NSURLErrorTimedOut and +// NSURLErrorNetworkConnectionLost.) The user may set a retry selector to +// customize the type of errors which will be retried. +// +// Retries are done in an exponential-backoff fashion (that is, after 1 second, +// 2, 4, 8, and so on.) +// +// Enabling automatic retries looks like this: +// [myFetcher setRetryEnabled:YES]; +// +// With retries enabled, the success or failure callbacks are called only +// when no more retries will be attempted. Calling the fetcher's stopFetching +// method will terminate the retry timer, without the finished or failure +// selectors being invoked. +// +// Optionally, the client may set the maximum retry interval: +// [myFetcher setMaxRetryInterval:60.0]; // in seconds; default is 60 seconds +// // for downloads, 600 for uploads +// +// Also optionally, the client may provide a callback selector to determine +// if a status code or other error should be retried. +// [myFetcher setRetrySelector:@selector(myFetcher:willRetry:forError:)]; +// +// If set, the retry selector should have the signature: +// -(BOOL)fetcher:(GTMHTTPFetcher *)fetcher willRetry:(BOOL)suggestedWillRetry forError:(NSError *)error +// and return YES to set the retry timer or NO to fail without additional +// fetch attempts. +// +// The retry method may return the |suggestedWillRetry| argument to get the +// default retry behavior. Server status codes are present in the +// error argument, and have the domain kGTMHTTPFetcherStatusDomain. The +// user's method may look something like this: +// +// -(BOOL)myFetcher:(GTMHTTPFetcher *)fetcher willRetry:(BOOL)suggestedWillRetry forError:(NSError *)error { +// +// // perhaps examine [error domain] and [error code], or [fetcher retryCount] +// // +// // return YES to start the retry timer, NO to proceed to the failure +// // callback, or |suggestedWillRetry| to get default behavior for the +// // current error domain and code values. +// return suggestedWillRetry; +// } + + + +#pragma once + +#import + +#if defined(GTL_TARGET_NAMESPACE) + // we're using target namespace macros + #import "GTLDefines.h" +#elif defined(GDATA_TARGET_NAMESPACE) + #import "GDataDefines.h" +#else + #if TARGET_OS_IPHONE + #ifndef GTM_FOUNDATION_ONLY + #define GTM_FOUNDATION_ONLY 1 + #endif + #ifndef GTM_IPHONE + #define GTM_IPHONE 1 + #endif + #endif +#endif + +#if TARGET_OS_IPHONE && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 40000) + #define GTM_BACKGROUND_FETCHING 1 +#endif + +#undef _EXTERN +#undef _INITIALIZE_AS +#ifdef GTMHTTPFETCHER_DEFINE_GLOBALS + #define _EXTERN + #define _INITIALIZE_AS(x) =x +#else + #if defined(__cplusplus) + #define _EXTERN extern "C" + #else + #define _EXTERN extern + #endif + #define _INITIALIZE_AS(x) +#endif + +// notifications +// +// fetch started and stopped, and fetch retry delay started and stopped +_EXTERN NSString* const kGTMHTTPFetcherStartedNotification _INITIALIZE_AS(@"kGTMHTTPFetcherStartedNotification"); +_EXTERN NSString* const kGTMHTTPFetcherStoppedNotification _INITIALIZE_AS(@"kGTMHTTPFetcherStoppedNotification"); +_EXTERN NSString* const kGTMHTTPFetcherRetryDelayStartedNotification _INITIALIZE_AS(@"kGTMHTTPFetcherRetryDelayStartedNotification"); +_EXTERN NSString* const kGTMHTTPFetcherRetryDelayStoppedNotification _INITIALIZE_AS(@"kGTMHTTPFetcherRetryDelayStoppedNotification"); + +// callback constants +_EXTERN NSString* const kGTMHTTPFetcherErrorDomain _INITIALIZE_AS(@"com.google.GTMHTTPFetcher"); +_EXTERN NSString* const kGTMHTTPFetcherStatusDomain _INITIALIZE_AS(@"com.google.HTTPStatus"); +_EXTERN NSString* const kGTMHTTPFetcherErrorChallengeKey _INITIALIZE_AS(@"challenge"); +_EXTERN NSString* const kGTMHTTPFetcherStatusDataKey _INITIALIZE_AS(@"data"); // data returned with a kGTMHTTPFetcherStatusDomain error + +enum { + kGTMHTTPFetcherErrorDownloadFailed = -1, + kGTMHTTPFetcherErrorAuthenticationChallengeFailed = -2, + kGTMHTTPFetcherErrorChunkUploadFailed = -3, + kGTMHTTPFetcherErrorFileHandleException = -4, + kGTMHTTPFetcherErrorBackgroundExpiration = -6, + + // The code kGTMHTTPFetcherErrorAuthorizationFailed (-5) has been removed; + // look for status 401 instead. + + kGTMHTTPFetcherStatusNotModified = 304, + kGTMHTTPFetcherStatusBadRequest = 400, + kGTMHTTPFetcherStatusUnauthorized = 401, + kGTMHTTPFetcherStatusForbidden = 403, + kGTMHTTPFetcherStatusPreconditionFailed = 412 +}; + +// cookie storage methods +enum { + kGTMHTTPFetcherCookieStorageMethodStatic = 0, + kGTMHTTPFetcherCookieStorageMethodFetchHistory = 1, + kGTMHTTPFetcherCookieStorageMethodSystemDefault = 2, + kGTMHTTPFetcherCookieStorageMethodNone = 3 +}; + +#ifdef __cplusplus +extern "C" { +#endif + +void GTMAssertSelectorNilOrImplementedWithArgs(id obj, SEL sel, ...); + +// Utility functions for applications self-identifying to servers via a +// user-agent header + +// Make a proper app name without whitespace from the given string, removing +// whitespace and other characters that may be special parsed marks of +// the full user-agent string. +NSString *GTMCleanedUserAgentString(NSString *str); + +// Make an identifier like "MacOSX/10.7.1" or "iPod_Touch/4.1" +NSString *GTMSystemVersionString(void); + +// Make a generic name and version for the current application, like +// com.example.MyApp/1.2.3 relying on the bundle identifier and the +// CFBundleShortVersionString or CFBundleVersion. If no bundle ID +// is available, the process name preceded by "proc_" is used. +NSString *GTMApplicationIdentifier(NSBundle *bundle); + +#ifdef __cplusplus +} // extern "C" +#endif + +@class GTMHTTPFetcher; + +@protocol GTMCookieStorageProtocol +// This protocol allows us to call into the service without requiring +// GTMCookieStorage sources in this project +// +// The public interface for cookie handling is the GTMCookieStorage class, +// accessible from a fetcher service object's fetchHistory or from the fetcher's +// +staticCookieStorage method. +- (NSArray *)cookiesForURL:(NSURL *)theURL; +- (void)setCookies:(NSArray *)newCookies; +@end + +@protocol GTMHTTPFetchHistoryProtocol +// This protocol allows us to call the fetch history object without requiring +// GTMHTTPFetchHistory sources in this project +- (void)updateRequest:(NSMutableURLRequest *)request isHTTPGet:(BOOL)isHTTPGet; +- (BOOL)shouldCacheETaggedData; +- (NSData *)cachedDataForRequest:(NSURLRequest *)request; +- (id )cookieStorage; +- (void)updateFetchHistoryWithRequest:(NSURLRequest *)request + response:(NSURLResponse *)response + downloadedData:(NSData *)downloadedData; +- (void)removeCachedDataForRequest:(NSURLRequest *)request; +@end + +@protocol GTMHTTPFetcherServiceProtocol +// This protocol allows us to call into the service without requiring +// GTMHTTPFetcherService sources in this project + +@property (retain) NSOperationQueue *delegateQueue; + +- (BOOL)fetcherShouldBeginFetching:(GTMHTTPFetcher *)fetcher; +- (void)fetcherDidStop:(GTMHTTPFetcher *)fetcher; + +- (GTMHTTPFetcher *)fetcherWithRequest:(NSURLRequest *)request; +- (BOOL)isDelayingFetcher:(GTMHTTPFetcher *)fetcher; +@end + +@protocol GTMFetcherAuthorizationProtocol +@required +// This protocol allows us to call the authorizer without requiring its sources +// in this project +- (void)authorizeRequest:(NSMutableURLRequest *)request + delegate:(id)delegate + didFinishSelector:(SEL)sel; + +- (void)stopAuthorization; + +- (void)stopAuthorizationForRequest:(NSURLRequest *)request; + +- (BOOL)isAuthorizingRequest:(NSURLRequest *)request; + +- (BOOL)isAuthorizedRequest:(NSURLRequest *)request; + +- (NSString *)userEmail; + +@optional +@property (assign) id fetcherService; // WEAK + +- (BOOL)primeForRefresh; +@end + +// GTMHTTPFetcher objects are used for async retrieval of an http get or post +// +// See additional comments at the beginning of this file +@interface GTMHTTPFetcher : NSObject { + @protected + NSMutableURLRequest *request_; + NSURLConnection *connection_; + NSMutableData *downloadedData_; + NSString *downloadPath_; + NSString *temporaryDownloadPath_; + NSFileHandle *downloadFileHandle_; + unsigned long long downloadedLength_; + NSURLCredential *credential_; // username & password + NSURLCredential *proxyCredential_; // credential supplied to proxy servers + NSData *postData_; + NSInputStream *postStream_; + NSMutableData *loggedStreamData_; + NSURLResponse *response_; // set in connection:didReceiveResponse: + id delegate_; + SEL finishedSel_; // should by implemented by delegate + SEL sentDataSel_; // optional, set with setSentDataSelector + SEL receivedDataSel_; // optional, set with setReceivedDataSelector +#if NS_BLOCKS_AVAILABLE + void (^completionBlock_)(NSData *, NSError *); + void (^receivedDataBlock_)(NSData *); + void (^sentDataBlock_)(NSInteger, NSInteger, NSInteger); + BOOL (^retryBlock_)(BOOL, NSError *); +#elif !__LP64__ + // placeholders: for 32-bit builds, keep the size of the object's ivar section + // the same with and without blocks + id completionPlaceholder_; + id receivedDataPlaceholder_; + id sentDataPlaceholder_; + id retryPlaceholder_; +#endif + BOOL hasConnectionEnded_; // set if the connection need not be cancelled + BOOL isCancellingChallenge_; // set only when cancelling an auth challenge + BOOL isStopNotificationNeeded_; // set when start notification has been sent + BOOL shouldFetchInBackground_; +#if GTM_BACKGROUND_FETCHING + NSUInteger backgroundTaskIdentifer_; // UIBackgroundTaskIdentifier +#endif + id userData_; // retained, if set by caller + NSMutableDictionary *properties_; // more data retained for caller + NSArray *runLoopModes_; // optional + NSOperationQueue *delegateQueue_; // optional; available iOS 6/10.7 and later + id fetchHistory_; // if supplied by the caller, used for Last-Modified-Since checks and cookies + NSInteger cookieStorageMethod_; // constant from above + id cookieStorage_; + + id authorizer_; + + // the service object that created and monitors this fetcher, if any + id service_; + NSString *serviceHost_; + NSInteger servicePriority_; + NSThread *thread_; + + BOOL isRetryEnabled_; // user wants auto-retry + SEL retrySel_; // optional; set with setRetrySelector + NSTimer *retryTimer_; + NSUInteger retryCount_; + NSTimeInterval maxRetryInterval_; // default 600 seconds + NSTimeInterval minRetryInterval_; // random between 1 and 2 seconds + NSTimeInterval retryFactor_; // default interval multiplier is 2 + NSTimeInterval lastRetryInterval_; + BOOL hasAttemptedAuthRefresh_; + + NSString *comment_; // comment for log + NSString *log_; +#if !STRIP_GTM_FETCH_LOGGING + NSString *logRequestBody_; + NSString *logResponseBody_; + BOOL shouldDeferResponseBodyLogging_; +#endif +} + +// Create a fetcher +// +// fetcherWithRequest will return an autoreleased fetcher, but if +// the connection is successfully created, the connection should retain the +// fetcher for the life of the connection as well. So the caller doesn't have +// to retain the fetcher explicitly unless they want to be able to cancel it. ++ (GTMHTTPFetcher *)fetcherWithRequest:(NSURLRequest *)request; + +// Convenience methods that make a request, like +fetcherWithRequest ++ (GTMHTTPFetcher *)fetcherWithURL:(NSURL *)requestURL; ++ (GTMHTTPFetcher *)fetcherWithURLString:(NSString *)requestURLString; + +// Designated initializer +- (id)initWithRequest:(NSURLRequest *)request; + +// Fetcher request +// +// The underlying request is mutable and may be modified by the caller +@property (retain) NSMutableURLRequest *mutableRequest; + +// Setting the credential is optional; it is used if the connection receives +// an authentication challenge +@property (retain) NSURLCredential *credential; + +// Setting the proxy credential is optional; it is used if the connection +// receives an authentication challenge from a proxy +@property (retain) NSURLCredential *proxyCredential; + +// If post data or stream is not set, then a GET retrieval method is assumed +@property (retain) NSData *postData; +@property (retain) NSInputStream *postStream; + +// The default cookie storage method is kGTMHTTPFetcherCookieStorageMethodStatic +// without a fetch history set, and kGTMHTTPFetcherCookieStorageMethodFetchHistory +// with a fetch history set +// +// Applications needing control of cookies across a sequence of fetches should +// create fetchers from a GTMHTTPFetcherService object (which encapsulates +// fetch history) for a well-defined cookie store +@property (assign) NSInteger cookieStorageMethod; + ++ (id )staticCookieStorage; + +// Object to add authorization to the request, if needed +@property (retain) id authorizer; + +// The service object that created and monitors this fetcher, if any +@property (retain) id service; + +// The host, if any, used to classify this fetcher in the fetcher service +@property (copy) NSString *serviceHost; + +// The priority, if any, used for starting fetchers in the fetcher service +// +// Lower values are higher priority; the default is 0, and values may +// be negative or positive. This priority affects only the start order of +// fetchers that are being delayed by a fetcher service. +@property (assign) NSInteger servicePriority; + +// The thread used to run this fetcher in the fetcher service when no operation +// queue is provided. +@property (retain) NSThread *thread; + +// The delegate is retained during the connection +@property (retain) id delegate; + +// On iOS 4 and later, the fetch may optionally continue while the app is in the +// background until finished or stopped by OS expiration +// +// The default value is NO +// +// For Mac OS X, background fetches are always supported, and this property +// is ignored +@property (assign) BOOL shouldFetchInBackground; + +// The delegate's optional sentData selector may be used to monitor upload +// progress. It should have a signature like: +// - (void)myFetcher:(GTMHTTPFetcher *)fetcher +// didSendBytes:(NSInteger)bytesSent +// totalBytesSent:(NSInteger)totalBytesSent +// totalBytesExpectedToSend:(NSInteger)totalBytesExpectedToSend; +// +// +doesSupportSentDataCallback indicates if this delegate method is supported ++ (BOOL)doesSupportSentDataCallback; + +@property (assign) SEL sentDataSelector; + +// The delegate's optional receivedData selector may be used to monitor download +// progress. It should have a signature like: +// - (void)myFetcher:(GTMHTTPFetcher *)fetcher +// receivedData:(NSData *)dataReceivedSoFar; +// +// The dataReceived argument will be nil when downloading to a path or to a +// file handle. +// +// Applications should not use this method to accumulate the received data; +// the callback method or block supplied to the beginFetch call will have +// the complete NSData received. +@property (assign) SEL receivedDataSelector; + +#if NS_BLOCKS_AVAILABLE +// The full interface to the block is provided rather than just a typedef for +// its parameter list in order to get more useful code completion in the Xcode +// editor +@property (copy) void (^sentDataBlock)(NSInteger bytesSent, NSInteger totalBytesSent, NSInteger bytesExpectedToSend); + +// The dataReceived argument will be nil when downloading to a path or to +// a file handle +@property (copy) void (^receivedDataBlock)(NSData *dataReceivedSoFar); +#endif + +// retrying; see comments at the top of the file. Calling +// setRetryEnabled(YES) resets the min and max retry intervals. +@property (assign, getter=isRetryEnabled) BOOL retryEnabled; + +// Retry selector or block is optional for retries. +// +// If present, it should have the signature: +// -(BOOL)fetcher:(GTMHTTPFetcher *)fetcher willRetry:(BOOL)suggestedWillRetry forError:(NSError *)error +// and return YES to cause a retry. See comments at the top of this file. +@property (assign) SEL retrySelector; + +#if NS_BLOCKS_AVAILABLE +@property (copy) BOOL (^retryBlock)(BOOL suggestedWillRetry, NSError *error); +#endif + +// Retry intervals must be strictly less than maxRetryInterval, else +// they will be limited to maxRetryInterval and no further retries will +// be attempted. Setting maxRetryInterval to 0.0 will reset it to the +// default value, 600 seconds. + +@property (assign) NSTimeInterval maxRetryInterval; + +// Starting retry interval. Setting minRetryInterval to 0.0 will reset it +// to a random value between 1.0 and 2.0 seconds. Clients should normally not +// call this except for unit testing. +@property (assign) NSTimeInterval minRetryInterval; + +// Multiplier used to increase the interval between retries, typically 2.0. +// Clients should not need to call this. +@property (assign) double retryFactor; + +// Number of retries attempted +@property (readonly) NSUInteger retryCount; + +// interval delay to precede next retry +@property (readonly) NSTimeInterval nextRetryInterval; + +// Begin fetching the request +// +// The delegate can optionally implement the finished selectors or pass NULL +// for it. +// +// Returns YES if the fetch is initiated. The delegate is retained between +// the beginFetch call until after the finish callback. +// +// An error is passed to the callback for server statuses 300 or +// higher, with the status stored as the error object's code. +// +// finishedSEL has a signature like: +// - (void)fetcher:(GTMHTTPFetcher *)fetcher finishedWithData:(NSData *)data error:(NSError *)error; +// +// If the application has specified a downloadPath or downloadFileHandle +// for the fetcher, the data parameter passed to the callback will be nil. + +- (BOOL)beginFetchWithDelegate:(id)delegate + didFinishSelector:(SEL)finishedSEL; + +#if NS_BLOCKS_AVAILABLE +- (BOOL)beginFetchWithCompletionHandler:(void (^)(NSData *data, NSError *error))handler; +#endif + + +// Returns YES if this is in the process of fetching a URL +- (BOOL)isFetching; + +// Cancel the fetch of the request that's currently in progress +- (void)stopFetching; + +// Return the status code from the server response +@property (readonly) NSInteger statusCode; + +// Return the http headers from the response +@property (retain, readonly) NSDictionary *responseHeaders; + +// The response, once it's been received +@property (retain) NSURLResponse *response; + +// Bytes downloaded so far +@property (readonly) unsigned long long downloadedLength; + +// Buffer of currently-downloaded data +@property (readonly, retain) NSData *downloadedData; + +// Path in which to non-atomically create a file for storing the downloaded data +// +// The path must be set before fetching begins. The download file handle +// will be created for the path, and can be used to monitor progress. If a file +// already exists at the path, it will be overwritten. +@property (copy) NSString *downloadPath; + +// If downloadFileHandle is set, data received is immediately appended to +// the file handle rather than being accumulated in the downloadedData property +// +// The file handle supplied must allow writing and support seekToFileOffset:, +// and must be set before fetching begins. Setting a download path will +// override the file handle property. +@property (retain) NSFileHandle *downloadFileHandle; + +// The optional fetchHistory object is used for a sequence of fetchers to +// remember ETags, cache ETagged data, and store cookies. Typically, this +// is set by a GTMFetcherService object when it creates a fetcher. +// +// Side effect: setting fetch history implicitly calls setCookieStorageMethod: +@property (retain) id fetchHistory; + +// userData is retained for the convenience of the caller +@property (retain) id userData; + +// Stored property values are retained for the convenience of the caller +@property (copy) NSMutableDictionary *properties; + +- (void)setProperty:(id)obj forKey:(NSString *)key; // pass nil obj to remove property +- (id)propertyForKey:(NSString *)key; + +- (void)addPropertiesFromDictionary:(NSDictionary *)dict; + +// Comments are useful for logging +@property (copy) NSString *comment; + +- (void)setCommentWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1, 2); + +// Log of request and response, if logging is enabled +@property (copy) NSString *log; + +// Callbacks can be invoked on an operation queue rather than via the run loop, +// starting on 10.7 and iOS 6. If a delegate queue is supplied. the run loop +// modes are ignored. +@property (retain) NSOperationQueue *delegateQueue; + +// Using the fetcher while a modal dialog is displayed requires setting the +// run-loop modes to include NSModalPanelRunLoopMode +@property (retain) NSArray *runLoopModes; + +// Users who wish to replace GTMHTTPFetcher's use of NSURLConnection +// can do so globally here. The replacement should be a subclass of +// NSURLConnection. ++ (Class)connectionClass; ++ (void)setConnectionClass:(Class)theClass; + +// Spin the run loop, discarding events, until the fetch has completed +// +// This is only for use in testing or in tools without a user interface. +// +// Synchronous fetches should never be done by shipping apps; they are +// sufficient reason for rejection from the app store. +- (void)waitForCompletionWithTimeout:(NSTimeInterval)timeoutInSeconds; + +#if STRIP_GTM_FETCH_LOGGING +// if logging is stripped, provide a stub for the main method +// for controlling logging ++ (void)setLoggingEnabled:(BOOL)flag; +#endif // STRIP_GTM_FETCH_LOGGING + +@end diff --git a/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPFetcher.m.svn-base b/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPFetcher.m.svn-base new file mode 100644 index 0000000..b97024b --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPFetcher.m.svn-base @@ -0,0 +1,1886 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMHTTPFetcher.m +// + +#define GTMHTTPFETCHER_DEFINE_GLOBALS 1 + +#import "GTMHTTPFetcher.h" + +#if GTM_BACKGROUND_FETCHING +#import +#endif + +static id gGTMFetcherStaticCookieStorage = nil; +static Class gGTMFetcherConnectionClass = nil; + +// The default max retry interview is 10 minutes for uploads (POST/PUT/PATCH), +// 1 minute for downloads. +static const NSTimeInterval kUnsetMaxRetryInterval = -1; +static const NSTimeInterval kDefaultMaxDownloadRetryInterval = 60.0; +static const NSTimeInterval kDefaultMaxUploadRetryInterval = 60.0 * 10.; + +// delegateQueue callback parameters +static NSString *const kCallbackData = @"data"; +static NSString *const kCallbackError = @"error"; + +// +// GTMHTTPFetcher +// + +@interface GTMHTTPFetcher () + +@property (copy) NSString *temporaryDownloadPath; +@property (retain) id cookieStorage; +@property (readwrite, retain) NSData *downloadedData; +#if NS_BLOCKS_AVAILABLE +@property (copy) void (^completionBlock)(NSData *, NSError *); +#endif + +- (BOOL)beginFetchMayDelay:(BOOL)mayDelay + mayAuthorize:(BOOL)mayAuthorize; +- (void)failToBeginFetchWithError:(NSError *)error; +- (void)failToBeginFetchDeferWithError:(NSError *)error; + +#if GTM_BACKGROUND_FETCHING +- (void)endBackgroundTask; +- (void)backgroundFetchExpired; +#endif + +- (BOOL)authorizeRequest; +- (void)authorizer:(id )auth + request:(NSMutableURLRequest *)request + finishedWithError:(NSError *)error; + +- (NSString *)createTempDownloadFilePathForPath:(NSString *)targetPath; +- (void)stopFetchReleasingCallbacks:(BOOL)shouldReleaseCallbacks; +- (BOOL)shouldReleaseCallbacksUponCompletion; + +- (void)addCookiesToRequest:(NSMutableURLRequest *)request; +- (void)handleCookiesForResponse:(NSURLResponse *)response; + +- (void)invokeFetchCallbacksWithData:(NSData *)data + error:(NSError *)error; +- (void)invokeFetchCallback:(SEL)sel + target:(id)target + data:(NSData *)data + error:(NSError *)error; +- (void)invokeFetchCallbacksOnDelegateQueueWithData:(NSData *)data + error:(NSError *)error; +- (void)releaseCallbacks; + +- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error; + +- (BOOL)shouldRetryNowForStatus:(NSInteger)status error:(NSError *)error; +- (void)destroyRetryTimer; +- (void)beginRetryTimer; +- (void)primeRetryTimerWithNewTimeInterval:(NSTimeInterval)secs; +- (void)sendStopNotificationIfNeeded; +- (void)retryFetch; +- (void)retryTimerFired:(NSTimer *)timer; +@end + +@interface GTMHTTPFetcher (GTMHTTPFetcherLoggingInternal) +- (void)setupStreamLogging; +- (void)logFetchWithError:(NSError *)error; +@end + +@implementation GTMHTTPFetcher + ++ (GTMHTTPFetcher *)fetcherWithRequest:(NSURLRequest *)request { + return [[[[self class] alloc] initWithRequest:request] autorelease]; +} + ++ (GTMHTTPFetcher *)fetcherWithURL:(NSURL *)requestURL { + return [self fetcherWithRequest:[NSURLRequest requestWithURL:requestURL]]; +} + ++ (GTMHTTPFetcher *)fetcherWithURLString:(NSString *)requestURLString { + return [self fetcherWithURL:[NSURL URLWithString:requestURLString]]; +} + ++ (void)initialize { + // initialize is guaranteed by the runtime to be called in a + // thread-safe manner + if (!gGTMFetcherStaticCookieStorage) { + Class cookieStorageClass = NSClassFromString(@"GTMCookieStorage"); + if (cookieStorageClass) { + gGTMFetcherStaticCookieStorage = [[cookieStorageClass alloc] init]; + } + } +} + +- (id)init { + return [self initWithRequest:nil]; +} + +- (id)initWithRequest:(NSURLRequest *)request { + self = [super init]; + if (self) { + request_ = [request mutableCopy]; + + if (gGTMFetcherStaticCookieStorage != nil) { + // The user has compiled with the cookie storage class available; + // default to static cookie storage, so our cookies are independent + // of the cookies of other apps. + [self setCookieStorageMethod:kGTMHTTPFetcherCookieStorageMethodStatic]; + } else { + // Default to system default cookie storage + [self setCookieStorageMethod:kGTMHTTPFetcherCookieStorageMethodSystemDefault]; + } + } + return self; +} + +- (id)copyWithZone:(NSZone *)zone { + // disallow use of fetchers in a copy property + [self doesNotRecognizeSelector:_cmd]; + return nil; +} + +- (NSString *)description { + return [NSString stringWithFormat:@"%@ %p (%@)", + [self class], self, [self.mutableRequest URL]]; +} + +#if !GTM_IPHONE +- (void)finalize { + [self stopFetchReleasingCallbacks:YES]; // releases connection_, destroys timers + [super finalize]; +} +#endif + +- (void)dealloc { +#if DEBUG + NSAssert(!isStopNotificationNeeded_, + @"unbalanced fetcher notification for %@", [request_ URL]); +#endif + + // Note: if a connection or a retry timer was pending, then this instance + // would be retained by those so it wouldn't be getting dealloc'd, + // hence we don't need to stopFetch here + [request_ release]; + [connection_ release]; + [downloadedData_ release]; + [downloadPath_ release]; + [temporaryDownloadPath_ release]; + [downloadFileHandle_ release]; + [credential_ release]; + [proxyCredential_ release]; + [postData_ release]; + [postStream_ release]; + [loggedStreamData_ release]; + [response_ release]; +#if NS_BLOCKS_AVAILABLE + [completionBlock_ release]; + [receivedDataBlock_ release]; + [sentDataBlock_ release]; + [retryBlock_ release]; +#endif + [userData_ release]; + [properties_ release]; + [delegateQueue_ release]; + [runLoopModes_ release]; + [fetchHistory_ release]; + [cookieStorage_ release]; + [authorizer_ release]; + [service_ release]; + [serviceHost_ release]; + [thread_ release]; + [retryTimer_ release]; + [comment_ release]; + [log_ release]; +#if !STRIP_GTM_FETCH_LOGGING + [logRequestBody_ release]; + [logResponseBody_ release]; +#endif + + [super dealloc]; +} + +#pragma mark - + +// Begin fetching the URL (or begin a retry fetch). The delegate is retained +// for the duration of the fetch connection. + +- (BOOL)beginFetchWithDelegate:(id)delegate + didFinishSelector:(SEL)finishedSelector { + GTMAssertSelectorNilOrImplementedWithArgs(delegate, finishedSelector, @encode(GTMHTTPFetcher *), @encode(NSData *), @encode(NSError *), 0); + GTMAssertSelectorNilOrImplementedWithArgs(delegate, receivedDataSel_, @encode(GTMHTTPFetcher *), @encode(NSData *), 0); + GTMAssertSelectorNilOrImplementedWithArgs(delegate, retrySel_, @encode(GTMHTTPFetcher *), @encode(BOOL), @encode(NSError *), 0); + + // We'll retain the delegate only during the outstanding connection (similar + // to what Cocoa does with performSelectorOnMainThread:) and during + // authorization or delays, since the app would crash + // if the delegate was released before the fetch calls back + [self setDelegate:delegate]; + finishedSel_ = finishedSelector; + + return [self beginFetchMayDelay:YES + mayAuthorize:YES]; +} + +- (BOOL)beginFetchMayDelay:(BOOL)mayDelay + mayAuthorize:(BOOL)mayAuthorize { + // This is the internal entry point for re-starting fetches + NSError *error = nil; + + if (connection_ != nil) { + NSAssert1(connection_ != nil, @"fetch object %@ being reused; this should never happen", self); + goto CannotBeginFetch; + } + + if (request_ == nil || [request_ URL] == nil) { + NSAssert(request_ != nil, @"beginFetchWithDelegate requires a request with a URL"); + goto CannotBeginFetch; + } + + self.downloadedData = nil; + downloadedLength_ = 0; + + if (mayDelay && service_) { + BOOL shouldFetchNow = [service_ fetcherShouldBeginFetching:self]; + if (!shouldFetchNow) { + // the fetch is deferred, but will happen later + return YES; + } + } + + NSString *effectiveHTTPMethod = [request_ valueForHTTPHeaderField:@"X-HTTP-Method-Override"]; + if (effectiveHTTPMethod == nil) { + effectiveHTTPMethod = [request_ HTTPMethod]; + } + BOOL isEffectiveHTTPGet = (effectiveHTTPMethod == nil + || [effectiveHTTPMethod isEqual:@"GET"]); + + if (postData_ || postStream_) { + if (isEffectiveHTTPGet) { + [request_ setHTTPMethod:@"POST"]; + isEffectiveHTTPGet = NO; + } + + if (postData_) { + [request_ setHTTPBody:postData_]; + } else { + if ([self respondsToSelector:@selector(setupStreamLogging)]) { + [self performSelector:@selector(setupStreamLogging)]; + } + + [request_ setHTTPBodyStream:postStream_]; + } + } + + // We authorize after setting up the http method and body in the request + // because OAuth 1 may need to sign the request body + if (mayAuthorize && authorizer_) { + BOOL isAuthorized = [authorizer_ isAuthorizedRequest:request_]; + if (!isAuthorized) { + // authorization needed + return [self authorizeRequest]; + } + } + + [fetchHistory_ updateRequest:request_ isHTTPGet:isEffectiveHTTPGet]; + + // set the default upload or download retry interval, if necessary + if (isRetryEnabled_ + && maxRetryInterval_ <= kUnsetMaxRetryInterval) { + if (isEffectiveHTTPGet || [effectiveHTTPMethod isEqual:@"HEAD"]) { + [self setMaxRetryInterval:kDefaultMaxDownloadRetryInterval]; + } else { + [self setMaxRetryInterval:kDefaultMaxUploadRetryInterval]; + } + } + + [self addCookiesToRequest:request_]; + + if (downloadPath_ != nil) { + // downloading to a path, so create a temporary file and a file handle for + // downloading + NSString *tempPath = [self createTempDownloadFilePathForPath:downloadPath_]; + + BOOL didCreate = [[NSData data] writeToFile:tempPath + options:0 + error:&error]; + if (!didCreate) goto CannotBeginFetch; + + [self setTemporaryDownloadPath:tempPath]; + + NSFileHandle *fh = [NSFileHandle fileHandleForWritingAtPath:tempPath]; + if (fh == nil) goto CannotBeginFetch; + + [self setDownloadFileHandle:fh]; + } + + // finally, start the connection + + Class connectionClass = [[self class] connectionClass]; + + NSOperationQueue *delegateQueue = delegateQueue_; + if (delegateQueue && + ![connectionClass instancesRespondToSelector:@selector(setDelegateQueue:)]) { + // NSURLConnection has no setDelegateQueue: on iOS 4 and Mac OS X 10.5. + delegateQueue = nil; + self.delegateQueue = nil; + } + +#if DEBUG && TARGET_OS_IPHONE + BOOL isPreIOS6 = (NSFoundationVersionNumber <= 890.1); + if (isPreIOS6 && delegateQueue) { + NSLog(@"GTMHTTPFetcher delegateQueue not safe in iOS 5"); + } +#endif + + if ([runLoopModes_ count] == 0 && delegateQueue == nil) { + // No custom callback modes or queue were specified, so start the connection + // on the current run loop in the current mode + connection_ = [[connectionClass connectionWithRequest:request_ + delegate:self] retain]; + } else { + // Specify callbacks be on an operation queue or on the current run loop + // in the specified modes + connection_ = [[connectionClass alloc] initWithRequest:request_ + delegate:self + startImmediately:NO]; + if (delegateQueue) { + [connection_ performSelector:@selector(setDelegateQueue:) + withObject:delegateQueue]; + } else if (runLoopModes_) { + NSRunLoop *rl = [NSRunLoop currentRunLoop]; + for (NSString *mode in runLoopModes_) { + [connection_ scheduleInRunLoop:rl forMode:mode]; + } + } + [connection_ start]; + } + hasConnectionEnded_ = NO; + + if (!connection_) { + NSAssert(connection_ != nil, @"beginFetchWithDelegate could not create a connection"); + goto CannotBeginFetch; + } + + if (downloadFileHandle_ != nil) { + // downloading to a file, so downloadedData_ remains nil + } else { + self.downloadedData = [NSMutableData data]; + } + +#if GTM_BACKGROUND_FETCHING + backgroundTaskIdentifer_ = 0; // UIBackgroundTaskInvalid is 0 on iOS 4 + if (shouldFetchInBackground_) { + // For iOS 3 compatibility, ensure that UIApp supports backgrounding + UIApplication *app = [UIApplication sharedApplication]; + if ([app respondsToSelector:@selector(beginBackgroundTaskWithExpirationHandler:)]) { + // Tell UIApplication that we want to continue even when the app is in the + // background. + NSThread *thread = [NSThread currentThread]; + backgroundTaskIdentifer_ = [app beginBackgroundTaskWithExpirationHandler:^{ + // Callback - this block is always invoked by UIApplication on the main + // thread, but we want to run the user's callbacks on the thread used + // to start the fetch. + [self performSelector:@selector(backgroundFetchExpired) + onThread:thread + withObject:nil + waitUntilDone:YES]; + }]; + } + } +#endif + + // Once connection_ is non-nil we can send the start notification + isStopNotificationNeeded_ = YES; + NSNotificationCenter *defaultNC = [NSNotificationCenter defaultCenter]; + [defaultNC postNotificationName:kGTMHTTPFetcherStartedNotification + object:self]; + return YES; + +CannotBeginFetch: + [self failToBeginFetchDeferWithError:error]; + return NO; +} + +- (void)failToBeginFetchDeferWithError:(NSError *)error { + if (delegateQueue_) { + // Deferring will happen by the callback being invoked on the specified + // queue. + [self failToBeginFetchWithError:error]; + } else { + // No delegate queue has been specified, so put the callback + // on an appropriate run loop. + NSArray *modes = (runLoopModes_ ? runLoopModes_ : + [NSArray arrayWithObject:NSRunLoopCommonModes]); + [self performSelector:@selector(failToBeginFetchWithError:) + onThread:[NSThread currentThread] + withObject:error + waitUntilDone:NO + modes:modes]; + } +} + +- (void)failToBeginFetchWithError:(NSError *)error { + if (error == nil) { + error = [NSError errorWithDomain:kGTMHTTPFetcherErrorDomain + code:kGTMHTTPFetcherErrorDownloadFailed + userInfo:nil]; + } + + [[self retain] autorelease]; // In case the callback releases us + + [self invokeFetchCallbacksOnDelegateQueueWithData:nil + error:error]; + + [self releaseCallbacks]; + + [service_ fetcherDidStop:self]; + + self.authorizer = nil; + + if (temporaryDownloadPath_) { + [[NSFileManager defaultManager] removeItemAtPath:temporaryDownloadPath_ + error:NULL]; + self.temporaryDownloadPath = nil; + } +} + +#if GTM_BACKGROUND_FETCHING +- (void)backgroundFetchExpired { + @synchronized(self) { + // On background expiration, we stop the fetch and invoke the callbacks + NSError *error = [NSError errorWithDomain:kGTMHTTPFetcherErrorDomain + code:kGTMHTTPFetcherErrorBackgroundExpiration + userInfo:nil]; + [self invokeFetchCallbacksOnDelegateQueueWithData:nil + error:error]; + + // Stopping the fetch here will indirectly call endBackgroundTask + [self stopFetchReleasingCallbacks:NO]; + + [self releaseCallbacks]; + self.authorizer = nil; + } +} + +- (void)endBackgroundTask { + // Whenever the connection stops or background execution expires, + // we need to tell UIApplication we're done + if (backgroundTaskIdentifer_) { + // If backgroundTaskIdentifer_ is non-zero, we know we're on iOS 4 + UIApplication *app = [UIApplication sharedApplication]; + [app endBackgroundTask:backgroundTaskIdentifer_]; + + backgroundTaskIdentifer_ = 0; + } +} +#endif // GTM_BACKGROUND_FETCHING + +- (BOOL)authorizeRequest { + id authorizer = self.authorizer; + SEL asyncAuthSel = @selector(authorizeRequest:delegate:didFinishSelector:); + if ([authorizer respondsToSelector:asyncAuthSel]) { + SEL callbackSel = @selector(authorizer:request:finishedWithError:); + [authorizer authorizeRequest:request_ + delegate:self + didFinishSelector:callbackSel]; + return YES; + } else { + NSAssert(authorizer == nil, @"invalid authorizer for fetch"); + + // No authorizing possible, and authorizing happens only after any delay; + // just begin fetching + return [self beginFetchMayDelay:NO + mayAuthorize:NO]; + } +} + +- (void)authorizer:(id )auth + request:(NSMutableURLRequest *)request + finishedWithError:(NSError *)error { + if (error != nil) { + // We can't fetch without authorization + [self failToBeginFetchDeferWithError:error]; + } else { + [self beginFetchMayDelay:NO + mayAuthorize:NO]; + } +} + +#if NS_BLOCKS_AVAILABLE +- (BOOL)beginFetchWithCompletionHandler:(void (^)(NSData *data, NSError *error))handler { + self.completionBlock = handler; + + // The user may have called setDelegate: earlier if they want to use other + // delegate-style callbacks during the fetch; otherwise, the delegate is nil, + // which is fine. + return [self beginFetchWithDelegate:[self delegate] + didFinishSelector:nil]; +} +#endif + +- (NSString *)createTempDownloadFilePathForPath:(NSString *)targetPath { + NSString *tempDir = nil; + +#if (!TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1060)) + // Find an appropriate directory for the download, ideally on the same disk + // as the final target location so the temporary file won't have to be moved + // to a different disk. + // + // Available in SDKs for 10.6 and iOS 4 + // + // Oct 2011: We previously also used URLForDirectory for + // (TARGET_OS_IPHONE && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 40000)) + // but that is returning a non-temporary directory for iOS, unfortunately + + SEL sel = @selector(URLForDirectory:inDomain:appropriateForURL:create:error:); + if ([NSFileManager instancesRespondToSelector:sel]) { + NSError *error = nil; + NSURL *targetURL = [NSURL fileURLWithPath:targetPath]; + NSFileManager *fileMgr = [NSFileManager defaultManager]; + + NSURL *tempDirURL = [fileMgr URLForDirectory:NSItemReplacementDirectory + inDomain:NSUserDomainMask + appropriateForURL:targetURL + create:YES + error:&error]; + tempDir = [tempDirURL path]; + } +#endif + + if (tempDir == nil) { + tempDir = NSTemporaryDirectory(); + } + + static unsigned int counter = 0; + NSString *name = [NSString stringWithFormat:@"gtmhttpfetcher_%u_%u", + ++counter, (unsigned int) arc4random()]; + NSString *result = [tempDir stringByAppendingPathComponent:name]; + return result; +} + +- (void)addCookiesToRequest:(NSMutableURLRequest *)request { + // Get cookies for this URL from our storage array, if + // we have a storage array + if (cookieStorageMethod_ != kGTMHTTPFetcherCookieStorageMethodSystemDefault + && cookieStorageMethod_ != kGTMHTTPFetcherCookieStorageMethodNone) { + + NSArray *cookies = [cookieStorage_ cookiesForURL:[request URL]]; + if ([cookies count] > 0) { + + NSDictionary *headerFields = [NSHTTPCookie requestHeaderFieldsWithCookies:cookies]; + NSString *cookieHeader = [headerFields objectForKey:@"Cookie"]; // key used in header dictionary + if (cookieHeader) { + [request addValue:cookieHeader forHTTPHeaderField:@"Cookie"]; // header name + } + } + } +} + +// Returns YES if this is in the process of fetching a URL, or waiting to +// retry, or waiting for authorization, or waiting to be issued by the +// service object +- (BOOL)isFetching { + if (connection_ != nil || retryTimer_ != nil) return YES; + + BOOL isAuthorizing = [authorizer_ isAuthorizingRequest:request_]; + if (isAuthorizing) return YES; + + BOOL isDelayed = [service_ isDelayingFetcher:self]; + return isDelayed; +} + +// Returns the status code set in connection:didReceiveResponse: +- (NSInteger)statusCode { + + NSInteger statusCode; + + if (response_ != nil + && [response_ respondsToSelector:@selector(statusCode)]) { + + statusCode = [(NSHTTPURLResponse *)response_ statusCode]; + } else { + // Default to zero, in hopes of hinting "Unknown" (we can't be + // sure that things are OK enough to use 200). + statusCode = 0; + } + return statusCode; +} + +- (NSDictionary *)responseHeaders { + if (response_ != nil + && [response_ respondsToSelector:@selector(allHeaderFields)]) { + + NSDictionary *headers = [(NSHTTPURLResponse *)response_ allHeaderFields]; + return headers; + } + return nil; +} + +- (void)releaseCallbacks { + [delegate_ autorelease]; + delegate_ = nil; + + [delegateQueue_ autorelease]; + delegateQueue_ = nil; + +#if NS_BLOCKS_AVAILABLE + self.completionBlock = nil; + self.sentDataBlock = nil; + self.receivedDataBlock = nil; + self.retryBlock = nil; +#endif +} + +// Cancel the fetch of the URL that's currently in progress. +- (void)stopFetchReleasingCallbacks:(BOOL)shouldReleaseCallbacks { + // if the connection or the retry timer is all that's retaining the fetcher, + // we want to be sure this instance survives stopping at least long enough for + // the stack to unwind + [[self retain] autorelease]; + + [self destroyRetryTimer]; + + if (connection_) { + // in case cancelling the connection calls this recursively, we want + // to ensure that we'll only release the connection and delegate once, + // so first set connection_ to nil + NSURLConnection* oldConnection = connection_; + connection_ = nil; + + if (!hasConnectionEnded_) { + [oldConnection cancel]; + } + + // this may be called in a callback from the connection, so use autorelease + [oldConnection autorelease]; + } + + // send the stopped notification + [self sendStopNotificationIfNeeded]; + + [authorizer_ stopAuthorizationForRequest:request_]; + + if (shouldReleaseCallbacks) { + [self releaseCallbacks]; + + self.authorizer = nil; + } + + [service_ fetcherDidStop:self]; + + if (temporaryDownloadPath_) { + [[NSFileManager defaultManager] removeItemAtPath:temporaryDownloadPath_ + error:NULL]; + self.temporaryDownloadPath = nil; + } + +#if GTM_BACKGROUND_FETCHING + [self endBackgroundTask]; +#endif +} + +// External stop method +- (void)stopFetching { + @synchronized(self) { + [self stopFetchReleasingCallbacks:YES]; + } +} + +- (void)sendStopNotificationIfNeeded { + if (isStopNotificationNeeded_) { + isStopNotificationNeeded_ = NO; + + NSNotificationCenter *defaultNC = [NSNotificationCenter defaultCenter]; + [defaultNC postNotificationName:kGTMHTTPFetcherStoppedNotification + object:self]; + } +} + +- (void)retryFetch { + [self stopFetchReleasingCallbacks:NO]; + + [self beginFetchWithDelegate:delegate_ + didFinishSelector:finishedSel_]; +} + +- (void)waitForCompletionWithTimeout:(NSTimeInterval)timeoutInSeconds { + NSDate* giveUpDate = [NSDate dateWithTimeIntervalSinceNow:timeoutInSeconds]; + + // Loop until the callbacks have been called and released, and until + // the connection is no longer pending, or until the timeout has expired + BOOL isMainThread = [NSThread isMainThread]; + + while ((!hasConnectionEnded_ +#if NS_BLOCKS_AVAILABLE + || completionBlock_ != nil +#endif + || delegate_ != nil) + && [giveUpDate timeIntervalSinceNow] > 0) { + + // Run the current run loop 1/1000 of a second to give the networking + // code a chance to work + if (isMainThread || delegateQueue_ == nil) { + NSDate *stopDate = [NSDate dateWithTimeIntervalSinceNow:0.001]; + [[NSRunLoop currentRunLoop] runUntilDate:stopDate]; + } else { + [NSThread sleepForTimeInterval:0.001]; + } + } +} + +#pragma mark NSURLConnection Delegate Methods + +// +// NSURLConnection Delegate Methods +// + +// This method just says "follow all redirects", which _should_ be the default behavior, +// According to file:///Developer/ADC%20Reference%20Library/documentation/Cocoa/Conceptual/URLLoadingSystem +// but the redirects were not being followed until I added this method. May be +// a bug in the NSURLConnection code, or the documentation. +// +// In OS X 10.4.8 and earlier, the redirect request doesn't +// get the original's headers and body. This causes POSTs to fail. +// So we construct a new request, a copy of the original, with overrides from the +// redirect. +// +// Docs say that if redirectResponse is nil, just return the redirectRequest. + +- (NSURLRequest *)connection:(NSURLConnection *)connection + willSendRequest:(NSURLRequest *)redirectRequest + redirectResponse:(NSURLResponse *)redirectResponse { + @synchronized(self) { + if (redirectRequest && redirectResponse) { + // save cookies from the response + [self handleCookiesForResponse:redirectResponse]; + + NSMutableURLRequest *newRequest = [[request_ mutableCopy] autorelease]; + // copy the URL + NSURL *redirectURL = [redirectRequest URL]; + NSURL *url = [newRequest URL]; + + // disallow scheme changes (say, from https to http) + NSString *redirectScheme = [url scheme]; + NSString *newScheme = [redirectURL scheme]; + NSString *newResourceSpecifier = [redirectURL resourceSpecifier]; + + if ([redirectScheme caseInsensitiveCompare:@"http"] == NSOrderedSame + && newScheme != nil + && [newScheme caseInsensitiveCompare:@"https"] == NSOrderedSame) { + + // allow the change from http to https + redirectScheme = newScheme; + } + + NSString *newUrlString = [NSString stringWithFormat:@"%@:%@", + redirectScheme, newResourceSpecifier]; + + NSURL *newURL = [NSURL URLWithString:newUrlString]; + [newRequest setURL:newURL]; + + // any headers in the redirect override headers in the original. + NSDictionary *redirectHeaders = [redirectRequest allHTTPHeaderFields]; + for (NSString *key in redirectHeaders) { + NSString *value = [redirectHeaders objectForKey:key]; + [newRequest setValue:value forHTTPHeaderField:key]; + } + + [self addCookiesToRequest:newRequest]; + + redirectRequest = newRequest; + + // log the response we just received + [self setResponse:redirectResponse]; + [self logNowWithError:nil]; + + // update the request for future logging + NSMutableURLRequest *mutable = [[redirectRequest mutableCopy] autorelease]; + [self setMutableRequest:mutable]; + } + return redirectRequest; + } +} + +- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { + @synchronized(self) { + // This method is called when the server has determined that it + // has enough information to create the NSURLResponse + // it can be called multiple times, for example in the case of a + // redirect, so each time we reset the data. + [downloadedData_ setLength:0]; + [downloadFileHandle_ truncateFileAtOffset:0]; + downloadedLength_ = 0; + + [self setResponse:response]; + + // Save cookies from the response + [self handleCookiesForResponse:response]; + } +} + + +// handleCookiesForResponse: handles storage of cookies for responses passed to +// connection:willSendRequest:redirectResponse: and connection:didReceiveResponse: +- (void)handleCookiesForResponse:(NSURLResponse *)response { + + if (cookieStorageMethod_ == kGTMHTTPFetcherCookieStorageMethodSystemDefault + || cookieStorageMethod_ == kGTMHTTPFetcherCookieStorageMethodNone) { + + // do nothing special for NSURLConnection's default storage mechanism + // or when we're ignoring cookies + + } else if ([response respondsToSelector:@selector(allHeaderFields)]) { + + // grab the cookies from the header as NSHTTPCookies and store them either + // into our static array or into the fetchHistory + + NSDictionary *responseHeaderFields = [(NSHTTPURLResponse *)response allHeaderFields]; + if (responseHeaderFields) { + + NSArray *cookies = [NSHTTPCookie cookiesWithResponseHeaderFields:responseHeaderFields + forURL:[response URL]]; + if ([cookies count] > 0) { + [cookieStorage_ setCookies:cookies]; + } + } + } +} + +-(void)connection:(NSURLConnection *)connection +didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge { + @synchronized(self) { + if ([challenge previousFailureCount] <= 2) { + + NSURLCredential *credential = credential_; + + if ([[challenge protectionSpace] isProxy] && proxyCredential_ != nil) { + credential = proxyCredential_; + } + + // Here, if credential is still nil, then we *could* try to get it from + // NSURLCredentialStorage's defaultCredentialForProtectionSpace:. + // We don't, because we're assuming: + // + // - for server credentials, we only want ones supplied by the program + // calling http fetcher + // - for proxy credentials, if one were necessary and available in the + // keychain, it would've been found automatically by NSURLConnection + // and this challenge delegate method never would've been called + // anyway + + if (credential) { + // try the credential + [[challenge sender] useCredential:credential + forAuthenticationChallenge:challenge]; + return; + } + } + + // If we don't have credentials, or we've already failed auth 3x, + // report the error, putting the challenge as a value in the userInfo + // dictionary. +#if DEBUG + NSAssert(!isCancellingChallenge_, @"isCancellingChallenge_ unexpected"); +#endif + NSDictionary *userInfo = [NSDictionary dictionaryWithObject:challenge + forKey:kGTMHTTPFetcherErrorChallengeKey]; + NSError *error = [NSError errorWithDomain:kGTMHTTPFetcherErrorDomain + code:kGTMHTTPFetcherErrorAuthenticationChallengeFailed + userInfo:userInfo]; + + // cancelAuthenticationChallenge seems to indirectly call + // connection:didFailWithError: now, though that isn't documented + // + // We'll use an ivar to make the indirect invocation of the + // delegate method do nothing. + isCancellingChallenge_ = YES; + [[challenge sender] cancelAuthenticationChallenge:challenge]; + isCancellingChallenge_ = NO; + + [self connection:connection didFailWithError:error]; + } +} + +- (void)invokeFetchCallbacksWithData:(NSData *)data + error:(NSError *)error { + [[self retain] autorelease]; // In case the callback releases us + + [self invokeFetchCallback:finishedSel_ + target:delegate_ + data:data + error:error]; + +#if NS_BLOCKS_AVAILABLE + if (completionBlock_) { + completionBlock_(data, error); + } +#endif +} + +- (void)invokeFetchCallback:(SEL)sel + target:(id)target + data:(NSData *)data + error:(NSError *)error { + // This method is available to subclasses which may provide a customized + // target pointer. + if (target && sel) { + NSMethodSignature *sig = [target methodSignatureForSelector:sel]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; + [invocation setSelector:sel]; + [invocation setTarget:target]; + [invocation setArgument:&self atIndex:2]; + [invocation setArgument:&data atIndex:3]; + [invocation setArgument:&error atIndex:4]; + [invocation invoke]; + } +} + +- (void)invokeFetchCallbacksOnDelegateQueueWithData:(NSData *)data + error:(NSError *)error { + // This is called by methods that are not already on the delegateQueue + // (as NSURLConnection callbacks should already be, but other failures + // are not.) + if (!delegateQueue_) { + [self invokeFetchCallbacksWithData:data error:error]; + } + + // Values may be nil. + NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithCapacity:2]; + [dict setValue:data forKey:kCallbackData]; + [dict setValue:error forKey:kCallbackError]; + NSInvocationOperation *op = + [[[NSInvocationOperation alloc] initWithTarget:self + selector:@selector(invokeOnQueueWithDictionary:) + object:dict] autorelease]; + [delegateQueue_ addOperation:op]; +} + +- (void)invokeOnQueueWithDictionary:(NSDictionary *)dict { + NSData *data = [dict objectForKey:kCallbackData]; + NSError *error = [dict objectForKey:kCallbackError]; + + [self invokeFetchCallbacksWithData:data error:error]; +} + + +- (void)invokeSentDataCallback:(SEL)sel + target:(id)target + didSendBodyData:(NSInteger)bytesWritten + totalBytesWritten:(NSInteger)totalBytesWritten + totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite { + if (target && sel) { + NSMethodSignature *sig = [target methodSignatureForSelector:sel]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; + [invocation setSelector:sel]; + [invocation setTarget:target]; + [invocation setArgument:&self atIndex:2]; + [invocation setArgument:&bytesWritten atIndex:3]; + [invocation setArgument:&totalBytesWritten atIndex:4]; + [invocation setArgument:&totalBytesExpectedToWrite atIndex:5]; + [invocation invoke]; + } +} + +- (BOOL)invokeRetryCallback:(SEL)sel + target:(id)target + willRetry:(BOOL)willRetry + error:(NSError *)error { + if (target && sel) { + NSMethodSignature *sig = [target methodSignatureForSelector:sel]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; + [invocation setSelector:sel]; + [invocation setTarget:target]; + [invocation setArgument:&self atIndex:2]; + [invocation setArgument:&willRetry atIndex:3]; + [invocation setArgument:&error atIndex:4]; + [invocation invoke]; + + [invocation getReturnValue:&willRetry]; + } + return willRetry; +} + +- (void)connection:(NSURLConnection *)connection + didSendBodyData:(NSInteger)bytesWritten + totalBytesWritten:(NSInteger)totalBytesWritten +totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite { + @synchronized(self) { + SEL sel = [self sentDataSelector]; + [self invokeSentDataCallback:sel + target:delegate_ + didSendBodyData:bytesWritten + totalBytesWritten:totalBytesWritten + totalBytesExpectedToWrite:totalBytesExpectedToWrite]; + +#if NS_BLOCKS_AVAILABLE + if (sentDataBlock_) { + sentDataBlock_(bytesWritten, totalBytesWritten, totalBytesExpectedToWrite); + } +#endif + } +} + +- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { + @synchronized(self) { +#if DEBUG + // The download file handle should be set before the fetch is started, not + // after + NSAssert((downloadFileHandle_ == nil) != (downloadedData_ == nil), + @"received data accumulates as NSData or NSFileHandle, not both"); +#endif + + if (downloadFileHandle_ != nil) { + // Append to file + @try { + [downloadFileHandle_ writeData:data]; + + downloadedLength_ = [downloadFileHandle_ offsetInFile]; + } + @catch (NSException *exc) { + // Couldn't write to file, probably due to a full disk + NSDictionary *userInfo = [NSDictionary dictionaryWithObject:[exc reason] + forKey:NSLocalizedDescriptionKey]; + NSError *error = [NSError errorWithDomain:kGTMHTTPFetcherStatusDomain + code:kGTMHTTPFetcherErrorFileHandleException + userInfo:userInfo]; + [self connection:connection didFailWithError:error]; + return; + } + } else { + // append to mutable data + [downloadedData_ appendData:data]; + + downloadedLength_ = [downloadedData_ length]; + } + + if (receivedDataSel_) { + [delegate_ performSelector:receivedDataSel_ + withObject:self + withObject:downloadedData_]; + } + +#if NS_BLOCKS_AVAILABLE + if (receivedDataBlock_) { + receivedDataBlock_(downloadedData_); + } +#endif + } +} + +// For error 304's ("Not Modified") where we've cached the data, return +// status 200 ("OK") to the caller (but leave the fetcher status as 304) +// and copy the cached data. +// +// For other errors or if there's no cached data, just return the actual status. +- (NSData *)cachedDataForStatus { + if ([self statusCode] == kGTMHTTPFetcherStatusNotModified + && [fetchHistory_ shouldCacheETaggedData]) { + NSData *cachedData = [fetchHistory_ cachedDataForRequest:request_]; + return cachedData; + } + return nil; +} + +- (NSInteger)statusAfterHandlingNotModifiedError { + NSInteger status = [self statusCode]; + NSData *cachedData = [self cachedDataForStatus]; + if (cachedData) { + // Forge the status to pass on to the delegate + status = 200; + + // Copy our stored data + if (downloadFileHandle_ != nil) { + @try { + // Downloading to a file handle won't save to the cache (the data is + // likely inappropriately large for caching), but will still read from + // the cache, on the unlikely chance that the response was Not Modified + // and the URL response was indeed present in the cache. + [downloadFileHandle_ truncateFileAtOffset:0]; + [downloadFileHandle_ writeData:cachedData]; + downloadedLength_ = [downloadFileHandle_ offsetInFile]; + } + @catch (NSException *) { + // Failed to write data, likely due to lack of disk space + status = kGTMHTTPFetcherErrorFileHandleException; + } + } else { + [downloadedData_ setData:cachedData]; + downloadedLength_ = [cachedData length]; + } + } + return status; +} + +- (void)connectionDidFinishLoading:(NSURLConnection *)connection { + @synchronized(self) { + // We no longer need to cancel the connection + hasConnectionEnded_ = YES; + + // Skip caching ETagged results when the data is being saved to a file + if (downloadFileHandle_ == nil) { + [fetchHistory_ updateFetchHistoryWithRequest:request_ + response:response_ + downloadedData:downloadedData_]; + } else { + [fetchHistory_ removeCachedDataForRequest:request_]; + } + + [[self retain] autorelease]; // in case the callback releases us + + BOOL hasLogged = NO; + NSInteger status = [self statusCode]; + if ([self cachedDataForStatus] != nil) { + // Log the pre-cache response. + [self logNowWithError:nil]; + hasLogged = YES; + status = [self statusAfterHandlingNotModifiedError]; + } + + // We want to send the stop notification before calling the delegate's + // callback selector, since the callback selector may release all of + // the fetcher properties that the client is using to track the fetches. + // + // We'll also stop now so that, to any observers watching the notifications, + // it doesn't look like our wait for a retry (which may be long, + // 30 seconds or more) is part of the network activity. + [self sendStopNotificationIfNeeded]; + + BOOL shouldStopFetching = YES; + NSError *error = nil; + + if (status >= 0 && status < 300) { + // success + if (downloadPath_) { + // Avoid deleting the downloaded file when the fetch stops + [downloadFileHandle_ closeFile]; + self.downloadFileHandle = nil; + + NSFileManager *fileMgr = [NSFileManager defaultManager]; + [fileMgr removeItemAtPath:downloadPath_ + error:NULL]; + + if ([fileMgr moveItemAtPath:temporaryDownloadPath_ + toPath:downloadPath_ + error:&error]) { + self.temporaryDownloadPath = nil; + } + } + } else { + // unsuccessful + if (!hasLogged) { + [self logNowWithError:nil]; + hasLogged = YES; + } + // Status over 300; retry or notify the delegate of failure + if ([self shouldRetryNowForStatus:status error:nil]) { + // retrying + [self beginRetryTimer]; + shouldStopFetching = NO; + } else { + NSDictionary *userInfo = nil; + if ([downloadedData_ length] > 0) { + userInfo = [NSDictionary dictionaryWithObject:downloadedData_ + forKey:kGTMHTTPFetcherStatusDataKey]; + } + error = [NSError errorWithDomain:kGTMHTTPFetcherStatusDomain + code:status + userInfo:userInfo]; + } + } + + if (shouldStopFetching) { + // Call the callbacks + [self invokeFetchCallbacksWithData:downloadedData_ + error:error]; + BOOL shouldRelease = [self shouldReleaseCallbacksUponCompletion]; + [self stopFetchReleasingCallbacks:shouldRelease]; + } + + BOOL shouldLogNow = !hasLogged; +#if !STRIP_GTM_FETCH_LOGGING + if (shouldDeferResponseBodyLogging_) shouldLogNow = NO; +#endif + if (shouldLogNow) { + [self logNowWithError:nil]; + } + } +} + +- (BOOL)shouldReleaseCallbacksUponCompletion { + // A subclass can override this to keep callbacks around after the + // connection has finished successfully + return YES; +} + +- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { + @synchronized(self) { + // Prevent the failure callback from being called twice, since the stopFetch + // call below (either the explicit one at the end of this method, or the + // implicit one when the retry occurs) will release the delegate. + if (connection_ == nil) return; + + // If this method was invoked indirectly by cancellation of an authentication + // challenge, defer this until it is called again with the proper error object + if (isCancellingChallenge_) return; + + // We no longer need to cancel the connection + hasConnectionEnded_ = YES; + + [self logNowWithError:error]; + + // See comment about sendStopNotificationIfNeeded + // in connectionDidFinishLoading: + [self sendStopNotificationIfNeeded]; + + if ([self shouldRetryNowForStatus:0 error:error]) { + + [self beginRetryTimer]; + + } else { + + [[self retain] autorelease]; // in case the callback releases us + + [self invokeFetchCallbacksWithData:nil + error:error]; + + [self stopFetchReleasingCallbacks:YES]; + } + } +} + +- (void)logNowWithError:(NSError *)error { + // If the logging category is available, then log the current request, + // response, data, and error + if ([self respondsToSelector:@selector(logFetchWithError:)]) { + [self performSelector:@selector(logFetchWithError:) withObject:error]; + } +} + +#pragma mark Retries + +- (BOOL)isRetryError:(NSError *)error { + + struct retryRecord { + NSString *const domain; + int code; + }; + + struct retryRecord retries[] = { + { kGTMHTTPFetcherStatusDomain, 408 }, // request timeout + { kGTMHTTPFetcherStatusDomain, 503 }, // service unavailable + { kGTMHTTPFetcherStatusDomain, 504 }, // request timeout + { NSURLErrorDomain, NSURLErrorTimedOut }, + { NSURLErrorDomain, NSURLErrorNetworkConnectionLost }, + { nil, 0 } + }; + + // NSError's isEqual always returns false for equal but distinct instances + // of NSError, so we have to compare the domain and code values explicitly + + for (int idx = 0; retries[idx].domain != nil; idx++) { + + if ([[error domain] isEqual:retries[idx].domain] + && [error code] == retries[idx].code) { + + return YES; + } + } + return NO; +} + + +// shouldRetryNowForStatus:error: returns YES if the user has enabled retries +// and the status or error is one that is suitable for retrying. "Suitable" +// means either the isRetryError:'s list contains the status or error, or the +// user's retrySelector: is present and returns YES when called, or the +// authorizer may be able to fix. +- (BOOL)shouldRetryNowForStatus:(NSInteger)status + error:(NSError *)error { + // Determine if a refreshed authorizer may avoid an authorization error + BOOL shouldRetryForAuthRefresh = NO; + BOOL isFirstAuthError = (authorizer_ != nil) + && !hasAttemptedAuthRefresh_ + && (status == kGTMHTTPFetcherStatusUnauthorized); // 401 + + if (isFirstAuthError) { + if ([authorizer_ respondsToSelector:@selector(primeForRefresh)]) { + BOOL hasPrimed = [authorizer_ primeForRefresh]; + if (hasPrimed) { + shouldRetryForAuthRefresh = YES; + hasAttemptedAuthRefresh_ = YES; + [request_ setValue:nil forHTTPHeaderField:@"Authorization"]; + } + } + } + + // Determine if we're doing exponential backoff retries + BOOL shouldDoIntervalRetry = [self isRetryEnabled] + && ([self nextRetryInterval] < [self maxRetryInterval]); + + BOOL willRetry = NO; + BOOL canRetry = shouldRetryForAuthRefresh || shouldDoIntervalRetry; + if (canRetry) { + // Check if this is a retryable error + if (error == nil) { + // Make an error for the status + NSDictionary *userInfo = nil; + if ([downloadedData_ length] > 0) { + userInfo = [NSDictionary dictionaryWithObject:downloadedData_ + forKey:kGTMHTTPFetcherStatusDataKey]; + } + error = [NSError errorWithDomain:kGTMHTTPFetcherStatusDomain + code:status + userInfo:userInfo]; + } + + willRetry = shouldRetryForAuthRefresh || [self isRetryError:error]; + + // If the user has installed a retry callback, consult that + willRetry = [self invokeRetryCallback:retrySel_ + target:delegate_ + willRetry:willRetry + error:error]; +#if NS_BLOCKS_AVAILABLE + if (retryBlock_) { + willRetry = retryBlock_(willRetry, error); + } +#endif + } + return willRetry; +} + +- (void)beginRetryTimer { + @synchronized(self) { + if (delegateQueue_ != nil && ![NSThread isMainThread]) { + // A delegate queue is set, so the thread we're running on may not + // have a run loop. We'll defer creating and starting the timer + // until we're on the main thread to ensure it has a run loop. + // (If we weren't supporting 10.5, we could use dispatch_after instead + // of an NSTimer.) + [self performSelectorOnMainThread:_cmd + withObject:nil + waitUntilDone:NO]; + return; + } + + NSTimeInterval nextInterval = [self nextRetryInterval]; + NSTimeInterval maxInterval = [self maxRetryInterval]; + + NSTimeInterval newInterval = MIN(nextInterval, maxInterval); + + [self primeRetryTimerWithNewTimeInterval:newInterval]; + } +} + +- (void)primeRetryTimerWithNewTimeInterval:(NSTimeInterval)secs { + + [self destroyRetryTimer]; + + lastRetryInterval_ = secs; + + retryTimer_ = [NSTimer timerWithTimeInterval:secs + target:self + selector:@selector(retryTimerFired:) + userInfo:nil + repeats:NO]; + [retryTimer_ retain]; + + NSRunLoop *timerRL = (self.delegateQueue ? + [NSRunLoop mainRunLoop] : [NSRunLoop currentRunLoop]); + [timerRL addTimer:retryTimer_ + forMode:NSDefaultRunLoopMode]; + + NSNotificationCenter *defaultNC = [NSNotificationCenter defaultCenter]; + [defaultNC postNotificationName:kGTMHTTPFetcherRetryDelayStartedNotification + object:self]; +} + +- (void)retryTimerFired:(NSTimer *)timer { + @synchronized(self) { + [self destroyRetryTimer]; + + retryCount_++; + + [self retryFetch]; + } +} + +- (void)destroyRetryTimer { + if (retryTimer_) { + [retryTimer_ invalidate]; + [retryTimer_ autorelease]; + retryTimer_ = nil; + + NSNotificationCenter *defaultNC = [NSNotificationCenter defaultCenter]; + [defaultNC postNotificationName:kGTMHTTPFetcherRetryDelayStoppedNotification + object:self]; + } +} + +- (NSUInteger)retryCount { + return retryCount_; +} + +- (NSTimeInterval)nextRetryInterval { + // The next wait interval is the factor (2.0) times the last interval, + // but never less than the minimum interval. + NSTimeInterval secs = lastRetryInterval_ * retryFactor_; + secs = MIN(secs, maxRetryInterval_); + secs = MAX(secs, minRetryInterval_); + + return secs; +} + +- (BOOL)isRetryEnabled { + return isRetryEnabled_; +} + +- (void)setRetryEnabled:(BOOL)flag { + + if (flag && !isRetryEnabled_) { + // We defer initializing these until the user calls setRetryEnabled + // to avoid using the random number generator if it's not needed. + // However, this means min and max intervals for this fetcher are reset + // as a side effect of calling setRetryEnabled. + // + // Make an initial retry interval random between 1.0 and 2.0 seconds + [self setMinRetryInterval:0.0]; + [self setMaxRetryInterval:kUnsetMaxRetryInterval]; + [self setRetryFactor:2.0]; + lastRetryInterval_ = 0.0; + } + isRetryEnabled_ = flag; +}; + +- (NSTimeInterval)maxRetryInterval { + return maxRetryInterval_; +} + +- (void)setMaxRetryInterval:(NSTimeInterval)secs { + if (secs > 0) { + maxRetryInterval_ = secs; + } else { + maxRetryInterval_ = kUnsetMaxRetryInterval; + } +} + +- (double)minRetryInterval { + return minRetryInterval_; +} + +- (void)setMinRetryInterval:(NSTimeInterval)secs { + if (secs > 0) { + minRetryInterval_ = secs; + } else { + // Set min interval to a random value between 1.0 and 2.0 seconds + // so that if multiple clients start retrying at the same time, they'll + // repeat at different times and avoid overloading the server + minRetryInterval_ = 1.0 + ((double)(arc4random() & 0x0FFFF) / (double) 0x0FFFF); + } +} + +#pragma mark Getters and Setters + +@dynamic cookieStorageMethod, + retryEnabled, + maxRetryInterval, + minRetryInterval, + retryCount, + nextRetryInterval, + statusCode, + responseHeaders, + fetchHistory, + userData, + properties; + +@synthesize mutableRequest = request_, + credential = credential_, + proxyCredential = proxyCredential_, + postData = postData_, + postStream = postStream_, + delegate = delegate_, + authorizer = authorizer_, + service = service_, + serviceHost = serviceHost_, + servicePriority = servicePriority_, + thread = thread_, + sentDataSelector = sentDataSel_, + receivedDataSelector = receivedDataSel_, + retrySelector = retrySel_, + retryFactor = retryFactor_, + response = response_, + downloadedLength = downloadedLength_, + downloadedData = downloadedData_, + downloadPath = downloadPath_, + temporaryDownloadPath = temporaryDownloadPath_, + downloadFileHandle = downloadFileHandle_, + delegateQueue = delegateQueue_, + runLoopModes = runLoopModes_, + comment = comment_, + log = log_, + cookieStorage = cookieStorage_; + +#if NS_BLOCKS_AVAILABLE +@synthesize completionBlock = completionBlock_, + sentDataBlock = sentDataBlock_, + receivedDataBlock = receivedDataBlock_, + retryBlock = retryBlock_; +#endif + +@synthesize shouldFetchInBackground = shouldFetchInBackground_; + +- (NSInteger)cookieStorageMethod { + return cookieStorageMethod_; +} + +- (void)setCookieStorageMethod:(NSInteger)method { + + cookieStorageMethod_ = method; + + if (method == kGTMHTTPFetcherCookieStorageMethodSystemDefault) { + // System default + [request_ setHTTPShouldHandleCookies:YES]; + + // No need for a cookie storage object + self.cookieStorage = nil; + + } else { + // Not system default + [request_ setHTTPShouldHandleCookies:NO]; + + if (method == kGTMHTTPFetcherCookieStorageMethodStatic) { + // Store cookies in the static array + NSAssert(gGTMFetcherStaticCookieStorage != nil, + @"cookie storage requires GTMHTTPFetchHistory"); + + self.cookieStorage = gGTMFetcherStaticCookieStorage; + } else if (method == kGTMHTTPFetcherCookieStorageMethodFetchHistory) { + // store cookies in the fetch history + self.cookieStorage = [fetchHistory_ cookieStorage]; + } else { + // kGTMHTTPFetcherCookieStorageMethodNone - ignore cookies + self.cookieStorage = nil; + } + } +} + ++ (id )staticCookieStorage { + return gGTMFetcherStaticCookieStorage; +} + ++ (BOOL)doesSupportSentDataCallback { +#if GTM_IPHONE + // NSURLConnection's didSendBodyData: delegate support appears to be + // available starting in iPhone OS 3.0 + return (NSFoundationVersionNumber >= 678.47); +#else + // Per WebKit's MaxFoundationVersionWithoutdidSendBodyDataDelegate + // + // Indicates if NSURLConnection will invoke the didSendBodyData: delegate + // method + return (NSFoundationVersionNumber > 677.21); +#endif +} + +- (id )fetchHistory { + return fetchHistory_; +} + +- (void)setFetchHistory:(id )fetchHistory { + [fetchHistory_ autorelease]; + fetchHistory_ = [fetchHistory retain]; + + if (fetchHistory_ != nil) { + // set the fetch history's cookie array to be the cookie store + [self setCookieStorageMethod:kGTMHTTPFetcherCookieStorageMethodFetchHistory]; + + } else { + // The fetch history was removed + if (cookieStorageMethod_ == kGTMHTTPFetcherCookieStorageMethodFetchHistory) { + // Fall back to static storage + [self setCookieStorageMethod:kGTMHTTPFetcherCookieStorageMethodStatic]; + } + } +} + +- (id)userData { + @synchronized(self) { + return userData_; + } +} + +- (void)setUserData:(id)theObj { + @synchronized(self) { + [userData_ autorelease]; + userData_ = [theObj retain]; + } +} + +- (void)setProperties:(NSMutableDictionary *)dict { + @synchronized(self) { + [properties_ autorelease]; + + // This copies rather than retains the parameter for compatiblity with + // an earlier version that took an immutable parameter and copied it. + properties_ = [dict mutableCopy]; + } +} + +- (NSMutableDictionary *)properties { + @synchronized(self) { + return properties_; + } +} + +- (void)setProperty:(id)obj forKey:(NSString *)key { + @synchronized(self) { + if (properties_ == nil && obj != nil) { + [self setProperties:[NSMutableDictionary dictionary]]; + } + [properties_ setValue:obj forKey:key]; + } +} + +- (id)propertyForKey:(NSString *)key { + @synchronized(self) { + return [properties_ objectForKey:key]; + } +} + +- (void)addPropertiesFromDictionary:(NSDictionary *)dict { + @synchronized(self) { + if (properties_ == nil && dict != nil) { + [self setProperties:[[dict mutableCopy] autorelease]]; + } else { + [properties_ addEntriesFromDictionary:dict]; + } + } +} + +- (void)setCommentWithFormat:(id)format, ... { +#if !STRIP_GTM_FETCH_LOGGING + NSString *result = format; + if (format) { + va_list argList; + va_start(argList, format); + + result = [[[NSString alloc] initWithFormat:format + arguments:argList] autorelease]; + va_end(argList); + } + [self setComment:result]; +#endif +} + ++ (Class)connectionClass { + if (gGTMFetcherConnectionClass == nil) { + gGTMFetcherConnectionClass = [NSURLConnection class]; + } + return gGTMFetcherConnectionClass; +} + ++ (void)setConnectionClass:(Class)theClass { + gGTMFetcherConnectionClass = theClass; +} + +#if STRIP_GTM_FETCH_LOGGING ++ (void)setLoggingEnabled:(BOOL)flag { +} +#endif // STRIP_GTM_FETCH_LOGGING + +@end + +void GTMAssertSelectorNilOrImplementedWithArgs(id obj, SEL sel, ...) { + + // Verify that the object's selector is implemented with the proper + // number and type of arguments +#if DEBUG + va_list argList; + va_start(argList, sel); + + if (obj && sel) { + // Check that the selector is implemented + if (![obj respondsToSelector:sel]) { + NSLog(@"\"%@\" selector \"%@\" is unimplemented or misnamed", + NSStringFromClass([obj class]), + NSStringFromSelector(sel)); + NSCAssert(0, @"callback selector unimplemented or misnamed"); + } else { + const char *expectedArgType; + unsigned int argCount = 2; // skip self and _cmd + NSMethodSignature *sig = [obj methodSignatureForSelector:sel]; + + // Check that each expected argument is present and of the correct type + while ((expectedArgType = va_arg(argList, const char*)) != 0) { + + if ([sig numberOfArguments] > argCount) { + const char *foundArgType = [sig getArgumentTypeAtIndex:argCount]; + + if(0 != strncmp(foundArgType, expectedArgType, strlen(expectedArgType))) { + NSLog(@"\"%@\" selector \"%@\" argument %d should be type %s", + NSStringFromClass([obj class]), + NSStringFromSelector(sel), (argCount - 2), expectedArgType); + NSCAssert(0, @"callback selector argument type mistake"); + } + } + argCount++; + } + + // Check that the proper number of arguments are present in the selector + if (argCount != [sig numberOfArguments]) { + NSLog( @"\"%@\" selector \"%@\" should have %d arguments", + NSStringFromClass([obj class]), + NSStringFromSelector(sel), (argCount - 2)); + NSCAssert(0, @"callback selector arguments incorrect"); + } + } + } + + va_end(argList); +#endif +} + +NSString *GTMCleanedUserAgentString(NSString *str) { + // Reference http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html + // and http://www-archive.mozilla.org/build/user-agent-strings.html + + if (str == nil) return nil; + + NSMutableString *result = [NSMutableString stringWithString:str]; + + // Replace spaces with underscores + [result replaceOccurrencesOfString:@" " + withString:@"_" + options:0 + range:NSMakeRange(0, [result length])]; + + // Delete http token separators and remaining whitespace + static NSCharacterSet *charsToDelete = nil; + if (charsToDelete == nil) { + // Make a set of unwanted characters + NSString *const kSeparators = @"()<>@,;:\\\"/[]?={}"; + + NSMutableCharacterSet *mutableChars; + mutableChars = [[[NSCharacterSet whitespaceAndNewlineCharacterSet] mutableCopy] autorelease]; + [mutableChars addCharactersInString:kSeparators]; + charsToDelete = [mutableChars copy]; // hang on to an immutable copy + } + + while (1) { + NSRange separatorRange = [result rangeOfCharacterFromSet:charsToDelete]; + if (separatorRange.location == NSNotFound) break; + + [result deleteCharactersInRange:separatorRange]; + }; + + return result; +} + +NSString *GTMSystemVersionString(void) { + NSString *systemString = @""; + +#if TARGET_OS_MAC && !TARGET_OS_IPHONE + // Mac build + static NSString *savedSystemString = nil; + if (savedSystemString == nil) { + // With Gestalt inexplicably deprecated in 10.8, we're reduced to reading + // the system plist file. + NSString *const kPath = @"/System/Library/CoreServices/SystemVersion.plist"; + NSDictionary *plist = [NSDictionary dictionaryWithContentsOfFile:kPath]; + NSString *versString = [plist objectForKey:@"ProductVersion"]; + if ([versString length] == 0) { + versString = @"10.?.?"; + } + savedSystemString = [[NSString alloc] initWithFormat:@"MacOSX/%@", versString]; + } + systemString = savedSystemString; +#elif TARGET_OS_IPHONE + // Compiling against the iPhone SDK + + static NSString *savedSystemString = nil; + if (savedSystemString == nil) { + // Avoid the slowness of calling currentDevice repeatedly on the iPhone + UIDevice* currentDevice = [UIDevice currentDevice]; + + NSString *rawModel = [currentDevice model]; + NSString *model = GTMCleanedUserAgentString(rawModel); + + NSString *systemVersion = [currentDevice systemVersion]; + + savedSystemString = [[NSString alloc] initWithFormat:@"%@/%@", + model, systemVersion]; // "iPod_Touch/2.2" + } + systemString = savedSystemString; + +#elif (GTL_IPHONE || GDATA_IPHONE) + // Compiling iOS libraries against the Mac SDK + systemString = @"iPhone/x.x"; + +#elif defined(_SYS_UTSNAME_H) + // Foundation-only build + struct utsname unameRecord; + uname(&unameRecord); + + systemString = [NSString stringWithFormat:@"%s/%s", + unameRecord.sysname, unameRecord.release]; // "Darwin/8.11.1" +#endif + + return systemString; +} + +// Return a generic name and version for the current application; this avoids +// anonymous server transactions. +NSString *GTMApplicationIdentifier(NSBundle *bundle) { + static NSString *sAppID = nil; + if (sAppID != nil) return sAppID; + + // If there's a bundle ID, use that; otherwise, use the process name + if (bundle == nil) { + bundle = [NSBundle mainBundle]; + } + + NSString *identifier; + NSString *bundleID = [bundle bundleIdentifier]; + if ([bundleID length] > 0) { + identifier = bundleID; + } else { + // Fall back on the procname, prefixed by "proc" to flag that it's + // autogenerated and perhaps unreliable + NSString *procName = [[NSProcessInfo processInfo] processName]; + identifier = [NSString stringWithFormat:@"proc_%@", procName]; + } + + // Clean up whitespace and special characters + identifier = GTMCleanedUserAgentString(identifier); + + // If there's a version number, append that + NSString *version = [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; + if ([version length] == 0) { + version = [bundle objectForInfoDictionaryKey:@"CFBundleVersion"]; + } + + // Clean up whitespace and special characters + version = GTMCleanedUserAgentString(version); + + // Glue the two together (cleanup done above or else cleanup would strip the + // slash) + if ([version length] > 0) { + identifier = [identifier stringByAppendingFormat:@"/%@", version]; + } + + sAppID = [identifier copy]; + return sAppID; +} diff --git a/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPFetcherLogging.h.svn-base b/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPFetcherLogging.h.svn-base new file mode 100644 index 0000000..d1dacdf --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPFetcherLogging.h.svn-base @@ -0,0 +1,98 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "GTMHTTPFetcher.h" + +// GTM HTTP Logging +// +// All traffic using GTMHTTPFetcher can be easily logged. Call +// +// [GTMHTTPFetcher setLoggingEnabled:YES]; +// +// to begin generating log files. +// +// Log files are put into a folder on the desktop called "GTMHTTPDebugLogs" +// unless another directory is specified with +setLoggingDirectory. +// +// In the iPhone simulator, the default logs location is the user's home +// directory in ~/Library/Application Support. On the iPhone device, the +// default logs location is the application's documents directory on the device. +// +// Tip: use the Finder's "Sort By Date" to find the most recent logs. +// +// Each run of an application gets a separate set of log files. An html +// file is generated to simplify browsing the run's http transactions. +// The html file includes javascript links for inline viewing of uploaded +// and downloaded data. +// +// A symlink is created in the logs folder to simplify finding the html file +// for the latest run of the application; the symlink is called +// +// AppName_http_log_newest.html +// +// For better viewing of XML logs, use Camino or Firefox rather than Safari. +// +// Each fetcher may be given a comment to be inserted as a label in the logs, +// such as +// [fetcher setCommentWithFormat:@"retrieve item %@", itemName]; +// +// Projects may define STRIP_GTM_FETCH_LOGGING to remove logging code. + +#if !STRIP_GTM_FETCH_LOGGING + +@interface GTMHTTPFetcher (GTMHTTPFetcherLogging) + +// Note: the default logs directory is ~/Desktop/GTMHTTPDebugLogs; it will be +// created as needed. If a custom directory is set, the directory should +// already exist. ++ (void)setLoggingDirectory:(NSString *)path; ++ (NSString *)loggingDirectory; + +// client apps can turn logging on and off ++ (void)setLoggingEnabled:(BOOL)flag; ++ (BOOL)isLoggingEnabled; + +// client apps can turn off logging to a file if they want to only check +// the fetcher's log property ++ (void)setLoggingToFileEnabled:(BOOL)flag; ++ (BOOL)isLoggingToFileEnabled; + +// client apps can optionally specify process name and date string used in +// log file names ++ (void)setLoggingProcessName:(NSString *)str; ++ (NSString *)loggingProcessName; + ++ (void)setLoggingDateStamp:(NSString *)str; ++ (NSString *)loggingDateStamp; + +// internal; called by fetcher +- (void)logFetchWithError:(NSError *)error; +- (BOOL)logCapturePostStream; + +// Applications may provide alternative body strings to be displayed in the +// log, such as for binary requests or responses. If deferring is turned +// on, the response log will not be sent until deferring is turned off, +// allowing the application to write the response body after the response +// data has been parsed. +- (void)setLogRequestBody:(NSString *)bodyString; +- (NSString *)logRequestBody; +- (void)setLogResponseBody:(NSString *)bodyString; +- (NSString *)logResponseBody; +- (void)setShouldDeferResponseBodyLogging:(BOOL)flag; +- (BOOL)shouldDeferResponseBodyLogging; + +@end + +#endif // !STRIP_GTM_FETCH_LOGGING diff --git a/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPFetcherLogging.m.svn-base b/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPFetcherLogging.m.svn-base new file mode 100644 index 0000000..d583c09 --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPFetcherLogging.m.svn-base @@ -0,0 +1,1101 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if !STRIP_GTM_FETCH_LOGGING + +#include +#include + +#import "GTMHTTPFetcherLogging.h" + +// Sensitive credential strings are replaced in logs with _snip_ +// +// Apps that must see the contents of sensitive tokens can set this to 1 +#ifndef SKIP_GTM_FETCH_LOGGING_SNIPPING +#define SKIP_GTM_FETCH_LOGGING_SNIPPING 0 +#endif + +// If GTMReadMonitorInputStream is available, it can be used for +// capturing uploaded streams of data +// +// We locally declare methods of GTMReadMonitorInputStream so we +// do not need to import the header, as some projects may not have it available +@interface GTMReadMonitorInputStream : NSInputStream ++ (id)inputStreamWithStream:(NSInputStream *)input; +@property (assign) id readDelegate; +@property (assign) SEL readSelector; +@property (retain) NSArray *runLoopModes; +@end + +// If GTMNSJSONSerialization is available, it is used for formatting JSON +#if (TARGET_OS_MAC && !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED < 1070)) || \ + (TARGET_OS_IPHONE && (__IPHONE_OS_VERSION_MAX_ALLOWED < 50000)) +@interface GTMNSJSONSerialization : NSObject ++ (NSData *)dataWithJSONObject:(id)obj options:(NSUInteger)opt error:(NSError **)error; ++ (id)JSONObjectWithData:(NSData *)data options:(NSUInteger)opt error:(NSError **)error; +@end +#endif + +// Otherwise, if SBJSON is available, it is used for formatting JSON +@interface GTMFetcherSBJSON +- (void)setHumanReadable:(BOOL)flag; +- (NSString*)stringWithObject:(id)value error:(NSError**)error; +- (id)objectWithString:(NSString*)jsonrep error:(NSError**)error; +@end + +@interface GTMHTTPFetcher (GTMHTTPFetcherLoggingUtilities) ++ (NSString *)headersStringForDictionary:(NSDictionary *)dict; + +- (void)inputStream:(GTMReadMonitorInputStream *)stream + readIntoBuffer:(void *)buffer + length:(NSUInteger)length; + +// internal file utilities for logging ++ (BOOL)fileOrDirExistsAtPath:(NSString *)path; ++ (BOOL)makeDirectoryUpToPath:(NSString *)path; ++ (BOOL)removeItemAtPath:(NSString *)path; ++ (BOOL)createSymbolicLinkAtPath:(NSString *)newPath + withDestinationPath:(NSString *)targetPath; + ++ (NSString *)snipSubstringOfString:(NSString *)originalStr + betweenStartString:(NSString *)startStr + endString:(NSString *)endStr; + ++ (id)JSONObjectWithData:(NSData *)data; ++ (id)stringWithJSONObject:(id)obj; +@end + +@implementation GTMHTTPFetcher (GTMHTTPFetcherLogging) + +// fetchers come and fetchers go, but statics are forever +static BOOL gIsLoggingEnabled = NO; +static BOOL gIsLoggingToFile = YES; +static NSString *gLoggingDirectoryPath = nil; +static NSString *gLoggingDateStamp = nil; +static NSString* gLoggingProcessName = nil; + ++ (void)setLoggingDirectory:(NSString *)path { + [gLoggingDirectoryPath autorelease]; + gLoggingDirectoryPath = [path copy]; +} + ++ (NSString *)loggingDirectory { + + if (!gLoggingDirectoryPath) { + NSArray *arr = nil; +#if GTM_IPHONE && TARGET_IPHONE_SIMULATOR + // default to a directory called GTMHTTPDebugLogs into a sandbox-safe + // directory that a developer can find easily, the application home + arr = [NSArray arrayWithObject:NSHomeDirectory()]; +#elif GTM_IPHONE + // Neither ~/Desktop nor ~/Home is writable on an actual iPhone device. + // Put it in ~/Documents. + arr = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, + NSUserDomainMask, YES); +#else + // default to a directory called GTMHTTPDebugLogs in the desktop folder + arr = NSSearchPathForDirectoriesInDomains(NSDesktopDirectory, + NSUserDomainMask, YES); +#endif + + if ([arr count] > 0) { + NSString *const kGTMLogFolderName = @"GTMHTTPDebugLogs"; + + NSString *desktopPath = [arr objectAtIndex:0]; + NSString *logsFolderPath = [desktopPath stringByAppendingPathComponent:kGTMLogFolderName]; + + BOOL doesFolderExist = [[self class] fileOrDirExistsAtPath:logsFolderPath]; + + if (!doesFolderExist) { + // make the directory + doesFolderExist = [self makeDirectoryUpToPath:logsFolderPath]; + } + + if (doesFolderExist) { + // it's there; store it in the global + gLoggingDirectoryPath = [logsFolderPath copy]; + } + } + } + return gLoggingDirectoryPath; +} + ++ (void)setLoggingEnabled:(BOOL)flag { + gIsLoggingEnabled = flag; +} + ++ (BOOL)isLoggingEnabled { + return gIsLoggingEnabled; +} + ++ (void)setLoggingToFileEnabled:(BOOL)flag { + gIsLoggingToFile = flag; +} + ++ (BOOL)isLoggingToFileEnabled { + return gIsLoggingToFile; +} + ++ (void)setLoggingProcessName:(NSString *)str { + [gLoggingProcessName release]; + gLoggingProcessName = [str copy]; +} + ++ (NSString *)loggingProcessName { + + // get the process name (once per run) replacing spaces with underscores + if (!gLoggingProcessName) { + + NSString *procName = [[NSProcessInfo processInfo] processName]; + NSMutableString *loggingProcessName; + loggingProcessName = [[NSMutableString alloc] initWithString:procName]; + + [loggingProcessName replaceOccurrencesOfString:@" " + withString:@"_" + options:0 + range:NSMakeRange(0, [gLoggingProcessName length])]; + gLoggingProcessName = loggingProcessName; + } + return gLoggingProcessName; +} + ++ (void)setLoggingDateStamp:(NSString *)str { + [gLoggingDateStamp release]; + gLoggingDateStamp = [str copy]; +} + ++ (NSString *)loggingDateStamp { + // we'll pick one date stamp per run, so a run that starts at a later second + // will get a unique results html file + if (!gLoggingDateStamp) { + // produce a string like 08-21_01-41-23PM + + NSDateFormatter *formatter = [[[NSDateFormatter alloc] init] autorelease]; + [formatter setFormatterBehavior:NSDateFormatterBehavior10_4]; + [formatter setDateFormat:@"M-dd_hh-mm-ssa"]; + + gLoggingDateStamp = [[formatter stringFromDate:[NSDate date]] retain] ; + } + return gLoggingDateStamp; +} + +// formattedStringFromData returns a prettyprinted string for XML or JSON input, +// and a plain string for other input data +- (NSString *)formattedStringFromData:(NSData *)inputData + contentType:(NSString *)contentType + JSON:(NSDictionary **)outJSON { + if (inputData == nil) return nil; + + // if the content type is JSON and we have the parsing class available, + // use that + if ([contentType hasPrefix:@"application/json"] + && [inputData length] > 5) { + // convert from JSON string to NSObjects and back to a formatted string + NSMutableDictionary *obj = [[self class] JSONObjectWithData:inputData]; + if (obj) { + if (outJSON) *outJSON = obj; + if ([obj isKindOfClass:[NSMutableDictionary class]]) { + // for security and privacy, omit OAuth 2 response access and refresh + // tokens + if ([obj valueForKey:@"refresh_token"] != nil) { + [obj setObject:@"_snip_" forKey:@"refresh_token"]; + } + if ([obj valueForKey:@"access_token"] != nil) { + [obj setObject:@"_snip_" forKey:@"access_token"]; + } + } + NSString *formatted = [[self class] stringWithJSONObject:obj]; + if (formatted) return formatted; + } + } + +#if !GTM_FOUNDATION_ONLY && !GTM_SKIP_LOG_XMLFORMAT + // verify that this data starts with the bytes indicating XML + + NSString *const kXMLLintPath = @"/usr/bin/xmllint"; + static BOOL hasCheckedAvailability = NO; + static BOOL isXMLLintAvailable; + + if (!hasCheckedAvailability) { + isXMLLintAvailable = [[self class] fileOrDirExistsAtPath:kXMLLintPath]; + hasCheckedAvailability = YES; + } + + if (isXMLLintAvailable + && [inputData length] > 5 + && strncmp([inputData bytes], " 0) { + // success + inputData = formattedData; + } + } +#else + // we can't call external tasks on the iPhone; leave the XML unformatted +#endif + + NSString *dataStr = [[[NSString alloc] initWithData:inputData + encoding:NSUTF8StringEncoding] autorelease]; + return dataStr; +} + +- (void)setupStreamLogging { + // if logging is enabled, it needs a buffer to accumulate data from any + // NSInputStream used for uploading. Logging will wrap the input + // stream with a stream that lets us keep a copy the data being read. + if ([GTMHTTPFetcher isLoggingEnabled] + && loggedStreamData_ == nil + && postStream_ != nil) { + loggedStreamData_ = [[NSMutableData alloc] init]; + + BOOL didCapture = [self logCapturePostStream]; + if (!didCapture) { + // upload stream logging requires the class + // GTMReadMonitorInputStream be available + NSString const *str = @"<>"; + [loggedStreamData_ setData:[str dataUsingEncoding:NSUTF8StringEncoding]]; + } + } +} + +- (void)setLogRequestBody:(NSString *)bodyString { + @synchronized(self) { + [logRequestBody_ release]; + logRequestBody_ = [bodyString copy]; + } +} + +- (NSString *)logRequestBody { + @synchronized(self) { + return logRequestBody_; + } +} + +- (void)setLogResponseBody:(NSString *)bodyString { + @synchronized(self) { + [logResponseBody_ release]; + logResponseBody_ = [bodyString copy]; + } +} + +- (NSString *)logResponseBody { + @synchronized(self) { + return logResponseBody_; + } +} + +- (void)setShouldDeferResponseBodyLogging:(BOOL)flag { + @synchronized(self) { + if (flag != shouldDeferResponseBodyLogging_) { + shouldDeferResponseBodyLogging_ = flag; + if (!flag) { + [self performSelectorOnMainThread:@selector(logFetchWithError:) + withObject:nil + waitUntilDone:NO]; + } + } + } +} + +- (BOOL)shouldDeferResponseBodyLogging { + @synchronized(self) { + return shouldDeferResponseBodyLogging_; + } +} + +// stringFromStreamData creates a string given the supplied data +// +// If NSString can create a UTF-8 string from the data, then that is returned. +// +// Otherwise, this routine tries to find a MIME boundary at the beginning of +// the data block, and uses that to break up the data into parts. Each part +// will be used to try to make a UTF-8 string. For parts that fail, a +// replacement string showing the part header and <> is supplied +// in place of the binary data. + +- (NSString *)stringFromStreamData:(NSData *)data + contentType:(NSString *)contentType { + + if (data == nil) return nil; + + // optimistically, see if the whole data block is UTF-8 + NSString *streamDataStr = [self formattedStringFromData:data + contentType:contentType + JSON:NULL]; + if (streamDataStr) return streamDataStr; + + // Munge a buffer by replacing non-ASCII bytes with underscores, + // and turn that munged buffer an NSString. That gives us a string + // we can use with NSScanner. + NSMutableData *mutableData = [NSMutableData dataWithData:data]; + unsigned char *bytes = [mutableData mutableBytes]; + + for (unsigned int idx = 0; idx < [mutableData length]; idx++) { + if (bytes[idx] > 0x7F || bytes[idx] == 0) { + bytes[idx] = '_'; + } + } + + NSString *mungedStr = [[[NSString alloc] initWithData:mutableData + encoding:NSUTF8StringEncoding] autorelease]; + if (mungedStr != nil) { + + // scan for the boundary string + NSString *boundary = nil; + NSScanner *scanner = [NSScanner scannerWithString:mungedStr]; + + if ([scanner scanUpToString:@"\r\n" intoString:&boundary] + && [boundary hasPrefix:@"--"]) { + + // we found a boundary string; use it to divide the string into parts + NSArray *mungedParts = [mungedStr componentsSeparatedByString:boundary]; + + // look at each of the munged parts in the original string, and try to + // convert those into UTF-8 + NSMutableArray *origParts = [NSMutableArray array]; + NSUInteger offset = 0; + for (NSString *mungedPart in mungedParts) { + NSUInteger partSize = [mungedPart length]; + + NSRange range = NSMakeRange(offset, partSize); + NSData *origPartData = [data subdataWithRange:range]; + + NSString *origPartStr = [[[NSString alloc] initWithData:origPartData + encoding:NSUTF8StringEncoding] autorelease]; + if (origPartStr) { + // we could make this original part into UTF-8; use the string + [origParts addObject:origPartStr]; + } else { + // this part can't be made into UTF-8; scan the header, if we can + NSString *header = nil; + NSScanner *headerScanner = [NSScanner scannerWithString:mungedPart]; + if (![headerScanner scanUpToString:@"\r\n\r\n" intoString:&header]) { + // we couldn't find a header + header = @""; + } + + // make a part string with the header and <> + NSString *binStr = [NSString stringWithFormat:@"\r%@\r<<%lu bytes>>\r", + header, (long)(partSize - [header length])]; + [origParts addObject:binStr]; + } + offset += partSize + [boundary length]; + } + + // rejoin the original parts + streamDataStr = [origParts componentsJoinedByString:boundary]; + } + } + + if (!streamDataStr) { + // give up; just make a string showing the uploaded bytes + streamDataStr = [NSString stringWithFormat:@"<<%u bytes>>", + (unsigned int)[data length]]; + } + return streamDataStr; +} + +// logFetchWithError is called following a successful or failed fetch attempt +// +// This method does all the work for appending to and creating log files + +- (void)logFetchWithError:(NSError *)error { + + if (![[self class] isLoggingEnabled]) return; + + // TODO: (grobbins) add Javascript to display response data formatted in hex + + NSString *parentDir = [[self class] loggingDirectory]; + NSString *processName = [[self class] loggingProcessName]; + NSString *dateStamp = [[self class] loggingDateStamp]; + + // make a directory for this run's logs, like + // SyncProto_logs_10-16_01-56-58PM + NSString *dirName = [NSString stringWithFormat:@"%@_log_%@", + processName, dateStamp]; + NSString *logDirectory = [parentDir stringByAppendingPathComponent:dirName]; + + if (gIsLoggingToFile) { + // be sure that the first time this app runs, it's not writing to + // a preexisting folder + static BOOL shouldReuseFolder = NO; + if (!shouldReuseFolder) { + shouldReuseFolder = YES; + NSString *origLogDir = logDirectory; + for (int ctr = 2; ctr < 20; ctr++) { + if (![[self class] fileOrDirExistsAtPath:logDirectory]) break; + + // append a digit + logDirectory = [origLogDir stringByAppendingFormat:@"_%d", ctr]; + } + } + if (![[self class] makeDirectoryUpToPath:logDirectory]) return; + } + // each response's NSData goes into its own xml or txt file, though all + // responses for this run of the app share a main html file. This + // counter tracks all fetch responses for this run of the app. + // + // we'll use a local variable since this routine may be reentered while + // waiting for XML formatting to be completed by an external task + static int zResponseCounter = 0; + int responseCounter = ++zResponseCounter; + + // file name for an image data file + NSString *responseDataFileName = nil; + NSUInteger responseDataLength; + if (downloadFileHandle_) { + responseDataLength = (NSUInteger) [downloadFileHandle_ offsetInFile]; + } else { + responseDataLength = [downloadedData_ length]; + } + + NSURLResponse *response = [self response]; + NSDictionary *responseHeaders = [self responseHeaders]; + + NSString *responseBaseName = nil; + NSString *responseDataStr = nil; + NSDictionary *responseJSON = nil; + + // if there's response data, decide what kind of file to put it in based + // on the first bytes of the file or on the mime type supplied by the server + NSString *responseMIMEType = [response MIMEType]; + BOOL isResponseImage = NO; + NSData *dataToWrite = nil; + + if (responseDataLength > 0) { + NSString *responseDataExtn = nil; + + // generate a response file base name like + responseBaseName = [NSString stringWithFormat:@"fetch_%d_response", + responseCounter]; + + NSString *responseType = [responseHeaders valueForKey:@"Content-Type"]; + responseDataStr = [self formattedStringFromData:downloadedData_ + contentType:responseType + JSON:&responseJSON]; + if (responseDataStr) { + // we were able to make a UTF-8 string from the response data + if ([responseMIMEType isEqual:@"application/atom+xml"] + || [responseMIMEType hasSuffix:@"/xml"]) { + responseDataExtn = @"xml"; + dataToWrite = [responseDataStr dataUsingEncoding:NSUTF8StringEncoding]; + } + } else if ([responseMIMEType isEqual:@"image/jpeg"]) { + responseDataExtn = @"jpg"; + dataToWrite = downloadedData_; + isResponseImage = YES; + } else if ([responseMIMEType isEqual:@"image/gif"]) { + responseDataExtn = @"gif"; + dataToWrite = downloadedData_; + isResponseImage = YES; + } else if ([responseMIMEType isEqual:@"image/png"]) { + responseDataExtn = @"png"; + dataToWrite = downloadedData_; + isResponseImage = YES; + } else { + // add more non-text types here + } + + // if we have an extension, save the raw data in a file with that + // extension + if (responseDataExtn && dataToWrite) { + responseDataFileName = [responseBaseName stringByAppendingPathExtension:responseDataExtn]; + NSString *responseDataFilePath = [logDirectory stringByAppendingPathComponent:responseDataFileName]; + + NSError *downloadedError = nil; + if (gIsLoggingToFile + && ![dataToWrite writeToFile:responseDataFilePath + options:0 + error:&downloadedError]) { + NSLog(@"%@ logging write error:%@ (%@)", + [self class], downloadedError, responseDataFileName); + } + } + } + + // we'll have one main html file per run of the app + NSString *htmlName = @"aperçu_http_log.html"; + NSString *htmlPath =[logDirectory stringByAppendingPathComponent:htmlName]; + + // if the html file exists (from logging previous fetches) we don't need + // to re-write the header or the scripts + BOOL didFileExist = [[self class] fileOrDirExistsAtPath:htmlPath]; + + NSMutableString* outputHTML = [NSMutableString string]; + NSURLRequest *request = [self mutableRequest]; + + // we need a header to say we'll have UTF-8 text + if (!didFileExist) { + [outputHTML appendFormat:@"%@ HTTP fetch log %@", + processName, dateStamp]; + } + + // now write the visible html elements + NSString *copyableFileName = [NSString stringWithFormat:@"fetch_%d.txt", + responseCounter]; + + // write the date & time, the comment, and the link to the plain-text + // (copyable) log + NSString *const dateLineFormat = @"%@      "; + [outputHTML appendFormat:dateLineFormat, [NSDate date]]; + + NSString *comment = [self comment]; + if (comment) { + NSString *const commentFormat = @"%@      "; + [outputHTML appendFormat:commentFormat, comment]; + } + + NSString *const reqRespFormat = @"request/response log
"; + [outputHTML appendFormat:reqRespFormat, copyableFileName]; + + // write the request URL + NSString *requestMethod = [request HTTPMethod]; + NSURL *requestURL = [request URL]; + [outputHTML appendFormat:@"request: %@ %@
\n", + requestMethod, requestURL]; + + // write the request headers + NSDictionary *requestHeaders = [request allHTTPHeaderFields]; + NSUInteger numberOfRequestHeaders = [requestHeaders count]; + if (numberOfRequestHeaders > 0) { + // Indicate if the request is authorized; warn if the request is + // authorized but non-SSL + NSString *auth = [requestHeaders objectForKey:@"Authorization"]; + NSString *headerDetails = @""; + if (auth) { + headerDetails = @"   authorized"; + BOOL isInsecure = [[requestURL scheme] isEqual:@"http"]; + if (isInsecure) { + headerDetails = @"   authorized, non-SSL" + " "; // 26A0 = ⚠ + } + } + NSString *cookiesHdr = [requestHeaders objectForKey:@"Cookie"]; + if (cookiesHdr) { + headerDetails = [headerDetails stringByAppendingString: + @"   cookies"]; + } + NSString *matchHdr = [requestHeaders objectForKey:@"If-Match"]; + if (matchHdr) { + headerDetails = [headerDetails stringByAppendingString: + @"   if-match"]; + } + matchHdr = [requestHeaders objectForKey:@"If-None-Match"]; + if (matchHdr) { + headerDetails = [headerDetails stringByAppendingString: + @"   if-none-match"]; + } + [outputHTML appendFormat:@"   headers: %d %@
", + (int)numberOfRequestHeaders, headerDetails]; + } else { + [outputHTML appendFormat:@"   headers: none
"]; + } + + // write the request post data, toggleable + NSData *postData; + if (loggedStreamData_) { + postData = loggedStreamData_; + } else if (postData_) { + postData = postData_; + } else { + postData = [request_ HTTPBody]; + } + + NSString *postDataStr = nil; + NSUInteger postDataLength = [postData length]; + NSString *postType = [requestHeaders valueForKey:@"Content-Type"]; + + if (postDataLength > 0) { + [outputHTML appendFormat:@"   data: %d bytes, %@
\n", + (int)postDataLength, postType ? postType : @""]; + + if (logRequestBody_) { + postDataStr = [[logRequestBody_ copy] autorelease]; + [logRequestBody_ release]; + logRequestBody_ = nil; + } else { + postDataStr = [self stringFromStreamData:postData + contentType:postType]; + if (postDataStr) { + // remove OAuth 2 client secret and refresh token + postDataStr = [[self class] snipSubstringOfString:postDataStr + betweenStartString:@"client_secret=" + endString:@"&"]; + + postDataStr = [[self class] snipSubstringOfString:postDataStr + betweenStartString:@"refresh_token=" + endString:@"&"]; + + // remove ClientLogin password + postDataStr = [[self class] snipSubstringOfString:postDataStr + betweenStartString:@"&Passwd=" + endString:@"&"]; + } + } + } else { + // no post data + } + + // write the response status, MIME type, URL + NSInteger status = [self statusCode]; + if (response) { + NSString *statusString = @""; + if (status != 0) { + if (status == 200 || status == 201) { + statusString = [NSString stringWithFormat:@"%ld", (long)status]; + + // report any JSON-RPC error + if ([responseJSON isKindOfClass:[NSDictionary class]]) { + NSDictionary *jsonError = [responseJSON objectForKey:@"error"]; + if ([jsonError isKindOfClass:[NSDictionary class]]) { + NSString *jsonCode = [[jsonError valueForKey:@"code"] description]; + NSString *jsonMessage = [jsonError valueForKey:@"message"]; + if (jsonCode || jsonMessage) { + NSString *const jsonErrFmt = @"   JSON error: %@ %@  ⚑"; // 2691 = ⚑ + statusString = [statusString stringByAppendingFormat:jsonErrFmt, + jsonCode ? jsonCode : @"", + jsonMessage ? jsonMessage : @""]; + } + } + } + } else { + // purple for anything other than 200 or 201 + NSString *flag = (status >= 400 ? @" ⚑" : @""); // 2691 = ⚑ + NSString *const statusFormat = @"%ld %@"; + statusString = [NSString stringWithFormat:statusFormat, + (long)status, flag]; + } + } + + // show the response URL only if it's different from the request URL + NSString *responseURLStr = @""; + NSURL *responseURL = [response URL]; + + if (responseURL && ![responseURL isEqual:[request URL]]) { + NSString *const responseURLFormat = @"response URL:" + " %@
\n"; + responseURLStr = [NSString stringWithFormat:responseURLFormat, + [responseURL absoluteString]]; + } + + [outputHTML appendFormat:@"response:  status %@
\n%@", + statusString, responseURLStr]; + + // Write the response headers + NSUInteger numberOfResponseHeaders = [responseHeaders count]; + if (numberOfResponseHeaders > 0) { + // Indicate if the server is setting cookies + NSString *cookiesSet = [responseHeaders valueForKey:@"Set-Cookie"]; + NSString *cookiesStr = (cookiesSet ? @"  " + "sets cookies" : @""); + // Indicate if the server is redirecting + NSString *location = [responseHeaders valueForKey:@"Location"]; + BOOL isRedirect = (status >= 300 && status <= 399 && location != nil); + NSString *redirectsStr = (isRedirect ? @"  " + "redirects" : @""); + + [outputHTML appendFormat:@"   headers: %d %@ %@
\n", + (int)numberOfResponseHeaders, cookiesStr, redirectsStr]; + } else { + [outputHTML appendString:@"   headers: none
\n"]; + } + } + + // error + if (error) { + [outputHTML appendFormat:@"Error: %@
\n", [error description]]; + } + + // Write the response data + if (responseDataFileName) { + NSString *escapedResponseFile = [responseDataFileName stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + if (isResponseImage) { + // Make a small inline image that links to the full image file + [outputHTML appendFormat:@"   data: %d bytes, %@
", + (int)responseDataLength, responseMIMEType]; + NSString *const fmt = @"image\n"; + [outputHTML appendFormat:fmt, + escapedResponseFile, escapedResponseFile]; + } else { + // The response data was XML; link to the xml file + NSString *const fmt = @"   data: %d bytes, " + "%@   %@\n"; + [outputHTML appendFormat:fmt, + (int)responseDataLength, responseMIMEType, + escapedResponseFile, [escapedResponseFile pathExtension]]; + } + } else { + // The response data was not an image; just show the length and MIME type + [outputHTML appendFormat:@"   data: %d bytes, %@\n", + (int)responseDataLength, responseMIMEType]; + } + + // Make a single string of the request and response, suitable for copying + // to the clipboard and pasting into a bug report + NSMutableString *copyable = [NSMutableString string]; + if (comment) { + [copyable appendFormat:@"%@\n\n", comment]; + } + [copyable appendFormat:@"%@\n", [NSDate date]]; + [copyable appendFormat:@"Request: %@ %@\n", requestMethod, requestURL]; + if ([requestHeaders count] > 0) { + [copyable appendFormat:@"Request headers:\n%@\n", + [[self class] headersStringForDictionary:requestHeaders]]; + } + + if (postDataLength > 0) { + [copyable appendFormat:@"Request body: (%u bytes)\n", + (unsigned int) postDataLength]; + if (postDataStr) { + [copyable appendFormat:@"%@\n", postDataStr]; + } + [copyable appendString:@"\n"]; + } + + if (response) { + [copyable appendFormat:@"Response: status %d\n", (int) status]; + [copyable appendFormat:@"Response headers:\n%@\n", + [[self class] headersStringForDictionary:responseHeaders]]; + [copyable appendFormat:@"Response body: (%u bytes)\n", + (unsigned int) responseDataLength]; + if (responseDataLength > 0) { + if (logResponseBody_) { + responseDataStr = [[logResponseBody_ copy] autorelease]; + [logResponseBody_ release]; + logResponseBody_ = nil; + } + if (responseDataStr != nil) { + [copyable appendFormat:@"%@\n", responseDataStr]; + } else if (status >= 400 && [temporaryDownloadPath_ length] > 0) { + // Try to read in the saved data, which is probably a server error + // message + NSStringEncoding enc; + responseDataStr = [NSString stringWithContentsOfFile:temporaryDownloadPath_ + usedEncoding:&enc + error:NULL]; + if ([responseDataStr length] > 0) { + [copyable appendFormat:@"%@\n", responseDataStr]; + } else { + [copyable appendFormat:@"<<%u bytes to file>>\n", + (unsigned int) responseDataLength]; + } + } else { + // Even though it's redundant, we'll put in text to indicate that all + // the bytes are binary + [copyable appendFormat:@"<<%u bytes>>\n", + (unsigned int) responseDataLength]; + } + } + } + + if (error) { + [copyable appendFormat:@"Error: %@\n", error]; + } + + // Save to log property before adding the separator + self.log = copyable; + + [copyable appendString:@"-----------------------------------------------------------\n"]; + + + // Write the copyable version to another file (linked to at the top of the + // html file, above) + // + // Ideally, something to just copy this to the clipboard like + // Copy here." + // would work everywhere, but it only works in Safari as of 8/2010 + if (gIsLoggingToFile) { + NSString *copyablePath = [logDirectory stringByAppendingPathComponent:copyableFileName]; + NSError *copyableError = nil; + if (![copyable writeToFile:copyablePath + atomically:NO + encoding:NSUTF8StringEncoding + error:©ableError]) { + // Error writing to file + NSLog(@"%@ logging write error:%@ (%@)", + [self class], copyableError, copyablePath); + } + + [outputHTML appendString:@"

"]; + + // Append the HTML to the main output file + const char* htmlBytes = [outputHTML UTF8String]; + NSOutputStream *stream = [NSOutputStream outputStreamToFileAtPath:htmlPath + append:YES]; + [stream open]; + [stream write:(const uint8_t *) htmlBytes maxLength:strlen(htmlBytes)]; + [stream close]; + + // Make a symlink to the latest html + NSString *symlinkName = [NSString stringWithFormat:@"%@_log_newest.html", + processName]; + NSString *symlinkPath = [parentDir stringByAppendingPathComponent:symlinkName]; + + [[self class] removeItemAtPath:symlinkPath]; + [[self class] createSymbolicLinkAtPath:symlinkPath + withDestinationPath:htmlPath]; + +#if GTM_IPHONE + static BOOL gReportedLoggingPath = NO; + if (!gReportedLoggingPath) { + gReportedLoggingPath = YES; + NSLog(@"GTMHTTPFetcher logging to \"%@\"", parentDir); + } +#endif + } +} + +- (BOOL)logCapturePostStream { + // This is called when beginning a fetch. The caller should have already + // verified that logging is enabled, and should have allocated + // loggedStreamData_ as a mutable object. + + // If the class GTMReadMonitorInputStream is not available, bail now, since + // we cannot capture this upload stream + Class monitorClass = NSClassFromString(@"GTMReadMonitorInputStream"); + if (!monitorClass) return NO; + + // If we're logging, we need to wrap the upload stream with our monitor + // stream that will call us back with the bytes being read from the stream + + // Our wrapper will retain the old post stream + [postStream_ autorelease]; + + postStream_ = [monitorClass inputStreamWithStream:postStream_]; + [postStream_ retain]; + + [(GTMReadMonitorInputStream *)postStream_ setReadDelegate:self]; + [(GTMReadMonitorInputStream *)postStream_ setRunLoopModes:[self runLoopModes]]; + + SEL readSel = @selector(inputStream:readIntoBuffer:length:); + [(GTMReadMonitorInputStream *)postStream_ setReadSelector:readSel]; + + return YES; +} + +@end + +@implementation GTMHTTPFetcher (GTMHTTPFetcherLoggingUtilities) + +- (void)inputStream:(GTMReadMonitorInputStream *)stream + readIntoBuffer:(void *)buffer + length:(NSUInteger)length { + // append the captured data + [loggedStreamData_ appendBytes:buffer length:length]; +} + +#pragma mark Internal file routines + +// We implement plain Unix versions of NSFileManager methods to avoid +// NSFileManager's issues with being used from multiple threads + ++ (BOOL)fileOrDirExistsAtPath:(NSString *)path { + struct stat buffer; + int result = stat([path fileSystemRepresentation], &buffer); + return (result == 0); +} + ++ (BOOL)makeDirectoryUpToPath:(NSString *)path { + int result = 0; + + // Recursively create the parent directory of the requested path + NSString *parent = [path stringByDeletingLastPathComponent]; + if (![self fileOrDirExistsAtPath:parent]) { + result = [self makeDirectoryUpToPath:parent]; + } + + // Make the leaf directory + if (result == 0 && ![self fileOrDirExistsAtPath:path]) { + result = mkdir([path fileSystemRepresentation], S_IRWXU); // RWX for owner + } + return (result == 0); +} + ++ (BOOL)removeItemAtPath:(NSString *)path { + int result = unlink([path fileSystemRepresentation]); + return (result == 0); +} + ++ (BOOL)createSymbolicLinkAtPath:(NSString *)newPath + withDestinationPath:(NSString *)targetPath { + int result = symlink([targetPath fileSystemRepresentation], + [newPath fileSystemRepresentation]); + return (result == 0); +} + +#pragma mark Fomatting Utilities + ++ (NSString *)snipSubstringOfString:(NSString *)originalStr + betweenStartString:(NSString *)startStr + endString:(NSString *)endStr { +#if SKIP_GTM_FETCH_LOGGING_SNIPPING + return originalStr; +#else + if (originalStr == nil) return nil; + + // Find the start string, and replace everything between it + // and the end string (or the end of the original string) with "_snip_" + NSRange startRange = [originalStr rangeOfString:startStr]; + if (startRange.location == NSNotFound) return originalStr; + + // We found the start string + NSUInteger originalLength = [originalStr length]; + NSUInteger startOfTarget = NSMaxRange(startRange); + NSRange targetAndRest = NSMakeRange(startOfTarget, + originalLength - startOfTarget); + NSRange endRange = [originalStr rangeOfString:endStr + options:0 + range:targetAndRest]; + NSRange replaceRange; + if (endRange.location == NSNotFound) { + // Found no end marker so replace to end of string + replaceRange = targetAndRest; + } else { + // Replace up to the endStr + replaceRange = NSMakeRange(startOfTarget, + endRange.location - startOfTarget); + } + + NSString *result = [originalStr stringByReplacingCharactersInRange:replaceRange + withString:@"_snip_"]; + return result; +#endif // SKIP_GTM_FETCH_LOGGING_SNIPPING +} + ++ (NSString *)headersStringForDictionary:(NSDictionary *)dict { + // Format the dictionary in http header style, like + // Accept: application/json + // Cache-Control: no-cache + // Content-Type: application/json; charset=utf-8 + // + // Pad the key names, but not beyond 16 chars, since long custom header + // keys just create too much whitespace + NSArray *keys = [[dict allKeys] sortedArrayUsingSelector:@selector(compare:)]; + + NSMutableString *str = [NSMutableString string]; + for (NSString *key in keys) { + NSString *value = [dict valueForKey:key]; + if ([key isEqual:@"Authorization"]) { + // Remove OAuth 1 token + value = [[self class] snipSubstringOfString:value + betweenStartString:@"oauth_token=\"" + endString:@"\""]; + + // Remove OAuth 2 bearer token (draft 16, and older form) + value = [[self class] snipSubstringOfString:value + betweenStartString:@"Bearer " + endString:@"\n"]; + value = [[self class] snipSubstringOfString:value + betweenStartString:@"OAuth " + endString:@"\n"]; + + // Remove Google ClientLogin + value = [[self class] snipSubstringOfString:value + betweenStartString:@"GoogleLogin auth=" + endString:@"\n"]; + } + [str appendFormat:@" %@: %@\n", key, value]; + } + return str; +} + ++ (id)JSONObjectWithData:(NSData *)data { + Class serializer = NSClassFromString(@"NSJSONSerialization"); + if (serializer) { + const NSUInteger kOpts = (1UL << 0); // NSJSONReadingMutableContainers + NSMutableDictionary *obj; + obj = [serializer JSONObjectWithData:data + options:kOpts + error:NULL]; + return obj; + } else { + // Try SBJsonParser or SBJSON + Class jsonParseClass = NSClassFromString(@"SBJsonParser"); + if (!jsonParseClass) { + jsonParseClass = NSClassFromString(@"SBJSON"); + } + if (jsonParseClass) { + GTMFetcherSBJSON *parser = [[[jsonParseClass alloc] init] autorelease]; + NSString *jsonStr = [[[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding] autorelease]; + if (jsonStr) { + NSMutableDictionary *obj = [parser objectWithString:jsonStr error:NULL]; + return obj; + } + } + } + return nil; +} + ++ (id)stringWithJSONObject:(id)obj { + Class serializer = NSClassFromString(@"NSJSONSerialization"); + if (serializer) { + const NSUInteger kOpts = (1UL << 0); // NSJSONWritingPrettyPrinted + NSData *data; + data = [serializer dataWithJSONObject:obj + options:kOpts + error:NULL]; + if (data) { + NSString *jsonStr = [[[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding] autorelease]; + return jsonStr; + } + } else { + // Try SBJsonParser or SBJSON + Class jsonWriterClass = NSClassFromString(@"SBJsonWriter"); + if (!jsonWriterClass) { + jsonWriterClass = NSClassFromString(@"SBJSON"); + } + if (jsonWriterClass) { + GTMFetcherSBJSON *writer = [[[jsonWriterClass alloc] init] autorelease]; + [writer setHumanReadable:YES]; + NSString *jsonStr = [writer stringWithObject:obj error:NULL]; + return jsonStr; + } + } + return nil; +} + +@end + +#endif // !STRIP_GTM_FETCH_LOGGING diff --git a/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPFetcherService.h.svn-base b/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPFetcherService.h.svn-base new file mode 100644 index 0000000..9c6cd75 --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPFetcherService.h.svn-base @@ -0,0 +1,125 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMHTTPFetcherService.h +// + +// The fetcher service class maintains a history to be used by a sequence +// of fetchers objects generated by the service. +// +// Fetchers that do not need to share a history may be generated independently, +// like +// +// GTMHTTPFetcher* myFetcher = [GTMHTTPFetcher fetcherWithRequest:request]; +// +// Fetchers that should share cookies or an ETagged data cache should be +// generated by a common GTMHTTPFetcherService instance, like +// +// GTMHTTPFetcherService *myFetcherService = [[GTMHTTPFetcherService alloc] init]; +// GTMHTTPFetcher* myFirstFetcher = [myFetcherService fetcherWithRequest:request1]; +// GTMHTTPFetcher* mySecondFetcher = [myFetcherService fetcherWithRequest:request2]; + +#import "GTMHTTPFetcher.h" +#import "GTMHTTPFetchHistory.h" + +@interface GTMHTTPFetcherService : NSObject { + @private + NSMutableDictionary *delayedHosts_; + NSMutableDictionary *runningHosts_; + NSUInteger maxRunningFetchersPerHost_; + + GTMHTTPFetchHistory *fetchHistory_; + NSOperationQueue *delegateQueue_; + NSArray *runLoopModes_; + NSString *userAgent_; + NSTimeInterval timeout_; + NSURLCredential *credential_; // username & password + NSURLCredential *proxyCredential_; // credential supplied to proxy servers + NSInteger cookieStorageMethod_; + + BOOL shouldFetchInBackground_; + + id authorizer_; +} + +// Create a fetcher +// +// These methods will return an autoreleased fetcher, but if +// the fetcher is successfully created, the connection will retain the +// fetcher for the life of the connection as well. So the caller doesn't have +// to retain the fetcher explicitly unless they want to be able to monitor +// or cancel it. +- (GTMHTTPFetcher *)fetcherWithRequest:(NSURLRequest *)request; +- (GTMHTTPFetcher *)fetcherWithURL:(NSURL *)requestURL; +- (GTMHTTPFetcher *)fetcherWithURLString:(NSString *)requestURLString; +- (id)fetcherWithRequest:(NSURLRequest *)request + fetcherClass:(Class)fetcherClass; + +// Queues of delayed and running fetchers. Each dictionary contains arrays +// of fetchers, keyed by host +// +// A max value of 0 means no fetchers should be delayed. +// +// The default limit is 10 simultaneous fetchers targeting each host. +@property (assign) NSUInteger maxRunningFetchersPerHost; +@property (retain, readonly) NSDictionary *delayedHosts; +@property (retain, readonly) NSDictionary *runningHosts; + +- (BOOL)isDelayingFetcher:(GTMHTTPFetcher *)fetcher; + +- (NSUInteger)numberOfFetchers; // running + delayed fetchers +- (NSUInteger)numberOfRunningFetchers; +- (NSUInteger)numberOfDelayedFetchers; + +// Search for running or delayed fetchers with the specified URL. +// +// Returns an array of fetcher objects found, or nil if none found. +- (NSArray *)issuedFetchersWithRequestURL:(NSURL *)requestURL; + +- (void)stopAllFetchers; + +// Properties to be applied to each fetcher; +// see GTMHTTPFetcher.h for descriptions +@property (copy) NSString *userAgent; +@property (assign) NSTimeInterval timeout; +@property (retain) NSOperationQueue *delegateQueue; +@property (retain) NSArray *runLoopModes; +@property (retain) NSURLCredential *credential; +@property (retain) NSURLCredential *proxyCredential; +@property (assign) BOOL shouldFetchInBackground; + +// Fetch history +@property (retain) GTMHTTPFetchHistory *fetchHistory; + +@property (assign) NSInteger cookieStorageMethod; +@property (assign) BOOL shouldRememberETags; // default: NO +@property (assign) BOOL shouldCacheETaggedData; // default: NO + +- (void)clearETaggedDataCache; +- (void)clearHistory; + +@property (nonatomic, retain) id authorizer; + +// Spin the run loop, discarding events, until all running and delayed fetchers +// have completed +// +// This is only for use in testing or in tools without a user interface. +// +// Synchronous fetches should never be done by shipping apps; they are +// sufficient reason for rejection from the app store. +- (void)waitForCompletionOfAllFetchersWithTimeout:(NSTimeInterval)timeoutInSeconds; + +@end diff --git a/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPFetcherService.m.svn-base b/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPFetcherService.m.svn-base new file mode 100644 index 0000000..15909db --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPFetcherService.m.svn-base @@ -0,0 +1,490 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMHTTPFetcherService.m +// + +#import "GTMHTTPFetcherService.h" + +@interface GTMHTTPFetcher (ServiceMethods) +- (BOOL)beginFetchMayDelay:(BOOL)mayDelay + mayAuthorize:(BOOL)mayAuthorize; +@end + +@interface GTMHTTPFetcherService () +@property (retain, readwrite) NSDictionary *delayedHosts; +@property (retain, readwrite) NSDictionary *runningHosts; + +- (void)detachAuthorizer; +@end + +@implementation GTMHTTPFetcherService + +@synthesize maxRunningFetchersPerHost = maxRunningFetchersPerHost_, + userAgent = userAgent_, + timeout = timeout_, + delegateQueue = delegateQueue_, + runLoopModes = runLoopModes_, + credential = credential_, + proxyCredential = proxyCredential_, + cookieStorageMethod = cookieStorageMethod_, + shouldFetchInBackground = shouldFetchInBackground_, + fetchHistory = fetchHistory_; + +- (id)init { + self = [super init]; + if (self) { + fetchHistory_ = [[GTMHTTPFetchHistory alloc] init]; + delayedHosts_ = [[NSMutableDictionary alloc] init]; + runningHosts_ = [[NSMutableDictionary alloc] init]; + cookieStorageMethod_ = kGTMHTTPFetcherCookieStorageMethodFetchHistory; + + maxRunningFetchersPerHost_ = 10; +} + return self; +} + +- (void)dealloc { + [self detachAuthorizer]; + + [delayedHosts_ release]; + [runningHosts_ release]; + [fetchHistory_ release]; + [userAgent_ release]; + [delegateQueue_ release]; + [runLoopModes_ release]; + [credential_ release]; + [proxyCredential_ release]; + [authorizer_ release]; + + [super dealloc]; +} + +#pragma mark Generate a new fetcher + +- (id)fetcherWithRequest:(NSURLRequest *)request + fetcherClass:(Class)fetcherClass { + GTMHTTPFetcher *fetcher = [fetcherClass fetcherWithRequest:request]; + + fetcher.fetchHistory = self.fetchHistory; + fetcher.delegateQueue = self.delegateQueue; + fetcher.runLoopModes = self.runLoopModes; + fetcher.cookieStorageMethod = self.cookieStorageMethod; + fetcher.credential = self.credential; + fetcher.proxyCredential = self.proxyCredential; + fetcher.shouldFetchInBackground = self.shouldFetchInBackground; + fetcher.authorizer = self.authorizer; + fetcher.service = self; + + NSString *userAgent = self.userAgent; + if ([userAgent length] > 0 + && [request valueForHTTPHeaderField:@"User-Agent"] == nil) { + [fetcher.mutableRequest setValue:userAgent + forHTTPHeaderField:@"User-Agent"]; + } + + NSTimeInterval timeout = self.timeout; + if (timeout > 0.0) { + [fetcher.mutableRequest setTimeoutInterval:timeout]; + } + + return fetcher; +} + +- (GTMHTTPFetcher *)fetcherWithRequest:(NSURLRequest *)request { + return [self fetcherWithRequest:request + fetcherClass:[GTMHTTPFetcher class]]; +} + +- (GTMHTTPFetcher *)fetcherWithURL:(NSURL *)requestURL { + return [self fetcherWithRequest:[NSURLRequest requestWithURL:requestURL]]; +} + +- (GTMHTTPFetcher *)fetcherWithURLString:(NSString *)requestURLString { + return [self fetcherWithURL:[NSURL URLWithString:requestURLString]]; +} + +#pragma mark Queue Management + +- (void)addRunningFetcher:(GTMHTTPFetcher *)fetcher + forHost:(NSString *)host { + // Add to the array of running fetchers for this host, creating the array + // if needed + NSMutableArray *runningForHost = [runningHosts_ objectForKey:host]; + if (runningForHost == nil) { + runningForHost = [NSMutableArray arrayWithObject:fetcher]; + [runningHosts_ setObject:runningForHost forKey:host]; + } else { + [runningForHost addObject:fetcher]; + } +} + +- (void)addDelayedFetcher:(GTMHTTPFetcher *)fetcher + forHost:(NSString *)host { + // Add to the array of delayed fetchers for this host, creating the array + // if needed + NSMutableArray *delayedForHost = [delayedHosts_ objectForKey:host]; + if (delayedForHost == nil) { + delayedForHost = [NSMutableArray arrayWithObject:fetcher]; + [delayedHosts_ setObject:delayedForHost forKey:host]; + } else { + [delayedForHost addObject:fetcher]; + } +} + +- (BOOL)isDelayingFetcher:(GTMHTTPFetcher *)fetcher { + @synchronized(self) { + NSString *host = [[[fetcher mutableRequest] URL] host]; + NSArray *delayedForHost = [delayedHosts_ objectForKey:host]; + NSUInteger idx = [delayedForHost indexOfObjectIdenticalTo:fetcher]; + BOOL isDelayed = (delayedForHost != nil) && (idx != NSNotFound); + return isDelayed; + } +} + +- (BOOL)fetcherShouldBeginFetching:(GTMHTTPFetcher *)fetcher { + // Entry point from the fetcher + @synchronized(self) { + NSString *host = [[[fetcher mutableRequest] URL] host]; + + if ([host length] == 0) { +#if DEBUG + NSAssert1(0, @"%@ lacks host", fetcher); +#endif + return YES; + } + + NSMutableArray *runningForHost = [runningHosts_ objectForKey:host]; + if (runningForHost != nil + && [runningForHost indexOfObjectIdenticalTo:fetcher] != NSNotFound) { +#if DEBUG + NSAssert1(0, @"%@ was already running", fetcher); +#endif + return YES; + } + + // We'll save the host that serves as the key for this fetcher's array + // to avoid any chance of the underlying request changing, stranding + // the fetcher in the wrong array + fetcher.serviceHost = host; + fetcher.thread = [NSThread currentThread]; + + if (maxRunningFetchersPerHost_ == 0 + || maxRunningFetchersPerHost_ > [runningForHost count]) { + [self addRunningFetcher:fetcher forHost:host]; + return YES; + } else { + [self addDelayedFetcher:fetcher forHost:host]; + return NO; + } + } + return YES; +} + +// Fetcher start and stop methods, invoked on the appropriate thread for +// the fetcher +- (void)performSelector:(SEL)sel onStartThreadForFetcher:(GTMHTTPFetcher *)fetcher { + NSOperationQueue *delegateQueue = fetcher.delegateQueue; + NSThread *thread = fetcher.thread; + if (delegateQueue != nil || [thread isEqual:[NSThread currentThread]]) { + // The fetcher should run on the thread we're on now, or there's a delegate + // queue specified so it doesn't matter what thread the fetcher is started + // on, since it will call back on the queue. + [self performSelector:sel withObject:fetcher]; + } else { + // Fetcher must run on a specified thread (and that thread must have a + // run loop.) + [self performSelector:sel + onThread:thread + withObject:fetcher + waitUntilDone:NO]; + } +} + +- (void)startFetcherOnCurrentThread:(GTMHTTPFetcher *)fetcher { + [fetcher beginFetchMayDelay:NO + mayAuthorize:YES]; +} + +- (void)startFetcher:(GTMHTTPFetcher *)fetcher { + [self performSelector:@selector(startFetcherOnCurrentThread:) + onStartThreadForFetcher:fetcher]; +} + +- (void)stopFetcherOnCurrentThread:(GTMHTTPFetcher *)fetcher { + [fetcher stopFetching]; +} + +- (void)stopFetcher:(GTMHTTPFetcher *)fetcher { + [self performSelector:@selector(stopFetcherOnCurrentThread:) + onStartThreadForFetcher:fetcher]; +} + +- (void)fetcherDidStop:(GTMHTTPFetcher *)fetcher { + // Entry point from the fetcher + @synchronized(self) { + NSString *host = fetcher.serviceHost; + if (!host) { + // fetcher has been stopped previously + return; + } + + NSMutableArray *runningForHost = [runningHosts_ objectForKey:host]; + [runningForHost removeObject:fetcher]; + + NSMutableArray *delayedForHost = [delayedHosts_ objectForKey:host]; + [delayedForHost removeObject:fetcher]; + + while ([delayedForHost count] > 0 + && [runningForHost count] < maxRunningFetchersPerHost_) { + // Start another delayed fetcher running, scanning for the minimum + // priority value, defaulting to FIFO for equal priorities + GTMHTTPFetcher *nextFetcher = nil; + for (GTMHTTPFetcher *delayedFetcher in delayedForHost) { + if (nextFetcher == nil + || delayedFetcher.servicePriority < nextFetcher.servicePriority) { + nextFetcher = delayedFetcher; + } + } + + [self addRunningFetcher:nextFetcher forHost:host]; + runningForHost = [runningHosts_ objectForKey:host]; + + [delayedForHost removeObjectIdenticalTo:nextFetcher]; + [self startFetcher:nextFetcher]; + } + + if ([runningForHost count] == 0) { + // None left; remove the empty array + [runningHosts_ removeObjectForKey:host]; + } + + if ([delayedForHost count] == 0) { + [delayedHosts_ removeObjectForKey:host]; + } + + // The fetcher is no longer in the running or the delayed array, + // so remove its host and thread properties + fetcher.serviceHost = nil; + fetcher.thread = nil; + } +} + +- (NSUInteger)numberOfFetchers { + @synchronized(self) { + NSUInteger running = [self numberOfRunningFetchers]; + NSUInteger delayed = [self numberOfDelayedFetchers]; + return running + delayed; + } +} + +- (NSUInteger)numberOfRunningFetchers { + @synchronized(self) { + NSUInteger sum = 0; + for (NSString *host in runningHosts_) { + NSArray *fetchers = [runningHosts_ objectForKey:host]; + sum += [fetchers count]; + } + return sum; + } +} + +- (NSUInteger)numberOfDelayedFetchers { + @synchronized(self) { + NSUInteger sum = 0; + for (NSString *host in delayedHosts_) { + NSArray *fetchers = [delayedHosts_ objectForKey:host]; + sum += [fetchers count]; + } + return sum; + } +} + +- (NSArray *)issuedFetchersWithRequestURL:(NSURL *)requestURL { + @synchronized(self) { + NSMutableArray *array = nil; + NSString *host = [requestURL host]; + if ([host length] == 0) return nil; + + NSURL *absRequestURL = [requestURL absoluteURL]; + + NSArray *runningForHost = [runningHosts_ objectForKey:host]; + for (GTMHTTPFetcher *fetcher in runningForHost) { + NSURL *fetcherURL = [[[fetcher mutableRequest] URL] absoluteURL]; + if ([fetcherURL isEqual:absRequestURL]) { + if (array == nil) { + array = [NSMutableArray array]; + } + [array addObject:fetcher]; + } + } + + NSArray *delayedForHost = [delayedHosts_ objectForKey:host]; + for (GTMHTTPFetcher *fetcher in delayedForHost) { + NSURL *fetcherURL = [[[fetcher mutableRequest] URL] absoluteURL]; + if ([fetcherURL isEqual:absRequestURL]) { + if (array == nil) { + array = [NSMutableArray array]; + } + [array addObject:fetcher]; + } + } + return array; + } +} + +- (void)stopAllFetchers { + @synchronized(self) { + // Remove fetchers from the delayed list to avoid fetcherDidStop: from + // starting more fetchers running as a side effect of stopping one + NSArray *delayedForHosts = [delayedHosts_ allValues]; + [delayedHosts_ removeAllObjects]; + + for (NSArray *delayedForHost in delayedForHosts) { + for (GTMHTTPFetcher *fetcher in delayedForHost) { + [self stopFetcher:fetcher]; + } + } + + NSArray *runningForHosts = [runningHosts_ allValues]; + [runningHosts_ removeAllObjects]; + + for (NSArray *runningForHost in runningForHosts) { + for (GTMHTTPFetcher *fetcher in runningForHost) { + [self stopFetcher:fetcher]; + } + } + } +} + +#pragma mark Fetch History Settings + +// Turn on data caching to receive a copy of previously-retrieved objects. +// Otherwise, fetches may return status 304 (No Change) rather than actual data +- (void)setShouldCacheETaggedData:(BOOL)flag { + self.fetchHistory.shouldCacheETaggedData = flag; +} + +- (BOOL)shouldCacheETaggedData { + return self.fetchHistory.shouldCacheETaggedData; +} + +- (void)setETaggedDataCacheCapacity:(NSUInteger)totalBytes { + self.fetchHistory.memoryCapacity = totalBytes; +} + +- (NSUInteger)ETaggedDataCacheCapacity { + return self.fetchHistory.memoryCapacity; +} + +- (void)setShouldRememberETags:(BOOL)flag { + self.fetchHistory.shouldRememberETags = flag; +} + +- (BOOL)shouldRememberETags { + return self.fetchHistory.shouldRememberETags; +} + +// reset the ETag cache to avoid getting a Not Modified status +// based on prior queries +- (void)clearETaggedDataCache { + [self.fetchHistory clearETaggedDataCache]; +} + +- (void)clearHistory { + [self clearETaggedDataCache]; + [self.fetchHistory removeAllCookies]; +} + +#pragma mark Synchronous Wait for Unit Testing + +- (void)waitForCompletionOfAllFetchersWithTimeout:(NSTimeInterval)timeoutInSeconds { + NSDate* giveUpDate = [NSDate dateWithTimeIntervalSinceNow:timeoutInSeconds]; + BOOL isMainThread = [NSThread isMainThread]; + + while ([self numberOfFetchers] > 0 + && [giveUpDate timeIntervalSinceNow] > 0) { + // Run the current run loop 1/1000 of a second to give the networking + // code a chance to work + if (isMainThread || delegateQueue_ == nil) { + NSDate *stopDate = [NSDate dateWithTimeIntervalSinceNow:0.001]; + [[NSRunLoop currentRunLoop] runUntilDate:stopDate]; + } else { + // Sleep on the delegate queue's background thread. + [NSThread sleepForTimeInterval:0.001]; + } + } +} + +#pragma mark Accessors + +- (NSDictionary *)runningHosts { + return runningHosts_; +} + +- (void)setRunningHosts:(NSDictionary *)dict { + [runningHosts_ autorelease]; + runningHosts_ = [dict mutableCopy]; +} + +- (NSDictionary *)delayedHosts { + return delayedHosts_; +} + +- (void)setDelayedHosts:(NSDictionary *)dict { + [delayedHosts_ autorelease]; + delayedHosts_ = [dict mutableCopy]; +} + +- (id )authorizer { + return authorizer_; +} + +- (void)setAuthorizer:(id )obj { + if (obj != authorizer_) { + [self detachAuthorizer]; + } + + [authorizer_ autorelease]; + authorizer_ = [obj retain]; + + // Use the fetcher service for the authorization fetches if the auth + // object supports fetcher services + if ([authorizer_ respondsToSelector:@selector(setFetcherService:)]) { + [authorizer_ setFetcherService:self]; + } +} + +- (void)detachAuthorizer { + // This method is called by the fetcher service's dealloc and setAuthorizer: + // methods; do not override. + // + // The fetcher service retains the authorizer, and the authorizer has a + // weak pointer to the fetcher service (a non-zeroing pointer for + // compatibility with iOS 4 and Mac OS X 10.5/10.6.) + // + // When this fetcher service no longer uses the authorizer, we want to remove + // the authorizer's dependence on the fetcher service. Authorizers can still + // function without a fetcher service. + if ([authorizer_ respondsToSelector:@selector(fetcherService)]) { + GTMHTTPFetcherService *authFS = [authorizer_ fetcherService]; + if (authFS == self) { + [authorizer_ setFetcherService:nil]; + } + } +} + +@end diff --git a/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPUploadFetcher.h.svn-base b/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPUploadFetcher.h.svn-base new file mode 100644 index 0000000..b0ce3b6 --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPUploadFetcher.h.svn-base @@ -0,0 +1,139 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMHTTPUploadFetcher.h +// + +#if (!GDATA_REQUIRE_SERVICE_INCLUDES) || GDATA_INCLUDE_DOCS_SERVICE || \ + GDATA_INCLUDE_YOUTUBE_SERVICE || GDATA_INCLUDE_PHOTOS_SERVICE + +// +// This subclass of GTMHTTPFetcher simulates the series of fetches +// needed for chunked upload as a single fetch operation. +// +// Protocol document: +// http://code.google.com/p/gears/wiki/ResumableHttpRequestsProposal +// +// To the client, the only fetcher that exists is this class; the subsidiary +// fetchers needed for uploading chunks are not visible (though the most recent +// chunk fetcher may be accessed via the -activeFetcher method, and +// -responseHeaders and -statusCode reflect results from the most recent chunk +// fetcher.) +// +// Chunk fetchers are discarded as soon as they have completed. +// + +#pragma once + +#import "GTMHTTPFetcher.h" +#import "GTMHTTPFetcherService.h" + +// async retrieval of an http get or post +@interface GTMHTTPUploadFetcher : GTMHTTPFetcher { + GTMHTTPFetcher *chunkFetcher_; + + // we'll call through to the delegate's sentData and finished selectors + SEL delegateSentDataSEL_; + SEL delegateFinishedSEL_; + + BOOL needsManualProgress_; + + // the initial fetch's body length and bytes actually sent are + // needed for calculating progress during subsequent chunk uploads + NSUInteger initialBodyLength_; + NSUInteger initialBodySent_; + + NSURL *locationURL_; +#if NS_BLOCKS_AVAILABLE + void (^locationChangeBlock_)(NSURL *); +#elif !__LP64__ + // placeholders: for 32-bit builds, keep the size of the object's ivar section + // the same with and without blocks +#ifndef __clang_analyzer__ + id locationChangePlaceholder_; +#endif +#endif + + // uploadData_ or uploadFileHandle_ may be set, but not both + NSData *uploadData_; + NSFileHandle *uploadFileHandle_; + NSInteger uploadFileHandleLength_; + NSString *uploadMIMEType_; + NSUInteger chunkSize_; + BOOL isPaused_; + BOOL isRestartedUpload_; + + // we keep the latest offset into the upload data just for + // progress reporting + NSUInteger currentOffset_; + + // we store the response headers and status code for the most recent + // chunk fetcher + NSDictionary *responseHeaders_; + NSInteger statusCode_; +} + ++ (GTMHTTPUploadFetcher *)uploadFetcherWithRequest:(NSURLRequest *)request + uploadData:(NSData *)data + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(NSUInteger)chunkSize + fetcherService:(GTMHTTPFetcherService *)fetcherServiceOrNil; + ++ (GTMHTTPUploadFetcher *)uploadFetcherWithRequest:(NSURLRequest *)request + uploadFileHandle:(NSFileHandle *)fileHandle + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(NSUInteger)chunkSize + fetcherService:(GTMHTTPFetcherService *)fetcherServiceOrNil; + ++ (GTMHTTPUploadFetcher *)uploadFetcherWithLocation:(NSURL *)locationURL + uploadFileHandle:(NSFileHandle *)fileHandle + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(NSUInteger)chunkSize + fetcherService:(GTMHTTPFetcherService *)fetcherServiceOrNil; +- (void)pauseFetching; +- (void)resumeFetching; +- (BOOL)isPaused; + +@property (retain) NSURL *locationURL; +@property (retain) NSData *uploadData; +@property (retain) NSFileHandle *uploadFileHandle; +@property (copy) NSString *uploadMIMEType; +@property (assign) NSUInteger chunkSize; +@property (assign) NSUInteger currentOffset; + +#if NS_BLOCKS_AVAILABLE +// When the upload location changes, the optional locationChangeBlock will be +// called. It will be called with nil once upload succeeds or can no longer +// be attempted. +@property (copy) void (^locationChangeBlock)(NSURL *locationURL); +#endif + +// the fetcher for the current data chunk, if any +@property (retain) GTMHTTPFetcher *chunkFetcher; + +// the active fetcher is the last chunk fetcher, or the upload fetcher itself +// if no chunk fetcher has yet been created +@property (readonly) GTMHTTPFetcher *activeFetcher; + +// the response headers from the most recently-completed fetch +@property (retain) NSDictionary *responseHeaders; + +// the status code from the most recently-completed fetch +@property (assign) NSInteger statusCode; + +@end + +#endif // #if !GDATA_REQUIRE_SERVICE_INCLUDES diff --git a/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPUploadFetcher.m.svn-base b/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPUploadFetcher.m.svn-base new file mode 100644 index 0000000..625d929 --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/text-base/GTMHTTPUploadFetcher.m.svn-base @@ -0,0 +1,916 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMHTTPUploadFetcher.m +// + +#if (!GDATA_REQUIRE_SERVICE_INCLUDES) || GDATA_INCLUDE_DOCS_SERVICE || \ + GDATA_INCLUDE_YOUTUBE_SERVICE || GDATA_INCLUDE_PHOTOS_SERVICE + +#import "GTMHTTPUploadFetcher.h" + +static NSUInteger const kQueryServerForOffset = NSUIntegerMax; + +@interface GTMHTTPFetcher (ProtectedMethods) +@property (readwrite, retain) NSData *downloadedData; +- (void)releaseCallbacks; +- (void)connectionDidFinishLoading:(NSURLConnection *)connection; +- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error; +@end + +@interface GTMHTTPUploadFetcher () ++ (GTMHTTPUploadFetcher *)uploadFetcherWithRequest:(NSURLRequest *)request + fetcherService:(GTMHTTPFetcherService *)fetcherService; +- (void)setLocationURL:(NSURL *)location + uploadData:(NSData *)data + uploadFileHandle:(NSFileHandle *)fileHandle + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(NSUInteger)chunkSize; + +- (void)uploadNextChunkWithOffset:(NSUInteger)offset; +- (void)uploadNextChunkWithOffset:(NSUInteger)offset + fetcherProperties:(NSMutableDictionary *)props; +- (void)destroyChunkFetcher; + +- (void)handleResumeIncompleteStatusForChunkFetcher:(GTMHTTPFetcher *)chunkFetcher; + +- (void)uploadFetcher:(GTMHTTPFetcher *)fetcher + didSendBytes:(NSInteger)bytesSent + totalBytesSent:(NSInteger)totalBytesSent +totalBytesExpectedToSend:(NSInteger)totalBytesExpected; + +- (void)reportProgressManually; + +- (NSUInteger)fullUploadLength; + +-(BOOL)chunkFetcher:(GTMHTTPFetcher *)chunkFetcher + willRetry:(BOOL)willRetry + forError:(NSError *)error; + +- (void)chunkFetcher:(GTMHTTPFetcher *)chunkFetcher + finishedWithData:(NSData *)data + error:(NSError *)error; +@end + +@interface GTMHTTPUploadFetcher (PrivateMethods) +// private methods of the superclass +- (void)invokeSentDataCallback:(SEL)sel + target:(id)target + didSendBodyData:(NSInteger)bytesWritten + totalBytesWritten:(NSInteger)totalBytesWritten + totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite; + +- (void)invokeFetchCallback:(SEL)sel + target:(id)target + data:(NSData *)data + error:(NSError *)error; + +- (BOOL)invokeRetryCallback:(SEL)sel + target:(id)target + willRetry:(BOOL)willRetry + error:(NSError *)error; +@end + +@implementation GTMHTTPUploadFetcher + ++ (GTMHTTPUploadFetcher *)uploadFetcherWithRequest:(NSURLRequest *)request + uploadData:(NSData *)data + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(NSUInteger)chunkSize + fetcherService:(GTMHTTPFetcherService *)fetcherService { + GTMHTTPUploadFetcher *fetcher = [self uploadFetcherWithRequest:request + fetcherService:fetcherService]; + [fetcher setLocationURL:nil + uploadData:data + uploadFileHandle:nil + uploadMIMEType:uploadMIMEType + chunkSize:chunkSize]; + return fetcher; +} + ++ (GTMHTTPUploadFetcher *)uploadFetcherWithRequest:(NSURLRequest *)request + uploadFileHandle:(NSFileHandle *)fileHandle + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(NSUInteger)chunkSize + fetcherService:(GTMHTTPFetcherService *)fetcherService { + GTMHTTPUploadFetcher *fetcher = [self uploadFetcherWithRequest:request + fetcherService:fetcherService]; + [fetcher setLocationURL:nil + uploadData:nil + uploadFileHandle:fileHandle + uploadMIMEType:uploadMIMEType + chunkSize:chunkSize]; + return fetcher; +} + ++ (GTMHTTPUploadFetcher *)uploadFetcherWithLocation:(NSURL *)locationURL + uploadFileHandle:(NSFileHandle *)fileHandle + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(NSUInteger)chunkSize + fetcherService:(GTMHTTPFetcherService *)fetcherService { + GTMHTTPUploadFetcher *fetcher = [self uploadFetcherWithRequest:nil + fetcherService:fetcherService]; + [fetcher setLocationURL:locationURL + uploadData:nil + uploadFileHandle:fileHandle + uploadMIMEType:uploadMIMEType + chunkSize:chunkSize]; + return fetcher; +} + ++ (GTMHTTPUploadFetcher *)uploadFetcherWithRequest:(NSURLRequest *)request + fetcherService:(GTMHTTPFetcherService *)fetcherService { + // Internal utility method for instantiating fetchers + GTMHTTPUploadFetcher *fetcher; + if (fetcherService) { + fetcher = [fetcherService fetcherWithRequest:request + fetcherClass:self]; + } else { + fetcher = (GTMHTTPUploadFetcher *) [self fetcherWithRequest:request]; + } + return fetcher; +} + +- (void)setLocationURL:(NSURL *)location + uploadData:(NSData *)data + uploadFileHandle:(NSFileHandle *)fileHandle + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(NSUInteger)chunkSize { +#if DEBUG + NSAssert((data == nil) != (fileHandle == nil), + @"upload data and fileHandle are mutually exclusive"); + NSAssert((self.mutableRequest == nil) != (location == nil), + @"request and location are mutually exclusive"); + NSAssert(chunkSize > 0,@"chunk size is zero"); + NSAssert(chunkSize != NSUIntegerMax, @"chunk size is sentinel value"); +#endif + [self setLocationURL:location]; + [self setUploadData:data]; + [self setUploadFileHandle:fileHandle]; + [self setUploadMIMEType:uploadMIMEType]; + [self setChunkSize:chunkSize]; + + // indicate that we've not yet determined the file handle's length + uploadFileHandleLength_ = -1; + + // indicate that we've not yet determined the upload fetcher status + statusCode_ = -1; + + // if this is restarting an upload begun by another fetcher, + // the location is specified but the request is nil + isRestartedUpload_ = (location != nil); + + // add our custom headers to the initial request indicating the data + // type and total size to be delivered later in the chunk requests + NSMutableURLRequest *mutableReq = [self mutableRequest]; + + NSNumber *lengthNum = [NSNumber numberWithUnsignedInteger:[self fullUploadLength]]; + [mutableReq setValue:[lengthNum stringValue] + forHTTPHeaderField:@"X-Upload-Content-Length"]; + + [mutableReq setValue:uploadMIMEType + forHTTPHeaderField:@"X-Upload-Content-Type"]; +} + +- (void)dealloc { + [self releaseCallbacks]; + + [chunkFetcher_ release]; + [locationURL_ release]; +#if NS_BLOCKS_AVAILABLE + [locationChangeBlock_ release]; +#endif + [uploadData_ release]; + [uploadFileHandle_ release]; + [uploadMIMEType_ release]; + [responseHeaders_ release]; + [super dealloc]; +} + +#pragma mark - + +- (NSUInteger)fullUploadLength { + if (uploadData_) { + return [uploadData_ length]; + } else { + if (uploadFileHandleLength_ == -1) { + // first time through, seek to end to determine file length + uploadFileHandleLength_ = (NSInteger) [uploadFileHandle_ seekToEndOfFile]; + } + return (NSUInteger)uploadFileHandleLength_; + } +} + +- (NSData *)uploadSubdataWithOffset:(NSUInteger)offset + length:(NSUInteger)length { + NSData *resultData = nil; + + if (uploadData_) { + NSRange range = NSMakeRange(offset, length); + resultData = [uploadData_ subdataWithRange:range]; + } else { + @try { + [uploadFileHandle_ seekToFileOffset:offset]; + resultData = [uploadFileHandle_ readDataOfLength:length]; + } + @catch (NSException *exception) { + NSLog(@"uploadFileHandle exception: %@", exception); + } + } + + return resultData; +} + +#pragma mark Method overrides affecting the initial fetch only + +- (BOOL)beginFetchWithDelegate:(id)delegate + didFinishSelector:(SEL)finishedSEL { + + GTMAssertSelectorNilOrImplementedWithArgs(delegate, finishedSEL, + @encode(GTMHTTPFetcher *), @encode(NSData *), @encode(NSError *), 0); + + // replace the finishedSEL with our own, since the initial finish callback + // is just the beginning of the upload experience + delegateFinishedSEL_ = finishedSEL; + + // if the client is running early 10.5 or iPhone 2, we may need to manually + // send progress indication since NSURLConnection won't be calling back + // to us during uploads + needsManualProgress_ = ![GTMHTTPFetcher doesSupportSentDataCallback]; + + initialBodyLength_ = [[self postData] length]; + + if (isRestartedUpload_) { + if (![self isPaused]) { + if (delegate) { + [self setDelegate:delegate]; + finishedSel_ = finishedSEL; + } + [self uploadNextChunkWithOffset:kQueryServerForOffset]; + } + return YES; + } + + // we don't need a finish selector since we're overriding + // -connectionDidFinishLoading + return [super beginFetchWithDelegate:delegate + didFinishSelector:NULL]; +} + +#if NS_BLOCKS_AVAILABLE +- (BOOL)beginFetchWithCompletionHandler:(void (^)(NSData *data, NSError *error))handler { + // we don't want to call into the delegate's completion block immediately + // after the finish of the initial connection (the delegate is called only + // when uploading finishes), so we substitute our own completion block to be + // called when the initial connection finishes + void (^holdBlock)(NSData *data, NSError *error) = [[handler copy] autorelease]; + + BOOL flag = [super beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { + // callback + if (!isRestartedUpload_) { + if (error == nil) { + // swap in the actual completion block now, as it will be called later + // when the upload chunks have completed + [completionBlock_ autorelease]; + completionBlock_ = [holdBlock copy]; + } else { + // pass the error on to the actual completion block + holdBlock(nil, error); + } + } else { + // If there was no initial request, then this fetch is resuming some + // other uploadFetcher's initial request, and the superclass's connection + // is never used, so at this point we call the user's actual completion + // block. + holdBlock(data, error); + } + }]; + return flag; +} +#endif + +- (void)connection:(NSURLConnection *)connection + didSendBodyData:(NSInteger)bytesWritten + totalBytesWritten:(NSInteger)totalBytesWritten +totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite { + + // ignore this callback if we're doing manual progress, mainly so that + // we won't see duplicate progress callbacks when testing with + // doesSupportSentDataCallback turned off + if (needsManualProgress_) return; + + [self uploadFetcher:self + didSendBytes:bytesWritten + totalBytesSent:totalBytesWritten +totalBytesExpectedToSend:totalBytesExpectedToWrite]; +} + +- (BOOL)shouldReleaseCallbacksUponCompletion { + // we don't want the superclass to release the delegate and callback + // blocks once the initial fetch has finished + // + // this is invoked for only successful completion of the connection; + // an error always will invoke and release the callbacks + return NO; +} + +- (void)invokeFinalCallbacksWithData:(NSData *)data + error:(NSError *)error + shouldInvalidateLocation:(BOOL)shouldInvalidateLocation { + // avoid issues due to being released indirectly by a callback + [[self retain] autorelease]; + + if (shouldInvalidateLocation) { + [self setLocationURL:nil]; + } + + if (delegate_ && delegateFinishedSEL_) { + [self invokeFetchCallback:delegateFinishedSEL_ + target:delegate_ + data:data + error:error]; + } + +#if NS_BLOCKS_AVAILABLE + if (completionBlock_) { + completionBlock_(data, error); + } + + [self setLocationChangeBlock:nil]; +#endif + + [self releaseCallbacks]; +} + +- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { + // handle failure of the initial fetch as a simple fetcher failure, including + // calling the delegate, and allowing retry to happen if appropriate + SEL prevSel = finishedSel_; // should be null + finishedSel_ = delegateFinishedSEL_; + [super connection:connection didFailWithError:error]; + + // If retry later happens and succeeds, it shouldn't message the delegate + // since we'll continue to chunk uploads. + finishedSel_ = prevSel; +} + +- (void)connectionDidFinishLoading:(NSURLConnection *)connection { + + // we land here once the initial fetch sending the initial POST body + // has completed + + // let the superclass end its connection + [super connectionDidFinishLoading:connection]; + + NSInteger statusCode = [super statusCode]; + [self setStatusCode:statusCode]; + + if (statusCode >= 300) { + NSError *error = [NSError errorWithDomain:kGTMHTTPFetcherStatusDomain + code:statusCode + userInfo:nil]; + [self invokeFinalCallbacksWithData:[self downloadedData] + error:error + shouldInvalidateLocation:YES]; + return; + } + +#if DEBUG + // The initial response of the resumable upload protocol should have an + // empty body + // + // This assert typically happens because the upload create/edit link URL was + // not supplied with the request, and the server is thus expecting a non- + // resumable request/response. + NSAssert([[self downloadedData] length] == 0, + @"unexpected response data (uploading to the wrong URL?)"); +#endif + + // we need to get the upload URL from the location header to continue + NSDictionary *responseHeaders = [self responseHeaders]; + NSString *locationURLStr = [responseHeaders objectForKey:@"Location"]; +#if DEBUG + NSAssert([locationURLStr length] > 0, @"need upload location hdr"); +#endif + + if ([locationURLStr length] == 0) { + // we cannot continue since we do not know the location to use + // as our upload destination + // + // we'll consider this status 501 Not Implemented + NSError *error = [NSError errorWithDomain:kGTMHTTPFetcherStatusDomain + code:501 + userInfo:nil]; + [self invokeFinalCallbacksWithData:[self downloadedData] + error:error + shouldInvalidateLocation:YES]; + return; + } + + [self setLocationURL:[NSURL URLWithString:locationURLStr]]; + + // we've now sent all of the initial post body data, so we need to include + // its size in future progress indicator callbacks + initialBodySent_ = initialBodyLength_; + + if (needsManualProgress_) { + [self reportProgressManually]; + } + + // just in case the user paused us during the initial fetch... + if (![self isPaused]) { + [self uploadNextChunkWithOffset:0]; + } +} + +#pragma mark Chunk fetching methods + +- (void)uploadNextChunkWithOffset:(NSUInteger)offset { + // use the properties in each chunk fetcher + NSMutableDictionary *props = [self properties]; + + [self uploadNextChunkWithOffset:offset + fetcherProperties:props]; +} + +- (void)uploadNextChunkWithOffset:(NSUInteger)offset + fetcherProperties:(NSMutableDictionary *)props { + // upload another chunk + NSUInteger chunkSize = [self chunkSize]; + + NSString *rangeStr, *lengthStr; + NSData *chunkData; + + NSUInteger dataLen = [self fullUploadLength]; + + if (offset == kQueryServerForOffset) { + // resuming, so we'll initially send an empty data block and wait for the + // server to tell us where the current offset really is + chunkData = [NSData data]; + rangeStr = [NSString stringWithFormat:@"bytes */%llu", + (unsigned long long)dataLen]; + lengthStr = @"0"; + offset = 0; + } else { + // uploading the next data chunk +#if DEBUG + NSAssert2(offset < dataLen, @"offset %llu exceeds data length %llu", + (unsigned long long)offset, (unsigned long long)dataLen); +#endif + + NSUInteger thisChunkSize = chunkSize; + + // if the chunk size is bigger than the remaining data, or else + // it's close enough in size to the remaining data that we'd rather + // avoid having a whole extra http fetch for the leftover bit, then make + // this chunk size exactly match the remaining data size + BOOL isChunkTooBig = (thisChunkSize + offset > dataLen); + BOOL isChunkAlmostBigEnough = (dataLen - offset < thisChunkSize + 2500); + + if (isChunkTooBig || isChunkAlmostBigEnough) { + thisChunkSize = dataLen - offset; + } + + chunkData = [self uploadSubdataWithOffset:offset + length:thisChunkSize]; + + rangeStr = [NSString stringWithFormat:@"bytes %llu-%llu/%llu", + (unsigned long long)offset, + (unsigned long long)(offset + thisChunkSize - 1), + (unsigned long long)dataLen]; + lengthStr = [NSString stringWithFormat:@"%llu", + (unsigned long long)thisChunkSize]; + } + + // track the current offset for progress reporting + [self setCurrentOffset:offset]; + + // + // make the request for fetching + // + + // the chunk upload URL requires no authentication header + NSURL *locURL = [self locationURL]; + NSMutableURLRequest *chunkRequest = [NSMutableURLRequest requestWithURL:locURL]; + + [chunkRequest setHTTPMethod:@"PUT"]; + + // copy the user-agent from the original connection + NSURLRequest *origRequest = [self mutableRequest]; + NSString *userAgent = [origRequest valueForHTTPHeaderField:@"User-Agent"]; + if ([userAgent length] > 0) { + [chunkRequest setValue:userAgent forHTTPHeaderField:@"User-Agent"]; + } + + [chunkRequest setValue:rangeStr forHTTPHeaderField:@"Content-Range"]; + [chunkRequest setValue:lengthStr forHTTPHeaderField:@"Content-Length"]; + + NSString *uploadMIMEType = [self uploadMIMEType]; + [chunkRequest setValue:uploadMIMEType forHTTPHeaderField:@"Content-Type"]; + + // + // make a new fetcher + // + GTMHTTPFetcher *chunkFetcher; + + chunkFetcher = [GTMHTTPFetcher fetcherWithRequest:chunkRequest]; + [chunkFetcher setDelegateQueue:[self delegateQueue]]; + [chunkFetcher setRunLoopModes:[self runLoopModes]]; + + // if the upload fetcher has a comment, use the same comment for chunks + NSString *baseComment = [self comment]; + if (baseComment) { + [chunkFetcher setCommentWithFormat:@"%@ (%@)", baseComment, rangeStr]; + } + + // give the chunk fetcher the same properties as the previous chunk fetcher + [chunkFetcher setProperties:props]; + + // post the appropriate subset of the full data + [chunkFetcher setPostData:chunkData]; + + // copy other fetcher settings to the new fetcher + [chunkFetcher setRetryEnabled:[self isRetryEnabled]]; + [chunkFetcher setMaxRetryInterval:[self maxRetryInterval]]; + [chunkFetcher setSentDataSelector:[self sentDataSelector]]; + [chunkFetcher setCookieStorageMethod:[self cookieStorageMethod]]; + + if ([self isRetryEnabled]) { + // we interpose our own retry method both so the sender is the upload + // fetcher, and so we can change the request to ask the server to + // tell us where to resume the chunk + [chunkFetcher setRetrySelector:@selector(chunkFetcher:willRetry:forError:)]; + } + + [self setMutableRequest:chunkRequest]; + + // when fetching chunks, a 308 status means "upload more chunks", but + // success (200 or 201 status) and other failures are no different than + // for the regular object fetchers + BOOL didFetch = [chunkFetcher beginFetchWithDelegate:self + didFinishSelector:@selector(chunkFetcher:finishedWithData:error:)]; + if (!didFetch) { + // something went horribly wrong, like the chunk upload URL is invalid + NSError *error = [NSError errorWithDomain:kGTMHTTPFetcherErrorDomain + code:kGTMHTTPFetcherErrorChunkUploadFailed + userInfo:nil]; + + [self invokeFinalCallbacksWithData:nil + error:error + shouldInvalidateLocation:YES]; + [self destroyChunkFetcher]; + } else { + // hang on to the fetcher in case we need to cancel it + [self setChunkFetcher:chunkFetcher]; + } +} + +- (void)reportProgressManually { + // reportProgressManually should be called only when there's no + // NSURLConnection support for sent data callbacks + + // the user wants upload progress, and there's no support in NSURLConnection + // for it, so we'll provide it here after each chunk + // + // the progress will be based on the uploadData and currentOffset, + // so we can pass zeros + [self uploadFetcher:self + didSendBytes:0 + totalBytesSent:0 +totalBytesExpectedToSend:0]; +} + +- (void)chunkFetcher:(GTMHTTPFetcher *)chunkFetcher finishedWithData:(NSData *)data error:(NSError *)error { + [self setStatusCode:[chunkFetcher statusCode]]; + [self setResponseHeaders:[chunkFetcher responseHeaders]]; + + if (error) { + int status = (int)[error code]; + + // status 308 is "resume incomplete", meaning we should get the offset + // from the Range header and upload the next chunk + // + // any other status really is an error + if (status == 308) { + [self handleResumeIncompleteStatusForChunkFetcher:chunkFetcher]; + return; + } else { + // some unexpected status has occurred; handle it as we would a regular + // object fetcher failure + error = [NSError errorWithDomain:kGTMHTTPFetcherStatusDomain + code:status + userInfo:nil]; + [self invokeFinalCallbacksWithData:data + error:error + shouldInvalidateLocation:NO]; + [self destroyChunkFetcher]; + return; + } + } else { + // the final chunk has uploaded successfully + #if DEBUG + NSInteger status = [chunkFetcher statusCode]; + NSAssert1(status == 200 || status == 201, + @"unexpected chunks status %d", (int)status); + #endif + + // take the chunk fetcher's data as our own + self.downloadedData = data; + + if (needsManualProgress_) { + // do a final upload progress report, indicating all of the chunk data + // has been sent + NSUInteger fullDataLength = [self fullUploadLength] + initialBodyLength_; + [self setCurrentOffset:fullDataLength]; + + [self reportProgressManually]; + } + + // we're done + [self invokeFinalCallbacksWithData:data + error:error + shouldInvalidateLocation:YES]; + + [self destroyChunkFetcher]; + } +} + +- (void)handleResumeIncompleteStatusForChunkFetcher:(GTMHTTPFetcher *)chunkFetcher { + + NSDictionary *responseHeaders = [chunkFetcher responseHeaders]; + + // parse the Range header from the server, since that tells us where we really + // want the next chunk to begin. + // + // lack of a range header means the server has no bytes stored for this upload + NSString *rangeStr = [responseHeaders objectForKey:@"Range"]; + NSUInteger newOffset = 0; + if (rangeStr != nil) { + // parse a content-range, like "bytes=0-999", to find where our new + // offset for uploading from the data really is (at the end of the + // range) + NSScanner *scanner = [NSScanner scannerWithString:rangeStr]; + long long rangeStart = 0, rangeEnd = 0; + if ([scanner scanString:@"bytes=" intoString:nil] + && [scanner scanLongLong:&rangeStart] + && [scanner scanString:@"-" intoString:nil] + && [scanner scanLongLong:&rangeEnd]) { + newOffset = (NSUInteger)rangeEnd + 1; + } + } + + [self setCurrentOffset:newOffset]; + + if (needsManualProgress_) { + [self reportProgressManually]; + } + + // if the response specifies a location, use that for future chunks + NSString *locationURLStr = [responseHeaders objectForKey:@"Location"]; + if ([locationURLStr length] > 0) { + [self setLocationURL:[NSURL URLWithString:locationURLStr]]; + } + + // we want to destroy this chunk fetcher before creating the next one, but + // we want to pass on its properties + NSMutableDictionary *props = [[[chunkFetcher properties] retain] autorelease]; + + // we no longer need to be able to cancel this chunkFetcher + [self destroyChunkFetcher]; + + // We may in the future handle Retry-After and ETag headers per + // http://code.google.com/p/gears/wiki/ResumableHttpRequestsProposal + // but they are not currently sent by the upload server + + [self uploadNextChunkWithOffset:newOffset + fetcherProperties:props]; +} + + +-(BOOL)chunkFetcher:(GTMHTTPFetcher *)chunkFetcher willRetry:(BOOL)willRetry forError:(NSError *)error { + if ([error code] == 308 + && [[error domain] isEqual:kGTMHTTPFetcherStatusDomain]) { + // 308 is a normal chunk fethcher response, not an error + // that needs to be retried + return NO; + } + + if (delegate_ && retrySel_) { + + // call the client with the upload fetcher as the sender (not the chunk + // fetcher) to find out if it wants to retry + willRetry = [self invokeRetryCallback:retrySel_ + target:delegate_ + willRetry:willRetry + error:error]; + } + +#if NS_BLOCKS_AVAILABLE + if (retryBlock_) { + willRetry = retryBlock_(willRetry, error); + } +#endif + + if (willRetry) { + // change the request being retried into a query to the server to + // tell us where to resume + NSMutableURLRequest *chunkRequest = [chunkFetcher mutableRequest]; + + NSUInteger dataLen = [self fullUploadLength]; + NSString *rangeStr = [NSString stringWithFormat:@"bytes */%llu", + (unsigned long long)dataLen]; + + [chunkRequest setValue:rangeStr forHTTPHeaderField:@"Content-Range"]; + [chunkRequest setValue:@"0" forHTTPHeaderField:@"Content-Length"]; + [chunkFetcher setPostData:[NSData data]]; + + // we don't know what our actual offset is anymore, but the server + // will tell us + [self setCurrentOffset:0]; + } + + return willRetry; +} + +- (void)destroyChunkFetcher { + [chunkFetcher_ stopFetching]; + [chunkFetcher_ setProperties:nil]; + [chunkFetcher_ autorelease]; + chunkFetcher_ = nil; +} + +// the chunk fetchers use this as their sentData method +- (void)uploadFetcher:(GTMHTTPFetcher *)chunkFetcher + didSendBytes:(NSInteger)bytesSent + totalBytesSent:(NSInteger)totalBytesSent +totalBytesExpectedToSend:(NSInteger)totalBytesExpected { + // the actual total bytes sent include the initial XML sent, plus the + // offset into the batched data prior to this fetcher + totalBytesSent += initialBodySent_ + currentOffset_; + + // the total bytes expected include the initial XML and the full chunked + // data, independent of how big this fetcher's chunk is + totalBytesExpected = (NSInteger)(initialBodyLength_ + [self fullUploadLength]); + + if (delegate_ && delegateSentDataSEL_) { + // ensure the chunk fetcher survives the callback in case the user pauses + // the upload process + [[chunkFetcher retain] autorelease]; + + [self invokeSentDataCallback:delegateSentDataSEL_ + target:delegate_ + didSendBodyData:bytesSent + totalBytesWritten:totalBytesSent + totalBytesExpectedToWrite:totalBytesExpected]; + } + +#if NS_BLOCKS_AVAILABLE + if (sentDataBlock_) { + sentDataBlock_(bytesSent, totalBytesSent, totalBytesExpected); + } +#endif +} + +#pragma mark - + +- (BOOL)isPaused { + return isPaused_; +} + +- (void)pauseFetching { + isPaused_ = YES; + + // pausing just means stopping the current chunk from uploading; + // when we resume, the magic offset value will force us to send + // a request to the server to figure out what bytes to start sending + // + // we won't try to cancel the initial data upload, but rather will look for + // the magic offset value in -connectionDidFinishLoading before + // creating first initial chunk fetcher, just in case the user + // paused during the initial data upload + [self destroyChunkFetcher]; +} + +- (void)resumeFetching { + if (isPaused_) { + isPaused_ = NO; + + [self uploadNextChunkWithOffset:kQueryServerForOffset]; + } +} + +- (void)stopFetching { + // overrides the superclass + [self destroyChunkFetcher]; + + [super stopFetching]; +} + +#pragma mark - + +@synthesize uploadData = uploadData_, + uploadFileHandle = uploadFileHandle_, + uploadMIMEType = uploadMIMEType_, + chunkSize = chunkSize_, + currentOffset = currentOffset_, + chunkFetcher = chunkFetcher_; + +#if NS_BLOCKS_AVAILABLE +@synthesize locationChangeBlock = locationChangeBlock_; +#endif + +@dynamic activeFetcher; +@dynamic responseHeaders; +@dynamic statusCode; + +- (NSDictionary *)responseHeaders { + // overrides the superclass + + // if asked for the fetcher's response, use the most recent fetcher + if (responseHeaders_) { + return responseHeaders_; + } else { + // no chunk fetcher yet completed, so return whatever we have from the + // initial fetch + return [super responseHeaders]; + } +} + +- (void)setResponseHeaders:(NSDictionary *)dict { + [responseHeaders_ autorelease]; + responseHeaders_ = [dict retain]; +} + +- (NSInteger)statusCode { + if (statusCode_ != -1) { + // overrides the superclass to indicate status appropriate to the initial + // or latest chunk fetch + return statusCode_; + } else { + return [super statusCode]; + } +} + +- (void)setStatusCode:(NSInteger)val { + statusCode_ = val; +} + +- (SEL)sentDataSelector { + // overrides the superclass +#if NS_BLOCKS_AVAILABLE + BOOL hasSentDataBlock = (sentDataBlock_ != NULL); +#else + BOOL hasSentDataBlock = NO; +#endif + if ((delegateSentDataSEL_ || hasSentDataBlock) && !needsManualProgress_) { + return @selector(uploadFetcher:didSendBytes:totalBytesSent:totalBytesExpectedToSend:); + } else { + return NULL; + } +} + +- (void)setSentDataSelector:(SEL)theSelector { + // overrides the superclass + delegateSentDataSEL_ = theSelector; +} + +- (GTMHTTPFetcher *)activeFetcher { + if (chunkFetcher_) { + return chunkFetcher_; + } else { + return self; + } +} + +- (NSURL *)locationURL { + return locationURL_; +} + +- (void)setLocationURL:(NSURL *)url { + if (url != locationURL_) { + [locationURL_ release]; + locationURL_ = [url retain]; + +#if NS_BLOCKS_AVAILABLE + if (locationChangeBlock_) { + locationChangeBlock_(url); + } +#endif + } +} +@end + +#endif // #if !GDATA_REQUIRE_SERVICE_INCLUDES diff --git a/GTL/Source/HTTPFetcher/.svn/text-base/GTMMIMEDocument.h.svn-base b/GTL/Source/HTTPFetcher/.svn/text-base/GTMMIMEDocument.h.svn-base new file mode 100644 index 0000000..62b037b --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/text-base/GTMMIMEDocument.h.svn-base @@ -0,0 +1,57 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +// This is a simple class to create a MIME document. To use, allocate +// a new GTMMIMEDocument and start adding parts as necessary. When you are +// done adding parts, call generateInputStream to get an NSInputStream +// containing the contents of your MIME document. +// +// A good reference for MIME is http://en.wikipedia.org/wiki/MIME + +#import + +#if defined(GTL_TARGET_NAMESPACE) + // we're using target namespace macros + #import "GTLDefines.h" +#elif defined(GDATA_TARGET_NAMESPACE) + #import "GDataDefines.h" +#endif + +@interface GTMMIMEDocument : NSObject { + NSMutableArray* parts_; // Contains an ordered set of MimeParts + unsigned long long length_; // Length in bytes of the document. + u_int32_t randomSeed_; // for testing +} + ++ (GTMMIMEDocument *)MIMEDocument; + +// Adds a new part to this mime document with the given headers and body. The +// headers keys and values should be NSStrings +- (void)addPartWithHeaders:(NSDictionary *)headers + body:(NSData *)body; + +// An inputstream that can be used to efficiently read the contents of the +// mime document. +- (void)generateInputStream:(NSInputStream **)outStream + length:(unsigned long long*)outLength + boundary:(NSString **)outBoundary; + +// ------ UNIT TESTING ONLY BELOW ------ + +// For unittesting only, seeds the random number generator +- (void)seedRandomWith:(u_int32_t)seed; + +@end diff --git a/GTL/Source/HTTPFetcher/.svn/text-base/GTMMIMEDocument.m.svn-base b/GTL/Source/HTTPFetcher/.svn/text-base/GTMMIMEDocument.m.svn-base new file mode 100644 index 0000000..a12786b --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/text-base/GTMMIMEDocument.m.svn-base @@ -0,0 +1,281 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#import "GTMMIMEDocument.h" +#import "GTMGatherInputStream.h" + +// memsrch +// +// Helper routine to search for the existence of a set of bytes (needle) within +// a presumed larger set of bytes (haystack). +// +static BOOL memsrch(const unsigned char* needle, NSUInteger needle_len, + const unsigned char* haystack, NSUInteger haystack_len); + +@interface GTMMIMEPart : NSObject { + NSData* headerData_; // Header content including the ending "\r\n". + NSData* bodyData_; // The body data. +} + ++ (GTMMIMEPart *)partWithHeaders:(NSDictionary *)headers body:(NSData *)body; +- (id)initWithHeaders:(NSDictionary *)headers body:(NSData *)body; +- (BOOL)containsBytes:(const unsigned char *)bytes length:(NSUInteger)length; +- (NSData *)header; +- (NSData *)body; +- (NSUInteger)length; +@end + +@implementation GTMMIMEPart + ++ (GTMMIMEPart *)partWithHeaders:(NSDictionary *)headers body:(NSData *)body { + + return [[[self alloc] initWithHeaders:headers + body:body] autorelease]; +} + +- (id)initWithHeaders:(NSDictionary *)headers + body:(NSData *)body { + + if ((self = [super init]) != nil) { + + bodyData_ = [body retain]; + + // generate the header data by coalescing the dictionary as + // lines of "key: value\r\m" + NSMutableString* headerString = [NSMutableString string]; + + // sort the header keys so we have a deterministic order for + // unit testing + SEL sortSel = @selector(caseInsensitiveCompare:); + NSArray *sortedKeys = [[headers allKeys] sortedArrayUsingSelector:sortSel]; + + for (NSString *key in sortedKeys) { + NSString* value = [headers objectForKey:key]; + +#if DEBUG + // look for troublesome characters in the header keys & values + static NSCharacterSet *badChars = nil; + if (!badChars) { + badChars = [[NSCharacterSet characterSetWithCharactersInString:@":\r\n"] retain]; + } + + NSRange badRange = [key rangeOfCharacterFromSet:badChars]; + NSAssert1(badRange.location == NSNotFound, @"invalid key: %@", key); + + badRange = [value rangeOfCharacterFromSet:badChars]; + NSAssert1(badRange.location == NSNotFound, @"invalid value: %@", value); +#endif + + [headerString appendFormat:@"%@: %@\r\n", key, value]; + } + + // headers end with an extra blank line + [headerString appendString:@"\r\n"]; + + headerData_ = [[headerString dataUsingEncoding:NSUTF8StringEncoding] retain]; + } + return self; +} + +- (void) dealloc { + [headerData_ release]; + [bodyData_ release]; + [super dealloc]; +} + +// Returns true if the parts contents contain the given set of bytes. +// +// NOTE: We assume that the 'bytes' we are checking for do not contain "\r\n", +// so we don't need to check the concatenation of the header and body bytes. +- (BOOL)containsBytes:(const unsigned char*)bytes length:(NSUInteger)length { + + // This uses custom memsrch() rather than strcpy because the encoded data may + // contain null values. + return memsrch(bytes, length, [headerData_ bytes], [headerData_ length]) || + memsrch(bytes, length, [bodyData_ bytes], [bodyData_ length]); +} + +- (NSData *)header { + return headerData_; +} + +- (NSData *)body { + return bodyData_; +} + +- (NSUInteger)length { + return [headerData_ length] + [bodyData_ length]; +} +@end + +@implementation GTMMIMEDocument + ++ (GTMMIMEDocument *)MIMEDocument { + return [[[self alloc] init] autorelease]; +} + +- (id)init { + if ((self = [super init]) != nil) { + + parts_ = [[NSMutableArray alloc] init]; + + // Seed the random number generator used to generate mime boundaries + srandomdev(); + } + return self; +} + +- (void)dealloc { + [parts_ release]; + [super dealloc]; +} + +// Adds a new part to this mime document with the given headers and body. +- (void)addPartWithHeaders:(NSDictionary *)headers + body:(NSData *)body { + + GTMMIMEPart* part = [GTMMIMEPart partWithHeaders:headers body:body]; + [parts_ addObject:part]; +} + +// For unit testing only, seeds the random number generator so that we will +// have reproducible boundary strings. +- (void)seedRandomWith:(u_int32_t)seed { + randomSeed_ = seed; +} + +- (u_int32_t)random { + if (randomSeed_) { + // for testing only + return randomSeed_++; + } else { + return arc4random(); + } +} + +// Computes the mime boundary to use. This should only be called +// after all the desired document parts have been added since it must compute +// a boundary that does not exist in the document data. +- (NSString *)uniqueBoundary { + + // use an easily-readable boundary string + NSString *const kBaseBoundary = @"END_OF_PART"; + + NSMutableString *boundary = [NSMutableString stringWithString:kBaseBoundary]; + + // if the boundary isn't unique, append random numbers, up to 10 attempts; + // if that's still not unique, use a random number sequence instead, + // and call it good + BOOL didCollide = NO; + + const int maxTries = 10; // Arbitrarily chosen maximum attempts. + for (int tries = 0; tries < maxTries; ++tries) { + + NSData *data = [boundary dataUsingEncoding:NSUTF8StringEncoding]; + const void *dataBytes = [data bytes]; + NSUInteger dataLen = [data length]; + + for (GTMMIMEPart *part in parts_) { + didCollide = [part containsBytes:dataBytes length:dataLen]; + if (didCollide) break; + } + + if (!didCollide) break; // we're fine, no more attempts needed + + // try again with a random number appended + boundary = [NSString stringWithFormat:@"%@_%08x", kBaseBoundary, + [self random]]; + } + + if (didCollide) { + // fallback... two random numbers + boundary = [NSString stringWithFormat:@"%08x_tedborg_%08x", + [self random], [self random]]; + } + + return boundary; +} + +- (void)generateInputStream:(NSInputStream **)outStream + length:(unsigned long long*)outLength + boundary:(NSString **)outBoundary { + + // The input stream is of the form: + // --boundary + // [part_1_headers] + // [part_1_data] + // --boundary + // [part_2_headers] + // [part_2_data] + // --boundary-- + + // First we set up our boundary NSData objects. + NSString *boundary = [self uniqueBoundary]; + + NSString *mainBoundary = [NSString stringWithFormat:@"\r\n--%@\r\n", boundary]; + NSString *endBoundary = [NSString stringWithFormat:@"\r\n--%@--\r\n", boundary]; + + NSData *mainBoundaryData = [mainBoundary dataUsingEncoding:NSUTF8StringEncoding]; + NSData *endBoundaryData = [endBoundary dataUsingEncoding:NSUTF8StringEncoding]; + + // Now we add them all in proper order to our dataArray. + NSMutableArray* dataArray = [NSMutableArray array]; + unsigned long long length = 0; + + for (GTMMIMEPart* part in parts_) { + [dataArray addObject:mainBoundaryData]; + [dataArray addObject:[part header]]; + [dataArray addObject:[part body]]; + + length += [part length] + [mainBoundaryData length]; + } + + [dataArray addObject:endBoundaryData]; + length += [endBoundaryData length]; + + if (outLength) *outLength = length; + if (outStream) *outStream = [GTMGatherInputStream streamWithArray:dataArray]; + if (outBoundary) *outBoundary = boundary; +} + +@end + + +// memsrch - Return YES if needle is found in haystack, else NO. +static BOOL memsrch(const unsigned char* needle, NSUInteger needleLen, + const unsigned char* haystack, NSUInteger haystackLen) { + + // This is a simple approach. We start off by assuming that both memchr() and + // memcmp are implemented efficiently on the given platform. We search for an + // instance of the first char of our needle in the haystack. If the remaining + // size could fit our needle, then we memcmp to see if it occurs at this point + // in the haystack. If not, we move on to search for the first char again, + // starting from the next character in the haystack. + const unsigned char* ptr = haystack; + NSUInteger remain = haystackLen; + while ((ptr = memchr(ptr, needle[0], remain)) != 0) { + remain = haystackLen - (NSUInteger)(ptr - haystack); + if (remain < needleLen) { + return NO; + } + if (memcmp(ptr, needle, needleLen) == 0) { + return YES; + } + ptr++; + remain--; + } + return NO; +} diff --git a/GTL/Source/HTTPFetcher/.svn/text-base/GTMReadMonitorInputStream.h.svn-base b/GTL/Source/HTTPFetcher/.svn/text-base/GTMReadMonitorInputStream.h.svn-base new file mode 100644 index 0000000..9e4b3f7 --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/text-base/GTMReadMonitorInputStream.h.svn-base @@ -0,0 +1,65 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + + +// Define only for Mac OS X 10.6+ or iPhone OS 4.0+. +#ifndef GTM_NSSTREAM_DELEGATE + #if (TARGET_OS_MAC && !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1060)) || \ + (TARGET_OS_IPHONE && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 40000)) + #define GTM_NSSTREAM_DELEGATE + #else + #define GTM_NSSTREAM_DELEGATE + #endif +#endif // !defined(GTM_NSSTREAM_DELEGATE) + +#ifdef GTM_TARGET_NAMESPACE + // we're using target namespace macros + #import "GTMDefines.h" +#endif + +@interface GTMReadMonitorInputStream : NSInputStream GTM_NSSTREAM_DELEGATE { + @protected + NSInputStream *inputStream_; // encapsulated stream that does the work + + NSThread *thread_; // thread in which this object was created + NSArray *runLoopModes_; // modes for calling callbacks, when necessary + + @private + id readDelegate_; + SEL readSelector_; +} + +// length is passed to the progress callback; it may be zero +// if the progress callback can handle that ++ (id)inputStreamWithStream:(NSInputStream *)input; + +- (id)initWithStream:(NSInputStream *)input; + +// The read monitor selector is called when bytes have been read. It should +// have a signature matching +// +// - (void)inputStream:(GTMReadMonitorInputStream *)stream +// readIntoBuffer:(uint8_t *)buffer +// length:(NSUInteger)length; + +@property (assign) id readDelegate; // WEAK +@property (assign) SEL readSelector; + +// Modes for invoking callbacks, when necessary +@property (retain) NSArray *runLoopModes; + +@end diff --git a/GTL/Source/HTTPFetcher/.svn/text-base/GTMReadMonitorInputStream.m.svn-base b/GTL/Source/HTTPFetcher/.svn/text-base/GTMReadMonitorInputStream.m.svn-base new file mode 100644 index 0000000..abd847c --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/text-base/GTMReadMonitorInputStream.m.svn-base @@ -0,0 +1,185 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "GTMReadMonitorInputStream.h" + +@interface GTMReadMonitorInputStream () +- (void)invokeReadSelectorWithBuffer:(NSData *)data; +@end + +@implementation GTMReadMonitorInputStream + +@synthesize readDelegate = readDelegate_; +@synthesize readSelector = readSelector_; +@synthesize runLoopModes = runLoopModes_; + +// We'll forward all unhandled messages to the NSInputStream class +// or to the encapsulated input stream. This is needed +// for all messages sent to NSInputStream which aren't +// handled by our superclass; that includes various private run +// loop calls. ++ (NSMethodSignature *)methodSignatureForSelector:(SEL)selector { + return [NSInputStream methodSignatureForSelector:selector]; +} + ++ (void)forwardInvocation:(NSInvocation*)invocation { + [invocation invokeWithTarget:[NSInputStream class]]; +} + +- (NSMethodSignature*)methodSignatureForSelector:(SEL)selector { + return [inputStream_ methodSignatureForSelector:selector]; +} + +- (void)forwardInvocation:(NSInvocation*)invocation { + [invocation invokeWithTarget:inputStream_]; +} + +#pragma mark - + ++ (id)inputStreamWithStream:(NSInputStream *)input { + return [[[self alloc] initWithStream:input] autorelease]; +} + +- (id)initWithStream:(NSInputStream *)input { + self = [super init]; + if (self) { + inputStream_ = [input retain]; + thread_ = [[NSThread currentThread] retain]; + } + return self; +} + +- (id)init { + return [self initWithStream:nil]; +} + +- (void)dealloc { + [inputStream_ release]; + [thread_ release]; + [runLoopModes_ release]; + [super dealloc]; +} + +#pragma mark - + +- (NSInteger)read:(uint8_t *)buffer maxLength:(NSUInteger)len { + // Read from the encapsulated stream + NSInteger numRead = [inputStream_ read:buffer maxLength:len]; + if (numRead > 0) { + + BOOL isOnOriginalThread = [thread_ isEqual:[NSThread currentThread]]; + + if (readDelegate_ && readSelector_) { + // call the read selector with the buffer and number of bytes actually + // read into it + SEL sel = @selector(invokeReadSelectorWithBuffer:); + + if (isOnOriginalThread) { + // invoke immediately + NSData *data = [NSData dataWithBytesNoCopy:buffer + length:(NSUInteger)numRead + freeWhenDone:NO]; + [self performSelector:sel withObject:data]; + } else { + // copy the buffer into an NSData to be retained by the + // performSelector, and invoke on the proper thread + NSData *data = [NSData dataWithBytes:buffer length:(NSUInteger)numRead]; + if (runLoopModes_) { + [self performSelector:sel + onThread:thread_ + withObject:data + waitUntilDone:NO + modes:runLoopModes_]; + } else { + [self performSelector:sel + onThread:thread_ + withObject:data + waitUntilDone:NO]; + } + } + } + } + + return numRead; +} + +- (void)invokeReadSelectorWithBuffer:(NSData *)data { + const void *buffer = [data bytes]; + NSUInteger length = [data length]; + + NSMethodSignature *signature = [readDelegate_ methodSignatureForSelector:readSelector_]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; + [invocation setSelector:readSelector_]; + [invocation setTarget:readDelegate_]; + [invocation setArgument:&self atIndex:2]; + [invocation setArgument:&buffer atIndex:3]; + [invocation setArgument:&length atIndex:4]; + [invocation invoke]; +} + +- (BOOL)getBuffer:(uint8_t **)buffer length:(NSUInteger *)len { + return [inputStream_ getBuffer:buffer length:len]; +} + +- (BOOL)hasBytesAvailable { + return [inputStream_ hasBytesAvailable]; +} + +#pragma mark Standard messages + +// Pass expected messages to our encapsulated stream. +// +// We want our encapsulated NSInputStream to handle the standard messages; +// we don't want the superclass to handle them. +- (void)open { + [inputStream_ open]; +} + +- (void)close { + [inputStream_ close]; +} + +- (id)delegate { + return [inputStream_ delegate]; +} + +- (void)setDelegate:(id)delegate { + [inputStream_ setDelegate:delegate]; +} + +- (id)propertyForKey:(NSString *)key { + return [inputStream_ propertyForKey:key]; +} +- (BOOL)setProperty:(id)property forKey:(NSString *)key { + return [inputStream_ setProperty:property forKey:key]; +} + +- (void)scheduleInRunLoop:(NSRunLoop *)aRunLoop forMode:(NSString *)mode { + [inputStream_ scheduleInRunLoop:aRunLoop forMode:mode]; +} + +- (void)removeFromRunLoop:(NSRunLoop *)aRunLoop forMode:(NSString *)mode { + [inputStream_ removeFromRunLoop:aRunLoop forMode:mode]; +} + +- (NSStreamStatus)streamStatus { + return [inputStream_ streamStatus]; +} + +- (NSError *)streamError { + return [inputStream_ streamError]; +} + +@end diff --git a/GTL/Source/HTTPFetcher/.svn/text-base/ReleaseNotes.txt.svn-base b/GTL/Source/HTTPFetcher/.svn/text-base/ReleaseNotes.txt.svn-base new file mode 100644 index 0000000..cb2d970 --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/text-base/ReleaseNotes.txt.svn-base @@ -0,0 +1,84 @@ +GTM HTTP Fetcher Release Notes + +Project site: http://code.google.com/p/gtm-http-fetcher/ +Discussion group: http://groups.google.com/group/google-toolbox-for-mac + +28-September-2012 + +Added delegateQueue support to fetcher and fetcher service, allowing fetches +to begin on a thread without a run loop and to invoke callbacks on the main +thread or a background thread, beginning with iOS 6 and Mac OS X 10.7. + + +9-January-2012 + +Fetcher now includes user-agent string utility functions + +Fetcher service has properties for request userAgent and timeout + + +22-November-2011 + +Fetchers now support a servicePriority property which affects the order in +which the fetcher service object dequeues delayed fetchers + + +1-November-2011 + +On status 401 results when using an authorizer, the fetcher will attempt a +single retry if the authorizer implements a primeForRefresh method + + +7-October-2011 + +Changed isFetching method to return YES during service and authorization delays + + +9-September-2011 + +Added support for creating an upload fetcher from a location URL to allow +restarting uploads with a new upload fetcher instance + + +18-August-2011 + +Added GTMReadMonitorInputStream for logging uploaded NSInputStreams + + +8-July-2011 + +Added shouldFetchInBackground property (thanks justin a) + + +24-Mar-2011 + +Added authorizer support + + +7-Feb-2011 + +Made cookies set by a redirect immediately available in the new request (thanks ehoracek) +Added getter for static cookie storage + + +16-Nov-2010 + +Added fetcher comment property for logging + + +27-Oct-2010 + +Added downloadPath and downloadFileHandle properties +Added waitForCompletionWithTimeout: +Renamed GTMAssertSelectorNilOrImplementedWithArgs() + + +4-Oct-2010 + +Ensure that delegate is nil when not retained. + + +Release 1.0.0 +9-Sept-2010 + +Initial public release. diff --git a/GTL/Source/HTTPFetcher/.svn/text-base/UnitTests-Info.plist.svn-base b/GTL/Source/HTTPFetcher/.svn/text-base/UnitTests-Info.plist.svn-base new file mode 100644 index 0000000..c285a47 --- /dev/null +++ b/GTL/Source/HTTPFetcher/.svn/text-base/UnitTests-Info.plist.svn-base @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.yourcompany.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/GTL/Source/HTTPFetcher/GTMGatherInputStream.h b/GTL/Source/HTTPFetcher/GTMGatherInputStream.h new file mode 100644 index 0000000..280ff97 --- /dev/null +++ b/GTL/Source/HTTPFetcher/GTMGatherInputStream.h @@ -0,0 +1,64 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +// The GTMGatherInput stream is an input stream implementation that is to be +// instantiated with an NSArray of NSData objects. It works in the traditional +// scatter/gather vector I/O model. Rather than allocating a big NSData object +// to hold all of the data and performing a copy into that object, the +// GTMGatherInputStream will maintain a reference to the NSArray and read from +// each NSData in turn as the read method is called. You should not alter the +// underlying set of NSData objects until all read operations on this input +// stream have completed. + +#import + +#if defined(GTL_TARGET_NAMESPACE) + // we need NSInteger for the 10.4 SDK, or we're using target namespace macros + #import "GTLDefines.h" +#elif defined(GDATA_TARGET_NAMESPACE) + #import "GDataDefines.h" +#endif + +// Define only for Mac OS X 10.6+ or iPhone OS 4.0+. +#undef GTM_NSSTREAM_DELEGATE +#if (TARGET_OS_MAC && !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1060)) || \ + (TARGET_OS_IPHONE && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 40000)) + #define GTM_NSSTREAM_DELEGATE +#else + #define GTM_NSSTREAM_DELEGATE +#endif + +@interface GTMGatherInputStream : NSInputStream GTM_NSSTREAM_DELEGATE { + + NSArray* dataArray_; // NSDatas that should be "gathered" and streamed. + NSUInteger arrayIndex_; // Index in the array of the current NSData. + long long dataOffset_; // Offset in the current NSData we are processing. + + id delegate_; // WEAK, stream delegate, defaults to self + + // Since various undocumented methods get called on a stream, we'll + // use a 1-byte dummy stream object to handle all unexpected messages. + // Actual reads from the stream we will perform using the data array, not + // from the dummy stream. + NSInputStream* dummyStream_; + NSData* dummyData_; +} + ++ (NSInputStream *)streamWithArray:(NSArray *)dataArray; + +- (id)initWithArray:(NSArray *)dataArray; + +@end diff --git a/GTL/Source/HTTPFetcher/GTMGatherInputStream.m b/GTL/Source/HTTPFetcher/GTMGatherInputStream.m new file mode 100644 index 0000000..fd72e93 --- /dev/null +++ b/GTL/Source/HTTPFetcher/GTMGatherInputStream.m @@ -0,0 +1,193 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "GTMGatherInputStream.h" + +@implementation GTMGatherInputStream + ++ (NSInputStream *)streamWithArray:(NSArray *)dataArray { + return [[[self alloc] initWithArray:dataArray] autorelease]; +} + +- (id)initWithArray:(NSArray *)dataArray { + self = [super init]; + if (self) { + dataArray_ = [dataArray retain]; + arrayIndex_ = 0; + dataOffset_ = 0; + + [self setDelegate:self]; // An NSStream's default delegate should be self. + + // We use a dummy input stream to handle all the various undocumented + // messages the system sends to an input stream. + // + // Contrary to documentation, inputStreamWithData neither copies nor + // retains the data in Mac OS X 10.4, so we must retain it. + // (Radar 5167591) + + dummyData_ = [[NSData alloc] initWithBytes:"x" length:1]; + dummyStream_ = [[NSInputStream alloc] initWithData:dummyData_]; + } + return self; +} + +- (void)dealloc { + [dataArray_ release]; + [dummyStream_ release]; + [dummyData_ release]; + + [super dealloc]; +} + +- (NSInteger)read:(uint8_t *)buffer maxLength:(NSUInteger)len { + + NSInteger bytesRead = 0; + NSUInteger bytesRemaining = len; + + // read bytes from the currently-indexed array + while ((bytesRemaining > 0) && (arrayIndex_ < [dataArray_ count])) { + + NSData* data = [dataArray_ objectAtIndex:arrayIndex_]; + + NSUInteger dataLen = [data length]; + NSUInteger dataBytesLeft = dataLen - (NSUInteger)dataOffset_; + + NSUInteger bytesToCopy = MIN(bytesRemaining, dataBytesLeft); + NSRange range = NSMakeRange((NSUInteger) dataOffset_, bytesToCopy); + + [data getBytes:(buffer + bytesRead) range:range]; + + bytesRead += bytesToCopy; + dataOffset_ += bytesToCopy; + bytesRemaining -= bytesToCopy; + + if (dataOffset_ == (long long)dataLen) { + dataOffset_ = 0; + arrayIndex_++; + } + } + + if (bytesRead == 0) { + // We are at the end our our stream, so we read all of the data on our + // dummy input stream to make sure it is in the "fully read" state. + uint8_t leftOverBytes[2]; + (void) [dummyStream_ read:leftOverBytes maxLength:sizeof(leftOverBytes)]; + } + + return bytesRead; +} + +- (BOOL)getBuffer:(uint8_t **)buffer length:(NSUInteger *)len { + return NO; // We don't support this style of reading. +} + +- (BOOL)hasBytesAvailable { + // if we return no, the read never finishes, even if we've already + // delivered all the bytes + return YES; +} + +#pragma mark - + +// Pass other expected messages on to the dummy input stream + +- (void)open { + [dummyStream_ open]; +} + +- (void)close { + [dummyStream_ close]; + + // 10.4's NSURLConnection tends to retain streams needlessly, + // so we'll free up the data array right away + [dataArray_ release]; + dataArray_ = nil; +} + +- (void)stream:(NSStream *)theStream handleEvent:(NSStreamEvent)streamEvent { + if (delegate_ != self) { + [delegate_ stream:self handleEvent:streamEvent]; + } +} + +- (id)delegate { + return delegate_; +} + +- (void)setDelegate:(id)delegate { + if (delegate == nil) { + delegate_ = self; + [dummyStream_ setDelegate:nil]; + } else { + delegate_ = delegate; + [dummyStream_ setDelegate:self]; + } +} + +- (id)propertyForKey:(NSString *)key { + return [dummyStream_ propertyForKey:key]; +} + +- (BOOL)setProperty:(id)property forKey:(NSString *)key { + return [dummyStream_ setProperty:property forKey:key]; +} + +- (void)scheduleInRunLoop:(NSRunLoop *)aRunLoop forMode:(NSString *)mode { + [dummyStream_ scheduleInRunLoop:aRunLoop forMode:mode]; +} + +- (void)removeFromRunLoop:(NSRunLoop *)aRunLoop forMode:(NSString *)mode { + [dummyStream_ removeFromRunLoop:aRunLoop forMode:mode]; +} + +- (NSStreamStatus)streamStatus { + return [dummyStream_ streamStatus]; +} +- (NSError *)streamError { + return [dummyStream_ streamError]; +} + +#pragma mark - + +// We'll forward all unexpected messages to our dummy stream + ++ (NSMethodSignature*)methodSignatureForSelector:(SEL)selector { + return [NSInputStream methodSignatureForSelector:selector]; +} + ++ (void)forwardInvocation:(NSInvocation*)invocation { + [invocation invokeWithTarget:[NSInputStream class]]; +} + +- (NSMethodSignature*)methodSignatureForSelector:(SEL)selector { + return [dummyStream_ methodSignatureForSelector:(SEL)selector]; +} + +- (void)forwardInvocation:(NSInvocation*)invocation { + +#if 0 + // uncomment this section to see the messages the NSInputStream receives + SEL selector; + NSString *selName; + + selector=[invocation selector]; + selName=NSStringFromSelector(selector); + NSLog(@"-forwardInvocation: %@",selName); +#endif + + [invocation invokeWithTarget:dummyStream_]; +} + +@end diff --git a/GTL/Source/HTTPFetcher/GTMHTTPFetchHistory.h b/GTL/Source/HTTPFetcher/GTMHTTPFetchHistory.h new file mode 100755 index 0000000..96018f5 --- /dev/null +++ b/GTL/Source/HTTPFetcher/GTMHTTPFetchHistory.h @@ -0,0 +1,187 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMHTTPFetchHistory.h +// + +// +// Users of the GTMHTTPFetcher class may optionally create and set a fetch +// history object. The fetch history provides "memory" between subsequent +// fetches, including: +// +// - For fetch responses with Etag headers, the fetch history +// remembers the response headers. Future fetcher requests to the same URL +// will be given an "If-None-Match" header, telling the server to return +// a 304 Not Modified status if the response is unchanged, reducing the +// server load and network traffic. +// +// - Optionally, the fetch history can cache the ETagged data that was returned +// in the responses that contained Etag headers. If a later fetch +// results in a 304 status, the fetcher will return the cached ETagged data +// to the client along with a 200 status, hiding the 304. +// +// - The fetch history can track cookies. +// + +#pragma once + +#import + +#import "GTMHTTPFetcher.h" + +#undef _EXTERN +#undef _INITIALIZE_AS +#ifdef GTMHTTPFETCHHISTORY_DEFINE_GLOBALS + #define _EXTERN + #define _INITIALIZE_AS(x) =x +#else + #if defined(__cplusplus) + #define _EXTERN extern "C" + #else + #define _EXTERN extern + #endif + #define _INITIALIZE_AS(x) +#endif + + +// default data cache size for when we're caching responses to handle "not +// modified" errors for the client +#if GTM_IPHONE +// iPhone: up to 1MB memory +_EXTERN const NSUInteger kGTMDefaultETaggedDataCacheMemoryCapacity _INITIALIZE_AS(1*1024*1024); +#else +// Mac OS X: up to 15MB memory +_EXTERN const NSUInteger kGTMDefaultETaggedDataCacheMemoryCapacity _INITIALIZE_AS(15*1024*1024); +#endif + +// forward declarations +@class GTMURLCache; +@class GTMCookieStorage; + +@interface GTMHTTPFetchHistory : NSObject { + @private + GTMURLCache *etaggedDataCache_; + BOOL shouldRememberETags_; + BOOL shouldCacheETaggedData_; // if NO, then only headers are cached + GTMCookieStorage *cookieStorage_; +} + +// With caching enabled, previously-cached data will be returned instead of +// 304 Not Modified responses when repeating a fetch of an URL that previously +// included an ETag header in its response +@property (assign) BOOL shouldRememberETags; // default: NO +@property (assign) BOOL shouldCacheETaggedData; // default: NO + +// the default ETag data cache capacity is kGTMDefaultETaggedDataCacheMemoryCapacity +@property (assign) NSUInteger memoryCapacity; + +@property (retain) GTMCookieStorage *cookieStorage; + +- (id)initWithMemoryCapacity:(NSUInteger)totalBytes + shouldCacheETaggedData:(BOOL)shouldCacheETaggedData; + +- (void)updateRequest:(NSMutableURLRequest *)request isHTTPGet:(BOOL)isHTTPGet; + +- (void)clearETaggedDataCache; +- (void)clearHistory; + +- (void)removeAllCookies; + +@end + + +// GTMURLCache and GTMCachedURLResponse have interfaces similar to their +// NSURLCache counterparts, in hopes that someday the NSURLCache versions +// can be used. But in 10.5.8, those are not reliable enough except when +// used with +setSharedURLCache. Our goal here is just to cache +// responses for handling If-None-Match requests that return +// "Not Modified" responses, not for replacing the general URL +// caches. + +@interface GTMCachedURLResponse : NSObject { + @private + NSURLResponse *response_; + NSData *data_; + NSDate *useDate_; // date this response was last saved or used + NSDate *reservationDate_; // date this response's ETag was used +} + +@property (readonly) NSURLResponse* response; +@property (readonly) NSData* data; + +// date the response was saved or last accessed +@property (retain) NSDate *useDate; + +// date the response's ETag header was last used for a fetch request +@property (retain) NSDate *reservationDate; + +- (id)initWithResponse:(NSURLResponse *)response data:(NSData *)data; +@end + +@interface GTMURLCache : NSObject { + NSMutableDictionary *responses_; // maps request URL to GTMCachedURLResponse + NSUInteger memoryCapacity_; // capacity of NSDatas in the responses + NSUInteger totalDataSize_; // sum of sizes of NSDatas of all responses + NSTimeInterval reservationInterval_; // reservation expiration interval +} + +@property (assign) NSUInteger memoryCapacity; + +- (id)initWithMemoryCapacity:(NSUInteger)totalBytes; + +- (GTMCachedURLResponse *)cachedResponseForRequest:(NSURLRequest *)request; +- (void)storeCachedResponse:(GTMCachedURLResponse *)cachedResponse forRequest:(NSURLRequest *)request; +- (void)removeCachedResponseForRequest:(NSURLRequest *)request; +- (void)removeAllCachedResponses; + +// for unit testing +- (void)setReservationInterval:(NSTimeInterval)secs; +- (NSDictionary *)responses; +- (NSUInteger)totalDataSize; +@end + +@interface GTMCookieStorage : NSObject { + @private + // The cookie storage object manages an array holding cookies, but the array + // is allocated externally (it may be in a fetcher object or the static + // fetcher cookie array.) See the fetcher's setCookieStorageMethod: + // for allocation of this object and assignment of its cookies array. + NSMutableArray *cookies_; +} + +// add all NSHTTPCookies in the supplied array to the storage array, +// replacing cookies in the storage array as appropriate +// Side effect: removes expired cookies from the storage array +- (void)setCookies:(NSArray *)newCookies; + +// retrieve all cookies appropriate for the given URL, considering +// domain, path, cookie name, expiration, security setting. +// Side effect: removes expired cookies from the storage array +- (NSArray *)cookiesForURL:(NSURL *)theURL; + +// return a cookie with the same name, domain, and path as the +// given cookie, or else return nil if none found +// +// Both the cookie being tested and all stored cookies should +// be valid (non-nil name, domains, paths) +- (NSHTTPCookie *)cookieMatchingCookie:(NSHTTPCookie *)cookie; + +// remove any expired cookies, excluding cookies with nil expirations +- (void)removeExpiredCookies; + +- (void)removeAllCookies; + +@end diff --git a/GTL/Source/HTTPFetcher/GTMHTTPFetchHistory.m b/GTL/Source/HTTPFetcher/GTMHTTPFetchHistory.m new file mode 100755 index 0000000..2c85923 --- /dev/null +++ b/GTL/Source/HTTPFetcher/GTMHTTPFetchHistory.m @@ -0,0 +1,605 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMHTTPFetchHistory.m +// + +#define GTMHTTPFETCHHISTORY_DEFINE_GLOBALS 1 + +#import "GTMHTTPFetchHistory.h" + +const NSTimeInterval kCachedURLReservationInterval = 60.0; // 1 minute +static NSString* const kGTMIfNoneMatchHeader = @"If-None-Match"; +static NSString* const kGTMETagHeader = @"Etag"; + +@implementation GTMCookieStorage + +- (id)init { + self = [super init]; + if (self != nil) { + cookies_ = [[NSMutableArray alloc] init]; + } + return self; +} + +- (void)dealloc { + [cookies_ release]; + [super dealloc]; +} + +// Add all cookies in the new cookie array to the storage, +// replacing stored cookies as appropriate. +// +// Side effect: removes expired cookies from the storage array. +- (void)setCookies:(NSArray *)newCookies { + + @synchronized(cookies_) { + [self removeExpiredCookies]; + + for (NSHTTPCookie *newCookie in newCookies) { + if ([[newCookie name] length] > 0 + && [[newCookie domain] length] > 0 + && [[newCookie path] length] > 0) { + + // remove the cookie if it's currently in the array + NSHTTPCookie *oldCookie = [self cookieMatchingCookie:newCookie]; + if (oldCookie) { + [cookies_ removeObjectIdenticalTo:oldCookie]; + } + + // make sure the cookie hasn't already expired + NSDate *expiresDate = [newCookie expiresDate]; + if ((!expiresDate) || [expiresDate timeIntervalSinceNow] > 0) { + [cookies_ addObject:newCookie]; + } + + } else { + NSAssert1(NO, @"Cookie incomplete: %@", newCookie); + } + } + } +} + +- (void)deleteCookie:(NSHTTPCookie *)cookie { + @synchronized(cookies_) { + NSHTTPCookie *foundCookie = [self cookieMatchingCookie:cookie]; + if (foundCookie) { + [cookies_ removeObjectIdenticalTo:foundCookie]; + } + } +} + +// Retrieve all cookies appropriate for the given URL, considering +// domain, path, cookie name, expiration, security setting. +// Side effect: removed expired cookies from the storage array. +- (NSArray *)cookiesForURL:(NSURL *)theURL { + + NSMutableArray *foundCookies = nil; + + @synchronized(cookies_) { + [self removeExpiredCookies]; + + // We'll prepend "." to the desired domain, since we want the + // actual domain "nytimes.com" to still match the cookie domain + // ".nytimes.com" when we check it below with hasSuffix. + NSString *host = [[theURL host] lowercaseString]; + NSString *path = [theURL path]; + NSString *scheme = [theURL scheme]; + + NSString *domain = nil; + BOOL isLocalhostRetrieval = NO; + + if ([host isEqual:@"localhost"]) { + isLocalhostRetrieval = YES; + } else { + if (host) { + domain = [@"." stringByAppendingString:host]; + } + } + + NSUInteger numberOfCookies = [cookies_ count]; + for (NSUInteger idx = 0; idx < numberOfCookies; idx++) { + + NSHTTPCookie *storedCookie = [cookies_ objectAtIndex:idx]; + + NSString *cookieDomain = [[storedCookie domain] lowercaseString]; + NSString *cookiePath = [storedCookie path]; + BOOL cookieIsSecure = [storedCookie isSecure]; + + BOOL isDomainOK; + + if (isLocalhostRetrieval) { + // prior to 10.5.6, the domain stored into NSHTTPCookies for localhost + // is "localhost.local" + isDomainOK = [cookieDomain isEqual:@"localhost"] + || [cookieDomain isEqual:@"localhost.local"]; + } else { + isDomainOK = [domain hasSuffix:cookieDomain]; + } + + BOOL isPathOK = [cookiePath isEqual:@"/"] || [path hasPrefix:cookiePath]; + BOOL isSecureOK = (!cookieIsSecure) || [scheme isEqual:@"https"]; + + if (isDomainOK && isPathOK && isSecureOK) { + if (foundCookies == nil) { + foundCookies = [NSMutableArray arrayWithCapacity:1]; + } + [foundCookies addObject:storedCookie]; + } + } + } + return foundCookies; +} + +// Return a cookie from the array with the same name, domain, and path as the +// given cookie, or else return nil if none found. +// +// Both the cookie being tested and all cookies in the storage array should +// be valid (non-nil name, domains, paths). +// +// Note: this should only be called from inside a @synchronized(cookies_) block +- (NSHTTPCookie *)cookieMatchingCookie:(NSHTTPCookie *)cookie { + + NSUInteger numberOfCookies = [cookies_ count]; + NSString *name = [cookie name]; + NSString *domain = [cookie domain]; + NSString *path = [cookie path]; + + NSAssert3(name && domain && path, @"Invalid cookie (name:%@ domain:%@ path:%@)", + name, domain, path); + + for (NSUInteger idx = 0; idx < numberOfCookies; idx++) { + + NSHTTPCookie *storedCookie = [cookies_ objectAtIndex:idx]; + + if ([[storedCookie name] isEqual:name] + && [[storedCookie domain] isEqual:domain] + && [[storedCookie path] isEqual:path]) { + + return storedCookie; + } + } + return nil; +} + + +// Internal routine to remove any expired cookies from the array, excluding +// cookies with nil expirations. +// +// Note: this should only be called from inside a @synchronized(cookies_) block +- (void)removeExpiredCookies { + + // count backwards since we're deleting items from the array + for (NSInteger idx = (NSInteger)[cookies_ count] - 1; idx >= 0; idx--) { + + NSHTTPCookie *storedCookie = [cookies_ objectAtIndex:(NSUInteger)idx]; + + NSDate *expiresDate = [storedCookie expiresDate]; + if (expiresDate && [expiresDate timeIntervalSinceNow] < 0) { + [cookies_ removeObjectAtIndex:(NSUInteger)idx]; + } + } +} + +- (void)removeAllCookies { + @synchronized(cookies_) { + [cookies_ removeAllObjects]; + } +} +@end + +// +// GTMCachedURLResponse +// + +@implementation GTMCachedURLResponse + +@synthesize response = response_; +@synthesize data = data_; +@synthesize reservationDate = reservationDate_; +@synthesize useDate = useDate_; + +- (id)initWithResponse:(NSURLResponse *)response data:(NSData *)data { + self = [super init]; + if (self != nil) { + response_ = [response retain]; + data_ = [data retain]; + useDate_ = [[NSDate alloc] init]; + } + return self; +} + +- (void)dealloc { + [response_ release]; + [data_ release]; + [useDate_ release]; + [reservationDate_ release]; + [super dealloc]; +} + +- (NSString *)description { + NSString *reservationStr = reservationDate_ ? + [NSString stringWithFormat:@" resDate:%@", reservationDate_] : @""; + + return [NSString stringWithFormat:@"%@ %p: {bytes:%@ useDate:%@%@}", + [self class], self, + data_ ? [NSNumber numberWithInt:(int)[data_ length]] : nil, + useDate_, + reservationStr]; +} + +- (NSComparisonResult)compareUseDate:(GTMCachedURLResponse *)other { + return [useDate_ compare:[other useDate]]; +} + +@end + +// +// GTMURLCache +// + +@implementation GTMURLCache + +@dynamic memoryCapacity; + +- (id)init { + return [self initWithMemoryCapacity:kGTMDefaultETaggedDataCacheMemoryCapacity]; +} + +- (id)initWithMemoryCapacity:(NSUInteger)totalBytes { + self = [super init]; + if (self != nil) { + memoryCapacity_ = totalBytes; + + responses_ = [[NSMutableDictionary alloc] initWithCapacity:5]; + + reservationInterval_ = kCachedURLReservationInterval; + } + return self; +} + +- (void)dealloc { + [responses_ release]; + [super dealloc]; +} + +- (NSString *)description { + return [NSString stringWithFormat:@"%@ %p: {responses:%@}", + [self class], self, [responses_ allValues]]; +} + +// Setters/getters + +- (void)pruneCacheResponses { + // Internal routine to remove the least-recently-used responses when the + // cache has grown too large + if (memoryCapacity_ >= totalDataSize_) return; + + // Sort keys by date + SEL sel = @selector(compareUseDate:); + NSArray *sortedKeys = [responses_ keysSortedByValueUsingSelector:sel]; + + // The least-recently-used keys are at the beginning of the sorted array; + // remove those (except ones still reserved) until the total data size is + // reduced sufficiently + for (NSURL *key in sortedKeys) { + GTMCachedURLResponse *response = [responses_ objectForKey:key]; + + NSDate *resDate = [response reservationDate]; + BOOL isResponseReserved = (resDate != nil) + && ([resDate timeIntervalSinceNow] > -reservationInterval_); + + if (!isResponseReserved) { + // We can remove this response from the cache + NSUInteger storedSize = [[response data] length]; + totalDataSize_ -= storedSize; + [responses_ removeObjectForKey:key]; + } + + // If we've removed enough response data, then we're done + if (memoryCapacity_ >= totalDataSize_) break; + } +} + +- (void)storeCachedResponse:(GTMCachedURLResponse *)cachedResponse + forRequest:(NSURLRequest *)request { + @synchronized(self) { + // Remove any previous entry for this request + [self removeCachedResponseForRequest:request]; + + // cache this one only if it's not bigger than our cache + NSUInteger storedSize = [[cachedResponse data] length]; + if (storedSize < memoryCapacity_) { + + NSURL *key = [request URL]; + [responses_ setObject:cachedResponse forKey:key]; + totalDataSize_ += storedSize; + + [self pruneCacheResponses]; + } + } +} + +- (GTMCachedURLResponse *)cachedResponseForRequest:(NSURLRequest *)request { + GTMCachedURLResponse *response; + + @synchronized(self) { + NSURL *key = [request URL]; + response = [[[responses_ objectForKey:key] retain] autorelease]; + + // Touch the date to indicate this was recently retrieved + [response setUseDate:[NSDate date]]; + } + return response; +} + +- (void)removeCachedResponseForRequest:(NSURLRequest *)request { + @synchronized(self) { + NSURL *key = [request URL]; + totalDataSize_ -= [[[responses_ objectForKey:key] data] length]; + [responses_ removeObjectForKey:key]; + } +} + +- (void)removeAllCachedResponses { + @synchronized(self) { + [responses_ removeAllObjects]; + totalDataSize_ = 0; + } +} + +- (NSUInteger)memoryCapacity { + return memoryCapacity_; +} + +- (void)setMemoryCapacity:(NSUInteger)totalBytes { + @synchronized(self) { + BOOL didShrink = (totalBytes < memoryCapacity_); + memoryCapacity_ = totalBytes; + + if (didShrink) { + [self pruneCacheResponses]; + } + } +} + +// Methods for unit testing. +- (void)setReservationInterval:(NSTimeInterval)secs { + reservationInterval_ = secs; +} + +- (NSDictionary *)responses { + return responses_; +} + +- (NSUInteger)totalDataSize { + return totalDataSize_; +} + +@end + +// +// GTMHTTPFetchHistory +// + +@interface GTMHTTPFetchHistory () +- (NSString *)cachedETagForRequest:(NSURLRequest *)request; +- (void)removeCachedDataForRequest:(NSURLRequest *)request; +@end + +@implementation GTMHTTPFetchHistory + +@synthesize cookieStorage = cookieStorage_; + +@dynamic shouldRememberETags; +@dynamic shouldCacheETaggedData; +@dynamic memoryCapacity; + +- (id)init { + return [self initWithMemoryCapacity:kGTMDefaultETaggedDataCacheMemoryCapacity + shouldCacheETaggedData:NO]; +} + +- (id)initWithMemoryCapacity:(NSUInteger)totalBytes + shouldCacheETaggedData:(BOOL)shouldCacheETaggedData { + self = [super init]; + if (self != nil) { + etaggedDataCache_ = [[GTMURLCache alloc] initWithMemoryCapacity:totalBytes]; + shouldRememberETags_ = shouldCacheETaggedData; + shouldCacheETaggedData_ = shouldCacheETaggedData; + cookieStorage_ = [[GTMCookieStorage alloc] init]; + } + return self; +} + +- (void)dealloc { + [etaggedDataCache_ release]; + [cookieStorage_ release]; + [super dealloc]; +} + +- (void)updateRequest:(NSMutableURLRequest *)request isHTTPGet:(BOOL)isHTTPGet { + @synchronized(self) { + if ([self shouldRememberETags]) { + // If this URL is in the history, and no ETag has been set, then + // set the ETag header field + + // If we have a history, we're tracking across fetches, so we don't + // want to pull results from any other cache + [request setCachePolicy:NSURLRequestReloadIgnoringCacheData]; + + if (isHTTPGet) { + // We'll only add an ETag if there's no ETag specified in the user's + // request + NSString *specifiedETag = [request valueForHTTPHeaderField:kGTMIfNoneMatchHeader]; + if (specifiedETag == nil) { + // No ETag: extract the previous ETag for this request from the + // fetch history, and add it to the request + NSString *cachedETag = [self cachedETagForRequest:request]; + + if (cachedETag != nil) { + [request addValue:cachedETag forHTTPHeaderField:kGTMIfNoneMatchHeader]; + } + } else { + // Has an ETag: remove any stored response in the fetch history + // for this request, as the If-None-Match header could lead to + // a 304 Not Modified, and we want that error delivered to the + // user since they explicitly specified the ETag + [self removeCachedDataForRequest:request]; + } + } + } + } +} + +- (void)updateFetchHistoryWithRequest:(NSURLRequest *)request + response:(NSURLResponse *)response + downloadedData:(NSData *)downloadedData { + @synchronized(self) { + if (![self shouldRememberETags]) return; + + if (![response respondsToSelector:@selector(allHeaderFields)]) return; + + NSInteger statusCode = [(NSHTTPURLResponse *)response statusCode]; + + if (statusCode != kGTMHTTPFetcherStatusNotModified) { + // Save this ETag string for successful results (<300) + // If there's no last modified string, clear the dictionary + // entry for this URL. Also cache or delete the data, if appropriate + // (when etaggedDataCache is non-nil.) + NSDictionary *headers = [(NSHTTPURLResponse *)response allHeaderFields]; + NSString* etag = [headers objectForKey:kGTMETagHeader]; + + if (etag != nil && statusCode < 300) { + + // we want to cache responses for the headers, even if the client + // doesn't want the response body data caches + NSData *dataToStore = shouldCacheETaggedData_ ? downloadedData : nil; + + GTMCachedURLResponse *cachedResponse; + cachedResponse = [[[GTMCachedURLResponse alloc] initWithResponse:response + data:dataToStore] autorelease]; + [etaggedDataCache_ storeCachedResponse:cachedResponse + forRequest:request]; + } else { + [etaggedDataCache_ removeCachedResponseForRequest:request]; + } + } + } +} + +- (NSString *)cachedETagForRequest:(NSURLRequest *)request { + // Internal routine. + GTMCachedURLResponse *cachedResponse; + cachedResponse = [etaggedDataCache_ cachedResponseForRequest:request]; + + NSURLResponse *response = [cachedResponse response]; + NSDictionary *headers = [(NSHTTPURLResponse *)response allHeaderFields]; + NSString *cachedETag = [headers objectForKey:kGTMETagHeader]; + if (cachedETag) { + // Since the request having an ETag implies this request is about + // to be fetched again, reserve the cached response to ensure that + // that it will be around at least until the fetch completes. + // + // When the fetch completes, either the cached response will be replaced + // with a new response, or the cachedDataForRequest: method below will + // clear the reservation. + [cachedResponse setReservationDate:[NSDate date]]; + } + return cachedETag; +} + +- (NSData *)cachedDataForRequest:(NSURLRequest *)request { + @synchronized(self) { + GTMCachedURLResponse *cachedResponse; + cachedResponse = [etaggedDataCache_ cachedResponseForRequest:request]; + + NSData *cachedData = [cachedResponse data]; + + // Since the data for this cached request is being obtained from the cache, + // we can clear the reservation as the fetch has completed. + [cachedResponse setReservationDate:nil]; + + return cachedData; + } +} + +- (void)removeCachedDataForRequest:(NSURLRequest *)request { + @synchronized(self) { + [etaggedDataCache_ removeCachedResponseForRequest:request]; + } +} + +- (void)clearETaggedDataCache { + @synchronized(self) { + [etaggedDataCache_ removeAllCachedResponses]; + } +} + +- (void)clearHistory { + @synchronized(self) { + [self clearETaggedDataCache]; + [cookieStorage_ removeAllCookies]; + } +} + +- (void)removeAllCookies { + @synchronized(self) { + [cookieStorage_ removeAllCookies]; + } +} + +- (BOOL)shouldRememberETags { + return shouldRememberETags_; +} + +- (void)setShouldRememberETags:(BOOL)flag { + BOOL wasRemembering = shouldRememberETags_; + shouldRememberETags_ = flag; + + if (wasRemembering && !flag) { + // Free up the cache memory + [self clearETaggedDataCache]; + } +} + +- (BOOL)shouldCacheETaggedData { + return shouldCacheETaggedData_; +} + +- (void)setShouldCacheETaggedData:(BOOL)flag { + BOOL wasCaching = shouldCacheETaggedData_; + shouldCacheETaggedData_ = flag; + + if (flag) { + self.shouldRememberETags = YES; + } + + if (wasCaching && !flag) { + // users expect turning off caching to free up the cache memory + [self clearETaggedDataCache]; + } +} + +- (NSUInteger)memoryCapacity { + return [etaggedDataCache_ memoryCapacity]; +} + +- (void)setMemoryCapacity:(NSUInteger)totalBytes { + [etaggedDataCache_ setMemoryCapacity:totalBytes]; +} + +@end diff --git a/GTL/Source/HTTPFetcher/GTMHTTPFetcher.h b/GTL/Source/HTTPFetcher/GTMHTTPFetcher.h new file mode 100755 index 0000000..e497737 --- /dev/null +++ b/GTL/Source/HTTPFetcher/GTMHTTPFetcher.h @@ -0,0 +1,748 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMHTTPFetcher.h +// + +// This is essentially a wrapper around NSURLConnection for POSTs and GETs. +// If setPostData: is called, then POST is assumed. +// +// When would you use this instead of NSURLConnection? +// +// - When you just want the result from a GET, POST, or PUT +// - When you want the "standard" behavior for connections (redirection handling +// an so on) +// - When you want automatic retry on failures +// - When you want to avoid cookie collisions with Safari and other applications +// - When you are fetching resources with ETags and want to avoid the overhead +// of repeated fetches of unchanged data +// - When you need to set a credential for the http operation +// +// This is assumed to be a one-shot fetch request; don't reuse the object +// for a second fetch. +// +// The fetcher may be created auto-released, in which case it will release +// itself after the fetch completion callback. The fetcher is implicitly +// retained as long as a connection is pending. +// +// But if you may need to cancel the fetcher, retain it and have the delegate +// release the fetcher in the callbacks. +// +// Sample usage: +// +// NSURLRequest *request = [NSURLRequest requestWithURL:myURL]; +// GTMHTTPFetcher* myFetcher = [GTMHTTPFetcher fetcherWithRequest:request]; +// +// // optional upload body data +// [myFetcher setPostData:[postString dataUsingEncoding:NSUTF8StringEncoding]]; +// +// [myFetcher beginFetchWithDelegate:self +// didFinishSelector:@selector(myFetcher:finishedWithData:error:)]; +// +// Upon fetch completion, the callback selector is invoked; it should have +// this signature (you can use any callback method name you want so long as +// the signature matches this): +// +// - (void)myFetcher:(GTMHTTPFetcher *)fetcher finishedWithData:(NSData *)retrievedData error:(NSError *)error; +// +// The block callback version looks like: +// +// [myFetcher beginFetchWithCompletionHandler:^(NSData *retrievedData, NSError *error) { +// if (error != nil) { +// // status code or network error +// } else { +// // succeeded +// } +// }]; + +// +// NOTE: Fetches may retrieve data from the server even though the server +// returned an error. The failure selector is called when the server +// status is >= 300, with an NSError having domain +// kGTMHTTPFetcherStatusDomain and code set to the server status. +// +// Status codes are at +// +// +// Threading and queue support: +// +// Callbacks require either that the thread used to start the fetcher have a run +// loop spinning (typically the main thread), or that an NSOperationQueue be +// provided upon which the delegate callbacks will be called. Starting with +// iOS 6 and Mac OS X 10.7, clients may simply create an operation queue for +// callbacks on a background thread: +// +// fetcher.delegateQueue = [[[NSOperationQueue alloc] init] autorelease]; +// +// or specify the main queue for callbacks on the main thread: +// +// fetcher.delegateQueue = [NSOperationQueue mainQueue]; +// +// The client may also re-dispatch from the callbacks and notifications to +// a known dispatch queue: +// +// [myFetcher beginFetchWithCompletionHandler:^(NSData *retrievedData, NSError *error) { +// if (error == nil) { +// dispatch_async(myDispatchQueue, ^{ +// ... +// }); +// } +// }]; +// +// +// +// Downloading to disk: +// +// To have downloaded data saved directly to disk, specify either a path for the +// downloadPath property, or a file handle for the downloadFileHandle property. +// When downloading to disk, callbacks will be passed a nil for the NSData* +// arguments. +// +// +// HTTP methods and headers: +// +// Alternative HTTP methods, like PUT, and custom headers can be specified by +// creating the fetcher with an appropriate NSMutableURLRequest +// +// +// Proxies: +// +// Proxy handling is invisible so long as the system has a valid credential in +// the keychain, which is normally true (else most NSURL-based apps would have +// difficulty.) But when there is a proxy authetication error, the the fetcher +// will call the failedWithError: method with the NSURLChallenge in the error's +// userInfo. The error method can get the challenge info like this: +// +// NSURLAuthenticationChallenge *challenge +// = [[error userInfo] objectForKey:kGTMHTTPFetcherErrorChallengeKey]; +// BOOL isProxyChallenge = [[challenge protectionSpace] isProxy]; +// +// If a proxy error occurs, you can ask the user for the proxy username/password +// and call fetcher's setProxyCredential: to provide those for the +// next attempt to fetch. +// +// +// Cookies: +// +// There are three supported mechanisms for remembering cookies between fetches. +// +// By default, GTMHTTPFetcher uses a mutable array held statically to track +// cookies for all instantiated fetchers. This avoids server cookies being set +// by servers for the application from interfering with Safari cookie settings, +// and vice versa. The fetcher cookies are lost when the application quits. +// +// To rely instead on WebKit's global NSHTTPCookieStorage, call +// setCookieStorageMethod: with kGTMHTTPFetcherCookieStorageMethodSystemDefault. +// +// If the fetcher is created from a GTMHTTPFetcherService object +// then the cookie storage mechanism is set to use the cookie storage in the +// service object rather than the static storage. +// +// +// Fetching for periodic checks: +// +// The fetcher object tracks ETag headers from responses and +// provide an "If-None-Match" header. This allows the server to save +// bandwidth by providing a status message instead of repeated response +// data. +// +// To get this behavior, create the fetcher from an GTMHTTPFetcherService object +// and look for a fetch callback error with code 304 +// (kGTMHTTPFetcherStatusNotModified) like this: +// +// - (void)myFetcher:(GTMHTTPFetcher *)fetcher finishedWithData:(NSData *)data error:(NSError *)error { +// if ([error code] == kGTMHTTPFetcherStatusNotModified) { +// // |data| is empty; use the data from the previous finishedWithData: for this URL +// } else { +// // handle other server status code +// } +// } +// +// +// Monitoring received data +// +// The optional received data selector can be set with setReceivedDataSelector: +// and should have the signature +// +// - (void)myFetcher:(GTMHTTPFetcher *)fetcher receivedData:(NSData *)dataReceivedSoFar; +// +// The number bytes received so far is available as [fetcher downloadedLength]. +// This number may go down if a redirect causes the download to begin again from +// a new server. +// +// If supplied by the server, the anticipated total download size is available +// as [[myFetcher response] expectedContentLength] (and may be -1 for unknown +// download sizes.) +// +// +// Automatic retrying of fetches +// +// The fetcher can optionally create a timer and reattempt certain kinds of +// fetch failures (status codes 408, request timeout; 503, service unavailable; +// 504, gateway timeout; networking errors NSURLErrorTimedOut and +// NSURLErrorNetworkConnectionLost.) The user may set a retry selector to +// customize the type of errors which will be retried. +// +// Retries are done in an exponential-backoff fashion (that is, after 1 second, +// 2, 4, 8, and so on.) +// +// Enabling automatic retries looks like this: +// [myFetcher setRetryEnabled:YES]; +// +// With retries enabled, the success or failure callbacks are called only +// when no more retries will be attempted. Calling the fetcher's stopFetching +// method will terminate the retry timer, without the finished or failure +// selectors being invoked. +// +// Optionally, the client may set the maximum retry interval: +// [myFetcher setMaxRetryInterval:60.0]; // in seconds; default is 60 seconds +// // for downloads, 600 for uploads +// +// Also optionally, the client may provide a callback selector to determine +// if a status code or other error should be retried. +// [myFetcher setRetrySelector:@selector(myFetcher:willRetry:forError:)]; +// +// If set, the retry selector should have the signature: +// -(BOOL)fetcher:(GTMHTTPFetcher *)fetcher willRetry:(BOOL)suggestedWillRetry forError:(NSError *)error +// and return YES to set the retry timer or NO to fail without additional +// fetch attempts. +// +// The retry method may return the |suggestedWillRetry| argument to get the +// default retry behavior. Server status codes are present in the +// error argument, and have the domain kGTMHTTPFetcherStatusDomain. The +// user's method may look something like this: +// +// -(BOOL)myFetcher:(GTMHTTPFetcher *)fetcher willRetry:(BOOL)suggestedWillRetry forError:(NSError *)error { +// +// // perhaps examine [error domain] and [error code], or [fetcher retryCount] +// // +// // return YES to start the retry timer, NO to proceed to the failure +// // callback, or |suggestedWillRetry| to get default behavior for the +// // current error domain and code values. +// return suggestedWillRetry; +// } + + + +#pragma once + +#import + +#if defined(GTL_TARGET_NAMESPACE) + // we're using target namespace macros + #import "GTLDefines.h" +#elif defined(GDATA_TARGET_NAMESPACE) + #import "GDataDefines.h" +#else + #if TARGET_OS_IPHONE + #ifndef GTM_FOUNDATION_ONLY + #define GTM_FOUNDATION_ONLY 1 + #endif + #ifndef GTM_IPHONE + #define GTM_IPHONE 1 + #endif + #endif +#endif + +#if TARGET_OS_IPHONE && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 40000) + #define GTM_BACKGROUND_FETCHING 1 +#endif + +#undef _EXTERN +#undef _INITIALIZE_AS +#ifdef GTMHTTPFETCHER_DEFINE_GLOBALS + #define _EXTERN + #define _INITIALIZE_AS(x) =x +#else + #if defined(__cplusplus) + #define _EXTERN extern "C" + #else + #define _EXTERN extern + #endif + #define _INITIALIZE_AS(x) +#endif + +// notifications +// +// fetch started and stopped, and fetch retry delay started and stopped +_EXTERN NSString* const kGTMHTTPFetcherStartedNotification _INITIALIZE_AS(@"kGTMHTTPFetcherStartedNotification"); +_EXTERN NSString* const kGTMHTTPFetcherStoppedNotification _INITIALIZE_AS(@"kGTMHTTPFetcherStoppedNotification"); +_EXTERN NSString* const kGTMHTTPFetcherRetryDelayStartedNotification _INITIALIZE_AS(@"kGTMHTTPFetcherRetryDelayStartedNotification"); +_EXTERN NSString* const kGTMHTTPFetcherRetryDelayStoppedNotification _INITIALIZE_AS(@"kGTMHTTPFetcherRetryDelayStoppedNotification"); + +// callback constants +_EXTERN NSString* const kGTMHTTPFetcherErrorDomain _INITIALIZE_AS(@"com.google.GTMHTTPFetcher"); +_EXTERN NSString* const kGTMHTTPFetcherStatusDomain _INITIALIZE_AS(@"com.google.HTTPStatus"); +_EXTERN NSString* const kGTMHTTPFetcherErrorChallengeKey _INITIALIZE_AS(@"challenge"); +_EXTERN NSString* const kGTMHTTPFetcherStatusDataKey _INITIALIZE_AS(@"data"); // data returned with a kGTMHTTPFetcherStatusDomain error + +enum { + kGTMHTTPFetcherErrorDownloadFailed = -1, + kGTMHTTPFetcherErrorAuthenticationChallengeFailed = -2, + kGTMHTTPFetcherErrorChunkUploadFailed = -3, + kGTMHTTPFetcherErrorFileHandleException = -4, + kGTMHTTPFetcherErrorBackgroundExpiration = -6, + + // The code kGTMHTTPFetcherErrorAuthorizationFailed (-5) has been removed; + // look for status 401 instead. + + kGTMHTTPFetcherStatusNotModified = 304, + kGTMHTTPFetcherStatusBadRequest = 400, + kGTMHTTPFetcherStatusUnauthorized = 401, + kGTMHTTPFetcherStatusForbidden = 403, + kGTMHTTPFetcherStatusPreconditionFailed = 412 +}; + +// cookie storage methods +enum { + kGTMHTTPFetcherCookieStorageMethodStatic = 0, + kGTMHTTPFetcherCookieStorageMethodFetchHistory = 1, + kGTMHTTPFetcherCookieStorageMethodSystemDefault = 2, + kGTMHTTPFetcherCookieStorageMethodNone = 3 +}; + +#ifdef __cplusplus +extern "C" { +#endif + +void GTMAssertSelectorNilOrImplementedWithArgs(id obj, SEL sel, ...); + +// Utility functions for applications self-identifying to servers via a +// user-agent header + +// Make a proper app name without whitespace from the given string, removing +// whitespace and other characters that may be special parsed marks of +// the full user-agent string. +NSString *GTMCleanedUserAgentString(NSString *str); + +// Make an identifier like "MacOSX/10.7.1" or "iPod_Touch/4.1" +NSString *GTMSystemVersionString(void); + +// Make a generic name and version for the current application, like +// com.example.MyApp/1.2.3 relying on the bundle identifier and the +// CFBundleShortVersionString or CFBundleVersion. If no bundle ID +// is available, the process name preceded by "proc_" is used. +NSString *GTMApplicationIdentifier(NSBundle *bundle); + +#ifdef __cplusplus +} // extern "C" +#endif + +@class GTMHTTPFetcher; + +@protocol GTMCookieStorageProtocol +// This protocol allows us to call into the service without requiring +// GTMCookieStorage sources in this project +// +// The public interface for cookie handling is the GTMCookieStorage class, +// accessible from a fetcher service object's fetchHistory or from the fetcher's +// +staticCookieStorage method. +- (NSArray *)cookiesForURL:(NSURL *)theURL; +- (void)setCookies:(NSArray *)newCookies; +@end + +@protocol GTMHTTPFetchHistoryProtocol +// This protocol allows us to call the fetch history object without requiring +// GTMHTTPFetchHistory sources in this project +- (void)updateRequest:(NSMutableURLRequest *)request isHTTPGet:(BOOL)isHTTPGet; +- (BOOL)shouldCacheETaggedData; +- (NSData *)cachedDataForRequest:(NSURLRequest *)request; +- (id )cookieStorage; +- (void)updateFetchHistoryWithRequest:(NSURLRequest *)request + response:(NSURLResponse *)response + downloadedData:(NSData *)downloadedData; +- (void)removeCachedDataForRequest:(NSURLRequest *)request; +@end + +@protocol GTMHTTPFetcherServiceProtocol +// This protocol allows us to call into the service without requiring +// GTMHTTPFetcherService sources in this project + +@property (retain) NSOperationQueue *delegateQueue; + +- (BOOL)fetcherShouldBeginFetching:(GTMHTTPFetcher *)fetcher; +- (void)fetcherDidStop:(GTMHTTPFetcher *)fetcher; + +- (GTMHTTPFetcher *)fetcherWithRequest:(NSURLRequest *)request; +- (BOOL)isDelayingFetcher:(GTMHTTPFetcher *)fetcher; +@end + +@protocol GTMFetcherAuthorizationProtocol +@required +// This protocol allows us to call the authorizer without requiring its sources +// in this project +- (void)authorizeRequest:(NSMutableURLRequest *)request + delegate:(id)delegate + didFinishSelector:(SEL)sel; + +- (void)stopAuthorization; + +- (void)stopAuthorizationForRequest:(NSURLRequest *)request; + +- (BOOL)isAuthorizingRequest:(NSURLRequest *)request; + +- (BOOL)isAuthorizedRequest:(NSURLRequest *)request; + +- (NSString *)userEmail; + +@optional +@property (assign) id fetcherService; // WEAK + +- (BOOL)primeForRefresh; +@end + +// GTMHTTPFetcher objects are used for async retrieval of an http get or post +// +// See additional comments at the beginning of this file +@interface GTMHTTPFetcher : NSObject { + @protected + NSMutableURLRequest *request_; + NSURLConnection *connection_; + NSMutableData *downloadedData_; + NSString *downloadPath_; + NSString *temporaryDownloadPath_; + NSFileHandle *downloadFileHandle_; + unsigned long long downloadedLength_; + NSURLCredential *credential_; // username & password + NSURLCredential *proxyCredential_; // credential supplied to proxy servers + NSData *postData_; + NSInputStream *postStream_; + NSMutableData *loggedStreamData_; + NSURLResponse *response_; // set in connection:didReceiveResponse: + id delegate_; + SEL finishedSel_; // should by implemented by delegate + SEL sentDataSel_; // optional, set with setSentDataSelector + SEL receivedDataSel_; // optional, set with setReceivedDataSelector +#if NS_BLOCKS_AVAILABLE + void (^completionBlock_)(NSData *, NSError *); + void (^receivedDataBlock_)(NSData *); + void (^sentDataBlock_)(NSInteger, NSInteger, NSInteger); + BOOL (^retryBlock_)(BOOL, NSError *); +#elif !__LP64__ + // placeholders: for 32-bit builds, keep the size of the object's ivar section + // the same with and without blocks + id completionPlaceholder_; + id receivedDataPlaceholder_; + id sentDataPlaceholder_; + id retryPlaceholder_; +#endif + BOOL hasConnectionEnded_; // set if the connection need not be cancelled + BOOL isCancellingChallenge_; // set only when cancelling an auth challenge + BOOL isStopNotificationNeeded_; // set when start notification has been sent + BOOL shouldFetchInBackground_; +#if GTM_BACKGROUND_FETCHING + NSUInteger backgroundTaskIdentifer_; // UIBackgroundTaskIdentifier +#endif + id userData_; // retained, if set by caller + NSMutableDictionary *properties_; // more data retained for caller + NSArray *runLoopModes_; // optional + NSOperationQueue *delegateQueue_; // optional; available iOS 6/10.7 and later + id fetchHistory_; // if supplied by the caller, used for Last-Modified-Since checks and cookies + NSInteger cookieStorageMethod_; // constant from above + id cookieStorage_; + + id authorizer_; + + // the service object that created and monitors this fetcher, if any + id service_; + NSString *serviceHost_; + NSInteger servicePriority_; + NSThread *thread_; + + BOOL isRetryEnabled_; // user wants auto-retry + SEL retrySel_; // optional; set with setRetrySelector + NSTimer *retryTimer_; + NSUInteger retryCount_; + NSTimeInterval maxRetryInterval_; // default 600 seconds + NSTimeInterval minRetryInterval_; // random between 1 and 2 seconds + NSTimeInterval retryFactor_; // default interval multiplier is 2 + NSTimeInterval lastRetryInterval_; + BOOL hasAttemptedAuthRefresh_; + + NSString *comment_; // comment for log + NSString *log_; +#if !STRIP_GTM_FETCH_LOGGING + NSString *logRequestBody_; + NSString *logResponseBody_; + BOOL shouldDeferResponseBodyLogging_; +#endif +} + +// Create a fetcher +// +// fetcherWithRequest will return an autoreleased fetcher, but if +// the connection is successfully created, the connection should retain the +// fetcher for the life of the connection as well. So the caller doesn't have +// to retain the fetcher explicitly unless they want to be able to cancel it. ++ (GTMHTTPFetcher *)fetcherWithRequest:(NSURLRequest *)request; + +// Convenience methods that make a request, like +fetcherWithRequest ++ (GTMHTTPFetcher *)fetcherWithURL:(NSURL *)requestURL; ++ (GTMHTTPFetcher *)fetcherWithURLString:(NSString *)requestURLString; + +// Designated initializer +- (id)initWithRequest:(NSURLRequest *)request; + +// Fetcher request +// +// The underlying request is mutable and may be modified by the caller +@property (retain) NSMutableURLRequest *mutableRequest; + +// Setting the credential is optional; it is used if the connection receives +// an authentication challenge +@property (retain) NSURLCredential *credential; + +// Setting the proxy credential is optional; it is used if the connection +// receives an authentication challenge from a proxy +@property (retain) NSURLCredential *proxyCredential; + +// If post data or stream is not set, then a GET retrieval method is assumed +@property (retain) NSData *postData; +@property (retain) NSInputStream *postStream; + +// The default cookie storage method is kGTMHTTPFetcherCookieStorageMethodStatic +// without a fetch history set, and kGTMHTTPFetcherCookieStorageMethodFetchHistory +// with a fetch history set +// +// Applications needing control of cookies across a sequence of fetches should +// create fetchers from a GTMHTTPFetcherService object (which encapsulates +// fetch history) for a well-defined cookie store +@property (assign) NSInteger cookieStorageMethod; + ++ (id )staticCookieStorage; + +// Object to add authorization to the request, if needed +@property (retain) id authorizer; + +// The service object that created and monitors this fetcher, if any +@property (retain) id service; + +// The host, if any, used to classify this fetcher in the fetcher service +@property (copy) NSString *serviceHost; + +// The priority, if any, used for starting fetchers in the fetcher service +// +// Lower values are higher priority; the default is 0, and values may +// be negative or positive. This priority affects only the start order of +// fetchers that are being delayed by a fetcher service. +@property (assign) NSInteger servicePriority; + +// The thread used to run this fetcher in the fetcher service when no operation +// queue is provided. +@property (retain) NSThread *thread; + +// The delegate is retained during the connection +@property (retain) id delegate; + +// On iOS 4 and later, the fetch may optionally continue while the app is in the +// background until finished or stopped by OS expiration +// +// The default value is NO +// +// For Mac OS X, background fetches are always supported, and this property +// is ignored +@property (assign) BOOL shouldFetchInBackground; + +// The delegate's optional sentData selector may be used to monitor upload +// progress. It should have a signature like: +// - (void)myFetcher:(GTMHTTPFetcher *)fetcher +// didSendBytes:(NSInteger)bytesSent +// totalBytesSent:(NSInteger)totalBytesSent +// totalBytesExpectedToSend:(NSInteger)totalBytesExpectedToSend; +// +// +doesSupportSentDataCallback indicates if this delegate method is supported ++ (BOOL)doesSupportSentDataCallback; + +@property (assign) SEL sentDataSelector; + +// The delegate's optional receivedData selector may be used to monitor download +// progress. It should have a signature like: +// - (void)myFetcher:(GTMHTTPFetcher *)fetcher +// receivedData:(NSData *)dataReceivedSoFar; +// +// The dataReceived argument will be nil when downloading to a path or to a +// file handle. +// +// Applications should not use this method to accumulate the received data; +// the callback method or block supplied to the beginFetch call will have +// the complete NSData received. +@property (assign) SEL receivedDataSelector; + +#if NS_BLOCKS_AVAILABLE +// The full interface to the block is provided rather than just a typedef for +// its parameter list in order to get more useful code completion in the Xcode +// editor +@property (copy) void (^sentDataBlock)(NSInteger bytesSent, NSInteger totalBytesSent, NSInteger bytesExpectedToSend); + +// The dataReceived argument will be nil when downloading to a path or to +// a file handle +@property (copy) void (^receivedDataBlock)(NSData *dataReceivedSoFar); +#endif + +// retrying; see comments at the top of the file. Calling +// setRetryEnabled(YES) resets the min and max retry intervals. +@property (assign, getter=isRetryEnabled) BOOL retryEnabled; + +// Retry selector or block is optional for retries. +// +// If present, it should have the signature: +// -(BOOL)fetcher:(GTMHTTPFetcher *)fetcher willRetry:(BOOL)suggestedWillRetry forError:(NSError *)error +// and return YES to cause a retry. See comments at the top of this file. +@property (assign) SEL retrySelector; + +#if NS_BLOCKS_AVAILABLE +@property (copy) BOOL (^retryBlock)(BOOL suggestedWillRetry, NSError *error); +#endif + +// Retry intervals must be strictly less than maxRetryInterval, else +// they will be limited to maxRetryInterval and no further retries will +// be attempted. Setting maxRetryInterval to 0.0 will reset it to the +// default value, 600 seconds. + +@property (assign) NSTimeInterval maxRetryInterval; + +// Starting retry interval. Setting minRetryInterval to 0.0 will reset it +// to a random value between 1.0 and 2.0 seconds. Clients should normally not +// call this except for unit testing. +@property (assign) NSTimeInterval minRetryInterval; + +// Multiplier used to increase the interval between retries, typically 2.0. +// Clients should not need to call this. +@property (assign) double retryFactor; + +// Number of retries attempted +@property (readonly) NSUInteger retryCount; + +// interval delay to precede next retry +@property (readonly) NSTimeInterval nextRetryInterval; + +// Begin fetching the request +// +// The delegate can optionally implement the finished selectors or pass NULL +// for it. +// +// Returns YES if the fetch is initiated. The delegate is retained between +// the beginFetch call until after the finish callback. +// +// An error is passed to the callback for server statuses 300 or +// higher, with the status stored as the error object's code. +// +// finishedSEL has a signature like: +// - (void)fetcher:(GTMHTTPFetcher *)fetcher finishedWithData:(NSData *)data error:(NSError *)error; +// +// If the application has specified a downloadPath or downloadFileHandle +// for the fetcher, the data parameter passed to the callback will be nil. + +- (BOOL)beginFetchWithDelegate:(id)delegate + didFinishSelector:(SEL)finishedSEL; + +#if NS_BLOCKS_AVAILABLE +- (BOOL)beginFetchWithCompletionHandler:(void (^)(NSData *data, NSError *error))handler; +#endif + + +// Returns YES if this is in the process of fetching a URL +- (BOOL)isFetching; + +// Cancel the fetch of the request that's currently in progress +- (void)stopFetching; + +// Return the status code from the server response +@property (readonly) NSInteger statusCode; + +// Return the http headers from the response +@property (retain, readonly) NSDictionary *responseHeaders; + +// The response, once it's been received +@property (retain) NSURLResponse *response; + +// Bytes downloaded so far +@property (readonly) unsigned long long downloadedLength; + +// Buffer of currently-downloaded data +@property (readonly, retain) NSData *downloadedData; + +// Path in which to non-atomically create a file for storing the downloaded data +// +// The path must be set before fetching begins. The download file handle +// will be created for the path, and can be used to monitor progress. If a file +// already exists at the path, it will be overwritten. +@property (copy) NSString *downloadPath; + +// If downloadFileHandle is set, data received is immediately appended to +// the file handle rather than being accumulated in the downloadedData property +// +// The file handle supplied must allow writing and support seekToFileOffset:, +// and must be set before fetching begins. Setting a download path will +// override the file handle property. +@property (retain) NSFileHandle *downloadFileHandle; + +// The optional fetchHistory object is used for a sequence of fetchers to +// remember ETags, cache ETagged data, and store cookies. Typically, this +// is set by a GTMFetcherService object when it creates a fetcher. +// +// Side effect: setting fetch history implicitly calls setCookieStorageMethod: +@property (retain) id fetchHistory; + +// userData is retained for the convenience of the caller +@property (retain) id userData; + +// Stored property values are retained for the convenience of the caller +@property (copy) NSMutableDictionary *properties; + +- (void)setProperty:(id)obj forKey:(NSString *)key; // pass nil obj to remove property +- (id)propertyForKey:(NSString *)key; + +- (void)addPropertiesFromDictionary:(NSDictionary *)dict; + +// Comments are useful for logging +@property (copy) NSString *comment; + +- (void)setCommentWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1, 2); + +// Log of request and response, if logging is enabled +@property (copy) NSString *log; + +// Callbacks can be invoked on an operation queue rather than via the run loop, +// starting on 10.7 and iOS 6. If a delegate queue is supplied. the run loop +// modes are ignored. +@property (retain) NSOperationQueue *delegateQueue; + +// Using the fetcher while a modal dialog is displayed requires setting the +// run-loop modes to include NSModalPanelRunLoopMode +@property (retain) NSArray *runLoopModes; + +// Users who wish to replace GTMHTTPFetcher's use of NSURLConnection +// can do so globally here. The replacement should be a subclass of +// NSURLConnection. ++ (Class)connectionClass; ++ (void)setConnectionClass:(Class)theClass; + +// Spin the run loop, discarding events, until the fetch has completed +// +// This is only for use in testing or in tools without a user interface. +// +// Synchronous fetches should never be done by shipping apps; they are +// sufficient reason for rejection from the app store. +- (void)waitForCompletionWithTimeout:(NSTimeInterval)timeoutInSeconds; + +#if STRIP_GTM_FETCH_LOGGING +// if logging is stripped, provide a stub for the main method +// for controlling logging ++ (void)setLoggingEnabled:(BOOL)flag; +#endif // STRIP_GTM_FETCH_LOGGING + +@end diff --git a/GTL/Source/HTTPFetcher/GTMHTTPFetcher.m b/GTL/Source/HTTPFetcher/GTMHTTPFetcher.m new file mode 100755 index 0000000..b97024b --- /dev/null +++ b/GTL/Source/HTTPFetcher/GTMHTTPFetcher.m @@ -0,0 +1,1886 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMHTTPFetcher.m +// + +#define GTMHTTPFETCHER_DEFINE_GLOBALS 1 + +#import "GTMHTTPFetcher.h" + +#if GTM_BACKGROUND_FETCHING +#import +#endif + +static id gGTMFetcherStaticCookieStorage = nil; +static Class gGTMFetcherConnectionClass = nil; + +// The default max retry interview is 10 minutes for uploads (POST/PUT/PATCH), +// 1 minute for downloads. +static const NSTimeInterval kUnsetMaxRetryInterval = -1; +static const NSTimeInterval kDefaultMaxDownloadRetryInterval = 60.0; +static const NSTimeInterval kDefaultMaxUploadRetryInterval = 60.0 * 10.; + +// delegateQueue callback parameters +static NSString *const kCallbackData = @"data"; +static NSString *const kCallbackError = @"error"; + +// +// GTMHTTPFetcher +// + +@interface GTMHTTPFetcher () + +@property (copy) NSString *temporaryDownloadPath; +@property (retain) id cookieStorage; +@property (readwrite, retain) NSData *downloadedData; +#if NS_BLOCKS_AVAILABLE +@property (copy) void (^completionBlock)(NSData *, NSError *); +#endif + +- (BOOL)beginFetchMayDelay:(BOOL)mayDelay + mayAuthorize:(BOOL)mayAuthorize; +- (void)failToBeginFetchWithError:(NSError *)error; +- (void)failToBeginFetchDeferWithError:(NSError *)error; + +#if GTM_BACKGROUND_FETCHING +- (void)endBackgroundTask; +- (void)backgroundFetchExpired; +#endif + +- (BOOL)authorizeRequest; +- (void)authorizer:(id )auth + request:(NSMutableURLRequest *)request + finishedWithError:(NSError *)error; + +- (NSString *)createTempDownloadFilePathForPath:(NSString *)targetPath; +- (void)stopFetchReleasingCallbacks:(BOOL)shouldReleaseCallbacks; +- (BOOL)shouldReleaseCallbacksUponCompletion; + +- (void)addCookiesToRequest:(NSMutableURLRequest *)request; +- (void)handleCookiesForResponse:(NSURLResponse *)response; + +- (void)invokeFetchCallbacksWithData:(NSData *)data + error:(NSError *)error; +- (void)invokeFetchCallback:(SEL)sel + target:(id)target + data:(NSData *)data + error:(NSError *)error; +- (void)invokeFetchCallbacksOnDelegateQueueWithData:(NSData *)data + error:(NSError *)error; +- (void)releaseCallbacks; + +- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error; + +- (BOOL)shouldRetryNowForStatus:(NSInteger)status error:(NSError *)error; +- (void)destroyRetryTimer; +- (void)beginRetryTimer; +- (void)primeRetryTimerWithNewTimeInterval:(NSTimeInterval)secs; +- (void)sendStopNotificationIfNeeded; +- (void)retryFetch; +- (void)retryTimerFired:(NSTimer *)timer; +@end + +@interface GTMHTTPFetcher (GTMHTTPFetcherLoggingInternal) +- (void)setupStreamLogging; +- (void)logFetchWithError:(NSError *)error; +@end + +@implementation GTMHTTPFetcher + ++ (GTMHTTPFetcher *)fetcherWithRequest:(NSURLRequest *)request { + return [[[[self class] alloc] initWithRequest:request] autorelease]; +} + ++ (GTMHTTPFetcher *)fetcherWithURL:(NSURL *)requestURL { + return [self fetcherWithRequest:[NSURLRequest requestWithURL:requestURL]]; +} + ++ (GTMHTTPFetcher *)fetcherWithURLString:(NSString *)requestURLString { + return [self fetcherWithURL:[NSURL URLWithString:requestURLString]]; +} + ++ (void)initialize { + // initialize is guaranteed by the runtime to be called in a + // thread-safe manner + if (!gGTMFetcherStaticCookieStorage) { + Class cookieStorageClass = NSClassFromString(@"GTMCookieStorage"); + if (cookieStorageClass) { + gGTMFetcherStaticCookieStorage = [[cookieStorageClass alloc] init]; + } + } +} + +- (id)init { + return [self initWithRequest:nil]; +} + +- (id)initWithRequest:(NSURLRequest *)request { + self = [super init]; + if (self) { + request_ = [request mutableCopy]; + + if (gGTMFetcherStaticCookieStorage != nil) { + // The user has compiled with the cookie storage class available; + // default to static cookie storage, so our cookies are independent + // of the cookies of other apps. + [self setCookieStorageMethod:kGTMHTTPFetcherCookieStorageMethodStatic]; + } else { + // Default to system default cookie storage + [self setCookieStorageMethod:kGTMHTTPFetcherCookieStorageMethodSystemDefault]; + } + } + return self; +} + +- (id)copyWithZone:(NSZone *)zone { + // disallow use of fetchers in a copy property + [self doesNotRecognizeSelector:_cmd]; + return nil; +} + +- (NSString *)description { + return [NSString stringWithFormat:@"%@ %p (%@)", + [self class], self, [self.mutableRequest URL]]; +} + +#if !GTM_IPHONE +- (void)finalize { + [self stopFetchReleasingCallbacks:YES]; // releases connection_, destroys timers + [super finalize]; +} +#endif + +- (void)dealloc { +#if DEBUG + NSAssert(!isStopNotificationNeeded_, + @"unbalanced fetcher notification for %@", [request_ URL]); +#endif + + // Note: if a connection or a retry timer was pending, then this instance + // would be retained by those so it wouldn't be getting dealloc'd, + // hence we don't need to stopFetch here + [request_ release]; + [connection_ release]; + [downloadedData_ release]; + [downloadPath_ release]; + [temporaryDownloadPath_ release]; + [downloadFileHandle_ release]; + [credential_ release]; + [proxyCredential_ release]; + [postData_ release]; + [postStream_ release]; + [loggedStreamData_ release]; + [response_ release]; +#if NS_BLOCKS_AVAILABLE + [completionBlock_ release]; + [receivedDataBlock_ release]; + [sentDataBlock_ release]; + [retryBlock_ release]; +#endif + [userData_ release]; + [properties_ release]; + [delegateQueue_ release]; + [runLoopModes_ release]; + [fetchHistory_ release]; + [cookieStorage_ release]; + [authorizer_ release]; + [service_ release]; + [serviceHost_ release]; + [thread_ release]; + [retryTimer_ release]; + [comment_ release]; + [log_ release]; +#if !STRIP_GTM_FETCH_LOGGING + [logRequestBody_ release]; + [logResponseBody_ release]; +#endif + + [super dealloc]; +} + +#pragma mark - + +// Begin fetching the URL (or begin a retry fetch). The delegate is retained +// for the duration of the fetch connection. + +- (BOOL)beginFetchWithDelegate:(id)delegate + didFinishSelector:(SEL)finishedSelector { + GTMAssertSelectorNilOrImplementedWithArgs(delegate, finishedSelector, @encode(GTMHTTPFetcher *), @encode(NSData *), @encode(NSError *), 0); + GTMAssertSelectorNilOrImplementedWithArgs(delegate, receivedDataSel_, @encode(GTMHTTPFetcher *), @encode(NSData *), 0); + GTMAssertSelectorNilOrImplementedWithArgs(delegate, retrySel_, @encode(GTMHTTPFetcher *), @encode(BOOL), @encode(NSError *), 0); + + // We'll retain the delegate only during the outstanding connection (similar + // to what Cocoa does with performSelectorOnMainThread:) and during + // authorization or delays, since the app would crash + // if the delegate was released before the fetch calls back + [self setDelegate:delegate]; + finishedSel_ = finishedSelector; + + return [self beginFetchMayDelay:YES + mayAuthorize:YES]; +} + +- (BOOL)beginFetchMayDelay:(BOOL)mayDelay + mayAuthorize:(BOOL)mayAuthorize { + // This is the internal entry point for re-starting fetches + NSError *error = nil; + + if (connection_ != nil) { + NSAssert1(connection_ != nil, @"fetch object %@ being reused; this should never happen", self); + goto CannotBeginFetch; + } + + if (request_ == nil || [request_ URL] == nil) { + NSAssert(request_ != nil, @"beginFetchWithDelegate requires a request with a URL"); + goto CannotBeginFetch; + } + + self.downloadedData = nil; + downloadedLength_ = 0; + + if (mayDelay && service_) { + BOOL shouldFetchNow = [service_ fetcherShouldBeginFetching:self]; + if (!shouldFetchNow) { + // the fetch is deferred, but will happen later + return YES; + } + } + + NSString *effectiveHTTPMethod = [request_ valueForHTTPHeaderField:@"X-HTTP-Method-Override"]; + if (effectiveHTTPMethod == nil) { + effectiveHTTPMethod = [request_ HTTPMethod]; + } + BOOL isEffectiveHTTPGet = (effectiveHTTPMethod == nil + || [effectiveHTTPMethod isEqual:@"GET"]); + + if (postData_ || postStream_) { + if (isEffectiveHTTPGet) { + [request_ setHTTPMethod:@"POST"]; + isEffectiveHTTPGet = NO; + } + + if (postData_) { + [request_ setHTTPBody:postData_]; + } else { + if ([self respondsToSelector:@selector(setupStreamLogging)]) { + [self performSelector:@selector(setupStreamLogging)]; + } + + [request_ setHTTPBodyStream:postStream_]; + } + } + + // We authorize after setting up the http method and body in the request + // because OAuth 1 may need to sign the request body + if (mayAuthorize && authorizer_) { + BOOL isAuthorized = [authorizer_ isAuthorizedRequest:request_]; + if (!isAuthorized) { + // authorization needed + return [self authorizeRequest]; + } + } + + [fetchHistory_ updateRequest:request_ isHTTPGet:isEffectiveHTTPGet]; + + // set the default upload or download retry interval, if necessary + if (isRetryEnabled_ + && maxRetryInterval_ <= kUnsetMaxRetryInterval) { + if (isEffectiveHTTPGet || [effectiveHTTPMethod isEqual:@"HEAD"]) { + [self setMaxRetryInterval:kDefaultMaxDownloadRetryInterval]; + } else { + [self setMaxRetryInterval:kDefaultMaxUploadRetryInterval]; + } + } + + [self addCookiesToRequest:request_]; + + if (downloadPath_ != nil) { + // downloading to a path, so create a temporary file and a file handle for + // downloading + NSString *tempPath = [self createTempDownloadFilePathForPath:downloadPath_]; + + BOOL didCreate = [[NSData data] writeToFile:tempPath + options:0 + error:&error]; + if (!didCreate) goto CannotBeginFetch; + + [self setTemporaryDownloadPath:tempPath]; + + NSFileHandle *fh = [NSFileHandle fileHandleForWritingAtPath:tempPath]; + if (fh == nil) goto CannotBeginFetch; + + [self setDownloadFileHandle:fh]; + } + + // finally, start the connection + + Class connectionClass = [[self class] connectionClass]; + + NSOperationQueue *delegateQueue = delegateQueue_; + if (delegateQueue && + ![connectionClass instancesRespondToSelector:@selector(setDelegateQueue:)]) { + // NSURLConnection has no setDelegateQueue: on iOS 4 and Mac OS X 10.5. + delegateQueue = nil; + self.delegateQueue = nil; + } + +#if DEBUG && TARGET_OS_IPHONE + BOOL isPreIOS6 = (NSFoundationVersionNumber <= 890.1); + if (isPreIOS6 && delegateQueue) { + NSLog(@"GTMHTTPFetcher delegateQueue not safe in iOS 5"); + } +#endif + + if ([runLoopModes_ count] == 0 && delegateQueue == nil) { + // No custom callback modes or queue were specified, so start the connection + // on the current run loop in the current mode + connection_ = [[connectionClass connectionWithRequest:request_ + delegate:self] retain]; + } else { + // Specify callbacks be on an operation queue or on the current run loop + // in the specified modes + connection_ = [[connectionClass alloc] initWithRequest:request_ + delegate:self + startImmediately:NO]; + if (delegateQueue) { + [connection_ performSelector:@selector(setDelegateQueue:) + withObject:delegateQueue]; + } else if (runLoopModes_) { + NSRunLoop *rl = [NSRunLoop currentRunLoop]; + for (NSString *mode in runLoopModes_) { + [connection_ scheduleInRunLoop:rl forMode:mode]; + } + } + [connection_ start]; + } + hasConnectionEnded_ = NO; + + if (!connection_) { + NSAssert(connection_ != nil, @"beginFetchWithDelegate could not create a connection"); + goto CannotBeginFetch; + } + + if (downloadFileHandle_ != nil) { + // downloading to a file, so downloadedData_ remains nil + } else { + self.downloadedData = [NSMutableData data]; + } + +#if GTM_BACKGROUND_FETCHING + backgroundTaskIdentifer_ = 0; // UIBackgroundTaskInvalid is 0 on iOS 4 + if (shouldFetchInBackground_) { + // For iOS 3 compatibility, ensure that UIApp supports backgrounding + UIApplication *app = [UIApplication sharedApplication]; + if ([app respondsToSelector:@selector(beginBackgroundTaskWithExpirationHandler:)]) { + // Tell UIApplication that we want to continue even when the app is in the + // background. + NSThread *thread = [NSThread currentThread]; + backgroundTaskIdentifer_ = [app beginBackgroundTaskWithExpirationHandler:^{ + // Callback - this block is always invoked by UIApplication on the main + // thread, but we want to run the user's callbacks on the thread used + // to start the fetch. + [self performSelector:@selector(backgroundFetchExpired) + onThread:thread + withObject:nil + waitUntilDone:YES]; + }]; + } + } +#endif + + // Once connection_ is non-nil we can send the start notification + isStopNotificationNeeded_ = YES; + NSNotificationCenter *defaultNC = [NSNotificationCenter defaultCenter]; + [defaultNC postNotificationName:kGTMHTTPFetcherStartedNotification + object:self]; + return YES; + +CannotBeginFetch: + [self failToBeginFetchDeferWithError:error]; + return NO; +} + +- (void)failToBeginFetchDeferWithError:(NSError *)error { + if (delegateQueue_) { + // Deferring will happen by the callback being invoked on the specified + // queue. + [self failToBeginFetchWithError:error]; + } else { + // No delegate queue has been specified, so put the callback + // on an appropriate run loop. + NSArray *modes = (runLoopModes_ ? runLoopModes_ : + [NSArray arrayWithObject:NSRunLoopCommonModes]); + [self performSelector:@selector(failToBeginFetchWithError:) + onThread:[NSThread currentThread] + withObject:error + waitUntilDone:NO + modes:modes]; + } +} + +- (void)failToBeginFetchWithError:(NSError *)error { + if (error == nil) { + error = [NSError errorWithDomain:kGTMHTTPFetcherErrorDomain + code:kGTMHTTPFetcherErrorDownloadFailed + userInfo:nil]; + } + + [[self retain] autorelease]; // In case the callback releases us + + [self invokeFetchCallbacksOnDelegateQueueWithData:nil + error:error]; + + [self releaseCallbacks]; + + [service_ fetcherDidStop:self]; + + self.authorizer = nil; + + if (temporaryDownloadPath_) { + [[NSFileManager defaultManager] removeItemAtPath:temporaryDownloadPath_ + error:NULL]; + self.temporaryDownloadPath = nil; + } +} + +#if GTM_BACKGROUND_FETCHING +- (void)backgroundFetchExpired { + @synchronized(self) { + // On background expiration, we stop the fetch and invoke the callbacks + NSError *error = [NSError errorWithDomain:kGTMHTTPFetcherErrorDomain + code:kGTMHTTPFetcherErrorBackgroundExpiration + userInfo:nil]; + [self invokeFetchCallbacksOnDelegateQueueWithData:nil + error:error]; + + // Stopping the fetch here will indirectly call endBackgroundTask + [self stopFetchReleasingCallbacks:NO]; + + [self releaseCallbacks]; + self.authorizer = nil; + } +} + +- (void)endBackgroundTask { + // Whenever the connection stops or background execution expires, + // we need to tell UIApplication we're done + if (backgroundTaskIdentifer_) { + // If backgroundTaskIdentifer_ is non-zero, we know we're on iOS 4 + UIApplication *app = [UIApplication sharedApplication]; + [app endBackgroundTask:backgroundTaskIdentifer_]; + + backgroundTaskIdentifer_ = 0; + } +} +#endif // GTM_BACKGROUND_FETCHING + +- (BOOL)authorizeRequest { + id authorizer = self.authorizer; + SEL asyncAuthSel = @selector(authorizeRequest:delegate:didFinishSelector:); + if ([authorizer respondsToSelector:asyncAuthSel]) { + SEL callbackSel = @selector(authorizer:request:finishedWithError:); + [authorizer authorizeRequest:request_ + delegate:self + didFinishSelector:callbackSel]; + return YES; + } else { + NSAssert(authorizer == nil, @"invalid authorizer for fetch"); + + // No authorizing possible, and authorizing happens only after any delay; + // just begin fetching + return [self beginFetchMayDelay:NO + mayAuthorize:NO]; + } +} + +- (void)authorizer:(id )auth + request:(NSMutableURLRequest *)request + finishedWithError:(NSError *)error { + if (error != nil) { + // We can't fetch without authorization + [self failToBeginFetchDeferWithError:error]; + } else { + [self beginFetchMayDelay:NO + mayAuthorize:NO]; + } +} + +#if NS_BLOCKS_AVAILABLE +- (BOOL)beginFetchWithCompletionHandler:(void (^)(NSData *data, NSError *error))handler { + self.completionBlock = handler; + + // The user may have called setDelegate: earlier if they want to use other + // delegate-style callbacks during the fetch; otherwise, the delegate is nil, + // which is fine. + return [self beginFetchWithDelegate:[self delegate] + didFinishSelector:nil]; +} +#endif + +- (NSString *)createTempDownloadFilePathForPath:(NSString *)targetPath { + NSString *tempDir = nil; + +#if (!TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1060)) + // Find an appropriate directory for the download, ideally on the same disk + // as the final target location so the temporary file won't have to be moved + // to a different disk. + // + // Available in SDKs for 10.6 and iOS 4 + // + // Oct 2011: We previously also used URLForDirectory for + // (TARGET_OS_IPHONE && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 40000)) + // but that is returning a non-temporary directory for iOS, unfortunately + + SEL sel = @selector(URLForDirectory:inDomain:appropriateForURL:create:error:); + if ([NSFileManager instancesRespondToSelector:sel]) { + NSError *error = nil; + NSURL *targetURL = [NSURL fileURLWithPath:targetPath]; + NSFileManager *fileMgr = [NSFileManager defaultManager]; + + NSURL *tempDirURL = [fileMgr URLForDirectory:NSItemReplacementDirectory + inDomain:NSUserDomainMask + appropriateForURL:targetURL + create:YES + error:&error]; + tempDir = [tempDirURL path]; + } +#endif + + if (tempDir == nil) { + tempDir = NSTemporaryDirectory(); + } + + static unsigned int counter = 0; + NSString *name = [NSString stringWithFormat:@"gtmhttpfetcher_%u_%u", + ++counter, (unsigned int) arc4random()]; + NSString *result = [tempDir stringByAppendingPathComponent:name]; + return result; +} + +- (void)addCookiesToRequest:(NSMutableURLRequest *)request { + // Get cookies for this URL from our storage array, if + // we have a storage array + if (cookieStorageMethod_ != kGTMHTTPFetcherCookieStorageMethodSystemDefault + && cookieStorageMethod_ != kGTMHTTPFetcherCookieStorageMethodNone) { + + NSArray *cookies = [cookieStorage_ cookiesForURL:[request URL]]; + if ([cookies count] > 0) { + + NSDictionary *headerFields = [NSHTTPCookie requestHeaderFieldsWithCookies:cookies]; + NSString *cookieHeader = [headerFields objectForKey:@"Cookie"]; // key used in header dictionary + if (cookieHeader) { + [request addValue:cookieHeader forHTTPHeaderField:@"Cookie"]; // header name + } + } + } +} + +// Returns YES if this is in the process of fetching a URL, or waiting to +// retry, or waiting for authorization, or waiting to be issued by the +// service object +- (BOOL)isFetching { + if (connection_ != nil || retryTimer_ != nil) return YES; + + BOOL isAuthorizing = [authorizer_ isAuthorizingRequest:request_]; + if (isAuthorizing) return YES; + + BOOL isDelayed = [service_ isDelayingFetcher:self]; + return isDelayed; +} + +// Returns the status code set in connection:didReceiveResponse: +- (NSInteger)statusCode { + + NSInteger statusCode; + + if (response_ != nil + && [response_ respondsToSelector:@selector(statusCode)]) { + + statusCode = [(NSHTTPURLResponse *)response_ statusCode]; + } else { + // Default to zero, in hopes of hinting "Unknown" (we can't be + // sure that things are OK enough to use 200). + statusCode = 0; + } + return statusCode; +} + +- (NSDictionary *)responseHeaders { + if (response_ != nil + && [response_ respondsToSelector:@selector(allHeaderFields)]) { + + NSDictionary *headers = [(NSHTTPURLResponse *)response_ allHeaderFields]; + return headers; + } + return nil; +} + +- (void)releaseCallbacks { + [delegate_ autorelease]; + delegate_ = nil; + + [delegateQueue_ autorelease]; + delegateQueue_ = nil; + +#if NS_BLOCKS_AVAILABLE + self.completionBlock = nil; + self.sentDataBlock = nil; + self.receivedDataBlock = nil; + self.retryBlock = nil; +#endif +} + +// Cancel the fetch of the URL that's currently in progress. +- (void)stopFetchReleasingCallbacks:(BOOL)shouldReleaseCallbacks { + // if the connection or the retry timer is all that's retaining the fetcher, + // we want to be sure this instance survives stopping at least long enough for + // the stack to unwind + [[self retain] autorelease]; + + [self destroyRetryTimer]; + + if (connection_) { + // in case cancelling the connection calls this recursively, we want + // to ensure that we'll only release the connection and delegate once, + // so first set connection_ to nil + NSURLConnection* oldConnection = connection_; + connection_ = nil; + + if (!hasConnectionEnded_) { + [oldConnection cancel]; + } + + // this may be called in a callback from the connection, so use autorelease + [oldConnection autorelease]; + } + + // send the stopped notification + [self sendStopNotificationIfNeeded]; + + [authorizer_ stopAuthorizationForRequest:request_]; + + if (shouldReleaseCallbacks) { + [self releaseCallbacks]; + + self.authorizer = nil; + } + + [service_ fetcherDidStop:self]; + + if (temporaryDownloadPath_) { + [[NSFileManager defaultManager] removeItemAtPath:temporaryDownloadPath_ + error:NULL]; + self.temporaryDownloadPath = nil; + } + +#if GTM_BACKGROUND_FETCHING + [self endBackgroundTask]; +#endif +} + +// External stop method +- (void)stopFetching { + @synchronized(self) { + [self stopFetchReleasingCallbacks:YES]; + } +} + +- (void)sendStopNotificationIfNeeded { + if (isStopNotificationNeeded_) { + isStopNotificationNeeded_ = NO; + + NSNotificationCenter *defaultNC = [NSNotificationCenter defaultCenter]; + [defaultNC postNotificationName:kGTMHTTPFetcherStoppedNotification + object:self]; + } +} + +- (void)retryFetch { + [self stopFetchReleasingCallbacks:NO]; + + [self beginFetchWithDelegate:delegate_ + didFinishSelector:finishedSel_]; +} + +- (void)waitForCompletionWithTimeout:(NSTimeInterval)timeoutInSeconds { + NSDate* giveUpDate = [NSDate dateWithTimeIntervalSinceNow:timeoutInSeconds]; + + // Loop until the callbacks have been called and released, and until + // the connection is no longer pending, or until the timeout has expired + BOOL isMainThread = [NSThread isMainThread]; + + while ((!hasConnectionEnded_ +#if NS_BLOCKS_AVAILABLE + || completionBlock_ != nil +#endif + || delegate_ != nil) + && [giveUpDate timeIntervalSinceNow] > 0) { + + // Run the current run loop 1/1000 of a second to give the networking + // code a chance to work + if (isMainThread || delegateQueue_ == nil) { + NSDate *stopDate = [NSDate dateWithTimeIntervalSinceNow:0.001]; + [[NSRunLoop currentRunLoop] runUntilDate:stopDate]; + } else { + [NSThread sleepForTimeInterval:0.001]; + } + } +} + +#pragma mark NSURLConnection Delegate Methods + +// +// NSURLConnection Delegate Methods +// + +// This method just says "follow all redirects", which _should_ be the default behavior, +// According to file:///Developer/ADC%20Reference%20Library/documentation/Cocoa/Conceptual/URLLoadingSystem +// but the redirects were not being followed until I added this method. May be +// a bug in the NSURLConnection code, or the documentation. +// +// In OS X 10.4.8 and earlier, the redirect request doesn't +// get the original's headers and body. This causes POSTs to fail. +// So we construct a new request, a copy of the original, with overrides from the +// redirect. +// +// Docs say that if redirectResponse is nil, just return the redirectRequest. + +- (NSURLRequest *)connection:(NSURLConnection *)connection + willSendRequest:(NSURLRequest *)redirectRequest + redirectResponse:(NSURLResponse *)redirectResponse { + @synchronized(self) { + if (redirectRequest && redirectResponse) { + // save cookies from the response + [self handleCookiesForResponse:redirectResponse]; + + NSMutableURLRequest *newRequest = [[request_ mutableCopy] autorelease]; + // copy the URL + NSURL *redirectURL = [redirectRequest URL]; + NSURL *url = [newRequest URL]; + + // disallow scheme changes (say, from https to http) + NSString *redirectScheme = [url scheme]; + NSString *newScheme = [redirectURL scheme]; + NSString *newResourceSpecifier = [redirectURL resourceSpecifier]; + + if ([redirectScheme caseInsensitiveCompare:@"http"] == NSOrderedSame + && newScheme != nil + && [newScheme caseInsensitiveCompare:@"https"] == NSOrderedSame) { + + // allow the change from http to https + redirectScheme = newScheme; + } + + NSString *newUrlString = [NSString stringWithFormat:@"%@:%@", + redirectScheme, newResourceSpecifier]; + + NSURL *newURL = [NSURL URLWithString:newUrlString]; + [newRequest setURL:newURL]; + + // any headers in the redirect override headers in the original. + NSDictionary *redirectHeaders = [redirectRequest allHTTPHeaderFields]; + for (NSString *key in redirectHeaders) { + NSString *value = [redirectHeaders objectForKey:key]; + [newRequest setValue:value forHTTPHeaderField:key]; + } + + [self addCookiesToRequest:newRequest]; + + redirectRequest = newRequest; + + // log the response we just received + [self setResponse:redirectResponse]; + [self logNowWithError:nil]; + + // update the request for future logging + NSMutableURLRequest *mutable = [[redirectRequest mutableCopy] autorelease]; + [self setMutableRequest:mutable]; + } + return redirectRequest; + } +} + +- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { + @synchronized(self) { + // This method is called when the server has determined that it + // has enough information to create the NSURLResponse + // it can be called multiple times, for example in the case of a + // redirect, so each time we reset the data. + [downloadedData_ setLength:0]; + [downloadFileHandle_ truncateFileAtOffset:0]; + downloadedLength_ = 0; + + [self setResponse:response]; + + // Save cookies from the response + [self handleCookiesForResponse:response]; + } +} + + +// handleCookiesForResponse: handles storage of cookies for responses passed to +// connection:willSendRequest:redirectResponse: and connection:didReceiveResponse: +- (void)handleCookiesForResponse:(NSURLResponse *)response { + + if (cookieStorageMethod_ == kGTMHTTPFetcherCookieStorageMethodSystemDefault + || cookieStorageMethod_ == kGTMHTTPFetcherCookieStorageMethodNone) { + + // do nothing special for NSURLConnection's default storage mechanism + // or when we're ignoring cookies + + } else if ([response respondsToSelector:@selector(allHeaderFields)]) { + + // grab the cookies from the header as NSHTTPCookies and store them either + // into our static array or into the fetchHistory + + NSDictionary *responseHeaderFields = [(NSHTTPURLResponse *)response allHeaderFields]; + if (responseHeaderFields) { + + NSArray *cookies = [NSHTTPCookie cookiesWithResponseHeaderFields:responseHeaderFields + forURL:[response URL]]; + if ([cookies count] > 0) { + [cookieStorage_ setCookies:cookies]; + } + } + } +} + +-(void)connection:(NSURLConnection *)connection +didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge { + @synchronized(self) { + if ([challenge previousFailureCount] <= 2) { + + NSURLCredential *credential = credential_; + + if ([[challenge protectionSpace] isProxy] && proxyCredential_ != nil) { + credential = proxyCredential_; + } + + // Here, if credential is still nil, then we *could* try to get it from + // NSURLCredentialStorage's defaultCredentialForProtectionSpace:. + // We don't, because we're assuming: + // + // - for server credentials, we only want ones supplied by the program + // calling http fetcher + // - for proxy credentials, if one were necessary and available in the + // keychain, it would've been found automatically by NSURLConnection + // and this challenge delegate method never would've been called + // anyway + + if (credential) { + // try the credential + [[challenge sender] useCredential:credential + forAuthenticationChallenge:challenge]; + return; + } + } + + // If we don't have credentials, or we've already failed auth 3x, + // report the error, putting the challenge as a value in the userInfo + // dictionary. +#if DEBUG + NSAssert(!isCancellingChallenge_, @"isCancellingChallenge_ unexpected"); +#endif + NSDictionary *userInfo = [NSDictionary dictionaryWithObject:challenge + forKey:kGTMHTTPFetcherErrorChallengeKey]; + NSError *error = [NSError errorWithDomain:kGTMHTTPFetcherErrorDomain + code:kGTMHTTPFetcherErrorAuthenticationChallengeFailed + userInfo:userInfo]; + + // cancelAuthenticationChallenge seems to indirectly call + // connection:didFailWithError: now, though that isn't documented + // + // We'll use an ivar to make the indirect invocation of the + // delegate method do nothing. + isCancellingChallenge_ = YES; + [[challenge sender] cancelAuthenticationChallenge:challenge]; + isCancellingChallenge_ = NO; + + [self connection:connection didFailWithError:error]; + } +} + +- (void)invokeFetchCallbacksWithData:(NSData *)data + error:(NSError *)error { + [[self retain] autorelease]; // In case the callback releases us + + [self invokeFetchCallback:finishedSel_ + target:delegate_ + data:data + error:error]; + +#if NS_BLOCKS_AVAILABLE + if (completionBlock_) { + completionBlock_(data, error); + } +#endif +} + +- (void)invokeFetchCallback:(SEL)sel + target:(id)target + data:(NSData *)data + error:(NSError *)error { + // This method is available to subclasses which may provide a customized + // target pointer. + if (target && sel) { + NSMethodSignature *sig = [target methodSignatureForSelector:sel]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; + [invocation setSelector:sel]; + [invocation setTarget:target]; + [invocation setArgument:&self atIndex:2]; + [invocation setArgument:&data atIndex:3]; + [invocation setArgument:&error atIndex:4]; + [invocation invoke]; + } +} + +- (void)invokeFetchCallbacksOnDelegateQueueWithData:(NSData *)data + error:(NSError *)error { + // This is called by methods that are not already on the delegateQueue + // (as NSURLConnection callbacks should already be, but other failures + // are not.) + if (!delegateQueue_) { + [self invokeFetchCallbacksWithData:data error:error]; + } + + // Values may be nil. + NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithCapacity:2]; + [dict setValue:data forKey:kCallbackData]; + [dict setValue:error forKey:kCallbackError]; + NSInvocationOperation *op = + [[[NSInvocationOperation alloc] initWithTarget:self + selector:@selector(invokeOnQueueWithDictionary:) + object:dict] autorelease]; + [delegateQueue_ addOperation:op]; +} + +- (void)invokeOnQueueWithDictionary:(NSDictionary *)dict { + NSData *data = [dict objectForKey:kCallbackData]; + NSError *error = [dict objectForKey:kCallbackError]; + + [self invokeFetchCallbacksWithData:data error:error]; +} + + +- (void)invokeSentDataCallback:(SEL)sel + target:(id)target + didSendBodyData:(NSInteger)bytesWritten + totalBytesWritten:(NSInteger)totalBytesWritten + totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite { + if (target && sel) { + NSMethodSignature *sig = [target methodSignatureForSelector:sel]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; + [invocation setSelector:sel]; + [invocation setTarget:target]; + [invocation setArgument:&self atIndex:2]; + [invocation setArgument:&bytesWritten atIndex:3]; + [invocation setArgument:&totalBytesWritten atIndex:4]; + [invocation setArgument:&totalBytesExpectedToWrite atIndex:5]; + [invocation invoke]; + } +} + +- (BOOL)invokeRetryCallback:(SEL)sel + target:(id)target + willRetry:(BOOL)willRetry + error:(NSError *)error { + if (target && sel) { + NSMethodSignature *sig = [target methodSignatureForSelector:sel]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; + [invocation setSelector:sel]; + [invocation setTarget:target]; + [invocation setArgument:&self atIndex:2]; + [invocation setArgument:&willRetry atIndex:3]; + [invocation setArgument:&error atIndex:4]; + [invocation invoke]; + + [invocation getReturnValue:&willRetry]; + } + return willRetry; +} + +- (void)connection:(NSURLConnection *)connection + didSendBodyData:(NSInteger)bytesWritten + totalBytesWritten:(NSInteger)totalBytesWritten +totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite { + @synchronized(self) { + SEL sel = [self sentDataSelector]; + [self invokeSentDataCallback:sel + target:delegate_ + didSendBodyData:bytesWritten + totalBytesWritten:totalBytesWritten + totalBytesExpectedToWrite:totalBytesExpectedToWrite]; + +#if NS_BLOCKS_AVAILABLE + if (sentDataBlock_) { + sentDataBlock_(bytesWritten, totalBytesWritten, totalBytesExpectedToWrite); + } +#endif + } +} + +- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { + @synchronized(self) { +#if DEBUG + // The download file handle should be set before the fetch is started, not + // after + NSAssert((downloadFileHandle_ == nil) != (downloadedData_ == nil), + @"received data accumulates as NSData or NSFileHandle, not both"); +#endif + + if (downloadFileHandle_ != nil) { + // Append to file + @try { + [downloadFileHandle_ writeData:data]; + + downloadedLength_ = [downloadFileHandle_ offsetInFile]; + } + @catch (NSException *exc) { + // Couldn't write to file, probably due to a full disk + NSDictionary *userInfo = [NSDictionary dictionaryWithObject:[exc reason] + forKey:NSLocalizedDescriptionKey]; + NSError *error = [NSError errorWithDomain:kGTMHTTPFetcherStatusDomain + code:kGTMHTTPFetcherErrorFileHandleException + userInfo:userInfo]; + [self connection:connection didFailWithError:error]; + return; + } + } else { + // append to mutable data + [downloadedData_ appendData:data]; + + downloadedLength_ = [downloadedData_ length]; + } + + if (receivedDataSel_) { + [delegate_ performSelector:receivedDataSel_ + withObject:self + withObject:downloadedData_]; + } + +#if NS_BLOCKS_AVAILABLE + if (receivedDataBlock_) { + receivedDataBlock_(downloadedData_); + } +#endif + } +} + +// For error 304's ("Not Modified") where we've cached the data, return +// status 200 ("OK") to the caller (but leave the fetcher status as 304) +// and copy the cached data. +// +// For other errors or if there's no cached data, just return the actual status. +- (NSData *)cachedDataForStatus { + if ([self statusCode] == kGTMHTTPFetcherStatusNotModified + && [fetchHistory_ shouldCacheETaggedData]) { + NSData *cachedData = [fetchHistory_ cachedDataForRequest:request_]; + return cachedData; + } + return nil; +} + +- (NSInteger)statusAfterHandlingNotModifiedError { + NSInteger status = [self statusCode]; + NSData *cachedData = [self cachedDataForStatus]; + if (cachedData) { + // Forge the status to pass on to the delegate + status = 200; + + // Copy our stored data + if (downloadFileHandle_ != nil) { + @try { + // Downloading to a file handle won't save to the cache (the data is + // likely inappropriately large for caching), but will still read from + // the cache, on the unlikely chance that the response was Not Modified + // and the URL response was indeed present in the cache. + [downloadFileHandle_ truncateFileAtOffset:0]; + [downloadFileHandle_ writeData:cachedData]; + downloadedLength_ = [downloadFileHandle_ offsetInFile]; + } + @catch (NSException *) { + // Failed to write data, likely due to lack of disk space + status = kGTMHTTPFetcherErrorFileHandleException; + } + } else { + [downloadedData_ setData:cachedData]; + downloadedLength_ = [cachedData length]; + } + } + return status; +} + +- (void)connectionDidFinishLoading:(NSURLConnection *)connection { + @synchronized(self) { + // We no longer need to cancel the connection + hasConnectionEnded_ = YES; + + // Skip caching ETagged results when the data is being saved to a file + if (downloadFileHandle_ == nil) { + [fetchHistory_ updateFetchHistoryWithRequest:request_ + response:response_ + downloadedData:downloadedData_]; + } else { + [fetchHistory_ removeCachedDataForRequest:request_]; + } + + [[self retain] autorelease]; // in case the callback releases us + + BOOL hasLogged = NO; + NSInteger status = [self statusCode]; + if ([self cachedDataForStatus] != nil) { + // Log the pre-cache response. + [self logNowWithError:nil]; + hasLogged = YES; + status = [self statusAfterHandlingNotModifiedError]; + } + + // We want to send the stop notification before calling the delegate's + // callback selector, since the callback selector may release all of + // the fetcher properties that the client is using to track the fetches. + // + // We'll also stop now so that, to any observers watching the notifications, + // it doesn't look like our wait for a retry (which may be long, + // 30 seconds or more) is part of the network activity. + [self sendStopNotificationIfNeeded]; + + BOOL shouldStopFetching = YES; + NSError *error = nil; + + if (status >= 0 && status < 300) { + // success + if (downloadPath_) { + // Avoid deleting the downloaded file when the fetch stops + [downloadFileHandle_ closeFile]; + self.downloadFileHandle = nil; + + NSFileManager *fileMgr = [NSFileManager defaultManager]; + [fileMgr removeItemAtPath:downloadPath_ + error:NULL]; + + if ([fileMgr moveItemAtPath:temporaryDownloadPath_ + toPath:downloadPath_ + error:&error]) { + self.temporaryDownloadPath = nil; + } + } + } else { + // unsuccessful + if (!hasLogged) { + [self logNowWithError:nil]; + hasLogged = YES; + } + // Status over 300; retry or notify the delegate of failure + if ([self shouldRetryNowForStatus:status error:nil]) { + // retrying + [self beginRetryTimer]; + shouldStopFetching = NO; + } else { + NSDictionary *userInfo = nil; + if ([downloadedData_ length] > 0) { + userInfo = [NSDictionary dictionaryWithObject:downloadedData_ + forKey:kGTMHTTPFetcherStatusDataKey]; + } + error = [NSError errorWithDomain:kGTMHTTPFetcherStatusDomain + code:status + userInfo:userInfo]; + } + } + + if (shouldStopFetching) { + // Call the callbacks + [self invokeFetchCallbacksWithData:downloadedData_ + error:error]; + BOOL shouldRelease = [self shouldReleaseCallbacksUponCompletion]; + [self stopFetchReleasingCallbacks:shouldRelease]; + } + + BOOL shouldLogNow = !hasLogged; +#if !STRIP_GTM_FETCH_LOGGING + if (shouldDeferResponseBodyLogging_) shouldLogNow = NO; +#endif + if (shouldLogNow) { + [self logNowWithError:nil]; + } + } +} + +- (BOOL)shouldReleaseCallbacksUponCompletion { + // A subclass can override this to keep callbacks around after the + // connection has finished successfully + return YES; +} + +- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { + @synchronized(self) { + // Prevent the failure callback from being called twice, since the stopFetch + // call below (either the explicit one at the end of this method, or the + // implicit one when the retry occurs) will release the delegate. + if (connection_ == nil) return; + + // If this method was invoked indirectly by cancellation of an authentication + // challenge, defer this until it is called again with the proper error object + if (isCancellingChallenge_) return; + + // We no longer need to cancel the connection + hasConnectionEnded_ = YES; + + [self logNowWithError:error]; + + // See comment about sendStopNotificationIfNeeded + // in connectionDidFinishLoading: + [self sendStopNotificationIfNeeded]; + + if ([self shouldRetryNowForStatus:0 error:error]) { + + [self beginRetryTimer]; + + } else { + + [[self retain] autorelease]; // in case the callback releases us + + [self invokeFetchCallbacksWithData:nil + error:error]; + + [self stopFetchReleasingCallbacks:YES]; + } + } +} + +- (void)logNowWithError:(NSError *)error { + // If the logging category is available, then log the current request, + // response, data, and error + if ([self respondsToSelector:@selector(logFetchWithError:)]) { + [self performSelector:@selector(logFetchWithError:) withObject:error]; + } +} + +#pragma mark Retries + +- (BOOL)isRetryError:(NSError *)error { + + struct retryRecord { + NSString *const domain; + int code; + }; + + struct retryRecord retries[] = { + { kGTMHTTPFetcherStatusDomain, 408 }, // request timeout + { kGTMHTTPFetcherStatusDomain, 503 }, // service unavailable + { kGTMHTTPFetcherStatusDomain, 504 }, // request timeout + { NSURLErrorDomain, NSURLErrorTimedOut }, + { NSURLErrorDomain, NSURLErrorNetworkConnectionLost }, + { nil, 0 } + }; + + // NSError's isEqual always returns false for equal but distinct instances + // of NSError, so we have to compare the domain and code values explicitly + + for (int idx = 0; retries[idx].domain != nil; idx++) { + + if ([[error domain] isEqual:retries[idx].domain] + && [error code] == retries[idx].code) { + + return YES; + } + } + return NO; +} + + +// shouldRetryNowForStatus:error: returns YES if the user has enabled retries +// and the status or error is one that is suitable for retrying. "Suitable" +// means either the isRetryError:'s list contains the status or error, or the +// user's retrySelector: is present and returns YES when called, or the +// authorizer may be able to fix. +- (BOOL)shouldRetryNowForStatus:(NSInteger)status + error:(NSError *)error { + // Determine if a refreshed authorizer may avoid an authorization error + BOOL shouldRetryForAuthRefresh = NO; + BOOL isFirstAuthError = (authorizer_ != nil) + && !hasAttemptedAuthRefresh_ + && (status == kGTMHTTPFetcherStatusUnauthorized); // 401 + + if (isFirstAuthError) { + if ([authorizer_ respondsToSelector:@selector(primeForRefresh)]) { + BOOL hasPrimed = [authorizer_ primeForRefresh]; + if (hasPrimed) { + shouldRetryForAuthRefresh = YES; + hasAttemptedAuthRefresh_ = YES; + [request_ setValue:nil forHTTPHeaderField:@"Authorization"]; + } + } + } + + // Determine if we're doing exponential backoff retries + BOOL shouldDoIntervalRetry = [self isRetryEnabled] + && ([self nextRetryInterval] < [self maxRetryInterval]); + + BOOL willRetry = NO; + BOOL canRetry = shouldRetryForAuthRefresh || shouldDoIntervalRetry; + if (canRetry) { + // Check if this is a retryable error + if (error == nil) { + // Make an error for the status + NSDictionary *userInfo = nil; + if ([downloadedData_ length] > 0) { + userInfo = [NSDictionary dictionaryWithObject:downloadedData_ + forKey:kGTMHTTPFetcherStatusDataKey]; + } + error = [NSError errorWithDomain:kGTMHTTPFetcherStatusDomain + code:status + userInfo:userInfo]; + } + + willRetry = shouldRetryForAuthRefresh || [self isRetryError:error]; + + // If the user has installed a retry callback, consult that + willRetry = [self invokeRetryCallback:retrySel_ + target:delegate_ + willRetry:willRetry + error:error]; +#if NS_BLOCKS_AVAILABLE + if (retryBlock_) { + willRetry = retryBlock_(willRetry, error); + } +#endif + } + return willRetry; +} + +- (void)beginRetryTimer { + @synchronized(self) { + if (delegateQueue_ != nil && ![NSThread isMainThread]) { + // A delegate queue is set, so the thread we're running on may not + // have a run loop. We'll defer creating and starting the timer + // until we're on the main thread to ensure it has a run loop. + // (If we weren't supporting 10.5, we could use dispatch_after instead + // of an NSTimer.) + [self performSelectorOnMainThread:_cmd + withObject:nil + waitUntilDone:NO]; + return; + } + + NSTimeInterval nextInterval = [self nextRetryInterval]; + NSTimeInterval maxInterval = [self maxRetryInterval]; + + NSTimeInterval newInterval = MIN(nextInterval, maxInterval); + + [self primeRetryTimerWithNewTimeInterval:newInterval]; + } +} + +- (void)primeRetryTimerWithNewTimeInterval:(NSTimeInterval)secs { + + [self destroyRetryTimer]; + + lastRetryInterval_ = secs; + + retryTimer_ = [NSTimer timerWithTimeInterval:secs + target:self + selector:@selector(retryTimerFired:) + userInfo:nil + repeats:NO]; + [retryTimer_ retain]; + + NSRunLoop *timerRL = (self.delegateQueue ? + [NSRunLoop mainRunLoop] : [NSRunLoop currentRunLoop]); + [timerRL addTimer:retryTimer_ + forMode:NSDefaultRunLoopMode]; + + NSNotificationCenter *defaultNC = [NSNotificationCenter defaultCenter]; + [defaultNC postNotificationName:kGTMHTTPFetcherRetryDelayStartedNotification + object:self]; +} + +- (void)retryTimerFired:(NSTimer *)timer { + @synchronized(self) { + [self destroyRetryTimer]; + + retryCount_++; + + [self retryFetch]; + } +} + +- (void)destroyRetryTimer { + if (retryTimer_) { + [retryTimer_ invalidate]; + [retryTimer_ autorelease]; + retryTimer_ = nil; + + NSNotificationCenter *defaultNC = [NSNotificationCenter defaultCenter]; + [defaultNC postNotificationName:kGTMHTTPFetcherRetryDelayStoppedNotification + object:self]; + } +} + +- (NSUInteger)retryCount { + return retryCount_; +} + +- (NSTimeInterval)nextRetryInterval { + // The next wait interval is the factor (2.0) times the last interval, + // but never less than the minimum interval. + NSTimeInterval secs = lastRetryInterval_ * retryFactor_; + secs = MIN(secs, maxRetryInterval_); + secs = MAX(secs, minRetryInterval_); + + return secs; +} + +- (BOOL)isRetryEnabled { + return isRetryEnabled_; +} + +- (void)setRetryEnabled:(BOOL)flag { + + if (flag && !isRetryEnabled_) { + // We defer initializing these until the user calls setRetryEnabled + // to avoid using the random number generator if it's not needed. + // However, this means min and max intervals for this fetcher are reset + // as a side effect of calling setRetryEnabled. + // + // Make an initial retry interval random between 1.0 and 2.0 seconds + [self setMinRetryInterval:0.0]; + [self setMaxRetryInterval:kUnsetMaxRetryInterval]; + [self setRetryFactor:2.0]; + lastRetryInterval_ = 0.0; + } + isRetryEnabled_ = flag; +}; + +- (NSTimeInterval)maxRetryInterval { + return maxRetryInterval_; +} + +- (void)setMaxRetryInterval:(NSTimeInterval)secs { + if (secs > 0) { + maxRetryInterval_ = secs; + } else { + maxRetryInterval_ = kUnsetMaxRetryInterval; + } +} + +- (double)minRetryInterval { + return minRetryInterval_; +} + +- (void)setMinRetryInterval:(NSTimeInterval)secs { + if (secs > 0) { + minRetryInterval_ = secs; + } else { + // Set min interval to a random value between 1.0 and 2.0 seconds + // so that if multiple clients start retrying at the same time, they'll + // repeat at different times and avoid overloading the server + minRetryInterval_ = 1.0 + ((double)(arc4random() & 0x0FFFF) / (double) 0x0FFFF); + } +} + +#pragma mark Getters and Setters + +@dynamic cookieStorageMethod, + retryEnabled, + maxRetryInterval, + minRetryInterval, + retryCount, + nextRetryInterval, + statusCode, + responseHeaders, + fetchHistory, + userData, + properties; + +@synthesize mutableRequest = request_, + credential = credential_, + proxyCredential = proxyCredential_, + postData = postData_, + postStream = postStream_, + delegate = delegate_, + authorizer = authorizer_, + service = service_, + serviceHost = serviceHost_, + servicePriority = servicePriority_, + thread = thread_, + sentDataSelector = sentDataSel_, + receivedDataSelector = receivedDataSel_, + retrySelector = retrySel_, + retryFactor = retryFactor_, + response = response_, + downloadedLength = downloadedLength_, + downloadedData = downloadedData_, + downloadPath = downloadPath_, + temporaryDownloadPath = temporaryDownloadPath_, + downloadFileHandle = downloadFileHandle_, + delegateQueue = delegateQueue_, + runLoopModes = runLoopModes_, + comment = comment_, + log = log_, + cookieStorage = cookieStorage_; + +#if NS_BLOCKS_AVAILABLE +@synthesize completionBlock = completionBlock_, + sentDataBlock = sentDataBlock_, + receivedDataBlock = receivedDataBlock_, + retryBlock = retryBlock_; +#endif + +@synthesize shouldFetchInBackground = shouldFetchInBackground_; + +- (NSInteger)cookieStorageMethod { + return cookieStorageMethod_; +} + +- (void)setCookieStorageMethod:(NSInteger)method { + + cookieStorageMethod_ = method; + + if (method == kGTMHTTPFetcherCookieStorageMethodSystemDefault) { + // System default + [request_ setHTTPShouldHandleCookies:YES]; + + // No need for a cookie storage object + self.cookieStorage = nil; + + } else { + // Not system default + [request_ setHTTPShouldHandleCookies:NO]; + + if (method == kGTMHTTPFetcherCookieStorageMethodStatic) { + // Store cookies in the static array + NSAssert(gGTMFetcherStaticCookieStorage != nil, + @"cookie storage requires GTMHTTPFetchHistory"); + + self.cookieStorage = gGTMFetcherStaticCookieStorage; + } else if (method == kGTMHTTPFetcherCookieStorageMethodFetchHistory) { + // store cookies in the fetch history + self.cookieStorage = [fetchHistory_ cookieStorage]; + } else { + // kGTMHTTPFetcherCookieStorageMethodNone - ignore cookies + self.cookieStorage = nil; + } + } +} + ++ (id )staticCookieStorage { + return gGTMFetcherStaticCookieStorage; +} + ++ (BOOL)doesSupportSentDataCallback { +#if GTM_IPHONE + // NSURLConnection's didSendBodyData: delegate support appears to be + // available starting in iPhone OS 3.0 + return (NSFoundationVersionNumber >= 678.47); +#else + // Per WebKit's MaxFoundationVersionWithoutdidSendBodyDataDelegate + // + // Indicates if NSURLConnection will invoke the didSendBodyData: delegate + // method + return (NSFoundationVersionNumber > 677.21); +#endif +} + +- (id )fetchHistory { + return fetchHistory_; +} + +- (void)setFetchHistory:(id )fetchHistory { + [fetchHistory_ autorelease]; + fetchHistory_ = [fetchHistory retain]; + + if (fetchHistory_ != nil) { + // set the fetch history's cookie array to be the cookie store + [self setCookieStorageMethod:kGTMHTTPFetcherCookieStorageMethodFetchHistory]; + + } else { + // The fetch history was removed + if (cookieStorageMethod_ == kGTMHTTPFetcherCookieStorageMethodFetchHistory) { + // Fall back to static storage + [self setCookieStorageMethod:kGTMHTTPFetcherCookieStorageMethodStatic]; + } + } +} + +- (id)userData { + @synchronized(self) { + return userData_; + } +} + +- (void)setUserData:(id)theObj { + @synchronized(self) { + [userData_ autorelease]; + userData_ = [theObj retain]; + } +} + +- (void)setProperties:(NSMutableDictionary *)dict { + @synchronized(self) { + [properties_ autorelease]; + + // This copies rather than retains the parameter for compatiblity with + // an earlier version that took an immutable parameter and copied it. + properties_ = [dict mutableCopy]; + } +} + +- (NSMutableDictionary *)properties { + @synchronized(self) { + return properties_; + } +} + +- (void)setProperty:(id)obj forKey:(NSString *)key { + @synchronized(self) { + if (properties_ == nil && obj != nil) { + [self setProperties:[NSMutableDictionary dictionary]]; + } + [properties_ setValue:obj forKey:key]; + } +} + +- (id)propertyForKey:(NSString *)key { + @synchronized(self) { + return [properties_ objectForKey:key]; + } +} + +- (void)addPropertiesFromDictionary:(NSDictionary *)dict { + @synchronized(self) { + if (properties_ == nil && dict != nil) { + [self setProperties:[[dict mutableCopy] autorelease]]; + } else { + [properties_ addEntriesFromDictionary:dict]; + } + } +} + +- (void)setCommentWithFormat:(id)format, ... { +#if !STRIP_GTM_FETCH_LOGGING + NSString *result = format; + if (format) { + va_list argList; + va_start(argList, format); + + result = [[[NSString alloc] initWithFormat:format + arguments:argList] autorelease]; + va_end(argList); + } + [self setComment:result]; +#endif +} + ++ (Class)connectionClass { + if (gGTMFetcherConnectionClass == nil) { + gGTMFetcherConnectionClass = [NSURLConnection class]; + } + return gGTMFetcherConnectionClass; +} + ++ (void)setConnectionClass:(Class)theClass { + gGTMFetcherConnectionClass = theClass; +} + +#if STRIP_GTM_FETCH_LOGGING ++ (void)setLoggingEnabled:(BOOL)flag { +} +#endif // STRIP_GTM_FETCH_LOGGING + +@end + +void GTMAssertSelectorNilOrImplementedWithArgs(id obj, SEL sel, ...) { + + // Verify that the object's selector is implemented with the proper + // number and type of arguments +#if DEBUG + va_list argList; + va_start(argList, sel); + + if (obj && sel) { + // Check that the selector is implemented + if (![obj respondsToSelector:sel]) { + NSLog(@"\"%@\" selector \"%@\" is unimplemented or misnamed", + NSStringFromClass([obj class]), + NSStringFromSelector(sel)); + NSCAssert(0, @"callback selector unimplemented or misnamed"); + } else { + const char *expectedArgType; + unsigned int argCount = 2; // skip self and _cmd + NSMethodSignature *sig = [obj methodSignatureForSelector:sel]; + + // Check that each expected argument is present and of the correct type + while ((expectedArgType = va_arg(argList, const char*)) != 0) { + + if ([sig numberOfArguments] > argCount) { + const char *foundArgType = [sig getArgumentTypeAtIndex:argCount]; + + if(0 != strncmp(foundArgType, expectedArgType, strlen(expectedArgType))) { + NSLog(@"\"%@\" selector \"%@\" argument %d should be type %s", + NSStringFromClass([obj class]), + NSStringFromSelector(sel), (argCount - 2), expectedArgType); + NSCAssert(0, @"callback selector argument type mistake"); + } + } + argCount++; + } + + // Check that the proper number of arguments are present in the selector + if (argCount != [sig numberOfArguments]) { + NSLog( @"\"%@\" selector \"%@\" should have %d arguments", + NSStringFromClass([obj class]), + NSStringFromSelector(sel), (argCount - 2)); + NSCAssert(0, @"callback selector arguments incorrect"); + } + } + } + + va_end(argList); +#endif +} + +NSString *GTMCleanedUserAgentString(NSString *str) { + // Reference http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html + // and http://www-archive.mozilla.org/build/user-agent-strings.html + + if (str == nil) return nil; + + NSMutableString *result = [NSMutableString stringWithString:str]; + + // Replace spaces with underscores + [result replaceOccurrencesOfString:@" " + withString:@"_" + options:0 + range:NSMakeRange(0, [result length])]; + + // Delete http token separators and remaining whitespace + static NSCharacterSet *charsToDelete = nil; + if (charsToDelete == nil) { + // Make a set of unwanted characters + NSString *const kSeparators = @"()<>@,;:\\\"/[]?={}"; + + NSMutableCharacterSet *mutableChars; + mutableChars = [[[NSCharacterSet whitespaceAndNewlineCharacterSet] mutableCopy] autorelease]; + [mutableChars addCharactersInString:kSeparators]; + charsToDelete = [mutableChars copy]; // hang on to an immutable copy + } + + while (1) { + NSRange separatorRange = [result rangeOfCharacterFromSet:charsToDelete]; + if (separatorRange.location == NSNotFound) break; + + [result deleteCharactersInRange:separatorRange]; + }; + + return result; +} + +NSString *GTMSystemVersionString(void) { + NSString *systemString = @""; + +#if TARGET_OS_MAC && !TARGET_OS_IPHONE + // Mac build + static NSString *savedSystemString = nil; + if (savedSystemString == nil) { + // With Gestalt inexplicably deprecated in 10.8, we're reduced to reading + // the system plist file. + NSString *const kPath = @"/System/Library/CoreServices/SystemVersion.plist"; + NSDictionary *plist = [NSDictionary dictionaryWithContentsOfFile:kPath]; + NSString *versString = [plist objectForKey:@"ProductVersion"]; + if ([versString length] == 0) { + versString = @"10.?.?"; + } + savedSystemString = [[NSString alloc] initWithFormat:@"MacOSX/%@", versString]; + } + systemString = savedSystemString; +#elif TARGET_OS_IPHONE + // Compiling against the iPhone SDK + + static NSString *savedSystemString = nil; + if (savedSystemString == nil) { + // Avoid the slowness of calling currentDevice repeatedly on the iPhone + UIDevice* currentDevice = [UIDevice currentDevice]; + + NSString *rawModel = [currentDevice model]; + NSString *model = GTMCleanedUserAgentString(rawModel); + + NSString *systemVersion = [currentDevice systemVersion]; + + savedSystemString = [[NSString alloc] initWithFormat:@"%@/%@", + model, systemVersion]; // "iPod_Touch/2.2" + } + systemString = savedSystemString; + +#elif (GTL_IPHONE || GDATA_IPHONE) + // Compiling iOS libraries against the Mac SDK + systemString = @"iPhone/x.x"; + +#elif defined(_SYS_UTSNAME_H) + // Foundation-only build + struct utsname unameRecord; + uname(&unameRecord); + + systemString = [NSString stringWithFormat:@"%s/%s", + unameRecord.sysname, unameRecord.release]; // "Darwin/8.11.1" +#endif + + return systemString; +} + +// Return a generic name and version for the current application; this avoids +// anonymous server transactions. +NSString *GTMApplicationIdentifier(NSBundle *bundle) { + static NSString *sAppID = nil; + if (sAppID != nil) return sAppID; + + // If there's a bundle ID, use that; otherwise, use the process name + if (bundle == nil) { + bundle = [NSBundle mainBundle]; + } + + NSString *identifier; + NSString *bundleID = [bundle bundleIdentifier]; + if ([bundleID length] > 0) { + identifier = bundleID; + } else { + // Fall back on the procname, prefixed by "proc" to flag that it's + // autogenerated and perhaps unreliable + NSString *procName = [[NSProcessInfo processInfo] processName]; + identifier = [NSString stringWithFormat:@"proc_%@", procName]; + } + + // Clean up whitespace and special characters + identifier = GTMCleanedUserAgentString(identifier); + + // If there's a version number, append that + NSString *version = [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; + if ([version length] == 0) { + version = [bundle objectForInfoDictionaryKey:@"CFBundleVersion"]; + } + + // Clean up whitespace and special characters + version = GTMCleanedUserAgentString(version); + + // Glue the two together (cleanup done above or else cleanup would strip the + // slash) + if ([version length] > 0) { + identifier = [identifier stringByAppendingFormat:@"/%@", version]; + } + + sAppID = [identifier copy]; + return sAppID; +} diff --git a/GTL/Source/HTTPFetcher/GTMHTTPFetcher.xcodeproj/.svn/all-wcprops b/GTL/Source/HTTPFetcher/GTMHTTPFetcher.xcodeproj/.svn/all-wcprops new file mode 100644 index 0000000..f13d9bc --- /dev/null +++ b/GTL/Source/HTTPFetcher/GTMHTTPFetcher.xcodeproj/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 54 +/svn/!svn/ver/88/trunk/Source/GTMHTTPFetcher.xcodeproj +END +project.pbxproj +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/88/trunk/Source/GTMHTTPFetcher.xcodeproj/project.pbxproj +END diff --git a/GTL/Source/HTTPFetcher/GTMHTTPFetcher.xcodeproj/.svn/entries b/GTL/Source/HTTPFetcher/GTMHTTPFetcher.xcodeproj/.svn/entries new file mode 100644 index 0000000..c51912b --- /dev/null +++ b/GTL/Source/HTTPFetcher/GTMHTTPFetcher.xcodeproj/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +111 +http://gtm-http-fetcher.googlecode.com/svn/trunk/Source/GTMHTTPFetcher.xcodeproj +http://gtm-http-fetcher.googlecode.com/svn + + + +2011-11-18T05:23:44.304347Z +88 +gregrobbins + + + + + + + + + + + + + + +b3aa69f0-f65c-a609-0a27-78855af037c1 + +project.pbxproj +file + + + + +2012-12-09T08:42:38.000000Z +c0de2caf91717b47bd3d888f2ea9cb79 +2011-11-18T05:23:44.304347Z +88 +gregrobbins + + + + + + + + + + + + + + + + + + + + + +23892 + diff --git a/GTL/Source/HTTPFetcher/GTMHTTPFetcher.xcodeproj/.svn/text-base/project.pbxproj.svn-base b/GTL/Source/HTTPFetcher/GTMHTTPFetcher.xcodeproj/.svn/text-base/project.pbxproj.svn-base new file mode 100644 index 0000000..a38b8bc --- /dev/null +++ b/GTL/Source/HTTPFetcher/GTMHTTPFetcher.xcodeproj/.svn/text-base/project.pbxproj.svn-base @@ -0,0 +1,458 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4F2FCAC41267882800A74543 /* GTMHTTPFetcherUtilityTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F2FCAC31267882800A74543 /* GTMHTTPFetcherUtilityTest.m */; }; + 4F3471FB11DD58D700CB050E /* GTMGatherInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3471F211DD58D700CB050E /* GTMGatherInputStream.m */; }; + 4F3471FC11DD58D700CB050E /* GTMHTTPFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3471F411DD58D700CB050E /* GTMHTTPFetcher.m */; }; + 4F3471FD11DD58D700CB050E /* GTMHTTPFetcherLogging.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3471F611DD58D700CB050E /* GTMHTTPFetcherLogging.m */; }; + 4F3471FE11DD58D700CB050E /* GTMHTTPUploadFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3471F811DD58D700CB050E /* GTMHTTPUploadFetcher.m */; }; + 4F3471FF11DD58D700CB050E /* GTMMIMEDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3471FA11DD58D700CB050E /* GTMMIMEDocument.m */; }; + 4F74D93811E68BFB00F2D927 /* GTMHTTPFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3471F411DD58D700CB050E /* GTMHTTPFetcher.m */; }; + 4F74D93A11E68BFB00F2D927 /* GTMHTTPFetcherLogging.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3471F611DD58D700CB050E /* GTMHTTPFetcherLogging.m */; }; + 4F74D93C11E68BFB00F2D927 /* GTMHTTPUploadFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3471F811DD58D700CB050E /* GTMHTTPUploadFetcher.m */; }; + 4F74D93E11E68BFB00F2D927 /* GTMGatherInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3471F211DD58D700CB050E /* GTMGatherInputStream.m */; }; + 4F74D94011E68BFB00F2D927 /* GTMMIMEDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3471FA11DD58D700CB050E /* GTMMIMEDocument.m */; }; + 4F74D94A11E68C1500F2D927 /* GTMMIMEDocumentTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F74D94911E68C1500F2D927 /* GTMMIMEDocumentTest.m */; }; + 4F74D9FF11E6A18100F2D927 /* GTMHTTPFetcherTestServer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F74D9FE11E6A18100F2D927 /* GTMHTTPFetcherTestServer.m */; }; + 4F74DA0411E6A19B00F2D927 /* GTMHTTPServer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F74DA0311E6A19B00F2D927 /* GTMHTTPServer.m */; }; + 4F74DAF811E7C7C900F2D927 /* GTMHTTPFetcherFetchingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F74DAF711E7C7C900F2D927 /* GTMHTTPFetcherFetchingTest.m */; }; + 4F74DAFC11E7C7CF00F2D927 /* GTMHTTPFetcherCachingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F74DAFB11E7C7CF00F2D927 /* GTMHTTPFetcherCachingTest.m */; }; + 4F74DB4411E7CF4200F2D927 /* gettysburgaddress.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4F74DB4311E7CF4200F2D927 /* gettysburgaddress.txt */; }; + 4F8DB2BE13FC9AE30001DD6C /* GTMReadMonitorInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F8DB2BD13FC9AE30001DD6C /* GTMReadMonitorInputStream.m */; }; + 4F8DB2BF13FC9AE30001DD6C /* GTMReadMonitorInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F8DB2BD13FC9AE30001DD6C /* GTMReadMonitorInputStream.m */; }; + 4F8DB32213FC9CB70001DD6C /* GTMReadMonitorInputStreamTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F8DB32113FC9CB70001DD6C /* GTMReadMonitorInputStreamTest.m */; }; + 4F92DBC51379E9CB0071BAC1 /* GTMHTTPFetcherServiceTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F92DBC41379E9CB0071BAC1 /* GTMHTTPFetcherServiceTest.m */; }; + 4FCC71F711EBF5970097924C /* GTMGatherInputStreamTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCC71F611EBF5970097924C /* GTMGatherInputStreamTest.m */; }; + 4FCC75E511EE6B1C0097924C /* GTMHTTPFetcherService.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCC75E411EE6B1C0097924C /* GTMHTTPFetcherService.m */; }; + 4FCC75E611EE6B1C0097924C /* GTMHTTPFetcherService.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCC75E411EE6B1C0097924C /* GTMHTTPFetcherService.m */; }; + 4FCC787A11EFA6030097924C /* GTMHTTPFetchHistory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCC787911EFA6030097924C /* GTMHTTPFetchHistory.m */; }; + 4FCC787B11EFA6030097924C /* GTMHTTPFetchHistory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCC787911EFA6030097924C /* GTMHTTPFetchHistory.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 4F2FCAC31267882800A74543 /* GTMHTTPFetcherUtilityTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPFetcherUtilityTest.m; path = Tests/GTMHTTPFetcherUtilityTest.m; sourceTree = ""; }; + 4F3471F111DD58D700CB050E /* GTMGatherInputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMGatherInputStream.h; sourceTree = ""; }; + 4F3471F211DD58D700CB050E /* GTMGatherInputStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMGatherInputStream.m; sourceTree = ""; }; + 4F3471F311DD58D700CB050E /* GTMHTTPFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMHTTPFetcher.h; sourceTree = ""; }; + 4F3471F411DD58D700CB050E /* GTMHTTPFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMHTTPFetcher.m; sourceTree = ""; }; + 4F3471F511DD58D700CB050E /* GTMHTTPFetcherLogging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMHTTPFetcherLogging.h; sourceTree = ""; }; + 4F3471F611DD58D700CB050E /* GTMHTTPFetcherLogging.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMHTTPFetcherLogging.m; sourceTree = ""; }; + 4F3471F711DD58D700CB050E /* GTMHTTPUploadFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMHTTPUploadFetcher.h; sourceTree = ""; }; + 4F3471F811DD58D700CB050E /* GTMHTTPUploadFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMHTTPUploadFetcher.m; sourceTree = ""; }; + 4F3471F911DD58D700CB050E /* GTMMIMEDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMMIMEDocument.h; sourceTree = ""; }; + 4F3471FA11DD58D700CB050E /* GTMMIMEDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMMIMEDocument.m; sourceTree = ""; }; + 4F74D92F11E68BD300F2D927 /* UnitTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UnitTests.octest; sourceTree = BUILT_PRODUCTS_DIR; }; + 4F74D93011E68BD300F2D927 /* UnitTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "UnitTests-Info.plist"; sourceTree = ""; }; + 4F74D94911E68C1500F2D927 /* GTMMIMEDocumentTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMMIMEDocumentTest.m; path = Tests/GTMMIMEDocumentTest.m; sourceTree = ""; }; + 4F74D9FE11E6A18100F2D927 /* GTMHTTPFetcherTestServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPFetcherTestServer.m; path = Tests/GTMHTTPFetcherTestServer.m; sourceTree = ""; }; + 4F74DA0211E6A19B00F2D927 /* GTMHTTPServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMHTTPServer.h; path = Tests/GTMHTTPServer.h; sourceTree = ""; }; + 4F74DA0311E6A19B00F2D927 /* GTMHTTPServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPServer.m; path = Tests/GTMHTTPServer.m; sourceTree = ""; }; + 4F74DAF711E7C7C900F2D927 /* GTMHTTPFetcherFetchingTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPFetcherFetchingTest.m; path = Tests/GTMHTTPFetcherFetchingTest.m; sourceTree = ""; }; + 4F74DAFB11E7C7CF00F2D927 /* GTMHTTPFetcherCachingTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPFetcherCachingTest.m; path = Tests/GTMHTTPFetcherCachingTest.m; sourceTree = ""; }; + 4F74DB4311E7CF4200F2D927 /* gettysburgaddress.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = gettysburgaddress.txt; path = Tests/Data/gettysburgaddress.txt; sourceTree = ""; }; + 4F8D22D81253E0960095BBF5 /* ReleaseNotes.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReleaseNotes.txt; sourceTree = ""; }; + 4F8DB2BD13FC9AE30001DD6C /* GTMReadMonitorInputStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMReadMonitorInputStream.m; sourceTree = ""; }; + 4F8DB2C013FC9AE90001DD6C /* GTMReadMonitorInputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMReadMonitorInputStream.h; sourceTree = ""; }; + 4F8DB32113FC9CB70001DD6C /* GTMReadMonitorInputStreamTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMReadMonitorInputStreamTest.m; path = Tests/GTMReadMonitorInputStreamTest.m; sourceTree = SOURCE_ROOT; }; + 4F92DBC41379E9CB0071BAC1 /* GTMHTTPFetcherServiceTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPFetcherServiceTest.m; path = Tests/GTMHTTPFetcherServiceTest.m; sourceTree = ""; }; + 4FCC71F611EBF5970097924C /* GTMGatherInputStreamTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMGatherInputStreamTest.m; path = Tests/GTMGatherInputStreamTest.m; sourceTree = ""; }; + 4FCC75E411EE6B1C0097924C /* GTMHTTPFetcherService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMHTTPFetcherService.m; sourceTree = ""; }; + 4FCC75E711EE6B230097924C /* GTMHTTPFetcherService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMHTTPFetcherService.h; sourceTree = ""; }; + 4FCC787911EFA6030097924C /* GTMHTTPFetchHistory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMHTTPFetchHistory.m; sourceTree = ""; }; + 4FCC787C11EFA6090097924C /* GTMHTTPFetchHistory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMHTTPFetchHistory.h; sourceTree = ""; }; + D2AAC07E0554694100DB518D /* libGTMHTTPFetcher.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libGTMHTTPFetcher.a; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 4F74D92C11E68BD300F2D927 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D2AAC07C0554694100DB518D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 034768DFFF38A50411DB9C8B /* Products */ = { + isa = PBXGroup; + children = ( + D2AAC07E0554694100DB518D /* libGTMHTTPFetcher.a */, + 4F74D92F11E68BD300F2D927 /* UnitTests.octest */, + ); + name = Products; + sourceTree = ""; + }; + 0867D691FE84028FC02AAC07 /* OAuthTouchStaticLibrary */ = { + isa = PBXGroup; + children = ( + 4F74D91D11E68AD600F2D927 /* Sources */, + 4F74D94711E68C0B00F2D927 /* Tests */, + 034768DFFF38A50411DB9C8B /* Products */, + 4F8D22D81253E0960095BBF5 /* ReleaseNotes.txt */, + 4F74D93011E68BD300F2D927 /* UnitTests-Info.plist */, + ); + name = OAuthTouchStaticLibrary; + sourceTree = ""; + }; + 4F74D91D11E68AD600F2D927 /* Sources */ = { + isa = PBXGroup; + children = ( + 4F3471F311DD58D700CB050E /* GTMHTTPFetcher.h */, + 4F3471F411DD58D700CB050E /* GTMHTTPFetcher.m */, + 4FCC787C11EFA6090097924C /* GTMHTTPFetchHistory.h */, + 4FCC787911EFA6030097924C /* GTMHTTPFetchHistory.m */, + 4FCC75E711EE6B230097924C /* GTMHTTPFetcherService.h */, + 4FCC75E411EE6B1C0097924C /* GTMHTTPFetcherService.m */, + 4F3471F511DD58D700CB050E /* GTMHTTPFetcherLogging.h */, + 4F3471F611DD58D700CB050E /* GTMHTTPFetcherLogging.m */, + 4F3471F711DD58D700CB050E /* GTMHTTPUploadFetcher.h */, + 4F3471F811DD58D700CB050E /* GTMHTTPUploadFetcher.m */, + 4F3471F111DD58D700CB050E /* GTMGatherInputStream.h */, + 4F3471F211DD58D700CB050E /* GTMGatherInputStream.m */, + 4F3471F911DD58D700CB050E /* GTMMIMEDocument.h */, + 4F3471FA11DD58D700CB050E /* GTMMIMEDocument.m */, + 4F8DB2C013FC9AE90001DD6C /* GTMReadMonitorInputStream.h */, + 4F8DB2BD13FC9AE30001DD6C /* GTMReadMonitorInputStream.m */, + ); + name = Sources; + sourceTree = ""; + }; + 4F74D94711E68C0B00F2D927 /* Tests */ = { + isa = PBXGroup; + children = ( + 4F74DAF711E7C7C900F2D927 /* GTMHTTPFetcherFetchingTest.m */, + 4F92DBC41379E9CB0071BAC1 /* GTMHTTPFetcherServiceTest.m */, + 4F74DAFB11E7C7CF00F2D927 /* GTMHTTPFetcherCachingTest.m */, + 4F2FCAC31267882800A74543 /* GTMHTTPFetcherUtilityTest.m */, + 4FCC71F611EBF5970097924C /* GTMGatherInputStreamTest.m */, + 4F74D94911E68C1500F2D927 /* GTMMIMEDocumentTest.m */, + 4F8DB32113FC9CB70001DD6C /* GTMReadMonitorInputStreamTest.m */, + 4FCC71A911EBEFBF0097924C /* Server */, + 4F74DB4111E7CF3500F2D927 /* Data */, + ); + name = Tests; + sourceTree = ""; + }; + 4F74DB4111E7CF3500F2D927 /* Data */ = { + isa = PBXGroup; + children = ( + 4F74DB4311E7CF4200F2D927 /* gettysburgaddress.txt */, + ); + name = Data; + sourceTree = ""; + }; + 4FCC71A911EBEFBF0097924C /* Server */ = { + isa = PBXGroup; + children = ( + 4F74DA0211E6A19B00F2D927 /* GTMHTTPServer.h */, + 4F74DA0311E6A19B00F2D927 /* GTMHTTPServer.m */, + 4F74D9FE11E6A18100F2D927 /* GTMHTTPFetcherTestServer.m */, + ); + name = Server; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 4F74D92E11E68BD300F2D927 /* UnitTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4F74D93411E68BD300F2D927 /* Build configuration list for PBXNativeTarget "UnitTests" */; + buildPhases = ( + 4F74D92A11E68BD300F2D927 /* Resources */, + 4F74D92B11E68BD300F2D927 /* Sources */, + 4F74D92C11E68BD300F2D927 /* Frameworks */, + 4F74D92D11E68BD300F2D927 /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = UnitTests; + productName = UnitTests; + productReference = 4F74D92F11E68BD300F2D927 /* UnitTests.octest */; + productType = "com.apple.product-type.bundle"; + }; + D2AAC07D0554694100DB518D /* GTMHTTPFetcherLib */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "GTMHTTPFetcherLib" */; + buildPhases = ( + D2AAC07B0554694100DB518D /* Sources */, + D2AAC07C0554694100DB518D /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = GTMHTTPFetcherLib; + productName = OAuthTouchStaticLibrary; + productReference = D2AAC07E0554694100DB518D /* libGTMHTTPFetcher.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 0867D690FE84028FC02AAC07 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0420; + }; + buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "GTMHTTPFetcher" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 0867D691FE84028FC02AAC07 /* OAuthTouchStaticLibrary */; + productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D2AAC07D0554694100DB518D /* GTMHTTPFetcherLib */, + 4F74D92E11E68BD300F2D927 /* UnitTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 4F74D92A11E68BD300F2D927 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F74DB4411E7CF4200F2D927 /* gettysburgaddress.txt in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4F74D92D11E68BD300F2D927 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 4F74D92B11E68BD300F2D927 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F74D93811E68BFB00F2D927 /* GTMHTTPFetcher.m in Sources */, + 4F74D93A11E68BFB00F2D927 /* GTMHTTPFetcherLogging.m in Sources */, + 4F74D93C11E68BFB00F2D927 /* GTMHTTPUploadFetcher.m in Sources */, + 4F74D93E11E68BFB00F2D927 /* GTMGatherInputStream.m in Sources */, + 4F74D94011E68BFB00F2D927 /* GTMMIMEDocument.m in Sources */, + 4F74D94A11E68C1500F2D927 /* GTMMIMEDocumentTest.m in Sources */, + 4F74D9FF11E6A18100F2D927 /* GTMHTTPFetcherTestServer.m in Sources */, + 4F74DA0411E6A19B00F2D927 /* GTMHTTPServer.m in Sources */, + 4F74DAF811E7C7C900F2D927 /* GTMHTTPFetcherFetchingTest.m in Sources */, + 4F74DAFC11E7C7CF00F2D927 /* GTMHTTPFetcherCachingTest.m in Sources */, + 4FCC71F711EBF5970097924C /* GTMGatherInputStreamTest.m in Sources */, + 4FCC75E511EE6B1C0097924C /* GTMHTTPFetcherService.m in Sources */, + 4FCC787A11EFA6030097924C /* GTMHTTPFetchHistory.m in Sources */, + 4F2FCAC41267882800A74543 /* GTMHTTPFetcherUtilityTest.m in Sources */, + 4F92DBC51379E9CB0071BAC1 /* GTMHTTPFetcherServiceTest.m in Sources */, + 4F8DB2BE13FC9AE30001DD6C /* GTMReadMonitorInputStream.m in Sources */, + 4F8DB32213FC9CB70001DD6C /* GTMReadMonitorInputStreamTest.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D2AAC07B0554694100DB518D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F3471FB11DD58D700CB050E /* GTMGatherInputStream.m in Sources */, + 4F3471FC11DD58D700CB050E /* GTMHTTPFetcher.m in Sources */, + 4F3471FD11DD58D700CB050E /* GTMHTTPFetcherLogging.m in Sources */, + 4F3471FE11DD58D700CB050E /* GTMHTTPUploadFetcher.m in Sources */, + 4F3471FF11DD58D700CB050E /* GTMMIMEDocument.m in Sources */, + 4FCC75E611EE6B1C0097924C /* GTMHTTPFetcherService.m in Sources */, + 4FCC787B11EFA6030097924C /* GTMHTTPFetchHistory.m in Sources */, + 4F8DB2BF13FC9AE30001DD6C /* GTMReadMonitorInputStream.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1DEB921F08733DC00010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "ARCHS[sdk=iphoneos*]" = ( + armv6, + armv7, + ); + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + INSTALL_PATH = /usr/local/lib; + PRODUCT_NAME = GTMHTTPFetcher; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 1DEB922008733DC00010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "ARCHS[sdk=iphoneos*]" = ( + armv6, + armv7, + ); + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + INSTALL_PATH = /usr/local/lib; + PRODUCT_NAME = GTMHTTPFetcher; + SDKROOT = iphoneos; + }; + name = Release; + }; + 1DEB922308733DC00010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + "ARCHS[sdk=iphoneos*]" = ( + armv6, + armv7, + ); + GCC_C_LANGUAGE_STANDARD = c99; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DDEBUG=1"; + OTHER_LDFLAGS = "-ObjC"; + SDKROOT = macosx; + }; + name = Debug; + }; + 1DEB922408733DC00010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + "ARCHS[sdk=iphoneos*]" = ( + armv6, + armv7, + ); + GCC_C_LANGUAGE_STANDARD = c99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_LDFLAGS = "-ObjC"; + SDKROOT = macosx; + }; + name = Release; + }; + 4F74D93211E68BD300F2D927 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Cocoa.framework/Headers/Cocoa.h"; + INFOPLIST_FILE = "UnitTests-Info.plist"; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles"; + OTHER_LDFLAGS = ( + "-framework", + Cocoa, + "-framework", + SenTestingKit, + ); + PRODUCT_NAME = UnitTests; + RUN_CLANG_STATIC_ANALYZER = YES; + WRAPPER_EXTENSION = octest; + }; + name = Debug; + }; + 4F74D93311E68BD300F2D927 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks"; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Cocoa.framework/Headers/Cocoa.h"; + INFOPLIST_FILE = "UnitTests-Info.plist"; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles"; + OTHER_LDFLAGS = ( + "-framework", + Cocoa, + "-framework", + SenTestingKit, + ); + PRODUCT_NAME = UnitTests; + RUN_CLANG_STATIC_ANALYZER = YES; + WRAPPER_EXTENSION = octest; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "GTMHTTPFetcherLib" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB921F08733DC00010E9CD /* Debug */, + 1DEB922008733DC00010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "GTMHTTPFetcher" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB922308733DC00010E9CD /* Debug */, + 1DEB922408733DC00010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4F74D93411E68BD300F2D927 /* Build configuration list for PBXNativeTarget "UnitTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4F74D93211E68BD300F2D927 /* Debug */, + 4F74D93311E68BD300F2D927 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 0867D690FE84028FC02AAC07 /* Project object */; +} diff --git a/GTL/Source/HTTPFetcher/GTMHTTPFetcher.xcodeproj/project.pbxproj b/GTL/Source/HTTPFetcher/GTMHTTPFetcher.xcodeproj/project.pbxproj new file mode 100644 index 0000000..a38b8bc --- /dev/null +++ b/GTL/Source/HTTPFetcher/GTMHTTPFetcher.xcodeproj/project.pbxproj @@ -0,0 +1,458 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4F2FCAC41267882800A74543 /* GTMHTTPFetcherUtilityTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F2FCAC31267882800A74543 /* GTMHTTPFetcherUtilityTest.m */; }; + 4F3471FB11DD58D700CB050E /* GTMGatherInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3471F211DD58D700CB050E /* GTMGatherInputStream.m */; }; + 4F3471FC11DD58D700CB050E /* GTMHTTPFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3471F411DD58D700CB050E /* GTMHTTPFetcher.m */; }; + 4F3471FD11DD58D700CB050E /* GTMHTTPFetcherLogging.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3471F611DD58D700CB050E /* GTMHTTPFetcherLogging.m */; }; + 4F3471FE11DD58D700CB050E /* GTMHTTPUploadFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3471F811DD58D700CB050E /* GTMHTTPUploadFetcher.m */; }; + 4F3471FF11DD58D700CB050E /* GTMMIMEDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3471FA11DD58D700CB050E /* GTMMIMEDocument.m */; }; + 4F74D93811E68BFB00F2D927 /* GTMHTTPFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3471F411DD58D700CB050E /* GTMHTTPFetcher.m */; }; + 4F74D93A11E68BFB00F2D927 /* GTMHTTPFetcherLogging.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3471F611DD58D700CB050E /* GTMHTTPFetcherLogging.m */; }; + 4F74D93C11E68BFB00F2D927 /* GTMHTTPUploadFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3471F811DD58D700CB050E /* GTMHTTPUploadFetcher.m */; }; + 4F74D93E11E68BFB00F2D927 /* GTMGatherInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3471F211DD58D700CB050E /* GTMGatherInputStream.m */; }; + 4F74D94011E68BFB00F2D927 /* GTMMIMEDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3471FA11DD58D700CB050E /* GTMMIMEDocument.m */; }; + 4F74D94A11E68C1500F2D927 /* GTMMIMEDocumentTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F74D94911E68C1500F2D927 /* GTMMIMEDocumentTest.m */; }; + 4F74D9FF11E6A18100F2D927 /* GTMHTTPFetcherTestServer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F74D9FE11E6A18100F2D927 /* GTMHTTPFetcherTestServer.m */; }; + 4F74DA0411E6A19B00F2D927 /* GTMHTTPServer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F74DA0311E6A19B00F2D927 /* GTMHTTPServer.m */; }; + 4F74DAF811E7C7C900F2D927 /* GTMHTTPFetcherFetchingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F74DAF711E7C7C900F2D927 /* GTMHTTPFetcherFetchingTest.m */; }; + 4F74DAFC11E7C7CF00F2D927 /* GTMHTTPFetcherCachingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F74DAFB11E7C7CF00F2D927 /* GTMHTTPFetcherCachingTest.m */; }; + 4F74DB4411E7CF4200F2D927 /* gettysburgaddress.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4F74DB4311E7CF4200F2D927 /* gettysburgaddress.txt */; }; + 4F8DB2BE13FC9AE30001DD6C /* GTMReadMonitorInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F8DB2BD13FC9AE30001DD6C /* GTMReadMonitorInputStream.m */; }; + 4F8DB2BF13FC9AE30001DD6C /* GTMReadMonitorInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F8DB2BD13FC9AE30001DD6C /* GTMReadMonitorInputStream.m */; }; + 4F8DB32213FC9CB70001DD6C /* GTMReadMonitorInputStreamTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F8DB32113FC9CB70001DD6C /* GTMReadMonitorInputStreamTest.m */; }; + 4F92DBC51379E9CB0071BAC1 /* GTMHTTPFetcherServiceTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F92DBC41379E9CB0071BAC1 /* GTMHTTPFetcherServiceTest.m */; }; + 4FCC71F711EBF5970097924C /* GTMGatherInputStreamTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCC71F611EBF5970097924C /* GTMGatherInputStreamTest.m */; }; + 4FCC75E511EE6B1C0097924C /* GTMHTTPFetcherService.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCC75E411EE6B1C0097924C /* GTMHTTPFetcherService.m */; }; + 4FCC75E611EE6B1C0097924C /* GTMHTTPFetcherService.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCC75E411EE6B1C0097924C /* GTMHTTPFetcherService.m */; }; + 4FCC787A11EFA6030097924C /* GTMHTTPFetchHistory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCC787911EFA6030097924C /* GTMHTTPFetchHistory.m */; }; + 4FCC787B11EFA6030097924C /* GTMHTTPFetchHistory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FCC787911EFA6030097924C /* GTMHTTPFetchHistory.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 4F2FCAC31267882800A74543 /* GTMHTTPFetcherUtilityTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPFetcherUtilityTest.m; path = Tests/GTMHTTPFetcherUtilityTest.m; sourceTree = ""; }; + 4F3471F111DD58D700CB050E /* GTMGatherInputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMGatherInputStream.h; sourceTree = ""; }; + 4F3471F211DD58D700CB050E /* GTMGatherInputStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMGatherInputStream.m; sourceTree = ""; }; + 4F3471F311DD58D700CB050E /* GTMHTTPFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMHTTPFetcher.h; sourceTree = ""; }; + 4F3471F411DD58D700CB050E /* GTMHTTPFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMHTTPFetcher.m; sourceTree = ""; }; + 4F3471F511DD58D700CB050E /* GTMHTTPFetcherLogging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMHTTPFetcherLogging.h; sourceTree = ""; }; + 4F3471F611DD58D700CB050E /* GTMHTTPFetcherLogging.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMHTTPFetcherLogging.m; sourceTree = ""; }; + 4F3471F711DD58D700CB050E /* GTMHTTPUploadFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMHTTPUploadFetcher.h; sourceTree = ""; }; + 4F3471F811DD58D700CB050E /* GTMHTTPUploadFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMHTTPUploadFetcher.m; sourceTree = ""; }; + 4F3471F911DD58D700CB050E /* GTMMIMEDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMMIMEDocument.h; sourceTree = ""; }; + 4F3471FA11DD58D700CB050E /* GTMMIMEDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMMIMEDocument.m; sourceTree = ""; }; + 4F74D92F11E68BD300F2D927 /* UnitTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UnitTests.octest; sourceTree = BUILT_PRODUCTS_DIR; }; + 4F74D93011E68BD300F2D927 /* UnitTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "UnitTests-Info.plist"; sourceTree = ""; }; + 4F74D94911E68C1500F2D927 /* GTMMIMEDocumentTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMMIMEDocumentTest.m; path = Tests/GTMMIMEDocumentTest.m; sourceTree = ""; }; + 4F74D9FE11E6A18100F2D927 /* GTMHTTPFetcherTestServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPFetcherTestServer.m; path = Tests/GTMHTTPFetcherTestServer.m; sourceTree = ""; }; + 4F74DA0211E6A19B00F2D927 /* GTMHTTPServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMHTTPServer.h; path = Tests/GTMHTTPServer.h; sourceTree = ""; }; + 4F74DA0311E6A19B00F2D927 /* GTMHTTPServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPServer.m; path = Tests/GTMHTTPServer.m; sourceTree = ""; }; + 4F74DAF711E7C7C900F2D927 /* GTMHTTPFetcherFetchingTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPFetcherFetchingTest.m; path = Tests/GTMHTTPFetcherFetchingTest.m; sourceTree = ""; }; + 4F74DAFB11E7C7CF00F2D927 /* GTMHTTPFetcherCachingTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPFetcherCachingTest.m; path = Tests/GTMHTTPFetcherCachingTest.m; sourceTree = ""; }; + 4F74DB4311E7CF4200F2D927 /* gettysburgaddress.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = gettysburgaddress.txt; path = Tests/Data/gettysburgaddress.txt; sourceTree = ""; }; + 4F8D22D81253E0960095BBF5 /* ReleaseNotes.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReleaseNotes.txt; sourceTree = ""; }; + 4F8DB2BD13FC9AE30001DD6C /* GTMReadMonitorInputStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMReadMonitorInputStream.m; sourceTree = ""; }; + 4F8DB2C013FC9AE90001DD6C /* GTMReadMonitorInputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMReadMonitorInputStream.h; sourceTree = ""; }; + 4F8DB32113FC9CB70001DD6C /* GTMReadMonitorInputStreamTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMReadMonitorInputStreamTest.m; path = Tests/GTMReadMonitorInputStreamTest.m; sourceTree = SOURCE_ROOT; }; + 4F92DBC41379E9CB0071BAC1 /* GTMHTTPFetcherServiceTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPFetcherServiceTest.m; path = Tests/GTMHTTPFetcherServiceTest.m; sourceTree = ""; }; + 4FCC71F611EBF5970097924C /* GTMGatherInputStreamTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMGatherInputStreamTest.m; path = Tests/GTMGatherInputStreamTest.m; sourceTree = ""; }; + 4FCC75E411EE6B1C0097924C /* GTMHTTPFetcherService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMHTTPFetcherService.m; sourceTree = ""; }; + 4FCC75E711EE6B230097924C /* GTMHTTPFetcherService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMHTTPFetcherService.h; sourceTree = ""; }; + 4FCC787911EFA6030097924C /* GTMHTTPFetchHistory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMHTTPFetchHistory.m; sourceTree = ""; }; + 4FCC787C11EFA6090097924C /* GTMHTTPFetchHistory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMHTTPFetchHistory.h; sourceTree = ""; }; + D2AAC07E0554694100DB518D /* libGTMHTTPFetcher.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libGTMHTTPFetcher.a; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 4F74D92C11E68BD300F2D927 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D2AAC07C0554694100DB518D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 034768DFFF38A50411DB9C8B /* Products */ = { + isa = PBXGroup; + children = ( + D2AAC07E0554694100DB518D /* libGTMHTTPFetcher.a */, + 4F74D92F11E68BD300F2D927 /* UnitTests.octest */, + ); + name = Products; + sourceTree = ""; + }; + 0867D691FE84028FC02AAC07 /* OAuthTouchStaticLibrary */ = { + isa = PBXGroup; + children = ( + 4F74D91D11E68AD600F2D927 /* Sources */, + 4F74D94711E68C0B00F2D927 /* Tests */, + 034768DFFF38A50411DB9C8B /* Products */, + 4F8D22D81253E0960095BBF5 /* ReleaseNotes.txt */, + 4F74D93011E68BD300F2D927 /* UnitTests-Info.plist */, + ); + name = OAuthTouchStaticLibrary; + sourceTree = ""; + }; + 4F74D91D11E68AD600F2D927 /* Sources */ = { + isa = PBXGroup; + children = ( + 4F3471F311DD58D700CB050E /* GTMHTTPFetcher.h */, + 4F3471F411DD58D700CB050E /* GTMHTTPFetcher.m */, + 4FCC787C11EFA6090097924C /* GTMHTTPFetchHistory.h */, + 4FCC787911EFA6030097924C /* GTMHTTPFetchHistory.m */, + 4FCC75E711EE6B230097924C /* GTMHTTPFetcherService.h */, + 4FCC75E411EE6B1C0097924C /* GTMHTTPFetcherService.m */, + 4F3471F511DD58D700CB050E /* GTMHTTPFetcherLogging.h */, + 4F3471F611DD58D700CB050E /* GTMHTTPFetcherLogging.m */, + 4F3471F711DD58D700CB050E /* GTMHTTPUploadFetcher.h */, + 4F3471F811DD58D700CB050E /* GTMHTTPUploadFetcher.m */, + 4F3471F111DD58D700CB050E /* GTMGatherInputStream.h */, + 4F3471F211DD58D700CB050E /* GTMGatherInputStream.m */, + 4F3471F911DD58D700CB050E /* GTMMIMEDocument.h */, + 4F3471FA11DD58D700CB050E /* GTMMIMEDocument.m */, + 4F8DB2C013FC9AE90001DD6C /* GTMReadMonitorInputStream.h */, + 4F8DB2BD13FC9AE30001DD6C /* GTMReadMonitorInputStream.m */, + ); + name = Sources; + sourceTree = ""; + }; + 4F74D94711E68C0B00F2D927 /* Tests */ = { + isa = PBXGroup; + children = ( + 4F74DAF711E7C7C900F2D927 /* GTMHTTPFetcherFetchingTest.m */, + 4F92DBC41379E9CB0071BAC1 /* GTMHTTPFetcherServiceTest.m */, + 4F74DAFB11E7C7CF00F2D927 /* GTMHTTPFetcherCachingTest.m */, + 4F2FCAC31267882800A74543 /* GTMHTTPFetcherUtilityTest.m */, + 4FCC71F611EBF5970097924C /* GTMGatherInputStreamTest.m */, + 4F74D94911E68C1500F2D927 /* GTMMIMEDocumentTest.m */, + 4F8DB32113FC9CB70001DD6C /* GTMReadMonitorInputStreamTest.m */, + 4FCC71A911EBEFBF0097924C /* Server */, + 4F74DB4111E7CF3500F2D927 /* Data */, + ); + name = Tests; + sourceTree = ""; + }; + 4F74DB4111E7CF3500F2D927 /* Data */ = { + isa = PBXGroup; + children = ( + 4F74DB4311E7CF4200F2D927 /* gettysburgaddress.txt */, + ); + name = Data; + sourceTree = ""; + }; + 4FCC71A911EBEFBF0097924C /* Server */ = { + isa = PBXGroup; + children = ( + 4F74DA0211E6A19B00F2D927 /* GTMHTTPServer.h */, + 4F74DA0311E6A19B00F2D927 /* GTMHTTPServer.m */, + 4F74D9FE11E6A18100F2D927 /* GTMHTTPFetcherTestServer.m */, + ); + name = Server; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 4F74D92E11E68BD300F2D927 /* UnitTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4F74D93411E68BD300F2D927 /* Build configuration list for PBXNativeTarget "UnitTests" */; + buildPhases = ( + 4F74D92A11E68BD300F2D927 /* Resources */, + 4F74D92B11E68BD300F2D927 /* Sources */, + 4F74D92C11E68BD300F2D927 /* Frameworks */, + 4F74D92D11E68BD300F2D927 /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = UnitTests; + productName = UnitTests; + productReference = 4F74D92F11E68BD300F2D927 /* UnitTests.octest */; + productType = "com.apple.product-type.bundle"; + }; + D2AAC07D0554694100DB518D /* GTMHTTPFetcherLib */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "GTMHTTPFetcherLib" */; + buildPhases = ( + D2AAC07B0554694100DB518D /* Sources */, + D2AAC07C0554694100DB518D /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = GTMHTTPFetcherLib; + productName = OAuthTouchStaticLibrary; + productReference = D2AAC07E0554694100DB518D /* libGTMHTTPFetcher.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 0867D690FE84028FC02AAC07 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0420; + }; + buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "GTMHTTPFetcher" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 0867D691FE84028FC02AAC07 /* OAuthTouchStaticLibrary */; + productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D2AAC07D0554694100DB518D /* GTMHTTPFetcherLib */, + 4F74D92E11E68BD300F2D927 /* UnitTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 4F74D92A11E68BD300F2D927 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F74DB4411E7CF4200F2D927 /* gettysburgaddress.txt in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4F74D92D11E68BD300F2D927 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 4F74D92B11E68BD300F2D927 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F74D93811E68BFB00F2D927 /* GTMHTTPFetcher.m in Sources */, + 4F74D93A11E68BFB00F2D927 /* GTMHTTPFetcherLogging.m in Sources */, + 4F74D93C11E68BFB00F2D927 /* GTMHTTPUploadFetcher.m in Sources */, + 4F74D93E11E68BFB00F2D927 /* GTMGatherInputStream.m in Sources */, + 4F74D94011E68BFB00F2D927 /* GTMMIMEDocument.m in Sources */, + 4F74D94A11E68C1500F2D927 /* GTMMIMEDocumentTest.m in Sources */, + 4F74D9FF11E6A18100F2D927 /* GTMHTTPFetcherTestServer.m in Sources */, + 4F74DA0411E6A19B00F2D927 /* GTMHTTPServer.m in Sources */, + 4F74DAF811E7C7C900F2D927 /* GTMHTTPFetcherFetchingTest.m in Sources */, + 4F74DAFC11E7C7CF00F2D927 /* GTMHTTPFetcherCachingTest.m in Sources */, + 4FCC71F711EBF5970097924C /* GTMGatherInputStreamTest.m in Sources */, + 4FCC75E511EE6B1C0097924C /* GTMHTTPFetcherService.m in Sources */, + 4FCC787A11EFA6030097924C /* GTMHTTPFetchHistory.m in Sources */, + 4F2FCAC41267882800A74543 /* GTMHTTPFetcherUtilityTest.m in Sources */, + 4F92DBC51379E9CB0071BAC1 /* GTMHTTPFetcherServiceTest.m in Sources */, + 4F8DB2BE13FC9AE30001DD6C /* GTMReadMonitorInputStream.m in Sources */, + 4F8DB32213FC9CB70001DD6C /* GTMReadMonitorInputStreamTest.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D2AAC07B0554694100DB518D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F3471FB11DD58D700CB050E /* GTMGatherInputStream.m in Sources */, + 4F3471FC11DD58D700CB050E /* GTMHTTPFetcher.m in Sources */, + 4F3471FD11DD58D700CB050E /* GTMHTTPFetcherLogging.m in Sources */, + 4F3471FE11DD58D700CB050E /* GTMHTTPUploadFetcher.m in Sources */, + 4F3471FF11DD58D700CB050E /* GTMMIMEDocument.m in Sources */, + 4FCC75E611EE6B1C0097924C /* GTMHTTPFetcherService.m in Sources */, + 4FCC787B11EFA6030097924C /* GTMHTTPFetchHistory.m in Sources */, + 4F8DB2BF13FC9AE30001DD6C /* GTMReadMonitorInputStream.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1DEB921F08733DC00010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "ARCHS[sdk=iphoneos*]" = ( + armv6, + armv7, + ); + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + INSTALL_PATH = /usr/local/lib; + PRODUCT_NAME = GTMHTTPFetcher; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 1DEB922008733DC00010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "ARCHS[sdk=iphoneos*]" = ( + armv6, + armv7, + ); + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + INSTALL_PATH = /usr/local/lib; + PRODUCT_NAME = GTMHTTPFetcher; + SDKROOT = iphoneos; + }; + name = Release; + }; + 1DEB922308733DC00010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + "ARCHS[sdk=iphoneos*]" = ( + armv6, + armv7, + ); + GCC_C_LANGUAGE_STANDARD = c99; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DDEBUG=1"; + OTHER_LDFLAGS = "-ObjC"; + SDKROOT = macosx; + }; + name = Debug; + }; + 1DEB922408733DC00010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + "ARCHS[sdk=iphoneos*]" = ( + armv6, + armv7, + ); + GCC_C_LANGUAGE_STANDARD = c99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_LDFLAGS = "-ObjC"; + SDKROOT = macosx; + }; + name = Release; + }; + 4F74D93211E68BD300F2D927 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Cocoa.framework/Headers/Cocoa.h"; + INFOPLIST_FILE = "UnitTests-Info.plist"; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles"; + OTHER_LDFLAGS = ( + "-framework", + Cocoa, + "-framework", + SenTestingKit, + ); + PRODUCT_NAME = UnitTests; + RUN_CLANG_STATIC_ANALYZER = YES; + WRAPPER_EXTENSION = octest; + }; + name = Debug; + }; + 4F74D93311E68BD300F2D927 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks"; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Cocoa.framework/Headers/Cocoa.h"; + INFOPLIST_FILE = "UnitTests-Info.plist"; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles"; + OTHER_LDFLAGS = ( + "-framework", + Cocoa, + "-framework", + SenTestingKit, + ); + PRODUCT_NAME = UnitTests; + RUN_CLANG_STATIC_ANALYZER = YES; + WRAPPER_EXTENSION = octest; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "GTMHTTPFetcherLib" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB921F08733DC00010E9CD /* Debug */, + 1DEB922008733DC00010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "GTMHTTPFetcher" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB922308733DC00010E9CD /* Debug */, + 1DEB922408733DC00010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4F74D93411E68BD300F2D927 /* Build configuration list for PBXNativeTarget "UnitTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4F74D93211E68BD300F2D927 /* Debug */, + 4F74D93311E68BD300F2D927 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 0867D690FE84028FC02AAC07 /* Project object */; +} diff --git a/GTL/Source/HTTPFetcher/GTMHTTPFetcherLogging.h b/GTL/Source/HTTPFetcher/GTMHTTPFetcherLogging.h new file mode 100644 index 0000000..d1dacdf --- /dev/null +++ b/GTL/Source/HTTPFetcher/GTMHTTPFetcherLogging.h @@ -0,0 +1,98 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "GTMHTTPFetcher.h" + +// GTM HTTP Logging +// +// All traffic using GTMHTTPFetcher can be easily logged. Call +// +// [GTMHTTPFetcher setLoggingEnabled:YES]; +// +// to begin generating log files. +// +// Log files are put into a folder on the desktop called "GTMHTTPDebugLogs" +// unless another directory is specified with +setLoggingDirectory. +// +// In the iPhone simulator, the default logs location is the user's home +// directory in ~/Library/Application Support. On the iPhone device, the +// default logs location is the application's documents directory on the device. +// +// Tip: use the Finder's "Sort By Date" to find the most recent logs. +// +// Each run of an application gets a separate set of log files. An html +// file is generated to simplify browsing the run's http transactions. +// The html file includes javascript links for inline viewing of uploaded +// and downloaded data. +// +// A symlink is created in the logs folder to simplify finding the html file +// for the latest run of the application; the symlink is called +// +// AppName_http_log_newest.html +// +// For better viewing of XML logs, use Camino or Firefox rather than Safari. +// +// Each fetcher may be given a comment to be inserted as a label in the logs, +// such as +// [fetcher setCommentWithFormat:@"retrieve item %@", itemName]; +// +// Projects may define STRIP_GTM_FETCH_LOGGING to remove logging code. + +#if !STRIP_GTM_FETCH_LOGGING + +@interface GTMHTTPFetcher (GTMHTTPFetcherLogging) + +// Note: the default logs directory is ~/Desktop/GTMHTTPDebugLogs; it will be +// created as needed. If a custom directory is set, the directory should +// already exist. ++ (void)setLoggingDirectory:(NSString *)path; ++ (NSString *)loggingDirectory; + +// client apps can turn logging on and off ++ (void)setLoggingEnabled:(BOOL)flag; ++ (BOOL)isLoggingEnabled; + +// client apps can turn off logging to a file if they want to only check +// the fetcher's log property ++ (void)setLoggingToFileEnabled:(BOOL)flag; ++ (BOOL)isLoggingToFileEnabled; + +// client apps can optionally specify process name and date string used in +// log file names ++ (void)setLoggingProcessName:(NSString *)str; ++ (NSString *)loggingProcessName; + ++ (void)setLoggingDateStamp:(NSString *)str; ++ (NSString *)loggingDateStamp; + +// internal; called by fetcher +- (void)logFetchWithError:(NSError *)error; +- (BOOL)logCapturePostStream; + +// Applications may provide alternative body strings to be displayed in the +// log, such as for binary requests or responses. If deferring is turned +// on, the response log will not be sent until deferring is turned off, +// allowing the application to write the response body after the response +// data has been parsed. +- (void)setLogRequestBody:(NSString *)bodyString; +- (NSString *)logRequestBody; +- (void)setLogResponseBody:(NSString *)bodyString; +- (NSString *)logResponseBody; +- (void)setShouldDeferResponseBodyLogging:(BOOL)flag; +- (BOOL)shouldDeferResponseBodyLogging; + +@end + +#endif // !STRIP_GTM_FETCH_LOGGING diff --git a/GTL/Source/HTTPFetcher/GTMHTTPFetcherLogging.m b/GTL/Source/HTTPFetcher/GTMHTTPFetcherLogging.m new file mode 100644 index 0000000..d583c09 --- /dev/null +++ b/GTL/Source/HTTPFetcher/GTMHTTPFetcherLogging.m @@ -0,0 +1,1101 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if !STRIP_GTM_FETCH_LOGGING + +#include +#include + +#import "GTMHTTPFetcherLogging.h" + +// Sensitive credential strings are replaced in logs with _snip_ +// +// Apps that must see the contents of sensitive tokens can set this to 1 +#ifndef SKIP_GTM_FETCH_LOGGING_SNIPPING +#define SKIP_GTM_FETCH_LOGGING_SNIPPING 0 +#endif + +// If GTMReadMonitorInputStream is available, it can be used for +// capturing uploaded streams of data +// +// We locally declare methods of GTMReadMonitorInputStream so we +// do not need to import the header, as some projects may not have it available +@interface GTMReadMonitorInputStream : NSInputStream ++ (id)inputStreamWithStream:(NSInputStream *)input; +@property (assign) id readDelegate; +@property (assign) SEL readSelector; +@property (retain) NSArray *runLoopModes; +@end + +// If GTMNSJSONSerialization is available, it is used for formatting JSON +#if (TARGET_OS_MAC && !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED < 1070)) || \ + (TARGET_OS_IPHONE && (__IPHONE_OS_VERSION_MAX_ALLOWED < 50000)) +@interface GTMNSJSONSerialization : NSObject ++ (NSData *)dataWithJSONObject:(id)obj options:(NSUInteger)opt error:(NSError **)error; ++ (id)JSONObjectWithData:(NSData *)data options:(NSUInteger)opt error:(NSError **)error; +@end +#endif + +// Otherwise, if SBJSON is available, it is used for formatting JSON +@interface GTMFetcherSBJSON +- (void)setHumanReadable:(BOOL)flag; +- (NSString*)stringWithObject:(id)value error:(NSError**)error; +- (id)objectWithString:(NSString*)jsonrep error:(NSError**)error; +@end + +@interface GTMHTTPFetcher (GTMHTTPFetcherLoggingUtilities) ++ (NSString *)headersStringForDictionary:(NSDictionary *)dict; + +- (void)inputStream:(GTMReadMonitorInputStream *)stream + readIntoBuffer:(void *)buffer + length:(NSUInteger)length; + +// internal file utilities for logging ++ (BOOL)fileOrDirExistsAtPath:(NSString *)path; ++ (BOOL)makeDirectoryUpToPath:(NSString *)path; ++ (BOOL)removeItemAtPath:(NSString *)path; ++ (BOOL)createSymbolicLinkAtPath:(NSString *)newPath + withDestinationPath:(NSString *)targetPath; + ++ (NSString *)snipSubstringOfString:(NSString *)originalStr + betweenStartString:(NSString *)startStr + endString:(NSString *)endStr; + ++ (id)JSONObjectWithData:(NSData *)data; ++ (id)stringWithJSONObject:(id)obj; +@end + +@implementation GTMHTTPFetcher (GTMHTTPFetcherLogging) + +// fetchers come and fetchers go, but statics are forever +static BOOL gIsLoggingEnabled = NO; +static BOOL gIsLoggingToFile = YES; +static NSString *gLoggingDirectoryPath = nil; +static NSString *gLoggingDateStamp = nil; +static NSString* gLoggingProcessName = nil; + ++ (void)setLoggingDirectory:(NSString *)path { + [gLoggingDirectoryPath autorelease]; + gLoggingDirectoryPath = [path copy]; +} + ++ (NSString *)loggingDirectory { + + if (!gLoggingDirectoryPath) { + NSArray *arr = nil; +#if GTM_IPHONE && TARGET_IPHONE_SIMULATOR + // default to a directory called GTMHTTPDebugLogs into a sandbox-safe + // directory that a developer can find easily, the application home + arr = [NSArray arrayWithObject:NSHomeDirectory()]; +#elif GTM_IPHONE + // Neither ~/Desktop nor ~/Home is writable on an actual iPhone device. + // Put it in ~/Documents. + arr = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, + NSUserDomainMask, YES); +#else + // default to a directory called GTMHTTPDebugLogs in the desktop folder + arr = NSSearchPathForDirectoriesInDomains(NSDesktopDirectory, + NSUserDomainMask, YES); +#endif + + if ([arr count] > 0) { + NSString *const kGTMLogFolderName = @"GTMHTTPDebugLogs"; + + NSString *desktopPath = [arr objectAtIndex:0]; + NSString *logsFolderPath = [desktopPath stringByAppendingPathComponent:kGTMLogFolderName]; + + BOOL doesFolderExist = [[self class] fileOrDirExistsAtPath:logsFolderPath]; + + if (!doesFolderExist) { + // make the directory + doesFolderExist = [self makeDirectoryUpToPath:logsFolderPath]; + } + + if (doesFolderExist) { + // it's there; store it in the global + gLoggingDirectoryPath = [logsFolderPath copy]; + } + } + } + return gLoggingDirectoryPath; +} + ++ (void)setLoggingEnabled:(BOOL)flag { + gIsLoggingEnabled = flag; +} + ++ (BOOL)isLoggingEnabled { + return gIsLoggingEnabled; +} + ++ (void)setLoggingToFileEnabled:(BOOL)flag { + gIsLoggingToFile = flag; +} + ++ (BOOL)isLoggingToFileEnabled { + return gIsLoggingToFile; +} + ++ (void)setLoggingProcessName:(NSString *)str { + [gLoggingProcessName release]; + gLoggingProcessName = [str copy]; +} + ++ (NSString *)loggingProcessName { + + // get the process name (once per run) replacing spaces with underscores + if (!gLoggingProcessName) { + + NSString *procName = [[NSProcessInfo processInfo] processName]; + NSMutableString *loggingProcessName; + loggingProcessName = [[NSMutableString alloc] initWithString:procName]; + + [loggingProcessName replaceOccurrencesOfString:@" " + withString:@"_" + options:0 + range:NSMakeRange(0, [gLoggingProcessName length])]; + gLoggingProcessName = loggingProcessName; + } + return gLoggingProcessName; +} + ++ (void)setLoggingDateStamp:(NSString *)str { + [gLoggingDateStamp release]; + gLoggingDateStamp = [str copy]; +} + ++ (NSString *)loggingDateStamp { + // we'll pick one date stamp per run, so a run that starts at a later second + // will get a unique results html file + if (!gLoggingDateStamp) { + // produce a string like 08-21_01-41-23PM + + NSDateFormatter *formatter = [[[NSDateFormatter alloc] init] autorelease]; + [formatter setFormatterBehavior:NSDateFormatterBehavior10_4]; + [formatter setDateFormat:@"M-dd_hh-mm-ssa"]; + + gLoggingDateStamp = [[formatter stringFromDate:[NSDate date]] retain] ; + } + return gLoggingDateStamp; +} + +// formattedStringFromData returns a prettyprinted string for XML or JSON input, +// and a plain string for other input data +- (NSString *)formattedStringFromData:(NSData *)inputData + contentType:(NSString *)contentType + JSON:(NSDictionary **)outJSON { + if (inputData == nil) return nil; + + // if the content type is JSON and we have the parsing class available, + // use that + if ([contentType hasPrefix:@"application/json"] + && [inputData length] > 5) { + // convert from JSON string to NSObjects and back to a formatted string + NSMutableDictionary *obj = [[self class] JSONObjectWithData:inputData]; + if (obj) { + if (outJSON) *outJSON = obj; + if ([obj isKindOfClass:[NSMutableDictionary class]]) { + // for security and privacy, omit OAuth 2 response access and refresh + // tokens + if ([obj valueForKey:@"refresh_token"] != nil) { + [obj setObject:@"_snip_" forKey:@"refresh_token"]; + } + if ([obj valueForKey:@"access_token"] != nil) { + [obj setObject:@"_snip_" forKey:@"access_token"]; + } + } + NSString *formatted = [[self class] stringWithJSONObject:obj]; + if (formatted) return formatted; + } + } + +#if !GTM_FOUNDATION_ONLY && !GTM_SKIP_LOG_XMLFORMAT + // verify that this data starts with the bytes indicating XML + + NSString *const kXMLLintPath = @"/usr/bin/xmllint"; + static BOOL hasCheckedAvailability = NO; + static BOOL isXMLLintAvailable; + + if (!hasCheckedAvailability) { + isXMLLintAvailable = [[self class] fileOrDirExistsAtPath:kXMLLintPath]; + hasCheckedAvailability = YES; + } + + if (isXMLLintAvailable + && [inputData length] > 5 + && strncmp([inputData bytes], " 0) { + // success + inputData = formattedData; + } + } +#else + // we can't call external tasks on the iPhone; leave the XML unformatted +#endif + + NSString *dataStr = [[[NSString alloc] initWithData:inputData + encoding:NSUTF8StringEncoding] autorelease]; + return dataStr; +} + +- (void)setupStreamLogging { + // if logging is enabled, it needs a buffer to accumulate data from any + // NSInputStream used for uploading. Logging will wrap the input + // stream with a stream that lets us keep a copy the data being read. + if ([GTMHTTPFetcher isLoggingEnabled] + && loggedStreamData_ == nil + && postStream_ != nil) { + loggedStreamData_ = [[NSMutableData alloc] init]; + + BOOL didCapture = [self logCapturePostStream]; + if (!didCapture) { + // upload stream logging requires the class + // GTMReadMonitorInputStream be available + NSString const *str = @"<>"; + [loggedStreamData_ setData:[str dataUsingEncoding:NSUTF8StringEncoding]]; + } + } +} + +- (void)setLogRequestBody:(NSString *)bodyString { + @synchronized(self) { + [logRequestBody_ release]; + logRequestBody_ = [bodyString copy]; + } +} + +- (NSString *)logRequestBody { + @synchronized(self) { + return logRequestBody_; + } +} + +- (void)setLogResponseBody:(NSString *)bodyString { + @synchronized(self) { + [logResponseBody_ release]; + logResponseBody_ = [bodyString copy]; + } +} + +- (NSString *)logResponseBody { + @synchronized(self) { + return logResponseBody_; + } +} + +- (void)setShouldDeferResponseBodyLogging:(BOOL)flag { + @synchronized(self) { + if (flag != shouldDeferResponseBodyLogging_) { + shouldDeferResponseBodyLogging_ = flag; + if (!flag) { + [self performSelectorOnMainThread:@selector(logFetchWithError:) + withObject:nil + waitUntilDone:NO]; + } + } + } +} + +- (BOOL)shouldDeferResponseBodyLogging { + @synchronized(self) { + return shouldDeferResponseBodyLogging_; + } +} + +// stringFromStreamData creates a string given the supplied data +// +// If NSString can create a UTF-8 string from the data, then that is returned. +// +// Otherwise, this routine tries to find a MIME boundary at the beginning of +// the data block, and uses that to break up the data into parts. Each part +// will be used to try to make a UTF-8 string. For parts that fail, a +// replacement string showing the part header and <> is supplied +// in place of the binary data. + +- (NSString *)stringFromStreamData:(NSData *)data + contentType:(NSString *)contentType { + + if (data == nil) return nil; + + // optimistically, see if the whole data block is UTF-8 + NSString *streamDataStr = [self formattedStringFromData:data + contentType:contentType + JSON:NULL]; + if (streamDataStr) return streamDataStr; + + // Munge a buffer by replacing non-ASCII bytes with underscores, + // and turn that munged buffer an NSString. That gives us a string + // we can use with NSScanner. + NSMutableData *mutableData = [NSMutableData dataWithData:data]; + unsigned char *bytes = [mutableData mutableBytes]; + + for (unsigned int idx = 0; idx < [mutableData length]; idx++) { + if (bytes[idx] > 0x7F || bytes[idx] == 0) { + bytes[idx] = '_'; + } + } + + NSString *mungedStr = [[[NSString alloc] initWithData:mutableData + encoding:NSUTF8StringEncoding] autorelease]; + if (mungedStr != nil) { + + // scan for the boundary string + NSString *boundary = nil; + NSScanner *scanner = [NSScanner scannerWithString:mungedStr]; + + if ([scanner scanUpToString:@"\r\n" intoString:&boundary] + && [boundary hasPrefix:@"--"]) { + + // we found a boundary string; use it to divide the string into parts + NSArray *mungedParts = [mungedStr componentsSeparatedByString:boundary]; + + // look at each of the munged parts in the original string, and try to + // convert those into UTF-8 + NSMutableArray *origParts = [NSMutableArray array]; + NSUInteger offset = 0; + for (NSString *mungedPart in mungedParts) { + NSUInteger partSize = [mungedPart length]; + + NSRange range = NSMakeRange(offset, partSize); + NSData *origPartData = [data subdataWithRange:range]; + + NSString *origPartStr = [[[NSString alloc] initWithData:origPartData + encoding:NSUTF8StringEncoding] autorelease]; + if (origPartStr) { + // we could make this original part into UTF-8; use the string + [origParts addObject:origPartStr]; + } else { + // this part can't be made into UTF-8; scan the header, if we can + NSString *header = nil; + NSScanner *headerScanner = [NSScanner scannerWithString:mungedPart]; + if (![headerScanner scanUpToString:@"\r\n\r\n" intoString:&header]) { + // we couldn't find a header + header = @""; + } + + // make a part string with the header and <> + NSString *binStr = [NSString stringWithFormat:@"\r%@\r<<%lu bytes>>\r", + header, (long)(partSize - [header length])]; + [origParts addObject:binStr]; + } + offset += partSize + [boundary length]; + } + + // rejoin the original parts + streamDataStr = [origParts componentsJoinedByString:boundary]; + } + } + + if (!streamDataStr) { + // give up; just make a string showing the uploaded bytes + streamDataStr = [NSString stringWithFormat:@"<<%u bytes>>", + (unsigned int)[data length]]; + } + return streamDataStr; +} + +// logFetchWithError is called following a successful or failed fetch attempt +// +// This method does all the work for appending to and creating log files + +- (void)logFetchWithError:(NSError *)error { + + if (![[self class] isLoggingEnabled]) return; + + // TODO: (grobbins) add Javascript to display response data formatted in hex + + NSString *parentDir = [[self class] loggingDirectory]; + NSString *processName = [[self class] loggingProcessName]; + NSString *dateStamp = [[self class] loggingDateStamp]; + + // make a directory for this run's logs, like + // SyncProto_logs_10-16_01-56-58PM + NSString *dirName = [NSString stringWithFormat:@"%@_log_%@", + processName, dateStamp]; + NSString *logDirectory = [parentDir stringByAppendingPathComponent:dirName]; + + if (gIsLoggingToFile) { + // be sure that the first time this app runs, it's not writing to + // a preexisting folder + static BOOL shouldReuseFolder = NO; + if (!shouldReuseFolder) { + shouldReuseFolder = YES; + NSString *origLogDir = logDirectory; + for (int ctr = 2; ctr < 20; ctr++) { + if (![[self class] fileOrDirExistsAtPath:logDirectory]) break; + + // append a digit + logDirectory = [origLogDir stringByAppendingFormat:@"_%d", ctr]; + } + } + if (![[self class] makeDirectoryUpToPath:logDirectory]) return; + } + // each response's NSData goes into its own xml or txt file, though all + // responses for this run of the app share a main html file. This + // counter tracks all fetch responses for this run of the app. + // + // we'll use a local variable since this routine may be reentered while + // waiting for XML formatting to be completed by an external task + static int zResponseCounter = 0; + int responseCounter = ++zResponseCounter; + + // file name for an image data file + NSString *responseDataFileName = nil; + NSUInteger responseDataLength; + if (downloadFileHandle_) { + responseDataLength = (NSUInteger) [downloadFileHandle_ offsetInFile]; + } else { + responseDataLength = [downloadedData_ length]; + } + + NSURLResponse *response = [self response]; + NSDictionary *responseHeaders = [self responseHeaders]; + + NSString *responseBaseName = nil; + NSString *responseDataStr = nil; + NSDictionary *responseJSON = nil; + + // if there's response data, decide what kind of file to put it in based + // on the first bytes of the file or on the mime type supplied by the server + NSString *responseMIMEType = [response MIMEType]; + BOOL isResponseImage = NO; + NSData *dataToWrite = nil; + + if (responseDataLength > 0) { + NSString *responseDataExtn = nil; + + // generate a response file base name like + responseBaseName = [NSString stringWithFormat:@"fetch_%d_response", + responseCounter]; + + NSString *responseType = [responseHeaders valueForKey:@"Content-Type"]; + responseDataStr = [self formattedStringFromData:downloadedData_ + contentType:responseType + JSON:&responseJSON]; + if (responseDataStr) { + // we were able to make a UTF-8 string from the response data + if ([responseMIMEType isEqual:@"application/atom+xml"] + || [responseMIMEType hasSuffix:@"/xml"]) { + responseDataExtn = @"xml"; + dataToWrite = [responseDataStr dataUsingEncoding:NSUTF8StringEncoding]; + } + } else if ([responseMIMEType isEqual:@"image/jpeg"]) { + responseDataExtn = @"jpg"; + dataToWrite = downloadedData_; + isResponseImage = YES; + } else if ([responseMIMEType isEqual:@"image/gif"]) { + responseDataExtn = @"gif"; + dataToWrite = downloadedData_; + isResponseImage = YES; + } else if ([responseMIMEType isEqual:@"image/png"]) { + responseDataExtn = @"png"; + dataToWrite = downloadedData_; + isResponseImage = YES; + } else { + // add more non-text types here + } + + // if we have an extension, save the raw data in a file with that + // extension + if (responseDataExtn && dataToWrite) { + responseDataFileName = [responseBaseName stringByAppendingPathExtension:responseDataExtn]; + NSString *responseDataFilePath = [logDirectory stringByAppendingPathComponent:responseDataFileName]; + + NSError *downloadedError = nil; + if (gIsLoggingToFile + && ![dataToWrite writeToFile:responseDataFilePath + options:0 + error:&downloadedError]) { + NSLog(@"%@ logging write error:%@ (%@)", + [self class], downloadedError, responseDataFileName); + } + } + } + + // we'll have one main html file per run of the app + NSString *htmlName = @"aperçu_http_log.html"; + NSString *htmlPath =[logDirectory stringByAppendingPathComponent:htmlName]; + + // if the html file exists (from logging previous fetches) we don't need + // to re-write the header or the scripts + BOOL didFileExist = [[self class] fileOrDirExistsAtPath:htmlPath]; + + NSMutableString* outputHTML = [NSMutableString string]; + NSURLRequest *request = [self mutableRequest]; + + // we need a header to say we'll have UTF-8 text + if (!didFileExist) { + [outputHTML appendFormat:@"%@ HTTP fetch log %@", + processName, dateStamp]; + } + + // now write the visible html elements + NSString *copyableFileName = [NSString stringWithFormat:@"fetch_%d.txt", + responseCounter]; + + // write the date & time, the comment, and the link to the plain-text + // (copyable) log + NSString *const dateLineFormat = @"%@      "; + [outputHTML appendFormat:dateLineFormat, [NSDate date]]; + + NSString *comment = [self comment]; + if (comment) { + NSString *const commentFormat = @"%@      "; + [outputHTML appendFormat:commentFormat, comment]; + } + + NSString *const reqRespFormat = @"request/response log
"; + [outputHTML appendFormat:reqRespFormat, copyableFileName]; + + // write the request URL + NSString *requestMethod = [request HTTPMethod]; + NSURL *requestURL = [request URL]; + [outputHTML appendFormat:@"request: %@ %@
\n", + requestMethod, requestURL]; + + // write the request headers + NSDictionary *requestHeaders = [request allHTTPHeaderFields]; + NSUInteger numberOfRequestHeaders = [requestHeaders count]; + if (numberOfRequestHeaders > 0) { + // Indicate if the request is authorized; warn if the request is + // authorized but non-SSL + NSString *auth = [requestHeaders objectForKey:@"Authorization"]; + NSString *headerDetails = @""; + if (auth) { + headerDetails = @"   authorized"; + BOOL isInsecure = [[requestURL scheme] isEqual:@"http"]; + if (isInsecure) { + headerDetails = @"   authorized, non-SSL" + " "; // 26A0 = ⚠ + } + } + NSString *cookiesHdr = [requestHeaders objectForKey:@"Cookie"]; + if (cookiesHdr) { + headerDetails = [headerDetails stringByAppendingString: + @"   cookies"]; + } + NSString *matchHdr = [requestHeaders objectForKey:@"If-Match"]; + if (matchHdr) { + headerDetails = [headerDetails stringByAppendingString: + @"   if-match"]; + } + matchHdr = [requestHeaders objectForKey:@"If-None-Match"]; + if (matchHdr) { + headerDetails = [headerDetails stringByAppendingString: + @"   if-none-match"]; + } + [outputHTML appendFormat:@"   headers: %d %@
", + (int)numberOfRequestHeaders, headerDetails]; + } else { + [outputHTML appendFormat:@"   headers: none
"]; + } + + // write the request post data, toggleable + NSData *postData; + if (loggedStreamData_) { + postData = loggedStreamData_; + } else if (postData_) { + postData = postData_; + } else { + postData = [request_ HTTPBody]; + } + + NSString *postDataStr = nil; + NSUInteger postDataLength = [postData length]; + NSString *postType = [requestHeaders valueForKey:@"Content-Type"]; + + if (postDataLength > 0) { + [outputHTML appendFormat:@"   data: %d bytes, %@
\n", + (int)postDataLength, postType ? postType : @""]; + + if (logRequestBody_) { + postDataStr = [[logRequestBody_ copy] autorelease]; + [logRequestBody_ release]; + logRequestBody_ = nil; + } else { + postDataStr = [self stringFromStreamData:postData + contentType:postType]; + if (postDataStr) { + // remove OAuth 2 client secret and refresh token + postDataStr = [[self class] snipSubstringOfString:postDataStr + betweenStartString:@"client_secret=" + endString:@"&"]; + + postDataStr = [[self class] snipSubstringOfString:postDataStr + betweenStartString:@"refresh_token=" + endString:@"&"]; + + // remove ClientLogin password + postDataStr = [[self class] snipSubstringOfString:postDataStr + betweenStartString:@"&Passwd=" + endString:@"&"]; + } + } + } else { + // no post data + } + + // write the response status, MIME type, URL + NSInteger status = [self statusCode]; + if (response) { + NSString *statusString = @""; + if (status != 0) { + if (status == 200 || status == 201) { + statusString = [NSString stringWithFormat:@"%ld", (long)status]; + + // report any JSON-RPC error + if ([responseJSON isKindOfClass:[NSDictionary class]]) { + NSDictionary *jsonError = [responseJSON objectForKey:@"error"]; + if ([jsonError isKindOfClass:[NSDictionary class]]) { + NSString *jsonCode = [[jsonError valueForKey:@"code"] description]; + NSString *jsonMessage = [jsonError valueForKey:@"message"]; + if (jsonCode || jsonMessage) { + NSString *const jsonErrFmt = @"   JSON error: %@ %@  ⚑"; // 2691 = ⚑ + statusString = [statusString stringByAppendingFormat:jsonErrFmt, + jsonCode ? jsonCode : @"", + jsonMessage ? jsonMessage : @""]; + } + } + } + } else { + // purple for anything other than 200 or 201 + NSString *flag = (status >= 400 ? @" ⚑" : @""); // 2691 = ⚑ + NSString *const statusFormat = @"%ld %@"; + statusString = [NSString stringWithFormat:statusFormat, + (long)status, flag]; + } + } + + // show the response URL only if it's different from the request URL + NSString *responseURLStr = @""; + NSURL *responseURL = [response URL]; + + if (responseURL && ![responseURL isEqual:[request URL]]) { + NSString *const responseURLFormat = @"response URL:" + " %@
\n"; + responseURLStr = [NSString stringWithFormat:responseURLFormat, + [responseURL absoluteString]]; + } + + [outputHTML appendFormat:@"response:  status %@
\n%@", + statusString, responseURLStr]; + + // Write the response headers + NSUInteger numberOfResponseHeaders = [responseHeaders count]; + if (numberOfResponseHeaders > 0) { + // Indicate if the server is setting cookies + NSString *cookiesSet = [responseHeaders valueForKey:@"Set-Cookie"]; + NSString *cookiesStr = (cookiesSet ? @"  " + "sets cookies" : @""); + // Indicate if the server is redirecting + NSString *location = [responseHeaders valueForKey:@"Location"]; + BOOL isRedirect = (status >= 300 && status <= 399 && location != nil); + NSString *redirectsStr = (isRedirect ? @"  " + "redirects" : @""); + + [outputHTML appendFormat:@"   headers: %d %@ %@
\n", + (int)numberOfResponseHeaders, cookiesStr, redirectsStr]; + } else { + [outputHTML appendString:@"   headers: none
\n"]; + } + } + + // error + if (error) { + [outputHTML appendFormat:@"Error: %@
\n", [error description]]; + } + + // Write the response data + if (responseDataFileName) { + NSString *escapedResponseFile = [responseDataFileName stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + if (isResponseImage) { + // Make a small inline image that links to the full image file + [outputHTML appendFormat:@"   data: %d bytes, %@
", + (int)responseDataLength, responseMIMEType]; + NSString *const fmt = @"image\n"; + [outputHTML appendFormat:fmt, + escapedResponseFile, escapedResponseFile]; + } else { + // The response data was XML; link to the xml file + NSString *const fmt = @"   data: %d bytes, " + "%@   %@\n"; + [outputHTML appendFormat:fmt, + (int)responseDataLength, responseMIMEType, + escapedResponseFile, [escapedResponseFile pathExtension]]; + } + } else { + // The response data was not an image; just show the length and MIME type + [outputHTML appendFormat:@"   data: %d bytes, %@\n", + (int)responseDataLength, responseMIMEType]; + } + + // Make a single string of the request and response, suitable for copying + // to the clipboard and pasting into a bug report + NSMutableString *copyable = [NSMutableString string]; + if (comment) { + [copyable appendFormat:@"%@\n\n", comment]; + } + [copyable appendFormat:@"%@\n", [NSDate date]]; + [copyable appendFormat:@"Request: %@ %@\n", requestMethod, requestURL]; + if ([requestHeaders count] > 0) { + [copyable appendFormat:@"Request headers:\n%@\n", + [[self class] headersStringForDictionary:requestHeaders]]; + } + + if (postDataLength > 0) { + [copyable appendFormat:@"Request body: (%u bytes)\n", + (unsigned int) postDataLength]; + if (postDataStr) { + [copyable appendFormat:@"%@\n", postDataStr]; + } + [copyable appendString:@"\n"]; + } + + if (response) { + [copyable appendFormat:@"Response: status %d\n", (int) status]; + [copyable appendFormat:@"Response headers:\n%@\n", + [[self class] headersStringForDictionary:responseHeaders]]; + [copyable appendFormat:@"Response body: (%u bytes)\n", + (unsigned int) responseDataLength]; + if (responseDataLength > 0) { + if (logResponseBody_) { + responseDataStr = [[logResponseBody_ copy] autorelease]; + [logResponseBody_ release]; + logResponseBody_ = nil; + } + if (responseDataStr != nil) { + [copyable appendFormat:@"%@\n", responseDataStr]; + } else if (status >= 400 && [temporaryDownloadPath_ length] > 0) { + // Try to read in the saved data, which is probably a server error + // message + NSStringEncoding enc; + responseDataStr = [NSString stringWithContentsOfFile:temporaryDownloadPath_ + usedEncoding:&enc + error:NULL]; + if ([responseDataStr length] > 0) { + [copyable appendFormat:@"%@\n", responseDataStr]; + } else { + [copyable appendFormat:@"<<%u bytes to file>>\n", + (unsigned int) responseDataLength]; + } + } else { + // Even though it's redundant, we'll put in text to indicate that all + // the bytes are binary + [copyable appendFormat:@"<<%u bytes>>\n", + (unsigned int) responseDataLength]; + } + } + } + + if (error) { + [copyable appendFormat:@"Error: %@\n", error]; + } + + // Save to log property before adding the separator + self.log = copyable; + + [copyable appendString:@"-----------------------------------------------------------\n"]; + + + // Write the copyable version to another file (linked to at the top of the + // html file, above) + // + // Ideally, something to just copy this to the clipboard like + // Copy here." + // would work everywhere, but it only works in Safari as of 8/2010 + if (gIsLoggingToFile) { + NSString *copyablePath = [logDirectory stringByAppendingPathComponent:copyableFileName]; + NSError *copyableError = nil; + if (![copyable writeToFile:copyablePath + atomically:NO + encoding:NSUTF8StringEncoding + error:©ableError]) { + // Error writing to file + NSLog(@"%@ logging write error:%@ (%@)", + [self class], copyableError, copyablePath); + } + + [outputHTML appendString:@"


"]; + + // Append the HTML to the main output file + const char* htmlBytes = [outputHTML UTF8String]; + NSOutputStream *stream = [NSOutputStream outputStreamToFileAtPath:htmlPath + append:YES]; + [stream open]; + [stream write:(const uint8_t *) htmlBytes maxLength:strlen(htmlBytes)]; + [stream close]; + + // Make a symlink to the latest html + NSString *symlinkName = [NSString stringWithFormat:@"%@_log_newest.html", + processName]; + NSString *symlinkPath = [parentDir stringByAppendingPathComponent:symlinkName]; + + [[self class] removeItemAtPath:symlinkPath]; + [[self class] createSymbolicLinkAtPath:symlinkPath + withDestinationPath:htmlPath]; + +#if GTM_IPHONE + static BOOL gReportedLoggingPath = NO; + if (!gReportedLoggingPath) { + gReportedLoggingPath = YES; + NSLog(@"GTMHTTPFetcher logging to \"%@\"", parentDir); + } +#endif + } +} + +- (BOOL)logCapturePostStream { + // This is called when beginning a fetch. The caller should have already + // verified that logging is enabled, and should have allocated + // loggedStreamData_ as a mutable object. + + // If the class GTMReadMonitorInputStream is not available, bail now, since + // we cannot capture this upload stream + Class monitorClass = NSClassFromString(@"GTMReadMonitorInputStream"); + if (!monitorClass) return NO; + + // If we're logging, we need to wrap the upload stream with our monitor + // stream that will call us back with the bytes being read from the stream + + // Our wrapper will retain the old post stream + [postStream_ autorelease]; + + postStream_ = [monitorClass inputStreamWithStream:postStream_]; + [postStream_ retain]; + + [(GTMReadMonitorInputStream *)postStream_ setReadDelegate:self]; + [(GTMReadMonitorInputStream *)postStream_ setRunLoopModes:[self runLoopModes]]; + + SEL readSel = @selector(inputStream:readIntoBuffer:length:); + [(GTMReadMonitorInputStream *)postStream_ setReadSelector:readSel]; + + return YES; +} + +@end + +@implementation GTMHTTPFetcher (GTMHTTPFetcherLoggingUtilities) + +- (void)inputStream:(GTMReadMonitorInputStream *)stream + readIntoBuffer:(void *)buffer + length:(NSUInteger)length { + // append the captured data + [loggedStreamData_ appendBytes:buffer length:length]; +} + +#pragma mark Internal file routines + +// We implement plain Unix versions of NSFileManager methods to avoid +// NSFileManager's issues with being used from multiple threads + ++ (BOOL)fileOrDirExistsAtPath:(NSString *)path { + struct stat buffer; + int result = stat([path fileSystemRepresentation], &buffer); + return (result == 0); +} + ++ (BOOL)makeDirectoryUpToPath:(NSString *)path { + int result = 0; + + // Recursively create the parent directory of the requested path + NSString *parent = [path stringByDeletingLastPathComponent]; + if (![self fileOrDirExistsAtPath:parent]) { + result = [self makeDirectoryUpToPath:parent]; + } + + // Make the leaf directory + if (result == 0 && ![self fileOrDirExistsAtPath:path]) { + result = mkdir([path fileSystemRepresentation], S_IRWXU); // RWX for owner + } + return (result == 0); +} + ++ (BOOL)removeItemAtPath:(NSString *)path { + int result = unlink([path fileSystemRepresentation]); + return (result == 0); +} + ++ (BOOL)createSymbolicLinkAtPath:(NSString *)newPath + withDestinationPath:(NSString *)targetPath { + int result = symlink([targetPath fileSystemRepresentation], + [newPath fileSystemRepresentation]); + return (result == 0); +} + +#pragma mark Fomatting Utilities + ++ (NSString *)snipSubstringOfString:(NSString *)originalStr + betweenStartString:(NSString *)startStr + endString:(NSString *)endStr { +#if SKIP_GTM_FETCH_LOGGING_SNIPPING + return originalStr; +#else + if (originalStr == nil) return nil; + + // Find the start string, and replace everything between it + // and the end string (or the end of the original string) with "_snip_" + NSRange startRange = [originalStr rangeOfString:startStr]; + if (startRange.location == NSNotFound) return originalStr; + + // We found the start string + NSUInteger originalLength = [originalStr length]; + NSUInteger startOfTarget = NSMaxRange(startRange); + NSRange targetAndRest = NSMakeRange(startOfTarget, + originalLength - startOfTarget); + NSRange endRange = [originalStr rangeOfString:endStr + options:0 + range:targetAndRest]; + NSRange replaceRange; + if (endRange.location == NSNotFound) { + // Found no end marker so replace to end of string + replaceRange = targetAndRest; + } else { + // Replace up to the endStr + replaceRange = NSMakeRange(startOfTarget, + endRange.location - startOfTarget); + } + + NSString *result = [originalStr stringByReplacingCharactersInRange:replaceRange + withString:@"_snip_"]; + return result; +#endif // SKIP_GTM_FETCH_LOGGING_SNIPPING +} + ++ (NSString *)headersStringForDictionary:(NSDictionary *)dict { + // Format the dictionary in http header style, like + // Accept: application/json + // Cache-Control: no-cache + // Content-Type: application/json; charset=utf-8 + // + // Pad the key names, but not beyond 16 chars, since long custom header + // keys just create too much whitespace + NSArray *keys = [[dict allKeys] sortedArrayUsingSelector:@selector(compare:)]; + + NSMutableString *str = [NSMutableString string]; + for (NSString *key in keys) { + NSString *value = [dict valueForKey:key]; + if ([key isEqual:@"Authorization"]) { + // Remove OAuth 1 token + value = [[self class] snipSubstringOfString:value + betweenStartString:@"oauth_token=\"" + endString:@"\""]; + + // Remove OAuth 2 bearer token (draft 16, and older form) + value = [[self class] snipSubstringOfString:value + betweenStartString:@"Bearer " + endString:@"\n"]; + value = [[self class] snipSubstringOfString:value + betweenStartString:@"OAuth " + endString:@"\n"]; + + // Remove Google ClientLogin + value = [[self class] snipSubstringOfString:value + betweenStartString:@"GoogleLogin auth=" + endString:@"\n"]; + } + [str appendFormat:@" %@: %@\n", key, value]; + } + return str; +} + ++ (id)JSONObjectWithData:(NSData *)data { + Class serializer = NSClassFromString(@"NSJSONSerialization"); + if (serializer) { + const NSUInteger kOpts = (1UL << 0); // NSJSONReadingMutableContainers + NSMutableDictionary *obj; + obj = [serializer JSONObjectWithData:data + options:kOpts + error:NULL]; + return obj; + } else { + // Try SBJsonParser or SBJSON + Class jsonParseClass = NSClassFromString(@"SBJsonParser"); + if (!jsonParseClass) { + jsonParseClass = NSClassFromString(@"SBJSON"); + } + if (jsonParseClass) { + GTMFetcherSBJSON *parser = [[[jsonParseClass alloc] init] autorelease]; + NSString *jsonStr = [[[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding] autorelease]; + if (jsonStr) { + NSMutableDictionary *obj = [parser objectWithString:jsonStr error:NULL]; + return obj; + } + } + } + return nil; +} + ++ (id)stringWithJSONObject:(id)obj { + Class serializer = NSClassFromString(@"NSJSONSerialization"); + if (serializer) { + const NSUInteger kOpts = (1UL << 0); // NSJSONWritingPrettyPrinted + NSData *data; + data = [serializer dataWithJSONObject:obj + options:kOpts + error:NULL]; + if (data) { + NSString *jsonStr = [[[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding] autorelease]; + return jsonStr; + } + } else { + // Try SBJsonParser or SBJSON + Class jsonWriterClass = NSClassFromString(@"SBJsonWriter"); + if (!jsonWriterClass) { + jsonWriterClass = NSClassFromString(@"SBJSON"); + } + if (jsonWriterClass) { + GTMFetcherSBJSON *writer = [[[jsonWriterClass alloc] init] autorelease]; + [writer setHumanReadable:YES]; + NSString *jsonStr = [writer stringWithObject:obj error:NULL]; + return jsonStr; + } + } + return nil; +} + +@end + +#endif // !STRIP_GTM_FETCH_LOGGING diff --git a/GTL/Source/HTTPFetcher/GTMHTTPFetcherService.h b/GTL/Source/HTTPFetcher/GTMHTTPFetcherService.h new file mode 100755 index 0000000..9c6cd75 --- /dev/null +++ b/GTL/Source/HTTPFetcher/GTMHTTPFetcherService.h @@ -0,0 +1,125 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMHTTPFetcherService.h +// + +// The fetcher service class maintains a history to be used by a sequence +// of fetchers objects generated by the service. +// +// Fetchers that do not need to share a history may be generated independently, +// like +// +// GTMHTTPFetcher* myFetcher = [GTMHTTPFetcher fetcherWithRequest:request]; +// +// Fetchers that should share cookies or an ETagged data cache should be +// generated by a common GTMHTTPFetcherService instance, like +// +// GTMHTTPFetcherService *myFetcherService = [[GTMHTTPFetcherService alloc] init]; +// GTMHTTPFetcher* myFirstFetcher = [myFetcherService fetcherWithRequest:request1]; +// GTMHTTPFetcher* mySecondFetcher = [myFetcherService fetcherWithRequest:request2]; + +#import "GTMHTTPFetcher.h" +#import "GTMHTTPFetchHistory.h" + +@interface GTMHTTPFetcherService : NSObject { + @private + NSMutableDictionary *delayedHosts_; + NSMutableDictionary *runningHosts_; + NSUInteger maxRunningFetchersPerHost_; + + GTMHTTPFetchHistory *fetchHistory_; + NSOperationQueue *delegateQueue_; + NSArray *runLoopModes_; + NSString *userAgent_; + NSTimeInterval timeout_; + NSURLCredential *credential_; // username & password + NSURLCredential *proxyCredential_; // credential supplied to proxy servers + NSInteger cookieStorageMethod_; + + BOOL shouldFetchInBackground_; + + id authorizer_; +} + +// Create a fetcher +// +// These methods will return an autoreleased fetcher, but if +// the fetcher is successfully created, the connection will retain the +// fetcher for the life of the connection as well. So the caller doesn't have +// to retain the fetcher explicitly unless they want to be able to monitor +// or cancel it. +- (GTMHTTPFetcher *)fetcherWithRequest:(NSURLRequest *)request; +- (GTMHTTPFetcher *)fetcherWithURL:(NSURL *)requestURL; +- (GTMHTTPFetcher *)fetcherWithURLString:(NSString *)requestURLString; +- (id)fetcherWithRequest:(NSURLRequest *)request + fetcherClass:(Class)fetcherClass; + +// Queues of delayed and running fetchers. Each dictionary contains arrays +// of fetchers, keyed by host +// +// A max value of 0 means no fetchers should be delayed. +// +// The default limit is 10 simultaneous fetchers targeting each host. +@property (assign) NSUInteger maxRunningFetchersPerHost; +@property (retain, readonly) NSDictionary *delayedHosts; +@property (retain, readonly) NSDictionary *runningHosts; + +- (BOOL)isDelayingFetcher:(GTMHTTPFetcher *)fetcher; + +- (NSUInteger)numberOfFetchers; // running + delayed fetchers +- (NSUInteger)numberOfRunningFetchers; +- (NSUInteger)numberOfDelayedFetchers; + +// Search for running or delayed fetchers with the specified URL. +// +// Returns an array of fetcher objects found, or nil if none found. +- (NSArray *)issuedFetchersWithRequestURL:(NSURL *)requestURL; + +- (void)stopAllFetchers; + +// Properties to be applied to each fetcher; +// see GTMHTTPFetcher.h for descriptions +@property (copy) NSString *userAgent; +@property (assign) NSTimeInterval timeout; +@property (retain) NSOperationQueue *delegateQueue; +@property (retain) NSArray *runLoopModes; +@property (retain) NSURLCredential *credential; +@property (retain) NSURLCredential *proxyCredential; +@property (assign) BOOL shouldFetchInBackground; + +// Fetch history +@property (retain) GTMHTTPFetchHistory *fetchHistory; + +@property (assign) NSInteger cookieStorageMethod; +@property (assign) BOOL shouldRememberETags; // default: NO +@property (assign) BOOL shouldCacheETaggedData; // default: NO + +- (void)clearETaggedDataCache; +- (void)clearHistory; + +@property (nonatomic, retain) id authorizer; + +// Spin the run loop, discarding events, until all running and delayed fetchers +// have completed +// +// This is only for use in testing or in tools without a user interface. +// +// Synchronous fetches should never be done by shipping apps; they are +// sufficient reason for rejection from the app store. +- (void)waitForCompletionOfAllFetchersWithTimeout:(NSTimeInterval)timeoutInSeconds; + +@end diff --git a/GTL/Source/HTTPFetcher/GTMHTTPFetcherService.m b/GTL/Source/HTTPFetcher/GTMHTTPFetcherService.m new file mode 100755 index 0000000..15909db --- /dev/null +++ b/GTL/Source/HTTPFetcher/GTMHTTPFetcherService.m @@ -0,0 +1,490 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMHTTPFetcherService.m +// + +#import "GTMHTTPFetcherService.h" + +@interface GTMHTTPFetcher (ServiceMethods) +- (BOOL)beginFetchMayDelay:(BOOL)mayDelay + mayAuthorize:(BOOL)mayAuthorize; +@end + +@interface GTMHTTPFetcherService () +@property (retain, readwrite) NSDictionary *delayedHosts; +@property (retain, readwrite) NSDictionary *runningHosts; + +- (void)detachAuthorizer; +@end + +@implementation GTMHTTPFetcherService + +@synthesize maxRunningFetchersPerHost = maxRunningFetchersPerHost_, + userAgent = userAgent_, + timeout = timeout_, + delegateQueue = delegateQueue_, + runLoopModes = runLoopModes_, + credential = credential_, + proxyCredential = proxyCredential_, + cookieStorageMethod = cookieStorageMethod_, + shouldFetchInBackground = shouldFetchInBackground_, + fetchHistory = fetchHistory_; + +- (id)init { + self = [super init]; + if (self) { + fetchHistory_ = [[GTMHTTPFetchHistory alloc] init]; + delayedHosts_ = [[NSMutableDictionary alloc] init]; + runningHosts_ = [[NSMutableDictionary alloc] init]; + cookieStorageMethod_ = kGTMHTTPFetcherCookieStorageMethodFetchHistory; + + maxRunningFetchersPerHost_ = 10; +} + return self; +} + +- (void)dealloc { + [self detachAuthorizer]; + + [delayedHosts_ release]; + [runningHosts_ release]; + [fetchHistory_ release]; + [userAgent_ release]; + [delegateQueue_ release]; + [runLoopModes_ release]; + [credential_ release]; + [proxyCredential_ release]; + [authorizer_ release]; + + [super dealloc]; +} + +#pragma mark Generate a new fetcher + +- (id)fetcherWithRequest:(NSURLRequest *)request + fetcherClass:(Class)fetcherClass { + GTMHTTPFetcher *fetcher = [fetcherClass fetcherWithRequest:request]; + + fetcher.fetchHistory = self.fetchHistory; + fetcher.delegateQueue = self.delegateQueue; + fetcher.runLoopModes = self.runLoopModes; + fetcher.cookieStorageMethod = self.cookieStorageMethod; + fetcher.credential = self.credential; + fetcher.proxyCredential = self.proxyCredential; + fetcher.shouldFetchInBackground = self.shouldFetchInBackground; + fetcher.authorizer = self.authorizer; + fetcher.service = self; + + NSString *userAgent = self.userAgent; + if ([userAgent length] > 0 + && [request valueForHTTPHeaderField:@"User-Agent"] == nil) { + [fetcher.mutableRequest setValue:userAgent + forHTTPHeaderField:@"User-Agent"]; + } + + NSTimeInterval timeout = self.timeout; + if (timeout > 0.0) { + [fetcher.mutableRequest setTimeoutInterval:timeout]; + } + + return fetcher; +} + +- (GTMHTTPFetcher *)fetcherWithRequest:(NSURLRequest *)request { + return [self fetcherWithRequest:request + fetcherClass:[GTMHTTPFetcher class]]; +} + +- (GTMHTTPFetcher *)fetcherWithURL:(NSURL *)requestURL { + return [self fetcherWithRequest:[NSURLRequest requestWithURL:requestURL]]; +} + +- (GTMHTTPFetcher *)fetcherWithURLString:(NSString *)requestURLString { + return [self fetcherWithURL:[NSURL URLWithString:requestURLString]]; +} + +#pragma mark Queue Management + +- (void)addRunningFetcher:(GTMHTTPFetcher *)fetcher + forHost:(NSString *)host { + // Add to the array of running fetchers for this host, creating the array + // if needed + NSMutableArray *runningForHost = [runningHosts_ objectForKey:host]; + if (runningForHost == nil) { + runningForHost = [NSMutableArray arrayWithObject:fetcher]; + [runningHosts_ setObject:runningForHost forKey:host]; + } else { + [runningForHost addObject:fetcher]; + } +} + +- (void)addDelayedFetcher:(GTMHTTPFetcher *)fetcher + forHost:(NSString *)host { + // Add to the array of delayed fetchers for this host, creating the array + // if needed + NSMutableArray *delayedForHost = [delayedHosts_ objectForKey:host]; + if (delayedForHost == nil) { + delayedForHost = [NSMutableArray arrayWithObject:fetcher]; + [delayedHosts_ setObject:delayedForHost forKey:host]; + } else { + [delayedForHost addObject:fetcher]; + } +} + +- (BOOL)isDelayingFetcher:(GTMHTTPFetcher *)fetcher { + @synchronized(self) { + NSString *host = [[[fetcher mutableRequest] URL] host]; + NSArray *delayedForHost = [delayedHosts_ objectForKey:host]; + NSUInteger idx = [delayedForHost indexOfObjectIdenticalTo:fetcher]; + BOOL isDelayed = (delayedForHost != nil) && (idx != NSNotFound); + return isDelayed; + } +} + +- (BOOL)fetcherShouldBeginFetching:(GTMHTTPFetcher *)fetcher { + // Entry point from the fetcher + @synchronized(self) { + NSString *host = [[[fetcher mutableRequest] URL] host]; + + if ([host length] == 0) { +#if DEBUG + NSAssert1(0, @"%@ lacks host", fetcher); +#endif + return YES; + } + + NSMutableArray *runningForHost = [runningHosts_ objectForKey:host]; + if (runningForHost != nil + && [runningForHost indexOfObjectIdenticalTo:fetcher] != NSNotFound) { +#if DEBUG + NSAssert1(0, @"%@ was already running", fetcher); +#endif + return YES; + } + + // We'll save the host that serves as the key for this fetcher's array + // to avoid any chance of the underlying request changing, stranding + // the fetcher in the wrong array + fetcher.serviceHost = host; + fetcher.thread = [NSThread currentThread]; + + if (maxRunningFetchersPerHost_ == 0 + || maxRunningFetchersPerHost_ > [runningForHost count]) { + [self addRunningFetcher:fetcher forHost:host]; + return YES; + } else { + [self addDelayedFetcher:fetcher forHost:host]; + return NO; + } + } + return YES; +} + +// Fetcher start and stop methods, invoked on the appropriate thread for +// the fetcher +- (void)performSelector:(SEL)sel onStartThreadForFetcher:(GTMHTTPFetcher *)fetcher { + NSOperationQueue *delegateQueue = fetcher.delegateQueue; + NSThread *thread = fetcher.thread; + if (delegateQueue != nil || [thread isEqual:[NSThread currentThread]]) { + // The fetcher should run on the thread we're on now, or there's a delegate + // queue specified so it doesn't matter what thread the fetcher is started + // on, since it will call back on the queue. + [self performSelector:sel withObject:fetcher]; + } else { + // Fetcher must run on a specified thread (and that thread must have a + // run loop.) + [self performSelector:sel + onThread:thread + withObject:fetcher + waitUntilDone:NO]; + } +} + +- (void)startFetcherOnCurrentThread:(GTMHTTPFetcher *)fetcher { + [fetcher beginFetchMayDelay:NO + mayAuthorize:YES]; +} + +- (void)startFetcher:(GTMHTTPFetcher *)fetcher { + [self performSelector:@selector(startFetcherOnCurrentThread:) + onStartThreadForFetcher:fetcher]; +} + +- (void)stopFetcherOnCurrentThread:(GTMHTTPFetcher *)fetcher { + [fetcher stopFetching]; +} + +- (void)stopFetcher:(GTMHTTPFetcher *)fetcher { + [self performSelector:@selector(stopFetcherOnCurrentThread:) + onStartThreadForFetcher:fetcher]; +} + +- (void)fetcherDidStop:(GTMHTTPFetcher *)fetcher { + // Entry point from the fetcher + @synchronized(self) { + NSString *host = fetcher.serviceHost; + if (!host) { + // fetcher has been stopped previously + return; + } + + NSMutableArray *runningForHost = [runningHosts_ objectForKey:host]; + [runningForHost removeObject:fetcher]; + + NSMutableArray *delayedForHost = [delayedHosts_ objectForKey:host]; + [delayedForHost removeObject:fetcher]; + + while ([delayedForHost count] > 0 + && [runningForHost count] < maxRunningFetchersPerHost_) { + // Start another delayed fetcher running, scanning for the minimum + // priority value, defaulting to FIFO for equal priorities + GTMHTTPFetcher *nextFetcher = nil; + for (GTMHTTPFetcher *delayedFetcher in delayedForHost) { + if (nextFetcher == nil + || delayedFetcher.servicePriority < nextFetcher.servicePriority) { + nextFetcher = delayedFetcher; + } + } + + [self addRunningFetcher:nextFetcher forHost:host]; + runningForHost = [runningHosts_ objectForKey:host]; + + [delayedForHost removeObjectIdenticalTo:nextFetcher]; + [self startFetcher:nextFetcher]; + } + + if ([runningForHost count] == 0) { + // None left; remove the empty array + [runningHosts_ removeObjectForKey:host]; + } + + if ([delayedForHost count] == 0) { + [delayedHosts_ removeObjectForKey:host]; + } + + // The fetcher is no longer in the running or the delayed array, + // so remove its host and thread properties + fetcher.serviceHost = nil; + fetcher.thread = nil; + } +} + +- (NSUInteger)numberOfFetchers { + @synchronized(self) { + NSUInteger running = [self numberOfRunningFetchers]; + NSUInteger delayed = [self numberOfDelayedFetchers]; + return running + delayed; + } +} + +- (NSUInteger)numberOfRunningFetchers { + @synchronized(self) { + NSUInteger sum = 0; + for (NSString *host in runningHosts_) { + NSArray *fetchers = [runningHosts_ objectForKey:host]; + sum += [fetchers count]; + } + return sum; + } +} + +- (NSUInteger)numberOfDelayedFetchers { + @synchronized(self) { + NSUInteger sum = 0; + for (NSString *host in delayedHosts_) { + NSArray *fetchers = [delayedHosts_ objectForKey:host]; + sum += [fetchers count]; + } + return sum; + } +} + +- (NSArray *)issuedFetchersWithRequestURL:(NSURL *)requestURL { + @synchronized(self) { + NSMutableArray *array = nil; + NSString *host = [requestURL host]; + if ([host length] == 0) return nil; + + NSURL *absRequestURL = [requestURL absoluteURL]; + + NSArray *runningForHost = [runningHosts_ objectForKey:host]; + for (GTMHTTPFetcher *fetcher in runningForHost) { + NSURL *fetcherURL = [[[fetcher mutableRequest] URL] absoluteURL]; + if ([fetcherURL isEqual:absRequestURL]) { + if (array == nil) { + array = [NSMutableArray array]; + } + [array addObject:fetcher]; + } + } + + NSArray *delayedForHost = [delayedHosts_ objectForKey:host]; + for (GTMHTTPFetcher *fetcher in delayedForHost) { + NSURL *fetcherURL = [[[fetcher mutableRequest] URL] absoluteURL]; + if ([fetcherURL isEqual:absRequestURL]) { + if (array == nil) { + array = [NSMutableArray array]; + } + [array addObject:fetcher]; + } + } + return array; + } +} + +- (void)stopAllFetchers { + @synchronized(self) { + // Remove fetchers from the delayed list to avoid fetcherDidStop: from + // starting more fetchers running as a side effect of stopping one + NSArray *delayedForHosts = [delayedHosts_ allValues]; + [delayedHosts_ removeAllObjects]; + + for (NSArray *delayedForHost in delayedForHosts) { + for (GTMHTTPFetcher *fetcher in delayedForHost) { + [self stopFetcher:fetcher]; + } + } + + NSArray *runningForHosts = [runningHosts_ allValues]; + [runningHosts_ removeAllObjects]; + + for (NSArray *runningForHost in runningForHosts) { + for (GTMHTTPFetcher *fetcher in runningForHost) { + [self stopFetcher:fetcher]; + } + } + } +} + +#pragma mark Fetch History Settings + +// Turn on data caching to receive a copy of previously-retrieved objects. +// Otherwise, fetches may return status 304 (No Change) rather than actual data +- (void)setShouldCacheETaggedData:(BOOL)flag { + self.fetchHistory.shouldCacheETaggedData = flag; +} + +- (BOOL)shouldCacheETaggedData { + return self.fetchHistory.shouldCacheETaggedData; +} + +- (void)setETaggedDataCacheCapacity:(NSUInteger)totalBytes { + self.fetchHistory.memoryCapacity = totalBytes; +} + +- (NSUInteger)ETaggedDataCacheCapacity { + return self.fetchHistory.memoryCapacity; +} + +- (void)setShouldRememberETags:(BOOL)flag { + self.fetchHistory.shouldRememberETags = flag; +} + +- (BOOL)shouldRememberETags { + return self.fetchHistory.shouldRememberETags; +} + +// reset the ETag cache to avoid getting a Not Modified status +// based on prior queries +- (void)clearETaggedDataCache { + [self.fetchHistory clearETaggedDataCache]; +} + +- (void)clearHistory { + [self clearETaggedDataCache]; + [self.fetchHistory removeAllCookies]; +} + +#pragma mark Synchronous Wait for Unit Testing + +- (void)waitForCompletionOfAllFetchersWithTimeout:(NSTimeInterval)timeoutInSeconds { + NSDate* giveUpDate = [NSDate dateWithTimeIntervalSinceNow:timeoutInSeconds]; + BOOL isMainThread = [NSThread isMainThread]; + + while ([self numberOfFetchers] > 0 + && [giveUpDate timeIntervalSinceNow] > 0) { + // Run the current run loop 1/1000 of a second to give the networking + // code a chance to work + if (isMainThread || delegateQueue_ == nil) { + NSDate *stopDate = [NSDate dateWithTimeIntervalSinceNow:0.001]; + [[NSRunLoop currentRunLoop] runUntilDate:stopDate]; + } else { + // Sleep on the delegate queue's background thread. + [NSThread sleepForTimeInterval:0.001]; + } + } +} + +#pragma mark Accessors + +- (NSDictionary *)runningHosts { + return runningHosts_; +} + +- (void)setRunningHosts:(NSDictionary *)dict { + [runningHosts_ autorelease]; + runningHosts_ = [dict mutableCopy]; +} + +- (NSDictionary *)delayedHosts { + return delayedHosts_; +} + +- (void)setDelayedHosts:(NSDictionary *)dict { + [delayedHosts_ autorelease]; + delayedHosts_ = [dict mutableCopy]; +} + +- (id )authorizer { + return authorizer_; +} + +- (void)setAuthorizer:(id )obj { + if (obj != authorizer_) { + [self detachAuthorizer]; + } + + [authorizer_ autorelease]; + authorizer_ = [obj retain]; + + // Use the fetcher service for the authorization fetches if the auth + // object supports fetcher services + if ([authorizer_ respondsToSelector:@selector(setFetcherService:)]) { + [authorizer_ setFetcherService:self]; + } +} + +- (void)detachAuthorizer { + // This method is called by the fetcher service's dealloc and setAuthorizer: + // methods; do not override. + // + // The fetcher service retains the authorizer, and the authorizer has a + // weak pointer to the fetcher service (a non-zeroing pointer for + // compatibility with iOS 4 and Mac OS X 10.5/10.6.) + // + // When this fetcher service no longer uses the authorizer, we want to remove + // the authorizer's dependence on the fetcher service. Authorizers can still + // function without a fetcher service. + if ([authorizer_ respondsToSelector:@selector(fetcherService)]) { + GTMHTTPFetcherService *authFS = [authorizer_ fetcherService]; + if (authFS == self) { + [authorizer_ setFetcherService:nil]; + } + } +} + +@end diff --git a/GTL/Source/HTTPFetcher/GTMHTTPUploadFetcher.h b/GTL/Source/HTTPFetcher/GTMHTTPUploadFetcher.h new file mode 100755 index 0000000..b0ce3b6 --- /dev/null +++ b/GTL/Source/HTTPFetcher/GTMHTTPUploadFetcher.h @@ -0,0 +1,139 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMHTTPUploadFetcher.h +// + +#if (!GDATA_REQUIRE_SERVICE_INCLUDES) || GDATA_INCLUDE_DOCS_SERVICE || \ + GDATA_INCLUDE_YOUTUBE_SERVICE || GDATA_INCLUDE_PHOTOS_SERVICE + +// +// This subclass of GTMHTTPFetcher simulates the series of fetches +// needed for chunked upload as a single fetch operation. +// +// Protocol document: +// http://code.google.com/p/gears/wiki/ResumableHttpRequestsProposal +// +// To the client, the only fetcher that exists is this class; the subsidiary +// fetchers needed for uploading chunks are not visible (though the most recent +// chunk fetcher may be accessed via the -activeFetcher method, and +// -responseHeaders and -statusCode reflect results from the most recent chunk +// fetcher.) +// +// Chunk fetchers are discarded as soon as they have completed. +// + +#pragma once + +#import "GTMHTTPFetcher.h" +#import "GTMHTTPFetcherService.h" + +// async retrieval of an http get or post +@interface GTMHTTPUploadFetcher : GTMHTTPFetcher { + GTMHTTPFetcher *chunkFetcher_; + + // we'll call through to the delegate's sentData and finished selectors + SEL delegateSentDataSEL_; + SEL delegateFinishedSEL_; + + BOOL needsManualProgress_; + + // the initial fetch's body length and bytes actually sent are + // needed for calculating progress during subsequent chunk uploads + NSUInteger initialBodyLength_; + NSUInteger initialBodySent_; + + NSURL *locationURL_; +#if NS_BLOCKS_AVAILABLE + void (^locationChangeBlock_)(NSURL *); +#elif !__LP64__ + // placeholders: for 32-bit builds, keep the size of the object's ivar section + // the same with and without blocks +#ifndef __clang_analyzer__ + id locationChangePlaceholder_; +#endif +#endif + + // uploadData_ or uploadFileHandle_ may be set, but not both + NSData *uploadData_; + NSFileHandle *uploadFileHandle_; + NSInteger uploadFileHandleLength_; + NSString *uploadMIMEType_; + NSUInteger chunkSize_; + BOOL isPaused_; + BOOL isRestartedUpload_; + + // we keep the latest offset into the upload data just for + // progress reporting + NSUInteger currentOffset_; + + // we store the response headers and status code for the most recent + // chunk fetcher + NSDictionary *responseHeaders_; + NSInteger statusCode_; +} + ++ (GTMHTTPUploadFetcher *)uploadFetcherWithRequest:(NSURLRequest *)request + uploadData:(NSData *)data + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(NSUInteger)chunkSize + fetcherService:(GTMHTTPFetcherService *)fetcherServiceOrNil; + ++ (GTMHTTPUploadFetcher *)uploadFetcherWithRequest:(NSURLRequest *)request + uploadFileHandle:(NSFileHandle *)fileHandle + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(NSUInteger)chunkSize + fetcherService:(GTMHTTPFetcherService *)fetcherServiceOrNil; + ++ (GTMHTTPUploadFetcher *)uploadFetcherWithLocation:(NSURL *)locationURL + uploadFileHandle:(NSFileHandle *)fileHandle + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(NSUInteger)chunkSize + fetcherService:(GTMHTTPFetcherService *)fetcherServiceOrNil; +- (void)pauseFetching; +- (void)resumeFetching; +- (BOOL)isPaused; + +@property (retain) NSURL *locationURL; +@property (retain) NSData *uploadData; +@property (retain) NSFileHandle *uploadFileHandle; +@property (copy) NSString *uploadMIMEType; +@property (assign) NSUInteger chunkSize; +@property (assign) NSUInteger currentOffset; + +#if NS_BLOCKS_AVAILABLE +// When the upload location changes, the optional locationChangeBlock will be +// called. It will be called with nil once upload succeeds or can no longer +// be attempted. +@property (copy) void (^locationChangeBlock)(NSURL *locationURL); +#endif + +// the fetcher for the current data chunk, if any +@property (retain) GTMHTTPFetcher *chunkFetcher; + +// the active fetcher is the last chunk fetcher, or the upload fetcher itself +// if no chunk fetcher has yet been created +@property (readonly) GTMHTTPFetcher *activeFetcher; + +// the response headers from the most recently-completed fetch +@property (retain) NSDictionary *responseHeaders; + +// the status code from the most recently-completed fetch +@property (assign) NSInteger statusCode; + +@end + +#endif // #if !GDATA_REQUIRE_SERVICE_INCLUDES diff --git a/GTL/Source/HTTPFetcher/GTMHTTPUploadFetcher.m b/GTL/Source/HTTPFetcher/GTMHTTPUploadFetcher.m new file mode 100755 index 0000000..625d929 --- /dev/null +++ b/GTL/Source/HTTPFetcher/GTMHTTPUploadFetcher.m @@ -0,0 +1,916 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMHTTPUploadFetcher.m +// + +#if (!GDATA_REQUIRE_SERVICE_INCLUDES) || GDATA_INCLUDE_DOCS_SERVICE || \ + GDATA_INCLUDE_YOUTUBE_SERVICE || GDATA_INCLUDE_PHOTOS_SERVICE + +#import "GTMHTTPUploadFetcher.h" + +static NSUInteger const kQueryServerForOffset = NSUIntegerMax; + +@interface GTMHTTPFetcher (ProtectedMethods) +@property (readwrite, retain) NSData *downloadedData; +- (void)releaseCallbacks; +- (void)connectionDidFinishLoading:(NSURLConnection *)connection; +- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error; +@end + +@interface GTMHTTPUploadFetcher () ++ (GTMHTTPUploadFetcher *)uploadFetcherWithRequest:(NSURLRequest *)request + fetcherService:(GTMHTTPFetcherService *)fetcherService; +- (void)setLocationURL:(NSURL *)location + uploadData:(NSData *)data + uploadFileHandle:(NSFileHandle *)fileHandle + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(NSUInteger)chunkSize; + +- (void)uploadNextChunkWithOffset:(NSUInteger)offset; +- (void)uploadNextChunkWithOffset:(NSUInteger)offset + fetcherProperties:(NSMutableDictionary *)props; +- (void)destroyChunkFetcher; + +- (void)handleResumeIncompleteStatusForChunkFetcher:(GTMHTTPFetcher *)chunkFetcher; + +- (void)uploadFetcher:(GTMHTTPFetcher *)fetcher + didSendBytes:(NSInteger)bytesSent + totalBytesSent:(NSInteger)totalBytesSent +totalBytesExpectedToSend:(NSInteger)totalBytesExpected; + +- (void)reportProgressManually; + +- (NSUInteger)fullUploadLength; + +-(BOOL)chunkFetcher:(GTMHTTPFetcher *)chunkFetcher + willRetry:(BOOL)willRetry + forError:(NSError *)error; + +- (void)chunkFetcher:(GTMHTTPFetcher *)chunkFetcher + finishedWithData:(NSData *)data + error:(NSError *)error; +@end + +@interface GTMHTTPUploadFetcher (PrivateMethods) +// private methods of the superclass +- (void)invokeSentDataCallback:(SEL)sel + target:(id)target + didSendBodyData:(NSInteger)bytesWritten + totalBytesWritten:(NSInteger)totalBytesWritten + totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite; + +- (void)invokeFetchCallback:(SEL)sel + target:(id)target + data:(NSData *)data + error:(NSError *)error; + +- (BOOL)invokeRetryCallback:(SEL)sel + target:(id)target + willRetry:(BOOL)willRetry + error:(NSError *)error; +@end + +@implementation GTMHTTPUploadFetcher + ++ (GTMHTTPUploadFetcher *)uploadFetcherWithRequest:(NSURLRequest *)request + uploadData:(NSData *)data + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(NSUInteger)chunkSize + fetcherService:(GTMHTTPFetcherService *)fetcherService { + GTMHTTPUploadFetcher *fetcher = [self uploadFetcherWithRequest:request + fetcherService:fetcherService]; + [fetcher setLocationURL:nil + uploadData:data + uploadFileHandle:nil + uploadMIMEType:uploadMIMEType + chunkSize:chunkSize]; + return fetcher; +} + ++ (GTMHTTPUploadFetcher *)uploadFetcherWithRequest:(NSURLRequest *)request + uploadFileHandle:(NSFileHandle *)fileHandle + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(NSUInteger)chunkSize + fetcherService:(GTMHTTPFetcherService *)fetcherService { + GTMHTTPUploadFetcher *fetcher = [self uploadFetcherWithRequest:request + fetcherService:fetcherService]; + [fetcher setLocationURL:nil + uploadData:nil + uploadFileHandle:fileHandle + uploadMIMEType:uploadMIMEType + chunkSize:chunkSize]; + return fetcher; +} + ++ (GTMHTTPUploadFetcher *)uploadFetcherWithLocation:(NSURL *)locationURL + uploadFileHandle:(NSFileHandle *)fileHandle + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(NSUInteger)chunkSize + fetcherService:(GTMHTTPFetcherService *)fetcherService { + GTMHTTPUploadFetcher *fetcher = [self uploadFetcherWithRequest:nil + fetcherService:fetcherService]; + [fetcher setLocationURL:locationURL + uploadData:nil + uploadFileHandle:fileHandle + uploadMIMEType:uploadMIMEType + chunkSize:chunkSize]; + return fetcher; +} + ++ (GTMHTTPUploadFetcher *)uploadFetcherWithRequest:(NSURLRequest *)request + fetcherService:(GTMHTTPFetcherService *)fetcherService { + // Internal utility method for instantiating fetchers + GTMHTTPUploadFetcher *fetcher; + if (fetcherService) { + fetcher = [fetcherService fetcherWithRequest:request + fetcherClass:self]; + } else { + fetcher = (GTMHTTPUploadFetcher *) [self fetcherWithRequest:request]; + } + return fetcher; +} + +- (void)setLocationURL:(NSURL *)location + uploadData:(NSData *)data + uploadFileHandle:(NSFileHandle *)fileHandle + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(NSUInteger)chunkSize { +#if DEBUG + NSAssert((data == nil) != (fileHandle == nil), + @"upload data and fileHandle are mutually exclusive"); + NSAssert((self.mutableRequest == nil) != (location == nil), + @"request and location are mutually exclusive"); + NSAssert(chunkSize > 0,@"chunk size is zero"); + NSAssert(chunkSize != NSUIntegerMax, @"chunk size is sentinel value"); +#endif + [self setLocationURL:location]; + [self setUploadData:data]; + [self setUploadFileHandle:fileHandle]; + [self setUploadMIMEType:uploadMIMEType]; + [self setChunkSize:chunkSize]; + + // indicate that we've not yet determined the file handle's length + uploadFileHandleLength_ = -1; + + // indicate that we've not yet determined the upload fetcher status + statusCode_ = -1; + + // if this is restarting an upload begun by another fetcher, + // the location is specified but the request is nil + isRestartedUpload_ = (location != nil); + + // add our custom headers to the initial request indicating the data + // type and total size to be delivered later in the chunk requests + NSMutableURLRequest *mutableReq = [self mutableRequest]; + + NSNumber *lengthNum = [NSNumber numberWithUnsignedInteger:[self fullUploadLength]]; + [mutableReq setValue:[lengthNum stringValue] + forHTTPHeaderField:@"X-Upload-Content-Length"]; + + [mutableReq setValue:uploadMIMEType + forHTTPHeaderField:@"X-Upload-Content-Type"]; +} + +- (void)dealloc { + [self releaseCallbacks]; + + [chunkFetcher_ release]; + [locationURL_ release]; +#if NS_BLOCKS_AVAILABLE + [locationChangeBlock_ release]; +#endif + [uploadData_ release]; + [uploadFileHandle_ release]; + [uploadMIMEType_ release]; + [responseHeaders_ release]; + [super dealloc]; +} + +#pragma mark - + +- (NSUInteger)fullUploadLength { + if (uploadData_) { + return [uploadData_ length]; + } else { + if (uploadFileHandleLength_ == -1) { + // first time through, seek to end to determine file length + uploadFileHandleLength_ = (NSInteger) [uploadFileHandle_ seekToEndOfFile]; + } + return (NSUInteger)uploadFileHandleLength_; + } +} + +- (NSData *)uploadSubdataWithOffset:(NSUInteger)offset + length:(NSUInteger)length { + NSData *resultData = nil; + + if (uploadData_) { + NSRange range = NSMakeRange(offset, length); + resultData = [uploadData_ subdataWithRange:range]; + } else { + @try { + [uploadFileHandle_ seekToFileOffset:offset]; + resultData = [uploadFileHandle_ readDataOfLength:length]; + } + @catch (NSException *exception) { + NSLog(@"uploadFileHandle exception: %@", exception); + } + } + + return resultData; +} + +#pragma mark Method overrides affecting the initial fetch only + +- (BOOL)beginFetchWithDelegate:(id)delegate + didFinishSelector:(SEL)finishedSEL { + + GTMAssertSelectorNilOrImplementedWithArgs(delegate, finishedSEL, + @encode(GTMHTTPFetcher *), @encode(NSData *), @encode(NSError *), 0); + + // replace the finishedSEL with our own, since the initial finish callback + // is just the beginning of the upload experience + delegateFinishedSEL_ = finishedSEL; + + // if the client is running early 10.5 or iPhone 2, we may need to manually + // send progress indication since NSURLConnection won't be calling back + // to us during uploads + needsManualProgress_ = ![GTMHTTPFetcher doesSupportSentDataCallback]; + + initialBodyLength_ = [[self postData] length]; + + if (isRestartedUpload_) { + if (![self isPaused]) { + if (delegate) { + [self setDelegate:delegate]; + finishedSel_ = finishedSEL; + } + [self uploadNextChunkWithOffset:kQueryServerForOffset]; + } + return YES; + } + + // we don't need a finish selector since we're overriding + // -connectionDidFinishLoading + return [super beginFetchWithDelegate:delegate + didFinishSelector:NULL]; +} + +#if NS_BLOCKS_AVAILABLE +- (BOOL)beginFetchWithCompletionHandler:(void (^)(NSData *data, NSError *error))handler { + // we don't want to call into the delegate's completion block immediately + // after the finish of the initial connection (the delegate is called only + // when uploading finishes), so we substitute our own completion block to be + // called when the initial connection finishes + void (^holdBlock)(NSData *data, NSError *error) = [[handler copy] autorelease]; + + BOOL flag = [super beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { + // callback + if (!isRestartedUpload_) { + if (error == nil) { + // swap in the actual completion block now, as it will be called later + // when the upload chunks have completed + [completionBlock_ autorelease]; + completionBlock_ = [holdBlock copy]; + } else { + // pass the error on to the actual completion block + holdBlock(nil, error); + } + } else { + // If there was no initial request, then this fetch is resuming some + // other uploadFetcher's initial request, and the superclass's connection + // is never used, so at this point we call the user's actual completion + // block. + holdBlock(data, error); + } + }]; + return flag; +} +#endif + +- (void)connection:(NSURLConnection *)connection + didSendBodyData:(NSInteger)bytesWritten + totalBytesWritten:(NSInteger)totalBytesWritten +totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite { + + // ignore this callback if we're doing manual progress, mainly so that + // we won't see duplicate progress callbacks when testing with + // doesSupportSentDataCallback turned off + if (needsManualProgress_) return; + + [self uploadFetcher:self + didSendBytes:bytesWritten + totalBytesSent:totalBytesWritten +totalBytesExpectedToSend:totalBytesExpectedToWrite]; +} + +- (BOOL)shouldReleaseCallbacksUponCompletion { + // we don't want the superclass to release the delegate and callback + // blocks once the initial fetch has finished + // + // this is invoked for only successful completion of the connection; + // an error always will invoke and release the callbacks + return NO; +} + +- (void)invokeFinalCallbacksWithData:(NSData *)data + error:(NSError *)error + shouldInvalidateLocation:(BOOL)shouldInvalidateLocation { + // avoid issues due to being released indirectly by a callback + [[self retain] autorelease]; + + if (shouldInvalidateLocation) { + [self setLocationURL:nil]; + } + + if (delegate_ && delegateFinishedSEL_) { + [self invokeFetchCallback:delegateFinishedSEL_ + target:delegate_ + data:data + error:error]; + } + +#if NS_BLOCKS_AVAILABLE + if (completionBlock_) { + completionBlock_(data, error); + } + + [self setLocationChangeBlock:nil]; +#endif + + [self releaseCallbacks]; +} + +- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { + // handle failure of the initial fetch as a simple fetcher failure, including + // calling the delegate, and allowing retry to happen if appropriate + SEL prevSel = finishedSel_; // should be null + finishedSel_ = delegateFinishedSEL_; + [super connection:connection didFailWithError:error]; + + // If retry later happens and succeeds, it shouldn't message the delegate + // since we'll continue to chunk uploads. + finishedSel_ = prevSel; +} + +- (void)connectionDidFinishLoading:(NSURLConnection *)connection { + + // we land here once the initial fetch sending the initial POST body + // has completed + + // let the superclass end its connection + [super connectionDidFinishLoading:connection]; + + NSInteger statusCode = [super statusCode]; + [self setStatusCode:statusCode]; + + if (statusCode >= 300) { + NSError *error = [NSError errorWithDomain:kGTMHTTPFetcherStatusDomain + code:statusCode + userInfo:nil]; + [self invokeFinalCallbacksWithData:[self downloadedData] + error:error + shouldInvalidateLocation:YES]; + return; + } + +#if DEBUG + // The initial response of the resumable upload protocol should have an + // empty body + // + // This assert typically happens because the upload create/edit link URL was + // not supplied with the request, and the server is thus expecting a non- + // resumable request/response. + NSAssert([[self downloadedData] length] == 0, + @"unexpected response data (uploading to the wrong URL?)"); +#endif + + // we need to get the upload URL from the location header to continue + NSDictionary *responseHeaders = [self responseHeaders]; + NSString *locationURLStr = [responseHeaders objectForKey:@"Location"]; +#if DEBUG + NSAssert([locationURLStr length] > 0, @"need upload location hdr"); +#endif + + if ([locationURLStr length] == 0) { + // we cannot continue since we do not know the location to use + // as our upload destination + // + // we'll consider this status 501 Not Implemented + NSError *error = [NSError errorWithDomain:kGTMHTTPFetcherStatusDomain + code:501 + userInfo:nil]; + [self invokeFinalCallbacksWithData:[self downloadedData] + error:error + shouldInvalidateLocation:YES]; + return; + } + + [self setLocationURL:[NSURL URLWithString:locationURLStr]]; + + // we've now sent all of the initial post body data, so we need to include + // its size in future progress indicator callbacks + initialBodySent_ = initialBodyLength_; + + if (needsManualProgress_) { + [self reportProgressManually]; + } + + // just in case the user paused us during the initial fetch... + if (![self isPaused]) { + [self uploadNextChunkWithOffset:0]; + } +} + +#pragma mark Chunk fetching methods + +- (void)uploadNextChunkWithOffset:(NSUInteger)offset { + // use the properties in each chunk fetcher + NSMutableDictionary *props = [self properties]; + + [self uploadNextChunkWithOffset:offset + fetcherProperties:props]; +} + +- (void)uploadNextChunkWithOffset:(NSUInteger)offset + fetcherProperties:(NSMutableDictionary *)props { + // upload another chunk + NSUInteger chunkSize = [self chunkSize]; + + NSString *rangeStr, *lengthStr; + NSData *chunkData; + + NSUInteger dataLen = [self fullUploadLength]; + + if (offset == kQueryServerForOffset) { + // resuming, so we'll initially send an empty data block and wait for the + // server to tell us where the current offset really is + chunkData = [NSData data]; + rangeStr = [NSString stringWithFormat:@"bytes */%llu", + (unsigned long long)dataLen]; + lengthStr = @"0"; + offset = 0; + } else { + // uploading the next data chunk +#if DEBUG + NSAssert2(offset < dataLen, @"offset %llu exceeds data length %llu", + (unsigned long long)offset, (unsigned long long)dataLen); +#endif + + NSUInteger thisChunkSize = chunkSize; + + // if the chunk size is bigger than the remaining data, or else + // it's close enough in size to the remaining data that we'd rather + // avoid having a whole extra http fetch for the leftover bit, then make + // this chunk size exactly match the remaining data size + BOOL isChunkTooBig = (thisChunkSize + offset > dataLen); + BOOL isChunkAlmostBigEnough = (dataLen - offset < thisChunkSize + 2500); + + if (isChunkTooBig || isChunkAlmostBigEnough) { + thisChunkSize = dataLen - offset; + } + + chunkData = [self uploadSubdataWithOffset:offset + length:thisChunkSize]; + + rangeStr = [NSString stringWithFormat:@"bytes %llu-%llu/%llu", + (unsigned long long)offset, + (unsigned long long)(offset + thisChunkSize - 1), + (unsigned long long)dataLen]; + lengthStr = [NSString stringWithFormat:@"%llu", + (unsigned long long)thisChunkSize]; + } + + // track the current offset for progress reporting + [self setCurrentOffset:offset]; + + // + // make the request for fetching + // + + // the chunk upload URL requires no authentication header + NSURL *locURL = [self locationURL]; + NSMutableURLRequest *chunkRequest = [NSMutableURLRequest requestWithURL:locURL]; + + [chunkRequest setHTTPMethod:@"PUT"]; + + // copy the user-agent from the original connection + NSURLRequest *origRequest = [self mutableRequest]; + NSString *userAgent = [origRequest valueForHTTPHeaderField:@"User-Agent"]; + if ([userAgent length] > 0) { + [chunkRequest setValue:userAgent forHTTPHeaderField:@"User-Agent"]; + } + + [chunkRequest setValue:rangeStr forHTTPHeaderField:@"Content-Range"]; + [chunkRequest setValue:lengthStr forHTTPHeaderField:@"Content-Length"]; + + NSString *uploadMIMEType = [self uploadMIMEType]; + [chunkRequest setValue:uploadMIMEType forHTTPHeaderField:@"Content-Type"]; + + // + // make a new fetcher + // + GTMHTTPFetcher *chunkFetcher; + + chunkFetcher = [GTMHTTPFetcher fetcherWithRequest:chunkRequest]; + [chunkFetcher setDelegateQueue:[self delegateQueue]]; + [chunkFetcher setRunLoopModes:[self runLoopModes]]; + + // if the upload fetcher has a comment, use the same comment for chunks + NSString *baseComment = [self comment]; + if (baseComment) { + [chunkFetcher setCommentWithFormat:@"%@ (%@)", baseComment, rangeStr]; + } + + // give the chunk fetcher the same properties as the previous chunk fetcher + [chunkFetcher setProperties:props]; + + // post the appropriate subset of the full data + [chunkFetcher setPostData:chunkData]; + + // copy other fetcher settings to the new fetcher + [chunkFetcher setRetryEnabled:[self isRetryEnabled]]; + [chunkFetcher setMaxRetryInterval:[self maxRetryInterval]]; + [chunkFetcher setSentDataSelector:[self sentDataSelector]]; + [chunkFetcher setCookieStorageMethod:[self cookieStorageMethod]]; + + if ([self isRetryEnabled]) { + // we interpose our own retry method both so the sender is the upload + // fetcher, and so we can change the request to ask the server to + // tell us where to resume the chunk + [chunkFetcher setRetrySelector:@selector(chunkFetcher:willRetry:forError:)]; + } + + [self setMutableRequest:chunkRequest]; + + // when fetching chunks, a 308 status means "upload more chunks", but + // success (200 or 201 status) and other failures are no different than + // for the regular object fetchers + BOOL didFetch = [chunkFetcher beginFetchWithDelegate:self + didFinishSelector:@selector(chunkFetcher:finishedWithData:error:)]; + if (!didFetch) { + // something went horribly wrong, like the chunk upload URL is invalid + NSError *error = [NSError errorWithDomain:kGTMHTTPFetcherErrorDomain + code:kGTMHTTPFetcherErrorChunkUploadFailed + userInfo:nil]; + + [self invokeFinalCallbacksWithData:nil + error:error + shouldInvalidateLocation:YES]; + [self destroyChunkFetcher]; + } else { + // hang on to the fetcher in case we need to cancel it + [self setChunkFetcher:chunkFetcher]; + } +} + +- (void)reportProgressManually { + // reportProgressManually should be called only when there's no + // NSURLConnection support for sent data callbacks + + // the user wants upload progress, and there's no support in NSURLConnection + // for it, so we'll provide it here after each chunk + // + // the progress will be based on the uploadData and currentOffset, + // so we can pass zeros + [self uploadFetcher:self + didSendBytes:0 + totalBytesSent:0 +totalBytesExpectedToSend:0]; +} + +- (void)chunkFetcher:(GTMHTTPFetcher *)chunkFetcher finishedWithData:(NSData *)data error:(NSError *)error { + [self setStatusCode:[chunkFetcher statusCode]]; + [self setResponseHeaders:[chunkFetcher responseHeaders]]; + + if (error) { + int status = (int)[error code]; + + // status 308 is "resume incomplete", meaning we should get the offset + // from the Range header and upload the next chunk + // + // any other status really is an error + if (status == 308) { + [self handleResumeIncompleteStatusForChunkFetcher:chunkFetcher]; + return; + } else { + // some unexpected status has occurred; handle it as we would a regular + // object fetcher failure + error = [NSError errorWithDomain:kGTMHTTPFetcherStatusDomain + code:status + userInfo:nil]; + [self invokeFinalCallbacksWithData:data + error:error + shouldInvalidateLocation:NO]; + [self destroyChunkFetcher]; + return; + } + } else { + // the final chunk has uploaded successfully + #if DEBUG + NSInteger status = [chunkFetcher statusCode]; + NSAssert1(status == 200 || status == 201, + @"unexpected chunks status %d", (int)status); + #endif + + // take the chunk fetcher's data as our own + self.downloadedData = data; + + if (needsManualProgress_) { + // do a final upload progress report, indicating all of the chunk data + // has been sent + NSUInteger fullDataLength = [self fullUploadLength] + initialBodyLength_; + [self setCurrentOffset:fullDataLength]; + + [self reportProgressManually]; + } + + // we're done + [self invokeFinalCallbacksWithData:data + error:error + shouldInvalidateLocation:YES]; + + [self destroyChunkFetcher]; + } +} + +- (void)handleResumeIncompleteStatusForChunkFetcher:(GTMHTTPFetcher *)chunkFetcher { + + NSDictionary *responseHeaders = [chunkFetcher responseHeaders]; + + // parse the Range header from the server, since that tells us where we really + // want the next chunk to begin. + // + // lack of a range header means the server has no bytes stored for this upload + NSString *rangeStr = [responseHeaders objectForKey:@"Range"]; + NSUInteger newOffset = 0; + if (rangeStr != nil) { + // parse a content-range, like "bytes=0-999", to find where our new + // offset for uploading from the data really is (at the end of the + // range) + NSScanner *scanner = [NSScanner scannerWithString:rangeStr]; + long long rangeStart = 0, rangeEnd = 0; + if ([scanner scanString:@"bytes=" intoString:nil] + && [scanner scanLongLong:&rangeStart] + && [scanner scanString:@"-" intoString:nil] + && [scanner scanLongLong:&rangeEnd]) { + newOffset = (NSUInteger)rangeEnd + 1; + } + } + + [self setCurrentOffset:newOffset]; + + if (needsManualProgress_) { + [self reportProgressManually]; + } + + // if the response specifies a location, use that for future chunks + NSString *locationURLStr = [responseHeaders objectForKey:@"Location"]; + if ([locationURLStr length] > 0) { + [self setLocationURL:[NSURL URLWithString:locationURLStr]]; + } + + // we want to destroy this chunk fetcher before creating the next one, but + // we want to pass on its properties + NSMutableDictionary *props = [[[chunkFetcher properties] retain] autorelease]; + + // we no longer need to be able to cancel this chunkFetcher + [self destroyChunkFetcher]; + + // We may in the future handle Retry-After and ETag headers per + // http://code.google.com/p/gears/wiki/ResumableHttpRequestsProposal + // but they are not currently sent by the upload server + + [self uploadNextChunkWithOffset:newOffset + fetcherProperties:props]; +} + + +-(BOOL)chunkFetcher:(GTMHTTPFetcher *)chunkFetcher willRetry:(BOOL)willRetry forError:(NSError *)error { + if ([error code] == 308 + && [[error domain] isEqual:kGTMHTTPFetcherStatusDomain]) { + // 308 is a normal chunk fethcher response, not an error + // that needs to be retried + return NO; + } + + if (delegate_ && retrySel_) { + + // call the client with the upload fetcher as the sender (not the chunk + // fetcher) to find out if it wants to retry + willRetry = [self invokeRetryCallback:retrySel_ + target:delegate_ + willRetry:willRetry + error:error]; + } + +#if NS_BLOCKS_AVAILABLE + if (retryBlock_) { + willRetry = retryBlock_(willRetry, error); + } +#endif + + if (willRetry) { + // change the request being retried into a query to the server to + // tell us where to resume + NSMutableURLRequest *chunkRequest = [chunkFetcher mutableRequest]; + + NSUInteger dataLen = [self fullUploadLength]; + NSString *rangeStr = [NSString stringWithFormat:@"bytes */%llu", + (unsigned long long)dataLen]; + + [chunkRequest setValue:rangeStr forHTTPHeaderField:@"Content-Range"]; + [chunkRequest setValue:@"0" forHTTPHeaderField:@"Content-Length"]; + [chunkFetcher setPostData:[NSData data]]; + + // we don't know what our actual offset is anymore, but the server + // will tell us + [self setCurrentOffset:0]; + } + + return willRetry; +} + +- (void)destroyChunkFetcher { + [chunkFetcher_ stopFetching]; + [chunkFetcher_ setProperties:nil]; + [chunkFetcher_ autorelease]; + chunkFetcher_ = nil; +} + +// the chunk fetchers use this as their sentData method +- (void)uploadFetcher:(GTMHTTPFetcher *)chunkFetcher + didSendBytes:(NSInteger)bytesSent + totalBytesSent:(NSInteger)totalBytesSent +totalBytesExpectedToSend:(NSInteger)totalBytesExpected { + // the actual total bytes sent include the initial XML sent, plus the + // offset into the batched data prior to this fetcher + totalBytesSent += initialBodySent_ + currentOffset_; + + // the total bytes expected include the initial XML and the full chunked + // data, independent of how big this fetcher's chunk is + totalBytesExpected = (NSInteger)(initialBodyLength_ + [self fullUploadLength]); + + if (delegate_ && delegateSentDataSEL_) { + // ensure the chunk fetcher survives the callback in case the user pauses + // the upload process + [[chunkFetcher retain] autorelease]; + + [self invokeSentDataCallback:delegateSentDataSEL_ + target:delegate_ + didSendBodyData:bytesSent + totalBytesWritten:totalBytesSent + totalBytesExpectedToWrite:totalBytesExpected]; + } + +#if NS_BLOCKS_AVAILABLE + if (sentDataBlock_) { + sentDataBlock_(bytesSent, totalBytesSent, totalBytesExpected); + } +#endif +} + +#pragma mark - + +- (BOOL)isPaused { + return isPaused_; +} + +- (void)pauseFetching { + isPaused_ = YES; + + // pausing just means stopping the current chunk from uploading; + // when we resume, the magic offset value will force us to send + // a request to the server to figure out what bytes to start sending + // + // we won't try to cancel the initial data upload, but rather will look for + // the magic offset value in -connectionDidFinishLoading before + // creating first initial chunk fetcher, just in case the user + // paused during the initial data upload + [self destroyChunkFetcher]; +} + +- (void)resumeFetching { + if (isPaused_) { + isPaused_ = NO; + + [self uploadNextChunkWithOffset:kQueryServerForOffset]; + } +} + +- (void)stopFetching { + // overrides the superclass + [self destroyChunkFetcher]; + + [super stopFetching]; +} + +#pragma mark - + +@synthesize uploadData = uploadData_, + uploadFileHandle = uploadFileHandle_, + uploadMIMEType = uploadMIMEType_, + chunkSize = chunkSize_, + currentOffset = currentOffset_, + chunkFetcher = chunkFetcher_; + +#if NS_BLOCKS_AVAILABLE +@synthesize locationChangeBlock = locationChangeBlock_; +#endif + +@dynamic activeFetcher; +@dynamic responseHeaders; +@dynamic statusCode; + +- (NSDictionary *)responseHeaders { + // overrides the superclass + + // if asked for the fetcher's response, use the most recent fetcher + if (responseHeaders_) { + return responseHeaders_; + } else { + // no chunk fetcher yet completed, so return whatever we have from the + // initial fetch + return [super responseHeaders]; + } +} + +- (void)setResponseHeaders:(NSDictionary *)dict { + [responseHeaders_ autorelease]; + responseHeaders_ = [dict retain]; +} + +- (NSInteger)statusCode { + if (statusCode_ != -1) { + // overrides the superclass to indicate status appropriate to the initial + // or latest chunk fetch + return statusCode_; + } else { + return [super statusCode]; + } +} + +- (void)setStatusCode:(NSInteger)val { + statusCode_ = val; +} + +- (SEL)sentDataSelector { + // overrides the superclass +#if NS_BLOCKS_AVAILABLE + BOOL hasSentDataBlock = (sentDataBlock_ != NULL); +#else + BOOL hasSentDataBlock = NO; +#endif + if ((delegateSentDataSEL_ || hasSentDataBlock) && !needsManualProgress_) { + return @selector(uploadFetcher:didSendBytes:totalBytesSent:totalBytesExpectedToSend:); + } else { + return NULL; + } +} + +- (void)setSentDataSelector:(SEL)theSelector { + // overrides the superclass + delegateSentDataSEL_ = theSelector; +} + +- (GTMHTTPFetcher *)activeFetcher { + if (chunkFetcher_) { + return chunkFetcher_; + } else { + return self; + } +} + +- (NSURL *)locationURL { + return locationURL_; +} + +- (void)setLocationURL:(NSURL *)url { + if (url != locationURL_) { + [locationURL_ release]; + locationURL_ = [url retain]; + +#if NS_BLOCKS_AVAILABLE + if (locationChangeBlock_) { + locationChangeBlock_(url); + } +#endif + } +} +@end + +#endif // #if !GDATA_REQUIRE_SERVICE_INCLUDES diff --git a/GTL/Source/HTTPFetcher/GTMMIMEDocument.h b/GTL/Source/HTTPFetcher/GTMMIMEDocument.h new file mode 100644 index 0000000..62b037b --- /dev/null +++ b/GTL/Source/HTTPFetcher/GTMMIMEDocument.h @@ -0,0 +1,57 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +// This is a simple class to create a MIME document. To use, allocate +// a new GTMMIMEDocument and start adding parts as necessary. When you are +// done adding parts, call generateInputStream to get an NSInputStream +// containing the contents of your MIME document. +// +// A good reference for MIME is http://en.wikipedia.org/wiki/MIME + +#import + +#if defined(GTL_TARGET_NAMESPACE) + // we're using target namespace macros + #import "GTLDefines.h" +#elif defined(GDATA_TARGET_NAMESPACE) + #import "GDataDefines.h" +#endif + +@interface GTMMIMEDocument : NSObject { + NSMutableArray* parts_; // Contains an ordered set of MimeParts + unsigned long long length_; // Length in bytes of the document. + u_int32_t randomSeed_; // for testing +} + ++ (GTMMIMEDocument *)MIMEDocument; + +// Adds a new part to this mime document with the given headers and body. The +// headers keys and values should be NSStrings +- (void)addPartWithHeaders:(NSDictionary *)headers + body:(NSData *)body; + +// An inputstream that can be used to efficiently read the contents of the +// mime document. +- (void)generateInputStream:(NSInputStream **)outStream + length:(unsigned long long*)outLength + boundary:(NSString **)outBoundary; + +// ------ UNIT TESTING ONLY BELOW ------ + +// For unittesting only, seeds the random number generator +- (void)seedRandomWith:(u_int32_t)seed; + +@end diff --git a/GTL/Source/HTTPFetcher/GTMMIMEDocument.m b/GTL/Source/HTTPFetcher/GTMMIMEDocument.m new file mode 100644 index 0000000..a12786b --- /dev/null +++ b/GTL/Source/HTTPFetcher/GTMMIMEDocument.m @@ -0,0 +1,281 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#import "GTMMIMEDocument.h" +#import "GTMGatherInputStream.h" + +// memsrch +// +// Helper routine to search for the existence of a set of bytes (needle) within +// a presumed larger set of bytes (haystack). +// +static BOOL memsrch(const unsigned char* needle, NSUInteger needle_len, + const unsigned char* haystack, NSUInteger haystack_len); + +@interface GTMMIMEPart : NSObject { + NSData* headerData_; // Header content including the ending "\r\n". + NSData* bodyData_; // The body data. +} + ++ (GTMMIMEPart *)partWithHeaders:(NSDictionary *)headers body:(NSData *)body; +- (id)initWithHeaders:(NSDictionary *)headers body:(NSData *)body; +- (BOOL)containsBytes:(const unsigned char *)bytes length:(NSUInteger)length; +- (NSData *)header; +- (NSData *)body; +- (NSUInteger)length; +@end + +@implementation GTMMIMEPart + ++ (GTMMIMEPart *)partWithHeaders:(NSDictionary *)headers body:(NSData *)body { + + return [[[self alloc] initWithHeaders:headers + body:body] autorelease]; +} + +- (id)initWithHeaders:(NSDictionary *)headers + body:(NSData *)body { + + if ((self = [super init]) != nil) { + + bodyData_ = [body retain]; + + // generate the header data by coalescing the dictionary as + // lines of "key: value\r\m" + NSMutableString* headerString = [NSMutableString string]; + + // sort the header keys so we have a deterministic order for + // unit testing + SEL sortSel = @selector(caseInsensitiveCompare:); + NSArray *sortedKeys = [[headers allKeys] sortedArrayUsingSelector:sortSel]; + + for (NSString *key in sortedKeys) { + NSString* value = [headers objectForKey:key]; + +#if DEBUG + // look for troublesome characters in the header keys & values + static NSCharacterSet *badChars = nil; + if (!badChars) { + badChars = [[NSCharacterSet characterSetWithCharactersInString:@":\r\n"] retain]; + } + + NSRange badRange = [key rangeOfCharacterFromSet:badChars]; + NSAssert1(badRange.location == NSNotFound, @"invalid key: %@", key); + + badRange = [value rangeOfCharacterFromSet:badChars]; + NSAssert1(badRange.location == NSNotFound, @"invalid value: %@", value); +#endif + + [headerString appendFormat:@"%@: %@\r\n", key, value]; + } + + // headers end with an extra blank line + [headerString appendString:@"\r\n"]; + + headerData_ = [[headerString dataUsingEncoding:NSUTF8StringEncoding] retain]; + } + return self; +} + +- (void) dealloc { + [headerData_ release]; + [bodyData_ release]; + [super dealloc]; +} + +// Returns true if the parts contents contain the given set of bytes. +// +// NOTE: We assume that the 'bytes' we are checking for do not contain "\r\n", +// so we don't need to check the concatenation of the header and body bytes. +- (BOOL)containsBytes:(const unsigned char*)bytes length:(NSUInteger)length { + + // This uses custom memsrch() rather than strcpy because the encoded data may + // contain null values. + return memsrch(bytes, length, [headerData_ bytes], [headerData_ length]) || + memsrch(bytes, length, [bodyData_ bytes], [bodyData_ length]); +} + +- (NSData *)header { + return headerData_; +} + +- (NSData *)body { + return bodyData_; +} + +- (NSUInteger)length { + return [headerData_ length] + [bodyData_ length]; +} +@end + +@implementation GTMMIMEDocument + ++ (GTMMIMEDocument *)MIMEDocument { + return [[[self alloc] init] autorelease]; +} + +- (id)init { + if ((self = [super init]) != nil) { + + parts_ = [[NSMutableArray alloc] init]; + + // Seed the random number generator used to generate mime boundaries + srandomdev(); + } + return self; +} + +- (void)dealloc { + [parts_ release]; + [super dealloc]; +} + +// Adds a new part to this mime document with the given headers and body. +- (void)addPartWithHeaders:(NSDictionary *)headers + body:(NSData *)body { + + GTMMIMEPart* part = [GTMMIMEPart partWithHeaders:headers body:body]; + [parts_ addObject:part]; +} + +// For unit testing only, seeds the random number generator so that we will +// have reproducible boundary strings. +- (void)seedRandomWith:(u_int32_t)seed { + randomSeed_ = seed; +} + +- (u_int32_t)random { + if (randomSeed_) { + // for testing only + return randomSeed_++; + } else { + return arc4random(); + } +} + +// Computes the mime boundary to use. This should only be called +// after all the desired document parts have been added since it must compute +// a boundary that does not exist in the document data. +- (NSString *)uniqueBoundary { + + // use an easily-readable boundary string + NSString *const kBaseBoundary = @"END_OF_PART"; + + NSMutableString *boundary = [NSMutableString stringWithString:kBaseBoundary]; + + // if the boundary isn't unique, append random numbers, up to 10 attempts; + // if that's still not unique, use a random number sequence instead, + // and call it good + BOOL didCollide = NO; + + const int maxTries = 10; // Arbitrarily chosen maximum attempts. + for (int tries = 0; tries < maxTries; ++tries) { + + NSData *data = [boundary dataUsingEncoding:NSUTF8StringEncoding]; + const void *dataBytes = [data bytes]; + NSUInteger dataLen = [data length]; + + for (GTMMIMEPart *part in parts_) { + didCollide = [part containsBytes:dataBytes length:dataLen]; + if (didCollide) break; + } + + if (!didCollide) break; // we're fine, no more attempts needed + + // try again with a random number appended + boundary = [NSString stringWithFormat:@"%@_%08x", kBaseBoundary, + [self random]]; + } + + if (didCollide) { + // fallback... two random numbers + boundary = [NSString stringWithFormat:@"%08x_tedborg_%08x", + [self random], [self random]]; + } + + return boundary; +} + +- (void)generateInputStream:(NSInputStream **)outStream + length:(unsigned long long*)outLength + boundary:(NSString **)outBoundary { + + // The input stream is of the form: + // --boundary + // [part_1_headers] + // [part_1_data] + // --boundary + // [part_2_headers] + // [part_2_data] + // --boundary-- + + // First we set up our boundary NSData objects. + NSString *boundary = [self uniqueBoundary]; + + NSString *mainBoundary = [NSString stringWithFormat:@"\r\n--%@\r\n", boundary]; + NSString *endBoundary = [NSString stringWithFormat:@"\r\n--%@--\r\n", boundary]; + + NSData *mainBoundaryData = [mainBoundary dataUsingEncoding:NSUTF8StringEncoding]; + NSData *endBoundaryData = [endBoundary dataUsingEncoding:NSUTF8StringEncoding]; + + // Now we add them all in proper order to our dataArray. + NSMutableArray* dataArray = [NSMutableArray array]; + unsigned long long length = 0; + + for (GTMMIMEPart* part in parts_) { + [dataArray addObject:mainBoundaryData]; + [dataArray addObject:[part header]]; + [dataArray addObject:[part body]]; + + length += [part length] + [mainBoundaryData length]; + } + + [dataArray addObject:endBoundaryData]; + length += [endBoundaryData length]; + + if (outLength) *outLength = length; + if (outStream) *outStream = [GTMGatherInputStream streamWithArray:dataArray]; + if (outBoundary) *outBoundary = boundary; +} + +@end + + +// memsrch - Return YES if needle is found in haystack, else NO. +static BOOL memsrch(const unsigned char* needle, NSUInteger needleLen, + const unsigned char* haystack, NSUInteger haystackLen) { + + // This is a simple approach. We start off by assuming that both memchr() and + // memcmp are implemented efficiently on the given platform. We search for an + // instance of the first char of our needle in the haystack. If the remaining + // size could fit our needle, then we memcmp to see if it occurs at this point + // in the haystack. If not, we move on to search for the first char again, + // starting from the next character in the haystack. + const unsigned char* ptr = haystack; + NSUInteger remain = haystackLen; + while ((ptr = memchr(ptr, needle[0], remain)) != 0) { + remain = haystackLen - (NSUInteger)(ptr - haystack); + if (remain < needleLen) { + return NO; + } + if (memcmp(ptr, needle, needleLen) == 0) { + return YES; + } + ptr++; + remain--; + } + return NO; +} diff --git a/GTL/Source/HTTPFetcher/GTMReadMonitorInputStream.h b/GTL/Source/HTTPFetcher/GTMReadMonitorInputStream.h new file mode 100644 index 0000000..9e4b3f7 --- /dev/null +++ b/GTL/Source/HTTPFetcher/GTMReadMonitorInputStream.h @@ -0,0 +1,65 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + + +// Define only for Mac OS X 10.6+ or iPhone OS 4.0+. +#ifndef GTM_NSSTREAM_DELEGATE + #if (TARGET_OS_MAC && !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1060)) || \ + (TARGET_OS_IPHONE && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 40000)) + #define GTM_NSSTREAM_DELEGATE + #else + #define GTM_NSSTREAM_DELEGATE + #endif +#endif // !defined(GTM_NSSTREAM_DELEGATE) + +#ifdef GTM_TARGET_NAMESPACE + // we're using target namespace macros + #import "GTMDefines.h" +#endif + +@interface GTMReadMonitorInputStream : NSInputStream GTM_NSSTREAM_DELEGATE { + @protected + NSInputStream *inputStream_; // encapsulated stream that does the work + + NSThread *thread_; // thread in which this object was created + NSArray *runLoopModes_; // modes for calling callbacks, when necessary + + @private + id readDelegate_; + SEL readSelector_; +} + +// length is passed to the progress callback; it may be zero +// if the progress callback can handle that ++ (id)inputStreamWithStream:(NSInputStream *)input; + +- (id)initWithStream:(NSInputStream *)input; + +// The read monitor selector is called when bytes have been read. It should +// have a signature matching +// +// - (void)inputStream:(GTMReadMonitorInputStream *)stream +// readIntoBuffer:(uint8_t *)buffer +// length:(NSUInteger)length; + +@property (assign) id readDelegate; // WEAK +@property (assign) SEL readSelector; + +// Modes for invoking callbacks, when necessary +@property (retain) NSArray *runLoopModes; + +@end diff --git a/GTL/Source/HTTPFetcher/GTMReadMonitorInputStream.m b/GTL/Source/HTTPFetcher/GTMReadMonitorInputStream.m new file mode 100644 index 0000000..abd847c --- /dev/null +++ b/GTL/Source/HTTPFetcher/GTMReadMonitorInputStream.m @@ -0,0 +1,185 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "GTMReadMonitorInputStream.h" + +@interface GTMReadMonitorInputStream () +- (void)invokeReadSelectorWithBuffer:(NSData *)data; +@end + +@implementation GTMReadMonitorInputStream + +@synthesize readDelegate = readDelegate_; +@synthesize readSelector = readSelector_; +@synthesize runLoopModes = runLoopModes_; + +// We'll forward all unhandled messages to the NSInputStream class +// or to the encapsulated input stream. This is needed +// for all messages sent to NSInputStream which aren't +// handled by our superclass; that includes various private run +// loop calls. ++ (NSMethodSignature *)methodSignatureForSelector:(SEL)selector { + return [NSInputStream methodSignatureForSelector:selector]; +} + ++ (void)forwardInvocation:(NSInvocation*)invocation { + [invocation invokeWithTarget:[NSInputStream class]]; +} + +- (NSMethodSignature*)methodSignatureForSelector:(SEL)selector { + return [inputStream_ methodSignatureForSelector:selector]; +} + +- (void)forwardInvocation:(NSInvocation*)invocation { + [invocation invokeWithTarget:inputStream_]; +} + +#pragma mark - + ++ (id)inputStreamWithStream:(NSInputStream *)input { + return [[[self alloc] initWithStream:input] autorelease]; +} + +- (id)initWithStream:(NSInputStream *)input { + self = [super init]; + if (self) { + inputStream_ = [input retain]; + thread_ = [[NSThread currentThread] retain]; + } + return self; +} + +- (id)init { + return [self initWithStream:nil]; +} + +- (void)dealloc { + [inputStream_ release]; + [thread_ release]; + [runLoopModes_ release]; + [super dealloc]; +} + +#pragma mark - + +- (NSInteger)read:(uint8_t *)buffer maxLength:(NSUInteger)len { + // Read from the encapsulated stream + NSInteger numRead = [inputStream_ read:buffer maxLength:len]; + if (numRead > 0) { + + BOOL isOnOriginalThread = [thread_ isEqual:[NSThread currentThread]]; + + if (readDelegate_ && readSelector_) { + // call the read selector with the buffer and number of bytes actually + // read into it + SEL sel = @selector(invokeReadSelectorWithBuffer:); + + if (isOnOriginalThread) { + // invoke immediately + NSData *data = [NSData dataWithBytesNoCopy:buffer + length:(NSUInteger)numRead + freeWhenDone:NO]; + [self performSelector:sel withObject:data]; + } else { + // copy the buffer into an NSData to be retained by the + // performSelector, and invoke on the proper thread + NSData *data = [NSData dataWithBytes:buffer length:(NSUInteger)numRead]; + if (runLoopModes_) { + [self performSelector:sel + onThread:thread_ + withObject:data + waitUntilDone:NO + modes:runLoopModes_]; + } else { + [self performSelector:sel + onThread:thread_ + withObject:data + waitUntilDone:NO]; + } + } + } + } + + return numRead; +} + +- (void)invokeReadSelectorWithBuffer:(NSData *)data { + const void *buffer = [data bytes]; + NSUInteger length = [data length]; + + NSMethodSignature *signature = [readDelegate_ methodSignatureForSelector:readSelector_]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; + [invocation setSelector:readSelector_]; + [invocation setTarget:readDelegate_]; + [invocation setArgument:&self atIndex:2]; + [invocation setArgument:&buffer atIndex:3]; + [invocation setArgument:&length atIndex:4]; + [invocation invoke]; +} + +- (BOOL)getBuffer:(uint8_t **)buffer length:(NSUInteger *)len { + return [inputStream_ getBuffer:buffer length:len]; +} + +- (BOOL)hasBytesAvailable { + return [inputStream_ hasBytesAvailable]; +} + +#pragma mark Standard messages + +// Pass expected messages to our encapsulated stream. +// +// We want our encapsulated NSInputStream to handle the standard messages; +// we don't want the superclass to handle them. +- (void)open { + [inputStream_ open]; +} + +- (void)close { + [inputStream_ close]; +} + +- (id)delegate { + return [inputStream_ delegate]; +} + +- (void)setDelegate:(id)delegate { + [inputStream_ setDelegate:delegate]; +} + +- (id)propertyForKey:(NSString *)key { + return [inputStream_ propertyForKey:key]; +} +- (BOOL)setProperty:(id)property forKey:(NSString *)key { + return [inputStream_ setProperty:property forKey:key]; +} + +- (void)scheduleInRunLoop:(NSRunLoop *)aRunLoop forMode:(NSString *)mode { + [inputStream_ scheduleInRunLoop:aRunLoop forMode:mode]; +} + +- (void)removeFromRunLoop:(NSRunLoop *)aRunLoop forMode:(NSString *)mode { + [inputStream_ removeFromRunLoop:aRunLoop forMode:mode]; +} + +- (NSStreamStatus)streamStatus { + return [inputStream_ streamStatus]; +} + +- (NSError *)streamError { + return [inputStream_ streamError]; +} + +@end diff --git a/GTL/Source/HTTPFetcher/ReleaseNotes.txt b/GTL/Source/HTTPFetcher/ReleaseNotes.txt new file mode 100644 index 0000000..cb2d970 --- /dev/null +++ b/GTL/Source/HTTPFetcher/ReleaseNotes.txt @@ -0,0 +1,84 @@ +GTM HTTP Fetcher Release Notes + +Project site: http://code.google.com/p/gtm-http-fetcher/ +Discussion group: http://groups.google.com/group/google-toolbox-for-mac + +28-September-2012 + +Added delegateQueue support to fetcher and fetcher service, allowing fetches +to begin on a thread without a run loop and to invoke callbacks on the main +thread or a background thread, beginning with iOS 6 and Mac OS X 10.7. + + +9-January-2012 + +Fetcher now includes user-agent string utility functions + +Fetcher service has properties for request userAgent and timeout + + +22-November-2011 + +Fetchers now support a servicePriority property which affects the order in +which the fetcher service object dequeues delayed fetchers + + +1-November-2011 + +On status 401 results when using an authorizer, the fetcher will attempt a +single retry if the authorizer implements a primeForRefresh method + + +7-October-2011 + +Changed isFetching method to return YES during service and authorization delays + + +9-September-2011 + +Added support for creating an upload fetcher from a location URL to allow +restarting uploads with a new upload fetcher instance + + +18-August-2011 + +Added GTMReadMonitorInputStream for logging uploaded NSInputStreams + + +8-July-2011 + +Added shouldFetchInBackground property (thanks justin a) + + +24-Mar-2011 + +Added authorizer support + + +7-Feb-2011 + +Made cookies set by a redirect immediately available in the new request (thanks ehoracek) +Added getter for static cookie storage + + +16-Nov-2010 + +Added fetcher comment property for logging + + +27-Oct-2010 + +Added downloadPath and downloadFileHandle properties +Added waitForCompletionWithTimeout: +Renamed GTMAssertSelectorNilOrImplementedWithArgs() + + +4-Oct-2010 + +Ensure that delegate is nil when not retained. + + +Release 1.0.0 +9-Sept-2010 + +Initial public release. diff --git a/GTL/Source/HTTPFetcher/Tests/.svn/all-wcprops b/GTL/Source/HTTPFetcher/Tests/.svn/all-wcprops new file mode 100644 index 0000000..c933487 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/.svn/all-wcprops @@ -0,0 +1,77 @@ +K 25 +svn:wc:ra_dav:version-url +V 36 +/svn/!svn/ver/111/trunk/Source/Tests +END +GTMHTTPFetcherCachingTest.m +K 25 +svn:wc:ra_dav:version-url +V 64 +/svn/!svn/ver/103/trunk/Source/Tests/GTMHTTPFetcherCachingTest.m +END +GTMReadMonitorInputStreamTest.m +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/82/trunk/Source/Tests/GTMReadMonitorInputStreamTest.m +END +GTMHTTPFetcherServiceTest.m +K 25 +svn:wc:ra_dav:version-url +V 64 +/svn/!svn/ver/109/trunk/Source/Tests/GTMHTTPFetcherServiceTest.m +END +GTMHTTPServer.h +K 25 +svn:wc:ra_dav:version-url +V 51 +/svn/!svn/ver/90/trunk/Source/Tests/GTMHTTPServer.h +END +GTMHTTPFetcherTestServer.h +K 25 +svn:wc:ra_dav:version-url +V 61 +/svn/!svn/ver/7/trunk/Source/Tests/GTMHTTPFetcherTestServer.h +END +GTMHTTPFetcherUtilityTest.m +K 25 +svn:wc:ra_dav:version-url +V 63 +/svn/!svn/ver/97/trunk/Source/Tests/GTMHTTPFetcherUtilityTest.m +END +GTMHTTPUploadFetcherTest.m +K 25 +svn:wc:ra_dav:version-url +V 61 +/svn/!svn/ver/7/trunk/Source/Tests/GTMHTTPUploadFetcherTest.m +END +GTMGatherInputStreamTest.m +K 25 +svn:wc:ra_dav:version-url +V 61 +/svn/!svn/ver/7/trunk/Source/Tests/GTMGatherInputStreamTest.m +END +GTMHTTPServer.m +K 25 +svn:wc:ra_dav:version-url +V 52 +/svn/!svn/ver/111/trunk/Source/Tests/GTMHTTPServer.m +END +GTMMIMEDocumentTest.m +K 25 +svn:wc:ra_dav:version-url +V 56 +/svn/!svn/ver/7/trunk/Source/Tests/GTMMIMEDocumentTest.m +END +GTMHTTPFetcherTestServer.m +K 25 +svn:wc:ra_dav:version-url +V 63 +/svn/!svn/ver/111/trunk/Source/Tests/GTMHTTPFetcherTestServer.m +END +GTMHTTPFetcherFetchingTest.m +K 25 +svn:wc:ra_dav:version-url +V 65 +/svn/!svn/ver/111/trunk/Source/Tests/GTMHTTPFetcherFetchingTest.m +END diff --git a/GTL/Source/HTTPFetcher/Tests/.svn/entries b/GTL/Source/HTTPFetcher/Tests/.svn/entries new file mode 100644 index 0000000..0f16ca7 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/.svn/entries @@ -0,0 +1,439 @@ +10 + +dir +111 +http://gtm-http-fetcher.googlecode.com/svn/trunk/Source/Tests +http://gtm-http-fetcher.googlecode.com/svn + + + +2012-12-06T21:20:50.206628Z +111 +grobbins@google.com + + + + + + + + + + + + + + +b3aa69f0-f65c-a609-0a27-78855af037c1 + +GTMHTTPFetcherCachingTest.m +file + + + + +2012-12-09T08:42:38.000000Z +600906207bca200332b4fbf79c1af817 +2012-05-30T18:12:27.618185Z +103 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +11397 + +GTMReadMonitorInputStreamTest.m +file + + + + +2012-12-09T08:42:38.000000Z +63b92f5cfd0c5dcbb0e49c14ec2cc371 +2011-11-01T17:48:00.770003Z +82 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2756 + +GTMHTTPFetcherServiceTest.m +file + + + + +2012-12-09T08:42:38.000000Z +00b8401d4460375441d4f01f785fbe4c +2012-09-29T05:22:16.253611Z +109 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +13175 + +GTMHTTPServer.h +file + + + + +2012-12-09T08:42:38.000000Z +11f70e9e304bc04bb347a731bc9464ee +2011-11-23T18:52:34.771138Z +90 +gregrobbins + + + + + + + + + + + + + + + + + + + + + +4823 + +GTMHTTPFetcherTestServer.h +file + + + + +2012-12-09T08:42:38.000000Z +79d3b1dc264be9bc7a7950e9beb50dc2 +2010-08-26T01:42:03.064224Z +7 +gregrobbins + + + + + + + + + + + + + + + + + + + + + +1374 + +GTMHTTPFetcherUtilityTest.m +file + + + + +2012-12-09T08:42:38.000000Z +3d919ae8511d674499444a6e74dbff0c +2012-02-15T20:34:13.872431Z +97 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +4418 + +GTMHTTPUploadFetcherTest.m +file + + + + +2012-12-09T08:42:38.000000Z +d8fde7ce1b7b5e591a4c99060278d5f4 +2010-08-26T01:42:03.064224Z +7 +gregrobbins + + + + + + + + + + + + + + + + + + + + + +17996 + +Data +dir + +GTMGatherInputStreamTest.m +file + + + + +2012-12-09T08:42:38.000000Z +debc1da023c9aa7635f63ae6bd41da06 +2010-08-26T01:42:03.064224Z +7 +gregrobbins + + + + + + + + + + + + + + + + + + + + + +4620 + +GTMHTTPServer.m +file + + + + +2012-12-09T08:42:38.000000Z +474707b03431d77730ae0455ef4d87ae +2012-12-06T21:20:50.206628Z +111 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +18756 + +GTMMIMEDocumentTest.m +file + + + + +2012-12-09T08:42:38.000000Z +a336143ae22b7f49741c800ede82f3f5 +2010-08-26T01:42:03.064224Z +7 +gregrobbins + + + + + + + + + + + + + + + + + + + + + +8073 + +GTMHTTPFetcherTestServer.m +file + + + + +2012-12-09T08:42:38.000000Z +ae8127e9e015ba12957a20d9b9d67fbe +2012-12-06T21:20:50.206628Z +111 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +13462 + +GTMHTTPFetcherFetchingTest.m +file + + + + +2012-12-09T08:42:38.000000Z +bdc314008a016444c163182b5870bfc9 +2012-12-06T21:20:50.206628Z +111 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +48072 + diff --git a/GTL/Source/HTTPFetcher/Tests/.svn/prop-base/GTMHTTPFetcherFetchingTest.m.svn-base b/GTL/Source/HTTPFetcher/Tests/.svn/prop-base/GTMHTTPFetcherFetchingTest.m.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/.svn/prop-base/GTMHTTPFetcherFetchingTest.m.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/GTL/Source/HTTPFetcher/Tests/.svn/prop-base/GTMHTTPFetcherUtilityTest.m.svn-base b/GTL/Source/HTTPFetcher/Tests/.svn/prop-base/GTMHTTPFetcherUtilityTest.m.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/.svn/prop-base/GTMHTTPFetcherUtilityTest.m.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMGatherInputStreamTest.m.svn-base b/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMGatherInputStreamTest.m.svn-base new file mode 100644 index 0000000..28d19a8 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMGatherInputStreamTest.m.svn-base @@ -0,0 +1,142 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GTMGatherInputStream.h" + +@interface GTMGatherInputStreamTest : SenTestCase +@end + +@implementation GTMGatherInputStreamTest + +- (void)doReadTestForInputStream:(NSInputStream *)inputStream + expectedString:(NSString *)expectedResultString + usingSmallReads:(BOOL)useSmallReads + testMethod:(SEL)callingMethod { + // this routine, called by the later test methods, + // reads the data from the input stream and verifies that it matches + // the expected string + NSString *testMethod = NSStringFromSelector(callingMethod); + + // now read the document from the input stream + unsigned char buffer[9999]; + memset(buffer, 0, sizeof(buffer)); + + [inputStream open]; + + NSInteger bytesRead = 0; + + if (!useSmallReads) { + // big read + bytesRead = [inputStream read:buffer maxLength:sizeof(buffer)]; + } else { + // small 1-byte reads + NSInteger bytesReadNow; + do { + bytesReadNow = [inputStream read:(buffer + bytesRead) maxLength:1]; + bytesRead += bytesReadNow; + } while (bytesReadNow > 0); + } + + [inputStream close]; + + NSString *readString = [NSString stringWithUTF8String:(const char * )buffer]; + + STAssertEqualObjects(readString, expectedResultString, @"bad read (%@)", + testMethod); + + NSInteger expectedLength = [expectedResultString length]; + STAssertEquals(bytesRead, expectedLength, @"bad read length (%@)", + testMethod); +} + + +// Make sure that an empty array of data buffers works ok. +- (void)testEmptyGatherStream { + NSArray* array = [NSArray array]; + NSInputStream* input = [GTMGatherInputStream streamWithArray:array]; + + [self doReadTestForInputStream:input + expectedString:@"" + usingSmallReads:NO + testMethod:_cmd]; +} + + +- (void)testGatherStreamWithEmptyParts { + char buf[] = "hello"; + NSString *expectedString = @"hello"; + + NSMutableArray* array = [NSMutableArray array]; + + [array addObject:[NSData dataWithBytes:"" length:0]]; + [array addObject:[NSData dataWithBytes:buf length:strlen(buf)]]; + [array addObject:[NSData dataWithBytes:"" length:0]]; + + NSInputStream* input = [GTMGatherInputStream streamWithArray:array]; + + [self doReadTestForInputStream:input + expectedString:expectedString + usingSmallReads:NO + testMethod:_cmd]; +} + +// We read all of the data in one big chunk. +- (void)testGatherStreamWithManyBuffers { + char b1[] = "h"; + char b2[] = "ello"; + char b3[] = ""; + char b4[] = " how are you?"; + NSString *expectedString = @"hello how are you?"; + + NSMutableArray* array = [NSMutableArray array]; + [array addObject:[NSData dataWithBytes:b1 length:strlen(b1)]]; + [array addObject:[NSData dataWithBytes:b2 length:strlen(b2)]]; + [array addObject:[NSData dataWithBytes:b3 length:strlen(b3)]]; + [array addObject:[NSData dataWithBytes:b4 length:strlen(b4)]]; + + NSInputStream* input = [GTMGatherInputStream streamWithArray:array]; + + [self doReadTestForInputStream:input + expectedString:expectedString + usingSmallReads:NO + testMethod:_cmd]; +} + + +// We read one byte at a time to make sure that many calls to read work properly. +- (void)testGatherStreamWithManyCalls { + char b1[] = "h"; + char b2[] = "ello"; + char b3[] = ""; + char b4[] = " how are you?"; + NSString *expectedString = @"hello how are you?"; + + NSMutableArray* array = [NSMutableArray array]; + [array addObject:[NSData dataWithBytes:b1 length:strlen(b1)]]; + [array addObject:[NSData dataWithBytes:b2 length:strlen(b2)]]; + [array addObject:[NSData dataWithBytes:b3 length:strlen(b3)]]; + [array addObject:[NSData dataWithBytes:b4 length:strlen(b4)]]; + + NSInputStream* input = [GTMGatherInputStream streamWithArray:array]; + + [self doReadTestForInputStream:input + expectedString:expectedString + usingSmallReads:YES + testMethod:_cmd]; +} + +@end diff --git a/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPFetcherCachingTest.m.svn-base b/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPFetcherCachingTest.m.svn-base new file mode 100644 index 0000000..e73acf7 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPFetcherCachingTest.m.svn-base @@ -0,0 +1,275 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMHTTPFetcherCachingTest.m +// + +#import + +#import "GTMHTTPFetcher.h" + +// copies of interfaces to private fetch history classes +@interface GTMCachedURLResponse : NSObject +- (id)initWithResponse:(NSURLResponse *)response data:(NSData *)data; +- (NSURLResponse *)response; +- (NSData *)data; +- (NSDate *)useDate; +- (void)setUseDate:(NSDate *)date; +- (NSDate *)reservationDate; +- (void)setReservationDate:(NSDate *)date; +@end + +@interface GTMURLCache : NSObject +- (id)initWithMemoryCapacity:(NSUInteger)totalBytes; +- (GTMCachedURLResponse *)cachedResponseForRequest:(NSURLRequest *)request; +- (void)storeCachedResponse:(GTMCachedURLResponse *)cachedResponse forRequest:(NSURLRequest *)request; +- (void)removeCachedResponseForRequest:(NSURLRequest *)request; +- (void)removeAllCachedResponses; +- (NSUInteger)memoryCapacity; +- (void)setMemoryCapacity:(NSUInteger)totalBytes; +- (NSDictionary *)responses; +- (NSUInteger)totalDataSize; +- (void)setReservationInterval:(NSTimeInterval)secs; +@end + +@interface GTMCookieStorage : NSObject +- (void)setCookies:(NSArray *)newCookies; +- (NSArray *)cookiesForURL:(NSURL *)theURL; +- (NSHTTPCookie *)cookieMatchingCookie:(NSHTTPCookie *)cookie; +- (void)removeExpiredCookies; +- (void)removeAllCookies; +@end + +@interface GTMHTTPFetcherCachingTest : SenTestCase +@end + +@implementation GTMHTTPFetcherCachingTest + +- (void)testURLCache { + // allocate a cache that prunes at 30 bytes of response data + NSUInteger cacheCapacity = 30; + GTMURLCache *cache = [[[GTMURLCache alloc] initWithMemoryCapacity:cacheCapacity] autorelease]; + + // set the reservation interval for our cache to something quick + const NSTimeInterval resInterval = 0.1; + [cache setReservationInterval:resInterval]; + + // allocate 6 responses with 10 bytes of data each; put a reservation on just + // the second of the 6 + NSMutableArray *requests = [NSMutableArray array]; + NSMutableArray *cachedResponses = [NSMutableArray array]; + + for (int idx = 0; idx < 6; idx++) { + NSString *urlStr = [NSString stringWithFormat:@"http://example.com/%d", idx]; + NSURL *url = [NSURL URLWithString:urlStr]; + NSURLRequest *request = [NSURLRequest requestWithURL:url]; + [requests addObject:request]; + + NSURLResponse *response; + response = [[[NSURLResponse alloc] initWithURL:url + MIMEType:@"text/xml" + expectedContentLength:-1 + textEncodingName:nil] autorelease]; + + GTMCachedURLResponse *cachedResponse; + NSData *data = [@"1234567890" dataUsingEncoding:NSUTF8StringEncoding]; + STAssertEquals([data length], (NSUInteger) 10, @"data should be 10 bytes"); + + cachedResponse = [[[GTMCachedURLResponse alloc] initWithResponse:response + data:data] autorelease]; + [cachedResponses addObject:cachedResponse]; + if (idx == 1) { + [cachedResponse setReservationDate:[NSDate date]]; + } + + [cache storeCachedResponse:cachedResponse + forRequest:request]; + } + + // step through retrieving all previous requests + // + // the cache should contain the second response (since it's reserved) and the + // last two responses + for (int idx = 0; idx < 6; idx++) { + NSURLRequest *request = [requests objectAtIndex:idx]; + GTMCachedURLResponse *cachedResponse, *expectedResponse; + + cachedResponse = [cache cachedResponseForRequest:request]; + if (idx == 1 || idx >= 4) { + expectedResponse = [cachedResponses objectAtIndex:idx]; + STAssertEqualObjects(cachedResponse, expectedResponse, @"wrong response"); + } else { + // these should be pruned out + STAssertNil(cachedResponse, @"unexpected response present"); + } + } + + // wait for the reservation to expire + [NSThread sleepForTimeInterval:(2 * resInterval)]; + + // re-store the first response, with its date set to now; the + // previously-reserved response should be oldest and thus pruned out + NSURLRequest *firstRequest = [requests objectAtIndex:0]; + GTMCachedURLResponse *firstResponse = [cachedResponses objectAtIndex:0]; + [firstResponse setUseDate:[NSDate date]]; + + [cache storeCachedResponse:firstResponse + forRequest:firstRequest]; + + // again, step through retrieving all previous requests + // + // now the cache should contain the first response and the last two responses + for (int idx = 0; idx < 6; idx++) { + NSURLRequest *request = [requests objectAtIndex:idx]; + GTMCachedURLResponse *cachedResponse, *expectedResponse; + + cachedResponse = [cache cachedResponseForRequest:request]; + if (idx == 0 || idx >= 4) { + expectedResponse = [cachedResponses objectAtIndex:idx]; + STAssertEqualObjects(cachedResponse, expectedResponse, @"wrong response"); + } else { + // these should be aged out + STAssertNil(cachedResponse, @"unexpected response present"); + } + } + + // create a response too big to fit in the cache, and verify that it wasn't + NSString *hugeUrlStr = [NSString stringWithFormat:@"http://example.com/huge"]; + NSURL *hugeURL = [NSURL URLWithString:hugeUrlStr]; + NSURLRequest *hugeRequest = [NSURLRequest requestWithURL:hugeURL]; + + NSURLResponse *response; + response = [[[NSURLResponse alloc] initWithURL:hugeURL + MIMEType:@"text/xml" + expectedContentLength:-1 + textEncodingName:nil] autorelease]; + + NSMutableData *hugeData = [NSMutableData data]; + [hugeData setLength:cacheCapacity]; + GTMCachedURLResponse *hugeResponse; + hugeResponse = [[[GTMCachedURLResponse alloc] initWithResponse:response + data:hugeData] autorelease]; + [cache storeCachedResponse:hugeResponse + forRequest:hugeRequest]; + + // verify that the response wasn't really stored in the cache + STAssertEquals([[cache responses] count], (NSUInteger)3, + @"huge not ignored"); + GTMCachedURLResponse *foundResponse; + foundResponse = [cache cachedResponseForRequest:hugeRequest]; + STAssertNil(foundResponse, @"huge was cached"); + + // make the huge response size just right for pushing everything else out of + // the cache + [hugeData setLength:(cacheCapacity - 1)]; + hugeResponse = [[[GTMCachedURLResponse alloc] initWithResponse:response + data:hugeData] autorelease]; + [cache storeCachedResponse:hugeResponse + forRequest:hugeRequest]; + + // verify that it crowded out the other responses + STAssertEquals([[cache responses] count], (NSUInteger)1, + @"huge didn't fill the cache"); + foundResponse = [cache cachedResponseForRequest:hugeRequest]; + STAssertNotNil(foundResponse, @"huge was not cached"); +} + +- (void)testCookieStorage { + GTMCookieStorage *cookieStorage = [[[GTMCookieStorage alloc] init] autorelease]; + NSArray *foundCookies; + + NSURL *fullURL = [NSURL URLWithString:@"http://photos.example.com"]; + NSURL *subdomainURL = [NSURL URLWithString:@"http://frogbreath.example.com"]; + + foundCookies = [cookieStorage cookiesForURL:fullURL]; + STAssertEquals([foundCookies count], (NSUInteger) 0, @"no cookies expected"); + + // make two unique cookies + NSDictionary *cookie1Props = [NSDictionary dictionaryWithObjectsAndKeys: + @"TRUE", NSHTTPCookieDiscard, + @"photos.example.com", NSHTTPCookieDomain, + @"Snark", NSHTTPCookieName, + @"/", NSHTTPCookiePath, + @"cook1=foo", NSHTTPCookieValue, nil]; + NSHTTPCookie *testCookie1 = [NSHTTPCookie cookieWithProperties:cookie1Props]; + + NSDictionary *cookie2Props = [NSDictionary dictionaryWithObjectsAndKeys: + @"FALSE", NSHTTPCookieDiscard, + @".example.com", NSHTTPCookieDomain, + @"Trump", NSHTTPCookieName, + @"/", NSHTTPCookiePath, + @"cook2=gnu", NSHTTPCookieValue, nil]; + NSHTTPCookie *testCookie2 = [NSHTTPCookie cookieWithProperties:cookie2Props]; + + // make a cookie that would replace cookie 2, and make this one expire + // + // expirations have to be in the future or the cookie won't get stored + NSTimeInterval kExpirationInterval = 0.1; + NSDate *expiredDate = [NSDate dateWithTimeIntervalSinceNow:kExpirationInterval]; + NSDictionary *cookie2aProps = [NSDictionary dictionaryWithObjectsAndKeys: + @"FALSE", NSHTTPCookieDiscard, + @".example.com", NSHTTPCookieDomain, + @"Trump", NSHTTPCookieName, + @"/", NSHTTPCookiePath, + expiredDate, NSHTTPCookieExpires, + @"cook2=snu", NSHTTPCookieValue, nil]; + NSHTTPCookie *testCookie2a = [NSHTTPCookie cookieWithProperties:cookie2aProps]; + + // store the first two cookies + NSArray *array = [NSArray arrayWithObjects: + testCookie1, testCookie2, nil]; + [cookieStorage setCookies:array]; + + foundCookies = [cookieStorage cookiesForURL:fullURL]; + STAssertEquals([foundCookies count], (NSUInteger) 2, + @"full domain cookie retrieval"); + + foundCookies = [cookieStorage cookiesForURL:subdomainURL]; + STAssertEquals((int)[foundCookies count], 1, @"subdomain cookie retrieval"); + + // store cookie 2a, replacing cookie 2 + array = [NSArray arrayWithObject:testCookie2a]; + [cookieStorage setCookies:array]; + + foundCookies = [cookieStorage cookiesForURL:subdomainURL]; + STAssertEquals((int)[foundCookies count], 1, @"subdomain 2a retrieval"); + + NSHTTPCookie *foundCookie = [foundCookies lastObject]; + STAssertEqualObjects([foundCookie value], [testCookie2a value], + @"cookie replacement"); + + // wait for cookie 2a to expire, then remove expired cookies + // + // 30-May-2012: Apparently, on Mac OS X 10.7.4, the expiration is no + // longer stored, even for version 0 cookies. + // + // [NSThread sleepForTimeInterval:(2 * kExpirationInterval)]; + // [cookieStorage removeExpiredCookies]; + // + // foundCookies = [cookieStorage cookiesForURL:subdomainURL]; + // STAssertEquals((int)[foundCookies count], 0, @"pruned removal"); + // + // foundCookies = [cookieStorage cookiesForURL:fullURL]; + // STAssertEquals((int)[foundCookies count], 1, @"pruned removal remaining"); + STAssertNil([testCookie2a expiresDate], nil); + + // remove all cookies + [cookieStorage removeAllCookies]; + foundCookies = [cookieStorage cookiesForURL:fullURL]; + STAssertEquals((int)[foundCookies count], 0, @"remove all"); +} + +@end diff --git a/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPFetcherFetchingTest.m.svn-base b/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPFetcherFetchingTest.m.svn-base new file mode 100644 index 0000000..41ea682 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPFetcherFetchingTest.m.svn-base @@ -0,0 +1,1266 @@ +/* Copyright (c) 2009 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GTMHTTPFetcherTestServer.h" +#import "GTMHTTPFetcher.h" +#import "GTMHTTPFetchHistory.h" +#import "GTMHTTPFetcherLogging.h" +#import "GTMHTTPUploadFetcher.h" + +@interface GTMHTTPFetcherFetchingTest : SenTestCase { + + // these ivars are checked after fetches, and are reset by resetFetchResponse + NSData *fetchedData_; + NSError *fetcherError_; + int fetchedStatus_; + NSURLResponse *fetchedResponse_; + NSMutableURLRequest *fetchedRequest_; + int retryCounter_; + + int fetchStartedNotificationCount_; + int fetchStoppedNotificationCount_; + int retryDelayStartedNotificationCount_; + int retryDelayStoppedNotificationCount_; + + // setup/teardown ivars + GTMHTTPFetchHistory *fetchHistory_; + GTMHTTPFetcherTestServer *testServer_; + BOOL isServerRunning_; +} + +- (void)testFetcher:(GTMHTTPFetcher *)fetcher + finishedWithData:(NSData *)data + error:(NSError *)error; + +- (GTMHTTPFetcher *)doFetchWithURLString:(NSString *)urlString + cachingDatedData:(BOOL)doCaching; + +- (GTMHTTPFetcher *)doFetchWithURLString:(NSString *)urlString + cachingDatedData:(BOOL)doCaching + retrySelector:(SEL)retrySel + maxRetryInterval:(NSTimeInterval)maxRetryInterval + credential:(NSURLCredential *)credential + userData:(id)userData; + +- (NSString *)localURLStringToTestFileName:(NSString *)name; +- (NSString *)localPathForFileName:(NSString *)name; +@end + +// Authorization testing +@interface TestAuthorizer : NSObject { + BOOL hasExpired_; +} +@property (assign) BOOL expired; + ++ (TestAuthorizer *)authorizer; ++ (TestAuthorizer *)expiredAuthorizer; +@end + +static NSString *const kGoodBearerValue = @"Bearer good"; +static NSString *const kExpiredBearerValue = @"Bearer expired"; + +@implementation GTMHTTPFetcherFetchingTest + +static const NSTimeInterval kRunLoopInterval = 0.01; + +// The wrong-fetch test can take >10s to pass. +static const NSTimeInterval kGiveUpInterval = 30.0; + +// file available in Tests folder +static NSString *const kValidFileName = @"gettysburgaddress.txt"; + +- (NSString *)docRootPath { + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + STAssertNotNil(testBundle, nil); + + NSString *docFolder = [testBundle resourcePath]; + return docFolder; +} + +- (void)setUp { + fetchHistory_ = [[GTMHTTPFetchHistory alloc] init]; + + NSString *docRoot = [self docRootPath]; + + testServer_ = [[GTMHTTPFetcherTestServer alloc] initWithDocRoot:docRoot]; + isServerRunning_ = (testServer_ != nil); + + STAssertTrue(isServerRunning_, + @">>> http test server failed to launch; skipping" + " fetcher tests\n"); + + // install observers for fetcher notifications + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc addObserver:self selector:@selector(fetchStateChanged:) name:kGTMHTTPFetcherStartedNotification object:nil]; + [nc addObserver:self selector:@selector(fetchStateChanged:) name:kGTMHTTPFetcherStoppedNotification object:nil]; + [nc addObserver:self selector:@selector(retryDelayStateChanged:) name:kGTMHTTPFetcherRetryDelayStartedNotification object:nil]; + [nc addObserver:self selector:@selector(retryDelayStateChanged:) name:kGTMHTTPFetcherRetryDelayStoppedNotification object:nil]; +} + +- (void)resetFetchResponse { + [fetchedData_ release]; + fetchedData_ = nil; + + [fetcherError_ release]; + fetcherError_ = nil; + + [fetchedRequest_ release]; + fetchedRequest_ = nil; + + [fetchedResponse_ release]; + fetchedResponse_ = nil; + + fetchedStatus_ = 0; + + retryCounter_ = 0; +} + +- (void)tearDown { + [testServer_ release]; + testServer_ = nil; + + isServerRunning_ = NO; + + [self resetFetchResponse]; + + [fetchHistory_ release]; + fetchHistory_ = nil; +} + +- (NSData *)gettysburgAddress { + NSString *gettysburgPath = [testServer_ localPathForFile:kValidFileName]; + NSData *gettysburgAddress = [NSData dataWithContentsOfFile:gettysburgPath]; + return gettysburgAddress; +} + +#pragma mark Notification callbacks + +- (void)fetchStateChanged:(NSNotification *)note { + if ([[note name] isEqual:kGTMHTTPFetcherStartedNotification]) { + ++fetchStartedNotificationCount_; + } else { + ++fetchStoppedNotificationCount_; + } + + STAssertTrue(fetchStartedNotificationCount_ <= fetchStartedNotificationCount_, + @"fetch notification imbalance: starts=%d stops=%d", + fetchStartedNotificationCount_, + fetchStoppedNotificationCount_); +} + +- (void)retryDelayStateChanged:(NSNotification *)note { + if ([[note name] isEqual:kGTMHTTPFetcherRetryDelayStartedNotification]) { + ++retryDelayStartedNotificationCount_; + } else { + ++retryDelayStoppedNotificationCount_; + } + + STAssertTrue(retryDelayStoppedNotificationCount_ <= retryDelayStartedNotificationCount_, + @"retry delay notification imbalance: starts=%d stops=%d", + retryDelayStartedNotificationCount_, + retryDelayStoppedNotificationCount_); +} + +- (void)resetNotificationCounts { + fetchStartedNotificationCount_ = 0; + fetchStoppedNotificationCount_ = 0; + retryDelayStartedNotificationCount_ = 0; + retryDelayStoppedNotificationCount_ = 0; +} + +#pragma mark Tests + +- (void)testFetch { + if (!isServerRunning_) return; + + [self resetNotificationCounts]; + [self resetFetchResponse]; + + NSString *urlString = [self localURLStringToTestFileName:kValidFileName]; + [self doFetchWithURLString:urlString cachingDatedData:YES]; + + STAssertNotNil(fetchedData_, + @"failed to fetch data, status:%d error:%@, URL:%@", + fetchedStatus_, fetcherError_, urlString); + + // we'll verify we fetched from the server the actual data on disk + NSData *gettysburgAddress = [self gettysburgAddress]; + STAssertEqualObjects(fetchedData_, gettysburgAddress, + @"Lincoln disappointed"); + + STAssertNotNil(fetchedResponse_, + @"failed to get fetch response, status:%d error:%@", + fetchedStatus_, fetcherError_); + STAssertNotNil(fetchedRequest_, + @"failed to get fetch request, URL %@", urlString); + STAssertNil(fetcherError_, @"fetching data gave error: %@", fetcherError_); + STAssertEquals(fetchedStatus_, 200, + @"unexpected status for URL %@", urlString); + + // no cookies should be sent with our first request + NSDictionary *headers = [fetchedRequest_ allHTTPHeaderFields]; + NSString *cookiesSent = [headers objectForKey:@"Cookie"]; + STAssertNil(cookiesSent, @"Cookies sent unexpectedly: %@", cookiesSent); + + // cookies should have been set by the response; specifically, TestCookie + // should be set to the name of the file requested + NSDictionary *responseHeaders; + + responseHeaders = [(NSHTTPURLResponse *)fetchedResponse_ allHeaderFields]; + NSString *cookiesSetString = [responseHeaders objectForKey:@"Set-Cookie"]; + NSString *cookieExpected = [NSString stringWithFormat:@"TestCookie=%@", + kValidFileName]; + STAssertEqualObjects(cookiesSetString, cookieExpected, @"Unexpected cookie"); + + // make a copy of the fetched data to compare with our next fetch from the + // cache + NSData *originalFetchedData = [[fetchedData_ copy] autorelease]; + + + // Now fetch again so the "If-None-Match" header will be set (because + // we're calling setFetchHistory: below) and caching ON, and verify that we + // got a good data from the cache and a nil error, along with a + // "Not Modified" status in the fetcher + + [self resetFetchResponse]; + + [self doFetchWithURLString:urlString cachingDatedData:YES]; + + STAssertEqualObjects(fetchedData_, originalFetchedData, + @"cache data mismatch"); + + STAssertNotNil(fetchedData_, + @"failed to fetch data, status:%d error:%@, URL:%@", + fetchedStatus_, fetcherError_, urlString); + STAssertNotNil(fetchedResponse_, + @"failed to get fetch response, status:%d error:%@", + fetchedStatus_, fetcherError_); + STAssertNotNil(fetchedRequest_, + @"failed to get fetch request, URL %@", + urlString); + STAssertNil(fetcherError_, @"fetching data gave error: %@", fetcherError_); + + STAssertEquals(fetchedStatus_, kGTMHTTPFetcherStatusNotModified, // 304 + @"fetch status unexpected for URL %@", urlString); + + // the TestCookie set previously should be sent with this request + cookiesSent = [[fetchedRequest_ allHTTPHeaderFields] objectForKey:@"Cookie"]; + STAssertEqualObjects(cookiesSent, cookieExpected, @"Cookie not sent"); + + + // Now fetch twice without caching enabled, and verify that we got a + // "Precondition failed" status, along with a non-nil but empty NSData (which + // is normal for that status code) from the second fetch + + [self resetFetchResponse]; + + [fetchHistory_ clearHistory]; + + [self doFetchWithURLString:urlString cachingDatedData:NO]; + + STAssertEqualObjects(fetchedData_, originalFetchedData, + @"cache data mismatch"); + STAssertNil(fetcherError_, @"unexpected error: %@", fetcherError_); + + [self resetFetchResponse]; + [self doFetchWithURLString:urlString cachingDatedData:NO]; + + STAssertNotNil(fetchedData_, @""); + STAssertEquals([fetchedData_ length], (NSUInteger) 0, @"unexpected data"); + STAssertEquals(fetchedStatus_, kGTMHTTPFetcherStatusNotModified, + @"fetching data expected status 304, instead got %d", fetchedStatus_); + STAssertNotNil(fetcherError_, @"missing 304 error"); + + // check the notifications + STAssertEquals(fetchStartedNotificationCount_, 4, @"fetches started"); + STAssertEquals(fetchStoppedNotificationCount_, 4, @"fetches stopped"); + STAssertEquals(retryDelayStartedNotificationCount_, 0, @"retries started"); + STAssertEquals(retryDelayStoppedNotificationCount_, 0, @"retries started"); +} + +- (void)testAuthorizorFetch { + if (!isServerRunning_) return; + [self resetNotificationCounts]; + + // + // fetch a live, authorized URL + // + NSString *authName = [kValidFileName stringByAppendingFormat:@"?oauth2=good"]; + NSString *authedURL = [self localURLStringToTestFileName:authName]; + + NSURLRequest *req = [NSURLRequest requestWithURL:[NSURL URLWithString:authedURL] + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:kGiveUpInterval]; + + __block BOOL hasFinishedFetching = NO; + __block GTMHTTPFetcher *fetcher = [GTMHTTPFetcher fetcherWithRequest:req]; + STAssertNotNil(fetcher, @"Failed to allocate fetcher"); + + fetcher.authorizer = [TestAuthorizer authorizer]; + + void (^completionBlock)(NSData *, NSError *) = ^(NSData *data, NSError *error) { + STAssertEqualObjects(data, [self gettysburgAddress], @"wrong data"); + STAssertNil(error, @"unexpected status error"); + hasFinishedFetching = YES; + }; + + [fetcher beginFetchWithCompletionHandler:completionBlock]; + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + STAssertTrue(hasFinishedFetching, @"auth 1 fetch failed"); + + // + // fetch with an expired authorizer, no retry allowed + // + authName = [kValidFileName stringByAppendingFormat:@"?oauth2=good"]; + authedURL = [self localURLStringToTestFileName:authName]; + + req = [NSURLRequest requestWithURL:[NSURL URLWithString:authedURL] + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:kGiveUpInterval]; + + hasFinishedFetching = NO; + fetcher = [GTMHTTPFetcher fetcherWithRequest:req]; + fetcher.retryBlock = ^(BOOL suggestedWillRetry, NSError *error) { + return NO; + }; + STAssertNotNil(fetcher, @"Failed to allocate fetcher"); + + fetcher.authorizer = [TestAuthorizer expiredAuthorizer]; + + completionBlock = ^(NSData *data, NSError *error) { + STAssertEquals([error code], (NSInteger) 401, + @"unexpected status, error=%@", error); + hasFinishedFetching = YES; + }; + + [fetcher beginFetchWithCompletionHandler:completionBlock]; + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + STAssertTrue(hasFinishedFetching, @"auth 2 fetch failed"); + + // + // fetch with an expired authorizer, with automatic refresh + // + authName = [kValidFileName stringByAppendingFormat:@"?oauth2=good"]; + authedURL = [self localURLStringToTestFileName:authName]; + + req = [NSURLRequest requestWithURL:[NSURL URLWithString:authedURL] + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:kGiveUpInterval]; + + hasFinishedFetching = NO; + fetcher = [GTMHTTPFetcher fetcherWithRequest:req]; + STAssertNotNil(fetcher, @"Failed to allocate fetcher"); + + fetcher.authorizer = [TestAuthorizer expiredAuthorizer]; + + completionBlock = ^(NSData *data, NSError *error) { + STAssertEqualObjects(data, [self gettysburgAddress], @"wrong data"); + STAssertNil(error, @"unexpected error"); + hasFinishedFetching = YES; + }; + + [fetcher beginFetchWithCompletionHandler:completionBlock]; + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + STAssertTrue(hasFinishedFetching, @"auth 3 fetch failed"); +} + +- (void)testWrongFetch { + + if (!isServerRunning_) return; + [self resetNotificationCounts]; + + // fetch a live, invalid URL + NSString *badURLString = @"http://localhost:86/"; + [self doFetchWithURLString:badURLString cachingDatedData:NO]; + + if (fetchedData_) { + NSString *str = [[[NSString alloc] initWithData:fetchedData_ + encoding:NSUTF8StringEncoding] autorelease]; + STAssertNil(fetchedData_, @"fetched unexpected data: %@", str); + } + + STAssertNotNil(fetcherError_, @"failed to receive fetching error"); + STAssertEquals(fetchedStatus_, 0, + @"unexpected status from no response"); + + // fetch with a specific status code from our http server + [self resetFetchResponse]; + + NSString *invalidWebPageFile = [kValidFileName stringByAppendingString:@"?status=400"]; + NSString *statusUrlString = [self localURLStringToTestFileName:invalidWebPageFile]; + + [self doFetchWithURLString:statusUrlString cachingDatedData:NO]; + + STAssertNotNil(fetchedData_, @"fetch lacked data with error info"); + STAssertNotNil(fetcherError_, @"expected status error"); + NSData *statusData = [[fetcherError_ userInfo] objectForKey:kGTMHTTPFetcherStatusDataKey]; + NSString *dataStr = [[[NSString alloc] initWithData:statusData + encoding:NSUTF8StringEncoding] autorelease]; + NSString *expectedStr = @"{ \"error\" : { \"message\" : \"Server Status 400\", \"code\" : 400 } }"; + STAssertEqualObjects(dataStr, expectedStr, @"expected status data"); + + STAssertEquals(fetchedStatus_, 400, + @"unexpected status, error=%@", fetcherError_); + + // check the notifications + STAssertEquals(fetchStartedNotificationCount_, 2, @"fetches started"); + STAssertEquals(fetchStoppedNotificationCount_, 2, @"fetches stopped"); + STAssertEquals(retryDelayStartedNotificationCount_, 0, @"retries started"); + STAssertEquals(retryDelayStoppedNotificationCount_, 0, @"retries started"); +} + +- (void)testFetchToFile { + if (!isServerRunning_) return; + + // create an empty file from which we can make an NSFileHandle + NSString *path = [NSTemporaryDirectory() stringByAppendingFormat:@"fhTest_%@", + [NSDate date]]; + [[NSData data] writeToFile:path atomically:YES]; + + NSFileHandle *fileHandle = [NSFileHandle fileHandleForWritingAtPath:path]; + STAssertNotNil(fileHandle, @"missing filehandle for %@", path); + + // make the http request to our test server + __block NSString *testName = @"Download to file handle"; + + NSString *urlString = [self localURLStringToTestFileName:kValidFileName]; + NSURLRequest *req = [NSURLRequest requestWithURL:[NSURL URLWithString:urlString] + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:kGiveUpInterval]; + + // we'll put fetcher in a __block variable so we can refer to the + // latest instance of it in the callbacks + __block GTMHTTPFetcher *fetcher = [GTMHTTPFetcher fetcherWithRequest:req]; + STAssertNotNil(fetcher, @"Failed to allocate fetcher"); + + // received-data block + // + // the final received-data block invocation should show the length of the + // file actually downloaded + __block NSUInteger receivedDataLen = 0; + + void (^receivedBlock)(NSData *) = ^(NSData *dataReceivedSoFar){ + // a nil data argument is expected when the downloaded data is written + // to a file handle + STAssertNil(dataReceivedSoFar, @"%@: unexpected dataReceivedSoFar", + testName); + + receivedDataLen = [fetcher downloadedLength]; + }; + + + // fetch & completion block + __block BOOL hasFinishedFetching = NO; + + void (^completionBlock)(NSData *, NSError *) = ^(NSData *data, NSError *error) { + STAssertNil(data, @"%@: unexpected data", testName); + STAssertNil(error, @"%@: unexpected error: %@", testName, error); + + NSString *fetchedContents = [NSString stringWithContentsOfFile:path + encoding:NSUTF8StringEncoding + error:NULL]; + STAssertEquals(receivedDataLen, [fetchedContents length], + @"%@: length issue", testName); + + NSString *origPath = [self localPathForFileName:kValidFileName]; + NSString *origContents = [NSString stringWithContentsOfFile:origPath + encoding:NSUTF8StringEncoding + error:NULL]; + STAssertEqualObjects(fetchedContents, origContents, + @"%@: fetch to FH error", testName); + + hasFinishedFetching = YES; + }; + + [fetcher setDownloadFileHandle:fileHandle]; + [fetcher setReceivedDataBlock:receivedBlock]; + [fetcher beginFetchWithCompletionHandler:completionBlock]; + + // spin until the fetch completes + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + STAssertTrue(hasFinishedFetching, @"file handle fetch timed out"); + + [[NSFileManager defaultManager] removeItemAtPath:path + error:NULL]; + + // + // repeat the test with a new fetcher, writing directly to the path + // instead of explicitly creating a file handle + // + hasFinishedFetching = NO; + + testName = @"Download to file path"; + fetcher = [GTMHTTPFetcher fetcherWithRequest:req]; + [fetcher setDownloadPath:path]; + [fetcher setReceivedDataBlock:receivedBlock]; + [fetcher beginFetchWithCompletionHandler:completionBlock]; + + // grab a copy of the temporary file path + NSString *tempPath = [[[fetcher performSelector:@selector(temporaryDownloadPath)] copy] autorelease]; + + // spin until the fetch completes + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + STAssertTrue(hasFinishedFetching, @"path fetch timed out"); + + // verify that the temp file has been deleted + BOOL doesExist = [[NSFileManager defaultManager] fileExistsAtPath:tempPath]; + STAssertFalse(doesExist, @"%@: temp file should not exist", testName); + + [[NSFileManager defaultManager] removeItemAtPath:path + error:NULL]; + + // + // repeat the test with a new fetcher, writing directly to a path, + // but with a fetch that will fail + // + hasFinishedFetching = NO; + + testName = @"Invalid download to file path"; + NSString *invalidFile = [kValidFileName stringByAppendingString:@"?status=400"]; + urlString = [self localURLStringToTestFileName:invalidFile]; + req = [NSURLRequest requestWithURL:[NSURL URLWithString:urlString] + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:kGiveUpInterval]; + fetcher = [GTMHTTPFetcher fetcherWithRequest:req]; + [fetcher setDownloadPath:path]; + [fetcher setReceivedDataBlock:receivedBlock]; + + [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { + STAssertNil(data, @"%@: unexpected data", testName); + STAssertEquals([error code], (NSInteger) 400, + @"%@: unexpected error: %@", testName, error); + hasFinishedFetching = YES; + }]; + + // grab a copy of the temporary file path + tempPath = [[[fetcher performSelector:@selector(temporaryDownloadPath)] copy] autorelease]; + + // spin until the fetch completes + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + STAssertTrue(hasFinishedFetching, @"path fetch timed out"); + + // the file at the temporary path should be gone, and none should be at + // the final path + // + // we test it here rather than in the callback since it's not deleted + // until the fetcher does its stopFetching cleanup + doesExist = [[NSFileManager defaultManager] fileExistsAtPath:tempPath]; + STAssertFalse(doesExist, @"%@: temp file should not exist", testName); + + doesExist = [[NSFileManager defaultManager] fileExistsAtPath:path]; + STAssertFalse(doesExist, @"%@: file should not exist", testName); +} + +- (void)testRetryFetches { + + if (!isServerRunning_) return; + [self resetNotificationCounts]; + + GTMHTTPFetcher *fetcher; + + NSString *invalidFile = [kValidFileName stringByAppendingString:@"?status=503"]; + NSString *urlString = [self localURLStringToTestFileName:invalidFile]; + + SEL countRetriesSel = @selector(countRetriesfetcher:willRetry:forError:); + SEL fixRequestSel = @selector(fixRequestFetcher:willRetry:forError:); + + // + // test: retry until timeout, then expect failure with status message + // + + NSNumber *lotsOfRetriesNumber = [NSNumber numberWithInt:1000]; + + fetcher= [self doFetchWithURLString:urlString + cachingDatedData:NO + retrySelector:countRetriesSel + maxRetryInterval:5.0 // retry intervals of 1, 2, 4 + credential:nil + userData:lotsOfRetriesNumber]; + + STAssertNotNil(fetchedData_, @"error data is expected"); + STAssertEquals(fetchedStatus_, 503, + @"fetchedStatus_ should be 503, was %@", fetchedStatus_); + STAssertEquals([fetcher retryCount], (NSUInteger) 3, @"retry count unexpected"); + + // + // test: retry twice, then give up + // + [self resetFetchResponse]; + + NSNumber *twoRetriesNumber = [NSNumber numberWithInt:2]; + + fetcher= [self doFetchWithURLString:urlString + cachingDatedData:NO + retrySelector:countRetriesSel + maxRetryInterval:10.0 // retry intervals of 1, 2, 4, 8 + credential:nil + userData:twoRetriesNumber]; + + STAssertNotNil(fetchedData_, @"error data is expected"); + STAssertEquals(fetchedStatus_, 503, + @"fetchedStatus_ should be 503, was %@", fetchedStatus_); + STAssertEquals([fetcher retryCount], (NSUInteger) 2, @"retry count unexpected"); + + + // + // test: retry, making the request succeed on the first retry + // by fixing the URL + // + [self resetFetchResponse]; + + fetcher= [self doFetchWithURLString:urlString + cachingDatedData:NO + retrySelector:fixRequestSel + maxRetryInterval:30.0 // should only retry once due to selector + credential:nil + userData:lotsOfRetriesNumber]; + + STAssertNotNil(fetchedData_, @"data is expected"); + STAssertEquals(fetchedStatus_, 200, + @"fetchedStatus_ should be 200, was %@", fetchedStatus_); + STAssertEquals([fetcher retryCount], (NSUInteger) 1, @"retry count unexpected"); + + // check the notifications + STAssertEquals(fetchStartedNotificationCount_, 9, @"fetches started"); + STAssertEquals(fetchStoppedNotificationCount_, 9, @"fetches stopped"); + STAssertEquals(retryDelayStartedNotificationCount_, 6, @"retries started"); + STAssertEquals(retryDelayStoppedNotificationCount_, 6, @"retries started"); +} + +#pragma mark Upload fetches + +- (NSData *)generatedUploadDataWithLength:(NSUInteger)length { + // fill a data block with data + NSMutableData *data = [NSMutableData dataWithLength:length]; + + unsigned char *bytes = [data mutableBytes]; + for (NSUInteger idx = 0; idx < length; idx++) { + bytes[idx] = ((idx + 1) % 256); + } + + return data; +} + +static NSString* const kPauseAtKey = @"pauseAt"; +static NSString* const kRetryAtKey = @"retryAt"; +static NSString* const kOriginalURLKey = @"origURL"; + +- (void)uploadFetcher:(GTMHTTPUploadFetcher *)fetcher + didSendBytes:(NSInteger)bytesSent + totalBytesSent:(NSInteger)totalBytesSent +totalBytesExpectedToSend:(NSInteger)totalBytesExpectedToSend { + + NSNumber *pauseAtNum = [fetcher propertyForKey:kPauseAtKey]; + if (pauseAtNum) { + int pauseAt = [pauseAtNum intValue]; + if (pauseAt < totalBytesSent) { + // we won't be paused again + [fetcher setProperty:nil forKey:kPauseAtKey]; + + // we've reached the point where we should pause + // + // use perform selector to avoid pausing immediately, as that would nuke + // the chunk upload fetcher that is calling us back now + [fetcher performSelector:@selector(pauseFetching) + withObject:nil + afterDelay:0.0]; + + [fetcher performSelector:@selector(resumeFetching) + withObject:nil + afterDelay:1.0]; + } + } + + NSNumber *retryAtNum = [fetcher propertyForKey:kRetryAtKey]; + if (retryAtNum) { + int retryAt = [retryAtNum intValue]; + if (retryAt < totalBytesSent) { + // we won't be retrying again + [fetcher setProperty:nil forKey:kRetryAtKey]; + + // save the current locationURL before appending &status=503 + NSURL *origURL = fetcher.locationURL; + [fetcher setProperty:origURL forKey:kOriginalURLKey]; + + NSString *newURLStr = [[origURL absoluteString] stringByAppendingString:@"?status=503"]; + fetcher.locationURL = [NSURL URLWithString:newURLStr]; + } + } +} + + +-(BOOL)uploadRetryFetcher:(GTMHTTPUploadFetcher *)fetcher willRetry:(BOOL)suggestedWillRetry forError:(NSError *)error { + // change this fetch's request (and future requests) to have the original URL, + // not the one with status=503 appended + NSURL *origURL = [fetcher propertyForKey:kOriginalURLKey]; + + [fetcher.activeFetcher.mutableRequest setURL:origURL]; + fetcher.locationURL = origURL; + + [fetcher setProperty:nil forKey:kOriginalURLKey]; + + return suggestedWillRetry; // do the retry fetch; it should succeed now +} + +- (void)testChunkedUploadFetch { + if (!isServerRunning_) return; + + NSData *bigData = [self generatedUploadDataWithLength:199000]; + NSData *smallData = [self generatedUploadDataWithLength:13]; + + NSData *gettysburgAddress = [self gettysburgAddress]; + + // write the big data into a temp file + NSString *tempDir = NSTemporaryDirectory(); + NSString *bigFileName = @"GTMFetchingTest_BigFile"; + NSString *bigFilePath = [tempDir stringByAppendingPathComponent:bigFileName]; + [bigData writeToFile:bigFilePath atomically:NO]; + + NSFileHandle *bigFileHandle = [NSFileHandle fileHandleForReadingAtPath:bigFilePath]; + + SEL progressSel = @selector(uploadFetcher:didSendBytes:totalBytesSent:totalBytesExpectedToSend:); + SEL retrySel = @selector(uploadRetryFetcher:willRetry:forError:); + SEL finishedSel = @selector(testFetcher:finishedWithData:error:); + + NSString *urlString = [self localURLStringToTestFileName:kValidFileName]; + urlString = [urlString stringByAppendingPathExtension:@"location"]; + + [self resetNotificationCounts]; + + // + // test uploading a big file handle + // + [self resetFetchResponse]; + + NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:urlString] + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:kGiveUpInterval]; + + GTMHTTPUploadFetcher *fetcher = [GTMHTTPUploadFetcher uploadFetcherWithRequest:request + uploadFileHandle:bigFileHandle + uploadMIMEType:@"text/plain" + chunkSize:75000 + fetcherService:nil]; + + [fetcher beginFetchWithDelegate:self + didFinishSelector:finishedSel]; + + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + + + STAssertNotNil(fetchedData_, + @"failed to fetch data, status:%d error:%@, URL:%@", + fetchedStatus_, fetcherError_, urlString); + + // check that we fetched the expected data + STAssertEqualObjects(fetchedData_, gettysburgAddress, + @"Lincoln disappointed"); + STAssertNotNil(fetchedResponse_, + @"failed to get fetch response, status:%d error:%@", + fetchedStatus_, fetcherError_); + STAssertNotNil(fetchedRequest_, + @"failed to get fetch request, URL %@", urlString); + STAssertNil(fetcherError_, @"fetching data gave error: %@", fetcherError_); + STAssertEquals(fetchedStatus_, 200, + @"unexpected status for URL %@", urlString); + + // check the request of the final chunk fetcher to be sure we were uploading + // chunks as expected. Chunk requests replace the original request in the + // fetcher. + NSDictionary *reqHdrs = [fetcher.mutableRequest allHTTPHeaderFields]; + + NSString *uploadReqURLPath = @"gettysburgaddress.txt.location"; + NSString *contentLength = [reqHdrs objectForKey:@"Content-Length"]; + NSString *contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertTrue([[[request URL] absoluteString] hasSuffix:uploadReqURLPath], + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"49000", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 150000-198999/199000", @"range"); + + // + // repeat the big upload using NSData + // + [self resetFetchResponse]; + + request = [NSURLRequest requestWithURL:[NSURL URLWithString:urlString] + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:kGiveUpInterval]; + + fetcher = [GTMHTTPUploadFetcher uploadFetcherWithRequest:request + uploadData:bigData + uploadMIMEType:@"text/plain" + chunkSize:75000 + fetcherService:nil]; + + [fetcher beginFetchWithDelegate:self + didFinishSelector:finishedSel]; + + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + + // check that we fetched the expected data + STAssertEqualObjects(fetchedData_, gettysburgAddress, + @"Lincoln disappointed"); + STAssertNotNil(fetchedResponse_, + @"failed to get fetch response, status:%d error:%@", + fetchedStatus_, fetcherError_); + STAssertNotNil(fetchedRequest_, + @"failed to get fetch request, URL %@", urlString); + STAssertNil(fetcherError_, @"fetching data gave error: %@", fetcherError_); + STAssertEquals(fetchedStatus_, 200, + @"unexpected status for URL %@", urlString); + + // check the request of the final chunk fetcher + reqHdrs = [fetcher.mutableRequest allHTTPHeaderFields]; + + uploadReqURLPath = @"gettysburgaddress.txt.location"; + contentLength = [reqHdrs objectForKey:@"Content-Length"]; + contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertTrue([[[request URL] absoluteString] hasSuffix:uploadReqURLPath], + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"49000", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 150000-198999/199000", @"range"); + + + // + // repeat the big upload, pausing after 20000 bytes + // + [self resetFetchResponse]; + + fetcher = [GTMHTTPUploadFetcher uploadFetcherWithRequest:request + uploadData:bigData + uploadMIMEType:@"text/plain" + chunkSize:75000 + fetcherService:nil]; + + // add a property to the fetcher that our progress callback will look for to + // know when to pause and resume the upload + fetcher.sentDataSelector = progressSel; + [fetcher setProperty:[NSNumber numberWithInt:20000] + forKey:kPauseAtKey]; + + [fetcher beginFetchWithDelegate:self + didFinishSelector:finishedSel]; + + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + + // check the request of the final chunk fetcher to be sure we were uploading + // chunks as expected. + reqHdrs = [fetcher.mutableRequest allHTTPHeaderFields]; + + uploadReqURLPath = @"gettysburgaddress.txt.location"; + contentLength = [reqHdrs objectForKey:@"Content-Length"]; + contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertTrue([[[request URL] absoluteString] hasSuffix:uploadReqURLPath], + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"24499", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 174501-198999/199000", @"range"); + + + // + // repeat the big upload using blocks instead of a delegate, + // pausing after 20000 bytes + // + // for the blocks test, the body of the blocks will just invoke the non-block + // callback methods + // + [self resetFetchResponse]; + + fetcher = [GTMHTTPUploadFetcher uploadFetcherWithRequest:request + uploadData:bigData + uploadMIMEType:@"text/plain" + chunkSize:75000 + fetcherService:nil]; + + [fetcher setSentDataBlock:^(NSInteger bytesSent, NSInteger totalBytesSent, NSInteger expectedBytes) { + [self uploadFetcher:fetcher + didSendBytes:bytesSent + totalBytesSent:totalBytesSent +totalBytesExpectedToSend:expectedBytes]; + }]; + + [fetcher setProperty:[NSNumber numberWithInt:20000] + forKey:kPauseAtKey]; + + [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { + [self testFetcher:fetcher + finishedWithData:data + error:error]; + }]; + + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + + // check the request of the final chunk fetcher to be sure we were uploading + // chunks as expected. + reqHdrs = [fetcher.mutableRequest allHTTPHeaderFields]; + + uploadReqURLPath = @"gettysburgaddress.txt.location"; + contentLength = [reqHdrs objectForKey:@"Content-Length"]; + contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertTrue([[[request URL] absoluteString] hasSuffix:uploadReqURLPath], + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"24499", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 174501-198999/199000", @"range"); + + + // + // repeat the upload, and after sending 70000 bytes the progress + // callback will change the request URL for the next chunk fetch to make + // it fail with a retryable status error + // + + [self resetFetchResponse]; + + fetcher = [GTMHTTPUploadFetcher uploadFetcherWithRequest:request + uploadData:bigData + uploadMIMEType:@"text/plain" + chunkSize:75000 + fetcherService:nil]; + fetcher.retryEnabled = YES; + fetcher.retrySelector = retrySel; + fetcher.sentDataSelector = progressSel; + + // add a property to the fetcher that our progress callback will look for to + // know when to retry the upload + [fetcher setProperty:[NSNumber numberWithInt:70000] + forKey:kRetryAtKey]; + + [fetcher beginFetchWithDelegate:self + didFinishSelector:finishedSel]; + + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + + // check the request of the final chunk fetcher to be sure we were uploading + // chunks as expected. + reqHdrs = [fetcher.mutableRequest allHTTPHeaderFields]; + + uploadReqURLPath = @"gettysburgaddress.txt.location"; + contentLength = [reqHdrs objectForKey:@"Content-Length"]; + contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertTrue([[[request URL] absoluteString] hasSuffix:uploadReqURLPath], + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"24499", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 174501-198999/199000", @"range"); + + + // + // repeat the forced-retry upload, using blocks + // + + [self resetFetchResponse]; + fetcher = [GTMHTTPUploadFetcher uploadFetcherWithRequest:request + uploadData:bigData + uploadMIMEType:@"text/plain" + chunkSize:75000 + fetcherService:nil]; + fetcher.retryEnabled = YES; + [fetcher setRetryBlock:^(BOOL suggestedWillRetry, NSError *error) { + BOOL shouldRetry = [self uploadRetryFetcher:fetcher + willRetry:suggestedWillRetry + forError:error]; + return shouldRetry; + }]; + + [fetcher setSentDataBlock:^(NSInteger bytesSent, NSInteger totalBytesSent, NSInteger expectedBytes) { + [self uploadFetcher:fetcher + didSendBytes:bytesSent + totalBytesSent:totalBytesSent +totalBytesExpectedToSend:expectedBytes]; + }]; + + // add a property to the fetcher that our progress callback will look for to + // know when to retry the upload + [fetcher setProperty:[NSNumber numberWithInt:70000] + forKey:kRetryAtKey]; + + [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { + [self testFetcher:fetcher + finishedWithData:data + error:error]; + }]; + + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + + // check the request of the final chunk fetcher to be sure we were uploading + // chunks as expected. + reqHdrs = [fetcher.mutableRequest allHTTPHeaderFields]; + + uploadReqURLPath = @"gettysburgaddress.txt.location"; + contentLength = [reqHdrs objectForKey:@"Content-Length"]; + contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertTrue([[[request URL] absoluteString] hasSuffix:uploadReqURLPath], + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"24499", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 174501-198999/199000", @"range"); + + + // + // upload a small buffer + // + [self resetFetchResponse]; + + fetcher = [GTMHTTPUploadFetcher uploadFetcherWithRequest:request + uploadData:smallData + uploadMIMEType:@"text/plain" + chunkSize:75000 + fetcherService:nil]; + + [fetcher beginFetchWithDelegate:self + didFinishSelector:finishedSel]; + + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + + // check that we fetched the expected data + STAssertEqualObjects(fetchedData_, gettysburgAddress, + @"Lincoln disappointed"); + STAssertNotNil(fetchedResponse_, + @"failed to get fetch response, status:%d error:%@", + fetchedStatus_, fetcherError_); + STAssertNotNil(fetchedRequest_, + @"failed to get fetch request, URL %@", urlString); + STAssertNil(fetcherError_, @"fetching data gave error: %@", fetcherError_); + STAssertEquals(fetchedStatus_, 200, + @"unexpected status for URL %@", urlString); + + // check the request of the final chunk fetcher to be sure we were uploading + // chunks as expected + reqHdrs = [fetcher.mutableRequest allHTTPHeaderFields]; + + uploadReqURLPath = @"gettysburgaddress.txt.location"; + contentLength = [reqHdrs objectForKey:@"Content-Length"]; + contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertTrue([[[request URL] absoluteString] hasSuffix:uploadReqURLPath], + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"13", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 0-12/13", @"range"); + + // + // delete the big file + // + [[NSFileManager defaultManager] removeItemAtPath:bigFilePath + error:NULL]; +} + +#pragma mark - + +- (GTMHTTPFetcher *)doFetchWithURLString:(NSString *)urlString + cachingDatedData:(BOOL)doCaching { + + return [self doFetchWithURLString:(NSString *)urlString + cachingDatedData:doCaching + retrySelector:nil + maxRetryInterval:0 + credential:nil + userData:nil]; +} + +- (GTMHTTPFetcher *)doFetchWithURLString:(NSString *)urlString + cachingDatedData:(BOOL)doCaching + retrySelector:(SEL)retrySel + maxRetryInterval:(NSTimeInterval)maxRetryInterval + credential:(NSURLCredential *)credential + userData:(id)userData { + NSURL *url = [NSURL URLWithString:urlString]; + NSURLRequest *req = [NSURLRequest requestWithURL:url + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:kGiveUpInterval]; + GTMHTTPFetcher *fetcher = [GTMHTTPFetcher fetcherWithRequest:req]; + + STAssertNotNil(fetcher, @"Failed to allocate fetcher"); + + // setting the fetch history will add the "If-modified-since" header + // to repeat requests + [fetchHistory_ setShouldCacheETaggedData:doCaching]; + [fetcher setFetchHistory:fetchHistory_]; + + if (retrySel) { + [fetcher setRetryEnabled:YES]; + [fetcher setRetrySelector:retrySel]; + [fetcher setMaxRetryInterval:maxRetryInterval]; + [fetcher setUserData:userData]; + + // we force a minimum retry interval for unit testing; otherwise, + // we'd have no idea how many retries will occur before the max + // retry interval occurs, since the minimum would be random + [fetcher setMinRetryInterval:1.0]; + } + + [fetcher setCredential:credential]; + + BOOL isFetching = [fetcher beginFetchWithDelegate:self + didFinishSelector:@selector(testFetcher:finishedWithData:error:)]; + STAssertTrue(isFetching, @"Begin fetch failed"); + + if (isFetching) { + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + } + return fetcher; +} + +- (NSString *)localPathForFileName:(NSString *)name { + NSString *docRoot = [self docRootPath]; + NSString *filePath = [docRoot stringByAppendingPathComponent:name]; + return filePath; +} + +- (NSString *)localURLStringToTestFileName:(NSString *)name { + + // we need to create http URLs referring to the desired + // resource to be found by the http server running locally + + // return a localhost:port URL for the test file + NSString *urlString = [NSString stringWithFormat:@"http://localhost:%d/%@", + [testServer_ port], name]; + + // we exclude parameters + NSRange range = [name rangeOfString:@"?"]; + if (range.location != NSNotFound) { + name = [name substringToIndex:range.location]; + } + + // just for sanity, let's make sure we see the file locally, so + // we can expect the Python http server to find it too + NSString *filePath = [self localPathForFileName:name]; + + BOOL doesExist = [[NSFileManager defaultManager] fileExistsAtPath:filePath]; + STAssertTrue(doesExist, @"Missing test file %@", filePath); + + return urlString; +} + +- (void)testFetcher:(GTMHTTPFetcher *)fetcher + finishedWithData:(NSData *)data + error:(NSError *)error { + fetchedData_ = [data copy]; + fetchedStatus_ = [fetcher statusCode]; + fetchedRequest_ = [[fetcher mutableRequest] retain]; + fetchedResponse_ = [[fetcher response] retain]; + fetcherError_ = [error retain]; +} + + +// Selector for allowing up to N retries, where N is an NSNumber in the +// fetcher's userData +- (BOOL)countRetriesfetcher:(GTMHTTPFetcher *)fetcher + willRetry:(BOOL)suggestedWillRetry + forError:(NSError *)error { + + int count = [fetcher retryCount]; + int allowedRetryCount = [[fetcher userData] intValue]; + + BOOL shouldRetry = (count < allowedRetryCount); + + STAssertEquals([fetcher nextRetryInterval], pow(2.0, [fetcher retryCount]), + @"unexpected next retry interval (expected %f, was %f)", + pow(2.0, [fetcher retryCount]), + [fetcher nextRetryInterval]); + + NSData *statusData = [[error userInfo] objectForKey:kGTMHTTPFetcherStatusDataKey]; + NSString *dataStr = [[[NSString alloc] initWithData:statusData + encoding:NSUTF8StringEncoding] autorelease]; + NSString *expectedStr = @"{ \"error\" : { \"message\" : \"Server Status 503\", \"code\" : 503 } }"; + STAssertEqualObjects(dataStr, expectedStr, nil); + + return shouldRetry; +} + +// Selector for retrying and changing the request to one that will succeed +- (BOOL)fixRequestFetcher:(GTMHTTPFetcher *)fetcher + willRetry:(BOOL)suggestedWillRetry + forError:(NSError *)error { + + STAssertEquals([fetcher nextRetryInterval], pow(2.0, [fetcher retryCount]), + @"unexpected next retry interval (expected %f, was %f)", + pow(2.0, [fetcher retryCount]), + [fetcher nextRetryInterval]); + + // fix it - change the request to a URL which does not have a status value + NSString *urlString = [self localURLStringToTestFileName:kValidFileName]; + + NSURL *url = [NSURL URLWithString:urlString]; + [[fetcher mutableRequest] setURL:url]; + + return YES; // do the retry fetch; it should succeed now +} + +@end + +@implementation TestAuthorizer + +@synthesize expired = hasExpired_; + ++ (TestAuthorizer *)authorizer { + return [[[self alloc] init] autorelease]; +} + ++ (TestAuthorizer *)expiredAuthorizer { + TestAuthorizer *authorizer = [self authorizer]; + authorizer.expired = YES; + return authorizer; +} + +- (void)authorizeRequest:(NSMutableURLRequest *)request + delegate:(id)delegate + didFinishSelector:(SEL)sel { + NSString *value = self.expired ? kExpiredBearerValue : kGoodBearerValue; + [request setValue:value forHTTPHeaderField:@"Authorization"]; + NSError *error = nil; + + if (delegate && sel) { + NSMethodSignature *sig = [delegate methodSignatureForSelector:sel]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; + [invocation setSelector:sel]; + [invocation setTarget:delegate]; + [invocation setArgument:&self atIndex:2]; + [invocation setArgument:&request atIndex:3]; + [invocation setArgument:&error atIndex:4]; + [invocation invoke]; + } +} + +- (void)stopAuthorization { +} + +- (void)stopAuthorizationForRequest:(NSURLRequest *)request { +} + +- (BOOL)isAuthorizingRequest:(NSURLRequest *)request { + return NO; +} + +- (BOOL)isAuthorizedRequest:(NSURLRequest *)request { + NSString *value = [[request allHTTPHeaderFields] objectForKey:@"Authorization"]; + BOOL isValid = [value isEqual:kGoodBearerValue]; + return isValid; +} + +- (NSString *)userEmail { + return @""; +} + +- (BOOL)primeForRefresh { + self.expired = NO; + return YES; +} + +@end diff --git a/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPFetcherServiceTest.m.svn-base b/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPFetcherServiceTest.m.svn-base new file mode 100644 index 0000000..ebd0569 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPFetcherServiceTest.m.svn-base @@ -0,0 +1,316 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GTMHTTPFetcherTestServer.h" +#import "GTMHTTPFetcherService.h" + +@interface GTMHTTPFetcherServiceTest : SenTestCase { + GTMHTTPFetcherTestServer *testServer_; + BOOL isServerRunning_; +} + +@end + +@implementation GTMHTTPFetcherServiceTest + +// file available in Tests folder +static NSString *const kValidFileName = @"gettysburgaddress.txt"; + +- (NSString *)docRootPath { + // find a test file + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + STAssertNotNil(testBundle, nil); + + // use the directory of the test file as the root directory for our server + NSString *docFolder = [testBundle resourcePath]; + return docFolder; +} + +- (void)setUp { + NSString *docRoot = [self docRootPath]; + + testServer_ = [[GTMHTTPFetcherTestServer alloc] initWithDocRoot:docRoot]; + isServerRunning_ = (testServer_ != nil); + + STAssertTrue(isServerRunning_, + @">>> http test server failed to launch; skipping" + " service tests\n"); +} + +- (void)tearDown { + [testServer_ release]; + testServer_ = nil; + + isServerRunning_ = NO; +} + +- (void)testFetcherService { + if (!isServerRunning_) return; + + // Utility blocks for counting array entries for a specific host + NSUInteger (^URLsPerHost) (NSArray *, NSString *) = ^(NSArray *URLs, + NSString *host) { + NSUInteger counter = 0; + for (NSURL *url in URLs) { + if ([host isEqual:[url host]]) counter++; + } + return counter; + }; + + NSUInteger (^FetchersPerHost) (NSArray *, NSString *) = ^(NSArray *fetchers, + NSString *host) { + NSArray *fetcherURLs = [fetchers valueForKeyPath:@"mutableRequest.URL"]; + return URLsPerHost(fetcherURLs, host); + }; + + // Utility block for finding the minimum priority fetcher for a specific host + NSInteger (^PriorityPerHost) (NSArray *, NSString *) = ^(NSArray *fetchers, + NSString *host) { + NSInteger val = NSIntegerMax; + for (GTMHTTPFetcher *fetcher in fetchers) { + if ([host isEqual:[[fetcher.mutableRequest URL] host]]) { + val = MIN(val, fetcher.servicePriority); + } + } + return val; + }; + + // We'll verify we fetched from the server the same data that is on disk + NSString *gettysburgPath = [testServer_ localPathForFile:kValidFileName]; + NSData *gettysburgAddress = [NSData dataWithContentsOfFile:gettysburgPath]; + + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + + // We'll create 10 fetchers. Only 2 should run simultaneously. + // 1 should fail; the rest should succeeed. + const NSUInteger kMaxRunningFetchersPerHost = 2; + + NSString *const kUserAgent = @"ServiceTest-UA"; + const NSTimeInterval kTimeout = 55; + + GTMHTTPFetcherService *service = [[[GTMHTTPFetcherService alloc] init] autorelease]; + service.maxRunningFetchersPerHost = kMaxRunningFetchersPerHost; + service.fetchHistory.shouldRememberETags = NO; + service.userAgent = kUserAgent; + service.timeout = kTimeout; + + // Make URLs for a valid fetch, a fetch that returns a status error, + // and a valid fetch with a different host + NSURL *validFileURL = [testServer_ localURLForFile:kValidFileName]; + + NSString *invalidFile = [kValidFileName stringByAppendingString:@"?status=400"]; + NSURL *invalidFileURL = [testServer_ localURLForFile:invalidFile]; + + NSString *validURLStr = [validFileURL absoluteString]; + NSString *altValidURLStr = [validURLStr stringByReplacingOccurrencesOfString:@"localhost" + withString:@"127.0.0.1"]; + NSURL *altValidURL = [NSURL URLWithString:altValidURLStr]; + + STAssertEqualObjects([validFileURL host], @"localhost", @"unexpected host"); + STAssertEqualObjects([invalidFileURL host], @"localhost", @"unexpected host"); + STAssertEqualObjects([altValidURL host], @"127.0.0.1", @"unexpected host"); + + // Make an array with the urls from the different hosts, including one + // that will fail with a status 400 error + NSMutableArray *urlArray = [NSMutableArray array]; + for (int idx = 1; idx <= 4; idx++) [urlArray addObject:validFileURL]; + [urlArray addObject:invalidFileURL]; + for (int idx = 1; idx <= 5; idx++) [urlArray addObject:validFileURL]; + for (int idx = 1; idx <= 5; idx++) [urlArray addObject:altValidURL]; + for (int idx = 1; idx <= 5; idx++) [urlArray addObject:validFileURL]; + NSUInteger totalNumberOfFetchers = [urlArray count]; + + __block NSMutableArray *pending = [NSMutableArray array]; + __block NSMutableArray *running = [NSMutableArray array]; + __block NSMutableArray *completed = [NSMutableArray array]; + + NSUInteger priorityVal = 0; + + // Create all the fetchers + for (NSURL *fileURL in urlArray) { + GTMHTTPFetcher *fetcher = [service fetcherWithURL:fileURL]; + + // Fetcher start notification + [nc addObserverForName:kGTMHTTPFetcherStartedNotification + object:fetcher + queue:nil + usingBlock:^(NSNotification *note) { + // Verify that we have at most two fetchers running for this + // fetcher's host + [running addObject:fetcher]; + [pending removeObject:fetcher]; + + NSMutableURLRequest *fetcherReq = [fetcher mutableRequest]; + NSURL *fetcherReqURL = [fetcherReq URL]; + NSString *host = [fetcherReqURL host]; + NSUInteger numberRunning = FetchersPerHost(running, host); + STAssertTrue(numberRunning > 0, @"count error"); + STAssertTrue(numberRunning <= kMaxRunningFetchersPerHost, + @"too many running"); + + NSInteger pendingPriority = PriorityPerHost(pending, host); + STAssertTrue(fetcher.servicePriority <= pendingPriority, + @"a pending fetcher has greater priority"); + + STAssertEquals([service numberOfFetchers], + [running count] + [pending count], + @"fetcher count off"); + STAssertEquals([service numberOfRunningFetchers], + [running count], @"running off"); + STAssertEquals([service numberOfDelayedFetchers], + [pending count], @"delayed off"); + + NSArray *matches = + [service issuedFetchersWithRequestURL:fetcherReqURL]; + NSUInteger idx = NSNotFound; + if (matches) { + idx = [matches indexOfObjectIdenticalTo:fetcher]; + } + STAssertTrue(idx != NSNotFound, @"Missing %@ in %@", + fetcherReqURL, matches); + NSURL *fakeURL = + [NSURL URLWithString:@"http://example.com/bad"]; + matches = [service issuedFetchersWithRequestURL:fakeURL]; + STAssertEquals([matches count], (NSUInteger)0, nil); + + NSString *agent = [fetcherReq valueForHTTPHeaderField:@"User-Agent"]; + STAssertEqualObjects(agent, kUserAgent, nil); + STAssertEquals([fetcherReq timeoutInterval], kTimeout, nil); + }]; + + // Fetcher stopped notification + [nc addObserverForName:kGTMHTTPFetcherStoppedNotification + object:fetcher + queue:nil + usingBlock:^(NSNotification *note) { + // Verify that we only have two fetchers running + [completed addObject:fetcher]; + [running removeObject:fetcher]; + + NSString *host = [[[fetcher mutableRequest] URL] host]; + + NSUInteger numberRunning = FetchersPerHost(running, host); + NSUInteger numberPending = FetchersPerHost(pending, host); + NSUInteger numberCompleted = FetchersPerHost(completed, host); + + STAssertTrue(numberRunning <= kMaxRunningFetchersPerHost, + @"too many running"); + STAssertTrue(numberPending + numberRunning + numberCompleted <= URLsPerHost(urlArray, host), + @"%d issued running (pending:%u running:%u completed:%u)", + totalNumberOfFetchers, (unsigned int)numberPending, + (unsigned int)numberRunning, (unsigned int)numberCompleted); + + STAssertEquals([service numberOfFetchers], + [running count] + [pending count] + 1, + @"fetcher count off"); + STAssertEquals([service numberOfRunningFetchers], + [running count] + 1, @"running off"); + STAssertEquals([service numberOfDelayedFetchers], + [pending count], @"delayed off"); + }]; + + [pending addObject:fetcher]; + + // Set the fetch priority to a value that cycles 0, 1, -1, 0, ... + priorityVal++; + if (priorityVal > 1) priorityVal = -1; + fetcher.servicePriority = priorityVal; + + // Start this fetcher + [fetcher beginFetchWithCompletionHandler:^(NSData *fetchData, NSError *fetchError) { + // Callback + // + // The query should be empty except for the URL with a status code + NSString *query = [[[fetcher mutableRequest] URL] query]; + BOOL isValidRequest = ([query length] == 0); + if (isValidRequest) { + STAssertEqualObjects(fetchData, gettysburgAddress, + @"Bad fetch data"); + STAssertNil(fetchError, @"unexpected %@ %@", + fetchError, [fetchError userInfo]); + } else { + // This is the query with ?status=400 + STAssertEquals([fetchError code], (NSInteger) 400, @"expected error"); + } + }]; + } + + [service waitForCompletionOfAllFetchersWithTimeout:10]; + + STAssertEquals([pending count], (NSUInteger) 0, + @"still pending: %@", pending); + STAssertEquals([running count], (NSUInteger) 0, + @"still running: %@", running); + STAssertEquals([completed count], (NSUInteger) totalNumberOfFetchers, + @"incomplete"); + + STAssertEquals([service numberOfFetchers], (NSUInteger) 0, + @"service non-empty"); +} + +- (void)testStopAllFetchers { + if (!isServerRunning_) return; + + GTMHTTPFetcherService *service = [[[GTMHTTPFetcherService alloc] init] autorelease]; + service.maxRunningFetchersPerHost = 2; + service.fetchHistory.shouldRememberETags = NO; + + // Create three fetchers for each of two URLs, so there should be + // two running and one delayed for each + NSURL *validFileURL = [testServer_ localURLForFile:kValidFileName]; + + NSString *validURLStr = [validFileURL absoluteString]; + NSString *altValidURLStr = [validURLStr stringByReplacingOccurrencesOfString:@"localhost" + withString:@"127.0.0.1"]; + NSURL *altValidURL = [NSURL URLWithString:altValidURLStr]; + + // Add three fetches for each URL + NSMutableArray *urlArray = [NSMutableArray array]; + [urlArray addObject:validFileURL]; + [urlArray addObject:altValidURL]; + [urlArray addObject:validFileURL]; + [urlArray addObject:altValidURL]; + [urlArray addObject:validFileURL]; + [urlArray addObject:altValidURL]; + + // Create and start all the fetchers + for (NSURL *fileURL in urlArray) { + GTMHTTPFetcher *fetcher = [service fetcherWithURL:fileURL]; + [fetcher beginFetchWithCompletionHandler:^(NSData *fetchData, NSError *fetchError) { + // We shouldn't reach any of the callbacks + STFail(@"Fetcher completed but should have been stopped"); + }]; + } + + // Two hosts + STAssertEquals([service.runningHosts count], (NSUInteger)2, @"hosts running"); + STAssertEquals([service.delayedHosts count], (NSUInteger)2, @"hosts delayed"); + + // We should see two fetchers running and one delayed for each host + NSArray *localhosts = [service.runningHosts objectForKey:@"localhost"]; + STAssertEquals([localhosts count], (NSUInteger)2, @"hosts running"); + + localhosts = [service.delayedHosts objectForKey:@"localhost"]; + STAssertEquals([localhosts count], (NSUInteger)1, @"hosts delayed"); + + [service stopAllFetchers]; + + STAssertEquals([service.runningHosts count], (NSUInteger)0, @"hosts running"); + STAssertEquals([service.delayedHosts count], (NSUInteger)0, @"hosts delayed"); +} + +@end diff --git a/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPFetcherTestServer.h.svn-base b/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPFetcherTestServer.h.svn-base new file mode 100644 index 0000000..1d381c7 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPFetcherTestServer.h.svn-base @@ -0,0 +1,42 @@ +// +// GTMHTTPFetcherTestServer.h +// +// Copyright 2010 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not +// use this file except in compliance with the License. You may obtain a copy +// of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations under +// the License. +// + +#import "GTMHTTPServer.h" + + +// This is a HTTP Server that responsd to requests by returning the requested +// file. It takes extra url arguments to tell it what to +// return for testing the code using it. +@interface GTMHTTPFetcherTestServer : NSObject { + NSString *docRoot_; + GTMHTTPServer *server_; +} + +// Any url that isn't a specific server request (login, etc.), will be fetched +// off |docRoot| (to allow canned repsonses). +- (id)initWithDocRoot:(NSString *)docRoot; + +- (void)stopServer; + +// fetch the port the server is running on +- (uint16_t)port; + +// utilities for users +- (NSURL *)localURLForFile:(NSString *)name; // http://localhost:port/filename +- (NSString *)localPathForFile:(NSString *)name; // docRoot/filename +@end diff --git a/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPFetcherTestServer.m.svn-base b/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPFetcherTestServer.m.svn-base new file mode 100644 index 0000000..2482e34 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPFetcherTestServer.m.svn-base @@ -0,0 +1,358 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMHTTPFetcherTestServer.m +// + +#import "GTMHTTPFetcherTestServer.h" + +@interface GTMHTTPFetcherTestServer () +- (NSString *)valueForParameter:(NSString *)paramName query:(NSString *)query; +@end + +@interface GTMSBJSON +- (id)objectWithString:(NSString*)jsonrep error:(NSError**)error; +@end + +@interface GTMNSJSONSerialization : NSObject ++ (id)JSONObjectWithData:(NSData *)data options:(NSUInteger)opt error:(NSError **)error; +@end + +@implementation GTMHTTPFetcherTestServer + +- (id)initWithDocRoot:(NSString *)docRoot { + self = [super init]; + if (self) { + docRoot_ = [docRoot copy]; + server_ = [[GTMHTTPServer alloc] initWithDelegate:self]; + NSError *error = nil; + if ((docRoot == nil) || (![server_ start:&error])) { + NSLog(@"Failed to start up the GTMHTTPFetcherTestServer " + "(docRoot='%@', error=%@)", docRoot_, error); + [self release]; + return nil; + } else { + NSLog(@"Started GTMHTTPFetcherTestServer on port %d (docRoot='%@')", + [server_ port], docRoot_); + } + } + return self; +} + +- (void)stopServer { + if (server_) { + NSLog(@"Stopped GTMHTTPFetcherTestServer on port %d (docRoot='%@')", + [server_ port], docRoot_); + [server_ release]; + server_ = nil; + + [docRoot_ release]; + docRoot_ = nil; + } +} + +- (void)finalize { + [self stopServer]; + [super finalize]; +} + +- (void)dealloc { + [self stopServer]; + [super dealloc]; +} + +- (uint16_t)port { + return [server_ port]; +} + +- (id)JSONFromData:(NSData *)data { + NSError *error = nil; + const NSUInteger kOpts = NSJSONReadingMutableContainers; + id obj = [NSJSONSerialization JSONObjectWithData:data + options:kOpts + error:&error]; + if (obj == nil) { + NSString *jsonStr = [[[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding] autorelease]; + NSLog(@"JSON parse error: %@\n for JSON string: %@", + error, jsonStr); + } + return obj; +} + +- (GTMHTTPResponseMessage *)httpServer:(GTMHTTPServer *)server + handleRequest:(GTMHTTPRequestMessage *)request { + NSAssert(server == server_, @"how'd we get a different server?!"); + + GTMHTTPResponseMessage *response; + int resultStatus = 0; + NSData *data = nil; + NSMutableDictionary *responseHeaders = [NSMutableDictionary dictionary]; + + NSString *etag = @"GoodETag"; + + NSDictionary *requestHeaders = [request allHeaderFieldValues]; + NSString *ifMatch = [requestHeaders objectForKey:@"If-Match"]; + NSString *ifNoneMatch = [requestHeaders objectForKey:@"If-None-Match"]; + NSString *authorization = [requestHeaders objectForKey:@"Authorization"]; + NSString *path = [[request URL] path]; + NSString *query = [[request URL] query]; + + NSString *method = [request method]; + + // Code for future testing of the chunked-upload protocol + // + // This code is not yet tested + NSString *host = [requestHeaders objectForKey:@"Host"]; + NSString *contentRange = [requestHeaders objectForKey:@"Content-Range"]; + + // chunked (resumable) upload testing + if ([[path pathExtension] isEqual:@"location"]) { + + // return a location header containing the request path with + // the ".location" suffix changed to ".upload" + NSString *pathWithoutLoc = [path stringByDeletingPathExtension]; + NSString *fullLocation = [NSString stringWithFormat:@"http://%@%@.upload", + host, pathWithoutLoc]; + + [responseHeaders setValue:fullLocation forKey:@"Location"]; + resultStatus = 200; + goto SendResponse; + } else if ([[path pathExtension] isEqual:@"upload"]) { + // chunked (resumable) upload testing + + // if the contentRange indicates this is a middle chunk, + // return status 308 with a Range header; otherwise, strip + // the ".upload" and continue to return the file + // + // contentRange is like + // Content-Range: bytes 0-49999/135681 + // or + // Content-Range: bytes * /135681 + NSScanner *crScanner = [NSScanner scannerWithString:contentRange]; + long long totalToUpload = 0; + if ([crScanner scanString:@"bytes */" intoString:NULL] + && [crScanner scanLongLong:&totalToUpload]) { + // this is a query for where to resume; we'll arbitrarily resume at + // half the total length of the upload + long long resumeLocation = totalToUpload / 2; + NSString *range = [NSString stringWithFormat:@"bytes=0-%lld", + resumeLocation]; + [responseHeaders setValue:range forKey:@"Range"]; + resultStatus = 308; + goto SendResponse; + } + + long long rangeLow = 0; + long long rangeHigh = 0; + if ([crScanner scanString:@"bytes " intoString:nil] + && [crScanner scanLongLong:&rangeLow] + && [crScanner scanString:@"-" intoString:NULL] + && [crScanner scanLongLong:&rangeHigh] + && [crScanner scanString:@"/" intoString:NULL] + && [crScanner scanLongLong:&totalToUpload]) { + // a chunk request + if ((rangeHigh + 1) < totalToUpload) { + // this is a middle chunk, so send a 308 status to ask for more chunks + NSString *range = [NSString stringWithFormat:@"bytes=0-%lld", + rangeHigh]; + [responseHeaders setValue:range forKey:@"Range"]; + resultStatus = 308; + goto SendResponse; + } else { + // this is the final chunk; remove the ".upload" at the end and + // fall through to return the requested resource at the path + path = [path stringByDeletingPathExtension]; + } + } + } + + // if there's an "auth=foo" query parameter, then the value of the + // Authorization header should be "foo" + NSString *authStr = [self valueForParameter:@"oauth2" query:query]; + if (authStr) { + NSString *bearerStr = [@"Bearer " stringByAppendingString:authStr]; + if (authorization == nil + || ![authorization isEqualToString:bearerStr]) { + // return status 401 Unauthorized + NSString *errStr = [NSString stringWithFormat:@"Authorization \"%@\" should be \"%@\"", + authorization, bearerStr]; + NSData *errData = [errStr dataUsingEncoding:NSUTF8StringEncoding]; + GTMHTTPResponseMessage *response; + response = [GTMHTTPResponseMessage responseWithBody:errData + contentType:@"text/plain" + statusCode:401]; + return response; + } + } + + NSString *statusStr = [self valueForParameter:@"status" query:query]; + if (statusStr) { + // queries that have something like "?status=456" should fail with the + // status code + resultStatus = [statusStr intValue]; + + NSString *const template = @"{ \"error\" : { \"message\" : \"Server Status %u\"," + @" \"code\" : %u } }"; + NSString *errorStr = [NSString stringWithFormat:template, + resultStatus, resultStatus]; + data = [errorStr dataUsingEncoding:NSUTF8StringEncoding]; + } else { + if (ifMatch != nil && ![ifMatch isEqual:etag]) { + // there is no match, hence this is an inconsistent PUT or DELETE + resultStatus = 412; // precondition failed + } else if (ifNoneMatch != nil && [ifNoneMatch isEqual:etag]) { + // there is a match, hence this is a repetitive request + if ([method isEqual:@"GET"] || [method isEqual:@"HEAD"]) { + resultStatus = 304; // not modified + } else { + resultStatus = 412; // precondition failed + } + } else if ([method isEqualToString:@"DELETE"]) { + // it's an object delete; return empty data + resultStatus = 200; + } else { + if ([path hasSuffix:@".rpc"]) { + // JSON-RPC tests + // + // the fetch file name is like Foo.rpc; there should be local files + // with the expected JSON request body, and the response body + // + // replace the .rpc suffix with .request.txt and .response.txt + NSString *withoutRpcExtn = [path stringByDeletingPathExtension]; + NSString *requestName = [withoutRpcExtn stringByAppendingPathExtension:@"request.txt"]; + NSString *responseName = [withoutRpcExtn stringByAppendingPathExtension:@"response.txt"]; + + // read the expected request body from disk + NSString *requestPath = [docRoot_ stringByAppendingPathComponent:requestName]; + NSData *requestData = [NSData dataWithContentsOfFile:requestPath]; + if (!requestData) { + // we need a query request file for rpc tests + NSLog(@"Cannot find query request file \"%@\"", requestPath); + } else { + // verify that the RPC request body is as expected + NSDictionary *expectedJSON = [self JSONFromData:requestData]; + NSDictionary *requestJSON = [self JSONFromData:[request body]]; + + if (expectedJSON && requestJSON + && [requestJSON isEqual:expectedJSON]) { + // the request body matches + // + // for rpc, the response file ought to be here; + // 404s shouldn't happen + NSString *responsePath = [docRoot_ stringByAppendingPathComponent:responseName]; + if ([[NSFileManager defaultManager] fileExistsAtPath:responsePath]) { + path = responseName; + } else { + NSLog(@"Cannot find query response file \"%@\"", responsePath); + } + } else { + // the actual request did not match the expected request + // + // note that the requests may be dictionaries or arrays + NSLog(@"Mismatched request body for \"%@\"", path); + NSLog(@"\n--------\nExpected request:\n%@", expectedJSON); + NSLog(@"\n--------\nActual request:\n%@", requestJSON); + } + } + } + + // read and return the document from the path, or status 404 for not found + NSString *docPath = [docRoot_ stringByAppendingPathComponent:path]; + data = [NSData dataWithContentsOfFile:docPath]; + if (data) { + resultStatus = 200; + } else { + resultStatus = 404; + } + } + } + + if ([method isEqual:@"GET"]) { + [responseHeaders setValue:etag forKey:@"Etag"]; + } + + NSString *cookie = [NSString stringWithFormat:@"TestCookie=%@", + [path lastPathComponent]]; + [responseHeaders setValue:cookie forKey:@"Set-Cookie"]; + + // + // Finally, package up the response, and return it to the client + // +SendResponse: + response = [GTMHTTPResponseMessage responseWithBody:data + contentType:@"application/json" + statusCode:resultStatus]; + + [response setHeaderValuesFromDictionary:responseHeaders]; + + return response; +} + +- (NSString *)valueForParameter:(NSString *)paramName query:(NSString *)query { + if (!query) return nil; + + // search the query for a parameter beginning with "paramName=" and + // ending with & or the end-of-string + NSString *result = nil; + NSString *paramWithEquals = [paramName stringByAppendingString:@"="]; + NSRange paramNameRange = [query rangeOfString:paramWithEquals]; + if (paramNameRange.location != NSNotFound) { + // we found the param name; find the end of the parameter + NSCharacterSet *endSet = [NSCharacterSet characterSetWithCharactersInString:@"&\n"]; + NSUInteger startOfParam = paramNameRange.location + paramNameRange.length; + NSRange endSearchRange = NSMakeRange(startOfParam, + [query length] - startOfParam); + NSRange endRange = [query rangeOfCharacterFromSet:endSet + options:0 + range:endSearchRange]; + if (endRange.location == NSNotFound) { + // param goes to end of string + result = [query substringFromIndex:startOfParam]; + } else { + // found and end marker + NSUInteger paramLen = endRange.location - startOfParam; + NSRange foundRange = NSMakeRange(startOfParam, paramLen); + result = [query substringWithRange:foundRange]; + } + } else { + // param not found + } + return result; +} + +// utilities for users +- (NSURL *)localURLForFile:(NSString *)name { + // we need to create http URLs referring to the desired + // resource to be found by the http server running locally + + // return a localhost:port URL for the test file + NSString *urlString = [NSString stringWithFormat:@"http://localhost:%d/%@", + [self port], name]; + return [NSURL URLWithString:urlString]; +} + +- (NSString *)localPathForFile:(NSString *)name { + // we exclude parameters + NSRange range = [name rangeOfString:@"?"]; + if (range.location != NSNotFound) { + name = [name substringToIndex:range.location]; + } + NSString *filePath = [docRoot_ stringByAppendingPathComponent:name]; + return filePath; +} + +@end diff --git a/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPFetcherUtilityTest.m.svn-base b/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPFetcherUtilityTest.m.svn-base new file mode 100644 index 0000000..4847d32 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPFetcherUtilityTest.m.svn-base @@ -0,0 +1,121 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GTMHTTPFetcher.h" +#import "GTMHTTPFetcherLogging.h" + +@interface GTMHTTPFetcherUtilityTest : SenTestCase +@end + +@interface GTMHTTPFetcher (GTMHTTPFetcherLoggingInternal) ++ (NSString *)snipSubstringOfString:(NSString *)originalStr + betweenStartString:(NSString *)startStr + endString:(NSString *)endStr; +@end + + +@implementation GTMHTTPFetcherUtilityTest + +#if !STRIP_GTM_FETCH_LOGGING +- (void)testLogSnipping { + // enpty string + NSString *orig = @""; + NSString *expected = orig; + NSString *result = [GTMHTTPFetcher snipSubstringOfString:orig + betweenStartString:@"jkl" + endString:@"mno"]; + STAssertEqualObjects(result, expected, @"simple snip to end failure"); + + // snip the middle + orig = @"abcdefg"; + expected = @"abcd_snip_fg"; + result = [GTMHTTPFetcher snipSubstringOfString:orig + betweenStartString:@"abcd" + endString:@"fg"]; + STAssertEqualObjects(result, expected, @"simple snip in the middle failure"); + + // snip to the end + orig = @"abcdefg"; + expected = @"abcd_snip_"; + result = [GTMHTTPFetcher snipSubstringOfString:orig + betweenStartString:@"abcd" + endString:@"xyz"]; + STAssertEqualObjects(result, expected, @"simple snip to end failure"); + + // start string not found, so nothing should be snipped + orig = @"abcdefg"; + expected = orig; + result = [GTMHTTPFetcher snipSubstringOfString:orig + betweenStartString:@"jkl" + endString:@"mno"]; + STAssertEqualObjects(result, expected, @"simple snip to end failure"); + + // nothing between start and end + orig = @"abcdefg"; + expected = @"abcd_snip_efg"; + result = [GTMHTTPFetcher snipSubstringOfString:orig + betweenStartString:@"abcd" + endString:@"efg"]; + STAssertEqualObjects(result, expected, @"snip of empty string failure"); + + // snip like in OAuth + orig = @"OAuth oauth_consumer_key=\"example.net\", " + "oauth_token=\"1%2FpXi_-mBSegSbB-m9HprlwlxF6NF7IL7_9PDZok\", " + "oauth_signature=\"blP%2BG72aSQ2XadLLTk%2BNzUV6Wes%3D\""; + expected = @"OAuth oauth_consumer_key=\"example.net\", " + "oauth_token=\"_snip_\", " + "oauth_signature=\"blP%2BG72aSQ2XadLLTk%2BNzUV6Wes%3D\""; + result = [GTMHTTPFetcher snipSubstringOfString:orig + betweenStartString:@"oauth_token=\"" + endString:@"\""]; + STAssertEqualObjects(result, expected, @"realistic snip failure"); +} +#endif + +- (void)testGTMCleanedUserAgentString { + NSString *result = GTMCleanedUserAgentString(nil); + NSString *expected = nil; + STAssertEqualObjects(result, expected, nil); + + result = GTMCleanedUserAgentString(@""); + expected = @""; + STAssertEqualObjects(result, expected, nil); + + result = GTMCleanedUserAgentString(@"frog in tree/[1.2.3]"); + expected = @"frog_in_tree1.2.3"; + STAssertEqualObjects(result, expected, nil); + + result = GTMCleanedUserAgentString(@"\\iPod ({Touch])\n\r"); + expected = @"iPod_Touch"; + STAssertEqualObjects(result, expected, nil); +} + +- (void)testGTMSystemVersionString { +#if TARGET_OS_MAC && !TARGET_OS_IPHONE + NSString *result = GTMSystemVersionString(); + STAssertTrue([result hasPrefix:@"MacOSX/"], nil); +#else + STAssertTrue(NO, @"Add system version string test for this configuration"); +#endif +} + +- (void)testGTMApplicationIdentifier { + NSBundle *bundle = [NSBundle bundleForClass:[self class]]; + NSString *result = GTMApplicationIdentifier(bundle); + STAssertEqualObjects(result, @"com.yourcompany.UnitTests/1.0", nil); +} +@end diff --git a/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPServer.h.svn-base b/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPServer.h.svn-base new file mode 100644 index 0000000..f865a43 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPServer.h.svn-base @@ -0,0 +1,145 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMHTTPServer.h +// +// This is a *very* *simple* webserver that can be built into something, it is +// not meant to stand up a site, it sends all requests to its delegate for +// processing on the main thread. It does not support pipelining, etc. It's +// great for places where you need a simple webserver to unittest some code +// that hits a server. +// +// NOTE: there are several TODOs left in here as markers for things that could +// be done if one wanted to add more to this class. +// +// Based a little on HTTPServer, part of the CocoaHTTPServer sample code +// http://developer.apple.com/samplecode/CocoaHTTPServer/index.html +// + +#import + +#if GTM_IPHONE_SDK + #import +#endif // GTM_IPHONE_SDK + +// Global contants needed for errors from start + +#undef _EXTERN +#undef _INITIALIZE_AS +#ifdef GTMHTTPSERVER_DEFINE_GLOBALS + #define _EXTERN + #define _INITIALIZE_AS(x) =x +#else + #define _EXTERN extern + #define _INITIALIZE_AS(x) +#endif + +_EXTERN NSString* const kGTMHTTPServerErrorDomain _INITIALIZE_AS(@"com.google.mactoolbox.HTTPServerDomain"); +enum { + kGTMHTTPServerSocketCreateFailedError = -100, + kGTMHTTPServerBindFailedError = -101, + kGTMHTTPServerListenFailedError = -102, + kGTMHTTPServerHandleCreateFailedError = -103, +}; + +@class GTMHTTPRequestMessage, GTMHTTPResponseMessage; + +// ---------------------------------------------------------------------------- + +// See comment at top of file for the intened use of this class. +@interface GTMHTTPServer : NSObject { + @private + id delegate_; // WEAK + uint16_t port_; + BOOL reusePort_; + BOOL localhostOnly_; + NSFileHandle *listenHandle_; + NSMutableArray *connections_; +} + +// The delegate must support the httpServer:handleRequest: method in +// NSObject(GTMHTTPServerDelegateMethods) below. +- (id)initWithDelegate:(id)delegate; + +- (id)delegate; + +// Passing port zero will let one get assigned. +- (uint16_t)port; +- (void)setPort:(uint16_t)port; + +// Controls listening socket behavior: SO_REUSEADDR vs SO_REUSEPORT. +// The default is NO (SO_REUSEADDR) +- (BOOL)reusePort; +- (void)setReusePort:(BOOL)reusePort; + +// Receive connections on the localHost loopback address only or on all +// interfaces for this machine. The default is to only listen on localhost. +- (BOOL)localhostOnly; +- (void)setLocalhostOnly:(BOOL)yesno; + +// Start/Stop the web server. If there is an error starting up the server, |NO| +// is returned, and the specific startup failure can be returned in |error| (see +// above for the error domain and error codes). If the server is started, |YES| +// is returned and the server's delegate is called for any requests that come +// in. +- (BOOL)start:(NSError **)error; +- (void)stop; + +// returns the number of requests currently active in the server (i.e.-being +// read in, sent replies). +- (NSUInteger)activeRequestCount; + +@end + +@interface NSObject (GTMHTTPServerDelegateMethods) +- (GTMHTTPResponseMessage *)httpServer:(GTMHTTPServer *)server + handleRequest:(GTMHTTPRequestMessage *)request; +@end + +// ---------------------------------------------------------------------------- + +// Encapsulates an http request, one of these is sent to the server's delegate +// for each request. +@interface GTMHTTPRequestMessage : NSObject { + @private + CFHTTPMessageRef message_; +} +- (NSString *)version; +- (NSURL *)URL; +- (NSString *)method; +- (NSData *)body; +- (NSDictionary *)allHeaderFieldValues; +@end + +// ---------------------------------------------------------------------------- + +// Encapsulates an http response, the server's delegate should return one for +// each request received. +@interface GTMHTTPResponseMessage : NSObject { + @private + CFHTTPMessageRef message_; +} ++ (id)responseWithString:(NSString *)plainText; ++ (id)responseWithHTMLString:(NSString *)htmlString; ++ (id)responseWithBody:(NSData *)body + contentType:(NSString *)contentType + statusCode:(int)statusCode; ++ (id)emptyResponseWithCode:(int)statusCode; +// TODO: class method for redirections? +// TODO: add helper for expire/no-cache +- (void)setValue:(NSString*)value forHeaderField:(NSString*)headerField; +- (void)setHeaderValuesFromDictionary:(NSDictionary *)dict; +@end diff --git a/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPServer.m.svn-base b/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPServer.m.svn-base new file mode 100644 index 0000000..eedd332 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPServer.m.svn-base @@ -0,0 +1,630 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// Based a little on HTTPServer, part of the CocoaHTTPServer sample code +// http://developer.apple.com/samplecode/CocoaHTTPServer/index.html +// + +#import +#import +#import + +#define GTMHTTPSERVER_DEFINE_GLOBALS +#import "GTMHTTPServer.h" + +// avoid some of GTM's promiscuous dependencies +#ifndef _GTMDevLog +#define _GTMDevLog NSLog +#endif +#define GTM_STATIC_CAST(type, object) ((type *) (object)) +#define GTMCFAutorelease(x) [NSMakeCollectable(x) autorelease] + +@interface GTMHTTPServer (PrivateMethods) +- (void)acceptedConnectionNotification:(NSNotification *)notification; +- (NSMutableDictionary *)connectionWithFileHandle:(NSFileHandle *)fileHandle; +- (void)dataAvailableNotification:(NSNotification *)notification; +- (NSMutableDictionary *)lookupConnection:(NSFileHandle *)fileHandle; +- (void)closeConnection:(NSMutableDictionary *)connDict; +- (void)sendResponseOnNewThread:(NSMutableDictionary *)connDict; +- (void)sentResponse:(NSMutableDictionary *)connDict; +@end + +// keys for our connection dictionaries +static NSString *kFileHandle = @"FileHandle"; +static NSString *kRequest = @"Request"; +static NSString *kResponse = @"Response"; + +@interface GTMHTTPRequestMessage (PrivateHelpers) +- (BOOL)isHeaderComplete; +- (BOOL)appendData:(NSData *)data; +- (NSString *)headerFieldValueForKey:(NSString *)key; +- (UInt32)contentLength; +- (void)setBody:(NSData *)body; +@end + +@interface GTMHTTPResponseMessage (PrivateMethods) +- (id)initWithBody:(NSData *)body + contentType:(NSString *)contentType + statusCode:(int)statusCode; +- (NSData*)serializedData; +@end + +@implementation GTMHTTPServer + +- (id)init { + return [self initWithDelegate:nil]; +} + +- (id)initWithDelegate:(id)delegate { + self = [super init]; + if (self) { + if (!delegate) { + _GTMDevLog(@"missing delegate"); + [self release]; + return nil; + } + delegate_ = delegate; + +#ifndef NS_BLOCK_ASSERTIONS + BOOL isDelegateOK = [delegate_ respondsToSelector:@selector(httpServer:handleRequest:)]; + NSAssert(isDelegateOK, @"GTMHTTPServer delegate lacks handleRequest sel"); +#endif + + localhostOnly_ = YES; + connections_ = [[NSMutableArray alloc] init]; + } + return self; +} + +- (void)dealloc { + [self stop]; + [connections_ release]; + [super dealloc]; +} + +#if !TARGET_OS_IPHONE +- (void)finalize { + [self stop]; + [super finalize]; +} +#endif + +- (id)delegate { + return delegate_; +} + +- (uint16_t)port { + return port_; +} + +- (void)setPort:(uint16_t)port { + port_ = port; +} + +- (BOOL)reusePort { + return reusePort_; +} + +- (void)setReusePort:(BOOL)yesno { + reusePort_ = yesno; +} + +- (BOOL)localhostOnly { + return localhostOnly_; +} + +- (void)setLocalhostOnly:(BOOL)yesno { + localhostOnly_ = yesno; +} + +- (BOOL)start:(NSError **)error { + NSAssert(listenHandle_ == nil, + @"start called when we already have a listenHandle_"); + + if (error) *error = NULL; + + NSInteger startFailureCode = 0; + int fd = socket(AF_INET, SOCK_STREAM, 0); + if (fd <= 0) { + // COV_NF_START - we'd need to use up *all* sockets to test this? + startFailureCode = kGTMHTTPServerSocketCreateFailedError; + goto startFailed; + // COV_NF_END + } + + // enable address reuse quicker after we are done w/ our socket + int yes = 1; + int sock_opt = reusePort_ ? SO_REUSEPORT : SO_REUSEADDR; + if (setsockopt(fd, SOL_SOCKET, sock_opt, + (void *)&yes, (socklen_t)sizeof(yes)) != 0) { + _GTMDevLog(@"failed to mark the socket as reusable"); // COV_NF_LINE + } + + // bind + struct sockaddr_in addr; + bzero(&addr, sizeof(addr)); + addr.sin_len = sizeof(addr); + addr.sin_family = AF_INET; + addr.sin_port = htons(port_); + if (localhostOnly_) { + addr.sin_addr.s_addr = htonl(0x7F000001); + } else { + // COV_NF_START - testing this could cause a leopard firewall prompt during tests. + addr.sin_addr.s_addr = htonl(INADDR_ANY); + // COV_NF_END + } + if (bind(fd, (struct sockaddr*)(&addr), (socklen_t)sizeof(addr)) != 0) { + startFailureCode = kGTMHTTPServerBindFailedError; + goto startFailed; + } + + // collect the port back out + if (port_ == 0) { + socklen_t len = (socklen_t)sizeof(addr); + if (getsockname(fd, (struct sockaddr*)(&addr), &len) == 0) { + port_ = ntohs(addr.sin_port); + } + } + + // tell it to listen for connections + if (listen(fd, 5) != 0) { + // COV_NF_START + startFailureCode = kGTMHTTPServerListenFailedError; + goto startFailed; + // COV_NF_END + } + + // now use a filehandle to accept connections + listenHandle_ = + [[NSFileHandle alloc] initWithFileDescriptor:fd closeOnDealloc:YES]; + if (listenHandle_ == nil) { + // COV_NF_START - we'd need to run out of memory to test this? + startFailureCode = kGTMHTTPServerHandleCreateFailedError; + goto startFailed; + // COV_NF_END + } + + // setup notifications for connects + NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; + [center addObserver:self + selector:@selector(acceptedConnectionNotification:) + name:NSFileHandleConnectionAcceptedNotification + object:listenHandle_]; + [listenHandle_ acceptConnectionInBackgroundAndNotify]; + + // TODO: maybe hit the delegate incase it wants to register w/ NSNetService, + // or just know we're up and running? + + return YES; + +startFailed: + if (error) { + *error = [[[NSError alloc] initWithDomain:kGTMHTTPServerErrorDomain + code:startFailureCode + userInfo:nil] autorelease]; + } + if (fd > 0) { + close(fd); + } + return NO; +} + +- (void)stop { + if (listenHandle_) { + NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; + [center removeObserver:self + name:NSFileHandleConnectionAcceptedNotification + object:listenHandle_]; + [listenHandle_ release]; + listenHandle_ = nil; + // TODO: maybe hit the delegate in case it wants to unregister w/ + // NSNetService, or just know we've stopped running? + } + [connections_ removeAllObjects]; +} + +- (NSUInteger)activeRequestCount { + return [connections_ count]; +} + +- (NSString *)description { + NSString *result = + [NSString stringWithFormat:@"%@<%p>{ port=%d localHostOnly=%@ status=%@ }", + [self class], self, port_, (localhostOnly_ ? @"YES" : @"NO"), + (listenHandle_ != nil ? @"Started" : @"Stopped") ]; + return result; +} + + +@end + +@implementation GTMHTTPServer (PrivateMethods) + +- (void)acceptedConnectionNotification:(NSNotification *)notification { + NSDictionary *userInfo = [notification userInfo]; + NSFileHandle *newConnection = + [userInfo objectForKey:NSFileHandleNotificationFileHandleItem]; + NSAssert1(newConnection != nil, + @"failed to get the connection in the notification: %@", + notification); + + // make sure we accept more... + [listenHandle_ acceptConnectionInBackgroundAndNotify]; + + // TODO: could let the delegate look at the address, before we start working + // on it. + + NSMutableDictionary *connDict = + [self connectionWithFileHandle:newConnection]; + [connections_ addObject:connDict]; +} + +- (NSMutableDictionary *)connectionWithFileHandle:(NSFileHandle *)fileHandle { + NSMutableDictionary *result = [NSMutableDictionary dictionary]; + + [result setObject:fileHandle forKey:kFileHandle]; + + GTMHTTPRequestMessage *request = + [[[GTMHTTPRequestMessage alloc] init] autorelease]; + [result setObject:request forKey:kRequest]; + + // setup for data notifications + NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; + [center addObserver:self + selector:@selector(dataAvailableNotification:) + name:NSFileHandleReadCompletionNotification + object:fileHandle]; + [fileHandle readInBackgroundAndNotify]; + + return result; +} + +- (void)dataAvailableNotification:(NSNotification *)notification { + NSFileHandle *connectionHandle = GTM_STATIC_CAST(NSFileHandle, + [notification object]); + NSMutableDictionary *connDict = [self lookupConnection:connectionHandle]; + if (connDict == nil) return; // we are no longer tracking this one + + NSDictionary *userInfo = [notification userInfo]; + NSData *readData = [userInfo objectForKey:NSFileHandleNotificationDataItem]; + if ([readData length] == 0) { + // remote side closed + [self closeConnection:connDict]; + return; + } + + // Use a local pool to keep memory down incase the runloop we're in doesn't + // drain until it gets a UI event. + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + @try { + // Like Apple's sample, we just keep adding data until we get a full header + // and any referenced body. + + GTMHTTPRequestMessage *request = [connDict objectForKey:kRequest]; + [request appendData:readData]; + + // Is the header complete yet? + if (![request isHeaderComplete]) { + // more data... + [connectionHandle readInBackgroundAndNotify]; + } else { + + // Do we have all the body? + UInt32 contentLength = [request contentLength]; + NSData *body = [request body]; + NSUInteger bodyLength = [body length]; + if (contentLength > bodyLength) { + // need more data... + [connectionHandle readInBackgroundAndNotify]; + } else { + + if (contentLength < bodyLength) { + // We got extra (probably someone trying to pipeline on us), trim + // and let the extra data go... + NSData *newBody = [NSData dataWithBytes:[body bytes] + length:contentLength]; + [request setBody:newBody]; + _GTMDevLog(@"Got %lu extra bytes on http request, ignoring them", + (unsigned long)(bodyLength - contentLength)); + } + + GTMHTTPResponseMessage *response = nil; + @try { + // Off to the delegate + response = [delegate_ httpServer:self handleRequest:request]; + } @catch (NSException *e) { + _GTMDevLog(@"Exception trying to handle http request: %@", e); + } // COV_NF_LINE - radar 5851992 only reachable w/ an uncaught exception which isn't testable + + if (response) { + // We don't support connection reuse, so we add (force) the header to + // close every connection. + [response setValue:@"close" forHeaderField:@"Connection"]; + + // spawn thread to send reply (since we do a blocking send) + [connDict setObject:response forKey:kResponse]; + [NSThread detachNewThreadSelector:@selector(sendResponseOnNewThread:) + toTarget:self + withObject:connDict]; + } else { + // No response, shut it down + [self closeConnection:connDict]; + } + + } + } + } @catch (NSException *e) { // COV_NF_START + _GTMDevLog(@"exception while read data: %@", e); + // exception while dealing with the connection, close it + } // COV_NF_END + @finally { + [pool drain]; + } +} + +- (NSMutableDictionary *)lookupConnection:(NSFileHandle *)fileHandle { + NSMutableDictionary *result = nil; + for (NSMutableDictionary *connDict in connections_) { + if (fileHandle == [connDict objectForKey:kFileHandle]) { + result = connDict; + break; + } + } + return result; +} + +- (void)closeConnection:(NSMutableDictionary *)connDict { + // remove the notification + NSFileHandle *connectionHandle = [connDict objectForKey:kFileHandle]; + NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; + [center removeObserver:self + name:NSFileHandleReadCompletionNotification + object:connectionHandle]; + // in a non GC world, we're fine just letting the connect get closed when + // the object is release when it comes out of connections_, but in a GC world + // it won't get cleaned up + [connectionHandle closeFile]; + + // remove it from the list + [connections_ removeObject:connDict]; +} + +- (void)sendResponseOnNewThread:(NSMutableDictionary *)connDict { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + @try { + GTMHTTPResponseMessage *response = [connDict objectForKey:kResponse]; + NSFileHandle *connectionHandle = [connDict objectForKey:kFileHandle]; + NSData *serialized = [response serializedData]; + [connectionHandle writeData:serialized]; + } @catch (NSException *e) { // COV_NF_START - causing an exception here is to hard in a test + // TODO: let the delegate know about the exception (but do it on the main + // thread) + _GTMDevLog(@"exception while sending reply: %@", e); + } // COV_NF_END + + // back to the main thread to close things down + [self performSelectorOnMainThread:@selector(sentResponse:) + withObject:connDict + waitUntilDone:NO]; + + [pool release]; +} + +- (void)sentResponse:(NSMutableDictionary *)connDict { + // make sure we're still tracking this connection (in case server was stopped) + NSFileHandle *connection = [connDict objectForKey:kFileHandle]; + NSMutableDictionary *connDict2 = [self lookupConnection:connection]; + if (connDict != connDict2) return; + + // TODO: message the delegate that it was sent + + // close it down + [self closeConnection:connDict]; +} + +@end + +#pragma mark - + +@implementation GTMHTTPRequestMessage + +- (id)init { + self = [super init]; + if (self) { + message_ = CFHTTPMessageCreateEmpty(kCFAllocatorDefault, YES); + } + return self; +} + +- (void)dealloc { + if (message_) { + CFRelease(message_); + } + [super dealloc]; +} + +- (NSString *)version { + return GTMCFAutorelease(CFHTTPMessageCopyVersion(message_)); +} + +- (NSURL *)URL { + return GTMCFAutorelease(CFHTTPMessageCopyRequestURL(message_)); +} + +- (NSString *)method { + return GTMCFAutorelease(CFHTTPMessageCopyRequestMethod(message_)); +} + +- (NSData *)body { + return GTMCFAutorelease(CFHTTPMessageCopyBody(message_)); +} + +- (NSDictionary *)allHeaderFieldValues { + return GTMCFAutorelease(CFHTTPMessageCopyAllHeaderFields(message_)); +} + +- (NSString *)description { + CFStringRef desc = CFCopyDescription(message_); + NSString *result = + [NSString stringWithFormat:@"%@<%p>{ message=%@ }", [self class], self, desc]; + CFRelease(desc); + return result; +} + +@end + +@implementation GTMHTTPRequestMessage (PrivateHelpers) + +- (BOOL)isHeaderComplete { + return CFHTTPMessageIsHeaderComplete(message_) ? YES : NO; +} + +- (BOOL)appendData:(NSData *)data { + return CFHTTPMessageAppendBytes(message_, + [data bytes], (CFIndex)[data length]) ? YES : NO; +} + +- (NSString *)headerFieldValueForKey:(NSString *)key { + CFStringRef value = NULL; + if (key) { + value = CFHTTPMessageCopyHeaderFieldValue(message_, (CFStringRef)key); + } + return GTMCFAutorelease(value); +} + +- (UInt32)contentLength { + return (UInt32)[[self headerFieldValueForKey:@"Content-Length"] intValue]; +} + +- (void)setBody:(NSData *)body { + if (!body) { + body = [NSData data]; // COV_NF_LINE - can only happen in we fail to make the new data object + } + CFHTTPMessageSetBody(message_, (CFDataRef)body); +} + +@end + +#pragma mark - + +@implementation GTMHTTPResponseMessage + +- (id)init { + return [self initWithBody:nil contentType:nil statusCode:0]; +} + +- (void)dealloc { + if (message_) { + CFRelease(message_); + } + [super dealloc]; +} + ++ (id)responseWithString:(NSString *)plainText { + NSData *body = [plainText dataUsingEncoding:NSUTF8StringEncoding]; + return [self responseWithBody:body + contentType:@"text/plain; charset=UTF-8" + statusCode:200]; +} + ++ (id)responseWithHTMLString:(NSString *)htmlString { + return [self responseWithBody:[htmlString dataUsingEncoding:NSUTF8StringEncoding] + contentType:@"text/html; charset=UTF-8" + statusCode:200]; +} + ++ (id)responseWithBody:(NSData *)body + contentType:(NSString *)contentType + statusCode:(int)statusCode { + return [[[[self class] alloc] initWithBody:body + contentType:contentType + statusCode:statusCode] autorelease]; +} + ++ (id)emptyResponseWithCode:(int)statusCode { + return [[[[self class] alloc] initWithBody:nil + contentType:nil + statusCode:statusCode] autorelease]; +} + +- (void)setValue:(NSString*)value forHeaderField:(NSString*)headerField { + if ([headerField length] == 0) return; + if (value == nil) { + value = @""; + } + CFHTTPMessageSetHeaderFieldValue(message_, + (CFStringRef)headerField, (CFStringRef)value); +} + +- (void)setHeaderValuesFromDictionary:(NSDictionary *)dict { + for (id key in dict) { + id value = [dict valueForKey:key]; + [self setValue:value forHeaderField:key]; + } +} + +- (NSString *)description { + CFStringRef desc = CFCopyDescription(message_); + NSString *result = + [NSString stringWithFormat:@"%@<%p>{ message=%@ }", [self class], self, desc]; + CFRelease(desc); + return result; +} + +@end + +@implementation GTMHTTPResponseMessage (PrivateMethods) + +- (id)initWithBody:(NSData *)body + contentType:(NSString *)contentType + statusCode:(int)statusCode { + self = [super init]; + if (self) { + if ((statusCode < 100) || (statusCode > 599)) { + [self release]; + return nil; + } + message_ = CFHTTPMessageCreateResponse(kCFAllocatorDefault, + statusCode, NULL, + kCFHTTPVersion1_0); + if (!message_) { + // COV_NF_START + [self release]; + return nil; + // COV_NF_END + } + NSUInteger bodyLength = 0; + if (body) { + bodyLength = [body length]; + CFHTTPMessageSetBody(message_, (CFDataRef)body); + } + if ([contentType length] == 0) { + contentType = @"text/html"; + } + NSString *bodyLenStr = + [NSString stringWithFormat:@"%lu", (unsigned long)bodyLength]; + [self setValue:bodyLenStr forHeaderField:@"Content-Length"]; + [self setValue:contentType forHeaderField:@"Content-Type"]; + } + return self; +} + +- (NSData *)serializedData { + return GTMCFAutorelease(CFHTTPMessageCopySerializedMessage(message_)); +} + +@end diff --git a/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPUploadFetcherTest.m.svn-base b/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPUploadFetcherTest.m.svn-base new file mode 100644 index 0000000..0d4dfe7 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMHTTPUploadFetcherTest.m.svn-base @@ -0,0 +1,502 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMHTTPUploadFetcherTest.m +// + +#import + +#import "GTMHTTPUploadFetcher.h" +#import "GTMHTTPFetcherTestServer.h" + +@interface GTMHTTPUploadFetcherTest : SenTestCase { + GTMHTTPFetcherTestServer *testServer_; + BOOL isServerRunning_; + + GTMHTTPFetchHistory *fetchHistory_; + + GTMHTTPFetcher *fetcher_; + NSError *fetcherError_; + unsigned long long lastProgressDeliveredCount_; + unsigned long long lastProgressTotalCount_; +} +@end + + +@implementation GTMHTTPUploadFetcherTest + +static NSString *const kValidFileName = @"gettysburgaddress.txt"; + +- (NSURL *)localURLForFileName:(NSString *)name { + // return a localhost:port URL for the test file + NSString *str = [NSString stringWithFormat:@"http://localhost:%d/%@", + [testServer_ port], name]; + NSURL *url = [NSURL URLWithString:str]; + return url; +} + +- (NSString *)docPathForName:(NSString *)fileName { + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + STAssertNotNil(testBundle, nil); + + NSString *docPath = [testBundle pathForResource:fileName + ofType:nil]; + STAssertNotNil(docPath, nil); + return docPath; +} + +- (NSString *)docRootPath { + NSString *docRoot = [self docPathForName:kValidFileName]; + docRoot = [docRoot stringByDeletingLastPathComponent]; + return docRoot; +} + +- (void)setUp { + fetchHistory_ = [[GTMHTTPFetchHistory alloc] init]; + + NSString *docRoot = [self docRootPath]; + + testServer_ = [[GTMHTTPFetcherTestServer alloc] initWithDocRoot:docRoot]; + isServerRunning_ = (testServer_ != nil); + + STAssertTrue(isServerRunning_, + @">>> http test server failed to launch; skipping" + " fetcher tests\n"); +} + +- (void)tearDown { + [testServer_ release]; + testServer_ = nil; + + isServerRunning_ = NO; +} +/* +- (void)retryDelayStateChanged:(NSNotification *)note { + GDataHTTPFetcher *fetcher = [note object]; + GDataServiceTicketBase *ticket = [fetcher ticket]; + + STAssertNotNil(ticket, @"cannot get ticket from retry delay notification"); + + if ([[note name] isEqual:kGDataHTTPFetcherRetryDelayStartedNotification]) { + ++retryDelayStartedNotificationCount_; + } else { + ++retryDelayStoppedNotificationCount_; + } + + STAssertTrue(retryDelayStoppedNotificationCount_ <= retryDelayStartedNotificationCount_, + @"retry delay notification imbalance: starts=%d stops=%d", + retryDelayStartedNotificationCount_, + retryDelayStoppedNotificationCount_); +} +*/ +/* +- (void)resetFetchResponse { + +// [fetchedObject_ release]; +// fetchedObject_ = nil; + + [fetcherError_ release]; + fetcherError_ = nil; + + [ticket_ release]; + ticket_ = nil; + + retryCounter_ = 0; + + lastProgressDeliveredCount_ = 0; + lastProgressTotalCount_ = 0; + + // Set the UA to avoid log warnings during tests, except the first test, + // which will use an auto-generated user agent + if ([service_ userAgent] == nil) { + [service_ setUserAgent:@"GData-UnitTests-99.99"]; + } + + if (![service_ shouldCacheDatedData]) { + // we don't want to see 304s in our service response tests now, + // though the tests below will check for them in the underlying + // fetchers when we get a cached response + [service_ clearLastModifiedDates]; + } + + fetchStartedNotificationCount_ = 0; + fetchStoppedNotificationCount_ = 0; + parseStartedCount_ = 0; + parseStoppedCount_ = 0; + retryDelayStartedNotificationCount_ = 0; + retryDelayStoppedNotificationCount_ = 0; +} +*/ + +- (void)waitForFetch { + + int fetchCounter = gFetchCounter; + + // Give time for the fetch to happen, but give up if + // 10 seconds elapse with no response + NSDate* giveUpDate = [NSDate dateWithTimeIntervalSinceNow:10.0]; + + while ((!fetchedObject_ && !fetcherError_) + && [giveUpDate timeIntervalSinceNow] > 0) { + + NSDate *stopDate = [NSDate dateWithTimeIntervalSinceNow:0.001]; + [[NSRunLoop currentRunLoop] runUntilDate:stopDate]; + } + +} + + +#pragma mark Upload tests + +- (NSData *)generatedUploadDataWithLength:(NSUInteger)length { + // fill a data block with data + NSMutableData *data = [NSMutableData dataWithLength:length]; + + unsigned char *bytes = [data mutableBytes]; + for (NSUInteger idx = 0; idx < length; idx++) { + bytes[idx] = ((idx + 1) % 256); + } + + return data; +} + +static NSString* const kPauseAtKey = @"pauseAt"; +static NSString* const kRetryAtKey = @"retryAt"; +static NSString* const kOriginalURLKey = @"origURL"; + +- (void)testChunkedUpload { + + if (!isServerRunning_) return; + + NSData *bigData = [self generatedUploadDataWithLength:199000]; + //NSData *smallData = [self generatedUploadDataWithLength:13]; + + // write the big data into a temp file + NSString *tempDir = NSTemporaryDirectory(); + NSString *bigFileName = @"GDataServiceTest_BigFile"; + NSString *bigFilePath = [tempDir stringByAppendingPathComponent:bigFileName]; + [bigData writeToFile:bigFilePath atomically:NO]; + + NSFileHandle *bigFileHandle = [NSFileHandle fileHandleForReadingAtPath:bigFilePath]; + + // + // test a big upload using an NSFileHandle + // + + // with chunk size 75000, for a data block of 199000 bytes, we expect to send + // two 75000-byte chunks and then a 49000-byte final chunk + + + // a ".location" tells the server to return a "Location" header with the + // same path but an ".upload" suffix replacing the ".location" suffix + static NSString *const kValidFileLocation = @"gettysburgaddress.txt.location"; + + NSURL *docURL = [self localURLForFileName:kValidFileLocation]; + NSLog(@"docURL = %@", docURL); + STAssertNotNil(docURL, nil); + NSURLRequest *request = [NSURLRequest requestWithURL:docURL]; + NSLog(@"request = %@", request); + GTMHTTPUploadFetcher *fetcher = [GTMHTTPUploadFetcher uploadFetcherWithRequest:request + uploadFileHandle:bigFileHandle + uploadMIMEType:@"text/plain" + chunkSize:75000]; + NSLog(@"fetcher %@", fetcher); + BOOL isFetching = [fetcher beginFetchWithDelegate:self + didFinishSelector:@selector(uploadFetcher:finishedWithData:error:)]; + [self waitForFetch]; + + // set retry and progress + + // TODO... + /* + ticket_ = [service_ fetchEntryByInsertingEntry:newEntry + forFeedURL:uploadURL + delegate:self + didFinishSelector:@selector(ticket:finishedWithObject:error:)]; + [ticket_ retain]; + + [self waitForFetch]; + + STAssertNil(fetcherError_, @"fetcherError_=%@", fetcherError_); + + // check that we got back the expected entry + NSString *entryID = @"http://spreadsheets.google.com/feeds/cells/o04181601172097104111.497668944883620000/od6/private/full/R1C1"; + STAssertEqualObjects([(GDataEntrySpreadsheetCell *)fetchedObject_ identifier], + entryID, @"uploading %@", uploadURL); + + // check the request of the final object fetcher to be sure we were uploading + // chunks as expected + GDataHTTPUploadFetcher *uploadFetcher = (GDataHTTPUploadFetcher *) [ticket_ objectFetcher]; + GDataHTTPFetcher *fetcher = [uploadFetcher activeFetcher]; + NSURLRequest *request = [fetcher request]; + NSDictionary *reqHdrs = [request allHTTPHeaderFields]; + + NSString *uploadReqURLStr = @"http://localhost:54579/EntrySpreadsheetCellTest1.xml.upload"; + NSString *contentLength = [reqHdrs objectForKey:@"Content-Length"]; + NSString *contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertEqualObjects([[request URL] absoluteString], uploadReqURLStr, + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"49000", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 150000-198999/199000", @"range"); + + [self resetFetchResponse]; + + // + // repeat the previous upload, using NSData + // + [newEntry setUploadData:bigData]; + [newEntry setUploadFileHandle:nil]; + + ticket_ = [service_ fetchEntryByInsertingEntry:newEntry + forFeedURL:uploadURL + delegate:self + didFinishSelector:@selector(ticket:finishedWithObject:error:)]; + [ticket_ retain]; + + [self waitForFetch]; + + STAssertNil(fetcherError_, @"fetcherError_=%@", fetcherError_); + + // check that we got back the expected entry + entryID = @"http://spreadsheets.google.com/feeds/cells/o04181601172097104111.497668944883620000/od6/private/full/R1C1"; + STAssertEqualObjects([(GDataEntrySpreadsheetCell *)fetchedObject_ identifier], + entryID, @"uploading %@", uploadURL); + + // check the request of the final object fetcher to be sure we were uploading + // chunks as expected + uploadFetcher = (GDataHTTPUploadFetcher *) [ticket_ objectFetcher]; + fetcher = [uploadFetcher activeFetcher]; + request = [fetcher request]; + reqHdrs = [request allHTTPHeaderFields]; + + uploadReqURLStr = @"http://localhost:54579/EntrySpreadsheetCellTest1.xml.upload"; + contentLength = [reqHdrs objectForKey:@"Content-Length"]; + contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertEqualObjects([[request URL] absoluteString], uploadReqURLStr, + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"49000", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 150000-198999/199000", @"range"); + + [self resetFetchResponse]; + + // + // repeat the first upload, pausing after 20000 bytes + // + + ticket_ = [service_ fetchEntryByInsertingEntry:newEntry + forFeedURL:uploadURL + delegate:self + didFinishSelector:@selector(ticket:finishedWithObject:error:)]; + // add a property to the ticket that our progress callback will look for to + // know when to pause and resume the upload + [ticket_ setProperty:[NSNumber numberWithInt:20000] + forKey:kPauseAtKey]; + [ticket_ retain]; + [self waitForFetch]; + + STAssertEqualObjects([(GDataEntrySpreadsheetCell *)fetchedObject_ identifier], + entryID, @"uploading %@", uploadURL); + + uploadFetcher = (GDataHTTPUploadFetcher *) [ticket_ objectFetcher]; + fetcher = [uploadFetcher activeFetcher]; + request = [fetcher request]; + reqHdrs = [request allHTTPHeaderFields]; + + contentLength = [reqHdrs objectForKey:@"Content-Length"]; + contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertEqualObjects([[request URL] absoluteString], uploadReqURLStr, + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"24499", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 174501-198999/199000", @"range"); + + [self resetFetchResponse]; + + // + // repeat the first upload, and after sending 70000 bytes the progress + // callback will change the request URL for the next chunk fetch to make + // it fail with a retryable status error + // + + ticket_ = [service_ fetchEntryByInsertingEntry:newEntry + forFeedURL:uploadURL + delegate:self + didFinishSelector:@selector(ticket:finishedWithObject:error:)]; + // add a property to the ticket that our progress callback will use to + // force a retry after 70000 bytes are uploaded + [ticket_ setProperty:[NSNumber numberWithInt:70000] + forKey:kRetryAtKey]; + [ticket_ retain]; + [self waitForFetch]; + + STAssertEqualObjects([(GDataEntrySpreadsheetCell *)fetchedObject_ identifier], + entryID, @"uploading %@", uploadURL); + + uploadFetcher = (GDataHTTPUploadFetcher *) [ticket_ objectFetcher]; + fetcher = [uploadFetcher activeFetcher]; + request = [fetcher request]; + reqHdrs = [request allHTTPHeaderFields]; + + contentLength = [reqHdrs objectForKey:@"Content-Length"]; + contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertEqualObjects([[request URL] absoluteString], uploadReqURLStr, + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"24499", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 174501-198999/199000", @"range"); + + [self resetFetchResponse]; + + // + // repeat the first upload, but uploading data only, without the entry XML + // + + [newEntry setShouldUploadDataOnly:YES]; + [newEntry setUploadSlug:@"filename slug.txt"]; + + ticket_ = [service_ fetchEntryByInsertingEntry:newEntry + forFeedURL:uploadURL + delegate:self + didFinishSelector:@selector(ticket:finishedWithObject:error:)]; + [ticket_ retain]; + + [self waitForFetch]; + + STAssertEqualObjects([(GDataEntrySpreadsheetCell *)fetchedObject_ identifier], + entryID, @"uploading %@", uploadURL); + + uploadFetcher = (GDataHTTPUploadFetcher *) [ticket_ objectFetcher]; + fetcher = [uploadFetcher activeFetcher]; + request = [fetcher request]; + reqHdrs = [request allHTTPHeaderFields]; + + contentLength = [reqHdrs objectForKey:@"Content-Length"]; + contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertEqualObjects([[request URL] absoluteString], uploadReqURLStr, + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"49000", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 150000-198999/199000", @"range"); + + [self resetFetchResponse]; + + // + // upload a small data block + // + + [newEntry setUploadData:smallData]; + [newEntry setShouldUploadDataOnly:NO]; + + ticket_ = [service_ fetchEntryByInsertingEntry:newEntry + forFeedURL:uploadURL + delegate:self + didFinishSelector:@selector(ticket:finishedWithObject:error:)]; + [ticket_ retain]; + + [self waitForFetch]; + + STAssertNil(fetcherError_, @"fetcherError_=%@", fetcherError_); + + // check that we got back the expected entry + STAssertEqualObjects([(GDataEntrySpreadsheetCell *)fetchedObject_ identifier], + entryID, @"uploading %@", uploadURL); + + // check the request of the final (and only) object fetcher to be sure we + // were uploading chunks as expected + uploadFetcher = (GDataHTTPUploadFetcher *) [ticket_ objectFetcher]; + fetcher = [uploadFetcher activeFetcher]; + request = [fetcher request]; + reqHdrs = [request allHTTPHeaderFields]; + + contentLength = [reqHdrs objectForKey:@"Content-Length"]; + contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertEqualObjects([[request URL] absoluteString], uploadReqURLStr, + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"13", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 0-12/13", @"range"); + + [self resetFetchResponse]; + + [service_ setServiceUploadChunkSize:0]; + [service_ setServiceUploadProgressSelector:NULL]; + [service_ setServiceRetrySelector:NULL]; + + [[NSFileManager defaultManager] removeItemAtPath:bigFilePath error:NULL]; + */ +} +/* +- (void)uploadTicket:(GDataServiceTicket *)ticket +hasDeliveredByteCount:(unsigned long long)numberOfBytesRead + ofTotalByteCount:(unsigned long long)dataLength { + + lastProgressDeliveredCount_ = numberOfBytesRead; + lastProgressTotalCount_ = dataLength; + + NSNumber *pauseAtNum = [ticket propertyForKey:kPauseAtKey]; + if (pauseAtNum) { + int pauseAt = [pauseAtNum intValue]; + if (pauseAt < numberOfBytesRead) { + // we won't be paused again + [ticket setProperty:nil forKey:kPauseAtKey]; + + // we've reached the point where we should pause + // + // use perform selector to avoid pausing immediately, as that would nuke + // the chunk upload fetcher that is calling us back now + [ticket performSelector:@selector(pauseUpload) withObject:nil afterDelay:0.0]; + + [ticket performSelector:@selector(resumeUpload) withObject:nil afterDelay:1.0]; + } + } + + NSNumber *retryAtNum = [ticket propertyForKey:kRetryAtKey]; + if (retryAtNum) { + int retryAt = [retryAtNum intValue]; + if (retryAt < numberOfBytesRead) { + // we won't be retrying again + [ticket setProperty:nil forKey:kRetryAtKey]; + + // save the current locationURL before appending &status=503 + GDataHTTPUploadFetcher *uploadFetcher = (GDataHTTPUploadFetcher *) [ticket objectFetcher]; + NSURL *origURL = [uploadFetcher locationURL]; + [ticket setProperty:origURL forKey:kOriginalURLKey]; + + NSString *newURLStr = [[origURL absoluteString] stringByAppendingString:@"?status=503"]; + [uploadFetcher setLocationURL:[NSURL URLWithString:newURLStr]]; + } + } +} + +-(BOOL)uploadRetryTicket:(GDataServiceTicket *)ticket willRetry:(BOOL)suggestedWillRetry forError:(NSError *)error { + + // change this fetch's request (and future requests) to have the original URL, + // not the one with status=503 appended + NSURL *origURL = [ticket propertyForKey:kOriginalURLKey]; + GDataHTTPUploadFetcher *uploadFetcher = (GDataHTTPUploadFetcher *) [ticket objectFetcher]; + + [[[uploadFetcher activeFetcher] request] setURL:origURL]; + [uploadFetcher setLocationURL:origURL]; + + [ticket setProperty:nil forKey:kOriginalURLKey]; + + return suggestedWillRetry; // do the retry fetch; it should succeed now +} + */ +@end + diff --git a/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMMIMEDocumentTest.m.svn-base b/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMMIMEDocumentTest.m.svn-base new file mode 100644 index 0000000..1eb6ae2 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMMIMEDocumentTest.m.svn-base @@ -0,0 +1,240 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GTMMIMEDocument.h" + +// /Developer/Tools/otest LighthouseAPITest.octest + +@interface GTMMIMEDocumentTest : SenTestCase +@end + +@implementation GTMMIMEDocumentTest + +- (void)doReadTestForInputStream:(NSInputStream *)inputStream + expectedString:(NSString *)expectedResultString + testMethod:(SEL)callingMethod { + // this routine, called by the later test methods, + // reads the data from the input stream and verifies that it matches + // the expected string + + NSInteger expectedLength = [expectedResultString length]; + + // now read the document from the input stream + unsigned char buffer[9999]; + memset(buffer, 0, sizeof(buffer)); + + [inputStream open]; + NSInteger bytesRead = [inputStream read:buffer maxLength:sizeof(buffer)]; + [inputStream close]; + + NSString *readString = [NSString stringWithUTF8String:(const char * )buffer]; + + STAssertEqualObjects(readString, expectedResultString, @"bad read (%@)", + NSStringFromSelector(callingMethod)); + + STAssertEquals(bytesRead, expectedLength, @"bad read length (%@)", + NSStringFromSelector(callingMethod)); +} + + +- (void)testEmptyDoc { + + GTMMIMEDocument* doc = [GTMMIMEDocument MIMEDocument]; + + NSInputStream *stream = nil; + NSString *boundary = nil; + unsigned long long length = -1; + + // generate the boundary and the input stream + [doc generateInputStream:&stream + length:&length + boundary:&boundary]; + + STAssertEqualObjects(boundary, @"END_OF_PART", @"bad boundary"); + + NSString *expectedString = @"\r\n--END_OF_PART--\r\n"; + NSUInteger expectedLength = [expectedString length]; + + STAssertEquals((NSUInteger)length, expectedLength, + @"Reported document length should be expected length."); + + [self doReadTestForInputStream:stream + expectedString:expectedString + testMethod:_cmd]; +} + +- (void)testSinglePartDoc { + + GTMMIMEDocument* doc = [GTMMIMEDocument MIMEDocument]; + + NSMutableDictionary* h1 = [NSDictionary dictionaryWithObjectsAndKeys: + @"bar", @"hfoo", + @"baz", @"hfaz", + nil]; + NSData* b1 = [@"Hi mom" dataUsingEncoding:NSUTF8StringEncoding]; + [doc addPartWithHeaders:h1 body:b1]; + + // generate the boundary and the input stream + NSInputStream *stream = nil; + NSString *boundary = nil; + unsigned long long length = -1; + + [doc generateInputStream:&stream + length:&length + boundary:&boundary]; + + NSString* expectedResultString = [NSString stringWithFormat: + @"\r\n--%@\r\n" + "hfaz: baz\r\n" + "hfoo: bar\r\n" + "\r\n" // Newline after headers. + "Hi mom" + "\r\n--%@--\r\n", boundary, boundary]; + + STAssertEqualObjects(boundary, @"END_OF_PART", @"bad boundary"); + + NSUInteger expectedLength = [expectedResultString length]; + + STAssertEquals((NSUInteger)length, expectedLength, + @"Reported document length should be expected length."); + + // now read the document from the input stream + + [self doReadTestForInputStream:stream + expectedString:expectedResultString + testMethod:_cmd]; + +} + + +- (void)testMultiPartDoc { + GTMMIMEDocument* doc = [GTMMIMEDocument MIMEDocument]; + + NSMutableDictionary* h1 = [NSDictionary dictionaryWithObjectsAndKeys: + @"bar", @"hfoo", + @"baz", @"hfaz", + nil]; + NSData* b1 = [@"Hi mom" dataUsingEncoding:NSUTF8StringEncoding]; + + NSDictionary* h2 = [NSDictionary dictionary]; + NSData* b2 = [@"Hi dad" dataUsingEncoding:NSUTF8StringEncoding]; + + NSDictionary* h3 = [NSDictionary dictionaryWithObjectsAndKeys: + @"text/html", @"Content-Type", + @"angry", @"Content-Disposition", + nil]; + NSData* b3 = [@"Hi brother" dataUsingEncoding:NSUTF8StringEncoding]; + + [doc addPartWithHeaders:h1 body:b1]; + [doc addPartWithHeaders:h2 body:b2]; + [doc addPartWithHeaders:h3 body:b3]; + + // generate the boundary and the input stream + NSInputStream *stream = nil; + NSString *boundary = nil; + unsigned long long length = -1; + + [doc generateInputStream:&stream + length:&length + boundary:&boundary]; + + NSString* expectedResultString = [NSString stringWithFormat: + @"\r\n--%@\r\n" + "hfaz: baz\r\n" + "hfoo: bar\r\n" + "\r\n" // Newline after headers. + "Hi mom" + "\r\n--%@\r\n" + "\r\n" // No header here, but still need the newline. + "Hi dad" + "\r\n--%@\r\n" + "Content-Disposition: angry\r\n" + "Content-Type: text/html\r\n" + "\r\n" // Newline after headers. + "Hi brother" + "\r\n--%@--\r\n", + boundary, boundary, boundary, boundary]; + + // now read the document from the input stream + [self doReadTestForInputStream:stream + expectedString:expectedResultString + testMethod:_cmd]; +} + +- (void)testBoundaryConflict { + GTMMIMEDocument* doc = [GTMMIMEDocument MIMEDocument]; + + // we'll insert the text END_OF_PART_6b8b4567 which conflicts with + // both the normal boundary ("END_OF_PART") and the first alternate + // guess (given a random seed of 1, done below) + + NSMutableDictionary* h1 = [NSDictionary dictionaryWithObjectsAndKeys: + @"bar", @"hfoo", + @"baz", @"hfaz", + nil]; + NSData* b1 = [@"Hi mom END_OF_PART" dataUsingEncoding:NSUTF8StringEncoding]; + + NSDictionary* h2 = [NSDictionary dictionary]; + NSData* b2 = [@"Hi dad" dataUsingEncoding:NSUTF8StringEncoding]; + + NSDictionary* h3 = [NSDictionary dictionaryWithObjectsAndKeys: + @"text/html", @"Content-Type", + @"angry", @"Content-Disposition", + nil]; + NSData* b3 = [@"Hi brother END_OF_PART_6b8b4567" dataUsingEncoding:NSUTF8StringEncoding]; + + [doc addPartWithHeaders:h1 body:b1]; + [doc addPartWithHeaders:h2 body:b2]; + [doc addPartWithHeaders:h3 body:b3]; + + // generate the boundary and the input stream + NSInputStream *stream = nil; + NSString *boundary = nil; + unsigned long long length = -1; + + [doc seedRandomWith:1]; + [doc generateInputStream:&stream + length:&length + boundary:&boundary]; + + // the second alternate boundary, given the random seed + boundary = @"END_OF_PART_00000001"; + + NSString* expectedResultString = [NSString stringWithFormat: + @"\r\n--%@\r\n" + "hfaz: baz\r\n" + "hfoo: bar\r\n" + "\r\n" // Newline after headers. + "Hi mom END_OF_PART" // intentional conflict + "\r\n--%@\r\n" + "\r\n" // No header here, but still need the newline. + "Hi dad" + "\r\n--%@\r\n" + "Content-Disposition: angry\r\n" + "Content-Type: text/html\r\n" + "\r\n" // Newline after headers. + "Hi brother END_OF_PART_6b8b4567" // conflict with the first guess + "\r\n--%@--\r\n", + boundary, boundary, boundary, boundary]; + + // now read the document from the input stream + [self doReadTestForInputStream:stream + expectedString:expectedResultString + testMethod:_cmd]; +} + +@end diff --git a/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMReadMonitorInputStreamTest.m.svn-base b/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMReadMonitorInputStreamTest.m.svn-base new file mode 100644 index 0000000..82e7a33 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/.svn/text-base/GTMReadMonitorInputStreamTest.m.svn-base @@ -0,0 +1,93 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMReadMonitorInputStreamTest.m +// + +#import + +#import "GTMReadMonitorInputStream.h" + +@interface GTMReadMonitorInputStreamTest : SenTestCase { + NSMutableData *monitoredData_; +} +@end + +@implementation GTMReadMonitorInputStreamTest + +- (void)setUp { + monitoredData_ = [[NSMutableData alloc] init]; +} + +- (void)tearDown { + [monitoredData_ release]; + monitoredData_ = nil; +} + +- (void)testGTMReadMonitorInputStream { + + // Make some data with lotsa bytes + NSMutableData *testData = [NSMutableData data]; + for (int idx = 0; idx < 100; idx++) { + const char *str = "abcdefghijklmnopqrstuvwxyz "; + [testData appendBytes:str length:strlen(str)]; + } + + // Make a stream for the data + NSInputStream *dataStream = [NSInputStream inputStreamWithData:testData]; + + // Make a monitor stream, with self as the delegate + GTMReadMonitorInputStream *monitorStream; + monitorStream = [GTMReadMonitorInputStream inputStreamWithStream:dataStream]; + SEL sel = @selector(inputStream:readIntoBuffer:length:); + + monitorStream.readDelegate = self; + monitorStream.readSelector = sel; + + // Now read random size chunks of data and append them to a mutable NSData + NSMutableData *readData = [NSMutableData data]; + + [monitorStream open]; + while ([monitorStream hasBytesAvailable]) { + + unsigned char buffer[101]; + NSUInteger numBytesToRead = (arc4random() % 100) + 1; + + NSInteger numRead = [monitorStream read:buffer maxLength:numBytesToRead]; + if (numRead == 0) break; + + // Append the read chunk to our buffer + [readData appendBytes:buffer length:numRead]; + } + [monitorStream close]; + + // Verify we read all the data + STAssertEqualObjects(readData, testData, + @"read data doesn't match stream data"); + + // Verify the callback saw the same data + STAssertEqualObjects(monitoredData_, testData, + @"callback progress doesn't match actual progress"); +} + + +- (void)inputStream:(GTMReadMonitorInputStream *)stream + readIntoBuffer:(uint8_t *)buffer + length:(NSUInteger)length { + [monitoredData_ appendBytes:buffer + length:length]; +} +@end diff --git a/GTL/Source/HTTPFetcher/Tests/Data/.svn/all-wcprops b/GTL/Source/HTTPFetcher/Tests/Data/.svn/all-wcprops new file mode 100644 index 0000000..ae6b140 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/Data/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 39 +/svn/!svn/ver/7/trunk/Source/Tests/Data +END +gettysburgaddress.txt +K 25 +svn:wc:ra_dav:version-url +V 61 +/svn/!svn/ver/7/trunk/Source/Tests/Data/gettysburgaddress.txt +END diff --git a/GTL/Source/HTTPFetcher/Tests/Data/.svn/entries b/GTL/Source/HTTPFetcher/Tests/Data/.svn/entries new file mode 100644 index 0000000..bfe57ff --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/Data/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +111 +http://gtm-http-fetcher.googlecode.com/svn/trunk/Source/Tests/Data +http://gtm-http-fetcher.googlecode.com/svn + + + +2010-08-26T01:42:03.064224Z +7 +gregrobbins + + + + + + + + + + + + + + +b3aa69f0-f65c-a609-0a27-78855af037c1 + +gettysburgaddress.txt +file + + + + +2012-12-09T08:42:38.000000Z +5e00fad4c60d4c11536f6f2f1b793357 +2010-08-26T01:42:03.064224Z +7 +gregrobbins + + + + + + + + + + + + + + + + + + + + + +176 + diff --git a/GTL/Source/HTTPFetcher/Tests/Data/.svn/text-base/gettysburgaddress.txt.svn-base b/GTL/Source/HTTPFetcher/Tests/Data/.svn/text-base/gettysburgaddress.txt.svn-base new file mode 100644 index 0000000..ae2b0d5 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/Data/.svn/text-base/gettysburgaddress.txt.svn-base @@ -0,0 +1,3 @@ +Four score and seven years ago our fathers brought forth on this continent, a +new nation, conceived in liberty, and dedicated to the proposition that all men +are created equal. \ No newline at end of file diff --git a/GTL/Source/HTTPFetcher/Tests/Data/gettysburgaddress.txt b/GTL/Source/HTTPFetcher/Tests/Data/gettysburgaddress.txt new file mode 100644 index 0000000..ae2b0d5 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/Data/gettysburgaddress.txt @@ -0,0 +1,3 @@ +Four score and seven years ago our fathers brought forth on this continent, a +new nation, conceived in liberty, and dedicated to the proposition that all men +are created equal. \ No newline at end of file diff --git a/GTL/Source/HTTPFetcher/Tests/GTMGatherInputStreamTest.m b/GTL/Source/HTTPFetcher/Tests/GTMGatherInputStreamTest.m new file mode 100644 index 0000000..28d19a8 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/GTMGatherInputStreamTest.m @@ -0,0 +1,142 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GTMGatherInputStream.h" + +@interface GTMGatherInputStreamTest : SenTestCase +@end + +@implementation GTMGatherInputStreamTest + +- (void)doReadTestForInputStream:(NSInputStream *)inputStream + expectedString:(NSString *)expectedResultString + usingSmallReads:(BOOL)useSmallReads + testMethod:(SEL)callingMethod { + // this routine, called by the later test methods, + // reads the data from the input stream and verifies that it matches + // the expected string + NSString *testMethod = NSStringFromSelector(callingMethod); + + // now read the document from the input stream + unsigned char buffer[9999]; + memset(buffer, 0, sizeof(buffer)); + + [inputStream open]; + + NSInteger bytesRead = 0; + + if (!useSmallReads) { + // big read + bytesRead = [inputStream read:buffer maxLength:sizeof(buffer)]; + } else { + // small 1-byte reads + NSInteger bytesReadNow; + do { + bytesReadNow = [inputStream read:(buffer + bytesRead) maxLength:1]; + bytesRead += bytesReadNow; + } while (bytesReadNow > 0); + } + + [inputStream close]; + + NSString *readString = [NSString stringWithUTF8String:(const char * )buffer]; + + STAssertEqualObjects(readString, expectedResultString, @"bad read (%@)", + testMethod); + + NSInteger expectedLength = [expectedResultString length]; + STAssertEquals(bytesRead, expectedLength, @"bad read length (%@)", + testMethod); +} + + +// Make sure that an empty array of data buffers works ok. +- (void)testEmptyGatherStream { + NSArray* array = [NSArray array]; + NSInputStream* input = [GTMGatherInputStream streamWithArray:array]; + + [self doReadTestForInputStream:input + expectedString:@"" + usingSmallReads:NO + testMethod:_cmd]; +} + + +- (void)testGatherStreamWithEmptyParts { + char buf[] = "hello"; + NSString *expectedString = @"hello"; + + NSMutableArray* array = [NSMutableArray array]; + + [array addObject:[NSData dataWithBytes:"" length:0]]; + [array addObject:[NSData dataWithBytes:buf length:strlen(buf)]]; + [array addObject:[NSData dataWithBytes:"" length:0]]; + + NSInputStream* input = [GTMGatherInputStream streamWithArray:array]; + + [self doReadTestForInputStream:input + expectedString:expectedString + usingSmallReads:NO + testMethod:_cmd]; +} + +// We read all of the data in one big chunk. +- (void)testGatherStreamWithManyBuffers { + char b1[] = "h"; + char b2[] = "ello"; + char b3[] = ""; + char b4[] = " how are you?"; + NSString *expectedString = @"hello how are you?"; + + NSMutableArray* array = [NSMutableArray array]; + [array addObject:[NSData dataWithBytes:b1 length:strlen(b1)]]; + [array addObject:[NSData dataWithBytes:b2 length:strlen(b2)]]; + [array addObject:[NSData dataWithBytes:b3 length:strlen(b3)]]; + [array addObject:[NSData dataWithBytes:b4 length:strlen(b4)]]; + + NSInputStream* input = [GTMGatherInputStream streamWithArray:array]; + + [self doReadTestForInputStream:input + expectedString:expectedString + usingSmallReads:NO + testMethod:_cmd]; +} + + +// We read one byte at a time to make sure that many calls to read work properly. +- (void)testGatherStreamWithManyCalls { + char b1[] = "h"; + char b2[] = "ello"; + char b3[] = ""; + char b4[] = " how are you?"; + NSString *expectedString = @"hello how are you?"; + + NSMutableArray* array = [NSMutableArray array]; + [array addObject:[NSData dataWithBytes:b1 length:strlen(b1)]]; + [array addObject:[NSData dataWithBytes:b2 length:strlen(b2)]]; + [array addObject:[NSData dataWithBytes:b3 length:strlen(b3)]]; + [array addObject:[NSData dataWithBytes:b4 length:strlen(b4)]]; + + NSInputStream* input = [GTMGatherInputStream streamWithArray:array]; + + [self doReadTestForInputStream:input + expectedString:expectedString + usingSmallReads:YES + testMethod:_cmd]; +} + +@end diff --git a/GTL/Source/HTTPFetcher/Tests/GTMHTTPFetcherCachingTest.m b/GTL/Source/HTTPFetcher/Tests/GTMHTTPFetcherCachingTest.m new file mode 100644 index 0000000..e73acf7 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/GTMHTTPFetcherCachingTest.m @@ -0,0 +1,275 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMHTTPFetcherCachingTest.m +// + +#import + +#import "GTMHTTPFetcher.h" + +// copies of interfaces to private fetch history classes +@interface GTMCachedURLResponse : NSObject +- (id)initWithResponse:(NSURLResponse *)response data:(NSData *)data; +- (NSURLResponse *)response; +- (NSData *)data; +- (NSDate *)useDate; +- (void)setUseDate:(NSDate *)date; +- (NSDate *)reservationDate; +- (void)setReservationDate:(NSDate *)date; +@end + +@interface GTMURLCache : NSObject +- (id)initWithMemoryCapacity:(NSUInteger)totalBytes; +- (GTMCachedURLResponse *)cachedResponseForRequest:(NSURLRequest *)request; +- (void)storeCachedResponse:(GTMCachedURLResponse *)cachedResponse forRequest:(NSURLRequest *)request; +- (void)removeCachedResponseForRequest:(NSURLRequest *)request; +- (void)removeAllCachedResponses; +- (NSUInteger)memoryCapacity; +- (void)setMemoryCapacity:(NSUInteger)totalBytes; +- (NSDictionary *)responses; +- (NSUInteger)totalDataSize; +- (void)setReservationInterval:(NSTimeInterval)secs; +@end + +@interface GTMCookieStorage : NSObject +- (void)setCookies:(NSArray *)newCookies; +- (NSArray *)cookiesForURL:(NSURL *)theURL; +- (NSHTTPCookie *)cookieMatchingCookie:(NSHTTPCookie *)cookie; +- (void)removeExpiredCookies; +- (void)removeAllCookies; +@end + +@interface GTMHTTPFetcherCachingTest : SenTestCase +@end + +@implementation GTMHTTPFetcherCachingTest + +- (void)testURLCache { + // allocate a cache that prunes at 30 bytes of response data + NSUInteger cacheCapacity = 30; + GTMURLCache *cache = [[[GTMURLCache alloc] initWithMemoryCapacity:cacheCapacity] autorelease]; + + // set the reservation interval for our cache to something quick + const NSTimeInterval resInterval = 0.1; + [cache setReservationInterval:resInterval]; + + // allocate 6 responses with 10 bytes of data each; put a reservation on just + // the second of the 6 + NSMutableArray *requests = [NSMutableArray array]; + NSMutableArray *cachedResponses = [NSMutableArray array]; + + for (int idx = 0; idx < 6; idx++) { + NSString *urlStr = [NSString stringWithFormat:@"http://example.com/%d", idx]; + NSURL *url = [NSURL URLWithString:urlStr]; + NSURLRequest *request = [NSURLRequest requestWithURL:url]; + [requests addObject:request]; + + NSURLResponse *response; + response = [[[NSURLResponse alloc] initWithURL:url + MIMEType:@"text/xml" + expectedContentLength:-1 + textEncodingName:nil] autorelease]; + + GTMCachedURLResponse *cachedResponse; + NSData *data = [@"1234567890" dataUsingEncoding:NSUTF8StringEncoding]; + STAssertEquals([data length], (NSUInteger) 10, @"data should be 10 bytes"); + + cachedResponse = [[[GTMCachedURLResponse alloc] initWithResponse:response + data:data] autorelease]; + [cachedResponses addObject:cachedResponse]; + if (idx == 1) { + [cachedResponse setReservationDate:[NSDate date]]; + } + + [cache storeCachedResponse:cachedResponse + forRequest:request]; + } + + // step through retrieving all previous requests + // + // the cache should contain the second response (since it's reserved) and the + // last two responses + for (int idx = 0; idx < 6; idx++) { + NSURLRequest *request = [requests objectAtIndex:idx]; + GTMCachedURLResponse *cachedResponse, *expectedResponse; + + cachedResponse = [cache cachedResponseForRequest:request]; + if (idx == 1 || idx >= 4) { + expectedResponse = [cachedResponses objectAtIndex:idx]; + STAssertEqualObjects(cachedResponse, expectedResponse, @"wrong response"); + } else { + // these should be pruned out + STAssertNil(cachedResponse, @"unexpected response present"); + } + } + + // wait for the reservation to expire + [NSThread sleepForTimeInterval:(2 * resInterval)]; + + // re-store the first response, with its date set to now; the + // previously-reserved response should be oldest and thus pruned out + NSURLRequest *firstRequest = [requests objectAtIndex:0]; + GTMCachedURLResponse *firstResponse = [cachedResponses objectAtIndex:0]; + [firstResponse setUseDate:[NSDate date]]; + + [cache storeCachedResponse:firstResponse + forRequest:firstRequest]; + + // again, step through retrieving all previous requests + // + // now the cache should contain the first response and the last two responses + for (int idx = 0; idx < 6; idx++) { + NSURLRequest *request = [requests objectAtIndex:idx]; + GTMCachedURLResponse *cachedResponse, *expectedResponse; + + cachedResponse = [cache cachedResponseForRequest:request]; + if (idx == 0 || idx >= 4) { + expectedResponse = [cachedResponses objectAtIndex:idx]; + STAssertEqualObjects(cachedResponse, expectedResponse, @"wrong response"); + } else { + // these should be aged out + STAssertNil(cachedResponse, @"unexpected response present"); + } + } + + // create a response too big to fit in the cache, and verify that it wasn't + NSString *hugeUrlStr = [NSString stringWithFormat:@"http://example.com/huge"]; + NSURL *hugeURL = [NSURL URLWithString:hugeUrlStr]; + NSURLRequest *hugeRequest = [NSURLRequest requestWithURL:hugeURL]; + + NSURLResponse *response; + response = [[[NSURLResponse alloc] initWithURL:hugeURL + MIMEType:@"text/xml" + expectedContentLength:-1 + textEncodingName:nil] autorelease]; + + NSMutableData *hugeData = [NSMutableData data]; + [hugeData setLength:cacheCapacity]; + GTMCachedURLResponse *hugeResponse; + hugeResponse = [[[GTMCachedURLResponse alloc] initWithResponse:response + data:hugeData] autorelease]; + [cache storeCachedResponse:hugeResponse + forRequest:hugeRequest]; + + // verify that the response wasn't really stored in the cache + STAssertEquals([[cache responses] count], (NSUInteger)3, + @"huge not ignored"); + GTMCachedURLResponse *foundResponse; + foundResponse = [cache cachedResponseForRequest:hugeRequest]; + STAssertNil(foundResponse, @"huge was cached"); + + // make the huge response size just right for pushing everything else out of + // the cache + [hugeData setLength:(cacheCapacity - 1)]; + hugeResponse = [[[GTMCachedURLResponse alloc] initWithResponse:response + data:hugeData] autorelease]; + [cache storeCachedResponse:hugeResponse + forRequest:hugeRequest]; + + // verify that it crowded out the other responses + STAssertEquals([[cache responses] count], (NSUInteger)1, + @"huge didn't fill the cache"); + foundResponse = [cache cachedResponseForRequest:hugeRequest]; + STAssertNotNil(foundResponse, @"huge was not cached"); +} + +- (void)testCookieStorage { + GTMCookieStorage *cookieStorage = [[[GTMCookieStorage alloc] init] autorelease]; + NSArray *foundCookies; + + NSURL *fullURL = [NSURL URLWithString:@"http://photos.example.com"]; + NSURL *subdomainURL = [NSURL URLWithString:@"http://frogbreath.example.com"]; + + foundCookies = [cookieStorage cookiesForURL:fullURL]; + STAssertEquals([foundCookies count], (NSUInteger) 0, @"no cookies expected"); + + // make two unique cookies + NSDictionary *cookie1Props = [NSDictionary dictionaryWithObjectsAndKeys: + @"TRUE", NSHTTPCookieDiscard, + @"photos.example.com", NSHTTPCookieDomain, + @"Snark", NSHTTPCookieName, + @"/", NSHTTPCookiePath, + @"cook1=foo", NSHTTPCookieValue, nil]; + NSHTTPCookie *testCookie1 = [NSHTTPCookie cookieWithProperties:cookie1Props]; + + NSDictionary *cookie2Props = [NSDictionary dictionaryWithObjectsAndKeys: + @"FALSE", NSHTTPCookieDiscard, + @".example.com", NSHTTPCookieDomain, + @"Trump", NSHTTPCookieName, + @"/", NSHTTPCookiePath, + @"cook2=gnu", NSHTTPCookieValue, nil]; + NSHTTPCookie *testCookie2 = [NSHTTPCookie cookieWithProperties:cookie2Props]; + + // make a cookie that would replace cookie 2, and make this one expire + // + // expirations have to be in the future or the cookie won't get stored + NSTimeInterval kExpirationInterval = 0.1; + NSDate *expiredDate = [NSDate dateWithTimeIntervalSinceNow:kExpirationInterval]; + NSDictionary *cookie2aProps = [NSDictionary dictionaryWithObjectsAndKeys: + @"FALSE", NSHTTPCookieDiscard, + @".example.com", NSHTTPCookieDomain, + @"Trump", NSHTTPCookieName, + @"/", NSHTTPCookiePath, + expiredDate, NSHTTPCookieExpires, + @"cook2=snu", NSHTTPCookieValue, nil]; + NSHTTPCookie *testCookie2a = [NSHTTPCookie cookieWithProperties:cookie2aProps]; + + // store the first two cookies + NSArray *array = [NSArray arrayWithObjects: + testCookie1, testCookie2, nil]; + [cookieStorage setCookies:array]; + + foundCookies = [cookieStorage cookiesForURL:fullURL]; + STAssertEquals([foundCookies count], (NSUInteger) 2, + @"full domain cookie retrieval"); + + foundCookies = [cookieStorage cookiesForURL:subdomainURL]; + STAssertEquals((int)[foundCookies count], 1, @"subdomain cookie retrieval"); + + // store cookie 2a, replacing cookie 2 + array = [NSArray arrayWithObject:testCookie2a]; + [cookieStorage setCookies:array]; + + foundCookies = [cookieStorage cookiesForURL:subdomainURL]; + STAssertEquals((int)[foundCookies count], 1, @"subdomain 2a retrieval"); + + NSHTTPCookie *foundCookie = [foundCookies lastObject]; + STAssertEqualObjects([foundCookie value], [testCookie2a value], + @"cookie replacement"); + + // wait for cookie 2a to expire, then remove expired cookies + // + // 30-May-2012: Apparently, on Mac OS X 10.7.4, the expiration is no + // longer stored, even for version 0 cookies. + // + // [NSThread sleepForTimeInterval:(2 * kExpirationInterval)]; + // [cookieStorage removeExpiredCookies]; + // + // foundCookies = [cookieStorage cookiesForURL:subdomainURL]; + // STAssertEquals((int)[foundCookies count], 0, @"pruned removal"); + // + // foundCookies = [cookieStorage cookiesForURL:fullURL]; + // STAssertEquals((int)[foundCookies count], 1, @"pruned removal remaining"); + STAssertNil([testCookie2a expiresDate], nil); + + // remove all cookies + [cookieStorage removeAllCookies]; + foundCookies = [cookieStorage cookiesForURL:fullURL]; + STAssertEquals((int)[foundCookies count], 0, @"remove all"); +} + +@end diff --git a/GTL/Source/HTTPFetcher/Tests/GTMHTTPFetcherFetchingTest.m b/GTL/Source/HTTPFetcher/Tests/GTMHTTPFetcherFetchingTest.m new file mode 100755 index 0000000..41ea682 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/GTMHTTPFetcherFetchingTest.m @@ -0,0 +1,1266 @@ +/* Copyright (c) 2009 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GTMHTTPFetcherTestServer.h" +#import "GTMHTTPFetcher.h" +#import "GTMHTTPFetchHistory.h" +#import "GTMHTTPFetcherLogging.h" +#import "GTMHTTPUploadFetcher.h" + +@interface GTMHTTPFetcherFetchingTest : SenTestCase { + + // these ivars are checked after fetches, and are reset by resetFetchResponse + NSData *fetchedData_; + NSError *fetcherError_; + int fetchedStatus_; + NSURLResponse *fetchedResponse_; + NSMutableURLRequest *fetchedRequest_; + int retryCounter_; + + int fetchStartedNotificationCount_; + int fetchStoppedNotificationCount_; + int retryDelayStartedNotificationCount_; + int retryDelayStoppedNotificationCount_; + + // setup/teardown ivars + GTMHTTPFetchHistory *fetchHistory_; + GTMHTTPFetcherTestServer *testServer_; + BOOL isServerRunning_; +} + +- (void)testFetcher:(GTMHTTPFetcher *)fetcher + finishedWithData:(NSData *)data + error:(NSError *)error; + +- (GTMHTTPFetcher *)doFetchWithURLString:(NSString *)urlString + cachingDatedData:(BOOL)doCaching; + +- (GTMHTTPFetcher *)doFetchWithURLString:(NSString *)urlString + cachingDatedData:(BOOL)doCaching + retrySelector:(SEL)retrySel + maxRetryInterval:(NSTimeInterval)maxRetryInterval + credential:(NSURLCredential *)credential + userData:(id)userData; + +- (NSString *)localURLStringToTestFileName:(NSString *)name; +- (NSString *)localPathForFileName:(NSString *)name; +@end + +// Authorization testing +@interface TestAuthorizer : NSObject { + BOOL hasExpired_; +} +@property (assign) BOOL expired; + ++ (TestAuthorizer *)authorizer; ++ (TestAuthorizer *)expiredAuthorizer; +@end + +static NSString *const kGoodBearerValue = @"Bearer good"; +static NSString *const kExpiredBearerValue = @"Bearer expired"; + +@implementation GTMHTTPFetcherFetchingTest + +static const NSTimeInterval kRunLoopInterval = 0.01; + +// The wrong-fetch test can take >10s to pass. +static const NSTimeInterval kGiveUpInterval = 30.0; + +// file available in Tests folder +static NSString *const kValidFileName = @"gettysburgaddress.txt"; + +- (NSString *)docRootPath { + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + STAssertNotNil(testBundle, nil); + + NSString *docFolder = [testBundle resourcePath]; + return docFolder; +} + +- (void)setUp { + fetchHistory_ = [[GTMHTTPFetchHistory alloc] init]; + + NSString *docRoot = [self docRootPath]; + + testServer_ = [[GTMHTTPFetcherTestServer alloc] initWithDocRoot:docRoot]; + isServerRunning_ = (testServer_ != nil); + + STAssertTrue(isServerRunning_, + @">>> http test server failed to launch; skipping" + " fetcher tests\n"); + + // install observers for fetcher notifications + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc addObserver:self selector:@selector(fetchStateChanged:) name:kGTMHTTPFetcherStartedNotification object:nil]; + [nc addObserver:self selector:@selector(fetchStateChanged:) name:kGTMHTTPFetcherStoppedNotification object:nil]; + [nc addObserver:self selector:@selector(retryDelayStateChanged:) name:kGTMHTTPFetcherRetryDelayStartedNotification object:nil]; + [nc addObserver:self selector:@selector(retryDelayStateChanged:) name:kGTMHTTPFetcherRetryDelayStoppedNotification object:nil]; +} + +- (void)resetFetchResponse { + [fetchedData_ release]; + fetchedData_ = nil; + + [fetcherError_ release]; + fetcherError_ = nil; + + [fetchedRequest_ release]; + fetchedRequest_ = nil; + + [fetchedResponse_ release]; + fetchedResponse_ = nil; + + fetchedStatus_ = 0; + + retryCounter_ = 0; +} + +- (void)tearDown { + [testServer_ release]; + testServer_ = nil; + + isServerRunning_ = NO; + + [self resetFetchResponse]; + + [fetchHistory_ release]; + fetchHistory_ = nil; +} + +- (NSData *)gettysburgAddress { + NSString *gettysburgPath = [testServer_ localPathForFile:kValidFileName]; + NSData *gettysburgAddress = [NSData dataWithContentsOfFile:gettysburgPath]; + return gettysburgAddress; +} + +#pragma mark Notification callbacks + +- (void)fetchStateChanged:(NSNotification *)note { + if ([[note name] isEqual:kGTMHTTPFetcherStartedNotification]) { + ++fetchStartedNotificationCount_; + } else { + ++fetchStoppedNotificationCount_; + } + + STAssertTrue(fetchStartedNotificationCount_ <= fetchStartedNotificationCount_, + @"fetch notification imbalance: starts=%d stops=%d", + fetchStartedNotificationCount_, + fetchStoppedNotificationCount_); +} + +- (void)retryDelayStateChanged:(NSNotification *)note { + if ([[note name] isEqual:kGTMHTTPFetcherRetryDelayStartedNotification]) { + ++retryDelayStartedNotificationCount_; + } else { + ++retryDelayStoppedNotificationCount_; + } + + STAssertTrue(retryDelayStoppedNotificationCount_ <= retryDelayStartedNotificationCount_, + @"retry delay notification imbalance: starts=%d stops=%d", + retryDelayStartedNotificationCount_, + retryDelayStoppedNotificationCount_); +} + +- (void)resetNotificationCounts { + fetchStartedNotificationCount_ = 0; + fetchStoppedNotificationCount_ = 0; + retryDelayStartedNotificationCount_ = 0; + retryDelayStoppedNotificationCount_ = 0; +} + +#pragma mark Tests + +- (void)testFetch { + if (!isServerRunning_) return; + + [self resetNotificationCounts]; + [self resetFetchResponse]; + + NSString *urlString = [self localURLStringToTestFileName:kValidFileName]; + [self doFetchWithURLString:urlString cachingDatedData:YES]; + + STAssertNotNil(fetchedData_, + @"failed to fetch data, status:%d error:%@, URL:%@", + fetchedStatus_, fetcherError_, urlString); + + // we'll verify we fetched from the server the actual data on disk + NSData *gettysburgAddress = [self gettysburgAddress]; + STAssertEqualObjects(fetchedData_, gettysburgAddress, + @"Lincoln disappointed"); + + STAssertNotNil(fetchedResponse_, + @"failed to get fetch response, status:%d error:%@", + fetchedStatus_, fetcherError_); + STAssertNotNil(fetchedRequest_, + @"failed to get fetch request, URL %@", urlString); + STAssertNil(fetcherError_, @"fetching data gave error: %@", fetcherError_); + STAssertEquals(fetchedStatus_, 200, + @"unexpected status for URL %@", urlString); + + // no cookies should be sent with our first request + NSDictionary *headers = [fetchedRequest_ allHTTPHeaderFields]; + NSString *cookiesSent = [headers objectForKey:@"Cookie"]; + STAssertNil(cookiesSent, @"Cookies sent unexpectedly: %@", cookiesSent); + + // cookies should have been set by the response; specifically, TestCookie + // should be set to the name of the file requested + NSDictionary *responseHeaders; + + responseHeaders = [(NSHTTPURLResponse *)fetchedResponse_ allHeaderFields]; + NSString *cookiesSetString = [responseHeaders objectForKey:@"Set-Cookie"]; + NSString *cookieExpected = [NSString stringWithFormat:@"TestCookie=%@", + kValidFileName]; + STAssertEqualObjects(cookiesSetString, cookieExpected, @"Unexpected cookie"); + + // make a copy of the fetched data to compare with our next fetch from the + // cache + NSData *originalFetchedData = [[fetchedData_ copy] autorelease]; + + + // Now fetch again so the "If-None-Match" header will be set (because + // we're calling setFetchHistory: below) and caching ON, and verify that we + // got a good data from the cache and a nil error, along with a + // "Not Modified" status in the fetcher + + [self resetFetchResponse]; + + [self doFetchWithURLString:urlString cachingDatedData:YES]; + + STAssertEqualObjects(fetchedData_, originalFetchedData, + @"cache data mismatch"); + + STAssertNotNil(fetchedData_, + @"failed to fetch data, status:%d error:%@, URL:%@", + fetchedStatus_, fetcherError_, urlString); + STAssertNotNil(fetchedResponse_, + @"failed to get fetch response, status:%d error:%@", + fetchedStatus_, fetcherError_); + STAssertNotNil(fetchedRequest_, + @"failed to get fetch request, URL %@", + urlString); + STAssertNil(fetcherError_, @"fetching data gave error: %@", fetcherError_); + + STAssertEquals(fetchedStatus_, kGTMHTTPFetcherStatusNotModified, // 304 + @"fetch status unexpected for URL %@", urlString); + + // the TestCookie set previously should be sent with this request + cookiesSent = [[fetchedRequest_ allHTTPHeaderFields] objectForKey:@"Cookie"]; + STAssertEqualObjects(cookiesSent, cookieExpected, @"Cookie not sent"); + + + // Now fetch twice without caching enabled, and verify that we got a + // "Precondition failed" status, along with a non-nil but empty NSData (which + // is normal for that status code) from the second fetch + + [self resetFetchResponse]; + + [fetchHistory_ clearHistory]; + + [self doFetchWithURLString:urlString cachingDatedData:NO]; + + STAssertEqualObjects(fetchedData_, originalFetchedData, + @"cache data mismatch"); + STAssertNil(fetcherError_, @"unexpected error: %@", fetcherError_); + + [self resetFetchResponse]; + [self doFetchWithURLString:urlString cachingDatedData:NO]; + + STAssertNotNil(fetchedData_, @""); + STAssertEquals([fetchedData_ length], (NSUInteger) 0, @"unexpected data"); + STAssertEquals(fetchedStatus_, kGTMHTTPFetcherStatusNotModified, + @"fetching data expected status 304, instead got %d", fetchedStatus_); + STAssertNotNil(fetcherError_, @"missing 304 error"); + + // check the notifications + STAssertEquals(fetchStartedNotificationCount_, 4, @"fetches started"); + STAssertEquals(fetchStoppedNotificationCount_, 4, @"fetches stopped"); + STAssertEquals(retryDelayStartedNotificationCount_, 0, @"retries started"); + STAssertEquals(retryDelayStoppedNotificationCount_, 0, @"retries started"); +} + +- (void)testAuthorizorFetch { + if (!isServerRunning_) return; + [self resetNotificationCounts]; + + // + // fetch a live, authorized URL + // + NSString *authName = [kValidFileName stringByAppendingFormat:@"?oauth2=good"]; + NSString *authedURL = [self localURLStringToTestFileName:authName]; + + NSURLRequest *req = [NSURLRequest requestWithURL:[NSURL URLWithString:authedURL] + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:kGiveUpInterval]; + + __block BOOL hasFinishedFetching = NO; + __block GTMHTTPFetcher *fetcher = [GTMHTTPFetcher fetcherWithRequest:req]; + STAssertNotNil(fetcher, @"Failed to allocate fetcher"); + + fetcher.authorizer = [TestAuthorizer authorizer]; + + void (^completionBlock)(NSData *, NSError *) = ^(NSData *data, NSError *error) { + STAssertEqualObjects(data, [self gettysburgAddress], @"wrong data"); + STAssertNil(error, @"unexpected status error"); + hasFinishedFetching = YES; + }; + + [fetcher beginFetchWithCompletionHandler:completionBlock]; + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + STAssertTrue(hasFinishedFetching, @"auth 1 fetch failed"); + + // + // fetch with an expired authorizer, no retry allowed + // + authName = [kValidFileName stringByAppendingFormat:@"?oauth2=good"]; + authedURL = [self localURLStringToTestFileName:authName]; + + req = [NSURLRequest requestWithURL:[NSURL URLWithString:authedURL] + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:kGiveUpInterval]; + + hasFinishedFetching = NO; + fetcher = [GTMHTTPFetcher fetcherWithRequest:req]; + fetcher.retryBlock = ^(BOOL suggestedWillRetry, NSError *error) { + return NO; + }; + STAssertNotNil(fetcher, @"Failed to allocate fetcher"); + + fetcher.authorizer = [TestAuthorizer expiredAuthorizer]; + + completionBlock = ^(NSData *data, NSError *error) { + STAssertEquals([error code], (NSInteger) 401, + @"unexpected status, error=%@", error); + hasFinishedFetching = YES; + }; + + [fetcher beginFetchWithCompletionHandler:completionBlock]; + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + STAssertTrue(hasFinishedFetching, @"auth 2 fetch failed"); + + // + // fetch with an expired authorizer, with automatic refresh + // + authName = [kValidFileName stringByAppendingFormat:@"?oauth2=good"]; + authedURL = [self localURLStringToTestFileName:authName]; + + req = [NSURLRequest requestWithURL:[NSURL URLWithString:authedURL] + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:kGiveUpInterval]; + + hasFinishedFetching = NO; + fetcher = [GTMHTTPFetcher fetcherWithRequest:req]; + STAssertNotNil(fetcher, @"Failed to allocate fetcher"); + + fetcher.authorizer = [TestAuthorizer expiredAuthorizer]; + + completionBlock = ^(NSData *data, NSError *error) { + STAssertEqualObjects(data, [self gettysburgAddress], @"wrong data"); + STAssertNil(error, @"unexpected error"); + hasFinishedFetching = YES; + }; + + [fetcher beginFetchWithCompletionHandler:completionBlock]; + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + STAssertTrue(hasFinishedFetching, @"auth 3 fetch failed"); +} + +- (void)testWrongFetch { + + if (!isServerRunning_) return; + [self resetNotificationCounts]; + + // fetch a live, invalid URL + NSString *badURLString = @"http://localhost:86/"; + [self doFetchWithURLString:badURLString cachingDatedData:NO]; + + if (fetchedData_) { + NSString *str = [[[NSString alloc] initWithData:fetchedData_ + encoding:NSUTF8StringEncoding] autorelease]; + STAssertNil(fetchedData_, @"fetched unexpected data: %@", str); + } + + STAssertNotNil(fetcherError_, @"failed to receive fetching error"); + STAssertEquals(fetchedStatus_, 0, + @"unexpected status from no response"); + + // fetch with a specific status code from our http server + [self resetFetchResponse]; + + NSString *invalidWebPageFile = [kValidFileName stringByAppendingString:@"?status=400"]; + NSString *statusUrlString = [self localURLStringToTestFileName:invalidWebPageFile]; + + [self doFetchWithURLString:statusUrlString cachingDatedData:NO]; + + STAssertNotNil(fetchedData_, @"fetch lacked data with error info"); + STAssertNotNil(fetcherError_, @"expected status error"); + NSData *statusData = [[fetcherError_ userInfo] objectForKey:kGTMHTTPFetcherStatusDataKey]; + NSString *dataStr = [[[NSString alloc] initWithData:statusData + encoding:NSUTF8StringEncoding] autorelease]; + NSString *expectedStr = @"{ \"error\" : { \"message\" : \"Server Status 400\", \"code\" : 400 } }"; + STAssertEqualObjects(dataStr, expectedStr, @"expected status data"); + + STAssertEquals(fetchedStatus_, 400, + @"unexpected status, error=%@", fetcherError_); + + // check the notifications + STAssertEquals(fetchStartedNotificationCount_, 2, @"fetches started"); + STAssertEquals(fetchStoppedNotificationCount_, 2, @"fetches stopped"); + STAssertEquals(retryDelayStartedNotificationCount_, 0, @"retries started"); + STAssertEquals(retryDelayStoppedNotificationCount_, 0, @"retries started"); +} + +- (void)testFetchToFile { + if (!isServerRunning_) return; + + // create an empty file from which we can make an NSFileHandle + NSString *path = [NSTemporaryDirectory() stringByAppendingFormat:@"fhTest_%@", + [NSDate date]]; + [[NSData data] writeToFile:path atomically:YES]; + + NSFileHandle *fileHandle = [NSFileHandle fileHandleForWritingAtPath:path]; + STAssertNotNil(fileHandle, @"missing filehandle for %@", path); + + // make the http request to our test server + __block NSString *testName = @"Download to file handle"; + + NSString *urlString = [self localURLStringToTestFileName:kValidFileName]; + NSURLRequest *req = [NSURLRequest requestWithURL:[NSURL URLWithString:urlString] + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:kGiveUpInterval]; + + // we'll put fetcher in a __block variable so we can refer to the + // latest instance of it in the callbacks + __block GTMHTTPFetcher *fetcher = [GTMHTTPFetcher fetcherWithRequest:req]; + STAssertNotNil(fetcher, @"Failed to allocate fetcher"); + + // received-data block + // + // the final received-data block invocation should show the length of the + // file actually downloaded + __block NSUInteger receivedDataLen = 0; + + void (^receivedBlock)(NSData *) = ^(NSData *dataReceivedSoFar){ + // a nil data argument is expected when the downloaded data is written + // to a file handle + STAssertNil(dataReceivedSoFar, @"%@: unexpected dataReceivedSoFar", + testName); + + receivedDataLen = [fetcher downloadedLength]; + }; + + + // fetch & completion block + __block BOOL hasFinishedFetching = NO; + + void (^completionBlock)(NSData *, NSError *) = ^(NSData *data, NSError *error) { + STAssertNil(data, @"%@: unexpected data", testName); + STAssertNil(error, @"%@: unexpected error: %@", testName, error); + + NSString *fetchedContents = [NSString stringWithContentsOfFile:path + encoding:NSUTF8StringEncoding + error:NULL]; + STAssertEquals(receivedDataLen, [fetchedContents length], + @"%@: length issue", testName); + + NSString *origPath = [self localPathForFileName:kValidFileName]; + NSString *origContents = [NSString stringWithContentsOfFile:origPath + encoding:NSUTF8StringEncoding + error:NULL]; + STAssertEqualObjects(fetchedContents, origContents, + @"%@: fetch to FH error", testName); + + hasFinishedFetching = YES; + }; + + [fetcher setDownloadFileHandle:fileHandle]; + [fetcher setReceivedDataBlock:receivedBlock]; + [fetcher beginFetchWithCompletionHandler:completionBlock]; + + // spin until the fetch completes + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + STAssertTrue(hasFinishedFetching, @"file handle fetch timed out"); + + [[NSFileManager defaultManager] removeItemAtPath:path + error:NULL]; + + // + // repeat the test with a new fetcher, writing directly to the path + // instead of explicitly creating a file handle + // + hasFinishedFetching = NO; + + testName = @"Download to file path"; + fetcher = [GTMHTTPFetcher fetcherWithRequest:req]; + [fetcher setDownloadPath:path]; + [fetcher setReceivedDataBlock:receivedBlock]; + [fetcher beginFetchWithCompletionHandler:completionBlock]; + + // grab a copy of the temporary file path + NSString *tempPath = [[[fetcher performSelector:@selector(temporaryDownloadPath)] copy] autorelease]; + + // spin until the fetch completes + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + STAssertTrue(hasFinishedFetching, @"path fetch timed out"); + + // verify that the temp file has been deleted + BOOL doesExist = [[NSFileManager defaultManager] fileExistsAtPath:tempPath]; + STAssertFalse(doesExist, @"%@: temp file should not exist", testName); + + [[NSFileManager defaultManager] removeItemAtPath:path + error:NULL]; + + // + // repeat the test with a new fetcher, writing directly to a path, + // but with a fetch that will fail + // + hasFinishedFetching = NO; + + testName = @"Invalid download to file path"; + NSString *invalidFile = [kValidFileName stringByAppendingString:@"?status=400"]; + urlString = [self localURLStringToTestFileName:invalidFile]; + req = [NSURLRequest requestWithURL:[NSURL URLWithString:urlString] + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:kGiveUpInterval]; + fetcher = [GTMHTTPFetcher fetcherWithRequest:req]; + [fetcher setDownloadPath:path]; + [fetcher setReceivedDataBlock:receivedBlock]; + + [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { + STAssertNil(data, @"%@: unexpected data", testName); + STAssertEquals([error code], (NSInteger) 400, + @"%@: unexpected error: %@", testName, error); + hasFinishedFetching = YES; + }]; + + // grab a copy of the temporary file path + tempPath = [[[fetcher performSelector:@selector(temporaryDownloadPath)] copy] autorelease]; + + // spin until the fetch completes + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + STAssertTrue(hasFinishedFetching, @"path fetch timed out"); + + // the file at the temporary path should be gone, and none should be at + // the final path + // + // we test it here rather than in the callback since it's not deleted + // until the fetcher does its stopFetching cleanup + doesExist = [[NSFileManager defaultManager] fileExistsAtPath:tempPath]; + STAssertFalse(doesExist, @"%@: temp file should not exist", testName); + + doesExist = [[NSFileManager defaultManager] fileExistsAtPath:path]; + STAssertFalse(doesExist, @"%@: file should not exist", testName); +} + +- (void)testRetryFetches { + + if (!isServerRunning_) return; + [self resetNotificationCounts]; + + GTMHTTPFetcher *fetcher; + + NSString *invalidFile = [kValidFileName stringByAppendingString:@"?status=503"]; + NSString *urlString = [self localURLStringToTestFileName:invalidFile]; + + SEL countRetriesSel = @selector(countRetriesfetcher:willRetry:forError:); + SEL fixRequestSel = @selector(fixRequestFetcher:willRetry:forError:); + + // + // test: retry until timeout, then expect failure with status message + // + + NSNumber *lotsOfRetriesNumber = [NSNumber numberWithInt:1000]; + + fetcher= [self doFetchWithURLString:urlString + cachingDatedData:NO + retrySelector:countRetriesSel + maxRetryInterval:5.0 // retry intervals of 1, 2, 4 + credential:nil + userData:lotsOfRetriesNumber]; + + STAssertNotNil(fetchedData_, @"error data is expected"); + STAssertEquals(fetchedStatus_, 503, + @"fetchedStatus_ should be 503, was %@", fetchedStatus_); + STAssertEquals([fetcher retryCount], (NSUInteger) 3, @"retry count unexpected"); + + // + // test: retry twice, then give up + // + [self resetFetchResponse]; + + NSNumber *twoRetriesNumber = [NSNumber numberWithInt:2]; + + fetcher= [self doFetchWithURLString:urlString + cachingDatedData:NO + retrySelector:countRetriesSel + maxRetryInterval:10.0 // retry intervals of 1, 2, 4, 8 + credential:nil + userData:twoRetriesNumber]; + + STAssertNotNil(fetchedData_, @"error data is expected"); + STAssertEquals(fetchedStatus_, 503, + @"fetchedStatus_ should be 503, was %@", fetchedStatus_); + STAssertEquals([fetcher retryCount], (NSUInteger) 2, @"retry count unexpected"); + + + // + // test: retry, making the request succeed on the first retry + // by fixing the URL + // + [self resetFetchResponse]; + + fetcher= [self doFetchWithURLString:urlString + cachingDatedData:NO + retrySelector:fixRequestSel + maxRetryInterval:30.0 // should only retry once due to selector + credential:nil + userData:lotsOfRetriesNumber]; + + STAssertNotNil(fetchedData_, @"data is expected"); + STAssertEquals(fetchedStatus_, 200, + @"fetchedStatus_ should be 200, was %@", fetchedStatus_); + STAssertEquals([fetcher retryCount], (NSUInteger) 1, @"retry count unexpected"); + + // check the notifications + STAssertEquals(fetchStartedNotificationCount_, 9, @"fetches started"); + STAssertEquals(fetchStoppedNotificationCount_, 9, @"fetches stopped"); + STAssertEquals(retryDelayStartedNotificationCount_, 6, @"retries started"); + STAssertEquals(retryDelayStoppedNotificationCount_, 6, @"retries started"); +} + +#pragma mark Upload fetches + +- (NSData *)generatedUploadDataWithLength:(NSUInteger)length { + // fill a data block with data + NSMutableData *data = [NSMutableData dataWithLength:length]; + + unsigned char *bytes = [data mutableBytes]; + for (NSUInteger idx = 0; idx < length; idx++) { + bytes[idx] = ((idx + 1) % 256); + } + + return data; +} + +static NSString* const kPauseAtKey = @"pauseAt"; +static NSString* const kRetryAtKey = @"retryAt"; +static NSString* const kOriginalURLKey = @"origURL"; + +- (void)uploadFetcher:(GTMHTTPUploadFetcher *)fetcher + didSendBytes:(NSInteger)bytesSent + totalBytesSent:(NSInteger)totalBytesSent +totalBytesExpectedToSend:(NSInteger)totalBytesExpectedToSend { + + NSNumber *pauseAtNum = [fetcher propertyForKey:kPauseAtKey]; + if (pauseAtNum) { + int pauseAt = [pauseAtNum intValue]; + if (pauseAt < totalBytesSent) { + // we won't be paused again + [fetcher setProperty:nil forKey:kPauseAtKey]; + + // we've reached the point where we should pause + // + // use perform selector to avoid pausing immediately, as that would nuke + // the chunk upload fetcher that is calling us back now + [fetcher performSelector:@selector(pauseFetching) + withObject:nil + afterDelay:0.0]; + + [fetcher performSelector:@selector(resumeFetching) + withObject:nil + afterDelay:1.0]; + } + } + + NSNumber *retryAtNum = [fetcher propertyForKey:kRetryAtKey]; + if (retryAtNum) { + int retryAt = [retryAtNum intValue]; + if (retryAt < totalBytesSent) { + // we won't be retrying again + [fetcher setProperty:nil forKey:kRetryAtKey]; + + // save the current locationURL before appending &status=503 + NSURL *origURL = fetcher.locationURL; + [fetcher setProperty:origURL forKey:kOriginalURLKey]; + + NSString *newURLStr = [[origURL absoluteString] stringByAppendingString:@"?status=503"]; + fetcher.locationURL = [NSURL URLWithString:newURLStr]; + } + } +} + + +-(BOOL)uploadRetryFetcher:(GTMHTTPUploadFetcher *)fetcher willRetry:(BOOL)suggestedWillRetry forError:(NSError *)error { + // change this fetch's request (and future requests) to have the original URL, + // not the one with status=503 appended + NSURL *origURL = [fetcher propertyForKey:kOriginalURLKey]; + + [fetcher.activeFetcher.mutableRequest setURL:origURL]; + fetcher.locationURL = origURL; + + [fetcher setProperty:nil forKey:kOriginalURLKey]; + + return suggestedWillRetry; // do the retry fetch; it should succeed now +} + +- (void)testChunkedUploadFetch { + if (!isServerRunning_) return; + + NSData *bigData = [self generatedUploadDataWithLength:199000]; + NSData *smallData = [self generatedUploadDataWithLength:13]; + + NSData *gettysburgAddress = [self gettysburgAddress]; + + // write the big data into a temp file + NSString *tempDir = NSTemporaryDirectory(); + NSString *bigFileName = @"GTMFetchingTest_BigFile"; + NSString *bigFilePath = [tempDir stringByAppendingPathComponent:bigFileName]; + [bigData writeToFile:bigFilePath atomically:NO]; + + NSFileHandle *bigFileHandle = [NSFileHandle fileHandleForReadingAtPath:bigFilePath]; + + SEL progressSel = @selector(uploadFetcher:didSendBytes:totalBytesSent:totalBytesExpectedToSend:); + SEL retrySel = @selector(uploadRetryFetcher:willRetry:forError:); + SEL finishedSel = @selector(testFetcher:finishedWithData:error:); + + NSString *urlString = [self localURLStringToTestFileName:kValidFileName]; + urlString = [urlString stringByAppendingPathExtension:@"location"]; + + [self resetNotificationCounts]; + + // + // test uploading a big file handle + // + [self resetFetchResponse]; + + NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:urlString] + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:kGiveUpInterval]; + + GTMHTTPUploadFetcher *fetcher = [GTMHTTPUploadFetcher uploadFetcherWithRequest:request + uploadFileHandle:bigFileHandle + uploadMIMEType:@"text/plain" + chunkSize:75000 + fetcherService:nil]; + + [fetcher beginFetchWithDelegate:self + didFinishSelector:finishedSel]; + + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + + + STAssertNotNil(fetchedData_, + @"failed to fetch data, status:%d error:%@, URL:%@", + fetchedStatus_, fetcherError_, urlString); + + // check that we fetched the expected data + STAssertEqualObjects(fetchedData_, gettysburgAddress, + @"Lincoln disappointed"); + STAssertNotNil(fetchedResponse_, + @"failed to get fetch response, status:%d error:%@", + fetchedStatus_, fetcherError_); + STAssertNotNil(fetchedRequest_, + @"failed to get fetch request, URL %@", urlString); + STAssertNil(fetcherError_, @"fetching data gave error: %@", fetcherError_); + STAssertEquals(fetchedStatus_, 200, + @"unexpected status for URL %@", urlString); + + // check the request of the final chunk fetcher to be sure we were uploading + // chunks as expected. Chunk requests replace the original request in the + // fetcher. + NSDictionary *reqHdrs = [fetcher.mutableRequest allHTTPHeaderFields]; + + NSString *uploadReqURLPath = @"gettysburgaddress.txt.location"; + NSString *contentLength = [reqHdrs objectForKey:@"Content-Length"]; + NSString *contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertTrue([[[request URL] absoluteString] hasSuffix:uploadReqURLPath], + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"49000", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 150000-198999/199000", @"range"); + + // + // repeat the big upload using NSData + // + [self resetFetchResponse]; + + request = [NSURLRequest requestWithURL:[NSURL URLWithString:urlString] + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:kGiveUpInterval]; + + fetcher = [GTMHTTPUploadFetcher uploadFetcherWithRequest:request + uploadData:bigData + uploadMIMEType:@"text/plain" + chunkSize:75000 + fetcherService:nil]; + + [fetcher beginFetchWithDelegate:self + didFinishSelector:finishedSel]; + + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + + // check that we fetched the expected data + STAssertEqualObjects(fetchedData_, gettysburgAddress, + @"Lincoln disappointed"); + STAssertNotNil(fetchedResponse_, + @"failed to get fetch response, status:%d error:%@", + fetchedStatus_, fetcherError_); + STAssertNotNil(fetchedRequest_, + @"failed to get fetch request, URL %@", urlString); + STAssertNil(fetcherError_, @"fetching data gave error: %@", fetcherError_); + STAssertEquals(fetchedStatus_, 200, + @"unexpected status for URL %@", urlString); + + // check the request of the final chunk fetcher + reqHdrs = [fetcher.mutableRequest allHTTPHeaderFields]; + + uploadReqURLPath = @"gettysburgaddress.txt.location"; + contentLength = [reqHdrs objectForKey:@"Content-Length"]; + contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertTrue([[[request URL] absoluteString] hasSuffix:uploadReqURLPath], + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"49000", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 150000-198999/199000", @"range"); + + + // + // repeat the big upload, pausing after 20000 bytes + // + [self resetFetchResponse]; + + fetcher = [GTMHTTPUploadFetcher uploadFetcherWithRequest:request + uploadData:bigData + uploadMIMEType:@"text/plain" + chunkSize:75000 + fetcherService:nil]; + + // add a property to the fetcher that our progress callback will look for to + // know when to pause and resume the upload + fetcher.sentDataSelector = progressSel; + [fetcher setProperty:[NSNumber numberWithInt:20000] + forKey:kPauseAtKey]; + + [fetcher beginFetchWithDelegate:self + didFinishSelector:finishedSel]; + + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + + // check the request of the final chunk fetcher to be sure we were uploading + // chunks as expected. + reqHdrs = [fetcher.mutableRequest allHTTPHeaderFields]; + + uploadReqURLPath = @"gettysburgaddress.txt.location"; + contentLength = [reqHdrs objectForKey:@"Content-Length"]; + contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertTrue([[[request URL] absoluteString] hasSuffix:uploadReqURLPath], + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"24499", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 174501-198999/199000", @"range"); + + + // + // repeat the big upload using blocks instead of a delegate, + // pausing after 20000 bytes + // + // for the blocks test, the body of the blocks will just invoke the non-block + // callback methods + // + [self resetFetchResponse]; + + fetcher = [GTMHTTPUploadFetcher uploadFetcherWithRequest:request + uploadData:bigData + uploadMIMEType:@"text/plain" + chunkSize:75000 + fetcherService:nil]; + + [fetcher setSentDataBlock:^(NSInteger bytesSent, NSInteger totalBytesSent, NSInteger expectedBytes) { + [self uploadFetcher:fetcher + didSendBytes:bytesSent + totalBytesSent:totalBytesSent +totalBytesExpectedToSend:expectedBytes]; + }]; + + [fetcher setProperty:[NSNumber numberWithInt:20000] + forKey:kPauseAtKey]; + + [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { + [self testFetcher:fetcher + finishedWithData:data + error:error]; + }]; + + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + + // check the request of the final chunk fetcher to be sure we were uploading + // chunks as expected. + reqHdrs = [fetcher.mutableRequest allHTTPHeaderFields]; + + uploadReqURLPath = @"gettysburgaddress.txt.location"; + contentLength = [reqHdrs objectForKey:@"Content-Length"]; + contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertTrue([[[request URL] absoluteString] hasSuffix:uploadReqURLPath], + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"24499", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 174501-198999/199000", @"range"); + + + // + // repeat the upload, and after sending 70000 bytes the progress + // callback will change the request URL for the next chunk fetch to make + // it fail with a retryable status error + // + + [self resetFetchResponse]; + + fetcher = [GTMHTTPUploadFetcher uploadFetcherWithRequest:request + uploadData:bigData + uploadMIMEType:@"text/plain" + chunkSize:75000 + fetcherService:nil]; + fetcher.retryEnabled = YES; + fetcher.retrySelector = retrySel; + fetcher.sentDataSelector = progressSel; + + // add a property to the fetcher that our progress callback will look for to + // know when to retry the upload + [fetcher setProperty:[NSNumber numberWithInt:70000] + forKey:kRetryAtKey]; + + [fetcher beginFetchWithDelegate:self + didFinishSelector:finishedSel]; + + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + + // check the request of the final chunk fetcher to be sure we were uploading + // chunks as expected. + reqHdrs = [fetcher.mutableRequest allHTTPHeaderFields]; + + uploadReqURLPath = @"gettysburgaddress.txt.location"; + contentLength = [reqHdrs objectForKey:@"Content-Length"]; + contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertTrue([[[request URL] absoluteString] hasSuffix:uploadReqURLPath], + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"24499", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 174501-198999/199000", @"range"); + + + // + // repeat the forced-retry upload, using blocks + // + + [self resetFetchResponse]; + fetcher = [GTMHTTPUploadFetcher uploadFetcherWithRequest:request + uploadData:bigData + uploadMIMEType:@"text/plain" + chunkSize:75000 + fetcherService:nil]; + fetcher.retryEnabled = YES; + [fetcher setRetryBlock:^(BOOL suggestedWillRetry, NSError *error) { + BOOL shouldRetry = [self uploadRetryFetcher:fetcher + willRetry:suggestedWillRetry + forError:error]; + return shouldRetry; + }]; + + [fetcher setSentDataBlock:^(NSInteger bytesSent, NSInteger totalBytesSent, NSInteger expectedBytes) { + [self uploadFetcher:fetcher + didSendBytes:bytesSent + totalBytesSent:totalBytesSent +totalBytesExpectedToSend:expectedBytes]; + }]; + + // add a property to the fetcher that our progress callback will look for to + // know when to retry the upload + [fetcher setProperty:[NSNumber numberWithInt:70000] + forKey:kRetryAtKey]; + + [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { + [self testFetcher:fetcher + finishedWithData:data + error:error]; + }]; + + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + + // check the request of the final chunk fetcher to be sure we were uploading + // chunks as expected. + reqHdrs = [fetcher.mutableRequest allHTTPHeaderFields]; + + uploadReqURLPath = @"gettysburgaddress.txt.location"; + contentLength = [reqHdrs objectForKey:@"Content-Length"]; + contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertTrue([[[request URL] absoluteString] hasSuffix:uploadReqURLPath], + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"24499", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 174501-198999/199000", @"range"); + + + // + // upload a small buffer + // + [self resetFetchResponse]; + + fetcher = [GTMHTTPUploadFetcher uploadFetcherWithRequest:request + uploadData:smallData + uploadMIMEType:@"text/plain" + chunkSize:75000 + fetcherService:nil]; + + [fetcher beginFetchWithDelegate:self + didFinishSelector:finishedSel]; + + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + + // check that we fetched the expected data + STAssertEqualObjects(fetchedData_, gettysburgAddress, + @"Lincoln disappointed"); + STAssertNotNil(fetchedResponse_, + @"failed to get fetch response, status:%d error:%@", + fetchedStatus_, fetcherError_); + STAssertNotNil(fetchedRequest_, + @"failed to get fetch request, URL %@", urlString); + STAssertNil(fetcherError_, @"fetching data gave error: %@", fetcherError_); + STAssertEquals(fetchedStatus_, 200, + @"unexpected status for URL %@", urlString); + + // check the request of the final chunk fetcher to be sure we were uploading + // chunks as expected + reqHdrs = [fetcher.mutableRequest allHTTPHeaderFields]; + + uploadReqURLPath = @"gettysburgaddress.txt.location"; + contentLength = [reqHdrs objectForKey:@"Content-Length"]; + contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertTrue([[[request URL] absoluteString] hasSuffix:uploadReqURLPath], + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"13", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 0-12/13", @"range"); + + // + // delete the big file + // + [[NSFileManager defaultManager] removeItemAtPath:bigFilePath + error:NULL]; +} + +#pragma mark - + +- (GTMHTTPFetcher *)doFetchWithURLString:(NSString *)urlString + cachingDatedData:(BOOL)doCaching { + + return [self doFetchWithURLString:(NSString *)urlString + cachingDatedData:doCaching + retrySelector:nil + maxRetryInterval:0 + credential:nil + userData:nil]; +} + +- (GTMHTTPFetcher *)doFetchWithURLString:(NSString *)urlString + cachingDatedData:(BOOL)doCaching + retrySelector:(SEL)retrySel + maxRetryInterval:(NSTimeInterval)maxRetryInterval + credential:(NSURLCredential *)credential + userData:(id)userData { + NSURL *url = [NSURL URLWithString:urlString]; + NSURLRequest *req = [NSURLRequest requestWithURL:url + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:kGiveUpInterval]; + GTMHTTPFetcher *fetcher = [GTMHTTPFetcher fetcherWithRequest:req]; + + STAssertNotNil(fetcher, @"Failed to allocate fetcher"); + + // setting the fetch history will add the "If-modified-since" header + // to repeat requests + [fetchHistory_ setShouldCacheETaggedData:doCaching]; + [fetcher setFetchHistory:fetchHistory_]; + + if (retrySel) { + [fetcher setRetryEnabled:YES]; + [fetcher setRetrySelector:retrySel]; + [fetcher setMaxRetryInterval:maxRetryInterval]; + [fetcher setUserData:userData]; + + // we force a minimum retry interval for unit testing; otherwise, + // we'd have no idea how many retries will occur before the max + // retry interval occurs, since the minimum would be random + [fetcher setMinRetryInterval:1.0]; + } + + [fetcher setCredential:credential]; + + BOOL isFetching = [fetcher beginFetchWithDelegate:self + didFinishSelector:@selector(testFetcher:finishedWithData:error:)]; + STAssertTrue(isFetching, @"Begin fetch failed"); + + if (isFetching) { + [fetcher waitForCompletionWithTimeout:kGiveUpInterval]; + } + return fetcher; +} + +- (NSString *)localPathForFileName:(NSString *)name { + NSString *docRoot = [self docRootPath]; + NSString *filePath = [docRoot stringByAppendingPathComponent:name]; + return filePath; +} + +- (NSString *)localURLStringToTestFileName:(NSString *)name { + + // we need to create http URLs referring to the desired + // resource to be found by the http server running locally + + // return a localhost:port URL for the test file + NSString *urlString = [NSString stringWithFormat:@"http://localhost:%d/%@", + [testServer_ port], name]; + + // we exclude parameters + NSRange range = [name rangeOfString:@"?"]; + if (range.location != NSNotFound) { + name = [name substringToIndex:range.location]; + } + + // just for sanity, let's make sure we see the file locally, so + // we can expect the Python http server to find it too + NSString *filePath = [self localPathForFileName:name]; + + BOOL doesExist = [[NSFileManager defaultManager] fileExistsAtPath:filePath]; + STAssertTrue(doesExist, @"Missing test file %@", filePath); + + return urlString; +} + +- (void)testFetcher:(GTMHTTPFetcher *)fetcher + finishedWithData:(NSData *)data + error:(NSError *)error { + fetchedData_ = [data copy]; + fetchedStatus_ = [fetcher statusCode]; + fetchedRequest_ = [[fetcher mutableRequest] retain]; + fetchedResponse_ = [[fetcher response] retain]; + fetcherError_ = [error retain]; +} + + +// Selector for allowing up to N retries, where N is an NSNumber in the +// fetcher's userData +- (BOOL)countRetriesfetcher:(GTMHTTPFetcher *)fetcher + willRetry:(BOOL)suggestedWillRetry + forError:(NSError *)error { + + int count = [fetcher retryCount]; + int allowedRetryCount = [[fetcher userData] intValue]; + + BOOL shouldRetry = (count < allowedRetryCount); + + STAssertEquals([fetcher nextRetryInterval], pow(2.0, [fetcher retryCount]), + @"unexpected next retry interval (expected %f, was %f)", + pow(2.0, [fetcher retryCount]), + [fetcher nextRetryInterval]); + + NSData *statusData = [[error userInfo] objectForKey:kGTMHTTPFetcherStatusDataKey]; + NSString *dataStr = [[[NSString alloc] initWithData:statusData + encoding:NSUTF8StringEncoding] autorelease]; + NSString *expectedStr = @"{ \"error\" : { \"message\" : \"Server Status 503\", \"code\" : 503 } }"; + STAssertEqualObjects(dataStr, expectedStr, nil); + + return shouldRetry; +} + +// Selector for retrying and changing the request to one that will succeed +- (BOOL)fixRequestFetcher:(GTMHTTPFetcher *)fetcher + willRetry:(BOOL)suggestedWillRetry + forError:(NSError *)error { + + STAssertEquals([fetcher nextRetryInterval], pow(2.0, [fetcher retryCount]), + @"unexpected next retry interval (expected %f, was %f)", + pow(2.0, [fetcher retryCount]), + [fetcher nextRetryInterval]); + + // fix it - change the request to a URL which does not have a status value + NSString *urlString = [self localURLStringToTestFileName:kValidFileName]; + + NSURL *url = [NSURL URLWithString:urlString]; + [[fetcher mutableRequest] setURL:url]; + + return YES; // do the retry fetch; it should succeed now +} + +@end + +@implementation TestAuthorizer + +@synthesize expired = hasExpired_; + ++ (TestAuthorizer *)authorizer { + return [[[self alloc] init] autorelease]; +} + ++ (TestAuthorizer *)expiredAuthorizer { + TestAuthorizer *authorizer = [self authorizer]; + authorizer.expired = YES; + return authorizer; +} + +- (void)authorizeRequest:(NSMutableURLRequest *)request + delegate:(id)delegate + didFinishSelector:(SEL)sel { + NSString *value = self.expired ? kExpiredBearerValue : kGoodBearerValue; + [request setValue:value forHTTPHeaderField:@"Authorization"]; + NSError *error = nil; + + if (delegate && sel) { + NSMethodSignature *sig = [delegate methodSignatureForSelector:sel]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; + [invocation setSelector:sel]; + [invocation setTarget:delegate]; + [invocation setArgument:&self atIndex:2]; + [invocation setArgument:&request atIndex:3]; + [invocation setArgument:&error atIndex:4]; + [invocation invoke]; + } +} + +- (void)stopAuthorization { +} + +- (void)stopAuthorizationForRequest:(NSURLRequest *)request { +} + +- (BOOL)isAuthorizingRequest:(NSURLRequest *)request { + return NO; +} + +- (BOOL)isAuthorizedRequest:(NSURLRequest *)request { + NSString *value = [[request allHTTPHeaderFields] objectForKey:@"Authorization"]; + BOOL isValid = [value isEqual:kGoodBearerValue]; + return isValid; +} + +- (NSString *)userEmail { + return @""; +} + +- (BOOL)primeForRefresh { + self.expired = NO; + return YES; +} + +@end diff --git a/GTL/Source/HTTPFetcher/Tests/GTMHTTPFetcherServiceTest.m b/GTL/Source/HTTPFetcher/Tests/GTMHTTPFetcherServiceTest.m new file mode 100644 index 0000000..ebd0569 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/GTMHTTPFetcherServiceTest.m @@ -0,0 +1,316 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GTMHTTPFetcherTestServer.h" +#import "GTMHTTPFetcherService.h" + +@interface GTMHTTPFetcherServiceTest : SenTestCase { + GTMHTTPFetcherTestServer *testServer_; + BOOL isServerRunning_; +} + +@end + +@implementation GTMHTTPFetcherServiceTest + +// file available in Tests folder +static NSString *const kValidFileName = @"gettysburgaddress.txt"; + +- (NSString *)docRootPath { + // find a test file + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + STAssertNotNil(testBundle, nil); + + // use the directory of the test file as the root directory for our server + NSString *docFolder = [testBundle resourcePath]; + return docFolder; +} + +- (void)setUp { + NSString *docRoot = [self docRootPath]; + + testServer_ = [[GTMHTTPFetcherTestServer alloc] initWithDocRoot:docRoot]; + isServerRunning_ = (testServer_ != nil); + + STAssertTrue(isServerRunning_, + @">>> http test server failed to launch; skipping" + " service tests\n"); +} + +- (void)tearDown { + [testServer_ release]; + testServer_ = nil; + + isServerRunning_ = NO; +} + +- (void)testFetcherService { + if (!isServerRunning_) return; + + // Utility blocks for counting array entries for a specific host + NSUInteger (^URLsPerHost) (NSArray *, NSString *) = ^(NSArray *URLs, + NSString *host) { + NSUInteger counter = 0; + for (NSURL *url in URLs) { + if ([host isEqual:[url host]]) counter++; + } + return counter; + }; + + NSUInteger (^FetchersPerHost) (NSArray *, NSString *) = ^(NSArray *fetchers, + NSString *host) { + NSArray *fetcherURLs = [fetchers valueForKeyPath:@"mutableRequest.URL"]; + return URLsPerHost(fetcherURLs, host); + }; + + // Utility block for finding the minimum priority fetcher for a specific host + NSInteger (^PriorityPerHost) (NSArray *, NSString *) = ^(NSArray *fetchers, + NSString *host) { + NSInteger val = NSIntegerMax; + for (GTMHTTPFetcher *fetcher in fetchers) { + if ([host isEqual:[[fetcher.mutableRequest URL] host]]) { + val = MIN(val, fetcher.servicePriority); + } + } + return val; + }; + + // We'll verify we fetched from the server the same data that is on disk + NSString *gettysburgPath = [testServer_ localPathForFile:kValidFileName]; + NSData *gettysburgAddress = [NSData dataWithContentsOfFile:gettysburgPath]; + + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + + // We'll create 10 fetchers. Only 2 should run simultaneously. + // 1 should fail; the rest should succeeed. + const NSUInteger kMaxRunningFetchersPerHost = 2; + + NSString *const kUserAgent = @"ServiceTest-UA"; + const NSTimeInterval kTimeout = 55; + + GTMHTTPFetcherService *service = [[[GTMHTTPFetcherService alloc] init] autorelease]; + service.maxRunningFetchersPerHost = kMaxRunningFetchersPerHost; + service.fetchHistory.shouldRememberETags = NO; + service.userAgent = kUserAgent; + service.timeout = kTimeout; + + // Make URLs for a valid fetch, a fetch that returns a status error, + // and a valid fetch with a different host + NSURL *validFileURL = [testServer_ localURLForFile:kValidFileName]; + + NSString *invalidFile = [kValidFileName stringByAppendingString:@"?status=400"]; + NSURL *invalidFileURL = [testServer_ localURLForFile:invalidFile]; + + NSString *validURLStr = [validFileURL absoluteString]; + NSString *altValidURLStr = [validURLStr stringByReplacingOccurrencesOfString:@"localhost" + withString:@"127.0.0.1"]; + NSURL *altValidURL = [NSURL URLWithString:altValidURLStr]; + + STAssertEqualObjects([validFileURL host], @"localhost", @"unexpected host"); + STAssertEqualObjects([invalidFileURL host], @"localhost", @"unexpected host"); + STAssertEqualObjects([altValidURL host], @"127.0.0.1", @"unexpected host"); + + // Make an array with the urls from the different hosts, including one + // that will fail with a status 400 error + NSMutableArray *urlArray = [NSMutableArray array]; + for (int idx = 1; idx <= 4; idx++) [urlArray addObject:validFileURL]; + [urlArray addObject:invalidFileURL]; + for (int idx = 1; idx <= 5; idx++) [urlArray addObject:validFileURL]; + for (int idx = 1; idx <= 5; idx++) [urlArray addObject:altValidURL]; + for (int idx = 1; idx <= 5; idx++) [urlArray addObject:validFileURL]; + NSUInteger totalNumberOfFetchers = [urlArray count]; + + __block NSMutableArray *pending = [NSMutableArray array]; + __block NSMutableArray *running = [NSMutableArray array]; + __block NSMutableArray *completed = [NSMutableArray array]; + + NSUInteger priorityVal = 0; + + // Create all the fetchers + for (NSURL *fileURL in urlArray) { + GTMHTTPFetcher *fetcher = [service fetcherWithURL:fileURL]; + + // Fetcher start notification + [nc addObserverForName:kGTMHTTPFetcherStartedNotification + object:fetcher + queue:nil + usingBlock:^(NSNotification *note) { + // Verify that we have at most two fetchers running for this + // fetcher's host + [running addObject:fetcher]; + [pending removeObject:fetcher]; + + NSMutableURLRequest *fetcherReq = [fetcher mutableRequest]; + NSURL *fetcherReqURL = [fetcherReq URL]; + NSString *host = [fetcherReqURL host]; + NSUInteger numberRunning = FetchersPerHost(running, host); + STAssertTrue(numberRunning > 0, @"count error"); + STAssertTrue(numberRunning <= kMaxRunningFetchersPerHost, + @"too many running"); + + NSInteger pendingPriority = PriorityPerHost(pending, host); + STAssertTrue(fetcher.servicePriority <= pendingPriority, + @"a pending fetcher has greater priority"); + + STAssertEquals([service numberOfFetchers], + [running count] + [pending count], + @"fetcher count off"); + STAssertEquals([service numberOfRunningFetchers], + [running count], @"running off"); + STAssertEquals([service numberOfDelayedFetchers], + [pending count], @"delayed off"); + + NSArray *matches = + [service issuedFetchersWithRequestURL:fetcherReqURL]; + NSUInteger idx = NSNotFound; + if (matches) { + idx = [matches indexOfObjectIdenticalTo:fetcher]; + } + STAssertTrue(idx != NSNotFound, @"Missing %@ in %@", + fetcherReqURL, matches); + NSURL *fakeURL = + [NSURL URLWithString:@"http://example.com/bad"]; + matches = [service issuedFetchersWithRequestURL:fakeURL]; + STAssertEquals([matches count], (NSUInteger)0, nil); + + NSString *agent = [fetcherReq valueForHTTPHeaderField:@"User-Agent"]; + STAssertEqualObjects(agent, kUserAgent, nil); + STAssertEquals([fetcherReq timeoutInterval], kTimeout, nil); + }]; + + // Fetcher stopped notification + [nc addObserverForName:kGTMHTTPFetcherStoppedNotification + object:fetcher + queue:nil + usingBlock:^(NSNotification *note) { + // Verify that we only have two fetchers running + [completed addObject:fetcher]; + [running removeObject:fetcher]; + + NSString *host = [[[fetcher mutableRequest] URL] host]; + + NSUInteger numberRunning = FetchersPerHost(running, host); + NSUInteger numberPending = FetchersPerHost(pending, host); + NSUInteger numberCompleted = FetchersPerHost(completed, host); + + STAssertTrue(numberRunning <= kMaxRunningFetchersPerHost, + @"too many running"); + STAssertTrue(numberPending + numberRunning + numberCompleted <= URLsPerHost(urlArray, host), + @"%d issued running (pending:%u running:%u completed:%u)", + totalNumberOfFetchers, (unsigned int)numberPending, + (unsigned int)numberRunning, (unsigned int)numberCompleted); + + STAssertEquals([service numberOfFetchers], + [running count] + [pending count] + 1, + @"fetcher count off"); + STAssertEquals([service numberOfRunningFetchers], + [running count] + 1, @"running off"); + STAssertEquals([service numberOfDelayedFetchers], + [pending count], @"delayed off"); + }]; + + [pending addObject:fetcher]; + + // Set the fetch priority to a value that cycles 0, 1, -1, 0, ... + priorityVal++; + if (priorityVal > 1) priorityVal = -1; + fetcher.servicePriority = priorityVal; + + // Start this fetcher + [fetcher beginFetchWithCompletionHandler:^(NSData *fetchData, NSError *fetchError) { + // Callback + // + // The query should be empty except for the URL with a status code + NSString *query = [[[fetcher mutableRequest] URL] query]; + BOOL isValidRequest = ([query length] == 0); + if (isValidRequest) { + STAssertEqualObjects(fetchData, gettysburgAddress, + @"Bad fetch data"); + STAssertNil(fetchError, @"unexpected %@ %@", + fetchError, [fetchError userInfo]); + } else { + // This is the query with ?status=400 + STAssertEquals([fetchError code], (NSInteger) 400, @"expected error"); + } + }]; + } + + [service waitForCompletionOfAllFetchersWithTimeout:10]; + + STAssertEquals([pending count], (NSUInteger) 0, + @"still pending: %@", pending); + STAssertEquals([running count], (NSUInteger) 0, + @"still running: %@", running); + STAssertEquals([completed count], (NSUInteger) totalNumberOfFetchers, + @"incomplete"); + + STAssertEquals([service numberOfFetchers], (NSUInteger) 0, + @"service non-empty"); +} + +- (void)testStopAllFetchers { + if (!isServerRunning_) return; + + GTMHTTPFetcherService *service = [[[GTMHTTPFetcherService alloc] init] autorelease]; + service.maxRunningFetchersPerHost = 2; + service.fetchHistory.shouldRememberETags = NO; + + // Create three fetchers for each of two URLs, so there should be + // two running and one delayed for each + NSURL *validFileURL = [testServer_ localURLForFile:kValidFileName]; + + NSString *validURLStr = [validFileURL absoluteString]; + NSString *altValidURLStr = [validURLStr stringByReplacingOccurrencesOfString:@"localhost" + withString:@"127.0.0.1"]; + NSURL *altValidURL = [NSURL URLWithString:altValidURLStr]; + + // Add three fetches for each URL + NSMutableArray *urlArray = [NSMutableArray array]; + [urlArray addObject:validFileURL]; + [urlArray addObject:altValidURL]; + [urlArray addObject:validFileURL]; + [urlArray addObject:altValidURL]; + [urlArray addObject:validFileURL]; + [urlArray addObject:altValidURL]; + + // Create and start all the fetchers + for (NSURL *fileURL in urlArray) { + GTMHTTPFetcher *fetcher = [service fetcherWithURL:fileURL]; + [fetcher beginFetchWithCompletionHandler:^(NSData *fetchData, NSError *fetchError) { + // We shouldn't reach any of the callbacks + STFail(@"Fetcher completed but should have been stopped"); + }]; + } + + // Two hosts + STAssertEquals([service.runningHosts count], (NSUInteger)2, @"hosts running"); + STAssertEquals([service.delayedHosts count], (NSUInteger)2, @"hosts delayed"); + + // We should see two fetchers running and one delayed for each host + NSArray *localhosts = [service.runningHosts objectForKey:@"localhost"]; + STAssertEquals([localhosts count], (NSUInteger)2, @"hosts running"); + + localhosts = [service.delayedHosts objectForKey:@"localhost"]; + STAssertEquals([localhosts count], (NSUInteger)1, @"hosts delayed"); + + [service stopAllFetchers]; + + STAssertEquals([service.runningHosts count], (NSUInteger)0, @"hosts running"); + STAssertEquals([service.delayedHosts count], (NSUInteger)0, @"hosts delayed"); +} + +@end diff --git a/GTL/Source/HTTPFetcher/Tests/GTMHTTPFetcherTestServer.h b/GTL/Source/HTTPFetcher/Tests/GTMHTTPFetcherTestServer.h new file mode 100644 index 0000000..1d381c7 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/GTMHTTPFetcherTestServer.h @@ -0,0 +1,42 @@ +// +// GTMHTTPFetcherTestServer.h +// +// Copyright 2010 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not +// use this file except in compliance with the License. You may obtain a copy +// of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations under +// the License. +// + +#import "GTMHTTPServer.h" + + +// This is a HTTP Server that responsd to requests by returning the requested +// file. It takes extra url arguments to tell it what to +// return for testing the code using it. +@interface GTMHTTPFetcherTestServer : NSObject { + NSString *docRoot_; + GTMHTTPServer *server_; +} + +// Any url that isn't a specific server request (login, etc.), will be fetched +// off |docRoot| (to allow canned repsonses). +- (id)initWithDocRoot:(NSString *)docRoot; + +- (void)stopServer; + +// fetch the port the server is running on +- (uint16_t)port; + +// utilities for users +- (NSURL *)localURLForFile:(NSString *)name; // http://localhost:port/filename +- (NSString *)localPathForFile:(NSString *)name; // docRoot/filename +@end diff --git a/GTL/Source/HTTPFetcher/Tests/GTMHTTPFetcherTestServer.m b/GTL/Source/HTTPFetcher/Tests/GTMHTTPFetcherTestServer.m new file mode 100644 index 0000000..2482e34 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/GTMHTTPFetcherTestServer.m @@ -0,0 +1,358 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMHTTPFetcherTestServer.m +// + +#import "GTMHTTPFetcherTestServer.h" + +@interface GTMHTTPFetcherTestServer () +- (NSString *)valueForParameter:(NSString *)paramName query:(NSString *)query; +@end + +@interface GTMSBJSON +- (id)objectWithString:(NSString*)jsonrep error:(NSError**)error; +@end + +@interface GTMNSJSONSerialization : NSObject ++ (id)JSONObjectWithData:(NSData *)data options:(NSUInteger)opt error:(NSError **)error; +@end + +@implementation GTMHTTPFetcherTestServer + +- (id)initWithDocRoot:(NSString *)docRoot { + self = [super init]; + if (self) { + docRoot_ = [docRoot copy]; + server_ = [[GTMHTTPServer alloc] initWithDelegate:self]; + NSError *error = nil; + if ((docRoot == nil) || (![server_ start:&error])) { + NSLog(@"Failed to start up the GTMHTTPFetcherTestServer " + "(docRoot='%@', error=%@)", docRoot_, error); + [self release]; + return nil; + } else { + NSLog(@"Started GTMHTTPFetcherTestServer on port %d (docRoot='%@')", + [server_ port], docRoot_); + } + } + return self; +} + +- (void)stopServer { + if (server_) { + NSLog(@"Stopped GTMHTTPFetcherTestServer on port %d (docRoot='%@')", + [server_ port], docRoot_); + [server_ release]; + server_ = nil; + + [docRoot_ release]; + docRoot_ = nil; + } +} + +- (void)finalize { + [self stopServer]; + [super finalize]; +} + +- (void)dealloc { + [self stopServer]; + [super dealloc]; +} + +- (uint16_t)port { + return [server_ port]; +} + +- (id)JSONFromData:(NSData *)data { + NSError *error = nil; + const NSUInteger kOpts = NSJSONReadingMutableContainers; + id obj = [NSJSONSerialization JSONObjectWithData:data + options:kOpts + error:&error]; + if (obj == nil) { + NSString *jsonStr = [[[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding] autorelease]; + NSLog(@"JSON parse error: %@\n for JSON string: %@", + error, jsonStr); + } + return obj; +} + +- (GTMHTTPResponseMessage *)httpServer:(GTMHTTPServer *)server + handleRequest:(GTMHTTPRequestMessage *)request { + NSAssert(server == server_, @"how'd we get a different server?!"); + + GTMHTTPResponseMessage *response; + int resultStatus = 0; + NSData *data = nil; + NSMutableDictionary *responseHeaders = [NSMutableDictionary dictionary]; + + NSString *etag = @"GoodETag"; + + NSDictionary *requestHeaders = [request allHeaderFieldValues]; + NSString *ifMatch = [requestHeaders objectForKey:@"If-Match"]; + NSString *ifNoneMatch = [requestHeaders objectForKey:@"If-None-Match"]; + NSString *authorization = [requestHeaders objectForKey:@"Authorization"]; + NSString *path = [[request URL] path]; + NSString *query = [[request URL] query]; + + NSString *method = [request method]; + + // Code for future testing of the chunked-upload protocol + // + // This code is not yet tested + NSString *host = [requestHeaders objectForKey:@"Host"]; + NSString *contentRange = [requestHeaders objectForKey:@"Content-Range"]; + + // chunked (resumable) upload testing + if ([[path pathExtension] isEqual:@"location"]) { + + // return a location header containing the request path with + // the ".location" suffix changed to ".upload" + NSString *pathWithoutLoc = [path stringByDeletingPathExtension]; + NSString *fullLocation = [NSString stringWithFormat:@"http://%@%@.upload", + host, pathWithoutLoc]; + + [responseHeaders setValue:fullLocation forKey:@"Location"]; + resultStatus = 200; + goto SendResponse; + } else if ([[path pathExtension] isEqual:@"upload"]) { + // chunked (resumable) upload testing + + // if the contentRange indicates this is a middle chunk, + // return status 308 with a Range header; otherwise, strip + // the ".upload" and continue to return the file + // + // contentRange is like + // Content-Range: bytes 0-49999/135681 + // or + // Content-Range: bytes * /135681 + NSScanner *crScanner = [NSScanner scannerWithString:contentRange]; + long long totalToUpload = 0; + if ([crScanner scanString:@"bytes */" intoString:NULL] + && [crScanner scanLongLong:&totalToUpload]) { + // this is a query for where to resume; we'll arbitrarily resume at + // half the total length of the upload + long long resumeLocation = totalToUpload / 2; + NSString *range = [NSString stringWithFormat:@"bytes=0-%lld", + resumeLocation]; + [responseHeaders setValue:range forKey:@"Range"]; + resultStatus = 308; + goto SendResponse; + } + + long long rangeLow = 0; + long long rangeHigh = 0; + if ([crScanner scanString:@"bytes " intoString:nil] + && [crScanner scanLongLong:&rangeLow] + && [crScanner scanString:@"-" intoString:NULL] + && [crScanner scanLongLong:&rangeHigh] + && [crScanner scanString:@"/" intoString:NULL] + && [crScanner scanLongLong:&totalToUpload]) { + // a chunk request + if ((rangeHigh + 1) < totalToUpload) { + // this is a middle chunk, so send a 308 status to ask for more chunks + NSString *range = [NSString stringWithFormat:@"bytes=0-%lld", + rangeHigh]; + [responseHeaders setValue:range forKey:@"Range"]; + resultStatus = 308; + goto SendResponse; + } else { + // this is the final chunk; remove the ".upload" at the end and + // fall through to return the requested resource at the path + path = [path stringByDeletingPathExtension]; + } + } + } + + // if there's an "auth=foo" query parameter, then the value of the + // Authorization header should be "foo" + NSString *authStr = [self valueForParameter:@"oauth2" query:query]; + if (authStr) { + NSString *bearerStr = [@"Bearer " stringByAppendingString:authStr]; + if (authorization == nil + || ![authorization isEqualToString:bearerStr]) { + // return status 401 Unauthorized + NSString *errStr = [NSString stringWithFormat:@"Authorization \"%@\" should be \"%@\"", + authorization, bearerStr]; + NSData *errData = [errStr dataUsingEncoding:NSUTF8StringEncoding]; + GTMHTTPResponseMessage *response; + response = [GTMHTTPResponseMessage responseWithBody:errData + contentType:@"text/plain" + statusCode:401]; + return response; + } + } + + NSString *statusStr = [self valueForParameter:@"status" query:query]; + if (statusStr) { + // queries that have something like "?status=456" should fail with the + // status code + resultStatus = [statusStr intValue]; + + NSString *const template = @"{ \"error\" : { \"message\" : \"Server Status %u\"," + @" \"code\" : %u } }"; + NSString *errorStr = [NSString stringWithFormat:template, + resultStatus, resultStatus]; + data = [errorStr dataUsingEncoding:NSUTF8StringEncoding]; + } else { + if (ifMatch != nil && ![ifMatch isEqual:etag]) { + // there is no match, hence this is an inconsistent PUT or DELETE + resultStatus = 412; // precondition failed + } else if (ifNoneMatch != nil && [ifNoneMatch isEqual:etag]) { + // there is a match, hence this is a repetitive request + if ([method isEqual:@"GET"] || [method isEqual:@"HEAD"]) { + resultStatus = 304; // not modified + } else { + resultStatus = 412; // precondition failed + } + } else if ([method isEqualToString:@"DELETE"]) { + // it's an object delete; return empty data + resultStatus = 200; + } else { + if ([path hasSuffix:@".rpc"]) { + // JSON-RPC tests + // + // the fetch file name is like Foo.rpc; there should be local files + // with the expected JSON request body, and the response body + // + // replace the .rpc suffix with .request.txt and .response.txt + NSString *withoutRpcExtn = [path stringByDeletingPathExtension]; + NSString *requestName = [withoutRpcExtn stringByAppendingPathExtension:@"request.txt"]; + NSString *responseName = [withoutRpcExtn stringByAppendingPathExtension:@"response.txt"]; + + // read the expected request body from disk + NSString *requestPath = [docRoot_ stringByAppendingPathComponent:requestName]; + NSData *requestData = [NSData dataWithContentsOfFile:requestPath]; + if (!requestData) { + // we need a query request file for rpc tests + NSLog(@"Cannot find query request file \"%@\"", requestPath); + } else { + // verify that the RPC request body is as expected + NSDictionary *expectedJSON = [self JSONFromData:requestData]; + NSDictionary *requestJSON = [self JSONFromData:[request body]]; + + if (expectedJSON && requestJSON + && [requestJSON isEqual:expectedJSON]) { + // the request body matches + // + // for rpc, the response file ought to be here; + // 404s shouldn't happen + NSString *responsePath = [docRoot_ stringByAppendingPathComponent:responseName]; + if ([[NSFileManager defaultManager] fileExistsAtPath:responsePath]) { + path = responseName; + } else { + NSLog(@"Cannot find query response file \"%@\"", responsePath); + } + } else { + // the actual request did not match the expected request + // + // note that the requests may be dictionaries or arrays + NSLog(@"Mismatched request body for \"%@\"", path); + NSLog(@"\n--------\nExpected request:\n%@", expectedJSON); + NSLog(@"\n--------\nActual request:\n%@", requestJSON); + } + } + } + + // read and return the document from the path, or status 404 for not found + NSString *docPath = [docRoot_ stringByAppendingPathComponent:path]; + data = [NSData dataWithContentsOfFile:docPath]; + if (data) { + resultStatus = 200; + } else { + resultStatus = 404; + } + } + } + + if ([method isEqual:@"GET"]) { + [responseHeaders setValue:etag forKey:@"Etag"]; + } + + NSString *cookie = [NSString stringWithFormat:@"TestCookie=%@", + [path lastPathComponent]]; + [responseHeaders setValue:cookie forKey:@"Set-Cookie"]; + + // + // Finally, package up the response, and return it to the client + // +SendResponse: + response = [GTMHTTPResponseMessage responseWithBody:data + contentType:@"application/json" + statusCode:resultStatus]; + + [response setHeaderValuesFromDictionary:responseHeaders]; + + return response; +} + +- (NSString *)valueForParameter:(NSString *)paramName query:(NSString *)query { + if (!query) return nil; + + // search the query for a parameter beginning with "paramName=" and + // ending with & or the end-of-string + NSString *result = nil; + NSString *paramWithEquals = [paramName stringByAppendingString:@"="]; + NSRange paramNameRange = [query rangeOfString:paramWithEquals]; + if (paramNameRange.location != NSNotFound) { + // we found the param name; find the end of the parameter + NSCharacterSet *endSet = [NSCharacterSet characterSetWithCharactersInString:@"&\n"]; + NSUInteger startOfParam = paramNameRange.location + paramNameRange.length; + NSRange endSearchRange = NSMakeRange(startOfParam, + [query length] - startOfParam); + NSRange endRange = [query rangeOfCharacterFromSet:endSet + options:0 + range:endSearchRange]; + if (endRange.location == NSNotFound) { + // param goes to end of string + result = [query substringFromIndex:startOfParam]; + } else { + // found and end marker + NSUInteger paramLen = endRange.location - startOfParam; + NSRange foundRange = NSMakeRange(startOfParam, paramLen); + result = [query substringWithRange:foundRange]; + } + } else { + // param not found + } + return result; +} + +// utilities for users +- (NSURL *)localURLForFile:(NSString *)name { + // we need to create http URLs referring to the desired + // resource to be found by the http server running locally + + // return a localhost:port URL for the test file + NSString *urlString = [NSString stringWithFormat:@"http://localhost:%d/%@", + [self port], name]; + return [NSURL URLWithString:urlString]; +} + +- (NSString *)localPathForFile:(NSString *)name { + // we exclude parameters + NSRange range = [name rangeOfString:@"?"]; + if (range.location != NSNotFound) { + name = [name substringToIndex:range.location]; + } + NSString *filePath = [docRoot_ stringByAppendingPathComponent:name]; + return filePath; +} + +@end diff --git a/GTL/Source/HTTPFetcher/Tests/GTMHTTPFetcherUtilityTest.m b/GTL/Source/HTTPFetcher/Tests/GTMHTTPFetcherUtilityTest.m new file mode 100755 index 0000000..4847d32 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/GTMHTTPFetcherUtilityTest.m @@ -0,0 +1,121 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GTMHTTPFetcher.h" +#import "GTMHTTPFetcherLogging.h" + +@interface GTMHTTPFetcherUtilityTest : SenTestCase +@end + +@interface GTMHTTPFetcher (GTMHTTPFetcherLoggingInternal) ++ (NSString *)snipSubstringOfString:(NSString *)originalStr + betweenStartString:(NSString *)startStr + endString:(NSString *)endStr; +@end + + +@implementation GTMHTTPFetcherUtilityTest + +#if !STRIP_GTM_FETCH_LOGGING +- (void)testLogSnipping { + // enpty string + NSString *orig = @""; + NSString *expected = orig; + NSString *result = [GTMHTTPFetcher snipSubstringOfString:orig + betweenStartString:@"jkl" + endString:@"mno"]; + STAssertEqualObjects(result, expected, @"simple snip to end failure"); + + // snip the middle + orig = @"abcdefg"; + expected = @"abcd_snip_fg"; + result = [GTMHTTPFetcher snipSubstringOfString:orig + betweenStartString:@"abcd" + endString:@"fg"]; + STAssertEqualObjects(result, expected, @"simple snip in the middle failure"); + + // snip to the end + orig = @"abcdefg"; + expected = @"abcd_snip_"; + result = [GTMHTTPFetcher snipSubstringOfString:orig + betweenStartString:@"abcd" + endString:@"xyz"]; + STAssertEqualObjects(result, expected, @"simple snip to end failure"); + + // start string not found, so nothing should be snipped + orig = @"abcdefg"; + expected = orig; + result = [GTMHTTPFetcher snipSubstringOfString:orig + betweenStartString:@"jkl" + endString:@"mno"]; + STAssertEqualObjects(result, expected, @"simple snip to end failure"); + + // nothing between start and end + orig = @"abcdefg"; + expected = @"abcd_snip_efg"; + result = [GTMHTTPFetcher snipSubstringOfString:orig + betweenStartString:@"abcd" + endString:@"efg"]; + STAssertEqualObjects(result, expected, @"snip of empty string failure"); + + // snip like in OAuth + orig = @"OAuth oauth_consumer_key=\"example.net\", " + "oauth_token=\"1%2FpXi_-mBSegSbB-m9HprlwlxF6NF7IL7_9PDZok\", " + "oauth_signature=\"blP%2BG72aSQ2XadLLTk%2BNzUV6Wes%3D\""; + expected = @"OAuth oauth_consumer_key=\"example.net\", " + "oauth_token=\"_snip_\", " + "oauth_signature=\"blP%2BG72aSQ2XadLLTk%2BNzUV6Wes%3D\""; + result = [GTMHTTPFetcher snipSubstringOfString:orig + betweenStartString:@"oauth_token=\"" + endString:@"\""]; + STAssertEqualObjects(result, expected, @"realistic snip failure"); +} +#endif + +- (void)testGTMCleanedUserAgentString { + NSString *result = GTMCleanedUserAgentString(nil); + NSString *expected = nil; + STAssertEqualObjects(result, expected, nil); + + result = GTMCleanedUserAgentString(@""); + expected = @""; + STAssertEqualObjects(result, expected, nil); + + result = GTMCleanedUserAgentString(@"frog in tree/[1.2.3]"); + expected = @"frog_in_tree1.2.3"; + STAssertEqualObjects(result, expected, nil); + + result = GTMCleanedUserAgentString(@"\\iPod ({Touch])\n\r"); + expected = @"iPod_Touch"; + STAssertEqualObjects(result, expected, nil); +} + +- (void)testGTMSystemVersionString { +#if TARGET_OS_MAC && !TARGET_OS_IPHONE + NSString *result = GTMSystemVersionString(); + STAssertTrue([result hasPrefix:@"MacOSX/"], nil); +#else + STAssertTrue(NO, @"Add system version string test for this configuration"); +#endif +} + +- (void)testGTMApplicationIdentifier { + NSBundle *bundle = [NSBundle bundleForClass:[self class]]; + NSString *result = GTMApplicationIdentifier(bundle); + STAssertEqualObjects(result, @"com.yourcompany.UnitTests/1.0", nil); +} +@end diff --git a/GTL/Source/HTTPFetcher/Tests/GTMHTTPServer.h b/GTL/Source/HTTPFetcher/Tests/GTMHTTPServer.h new file mode 100644 index 0000000..f865a43 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/GTMHTTPServer.h @@ -0,0 +1,145 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMHTTPServer.h +// +// This is a *very* *simple* webserver that can be built into something, it is +// not meant to stand up a site, it sends all requests to its delegate for +// processing on the main thread. It does not support pipelining, etc. It's +// great for places where you need a simple webserver to unittest some code +// that hits a server. +// +// NOTE: there are several TODOs left in here as markers for things that could +// be done if one wanted to add more to this class. +// +// Based a little on HTTPServer, part of the CocoaHTTPServer sample code +// http://developer.apple.com/samplecode/CocoaHTTPServer/index.html +// + +#import + +#if GTM_IPHONE_SDK + #import +#endif // GTM_IPHONE_SDK + +// Global contants needed for errors from start + +#undef _EXTERN +#undef _INITIALIZE_AS +#ifdef GTMHTTPSERVER_DEFINE_GLOBALS + #define _EXTERN + #define _INITIALIZE_AS(x) =x +#else + #define _EXTERN extern + #define _INITIALIZE_AS(x) +#endif + +_EXTERN NSString* const kGTMHTTPServerErrorDomain _INITIALIZE_AS(@"com.google.mactoolbox.HTTPServerDomain"); +enum { + kGTMHTTPServerSocketCreateFailedError = -100, + kGTMHTTPServerBindFailedError = -101, + kGTMHTTPServerListenFailedError = -102, + kGTMHTTPServerHandleCreateFailedError = -103, +}; + +@class GTMHTTPRequestMessage, GTMHTTPResponseMessage; + +// ---------------------------------------------------------------------------- + +// See comment at top of file for the intened use of this class. +@interface GTMHTTPServer : NSObject { + @private + id delegate_; // WEAK + uint16_t port_; + BOOL reusePort_; + BOOL localhostOnly_; + NSFileHandle *listenHandle_; + NSMutableArray *connections_; +} + +// The delegate must support the httpServer:handleRequest: method in +// NSObject(GTMHTTPServerDelegateMethods) below. +- (id)initWithDelegate:(id)delegate; + +- (id)delegate; + +// Passing port zero will let one get assigned. +- (uint16_t)port; +- (void)setPort:(uint16_t)port; + +// Controls listening socket behavior: SO_REUSEADDR vs SO_REUSEPORT. +// The default is NO (SO_REUSEADDR) +- (BOOL)reusePort; +- (void)setReusePort:(BOOL)reusePort; + +// Receive connections on the localHost loopback address only or on all +// interfaces for this machine. The default is to only listen on localhost. +- (BOOL)localhostOnly; +- (void)setLocalhostOnly:(BOOL)yesno; + +// Start/Stop the web server. If there is an error starting up the server, |NO| +// is returned, and the specific startup failure can be returned in |error| (see +// above for the error domain and error codes). If the server is started, |YES| +// is returned and the server's delegate is called for any requests that come +// in. +- (BOOL)start:(NSError **)error; +- (void)stop; + +// returns the number of requests currently active in the server (i.e.-being +// read in, sent replies). +- (NSUInteger)activeRequestCount; + +@end + +@interface NSObject (GTMHTTPServerDelegateMethods) +- (GTMHTTPResponseMessage *)httpServer:(GTMHTTPServer *)server + handleRequest:(GTMHTTPRequestMessage *)request; +@end + +// ---------------------------------------------------------------------------- + +// Encapsulates an http request, one of these is sent to the server's delegate +// for each request. +@interface GTMHTTPRequestMessage : NSObject { + @private + CFHTTPMessageRef message_; +} +- (NSString *)version; +- (NSURL *)URL; +- (NSString *)method; +- (NSData *)body; +- (NSDictionary *)allHeaderFieldValues; +@end + +// ---------------------------------------------------------------------------- + +// Encapsulates an http response, the server's delegate should return one for +// each request received. +@interface GTMHTTPResponseMessage : NSObject { + @private + CFHTTPMessageRef message_; +} ++ (id)responseWithString:(NSString *)plainText; ++ (id)responseWithHTMLString:(NSString *)htmlString; ++ (id)responseWithBody:(NSData *)body + contentType:(NSString *)contentType + statusCode:(int)statusCode; ++ (id)emptyResponseWithCode:(int)statusCode; +// TODO: class method for redirections? +// TODO: add helper for expire/no-cache +- (void)setValue:(NSString*)value forHeaderField:(NSString*)headerField; +- (void)setHeaderValuesFromDictionary:(NSDictionary *)dict; +@end diff --git a/GTL/Source/HTTPFetcher/Tests/GTMHTTPServer.m b/GTL/Source/HTTPFetcher/Tests/GTMHTTPServer.m new file mode 100644 index 0000000..eedd332 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/GTMHTTPServer.m @@ -0,0 +1,630 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// Based a little on HTTPServer, part of the CocoaHTTPServer sample code +// http://developer.apple.com/samplecode/CocoaHTTPServer/index.html +// + +#import +#import +#import + +#define GTMHTTPSERVER_DEFINE_GLOBALS +#import "GTMHTTPServer.h" + +// avoid some of GTM's promiscuous dependencies +#ifndef _GTMDevLog +#define _GTMDevLog NSLog +#endif +#define GTM_STATIC_CAST(type, object) ((type *) (object)) +#define GTMCFAutorelease(x) [NSMakeCollectable(x) autorelease] + +@interface GTMHTTPServer (PrivateMethods) +- (void)acceptedConnectionNotification:(NSNotification *)notification; +- (NSMutableDictionary *)connectionWithFileHandle:(NSFileHandle *)fileHandle; +- (void)dataAvailableNotification:(NSNotification *)notification; +- (NSMutableDictionary *)lookupConnection:(NSFileHandle *)fileHandle; +- (void)closeConnection:(NSMutableDictionary *)connDict; +- (void)sendResponseOnNewThread:(NSMutableDictionary *)connDict; +- (void)sentResponse:(NSMutableDictionary *)connDict; +@end + +// keys for our connection dictionaries +static NSString *kFileHandle = @"FileHandle"; +static NSString *kRequest = @"Request"; +static NSString *kResponse = @"Response"; + +@interface GTMHTTPRequestMessage (PrivateHelpers) +- (BOOL)isHeaderComplete; +- (BOOL)appendData:(NSData *)data; +- (NSString *)headerFieldValueForKey:(NSString *)key; +- (UInt32)contentLength; +- (void)setBody:(NSData *)body; +@end + +@interface GTMHTTPResponseMessage (PrivateMethods) +- (id)initWithBody:(NSData *)body + contentType:(NSString *)contentType + statusCode:(int)statusCode; +- (NSData*)serializedData; +@end + +@implementation GTMHTTPServer + +- (id)init { + return [self initWithDelegate:nil]; +} + +- (id)initWithDelegate:(id)delegate { + self = [super init]; + if (self) { + if (!delegate) { + _GTMDevLog(@"missing delegate"); + [self release]; + return nil; + } + delegate_ = delegate; + +#ifndef NS_BLOCK_ASSERTIONS + BOOL isDelegateOK = [delegate_ respondsToSelector:@selector(httpServer:handleRequest:)]; + NSAssert(isDelegateOK, @"GTMHTTPServer delegate lacks handleRequest sel"); +#endif + + localhostOnly_ = YES; + connections_ = [[NSMutableArray alloc] init]; + } + return self; +} + +- (void)dealloc { + [self stop]; + [connections_ release]; + [super dealloc]; +} + +#if !TARGET_OS_IPHONE +- (void)finalize { + [self stop]; + [super finalize]; +} +#endif + +- (id)delegate { + return delegate_; +} + +- (uint16_t)port { + return port_; +} + +- (void)setPort:(uint16_t)port { + port_ = port; +} + +- (BOOL)reusePort { + return reusePort_; +} + +- (void)setReusePort:(BOOL)yesno { + reusePort_ = yesno; +} + +- (BOOL)localhostOnly { + return localhostOnly_; +} + +- (void)setLocalhostOnly:(BOOL)yesno { + localhostOnly_ = yesno; +} + +- (BOOL)start:(NSError **)error { + NSAssert(listenHandle_ == nil, + @"start called when we already have a listenHandle_"); + + if (error) *error = NULL; + + NSInteger startFailureCode = 0; + int fd = socket(AF_INET, SOCK_STREAM, 0); + if (fd <= 0) { + // COV_NF_START - we'd need to use up *all* sockets to test this? + startFailureCode = kGTMHTTPServerSocketCreateFailedError; + goto startFailed; + // COV_NF_END + } + + // enable address reuse quicker after we are done w/ our socket + int yes = 1; + int sock_opt = reusePort_ ? SO_REUSEPORT : SO_REUSEADDR; + if (setsockopt(fd, SOL_SOCKET, sock_opt, + (void *)&yes, (socklen_t)sizeof(yes)) != 0) { + _GTMDevLog(@"failed to mark the socket as reusable"); // COV_NF_LINE + } + + // bind + struct sockaddr_in addr; + bzero(&addr, sizeof(addr)); + addr.sin_len = sizeof(addr); + addr.sin_family = AF_INET; + addr.sin_port = htons(port_); + if (localhostOnly_) { + addr.sin_addr.s_addr = htonl(0x7F000001); + } else { + // COV_NF_START - testing this could cause a leopard firewall prompt during tests. + addr.sin_addr.s_addr = htonl(INADDR_ANY); + // COV_NF_END + } + if (bind(fd, (struct sockaddr*)(&addr), (socklen_t)sizeof(addr)) != 0) { + startFailureCode = kGTMHTTPServerBindFailedError; + goto startFailed; + } + + // collect the port back out + if (port_ == 0) { + socklen_t len = (socklen_t)sizeof(addr); + if (getsockname(fd, (struct sockaddr*)(&addr), &len) == 0) { + port_ = ntohs(addr.sin_port); + } + } + + // tell it to listen for connections + if (listen(fd, 5) != 0) { + // COV_NF_START + startFailureCode = kGTMHTTPServerListenFailedError; + goto startFailed; + // COV_NF_END + } + + // now use a filehandle to accept connections + listenHandle_ = + [[NSFileHandle alloc] initWithFileDescriptor:fd closeOnDealloc:YES]; + if (listenHandle_ == nil) { + // COV_NF_START - we'd need to run out of memory to test this? + startFailureCode = kGTMHTTPServerHandleCreateFailedError; + goto startFailed; + // COV_NF_END + } + + // setup notifications for connects + NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; + [center addObserver:self + selector:@selector(acceptedConnectionNotification:) + name:NSFileHandleConnectionAcceptedNotification + object:listenHandle_]; + [listenHandle_ acceptConnectionInBackgroundAndNotify]; + + // TODO: maybe hit the delegate incase it wants to register w/ NSNetService, + // or just know we're up and running? + + return YES; + +startFailed: + if (error) { + *error = [[[NSError alloc] initWithDomain:kGTMHTTPServerErrorDomain + code:startFailureCode + userInfo:nil] autorelease]; + } + if (fd > 0) { + close(fd); + } + return NO; +} + +- (void)stop { + if (listenHandle_) { + NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; + [center removeObserver:self + name:NSFileHandleConnectionAcceptedNotification + object:listenHandle_]; + [listenHandle_ release]; + listenHandle_ = nil; + // TODO: maybe hit the delegate in case it wants to unregister w/ + // NSNetService, or just know we've stopped running? + } + [connections_ removeAllObjects]; +} + +- (NSUInteger)activeRequestCount { + return [connections_ count]; +} + +- (NSString *)description { + NSString *result = + [NSString stringWithFormat:@"%@<%p>{ port=%d localHostOnly=%@ status=%@ }", + [self class], self, port_, (localhostOnly_ ? @"YES" : @"NO"), + (listenHandle_ != nil ? @"Started" : @"Stopped") ]; + return result; +} + + +@end + +@implementation GTMHTTPServer (PrivateMethods) + +- (void)acceptedConnectionNotification:(NSNotification *)notification { + NSDictionary *userInfo = [notification userInfo]; + NSFileHandle *newConnection = + [userInfo objectForKey:NSFileHandleNotificationFileHandleItem]; + NSAssert1(newConnection != nil, + @"failed to get the connection in the notification: %@", + notification); + + // make sure we accept more... + [listenHandle_ acceptConnectionInBackgroundAndNotify]; + + // TODO: could let the delegate look at the address, before we start working + // on it. + + NSMutableDictionary *connDict = + [self connectionWithFileHandle:newConnection]; + [connections_ addObject:connDict]; +} + +- (NSMutableDictionary *)connectionWithFileHandle:(NSFileHandle *)fileHandle { + NSMutableDictionary *result = [NSMutableDictionary dictionary]; + + [result setObject:fileHandle forKey:kFileHandle]; + + GTMHTTPRequestMessage *request = + [[[GTMHTTPRequestMessage alloc] init] autorelease]; + [result setObject:request forKey:kRequest]; + + // setup for data notifications + NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; + [center addObserver:self + selector:@selector(dataAvailableNotification:) + name:NSFileHandleReadCompletionNotification + object:fileHandle]; + [fileHandle readInBackgroundAndNotify]; + + return result; +} + +- (void)dataAvailableNotification:(NSNotification *)notification { + NSFileHandle *connectionHandle = GTM_STATIC_CAST(NSFileHandle, + [notification object]); + NSMutableDictionary *connDict = [self lookupConnection:connectionHandle]; + if (connDict == nil) return; // we are no longer tracking this one + + NSDictionary *userInfo = [notification userInfo]; + NSData *readData = [userInfo objectForKey:NSFileHandleNotificationDataItem]; + if ([readData length] == 0) { + // remote side closed + [self closeConnection:connDict]; + return; + } + + // Use a local pool to keep memory down incase the runloop we're in doesn't + // drain until it gets a UI event. + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + @try { + // Like Apple's sample, we just keep adding data until we get a full header + // and any referenced body. + + GTMHTTPRequestMessage *request = [connDict objectForKey:kRequest]; + [request appendData:readData]; + + // Is the header complete yet? + if (![request isHeaderComplete]) { + // more data... + [connectionHandle readInBackgroundAndNotify]; + } else { + + // Do we have all the body? + UInt32 contentLength = [request contentLength]; + NSData *body = [request body]; + NSUInteger bodyLength = [body length]; + if (contentLength > bodyLength) { + // need more data... + [connectionHandle readInBackgroundAndNotify]; + } else { + + if (contentLength < bodyLength) { + // We got extra (probably someone trying to pipeline on us), trim + // and let the extra data go... + NSData *newBody = [NSData dataWithBytes:[body bytes] + length:contentLength]; + [request setBody:newBody]; + _GTMDevLog(@"Got %lu extra bytes on http request, ignoring them", + (unsigned long)(bodyLength - contentLength)); + } + + GTMHTTPResponseMessage *response = nil; + @try { + // Off to the delegate + response = [delegate_ httpServer:self handleRequest:request]; + } @catch (NSException *e) { + _GTMDevLog(@"Exception trying to handle http request: %@", e); + } // COV_NF_LINE - radar 5851992 only reachable w/ an uncaught exception which isn't testable + + if (response) { + // We don't support connection reuse, so we add (force) the header to + // close every connection. + [response setValue:@"close" forHeaderField:@"Connection"]; + + // spawn thread to send reply (since we do a blocking send) + [connDict setObject:response forKey:kResponse]; + [NSThread detachNewThreadSelector:@selector(sendResponseOnNewThread:) + toTarget:self + withObject:connDict]; + } else { + // No response, shut it down + [self closeConnection:connDict]; + } + + } + } + } @catch (NSException *e) { // COV_NF_START + _GTMDevLog(@"exception while read data: %@", e); + // exception while dealing with the connection, close it + } // COV_NF_END + @finally { + [pool drain]; + } +} + +- (NSMutableDictionary *)lookupConnection:(NSFileHandle *)fileHandle { + NSMutableDictionary *result = nil; + for (NSMutableDictionary *connDict in connections_) { + if (fileHandle == [connDict objectForKey:kFileHandle]) { + result = connDict; + break; + } + } + return result; +} + +- (void)closeConnection:(NSMutableDictionary *)connDict { + // remove the notification + NSFileHandle *connectionHandle = [connDict objectForKey:kFileHandle]; + NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; + [center removeObserver:self + name:NSFileHandleReadCompletionNotification + object:connectionHandle]; + // in a non GC world, we're fine just letting the connect get closed when + // the object is release when it comes out of connections_, but in a GC world + // it won't get cleaned up + [connectionHandle closeFile]; + + // remove it from the list + [connections_ removeObject:connDict]; +} + +- (void)sendResponseOnNewThread:(NSMutableDictionary *)connDict { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + @try { + GTMHTTPResponseMessage *response = [connDict objectForKey:kResponse]; + NSFileHandle *connectionHandle = [connDict objectForKey:kFileHandle]; + NSData *serialized = [response serializedData]; + [connectionHandle writeData:serialized]; + } @catch (NSException *e) { // COV_NF_START - causing an exception here is to hard in a test + // TODO: let the delegate know about the exception (but do it on the main + // thread) + _GTMDevLog(@"exception while sending reply: %@", e); + } // COV_NF_END + + // back to the main thread to close things down + [self performSelectorOnMainThread:@selector(sentResponse:) + withObject:connDict + waitUntilDone:NO]; + + [pool release]; +} + +- (void)sentResponse:(NSMutableDictionary *)connDict { + // make sure we're still tracking this connection (in case server was stopped) + NSFileHandle *connection = [connDict objectForKey:kFileHandle]; + NSMutableDictionary *connDict2 = [self lookupConnection:connection]; + if (connDict != connDict2) return; + + // TODO: message the delegate that it was sent + + // close it down + [self closeConnection:connDict]; +} + +@end + +#pragma mark - + +@implementation GTMHTTPRequestMessage + +- (id)init { + self = [super init]; + if (self) { + message_ = CFHTTPMessageCreateEmpty(kCFAllocatorDefault, YES); + } + return self; +} + +- (void)dealloc { + if (message_) { + CFRelease(message_); + } + [super dealloc]; +} + +- (NSString *)version { + return GTMCFAutorelease(CFHTTPMessageCopyVersion(message_)); +} + +- (NSURL *)URL { + return GTMCFAutorelease(CFHTTPMessageCopyRequestURL(message_)); +} + +- (NSString *)method { + return GTMCFAutorelease(CFHTTPMessageCopyRequestMethod(message_)); +} + +- (NSData *)body { + return GTMCFAutorelease(CFHTTPMessageCopyBody(message_)); +} + +- (NSDictionary *)allHeaderFieldValues { + return GTMCFAutorelease(CFHTTPMessageCopyAllHeaderFields(message_)); +} + +- (NSString *)description { + CFStringRef desc = CFCopyDescription(message_); + NSString *result = + [NSString stringWithFormat:@"%@<%p>{ message=%@ }", [self class], self, desc]; + CFRelease(desc); + return result; +} + +@end + +@implementation GTMHTTPRequestMessage (PrivateHelpers) + +- (BOOL)isHeaderComplete { + return CFHTTPMessageIsHeaderComplete(message_) ? YES : NO; +} + +- (BOOL)appendData:(NSData *)data { + return CFHTTPMessageAppendBytes(message_, + [data bytes], (CFIndex)[data length]) ? YES : NO; +} + +- (NSString *)headerFieldValueForKey:(NSString *)key { + CFStringRef value = NULL; + if (key) { + value = CFHTTPMessageCopyHeaderFieldValue(message_, (CFStringRef)key); + } + return GTMCFAutorelease(value); +} + +- (UInt32)contentLength { + return (UInt32)[[self headerFieldValueForKey:@"Content-Length"] intValue]; +} + +- (void)setBody:(NSData *)body { + if (!body) { + body = [NSData data]; // COV_NF_LINE - can only happen in we fail to make the new data object + } + CFHTTPMessageSetBody(message_, (CFDataRef)body); +} + +@end + +#pragma mark - + +@implementation GTMHTTPResponseMessage + +- (id)init { + return [self initWithBody:nil contentType:nil statusCode:0]; +} + +- (void)dealloc { + if (message_) { + CFRelease(message_); + } + [super dealloc]; +} + ++ (id)responseWithString:(NSString *)plainText { + NSData *body = [plainText dataUsingEncoding:NSUTF8StringEncoding]; + return [self responseWithBody:body + contentType:@"text/plain; charset=UTF-8" + statusCode:200]; +} + ++ (id)responseWithHTMLString:(NSString *)htmlString { + return [self responseWithBody:[htmlString dataUsingEncoding:NSUTF8StringEncoding] + contentType:@"text/html; charset=UTF-8" + statusCode:200]; +} + ++ (id)responseWithBody:(NSData *)body + contentType:(NSString *)contentType + statusCode:(int)statusCode { + return [[[[self class] alloc] initWithBody:body + contentType:contentType + statusCode:statusCode] autorelease]; +} + ++ (id)emptyResponseWithCode:(int)statusCode { + return [[[[self class] alloc] initWithBody:nil + contentType:nil + statusCode:statusCode] autorelease]; +} + +- (void)setValue:(NSString*)value forHeaderField:(NSString*)headerField { + if ([headerField length] == 0) return; + if (value == nil) { + value = @""; + } + CFHTTPMessageSetHeaderFieldValue(message_, + (CFStringRef)headerField, (CFStringRef)value); +} + +- (void)setHeaderValuesFromDictionary:(NSDictionary *)dict { + for (id key in dict) { + id value = [dict valueForKey:key]; + [self setValue:value forHeaderField:key]; + } +} + +- (NSString *)description { + CFStringRef desc = CFCopyDescription(message_); + NSString *result = + [NSString stringWithFormat:@"%@<%p>{ message=%@ }", [self class], self, desc]; + CFRelease(desc); + return result; +} + +@end + +@implementation GTMHTTPResponseMessage (PrivateMethods) + +- (id)initWithBody:(NSData *)body + contentType:(NSString *)contentType + statusCode:(int)statusCode { + self = [super init]; + if (self) { + if ((statusCode < 100) || (statusCode > 599)) { + [self release]; + return nil; + } + message_ = CFHTTPMessageCreateResponse(kCFAllocatorDefault, + statusCode, NULL, + kCFHTTPVersion1_0); + if (!message_) { + // COV_NF_START + [self release]; + return nil; + // COV_NF_END + } + NSUInteger bodyLength = 0; + if (body) { + bodyLength = [body length]; + CFHTTPMessageSetBody(message_, (CFDataRef)body); + } + if ([contentType length] == 0) { + contentType = @"text/html"; + } + NSString *bodyLenStr = + [NSString stringWithFormat:@"%lu", (unsigned long)bodyLength]; + [self setValue:bodyLenStr forHeaderField:@"Content-Length"]; + [self setValue:contentType forHeaderField:@"Content-Type"]; + } + return self; +} + +- (NSData *)serializedData { + return GTMCFAutorelease(CFHTTPMessageCopySerializedMessage(message_)); +} + +@end diff --git a/GTL/Source/HTTPFetcher/Tests/GTMHTTPUploadFetcherTest.m b/GTL/Source/HTTPFetcher/Tests/GTMHTTPUploadFetcherTest.m new file mode 100644 index 0000000..0d4dfe7 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/GTMHTTPUploadFetcherTest.m @@ -0,0 +1,502 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMHTTPUploadFetcherTest.m +// + +#import + +#import "GTMHTTPUploadFetcher.h" +#import "GTMHTTPFetcherTestServer.h" + +@interface GTMHTTPUploadFetcherTest : SenTestCase { + GTMHTTPFetcherTestServer *testServer_; + BOOL isServerRunning_; + + GTMHTTPFetchHistory *fetchHistory_; + + GTMHTTPFetcher *fetcher_; + NSError *fetcherError_; + unsigned long long lastProgressDeliveredCount_; + unsigned long long lastProgressTotalCount_; +} +@end + + +@implementation GTMHTTPUploadFetcherTest + +static NSString *const kValidFileName = @"gettysburgaddress.txt"; + +- (NSURL *)localURLForFileName:(NSString *)name { + // return a localhost:port URL for the test file + NSString *str = [NSString stringWithFormat:@"http://localhost:%d/%@", + [testServer_ port], name]; + NSURL *url = [NSURL URLWithString:str]; + return url; +} + +- (NSString *)docPathForName:(NSString *)fileName { + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + STAssertNotNil(testBundle, nil); + + NSString *docPath = [testBundle pathForResource:fileName + ofType:nil]; + STAssertNotNil(docPath, nil); + return docPath; +} + +- (NSString *)docRootPath { + NSString *docRoot = [self docPathForName:kValidFileName]; + docRoot = [docRoot stringByDeletingLastPathComponent]; + return docRoot; +} + +- (void)setUp { + fetchHistory_ = [[GTMHTTPFetchHistory alloc] init]; + + NSString *docRoot = [self docRootPath]; + + testServer_ = [[GTMHTTPFetcherTestServer alloc] initWithDocRoot:docRoot]; + isServerRunning_ = (testServer_ != nil); + + STAssertTrue(isServerRunning_, + @">>> http test server failed to launch; skipping" + " fetcher tests\n"); +} + +- (void)tearDown { + [testServer_ release]; + testServer_ = nil; + + isServerRunning_ = NO; +} +/* +- (void)retryDelayStateChanged:(NSNotification *)note { + GDataHTTPFetcher *fetcher = [note object]; + GDataServiceTicketBase *ticket = [fetcher ticket]; + + STAssertNotNil(ticket, @"cannot get ticket from retry delay notification"); + + if ([[note name] isEqual:kGDataHTTPFetcherRetryDelayStartedNotification]) { + ++retryDelayStartedNotificationCount_; + } else { + ++retryDelayStoppedNotificationCount_; + } + + STAssertTrue(retryDelayStoppedNotificationCount_ <= retryDelayStartedNotificationCount_, + @"retry delay notification imbalance: starts=%d stops=%d", + retryDelayStartedNotificationCount_, + retryDelayStoppedNotificationCount_); +} +*/ +/* +- (void)resetFetchResponse { + +// [fetchedObject_ release]; +// fetchedObject_ = nil; + + [fetcherError_ release]; + fetcherError_ = nil; + + [ticket_ release]; + ticket_ = nil; + + retryCounter_ = 0; + + lastProgressDeliveredCount_ = 0; + lastProgressTotalCount_ = 0; + + // Set the UA to avoid log warnings during tests, except the first test, + // which will use an auto-generated user agent + if ([service_ userAgent] == nil) { + [service_ setUserAgent:@"GData-UnitTests-99.99"]; + } + + if (![service_ shouldCacheDatedData]) { + // we don't want to see 304s in our service response tests now, + // though the tests below will check for them in the underlying + // fetchers when we get a cached response + [service_ clearLastModifiedDates]; + } + + fetchStartedNotificationCount_ = 0; + fetchStoppedNotificationCount_ = 0; + parseStartedCount_ = 0; + parseStoppedCount_ = 0; + retryDelayStartedNotificationCount_ = 0; + retryDelayStoppedNotificationCount_ = 0; +} +*/ + +- (void)waitForFetch { + + int fetchCounter = gFetchCounter; + + // Give time for the fetch to happen, but give up if + // 10 seconds elapse with no response + NSDate* giveUpDate = [NSDate dateWithTimeIntervalSinceNow:10.0]; + + while ((!fetchedObject_ && !fetcherError_) + && [giveUpDate timeIntervalSinceNow] > 0) { + + NSDate *stopDate = [NSDate dateWithTimeIntervalSinceNow:0.001]; + [[NSRunLoop currentRunLoop] runUntilDate:stopDate]; + } + +} + + +#pragma mark Upload tests + +- (NSData *)generatedUploadDataWithLength:(NSUInteger)length { + // fill a data block with data + NSMutableData *data = [NSMutableData dataWithLength:length]; + + unsigned char *bytes = [data mutableBytes]; + for (NSUInteger idx = 0; idx < length; idx++) { + bytes[idx] = ((idx + 1) % 256); + } + + return data; +} + +static NSString* const kPauseAtKey = @"pauseAt"; +static NSString* const kRetryAtKey = @"retryAt"; +static NSString* const kOriginalURLKey = @"origURL"; + +- (void)testChunkedUpload { + + if (!isServerRunning_) return; + + NSData *bigData = [self generatedUploadDataWithLength:199000]; + //NSData *smallData = [self generatedUploadDataWithLength:13]; + + // write the big data into a temp file + NSString *tempDir = NSTemporaryDirectory(); + NSString *bigFileName = @"GDataServiceTest_BigFile"; + NSString *bigFilePath = [tempDir stringByAppendingPathComponent:bigFileName]; + [bigData writeToFile:bigFilePath atomically:NO]; + + NSFileHandle *bigFileHandle = [NSFileHandle fileHandleForReadingAtPath:bigFilePath]; + + // + // test a big upload using an NSFileHandle + // + + // with chunk size 75000, for a data block of 199000 bytes, we expect to send + // two 75000-byte chunks and then a 49000-byte final chunk + + + // a ".location" tells the server to return a "Location" header with the + // same path but an ".upload" suffix replacing the ".location" suffix + static NSString *const kValidFileLocation = @"gettysburgaddress.txt.location"; + + NSURL *docURL = [self localURLForFileName:kValidFileLocation]; + NSLog(@"docURL = %@", docURL); + STAssertNotNil(docURL, nil); + NSURLRequest *request = [NSURLRequest requestWithURL:docURL]; + NSLog(@"request = %@", request); + GTMHTTPUploadFetcher *fetcher = [GTMHTTPUploadFetcher uploadFetcherWithRequest:request + uploadFileHandle:bigFileHandle + uploadMIMEType:@"text/plain" + chunkSize:75000]; + NSLog(@"fetcher %@", fetcher); + BOOL isFetching = [fetcher beginFetchWithDelegate:self + didFinishSelector:@selector(uploadFetcher:finishedWithData:error:)]; + [self waitForFetch]; + + // set retry and progress + + // TODO... + /* + ticket_ = [service_ fetchEntryByInsertingEntry:newEntry + forFeedURL:uploadURL + delegate:self + didFinishSelector:@selector(ticket:finishedWithObject:error:)]; + [ticket_ retain]; + + [self waitForFetch]; + + STAssertNil(fetcherError_, @"fetcherError_=%@", fetcherError_); + + // check that we got back the expected entry + NSString *entryID = @"http://spreadsheets.google.com/feeds/cells/o04181601172097104111.497668944883620000/od6/private/full/R1C1"; + STAssertEqualObjects([(GDataEntrySpreadsheetCell *)fetchedObject_ identifier], + entryID, @"uploading %@", uploadURL); + + // check the request of the final object fetcher to be sure we were uploading + // chunks as expected + GDataHTTPUploadFetcher *uploadFetcher = (GDataHTTPUploadFetcher *) [ticket_ objectFetcher]; + GDataHTTPFetcher *fetcher = [uploadFetcher activeFetcher]; + NSURLRequest *request = [fetcher request]; + NSDictionary *reqHdrs = [request allHTTPHeaderFields]; + + NSString *uploadReqURLStr = @"http://localhost:54579/EntrySpreadsheetCellTest1.xml.upload"; + NSString *contentLength = [reqHdrs objectForKey:@"Content-Length"]; + NSString *contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertEqualObjects([[request URL] absoluteString], uploadReqURLStr, + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"49000", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 150000-198999/199000", @"range"); + + [self resetFetchResponse]; + + // + // repeat the previous upload, using NSData + // + [newEntry setUploadData:bigData]; + [newEntry setUploadFileHandle:nil]; + + ticket_ = [service_ fetchEntryByInsertingEntry:newEntry + forFeedURL:uploadURL + delegate:self + didFinishSelector:@selector(ticket:finishedWithObject:error:)]; + [ticket_ retain]; + + [self waitForFetch]; + + STAssertNil(fetcherError_, @"fetcherError_=%@", fetcherError_); + + // check that we got back the expected entry + entryID = @"http://spreadsheets.google.com/feeds/cells/o04181601172097104111.497668944883620000/od6/private/full/R1C1"; + STAssertEqualObjects([(GDataEntrySpreadsheetCell *)fetchedObject_ identifier], + entryID, @"uploading %@", uploadURL); + + // check the request of the final object fetcher to be sure we were uploading + // chunks as expected + uploadFetcher = (GDataHTTPUploadFetcher *) [ticket_ objectFetcher]; + fetcher = [uploadFetcher activeFetcher]; + request = [fetcher request]; + reqHdrs = [request allHTTPHeaderFields]; + + uploadReqURLStr = @"http://localhost:54579/EntrySpreadsheetCellTest1.xml.upload"; + contentLength = [reqHdrs objectForKey:@"Content-Length"]; + contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertEqualObjects([[request URL] absoluteString], uploadReqURLStr, + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"49000", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 150000-198999/199000", @"range"); + + [self resetFetchResponse]; + + // + // repeat the first upload, pausing after 20000 bytes + // + + ticket_ = [service_ fetchEntryByInsertingEntry:newEntry + forFeedURL:uploadURL + delegate:self + didFinishSelector:@selector(ticket:finishedWithObject:error:)]; + // add a property to the ticket that our progress callback will look for to + // know when to pause and resume the upload + [ticket_ setProperty:[NSNumber numberWithInt:20000] + forKey:kPauseAtKey]; + [ticket_ retain]; + [self waitForFetch]; + + STAssertEqualObjects([(GDataEntrySpreadsheetCell *)fetchedObject_ identifier], + entryID, @"uploading %@", uploadURL); + + uploadFetcher = (GDataHTTPUploadFetcher *) [ticket_ objectFetcher]; + fetcher = [uploadFetcher activeFetcher]; + request = [fetcher request]; + reqHdrs = [request allHTTPHeaderFields]; + + contentLength = [reqHdrs objectForKey:@"Content-Length"]; + contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertEqualObjects([[request URL] absoluteString], uploadReqURLStr, + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"24499", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 174501-198999/199000", @"range"); + + [self resetFetchResponse]; + + // + // repeat the first upload, and after sending 70000 bytes the progress + // callback will change the request URL for the next chunk fetch to make + // it fail with a retryable status error + // + + ticket_ = [service_ fetchEntryByInsertingEntry:newEntry + forFeedURL:uploadURL + delegate:self + didFinishSelector:@selector(ticket:finishedWithObject:error:)]; + // add a property to the ticket that our progress callback will use to + // force a retry after 70000 bytes are uploaded + [ticket_ setProperty:[NSNumber numberWithInt:70000] + forKey:kRetryAtKey]; + [ticket_ retain]; + [self waitForFetch]; + + STAssertEqualObjects([(GDataEntrySpreadsheetCell *)fetchedObject_ identifier], + entryID, @"uploading %@", uploadURL); + + uploadFetcher = (GDataHTTPUploadFetcher *) [ticket_ objectFetcher]; + fetcher = [uploadFetcher activeFetcher]; + request = [fetcher request]; + reqHdrs = [request allHTTPHeaderFields]; + + contentLength = [reqHdrs objectForKey:@"Content-Length"]; + contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertEqualObjects([[request URL] absoluteString], uploadReqURLStr, + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"24499", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 174501-198999/199000", @"range"); + + [self resetFetchResponse]; + + // + // repeat the first upload, but uploading data only, without the entry XML + // + + [newEntry setShouldUploadDataOnly:YES]; + [newEntry setUploadSlug:@"filename slug.txt"]; + + ticket_ = [service_ fetchEntryByInsertingEntry:newEntry + forFeedURL:uploadURL + delegate:self + didFinishSelector:@selector(ticket:finishedWithObject:error:)]; + [ticket_ retain]; + + [self waitForFetch]; + + STAssertEqualObjects([(GDataEntrySpreadsheetCell *)fetchedObject_ identifier], + entryID, @"uploading %@", uploadURL); + + uploadFetcher = (GDataHTTPUploadFetcher *) [ticket_ objectFetcher]; + fetcher = [uploadFetcher activeFetcher]; + request = [fetcher request]; + reqHdrs = [request allHTTPHeaderFields]; + + contentLength = [reqHdrs objectForKey:@"Content-Length"]; + contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertEqualObjects([[request URL] absoluteString], uploadReqURLStr, + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"49000", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 150000-198999/199000", @"range"); + + [self resetFetchResponse]; + + // + // upload a small data block + // + + [newEntry setUploadData:smallData]; + [newEntry setShouldUploadDataOnly:NO]; + + ticket_ = [service_ fetchEntryByInsertingEntry:newEntry + forFeedURL:uploadURL + delegate:self + didFinishSelector:@selector(ticket:finishedWithObject:error:)]; + [ticket_ retain]; + + [self waitForFetch]; + + STAssertNil(fetcherError_, @"fetcherError_=%@", fetcherError_); + + // check that we got back the expected entry + STAssertEqualObjects([(GDataEntrySpreadsheetCell *)fetchedObject_ identifier], + entryID, @"uploading %@", uploadURL); + + // check the request of the final (and only) object fetcher to be sure we + // were uploading chunks as expected + uploadFetcher = (GDataHTTPUploadFetcher *) [ticket_ objectFetcher]; + fetcher = [uploadFetcher activeFetcher]; + request = [fetcher request]; + reqHdrs = [request allHTTPHeaderFields]; + + contentLength = [reqHdrs objectForKey:@"Content-Length"]; + contentRange = [reqHdrs objectForKey:@"Content-Range"]; + + STAssertEqualObjects([[request URL] absoluteString], uploadReqURLStr, + @"upload request wrong"); + STAssertEqualObjects(contentLength, @"13", @"content length"); + STAssertEqualObjects(contentRange, @"bytes 0-12/13", @"range"); + + [self resetFetchResponse]; + + [service_ setServiceUploadChunkSize:0]; + [service_ setServiceUploadProgressSelector:NULL]; + [service_ setServiceRetrySelector:NULL]; + + [[NSFileManager defaultManager] removeItemAtPath:bigFilePath error:NULL]; + */ +} +/* +- (void)uploadTicket:(GDataServiceTicket *)ticket +hasDeliveredByteCount:(unsigned long long)numberOfBytesRead + ofTotalByteCount:(unsigned long long)dataLength { + + lastProgressDeliveredCount_ = numberOfBytesRead; + lastProgressTotalCount_ = dataLength; + + NSNumber *pauseAtNum = [ticket propertyForKey:kPauseAtKey]; + if (pauseAtNum) { + int pauseAt = [pauseAtNum intValue]; + if (pauseAt < numberOfBytesRead) { + // we won't be paused again + [ticket setProperty:nil forKey:kPauseAtKey]; + + // we've reached the point where we should pause + // + // use perform selector to avoid pausing immediately, as that would nuke + // the chunk upload fetcher that is calling us back now + [ticket performSelector:@selector(pauseUpload) withObject:nil afterDelay:0.0]; + + [ticket performSelector:@selector(resumeUpload) withObject:nil afterDelay:1.0]; + } + } + + NSNumber *retryAtNum = [ticket propertyForKey:kRetryAtKey]; + if (retryAtNum) { + int retryAt = [retryAtNum intValue]; + if (retryAt < numberOfBytesRead) { + // we won't be retrying again + [ticket setProperty:nil forKey:kRetryAtKey]; + + // save the current locationURL before appending &status=503 + GDataHTTPUploadFetcher *uploadFetcher = (GDataHTTPUploadFetcher *) [ticket objectFetcher]; + NSURL *origURL = [uploadFetcher locationURL]; + [ticket setProperty:origURL forKey:kOriginalURLKey]; + + NSString *newURLStr = [[origURL absoluteString] stringByAppendingString:@"?status=503"]; + [uploadFetcher setLocationURL:[NSURL URLWithString:newURLStr]]; + } + } +} + +-(BOOL)uploadRetryTicket:(GDataServiceTicket *)ticket willRetry:(BOOL)suggestedWillRetry forError:(NSError *)error { + + // change this fetch's request (and future requests) to have the original URL, + // not the one with status=503 appended + NSURL *origURL = [ticket propertyForKey:kOriginalURLKey]; + GDataHTTPUploadFetcher *uploadFetcher = (GDataHTTPUploadFetcher *) [ticket objectFetcher]; + + [[[uploadFetcher activeFetcher] request] setURL:origURL]; + [uploadFetcher setLocationURL:origURL]; + + [ticket setProperty:nil forKey:kOriginalURLKey]; + + return suggestedWillRetry; // do the retry fetch; it should succeed now +} + */ +@end + diff --git a/GTL/Source/HTTPFetcher/Tests/GTMMIMEDocumentTest.m b/GTL/Source/HTTPFetcher/Tests/GTMMIMEDocumentTest.m new file mode 100644 index 0000000..1eb6ae2 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/GTMMIMEDocumentTest.m @@ -0,0 +1,240 @@ +/* Copyright (c) 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GTMMIMEDocument.h" + +// /Developer/Tools/otest LighthouseAPITest.octest + +@interface GTMMIMEDocumentTest : SenTestCase +@end + +@implementation GTMMIMEDocumentTest + +- (void)doReadTestForInputStream:(NSInputStream *)inputStream + expectedString:(NSString *)expectedResultString + testMethod:(SEL)callingMethod { + // this routine, called by the later test methods, + // reads the data from the input stream and verifies that it matches + // the expected string + + NSInteger expectedLength = [expectedResultString length]; + + // now read the document from the input stream + unsigned char buffer[9999]; + memset(buffer, 0, sizeof(buffer)); + + [inputStream open]; + NSInteger bytesRead = [inputStream read:buffer maxLength:sizeof(buffer)]; + [inputStream close]; + + NSString *readString = [NSString stringWithUTF8String:(const char * )buffer]; + + STAssertEqualObjects(readString, expectedResultString, @"bad read (%@)", + NSStringFromSelector(callingMethod)); + + STAssertEquals(bytesRead, expectedLength, @"bad read length (%@)", + NSStringFromSelector(callingMethod)); +} + + +- (void)testEmptyDoc { + + GTMMIMEDocument* doc = [GTMMIMEDocument MIMEDocument]; + + NSInputStream *stream = nil; + NSString *boundary = nil; + unsigned long long length = -1; + + // generate the boundary and the input stream + [doc generateInputStream:&stream + length:&length + boundary:&boundary]; + + STAssertEqualObjects(boundary, @"END_OF_PART", @"bad boundary"); + + NSString *expectedString = @"\r\n--END_OF_PART--\r\n"; + NSUInteger expectedLength = [expectedString length]; + + STAssertEquals((NSUInteger)length, expectedLength, + @"Reported document length should be expected length."); + + [self doReadTestForInputStream:stream + expectedString:expectedString + testMethod:_cmd]; +} + +- (void)testSinglePartDoc { + + GTMMIMEDocument* doc = [GTMMIMEDocument MIMEDocument]; + + NSMutableDictionary* h1 = [NSDictionary dictionaryWithObjectsAndKeys: + @"bar", @"hfoo", + @"baz", @"hfaz", + nil]; + NSData* b1 = [@"Hi mom" dataUsingEncoding:NSUTF8StringEncoding]; + [doc addPartWithHeaders:h1 body:b1]; + + // generate the boundary and the input stream + NSInputStream *stream = nil; + NSString *boundary = nil; + unsigned long long length = -1; + + [doc generateInputStream:&stream + length:&length + boundary:&boundary]; + + NSString* expectedResultString = [NSString stringWithFormat: + @"\r\n--%@\r\n" + "hfaz: baz\r\n" + "hfoo: bar\r\n" + "\r\n" // Newline after headers. + "Hi mom" + "\r\n--%@--\r\n", boundary, boundary]; + + STAssertEqualObjects(boundary, @"END_OF_PART", @"bad boundary"); + + NSUInteger expectedLength = [expectedResultString length]; + + STAssertEquals((NSUInteger)length, expectedLength, + @"Reported document length should be expected length."); + + // now read the document from the input stream + + [self doReadTestForInputStream:stream + expectedString:expectedResultString + testMethod:_cmd]; + +} + + +- (void)testMultiPartDoc { + GTMMIMEDocument* doc = [GTMMIMEDocument MIMEDocument]; + + NSMutableDictionary* h1 = [NSDictionary dictionaryWithObjectsAndKeys: + @"bar", @"hfoo", + @"baz", @"hfaz", + nil]; + NSData* b1 = [@"Hi mom" dataUsingEncoding:NSUTF8StringEncoding]; + + NSDictionary* h2 = [NSDictionary dictionary]; + NSData* b2 = [@"Hi dad" dataUsingEncoding:NSUTF8StringEncoding]; + + NSDictionary* h3 = [NSDictionary dictionaryWithObjectsAndKeys: + @"text/html", @"Content-Type", + @"angry", @"Content-Disposition", + nil]; + NSData* b3 = [@"Hi brother" dataUsingEncoding:NSUTF8StringEncoding]; + + [doc addPartWithHeaders:h1 body:b1]; + [doc addPartWithHeaders:h2 body:b2]; + [doc addPartWithHeaders:h3 body:b3]; + + // generate the boundary and the input stream + NSInputStream *stream = nil; + NSString *boundary = nil; + unsigned long long length = -1; + + [doc generateInputStream:&stream + length:&length + boundary:&boundary]; + + NSString* expectedResultString = [NSString stringWithFormat: + @"\r\n--%@\r\n" + "hfaz: baz\r\n" + "hfoo: bar\r\n" + "\r\n" // Newline after headers. + "Hi mom" + "\r\n--%@\r\n" + "\r\n" // No header here, but still need the newline. + "Hi dad" + "\r\n--%@\r\n" + "Content-Disposition: angry\r\n" + "Content-Type: text/html\r\n" + "\r\n" // Newline after headers. + "Hi brother" + "\r\n--%@--\r\n", + boundary, boundary, boundary, boundary]; + + // now read the document from the input stream + [self doReadTestForInputStream:stream + expectedString:expectedResultString + testMethod:_cmd]; +} + +- (void)testBoundaryConflict { + GTMMIMEDocument* doc = [GTMMIMEDocument MIMEDocument]; + + // we'll insert the text END_OF_PART_6b8b4567 which conflicts with + // both the normal boundary ("END_OF_PART") and the first alternate + // guess (given a random seed of 1, done below) + + NSMutableDictionary* h1 = [NSDictionary dictionaryWithObjectsAndKeys: + @"bar", @"hfoo", + @"baz", @"hfaz", + nil]; + NSData* b1 = [@"Hi mom END_OF_PART" dataUsingEncoding:NSUTF8StringEncoding]; + + NSDictionary* h2 = [NSDictionary dictionary]; + NSData* b2 = [@"Hi dad" dataUsingEncoding:NSUTF8StringEncoding]; + + NSDictionary* h3 = [NSDictionary dictionaryWithObjectsAndKeys: + @"text/html", @"Content-Type", + @"angry", @"Content-Disposition", + nil]; + NSData* b3 = [@"Hi brother END_OF_PART_6b8b4567" dataUsingEncoding:NSUTF8StringEncoding]; + + [doc addPartWithHeaders:h1 body:b1]; + [doc addPartWithHeaders:h2 body:b2]; + [doc addPartWithHeaders:h3 body:b3]; + + // generate the boundary and the input stream + NSInputStream *stream = nil; + NSString *boundary = nil; + unsigned long long length = -1; + + [doc seedRandomWith:1]; + [doc generateInputStream:&stream + length:&length + boundary:&boundary]; + + // the second alternate boundary, given the random seed + boundary = @"END_OF_PART_00000001"; + + NSString* expectedResultString = [NSString stringWithFormat: + @"\r\n--%@\r\n" + "hfaz: baz\r\n" + "hfoo: bar\r\n" + "\r\n" // Newline after headers. + "Hi mom END_OF_PART" // intentional conflict + "\r\n--%@\r\n" + "\r\n" // No header here, but still need the newline. + "Hi dad" + "\r\n--%@\r\n" + "Content-Disposition: angry\r\n" + "Content-Type: text/html\r\n" + "\r\n" // Newline after headers. + "Hi brother END_OF_PART_6b8b4567" // conflict with the first guess + "\r\n--%@--\r\n", + boundary, boundary, boundary, boundary]; + + // now read the document from the input stream + [self doReadTestForInputStream:stream + expectedString:expectedResultString + testMethod:_cmd]; +} + +@end diff --git a/GTL/Source/HTTPFetcher/Tests/GTMReadMonitorInputStreamTest.m b/GTL/Source/HTTPFetcher/Tests/GTMReadMonitorInputStreamTest.m new file mode 100644 index 0000000..82e7a33 --- /dev/null +++ b/GTL/Source/HTTPFetcher/Tests/GTMReadMonitorInputStreamTest.m @@ -0,0 +1,93 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMReadMonitorInputStreamTest.m +// + +#import + +#import "GTMReadMonitorInputStream.h" + +@interface GTMReadMonitorInputStreamTest : SenTestCase { + NSMutableData *monitoredData_; +} +@end + +@implementation GTMReadMonitorInputStreamTest + +- (void)setUp { + monitoredData_ = [[NSMutableData alloc] init]; +} + +- (void)tearDown { + [monitoredData_ release]; + monitoredData_ = nil; +} + +- (void)testGTMReadMonitorInputStream { + + // Make some data with lotsa bytes + NSMutableData *testData = [NSMutableData data]; + for (int idx = 0; idx < 100; idx++) { + const char *str = "abcdefghijklmnopqrstuvwxyz "; + [testData appendBytes:str length:strlen(str)]; + } + + // Make a stream for the data + NSInputStream *dataStream = [NSInputStream inputStreamWithData:testData]; + + // Make a monitor stream, with self as the delegate + GTMReadMonitorInputStream *monitorStream; + monitorStream = [GTMReadMonitorInputStream inputStreamWithStream:dataStream]; + SEL sel = @selector(inputStream:readIntoBuffer:length:); + + monitorStream.readDelegate = self; + monitorStream.readSelector = sel; + + // Now read random size chunks of data and append them to a mutable NSData + NSMutableData *readData = [NSMutableData data]; + + [monitorStream open]; + while ([monitorStream hasBytesAvailable]) { + + unsigned char buffer[101]; + NSUInteger numBytesToRead = (arc4random() % 100) + 1; + + NSInteger numRead = [monitorStream read:buffer maxLength:numBytesToRead]; + if (numRead == 0) break; + + // Append the read chunk to our buffer + [readData appendBytes:buffer length:numRead]; + } + [monitorStream close]; + + // Verify we read all the data + STAssertEqualObjects(readData, testData, + @"read data doesn't match stream data"); + + // Verify the callback saw the same data + STAssertEqualObjects(monitoredData_, testData, + @"callback progress doesn't match actual progress"); +} + + +- (void)inputStream:(GTMReadMonitorInputStream *)stream + readIntoBuffer:(uint8_t *)buffer + length:(NSUInteger)length { + [monitoredData_ appendBytes:buffer + length:length]; +} +@end diff --git a/GTL/Source/HTTPFetcher/UnitTests-Info.plist b/GTL/Source/HTTPFetcher/UnitTests-Info.plist new file mode 100644 index 0000000..c285a47 --- /dev/null +++ b/GTL/Source/HTTPFetcher/UnitTests-Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.yourcompany.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/GTL/Source/JSON/.svn/all-wcprops b/GTL/Source/JSON/.svn/all-wcprops new file mode 100644 index 0000000..1f80f0d --- /dev/null +++ b/GTL/Source/JSON/.svn/all-wcprops @@ -0,0 +1,71 @@ +K 25 +svn:wc:ra_dav:version-url +V 58 +/stig/json-framework.git/!svn/ver/1292/tags/v2.3.2/Classes +END +JSON.h +K 25 +svn:wc:ra_dav:version-url +V 65 +/stig/json-framework.git/!svn/ver/1292/tags/v2.3.2/Classes/JSON.h +END +SBJsonBase.h +K 25 +svn:wc:ra_dav:version-url +V 71 +/stig/json-framework.git/!svn/ver/1292/tags/v2.3.2/Classes/SBJsonBase.h +END +SBJsonParser.h +K 25 +svn:wc:ra_dav:version-url +V 73 +/stig/json-framework.git/!svn/ver/1292/tags/v2.3.2/Classes/SBJsonParser.h +END +SBJsonWriter.h +K 25 +svn:wc:ra_dav:version-url +V 73 +/stig/json-framework.git/!svn/ver/1292/tags/v2.3.2/Classes/SBJsonWriter.h +END +SBJsonBase.m +K 25 +svn:wc:ra_dav:version-url +V 71 +/stig/json-framework.git/!svn/ver/1292/tags/v2.3.2/Classes/SBJsonBase.m +END +SBJsonParser.m +K 25 +svn:wc:ra_dav:version-url +V 73 +/stig/json-framework.git/!svn/ver/1292/tags/v2.3.2/Classes/SBJsonParser.m +END +SBJsonWriter.m +K 25 +svn:wc:ra_dav:version-url +V 73 +/stig/json-framework.git/!svn/ver/1292/tags/v2.3.2/Classes/SBJsonWriter.m +END +NSObject+SBJSON.h +K 25 +svn:wc:ra_dav:version-url +V 76 +/stig/json-framework.git/!svn/ver/1292/tags/v2.3.2/Classes/NSObject+SBJSON.h +END +NSString+SBJSON.h +K 25 +svn:wc:ra_dav:version-url +V 76 +/stig/json-framework.git/!svn/ver/1292/tags/v2.3.2/Classes/NSString+SBJSON.h +END +NSObject+SBJSON.m +K 25 +svn:wc:ra_dav:version-url +V 76 +/stig/json-framework.git/!svn/ver/1292/tags/v2.3.2/Classes/NSObject+SBJSON.m +END +NSString+SBJSON.m +K 25 +svn:wc:ra_dav:version-url +V 76 +/stig/json-framework.git/!svn/ver/1292/tags/v2.3.2/Classes/NSString+SBJSON.m +END diff --git a/GTL/Source/JSON/.svn/entries b/GTL/Source/JSON/.svn/entries new file mode 100644 index 0000000..e6abd6b --- /dev/null +++ b/GTL/Source/JSON/.svn/entries @@ -0,0 +1,402 @@ +10 + +dir +1372 +https://github.com/stig/json-framework.git/tags/v2.3.2/Classes +https://github.com/stig/json-framework.git + + + +2011-01-10T22:08:12.000000Z +1292 +stig.brautaset + + + + + + + + + + + + + + +c149197c-92b2-435d-9462-ce57b7db7bff + +JSON.h +file + + + + +2012-12-09T08:42:49.000000Z +770572441872b9b20ebcacc873e88c36 +2011-01-10T22:08:12.000000Z +1292 +stig.brautaset + + + + + + + + + + + + + + + + + + + + + +2757 + +SBJsonBase.h +file + + + + +2012-12-09T08:42:49.000000Z +048b288f47c5a61c084536c82c81f9af +2011-01-10T22:08:12.000000Z +1292 +stig.brautaset + + + + + + + + + + + + + + + + + + + + + +2946 + +SBJsonParser.h +file + + + + +2012-12-09T08:42:49.000000Z +cfcea99e48fca644ff5e0d1c9aea6825 +2011-01-10T22:08:12.000000Z +1292 +stig.brautaset + + + + + + + + + + + + + + + + + + + + + +3215 + +SBJsonWriter.h +file + + + + +2012-12-09T08:42:49.000000Z +00f7293c6720339920462ea05ce8f19a +2011-01-10T22:08:12.000000Z +1292 +stig.brautaset + + + + + + + + + + + + + + + + + + + + + +4569 + +SBJsonBase.m +file + + + + +2012-12-09T08:42:49.000000Z +4885652fed0a995c1aff1cf47c15117c +2011-01-10T22:08:12.000000Z +1292 +stig.brautaset + + + + + + + + + + + + + + + + + + + + + +2753 + +SBJsonParser.m +file + + + + +2012-12-09T08:42:49.000000Z +7a18b0b07593f2d0f797e382b1465d8a +2011-01-10T22:08:12.000000Z +1292 +stig.brautaset + + + + + + + + + + + + + + + + + + + + + +15226 + +SBJsonWriter.m +file + + + + +2012-12-09T08:42:49.000000Z +82a502150d22fde391f454326d43be10 +2011-01-10T22:08:12.000000Z +1292 +stig.brautaset + + + + + + + + + + + + + + + + + + + + + +8301 + +NSObject+SBJSON.h +file + + + + +2012-12-09T08:42:49.000000Z +512b1831ad0c042fc72ce8e2376b6a2b +2011-01-10T22:08:12.000000Z +1292 +stig.brautaset + + + + + + + + + + + + + + + + + + + + + +2143 + +NSString+SBJSON.h +file + + + + +2012-12-09T08:42:49.000000Z +897656e4de7e915d2ed40b83f1b68ef7 +2011-01-10T22:08:12.000000Z +1292 +stig.brautaset + + + + + + + + + + + + + + + + + + + + + +2032 + +NSObject+SBJSON.m +file + + + + +2012-12-09T08:42:49.000000Z +a53b0accb78efe66f4c4c72176b21b61 +2011-01-10T22:08:12.000000Z +1292 +stig.brautaset + + + + + + + + + + + + + + + + + + + + + +1917 + +NSString+SBJSON.m +file + + + + +2012-12-09T08:42:49.000000Z +09f29f15b58d5af84e3b770d9dd8cbab +2011-01-10T22:08:12.000000Z +1292 +stig.brautaset + + + + + + + + + + + + + + + + + + + + + +1885 + diff --git a/GTL/Source/JSON/.svn/text-base/JSON.h.svn-base b/GTL/Source/JSON/.svn/text-base/JSON.h.svn-base new file mode 100644 index 0000000..db3c516 --- /dev/null +++ b/GTL/Source/JSON/.svn/text-base/JSON.h.svn-base @@ -0,0 +1,65 @@ +/* + Copyright (C) 2009-2010 Stig Brautaset. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the author nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + @mainpage A strict JSON parser and generator for Objective-C + + JSON (JavaScript Object Notation) is a lightweight data-interchange + format. This framework provides two apis for parsing and generating + JSON. One standard object-based and a higher level api consisting of + categories added to existing Objective-C classes. + + This framework does its best to be as strict as possible, both in what it accepts and what it generates. For example, it does not support trailing commas in arrays or objects. Nor does it support embedded comments, or anything else not in the JSON specification. This is considered a feature. + + @section Links + + @li Project home page. + @li Online version of the API documentation. + +*/ + + +// This setting of 1 is best if you copy the source into your project. +// The build transforms the 1 to a 0 when building the framework and static lib. + +#if 1 + +#import "SBJsonParser.h" +#import "SBJsonWriter.h" +#import "NSObject+SBJSON.h" +#import "NSString+SBJSON.h" + +#else + +#import +#import +#import +#import + +#endif diff --git a/GTL/Source/JSON/.svn/text-base/NSObject+SBJSON.h.svn-base b/GTL/Source/JSON/.svn/text-base/NSObject+SBJSON.h.svn-base new file mode 100644 index 0000000..8e9620e --- /dev/null +++ b/GTL/Source/JSON/.svn/text-base/NSObject+SBJSON.h.svn-base @@ -0,0 +1,53 @@ +/* + Copyright (C) 2009 Stig Brautaset. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the author nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import + + +/** + @brief Adds JSON generation to Foundation classes + + This is a category on NSObject that adds methods for returning JSON representations + of standard objects to the objects themselves. This means you can call the + -JSONRepresentation method on an NSArray object and it'll do what you want. + */ +@interface NSObject (NSObject_SBJSON) + +/** + @brief Returns a string containing the receiver encoded in JSON. + + This method is added as a category on NSObject but is only actually + supported for the following objects: + @li NSDictionary + @li NSArray + */ +- (NSString *)JSONRepresentation; + +@end + diff --git a/GTL/Source/JSON/.svn/text-base/NSObject+SBJSON.m.svn-base b/GTL/Source/JSON/.svn/text-base/NSObject+SBJSON.m.svn-base new file mode 100644 index 0000000..30570b5 --- /dev/null +++ b/GTL/Source/JSON/.svn/text-base/NSObject+SBJSON.m.svn-base @@ -0,0 +1,44 @@ +/* + Copyright (C) 2009 Stig Brautaset. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the author nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "NSObject+SBJSON.h" +#import "SBJsonWriter.h" + +@implementation NSObject (NSObject_SBJSON) + +- (NSString *)JSONRepresentation { + SBJsonWriter *jsonWriter = [SBJsonWriter new]; + NSString *json = [jsonWriter stringWithObject:self]; + if (!json) + NSLog(@"-JSONRepresentation failed. Error trace is: %@", [jsonWriter errorTrace]); + [jsonWriter release]; + return json; +} + +@end diff --git a/GTL/Source/JSON/.svn/text-base/NSString+SBJSON.h.svn-base b/GTL/Source/JSON/.svn/text-base/NSString+SBJSON.h.svn-base new file mode 100644 index 0000000..029aa30 --- /dev/null +++ b/GTL/Source/JSON/.svn/text-base/NSString+SBJSON.h.svn-base @@ -0,0 +1,48 @@ +/* + Copyright (C) 2009 Stig Brautaset. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the author nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import + +/** + @brief Adds JSON parsing methods to NSString + +This is a category on NSString that adds methods for parsing the target string. +*/ +@interface NSString (NSString_SBJSON) + +/** + @brief Returns the NSDictionary or NSArray represented by the current string's JSON representation. + + Returns the dictionary or array represented in the receiver, or nil on error. + + Returns the NSDictionary or NSArray represented by the current string's JSON representation. + */ +- (id)JSONValue; + +@end diff --git a/GTL/Source/JSON/.svn/text-base/NSString+SBJSON.m.svn-base b/GTL/Source/JSON/.svn/text-base/NSString+SBJSON.m.svn-base new file mode 100644 index 0000000..bb132e1 --- /dev/null +++ b/GTL/Source/JSON/.svn/text-base/NSString+SBJSON.m.svn-base @@ -0,0 +1,45 @@ +/* + Copyright (C) 2007-2009 Stig Brautaset. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the author nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "NSString+SBJSON.h" +#import "SBJsonParser.h" + +@implementation NSString (NSString_SBJSON) + +- (id)JSONValue +{ + SBJsonParser *jsonParser = [SBJsonParser new]; + id repr = [jsonParser objectWithString:self]; + if (!repr) + NSLog(@"-JSONValue failed. Error trace is: %@", [jsonParser errorTrace]); + [jsonParser release]; + return repr; +} + +@end diff --git a/GTL/Source/JSON/.svn/text-base/SBJsonBase.h.svn-base b/GTL/Source/JSON/.svn/text-base/SBJsonBase.h.svn-base new file mode 100644 index 0000000..7b10844 --- /dev/null +++ b/GTL/Source/JSON/.svn/text-base/SBJsonBase.h.svn-base @@ -0,0 +1,86 @@ +/* + Copyright (C) 2009 Stig Brautaset. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the author nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import + +extern NSString * SBJSONErrorDomain; + + +enum { + EUNSUPPORTED = 1, + EPARSENUM, + EPARSE, + EFRAGMENT, + ECTRL, + EUNICODE, + EDEPTH, + EESCAPE, + ETRAILCOMMA, + ETRAILGARBAGE, + EEOF, + EINPUT +}; + +/** + @brief Common base class for parsing & writing. + + This class contains the common error-handling code and option between the parser/writer. + */ +@interface SBJsonBase : NSObject { + NSMutableArray *errorTrace; + +@protected + NSUInteger depth, maxDepth; +} + +/** + @brief The maximum recursing depth. + + Defaults to 512. If the input is nested deeper than this the input will be deemed to be + malicious and the parser returns nil, signalling an error. ("Nested too deep".) You can + turn off this security feature by setting the maxDepth value to 0. + */ +@property NSUInteger maxDepth; + +/** + @brief Return an error trace, or nil if there was no errors. + + Note that this method returns the trace of the last method that failed. + You need to check the return value of the call you're making to figure out + if the call actually failed, before you know call this method. + */ + @property(copy,readonly) NSArray* errorTrace; + +/// @internal for use in subclasses to add errors to the stack trace +- (void)addErrorWithCode:(NSUInteger)code description:(NSString*)str; + +/// @internal for use in subclasess to clear the error before a new parsing attempt +- (void)clearErrorTrace; + +@end diff --git a/GTL/Source/JSON/.svn/text-base/SBJsonBase.m.svn-base b/GTL/Source/JSON/.svn/text-base/SBJsonBase.m.svn-base new file mode 100644 index 0000000..6684325 --- /dev/null +++ b/GTL/Source/JSON/.svn/text-base/SBJsonBase.m.svn-base @@ -0,0 +1,78 @@ +/* + Copyright (C) 2009 Stig Brautaset. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the author nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "SBJsonBase.h" +NSString * SBJSONErrorDomain = @"org.brautaset.JSON.ErrorDomain"; + + +@implementation SBJsonBase + +@synthesize errorTrace; +@synthesize maxDepth; + +- (id)init { + self = [super init]; + if (self) + self.maxDepth = 512; + return self; +} + +- (void)dealloc { + [errorTrace release]; + [super dealloc]; +} + +- (void)addErrorWithCode:(NSUInteger)code description:(NSString*)str { + NSDictionary *userInfo; + if (!errorTrace) { + errorTrace = [NSMutableArray new]; + userInfo = [NSDictionary dictionaryWithObject:str forKey:NSLocalizedDescriptionKey]; + + } else { + userInfo = [NSDictionary dictionaryWithObjectsAndKeys: + str, NSLocalizedDescriptionKey, + [errorTrace lastObject], NSUnderlyingErrorKey, + nil]; + } + + NSError *error = [NSError errorWithDomain:SBJSONErrorDomain code:code userInfo:userInfo]; + + [self willChangeValueForKey:@"errorTrace"]; + [errorTrace addObject:error]; + [self didChangeValueForKey:@"errorTrace"]; +} + +- (void)clearErrorTrace { + [self willChangeValueForKey:@"errorTrace"]; + [errorTrace release]; + errorTrace = nil; + [self didChangeValueForKey:@"errorTrace"]; +} + +@end diff --git a/GTL/Source/JSON/.svn/text-base/SBJsonParser.h.svn-base b/GTL/Source/JSON/.svn/text-base/SBJsonParser.h.svn-base new file mode 100644 index 0000000..feaccd8 --- /dev/null +++ b/GTL/Source/JSON/.svn/text-base/SBJsonParser.h.svn-base @@ -0,0 +1,86 @@ +/* + Copyright (C) 2009 Stig Brautaset. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the author nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import +#import "SBJsonBase.h" + +/** + @brief The JSON parser class. + + JSON is mapped to Objective-C types in the following way: + + @li Null -> NSNull + @li String -> NSMutableString + @li Array -> NSMutableArray + @li Object -> NSMutableDictionary + @li Boolean -> NSNumber (initialised with -initWithBool:) + @li Number -> (NSNumber | NSDecimalNumber) + + Since Objective-C doesn't have a dedicated class for boolean values, these turns into NSNumber + instances. These are initialised with the -initWithBool: method, and + round-trip back to JSON properly. (They won't silently suddenly become 0 or 1; they'll be + represented as 'true' and 'false' again.) + + As an optimisation short JSON integers turn into NSNumber instances, while complex ones turn into NSDecimalNumber instances. + We can thus avoid any loss of precision as JSON allows ridiculously large numbers. + + */ +@interface SBJsonParser : SBJsonBase { + +@private + const char *c; +} + +/** + @brief Return the object represented by the given string + + Returns the object represented by the passed-in string or nil on error. The returned object can be + a string, number, boolean, null, array or dictionary. + + @param repr the json string to parse + */ +- (id)objectWithString:(NSString *)repr; + +/** + @brief Return the object represented by the given string + + Returns the object represented by the passed-in string or nil on error. The returned object can be + a string, number, boolean, null, array or dictionary. + + @param jsonText the json string to parse + @param error pointer to an NSError object to populate on error + */ + +- (id)objectWithString:(NSString*)jsonText + error:(NSError**)error; + + +@end + + diff --git a/GTL/Source/JSON/.svn/text-base/SBJsonParser.m.svn-base b/GTL/Source/JSON/.svn/text-base/SBJsonParser.m.svn-base new file mode 100644 index 0000000..222ef70 --- /dev/null +++ b/GTL/Source/JSON/.svn/text-base/SBJsonParser.m.svn-base @@ -0,0 +1,516 @@ +/* + Copyright (C) 2009,2010 Stig Brautaset. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the author nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "SBJsonParser.h" + +@interface SBJsonParser () + +- (BOOL)scanValue:(NSObject **)o; + +- (BOOL)scanRestOfArray:(NSMutableArray **)o; +- (BOOL)scanRestOfDictionary:(NSMutableDictionary **)o; +- (BOOL)scanRestOfNull:(NSNull **)o; +- (BOOL)scanRestOfFalse:(NSNumber **)o; +- (BOOL)scanRestOfTrue:(NSNumber **)o; +- (BOOL)scanRestOfString:(NSMutableString **)o; + +// Cannot manage without looking at the first digit +- (BOOL)scanNumber:(NSNumber **)o; + +- (BOOL)scanHexQuad:(unichar *)x; +- (BOOL)scanUnicodeChar:(unichar *)x; + +- (BOOL)scanIsAtEnd; + +@end + +#define skipWhitespace(c) while (isspace(*c)) c++ +#define skipDigits(c) while (isdigit(*c)) c++ + + +@implementation SBJsonParser + +static char ctrl[0x22]; + + ++ (void)initialize { + ctrl[0] = '\"'; + ctrl[1] = '\\'; + for (int i = 1; i < 0x20; i++) + ctrl[i+1] = i; + ctrl[0x21] = 0; +} + +- (id)objectWithString:(NSString *)repr { + [self clearErrorTrace]; + + if (!repr) { + [self addErrorWithCode:EINPUT description:@"Input was 'nil'"]; + return nil; + } + + depth = 0; + c = [repr UTF8String]; + + id o; + if (![self scanValue:&o]) { + return nil; + } + + // We found some valid JSON. But did it also contain something else? + if (![self scanIsAtEnd]) { + [self addErrorWithCode:ETRAILGARBAGE description:@"Garbage after JSON"]; + return nil; + } + + NSAssert1(o, @"Should have a valid object from %@", repr); + + // Check that the object we've found is a valid JSON container. + if (![o isKindOfClass:[NSDictionary class]] && ![o isKindOfClass:[NSArray class]]) { + [self addErrorWithCode:EFRAGMENT description:@"Valid fragment, but not JSON"]; + return nil; + } + + return o; +} + +- (id)objectWithString:(NSString*)repr error:(NSError**)error { + id tmp = [self objectWithString:repr]; + if (tmp) + return tmp; + + if (error) + *error = [self.errorTrace lastObject]; + return nil; +} + + +/* + In contrast to the public methods, it is an error to omit the error parameter here. + */ +- (BOOL)scanValue:(NSObject **)o +{ + skipWhitespace(c); + + switch (*c++) { + case '{': + return [self scanRestOfDictionary:(NSMutableDictionary **)o]; + break; + case '[': + return [self scanRestOfArray:(NSMutableArray **)o]; + break; + case '"': + return [self scanRestOfString:(NSMutableString **)o]; + break; + case 'f': + return [self scanRestOfFalse:(NSNumber **)o]; + break; + case 't': + return [self scanRestOfTrue:(NSNumber **)o]; + break; + case 'n': + return [self scanRestOfNull:(NSNull **)o]; + break; + case '-': + case '0'...'9': + c--; // cannot verify number correctly without the first character + return [self scanNumber:(NSNumber **)o]; + break; + case '+': + [self addErrorWithCode:EPARSENUM description: @"Leading + disallowed in number"]; + return NO; + break; + case 0x0: + [self addErrorWithCode:EEOF description:@"Unexpected end of string"]; + return NO; + break; + default: + [self addErrorWithCode:EPARSE description: @"Unrecognised leading character"]; + return NO; + break; + } + + NSAssert(0, @"Should never get here"); + return NO; +} + +- (BOOL)scanRestOfTrue:(NSNumber **)o +{ + if (!strncmp(c, "rue", 3)) { + c += 3; + *o = [NSNumber numberWithBool:YES]; + return YES; + } + [self addErrorWithCode:EPARSE description:@"Expected 'true'"]; + return NO; +} + +- (BOOL)scanRestOfFalse:(NSNumber **)o +{ + if (!strncmp(c, "alse", 4)) { + c += 4; + *o = [NSNumber numberWithBool:NO]; + return YES; + } + [self addErrorWithCode:EPARSE description: @"Expected 'false'"]; + return NO; +} + +- (BOOL)scanRestOfNull:(NSNull **)o { + if (!strncmp(c, "ull", 3)) { + c += 3; + *o = [NSNull null]; + return YES; + } + [self addErrorWithCode:EPARSE description: @"Expected 'null'"]; + return NO; +} + +- (BOOL)scanRestOfArray:(NSMutableArray **)o { + if (maxDepth && ++depth > maxDepth) { + [self addErrorWithCode:EDEPTH description: @"Nested too deep"]; + return NO; + } + + *o = [NSMutableArray arrayWithCapacity:8]; + + for (; *c ;) { + id v; + + skipWhitespace(c); + if (*c == ']' && c++) { + depth--; + return YES; + } + + if (![self scanValue:&v]) { + [self addErrorWithCode:EPARSE description:@"Expected value while parsing array"]; + return NO; + } + + [*o addObject:v]; + + skipWhitespace(c); + if (*c == ',' && c++) { + skipWhitespace(c); + if (*c == ']') { + [self addErrorWithCode:ETRAILCOMMA description: @"Trailing comma disallowed in array"]; + return NO; + } + } + } + + [self addErrorWithCode:EEOF description: @"End of input while parsing array"]; + return NO; +} + +- (BOOL)scanRestOfDictionary:(NSMutableDictionary **)o +{ + if (maxDepth && ++depth > maxDepth) { + [self addErrorWithCode:EDEPTH description: @"Nested too deep"]; + return NO; + } + + *o = [NSMutableDictionary dictionaryWithCapacity:7]; + + for (; *c ;) { + id k, v; + + skipWhitespace(c); + if (*c == '}' && c++) { + depth--; + return YES; + } + + if (!(*c == '\"' && c++ && [self scanRestOfString:&k])) { + [self addErrorWithCode:EPARSE description: @"Object key string expected"]; + return NO; + } + + skipWhitespace(c); + if (*c != ':') { + [self addErrorWithCode:EPARSE description: @"Expected ':' separating key and value"]; + return NO; + } + + c++; + if (![self scanValue:&v]) { + NSString *string = [NSString stringWithFormat:@"Object value expected for key: %@", k]; + [self addErrorWithCode:EPARSE description: string]; + return NO; + } + + [*o setObject:v forKey:k]; + + skipWhitespace(c); + if (*c == ',' && c++) { + skipWhitespace(c); + if (*c == '}') { + [self addErrorWithCode:ETRAILCOMMA description: @"Trailing comma disallowed in object"]; + return NO; + } + } + } + + [self addErrorWithCode:EEOF description: @"End of input while parsing object"]; + return NO; +} + +- (BOOL)scanRestOfString:(NSMutableString **)o +{ + // if the string has no control characters in it, return it in one go, without any temporary allocations. + size_t len = strcspn(c, ctrl); + if (len && *(c + len) == '\"') + { + *o = [[[NSMutableString alloc] initWithBytes:(char*)c length:len encoding:NSUTF8StringEncoding] autorelease]; + c += len + 1; + return YES; + } + + *o = [NSMutableString stringWithCapacity:16]; + do { + // First see if there's a portion we can grab in one go. + // Doing this caused a massive speedup on the long string. + len = strcspn(c, ctrl); + if (len) { + // check for + id t = [[NSString alloc] initWithBytesNoCopy:(char*)c + length:len + encoding:NSUTF8StringEncoding + freeWhenDone:NO]; + if (t) { + [*o appendString:t]; + [t release]; + c += len; + } + } + + if (*c == '"') { + c++; + return YES; + + } else if (*c == '\\') { + unichar uc = *++c; + switch (uc) { + case '\\': + case '/': + case '"': + break; + + case 'b': uc = '\b'; break; + case 'n': uc = '\n'; break; + case 'r': uc = '\r'; break; + case 't': uc = '\t'; break; + case 'f': uc = '\f'; break; + + case 'u': + c++; + if (![self scanUnicodeChar:&uc]) { + [self addErrorWithCode:EUNICODE description: @"Broken unicode character"]; + return NO; + } + c--; // hack. + break; + default: + [self addErrorWithCode:EESCAPE description: [NSString stringWithFormat:@"Illegal escape sequence '0x%x'", uc]]; + return NO; + break; + } + CFStringAppendCharacters((CFMutableStringRef)*o, &uc, 1); + c++; + + } else if (*c < 0x20) { + [self addErrorWithCode:ECTRL description: [NSString stringWithFormat:@"Unescaped control character '0x%x'", *c]]; + return NO; + + } else { + NSLog(@"should not be able to get here"); + } + } while (*c); + + [self addErrorWithCode:EEOF description:@"Unexpected EOF while parsing string"]; + return NO; +} + +- (BOOL)scanUnicodeChar:(unichar *)x +{ + unichar hi, lo; + + if (![self scanHexQuad:&hi]) { + [self addErrorWithCode:EUNICODE description: @"Missing hex quad"]; + return NO; + } + + if (hi >= 0xd800) { // high surrogate char? + if (hi < 0xdc00) { // yes - expect a low char + + if (!(*c == '\\' && ++c && *c == 'u' && ++c && [self scanHexQuad:&lo])) { + [self addErrorWithCode:EUNICODE description: @"Missing low character in surrogate pair"]; + return NO; + } + + if (lo < 0xdc00 || lo >= 0xdfff) { + [self addErrorWithCode:EUNICODE description:@"Invalid low surrogate char"]; + return NO; + } + + hi = (hi - 0xd800) * 0x400 + (lo - 0xdc00) + 0x10000; + + } else if (hi < 0xe000) { + [self addErrorWithCode:EUNICODE description:@"Invalid high character in surrogate pair"]; + return NO; + } + } + + *x = hi; + return YES; +} + +- (BOOL)scanHexQuad:(unichar *)x +{ + *x = 0; + for (int i = 0; i < 4; i++) { + unichar uc = *c; + c++; + int d = (uc >= '0' && uc <= '9') + ? uc - '0' : (uc >= 'a' && uc <= 'f') + ? (uc - 'a' + 10) : (uc >= 'A' && uc <= 'F') + ? (uc - 'A' + 10) : -1; + if (d == -1) { + [self addErrorWithCode:EUNICODE description:@"Missing hex digit in quad"]; + return NO; + } + *x *= 16; + *x += d; + } + return YES; +} + +- (BOOL)scanNumber:(NSNumber **)o +{ + BOOL simple = YES; + + const char *ns = c; + + // The logic to test for validity of the number formatting is relicensed + // from JSON::XS with permission from its author Marc Lehmann. + // (Available at the CPAN: http://search.cpan.org/dist/JSON-XS/ .) + + if ('-' == *c) + c++; + + if ('0' == *c && c++) { + if (isdigit(*c)) { + [self addErrorWithCode:EPARSENUM description: @"Leading 0 disallowed in number"]; + return NO; + } + + } else if (!isdigit(*c) && c != ns) { + [self addErrorWithCode:EPARSENUM description: @"No digits after initial minus"]; + return NO; + + } else { + skipDigits(c); + } + + // Fractional part + if ('.' == *c && c++) { + simple = NO; + if (!isdigit(*c)) { + [self addErrorWithCode:EPARSENUM description: @"No digits after decimal point"]; + return NO; + } + skipDigits(c); + } + + // Exponential part + if ('e' == *c || 'E' == *c) { + simple = NO; + c++; + + if ('-' == *c || '+' == *c) + c++; + + if (!isdigit(*c)) { + [self addErrorWithCode:EPARSENUM description: @"No digits after exponent"]; + return NO; + } + skipDigits(c); + } + + // If we are only reading integers, don't go through the expense of creating an NSDecimal. + // This ends up being a very large perf win. + if (simple) { + BOOL negate = NO; + long long val = 0; + const char *d = ns; + + if (*d == '-') { + negate = YES; + d++; + } + + while (isdigit(*d)) { + val *= 10; + if (val < 0) + goto longlong_overflow; + val += *d - '0'; + if (val < 0) + goto longlong_overflow; + d++; + } + + *o = [NSNumber numberWithLongLong:negate ? -val : val]; + return YES; + + } else { + // jumped to by simple branch, if an overflow occured + longlong_overflow:; + + id str = [[NSString alloc] initWithBytesNoCopy:(char*)ns + length:c - ns + encoding:NSUTF8StringEncoding + freeWhenDone:NO]; + [str autorelease]; + if (str && (*o = [NSDecimalNumber decimalNumberWithString:str])) + return YES; + + [self addErrorWithCode:EPARSENUM description: @"Failed creating decimal instance"]; + return NO; + } +} + +- (BOOL)scanIsAtEnd +{ + skipWhitespace(c); + return !*c; +} + + +@end diff --git a/GTL/Source/JSON/.svn/text-base/SBJsonWriter.h.svn-base b/GTL/Source/JSON/.svn/text-base/SBJsonWriter.h.svn-base new file mode 100644 index 0000000..ae1a597 --- /dev/null +++ b/GTL/Source/JSON/.svn/text-base/SBJsonWriter.h.svn-base @@ -0,0 +1,127 @@ +/* + Copyright (C) 2009 Stig Brautaset. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the author nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import +#import "SBJsonBase.h" + +/** + @brief The JSON writer class. + + Objective-C types are mapped to JSON types in the following way: + + @li NSNull -> Null + @li NSString -> String + @li NSArray -> Array + @li NSDictionary -> Object + @li NSNumber (-initWithBool:) -> Boolean + @li NSNumber -> Number + + In JSON the keys of an object must be strings. NSDictionary keys need + not be, but attempting to convert an NSDictionary with non-string keys + into JSON will throw an exception. + + NSNumber instances created with the +initWithBool: method are + converted into the JSON boolean "true" and "false" values, and vice + versa. Any other NSNumber instances are converted to a JSON number the + way you would expect. + + */ +@interface SBJsonWriter : SBJsonBase { + +@private + BOOL sortKeys, humanReadable; +} + +/** + @brief Whether we are generating human-readable (multiline) JSON. + + Set whether or not to generate human-readable JSON. The default is NO, which produces + JSON without any whitespace. (Except inside strings.) If set to YES, generates human-readable + JSON with linebreaks after each array value and dictionary key/value pair, indented two + spaces per nesting level. + */ +@property BOOL humanReadable; + +/** + @brief Whether or not to sort the dictionary keys in the output. + + If this is set to YES, the dictionary keys in the JSON output will be in sorted order. + (This is useful if you need to compare two structures, for example.) The default is NO. + */ +@property BOOL sortKeys; + +/** + @brief Return JSON representation (or fragment) for the given object. + + Returns a string containing JSON representation of the passed in value, or nil on error. + If nil is returned and @p error is not NULL, @p *error can be interrogated to find the cause of the error. + + @param value any instance that can be represented as a JSON fragment + + */ +- (NSString*)stringWithObject:(id)value; + +/** + @brief Return JSON representation (or fragment) for the given object. + + Returns a string containing JSON representation of the passed in value, or nil on error. + If nil is returned and @p error is not NULL, @p *error can be interrogated to find the cause of the error. + + @param value any instance that can be represented as a JSON fragment + @param error pointer to object to be populated with NSError on failure + + */- (NSString*)stringWithObject:(id)value + error:(NSError**)error; + + +@end + +/** + @brief Allows generation of JSON for otherwise unsupported classes. + + If you have a custom class that you want to create a JSON representation for you can implement + this method in your class. It should return a representation of your object defined + in terms of objects that can be translated into JSON. For example, a Person + object might implement it like this: + + @code + - (id)proxyForJson { + return [NSDictionary dictionaryWithObjectsAndKeys: + name, @"name", + phone, @"phone", + email, @"email", + nil]; + } + @endcode + + */ +@interface NSObject (SBProxyForJson) +- (id)proxyForJson; +@end + diff --git a/GTL/Source/JSON/.svn/text-base/SBJsonWriter.m.svn-base b/GTL/Source/JSON/.svn/text-base/SBJsonWriter.m.svn-base new file mode 100644 index 0000000..83e8a20 --- /dev/null +++ b/GTL/Source/JSON/.svn/text-base/SBJsonWriter.m.svn-base @@ -0,0 +1,239 @@ +/* + Copyright (C) 2009 Stig Brautaset. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the author nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "SBJsonWriter.h" + +@interface SBJsonWriter () + +- (BOOL)appendValue:(id)fragment into:(NSMutableString*)json; +- (BOOL)appendArray:(NSArray*)fragment into:(NSMutableString*)json; +- (BOOL)appendDictionary:(NSDictionary*)fragment into:(NSMutableString*)json; +- (BOOL)appendString:(NSString*)fragment into:(NSMutableString*)json; + +- (NSString*)indent; + +@end + +@implementation SBJsonWriter + +@synthesize sortKeys; +@synthesize humanReadable; + +static NSMutableCharacterSet *kEscapeChars; + ++ (void)initialize { + kEscapeChars = [[NSMutableCharacterSet characterSetWithRange: NSMakeRange(0,32)] retain]; + [kEscapeChars addCharactersInString: @"\"\\"]; +} + +- (NSString*)stringWithObject:(id)value { + [self clearErrorTrace]; + + if ([value isKindOfClass:[NSDictionary class]] || [value isKindOfClass:[NSArray class]]) { + depth = 0; + NSMutableString *json = [NSMutableString stringWithCapacity:128]; + if ([self appendValue:value into:json]) + return json; + } + + if ([value respondsToSelector:@selector(proxyForJson)]) { + NSString *tmp = [self stringWithObject:[value proxyForJson]]; + if (tmp) + return tmp; + } + + [self addErrorWithCode:EFRAGMENT description:@"Not valid type for JSON"]; + return nil; +} + +- (NSString*)stringWithObject:(id)value error:(NSError**)error { + NSString *tmp = [self stringWithObject:value]; + if (tmp) + return tmp; + + if (error) + *error = [self.errorTrace lastObject]; + return nil; +} + +- (NSString*)indent { + return [@"\n" stringByPaddingToLength:1 + 2 * depth withString:@" " startingAtIndex:0]; +} + +- (BOOL)appendValue:(id)fragment into:(NSMutableString*)json { + if ([fragment isKindOfClass:[NSDictionary class]]) { + if (![self appendDictionary:fragment into:json]) + return NO; + + } else if ([fragment isKindOfClass:[NSArray class]]) { + if (![self appendArray:fragment into:json]) + return NO; + + } else if ([fragment isKindOfClass:[NSString class]]) { + if (![self appendString:fragment into:json]) + return NO; + + } else if ([fragment isKindOfClass:[NSNumber class]]) { + if ('c' == *[fragment objCType]) { + [json appendString:[fragment boolValue] ? @"true" : @"false"]; + } else if ([fragment isEqualToNumber:(NSNumber*)kCFNumberNaN]) { + [self addErrorWithCode:EUNSUPPORTED description:@"NaN is not a valid number in JSON"]; + return NO; + + } else if (isinf([fragment doubleValue])) { + [self addErrorWithCode:EUNSUPPORTED description:@"Infinity is not a valid number in JSON"]; + return NO; + + } else { + [json appendString:[fragment stringValue]]; + } + } else if ([fragment isKindOfClass:[NSNull class]]) { + [json appendString:@"null"]; + } else if ([fragment respondsToSelector:@selector(proxyForJson)]) { + [self appendValue:[fragment proxyForJson] into:json]; + + } else { + [self addErrorWithCode:EUNSUPPORTED description:[NSString stringWithFormat:@"JSON serialisation not supported for %@", [fragment class]]]; + return NO; + } + return YES; +} + +- (BOOL)appendArray:(NSArray*)fragment into:(NSMutableString*)json { + if (maxDepth && ++depth > maxDepth) { + [self addErrorWithCode:EDEPTH description: @"Nested too deep"]; + return NO; + } + [json appendString:@"["]; + + BOOL addComma = NO; + for (id value in fragment) { + if (addComma) + [json appendString:@","]; + else + addComma = YES; + + if ([self humanReadable]) + [json appendString:[self indent]]; + + if (![self appendValue:value into:json]) { + return NO; + } + } + + depth--; + if ([self humanReadable] && [fragment count]) + [json appendString:[self indent]]; + [json appendString:@"]"]; + return YES; +} + +- (BOOL)appendDictionary:(NSDictionary*)fragment into:(NSMutableString*)json { + if (maxDepth && ++depth > maxDepth) { + [self addErrorWithCode:EDEPTH description: @"Nested too deep"]; + return NO; + } + [json appendString:@"{"]; + + NSString *colon = [self humanReadable] ? @" : " : @":"; + BOOL addComma = NO; + NSArray *keys = [fragment allKeys]; + if (self.sortKeys) + keys = [keys sortedArrayUsingSelector:@selector(compare:)]; + + for (id value in keys) { + if (addComma) + [json appendString:@","]; + else + addComma = YES; + + if ([self humanReadable]) + [json appendString:[self indent]]; + + if (![value isKindOfClass:[NSString class]]) { + [self addErrorWithCode:EUNSUPPORTED description: @"JSON object key must be string"]; + return NO; + } + + if (![self appendString:value into:json]) + return NO; + + [json appendString:colon]; + if (![self appendValue:[fragment objectForKey:value] into:json]) { + [self addErrorWithCode:EUNSUPPORTED description:[NSString stringWithFormat:@"Unsupported value for key %@ in object", value]]; + return NO; + } + } + + depth--; + if ([self humanReadable] && [fragment count]) + [json appendString:[self indent]]; + [json appendString:@"}"]; + return YES; +} + +- (BOOL)appendString:(NSString*)fragment into:(NSMutableString*)json { + + [json appendString:@"\""]; + + NSRange esc = [fragment rangeOfCharacterFromSet:kEscapeChars]; + if ( !esc.length ) { + // No special chars -- can just add the raw string: + [json appendString:fragment]; + + } else { + NSUInteger length = [fragment length]; + for (NSUInteger i = 0; i < length; i++) { + unichar uc = [fragment characterAtIndex:i]; + switch (uc) { + case '"': [json appendString:@"\\\""]; break; + case '\\': [json appendString:@"\\\\"]; break; + case '\t': [json appendString:@"\\t"]; break; + case '\n': [json appendString:@"\\n"]; break; + case '\r': [json appendString:@"\\r"]; break; + case '\b': [json appendString:@"\\b"]; break; + case '\f': [json appendString:@"\\f"]; break; + default: + if (uc < 0x20) { + [json appendFormat:@"\\u%04x", uc]; + } else { + CFStringAppendCharacters((CFMutableStringRef)json, &uc, 1); + } + break; + + } + } + } + + [json appendString:@"\""]; + return YES; +} + + +@end diff --git a/GTL/Source/JSON/JSON.h b/GTL/Source/JSON/JSON.h new file mode 100644 index 0000000..db3c516 --- /dev/null +++ b/GTL/Source/JSON/JSON.h @@ -0,0 +1,65 @@ +/* + Copyright (C) 2009-2010 Stig Brautaset. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the author nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + @mainpage A strict JSON parser and generator for Objective-C + + JSON (JavaScript Object Notation) is a lightweight data-interchange + format. This framework provides two apis for parsing and generating + JSON. One standard object-based and a higher level api consisting of + categories added to existing Objective-C classes. + + This framework does its best to be as strict as possible, both in what it accepts and what it generates. For example, it does not support trailing commas in arrays or objects. Nor does it support embedded comments, or anything else not in the JSON specification. This is considered a feature. + + @section Links + + @li Project home page. + @li Online version of the API documentation. + +*/ + + +// This setting of 1 is best if you copy the source into your project. +// The build transforms the 1 to a 0 when building the framework and static lib. + +#if 1 + +#import "SBJsonParser.h" +#import "SBJsonWriter.h" +#import "NSObject+SBJSON.h" +#import "NSString+SBJSON.h" + +#else + +#import +#import +#import +#import + +#endif diff --git a/GTL/Source/JSON/NSObject+SBJSON.h b/GTL/Source/JSON/NSObject+SBJSON.h new file mode 100644 index 0000000..8e9620e --- /dev/null +++ b/GTL/Source/JSON/NSObject+SBJSON.h @@ -0,0 +1,53 @@ +/* + Copyright (C) 2009 Stig Brautaset. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the author nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import + + +/** + @brief Adds JSON generation to Foundation classes + + This is a category on NSObject that adds methods for returning JSON representations + of standard objects to the objects themselves. This means you can call the + -JSONRepresentation method on an NSArray object and it'll do what you want. + */ +@interface NSObject (NSObject_SBJSON) + +/** + @brief Returns a string containing the receiver encoded in JSON. + + This method is added as a category on NSObject but is only actually + supported for the following objects: + @li NSDictionary + @li NSArray + */ +- (NSString *)JSONRepresentation; + +@end + diff --git a/GTL/Source/JSON/NSObject+SBJSON.m b/GTL/Source/JSON/NSObject+SBJSON.m new file mode 100644 index 0000000..30570b5 --- /dev/null +++ b/GTL/Source/JSON/NSObject+SBJSON.m @@ -0,0 +1,44 @@ +/* + Copyright (C) 2009 Stig Brautaset. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the author nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "NSObject+SBJSON.h" +#import "SBJsonWriter.h" + +@implementation NSObject (NSObject_SBJSON) + +- (NSString *)JSONRepresentation { + SBJsonWriter *jsonWriter = [SBJsonWriter new]; + NSString *json = [jsonWriter stringWithObject:self]; + if (!json) + NSLog(@"-JSONRepresentation failed. Error trace is: %@", [jsonWriter errorTrace]); + [jsonWriter release]; + return json; +} + +@end diff --git a/GTL/Source/JSON/NSString+SBJSON.h b/GTL/Source/JSON/NSString+SBJSON.h new file mode 100644 index 0000000..029aa30 --- /dev/null +++ b/GTL/Source/JSON/NSString+SBJSON.h @@ -0,0 +1,48 @@ +/* + Copyright (C) 2009 Stig Brautaset. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the author nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import + +/** + @brief Adds JSON parsing methods to NSString + +This is a category on NSString that adds methods for parsing the target string. +*/ +@interface NSString (NSString_SBJSON) + +/** + @brief Returns the NSDictionary or NSArray represented by the current string's JSON representation. + + Returns the dictionary or array represented in the receiver, or nil on error. + + Returns the NSDictionary or NSArray represented by the current string's JSON representation. + */ +- (id)JSONValue; + +@end diff --git a/GTL/Source/JSON/NSString+SBJSON.m b/GTL/Source/JSON/NSString+SBJSON.m new file mode 100644 index 0000000..bb132e1 --- /dev/null +++ b/GTL/Source/JSON/NSString+SBJSON.m @@ -0,0 +1,45 @@ +/* + Copyright (C) 2007-2009 Stig Brautaset. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the author nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "NSString+SBJSON.h" +#import "SBJsonParser.h" + +@implementation NSString (NSString_SBJSON) + +- (id)JSONValue +{ + SBJsonParser *jsonParser = [SBJsonParser new]; + id repr = [jsonParser objectWithString:self]; + if (!repr) + NSLog(@"-JSONValue failed. Error trace is: %@", [jsonParser errorTrace]); + [jsonParser release]; + return repr; +} + +@end diff --git a/GTL/Source/JSON/SBJsonBase.h b/GTL/Source/JSON/SBJsonBase.h new file mode 100644 index 0000000..7b10844 --- /dev/null +++ b/GTL/Source/JSON/SBJsonBase.h @@ -0,0 +1,86 @@ +/* + Copyright (C) 2009 Stig Brautaset. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the author nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import + +extern NSString * SBJSONErrorDomain; + + +enum { + EUNSUPPORTED = 1, + EPARSENUM, + EPARSE, + EFRAGMENT, + ECTRL, + EUNICODE, + EDEPTH, + EESCAPE, + ETRAILCOMMA, + ETRAILGARBAGE, + EEOF, + EINPUT +}; + +/** + @brief Common base class for parsing & writing. + + This class contains the common error-handling code and option between the parser/writer. + */ +@interface SBJsonBase : NSObject { + NSMutableArray *errorTrace; + +@protected + NSUInteger depth, maxDepth; +} + +/** + @brief The maximum recursing depth. + + Defaults to 512. If the input is nested deeper than this the input will be deemed to be + malicious and the parser returns nil, signalling an error. ("Nested too deep".) You can + turn off this security feature by setting the maxDepth value to 0. + */ +@property NSUInteger maxDepth; + +/** + @brief Return an error trace, or nil if there was no errors. + + Note that this method returns the trace of the last method that failed. + You need to check the return value of the call you're making to figure out + if the call actually failed, before you know call this method. + */ + @property(copy,readonly) NSArray* errorTrace; + +/// @internal for use in subclasses to add errors to the stack trace +- (void)addErrorWithCode:(NSUInteger)code description:(NSString*)str; + +/// @internal for use in subclasess to clear the error before a new parsing attempt +- (void)clearErrorTrace; + +@end diff --git a/GTL/Source/JSON/SBJsonBase.m b/GTL/Source/JSON/SBJsonBase.m new file mode 100644 index 0000000..6684325 --- /dev/null +++ b/GTL/Source/JSON/SBJsonBase.m @@ -0,0 +1,78 @@ +/* + Copyright (C) 2009 Stig Brautaset. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the author nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "SBJsonBase.h" +NSString * SBJSONErrorDomain = @"org.brautaset.JSON.ErrorDomain"; + + +@implementation SBJsonBase + +@synthesize errorTrace; +@synthesize maxDepth; + +- (id)init { + self = [super init]; + if (self) + self.maxDepth = 512; + return self; +} + +- (void)dealloc { + [errorTrace release]; + [super dealloc]; +} + +- (void)addErrorWithCode:(NSUInteger)code description:(NSString*)str { + NSDictionary *userInfo; + if (!errorTrace) { + errorTrace = [NSMutableArray new]; + userInfo = [NSDictionary dictionaryWithObject:str forKey:NSLocalizedDescriptionKey]; + + } else { + userInfo = [NSDictionary dictionaryWithObjectsAndKeys: + str, NSLocalizedDescriptionKey, + [errorTrace lastObject], NSUnderlyingErrorKey, + nil]; + } + + NSError *error = [NSError errorWithDomain:SBJSONErrorDomain code:code userInfo:userInfo]; + + [self willChangeValueForKey:@"errorTrace"]; + [errorTrace addObject:error]; + [self didChangeValueForKey:@"errorTrace"]; +} + +- (void)clearErrorTrace { + [self willChangeValueForKey:@"errorTrace"]; + [errorTrace release]; + errorTrace = nil; + [self didChangeValueForKey:@"errorTrace"]; +} + +@end diff --git a/GTL/Source/JSON/SBJsonParser.h b/GTL/Source/JSON/SBJsonParser.h new file mode 100644 index 0000000..feaccd8 --- /dev/null +++ b/GTL/Source/JSON/SBJsonParser.h @@ -0,0 +1,86 @@ +/* + Copyright (C) 2009 Stig Brautaset. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the author nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import +#import "SBJsonBase.h" + +/** + @brief The JSON parser class. + + JSON is mapped to Objective-C types in the following way: + + @li Null -> NSNull + @li String -> NSMutableString + @li Array -> NSMutableArray + @li Object -> NSMutableDictionary + @li Boolean -> NSNumber (initialised with -initWithBool:) + @li Number -> (NSNumber | NSDecimalNumber) + + Since Objective-C doesn't have a dedicated class for boolean values, these turns into NSNumber + instances. These are initialised with the -initWithBool: method, and + round-trip back to JSON properly. (They won't silently suddenly become 0 or 1; they'll be + represented as 'true' and 'false' again.) + + As an optimisation short JSON integers turn into NSNumber instances, while complex ones turn into NSDecimalNumber instances. + We can thus avoid any loss of precision as JSON allows ridiculously large numbers. + + */ +@interface SBJsonParser : SBJsonBase { + +@private + const char *c; +} + +/** + @brief Return the object represented by the given string + + Returns the object represented by the passed-in string or nil on error. The returned object can be + a string, number, boolean, null, array or dictionary. + + @param repr the json string to parse + */ +- (id)objectWithString:(NSString *)repr; + +/** + @brief Return the object represented by the given string + + Returns the object represented by the passed-in string or nil on error. The returned object can be + a string, number, boolean, null, array or dictionary. + + @param jsonText the json string to parse + @param error pointer to an NSError object to populate on error + */ + +- (id)objectWithString:(NSString*)jsonText + error:(NSError**)error; + + +@end + + diff --git a/GTL/Source/JSON/SBJsonParser.m b/GTL/Source/JSON/SBJsonParser.m new file mode 100644 index 0000000..222ef70 --- /dev/null +++ b/GTL/Source/JSON/SBJsonParser.m @@ -0,0 +1,516 @@ +/* + Copyright (C) 2009,2010 Stig Brautaset. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the author nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "SBJsonParser.h" + +@interface SBJsonParser () + +- (BOOL)scanValue:(NSObject **)o; + +- (BOOL)scanRestOfArray:(NSMutableArray **)o; +- (BOOL)scanRestOfDictionary:(NSMutableDictionary **)o; +- (BOOL)scanRestOfNull:(NSNull **)o; +- (BOOL)scanRestOfFalse:(NSNumber **)o; +- (BOOL)scanRestOfTrue:(NSNumber **)o; +- (BOOL)scanRestOfString:(NSMutableString **)o; + +// Cannot manage without looking at the first digit +- (BOOL)scanNumber:(NSNumber **)o; + +- (BOOL)scanHexQuad:(unichar *)x; +- (BOOL)scanUnicodeChar:(unichar *)x; + +- (BOOL)scanIsAtEnd; + +@end + +#define skipWhitespace(c) while (isspace(*c)) c++ +#define skipDigits(c) while (isdigit(*c)) c++ + + +@implementation SBJsonParser + +static char ctrl[0x22]; + + ++ (void)initialize { + ctrl[0] = '\"'; + ctrl[1] = '\\'; + for (int i = 1; i < 0x20; i++) + ctrl[i+1] = i; + ctrl[0x21] = 0; +} + +- (id)objectWithString:(NSString *)repr { + [self clearErrorTrace]; + + if (!repr) { + [self addErrorWithCode:EINPUT description:@"Input was 'nil'"]; + return nil; + } + + depth = 0; + c = [repr UTF8String]; + + id o; + if (![self scanValue:&o]) { + return nil; + } + + // We found some valid JSON. But did it also contain something else? + if (![self scanIsAtEnd]) { + [self addErrorWithCode:ETRAILGARBAGE description:@"Garbage after JSON"]; + return nil; + } + + NSAssert1(o, @"Should have a valid object from %@", repr); + + // Check that the object we've found is a valid JSON container. + if (![o isKindOfClass:[NSDictionary class]] && ![o isKindOfClass:[NSArray class]]) { + [self addErrorWithCode:EFRAGMENT description:@"Valid fragment, but not JSON"]; + return nil; + } + + return o; +} + +- (id)objectWithString:(NSString*)repr error:(NSError**)error { + id tmp = [self objectWithString:repr]; + if (tmp) + return tmp; + + if (error) + *error = [self.errorTrace lastObject]; + return nil; +} + + +/* + In contrast to the public methods, it is an error to omit the error parameter here. + */ +- (BOOL)scanValue:(NSObject **)o +{ + skipWhitespace(c); + + switch (*c++) { + case '{': + return [self scanRestOfDictionary:(NSMutableDictionary **)o]; + break; + case '[': + return [self scanRestOfArray:(NSMutableArray **)o]; + break; + case '"': + return [self scanRestOfString:(NSMutableString **)o]; + break; + case 'f': + return [self scanRestOfFalse:(NSNumber **)o]; + break; + case 't': + return [self scanRestOfTrue:(NSNumber **)o]; + break; + case 'n': + return [self scanRestOfNull:(NSNull **)o]; + break; + case '-': + case '0'...'9': + c--; // cannot verify number correctly without the first character + return [self scanNumber:(NSNumber **)o]; + break; + case '+': + [self addErrorWithCode:EPARSENUM description: @"Leading + disallowed in number"]; + return NO; + break; + case 0x0: + [self addErrorWithCode:EEOF description:@"Unexpected end of string"]; + return NO; + break; + default: + [self addErrorWithCode:EPARSE description: @"Unrecognised leading character"]; + return NO; + break; + } + + NSAssert(0, @"Should never get here"); + return NO; +} + +- (BOOL)scanRestOfTrue:(NSNumber **)o +{ + if (!strncmp(c, "rue", 3)) { + c += 3; + *o = [NSNumber numberWithBool:YES]; + return YES; + } + [self addErrorWithCode:EPARSE description:@"Expected 'true'"]; + return NO; +} + +- (BOOL)scanRestOfFalse:(NSNumber **)o +{ + if (!strncmp(c, "alse", 4)) { + c += 4; + *o = [NSNumber numberWithBool:NO]; + return YES; + } + [self addErrorWithCode:EPARSE description: @"Expected 'false'"]; + return NO; +} + +- (BOOL)scanRestOfNull:(NSNull **)o { + if (!strncmp(c, "ull", 3)) { + c += 3; + *o = [NSNull null]; + return YES; + } + [self addErrorWithCode:EPARSE description: @"Expected 'null'"]; + return NO; +} + +- (BOOL)scanRestOfArray:(NSMutableArray **)o { + if (maxDepth && ++depth > maxDepth) { + [self addErrorWithCode:EDEPTH description: @"Nested too deep"]; + return NO; + } + + *o = [NSMutableArray arrayWithCapacity:8]; + + for (; *c ;) { + id v; + + skipWhitespace(c); + if (*c == ']' && c++) { + depth--; + return YES; + } + + if (![self scanValue:&v]) { + [self addErrorWithCode:EPARSE description:@"Expected value while parsing array"]; + return NO; + } + + [*o addObject:v]; + + skipWhitespace(c); + if (*c == ',' && c++) { + skipWhitespace(c); + if (*c == ']') { + [self addErrorWithCode:ETRAILCOMMA description: @"Trailing comma disallowed in array"]; + return NO; + } + } + } + + [self addErrorWithCode:EEOF description: @"End of input while parsing array"]; + return NO; +} + +- (BOOL)scanRestOfDictionary:(NSMutableDictionary **)o +{ + if (maxDepth && ++depth > maxDepth) { + [self addErrorWithCode:EDEPTH description: @"Nested too deep"]; + return NO; + } + + *o = [NSMutableDictionary dictionaryWithCapacity:7]; + + for (; *c ;) { + id k, v; + + skipWhitespace(c); + if (*c == '}' && c++) { + depth--; + return YES; + } + + if (!(*c == '\"' && c++ && [self scanRestOfString:&k])) { + [self addErrorWithCode:EPARSE description: @"Object key string expected"]; + return NO; + } + + skipWhitespace(c); + if (*c != ':') { + [self addErrorWithCode:EPARSE description: @"Expected ':' separating key and value"]; + return NO; + } + + c++; + if (![self scanValue:&v]) { + NSString *string = [NSString stringWithFormat:@"Object value expected for key: %@", k]; + [self addErrorWithCode:EPARSE description: string]; + return NO; + } + + [*o setObject:v forKey:k]; + + skipWhitespace(c); + if (*c == ',' && c++) { + skipWhitespace(c); + if (*c == '}') { + [self addErrorWithCode:ETRAILCOMMA description: @"Trailing comma disallowed in object"]; + return NO; + } + } + } + + [self addErrorWithCode:EEOF description: @"End of input while parsing object"]; + return NO; +} + +- (BOOL)scanRestOfString:(NSMutableString **)o +{ + // if the string has no control characters in it, return it in one go, without any temporary allocations. + size_t len = strcspn(c, ctrl); + if (len && *(c + len) == '\"') + { + *o = [[[NSMutableString alloc] initWithBytes:(char*)c length:len encoding:NSUTF8StringEncoding] autorelease]; + c += len + 1; + return YES; + } + + *o = [NSMutableString stringWithCapacity:16]; + do { + // First see if there's a portion we can grab in one go. + // Doing this caused a massive speedup on the long string. + len = strcspn(c, ctrl); + if (len) { + // check for + id t = [[NSString alloc] initWithBytesNoCopy:(char*)c + length:len + encoding:NSUTF8StringEncoding + freeWhenDone:NO]; + if (t) { + [*o appendString:t]; + [t release]; + c += len; + } + } + + if (*c == '"') { + c++; + return YES; + + } else if (*c == '\\') { + unichar uc = *++c; + switch (uc) { + case '\\': + case '/': + case '"': + break; + + case 'b': uc = '\b'; break; + case 'n': uc = '\n'; break; + case 'r': uc = '\r'; break; + case 't': uc = '\t'; break; + case 'f': uc = '\f'; break; + + case 'u': + c++; + if (![self scanUnicodeChar:&uc]) { + [self addErrorWithCode:EUNICODE description: @"Broken unicode character"]; + return NO; + } + c--; // hack. + break; + default: + [self addErrorWithCode:EESCAPE description: [NSString stringWithFormat:@"Illegal escape sequence '0x%x'", uc]]; + return NO; + break; + } + CFStringAppendCharacters((CFMutableStringRef)*o, &uc, 1); + c++; + + } else if (*c < 0x20) { + [self addErrorWithCode:ECTRL description: [NSString stringWithFormat:@"Unescaped control character '0x%x'", *c]]; + return NO; + + } else { + NSLog(@"should not be able to get here"); + } + } while (*c); + + [self addErrorWithCode:EEOF description:@"Unexpected EOF while parsing string"]; + return NO; +} + +- (BOOL)scanUnicodeChar:(unichar *)x +{ + unichar hi, lo; + + if (![self scanHexQuad:&hi]) { + [self addErrorWithCode:EUNICODE description: @"Missing hex quad"]; + return NO; + } + + if (hi >= 0xd800) { // high surrogate char? + if (hi < 0xdc00) { // yes - expect a low char + + if (!(*c == '\\' && ++c && *c == 'u' && ++c && [self scanHexQuad:&lo])) { + [self addErrorWithCode:EUNICODE description: @"Missing low character in surrogate pair"]; + return NO; + } + + if (lo < 0xdc00 || lo >= 0xdfff) { + [self addErrorWithCode:EUNICODE description:@"Invalid low surrogate char"]; + return NO; + } + + hi = (hi - 0xd800) * 0x400 + (lo - 0xdc00) + 0x10000; + + } else if (hi < 0xe000) { + [self addErrorWithCode:EUNICODE description:@"Invalid high character in surrogate pair"]; + return NO; + } + } + + *x = hi; + return YES; +} + +- (BOOL)scanHexQuad:(unichar *)x +{ + *x = 0; + for (int i = 0; i < 4; i++) { + unichar uc = *c; + c++; + int d = (uc >= '0' && uc <= '9') + ? uc - '0' : (uc >= 'a' && uc <= 'f') + ? (uc - 'a' + 10) : (uc >= 'A' && uc <= 'F') + ? (uc - 'A' + 10) : -1; + if (d == -1) { + [self addErrorWithCode:EUNICODE description:@"Missing hex digit in quad"]; + return NO; + } + *x *= 16; + *x += d; + } + return YES; +} + +- (BOOL)scanNumber:(NSNumber **)o +{ + BOOL simple = YES; + + const char *ns = c; + + // The logic to test for validity of the number formatting is relicensed + // from JSON::XS with permission from its author Marc Lehmann. + // (Available at the CPAN: http://search.cpan.org/dist/JSON-XS/ .) + + if ('-' == *c) + c++; + + if ('0' == *c && c++) { + if (isdigit(*c)) { + [self addErrorWithCode:EPARSENUM description: @"Leading 0 disallowed in number"]; + return NO; + } + + } else if (!isdigit(*c) && c != ns) { + [self addErrorWithCode:EPARSENUM description: @"No digits after initial minus"]; + return NO; + + } else { + skipDigits(c); + } + + // Fractional part + if ('.' == *c && c++) { + simple = NO; + if (!isdigit(*c)) { + [self addErrorWithCode:EPARSENUM description: @"No digits after decimal point"]; + return NO; + } + skipDigits(c); + } + + // Exponential part + if ('e' == *c || 'E' == *c) { + simple = NO; + c++; + + if ('-' == *c || '+' == *c) + c++; + + if (!isdigit(*c)) { + [self addErrorWithCode:EPARSENUM description: @"No digits after exponent"]; + return NO; + } + skipDigits(c); + } + + // If we are only reading integers, don't go through the expense of creating an NSDecimal. + // This ends up being a very large perf win. + if (simple) { + BOOL negate = NO; + long long val = 0; + const char *d = ns; + + if (*d == '-') { + negate = YES; + d++; + } + + while (isdigit(*d)) { + val *= 10; + if (val < 0) + goto longlong_overflow; + val += *d - '0'; + if (val < 0) + goto longlong_overflow; + d++; + } + + *o = [NSNumber numberWithLongLong:negate ? -val : val]; + return YES; + + } else { + // jumped to by simple branch, if an overflow occured + longlong_overflow:; + + id str = [[NSString alloc] initWithBytesNoCopy:(char*)ns + length:c - ns + encoding:NSUTF8StringEncoding + freeWhenDone:NO]; + [str autorelease]; + if (str && (*o = [NSDecimalNumber decimalNumberWithString:str])) + return YES; + + [self addErrorWithCode:EPARSENUM description: @"Failed creating decimal instance"]; + return NO; + } +} + +- (BOOL)scanIsAtEnd +{ + skipWhitespace(c); + return !*c; +} + + +@end diff --git a/GTL/Source/JSON/SBJsonWriter.h b/GTL/Source/JSON/SBJsonWriter.h new file mode 100644 index 0000000..ae1a597 --- /dev/null +++ b/GTL/Source/JSON/SBJsonWriter.h @@ -0,0 +1,127 @@ +/* + Copyright (C) 2009 Stig Brautaset. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the author nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import +#import "SBJsonBase.h" + +/** + @brief The JSON writer class. + + Objective-C types are mapped to JSON types in the following way: + + @li NSNull -> Null + @li NSString -> String + @li NSArray -> Array + @li NSDictionary -> Object + @li NSNumber (-initWithBool:) -> Boolean + @li NSNumber -> Number + + In JSON the keys of an object must be strings. NSDictionary keys need + not be, but attempting to convert an NSDictionary with non-string keys + into JSON will throw an exception. + + NSNumber instances created with the +initWithBool: method are + converted into the JSON boolean "true" and "false" values, and vice + versa. Any other NSNumber instances are converted to a JSON number the + way you would expect. + + */ +@interface SBJsonWriter : SBJsonBase { + +@private + BOOL sortKeys, humanReadable; +} + +/** + @brief Whether we are generating human-readable (multiline) JSON. + + Set whether or not to generate human-readable JSON. The default is NO, which produces + JSON without any whitespace. (Except inside strings.) If set to YES, generates human-readable + JSON with linebreaks after each array value and dictionary key/value pair, indented two + spaces per nesting level. + */ +@property BOOL humanReadable; + +/** + @brief Whether or not to sort the dictionary keys in the output. + + If this is set to YES, the dictionary keys in the JSON output will be in sorted order. + (This is useful if you need to compare two structures, for example.) The default is NO. + */ +@property BOOL sortKeys; + +/** + @brief Return JSON representation (or fragment) for the given object. + + Returns a string containing JSON representation of the passed in value, or nil on error. + If nil is returned and @p error is not NULL, @p *error can be interrogated to find the cause of the error. + + @param value any instance that can be represented as a JSON fragment + + */ +- (NSString*)stringWithObject:(id)value; + +/** + @brief Return JSON representation (or fragment) for the given object. + + Returns a string containing JSON representation of the passed in value, or nil on error. + If nil is returned and @p error is not NULL, @p *error can be interrogated to find the cause of the error. + + @param value any instance that can be represented as a JSON fragment + @param error pointer to object to be populated with NSError on failure + + */- (NSString*)stringWithObject:(id)value + error:(NSError**)error; + + +@end + +/** + @brief Allows generation of JSON for otherwise unsupported classes. + + If you have a custom class that you want to create a JSON representation for you can implement + this method in your class. It should return a representation of your object defined + in terms of objects that can be translated into JSON. For example, a Person + object might implement it like this: + + @code + - (id)proxyForJson { + return [NSDictionary dictionaryWithObjectsAndKeys: + name, @"name", + phone, @"phone", + email, @"email", + nil]; + } + @endcode + + */ +@interface NSObject (SBProxyForJson) +- (id)proxyForJson; +@end + diff --git a/GTL/Source/JSON/SBJsonWriter.m b/GTL/Source/JSON/SBJsonWriter.m new file mode 100644 index 0000000..83e8a20 --- /dev/null +++ b/GTL/Source/JSON/SBJsonWriter.m @@ -0,0 +1,239 @@ +/* + Copyright (C) 2009 Stig Brautaset. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the author nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "SBJsonWriter.h" + +@interface SBJsonWriter () + +- (BOOL)appendValue:(id)fragment into:(NSMutableString*)json; +- (BOOL)appendArray:(NSArray*)fragment into:(NSMutableString*)json; +- (BOOL)appendDictionary:(NSDictionary*)fragment into:(NSMutableString*)json; +- (BOOL)appendString:(NSString*)fragment into:(NSMutableString*)json; + +- (NSString*)indent; + +@end + +@implementation SBJsonWriter + +@synthesize sortKeys; +@synthesize humanReadable; + +static NSMutableCharacterSet *kEscapeChars; + ++ (void)initialize { + kEscapeChars = [[NSMutableCharacterSet characterSetWithRange: NSMakeRange(0,32)] retain]; + [kEscapeChars addCharactersInString: @"\"\\"]; +} + +- (NSString*)stringWithObject:(id)value { + [self clearErrorTrace]; + + if ([value isKindOfClass:[NSDictionary class]] || [value isKindOfClass:[NSArray class]]) { + depth = 0; + NSMutableString *json = [NSMutableString stringWithCapacity:128]; + if ([self appendValue:value into:json]) + return json; + } + + if ([value respondsToSelector:@selector(proxyForJson)]) { + NSString *tmp = [self stringWithObject:[value proxyForJson]]; + if (tmp) + return tmp; + } + + [self addErrorWithCode:EFRAGMENT description:@"Not valid type for JSON"]; + return nil; +} + +- (NSString*)stringWithObject:(id)value error:(NSError**)error { + NSString *tmp = [self stringWithObject:value]; + if (tmp) + return tmp; + + if (error) + *error = [self.errorTrace lastObject]; + return nil; +} + +- (NSString*)indent { + return [@"\n" stringByPaddingToLength:1 + 2 * depth withString:@" " startingAtIndex:0]; +} + +- (BOOL)appendValue:(id)fragment into:(NSMutableString*)json { + if ([fragment isKindOfClass:[NSDictionary class]]) { + if (![self appendDictionary:fragment into:json]) + return NO; + + } else if ([fragment isKindOfClass:[NSArray class]]) { + if (![self appendArray:fragment into:json]) + return NO; + + } else if ([fragment isKindOfClass:[NSString class]]) { + if (![self appendString:fragment into:json]) + return NO; + + } else if ([fragment isKindOfClass:[NSNumber class]]) { + if ('c' == *[fragment objCType]) { + [json appendString:[fragment boolValue] ? @"true" : @"false"]; + } else if ([fragment isEqualToNumber:(NSNumber*)kCFNumberNaN]) { + [self addErrorWithCode:EUNSUPPORTED description:@"NaN is not a valid number in JSON"]; + return NO; + + } else if (isinf([fragment doubleValue])) { + [self addErrorWithCode:EUNSUPPORTED description:@"Infinity is not a valid number in JSON"]; + return NO; + + } else { + [json appendString:[fragment stringValue]]; + } + } else if ([fragment isKindOfClass:[NSNull class]]) { + [json appendString:@"null"]; + } else if ([fragment respondsToSelector:@selector(proxyForJson)]) { + [self appendValue:[fragment proxyForJson] into:json]; + + } else { + [self addErrorWithCode:EUNSUPPORTED description:[NSString stringWithFormat:@"JSON serialisation not supported for %@", [fragment class]]]; + return NO; + } + return YES; +} + +- (BOOL)appendArray:(NSArray*)fragment into:(NSMutableString*)json { + if (maxDepth && ++depth > maxDepth) { + [self addErrorWithCode:EDEPTH description: @"Nested too deep"]; + return NO; + } + [json appendString:@"["]; + + BOOL addComma = NO; + for (id value in fragment) { + if (addComma) + [json appendString:@","]; + else + addComma = YES; + + if ([self humanReadable]) + [json appendString:[self indent]]; + + if (![self appendValue:value into:json]) { + return NO; + } + } + + depth--; + if ([self humanReadable] && [fragment count]) + [json appendString:[self indent]]; + [json appendString:@"]"]; + return YES; +} + +- (BOOL)appendDictionary:(NSDictionary*)fragment into:(NSMutableString*)json { + if (maxDepth && ++depth > maxDepth) { + [self addErrorWithCode:EDEPTH description: @"Nested too deep"]; + return NO; + } + [json appendString:@"{"]; + + NSString *colon = [self humanReadable] ? @" : " : @":"; + BOOL addComma = NO; + NSArray *keys = [fragment allKeys]; + if (self.sortKeys) + keys = [keys sortedArrayUsingSelector:@selector(compare:)]; + + for (id value in keys) { + if (addComma) + [json appendString:@","]; + else + addComma = YES; + + if ([self humanReadable]) + [json appendString:[self indent]]; + + if (![value isKindOfClass:[NSString class]]) { + [self addErrorWithCode:EUNSUPPORTED description: @"JSON object key must be string"]; + return NO; + } + + if (![self appendString:value into:json]) + return NO; + + [json appendString:colon]; + if (![self appendValue:[fragment objectForKey:value] into:json]) { + [self addErrorWithCode:EUNSUPPORTED description:[NSString stringWithFormat:@"Unsupported value for key %@ in object", value]]; + return NO; + } + } + + depth--; + if ([self humanReadable] && [fragment count]) + [json appendString:[self indent]]; + [json appendString:@"}"]; + return YES; +} + +- (BOOL)appendString:(NSString*)fragment into:(NSMutableString*)json { + + [json appendString:@"\""]; + + NSRange esc = [fragment rangeOfCharacterFromSet:kEscapeChars]; + if ( !esc.length ) { + // No special chars -- can just add the raw string: + [json appendString:fragment]; + + } else { + NSUInteger length = [fragment length]; + for (NSUInteger i = 0; i < length; i++) { + unichar uc = [fragment characterAtIndex:i]; + switch (uc) { + case '"': [json appendString:@"\\\""]; break; + case '\\': [json appendString:@"\\\\"]; break; + case '\t': [json appendString:@"\\t"]; break; + case '\n': [json appendString:@"\\n"]; break; + case '\r': [json appendString:@"\\r"]; break; + case '\b': [json appendString:@"\\b"]; break; + case '\f': [json appendString:@"\\f"]; break; + default: + if (uc < 0x20) { + [json appendFormat:@"\\u%04x", uc]; + } else { + CFStringAppendCharacters((CFMutableStringRef)json, &uc, 1); + } + break; + + } + } + } + + [json appendString:@"\""]; + return YES; +} + + +@end diff --git a/GTL/Source/Networking/.svn/all-wcprops b/GTL/Source/Networking/.svn/all-wcprops new file mode 100644 index 0000000..2b41d44 --- /dev/null +++ b/GTL/Source/Networking/.svn/all-wcprops @@ -0,0 +1,17 @@ +K 25 +svn:wc:ra_dav:version-url +V 41 +/svn/!svn/ver/241/trunk/Source/Networking +END +GTLClientLoginAuthentication.h +K 25 +svn:wc:ra_dav:version-url +V 71 +/svn/!svn/ver/14/trunk/Source/Networking/GTLClientLoginAuthentication.h +END +GTLClientLoginAuthentication.m +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/241/trunk/Source/Networking/GTLClientLoginAuthentication.m +END diff --git a/GTL/Source/Networking/.svn/entries b/GTL/Source/Networking/.svn/entries new file mode 100644 index 0000000..7e4895c --- /dev/null +++ b/GTL/Source/Networking/.svn/entries @@ -0,0 +1,96 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Networking +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-11-06T21:10:03.064870Z +241 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +GTLClientLoginAuthentication.h +file + + + + +2012-12-09T08:42:33.000000Z +85d7475fb4a416ee7a69d0dcac509df2 +2011-06-24T20:24:16.908736Z +14 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4678 + +GTLClientLoginAuthentication.m +file + + + + +2012-12-09T08:42:33.000000Z +aeb1e7159975114ecab7419d3a0e8e3e +2012-11-06T21:10:03.064870Z +241 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +17966 + diff --git a/GTL/Source/Networking/.svn/text-base/GTLClientLoginAuthentication.h.svn-base b/GTL/Source/Networking/.svn/text-base/GTLClientLoginAuthentication.h.svn-base new file mode 100644 index 0000000..2322b93 --- /dev/null +++ b/GTL/Source/Networking/.svn/text-base/GTLClientLoginAuthentication.h.svn-base @@ -0,0 +1,142 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLClientLoginAuthentication.h +// + +// GTLClientLoginAuthentication implements an authorizer for Google's +// ClientLogin protocol +// +// Protocol docs: +// http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html +// +// Sample usage: +// GTLClientLoginAuthentication *auth = [GTLClientLoginAuthentication authenticationForService:@"print" +// source:@"myCompany-myApp-v1"]; +// auth.userEmail = @"test@example.com"; +// auth.password = @"password"; +// +// Then set the auth object as the authorizer of a service object or a fetcher. + +#import + +#if GTL_BUILT_AS_FRAMEWORK +#import "GTL/GTLDefines.h" +#import "GTL/GTMHTTPFetcher.h" +#else +#import "GTLDefines.h" +#import "GTMHTTPFetcher.h" +#endif + +#undef _EXTERN +#undef _INITIALIZE_AS +#ifdef GTLCLIENTLOGINAUTHENTICATION_DEFINE_GLOBALS +#define _EXTERN +#define _INITIALIZE_AS(x) =x +#else +#define _EXTERN GTL_EXTERN +#define _INITIALIZE_AS(x) +#endif + +_EXTERN NSString * const kGTLClientLoginErrorDomain _INITIALIZE_AS(@"com.google.GTLClientLogin"); + +_EXTERN NSString * const kGTLClientLoginErrorRequestKey _INITIALIZE_AS(@"request"); + +enum { + kGTLClientLoginErrorAuthorizationFailed = -1001 +}; + +@interface GTLClientLoginAuthentication : NSObject { + @private + NSString *serviceID_; + NSString *source_; + NSString *domain_; + NSDictionary *additionalParams_; + NSDictionary *customHeaders_; + NSString *userEmail_; + NSMutableData *password_; + + GTMHTTPFetcher *fetcher_; + NSMutableArray *authorizationQueue_; + + NSString *token_; + NSDate *tokenIssueDate_; +} + ++ (GTLClientLoginAuthentication *)authenticationForService:(NSString *)serviceID + source:(NSString *)applicationID; + +@property (copy) NSString *userEmail; +@property (copy) NSString *password; + +// Each service supporting ClientLogin has a serviceID string +@property (copy) NSString *serviceID; + +// Each application should include a source (application ID) string of the form +// "companyName-applicationName-version" +@property (copy) NSString *source; + +// The Domain should be nil to authenticate against www.google.com; it may be +// localhost:n for unit testing to port n +@property (copy) NSString *domain; + +// A dictionary with additional parameters for the post body. +// +// The params dictionary may be used to specify a captcha response, as in +// if ([captchaToken length] > 0 && [captchaAnswer length] > 0) { +// auth.additionalParams = [NSDictionary dictionaryWithObjectsAndKeys: +// captchaToken, @"logintoken", +// captchaAnswer, @"logincaptcha", nil]; +// } +@property (copy) NSDictionary *additionalParams; + +// Custom headers to be added to the request; typically this is nil +@property (copy) NSDictionary *customHeaders; + +// The authorization token, if sign-in is successful +@property (copy) NSString *token; + +// The date the token was issued +@property (copy) NSDate *tokenIssueDate; + +// Main authorization entry points +// +// These will fetch the token, if necessary, and add the access token to +// the request, then invoke the callback. +// +// The request argument may be nil to just force a fetch of the token, if the +// token is nil. + +// The finish selector should have a signature matching +// - (void)authentication:(GTLClientLoginAuthentication *)auth +// request:(NSMutableURLRequest *)request +// finishedWithError:(NSError *)error; + +- (void)authorizeRequest:(NSMutableURLRequest *)request + delegate:(id)delegate + didFinishSelector:(SEL)sel; + +#if NS_BLOCKS_AVAILABLE +- (void)authorizeRequest:(NSMutableURLRequest *)request + completionHandler:(void (^)(NSError *error))handler; +#endif + +// Spin the run loop, discarding events, until the fetch has completed +// +// This is only for use in testing or in tools without a user interface. +- (void)waitForCompletionWithTimeout:(NSTimeInterval)timeoutInSeconds; + +@end diff --git a/GTL/Source/Networking/.svn/text-base/GTLClientLoginAuthentication.m.svn-base b/GTL/Source/Networking/.svn/text-base/GTLClientLoginAuthentication.m.svn-base new file mode 100644 index 0000000..a413ead --- /dev/null +++ b/GTL/Source/Networking/.svn/text-base/GTLClientLoginAuthentication.m.svn-base @@ -0,0 +1,552 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLClientLoginAuthentication.m +// + +#define GTLCLIENTLOGINAUTHENTICATION_DEFINE_GLOBALS 1 +#import "GTLClientLoginAuthentication.h" + +#if GTL_BUILT_AS_FRAMEWORK +#import "GTL/GTLUtilities.h" +#else +#import "GTLUtilities.h" +#endif + +@class GTLClientLoginAuthorizationArgs; + +@interface GTLClientLoginAuthentication () +@property (retain) GTMHTTPFetcher *fetcher; +@property (retain) NSMutableArray *authorizationQueue; + +- (void)authorizeRequestArgs:(GTLClientLoginAuthorizationArgs *)args; +- (void)authorizeRequestImmediateArgs:(GTLClientLoginAuthorizationArgs *)args; + ++ (NSDictionary *)dictionaryWithResponseData:(NSData *)data; +@end + +// Internal utility class for wrapping requests needing authorization and their +// callbacks +@interface GTLClientLoginAuthorizationArgs : NSObject { + @private + NSMutableURLRequest *request_; + id delegate_; + SEL sel_; + id completionHandler_; + NSThread *thread_; + NSError *error_; +} + +@property (retain) NSMutableURLRequest *request; +@property (retain) id delegate; +@property (assign) SEL selector; +@property (copy) id completionHandler; +@property (retain) NSThread *thread; +@property (retain) NSError *error; + ++ (GTLClientLoginAuthorizationArgs *)argsWithRequest:(NSMutableURLRequest *)req + delegate:(id)delegate + selector:(SEL)sel + completionHandler:(id)completionHandler + thread:(NSThread *)thread; +@end + +// XorPlainMutableData is a simple way to keep passwords held in heap objects +// from being visible in memory dumps as plaintext +static void XorPlainMutableData(NSMutableData *mutableData) { + + // this helps avoid storing passwords on the heap in plaintext + const unsigned char theXORValue = 0x95; // 0x95 = 0xb10010101 + + unsigned char *dataPtr = [mutableData mutableBytes]; + NSUInteger length = [mutableData length]; + + for (NSUInteger idx = 0; idx < length; idx++) { + dataPtr[idx] ^= theXORValue; + } +} + +@implementation GTLClientLoginAuthorizationArgs + +@synthesize request = request_, + delegate = delegate_, + selector = sel_, + completionHandler = completionHandler_, + thread = thread_, + error = error_; + ++ (GTLClientLoginAuthorizationArgs *)argsWithRequest:(NSMutableURLRequest *)req + delegate:(id)delegate + selector:(SEL)sel + completionHandler:(id)completionHandler + thread:(NSThread *)thread { + GTLClientLoginAuthorizationArgs *obj; + obj = [[[GTLClientLoginAuthorizationArgs alloc] init] autorelease]; + obj.request = req; + obj.delegate = delegate; + obj.selector = sel; + obj.completionHandler = completionHandler; + obj.thread = thread; + return obj; +} + +- (void)dealloc { + self.request = nil; + self.delegate = nil; + self.selector = NULL; + self.completionHandler = nil; + self.thread = nil; + self.error = nil; + [super dealloc]; +} +@end + + +@implementation GTLClientLoginAuthentication + +@synthesize serviceID = serviceID_, + source = source_, + domain = domain_, + additionalParams = additionalParams_, + customHeaders = customHeaders_, + fetcher = fetcher_, + authorizationQueue = authorizationQueue_, + token = token_, + tokenIssueDate = tokenIssueDate_; + ++ (GTLClientLoginAuthentication *)authenticationForService:(NSString *)serviceID + source:(NSString *)applicationID { + GTLClientLoginAuthentication *auth; + auth = [[[GTLClientLoginAuthentication alloc] init] autorelease]; + auth.serviceID = serviceID; + auth.source = applicationID; + return auth; +} + +- (id)init { + self = [super init]; + if (self) { + authorizationQueue_ = [[NSMutableArray alloc] init]; + } + return self; +} + +- (NSString *)description { + return [NSString stringWithFormat:@"%@ %p: {%@}", + [self class], self, self.userEmail]; +} + +- (void)dealloc { + [serviceID_ release]; + [source_ release]; + [domain_ release]; + [additionalParams_ release]; + [customHeaders_ release]; + [userEmail_ release]; + [password_ release]; + [fetcher_ release]; + [authorizationQueue_ release]; + [token_ release]; + [tokenIssueDate_ release]; + + [super dealloc]; +} + +- (GTMHTTPFetcher *)clientLoginFetcher { + NSString *userEmail = self.userEmail; + NSString *password = self.password; + + GTL_DEBUG_ASSERT([userEmail length] > 0, @"Username missing"); + GTL_DEBUG_ASSERT([password length] > 0, @"Password missing"); + + NSString *domain = self.domain; + if ([domain length] == 0) { + domain = @"www.google.com"; + } + + // Unit tests may authenticate to a server running locally with + // a domain like "localhost:8080" + NSString *scheme = [domain hasPrefix:@"localhost:"] ? @"http" : @"https"; + + NSString *urlTemplate = @"%@://%@/accounts/ClientLogin"; + NSString *authURLString = [NSString stringWithFormat:urlTemplate, + scheme, domain]; + + NSURL *authURL = [NSURL URLWithString:authURLString]; + + NSMutableURLRequest *request; + request = [NSMutableURLRequest requestWithURL:authURL + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:60]; + + // Add custom request headers + NSDictionary *headers = self.customHeaders; + for (NSString *key in headers) { + NSString *value = [headers objectForKey:key]; + [request setValue:value forHTTPHeaderField:key]; + } + + NSString *source = self.source; + NSString *serviceID = self.serviceID; + + NSString *template = @"Email=%@&Passwd=%@&source=%@&service=%@&accountType=GOOGLE"; + NSString *postString = [NSString stringWithFormat:template, + [GTLUtilities stringByURLEncodingForURI:userEmail], + [GTLUtilities stringByURLEncodingForURI:password], + [GTLUtilities stringByURLEncodingForURI:source], + serviceID]; + + // Add custom post body parameters to the post string; typically params is + // nil, but it may have captcha token and answer + NSDictionary *params = self.additionalParams; + for (NSString *key in params) { + NSString *value = [params objectForKey:key]; + NSString *encValue = [GTLUtilities stringByURLEncodingForURI:value]; + postString = [postString stringByAppendingFormat:@"&%@=%@", + key, encValue]; + } + + // We're avoiding +[NSURCredential credentialWithUser:password:persistence:] + // because it fails to autorelease itself on OS X 10.4 .. 10.5.x + // rdar://5596278 + NSURLCredential *cred; + cred = [[[NSURLCredential alloc] initWithUser:userEmail + password:password + persistence:NSURLCredentialPersistenceForSession] autorelease]; + + GTMHTTPFetcher* fetcher = [GTMHTTPFetcher fetcherWithRequest:request]; + fetcher.comment = @"ClientLogin"; + fetcher.postData = [postString dataUsingEncoding:NSUTF8StringEncoding]; + fetcher.credential = cred; + fetcher.retryEnabled = YES; + fetcher.maxRetryInterval = 15; + + return fetcher; +} + +- (void)authorizeRequest:(NSMutableURLRequest *)request + delegate:(id)delegate + didFinishSelector:(SEL)sel { + GTMAssertSelectorNilOrImplementedWithArgs(delegate, sel, + @encode(GTLClientLoginAuthentication *), + @encode(NSMutableURLRequest *), + @encode(NSError *), 0); + GTLClientLoginAuthorizationArgs *args; + args = [GTLClientLoginAuthorizationArgs argsWithRequest:request + delegate:delegate + selector:sel + completionHandler:nil + thread:[NSThread currentThread]]; + [self authorizeRequestArgs:args]; +} + +#if NS_BLOCKS_AVAILABLE +// Authorizing with a completion block +- (void)authorizeRequest:(NSMutableURLRequest *)request + completionHandler:(void (^)(NSError *error))handler { + + GTLClientLoginAuthorizationArgs *args; + args = [GTLClientLoginAuthorizationArgs argsWithRequest:request + delegate:nil + selector:NULL + completionHandler:handler + thread:[NSThread currentThread]]; + [self authorizeRequestArgs:args]; +} +#endif + +- (void)authorizeRequestArgs:(GTLClientLoginAuthorizationArgs *)args { + + @synchronized(authorizationQueue_) { + BOOL hasToken = ([self.token length] > 0); + + if (hasToken) { + // If there's a token, ensure that it's not too old, which may happen + // if this app has been running for weeks. + // + // Google services can pick their own expiration interval for ClientLogin + // tokens, but the default and norm is 14 days. We'll force a fresh + // token fetch after 13 days. + NSDate *issueDate = self.tokenIssueDate; + if (issueDate) { + NSTimeInterval interval = [issueDate timeIntervalSinceNow]; + const NSTimeInterval kExpirationInterval = 60 * 60 * 24 * 13; + if (interval < - kExpirationInterval) { + self.token = nil; + hasToken = NO; + } + } + } + + if (hasToken) { + [self authorizeRequestImmediateArgs:args]; + } else { + // Attempt to fetch the token now; once we have a token, we will + // authorize the request and call back to the user + if (self.fetcher == nil) { + // There's not already a refresh pending + GTMHTTPFetcher *fetcher = [self clientLoginFetcher]; + [fetcher beginFetchWithDelegate:self + didFinishSelector:@selector(authFetcher:finishedWithData:error:)]; + self.fetcher = fetcher; + } else { + // There is already a pending fetcher, so this request can wait in the + // queue until it completes. + } + + [authorizationQueue_ addObject:args]; + } + } +} + +- (void)authFetcher:(GTMHTTPFetcher *)fetcher + finishedWithData:(NSData *)data + error:(NSError *)error { + @synchronized(authorizationQueue_) { + self.fetcher = nil; + + NSDictionary *responseDict = [[self class] dictionaryWithResponseData:data]; + NSString *token = [responseDict objectForKey:@"Auth"]; + + BOOL hasToken = ([token length] > 0); + self.token = (hasToken ? token : nil); + self.tokenIssueDate = (hasToken ? [NSDate date] : nil); + + // Swap in a new auth queue in case the callbacks try to immediately auth + // another request + NSArray *pendingAuthQueue = [NSArray arrayWithArray:authorizationQueue_]; + [authorizationQueue_ removeAllObjects]; + + if (error != nil && [responseDict count] > 0) { + // Show the caller the full error response + error = [NSError errorWithDomain:[error domain] + code:[error code] + userInfo:responseDict]; + } + + // Authorize and call back for all pending requests + for (GTLClientLoginAuthorizationArgs *args in pendingAuthQueue) { + if (!hasToken && args.error == nil) { + args.error = error; + } + [self authorizeRequestImmediateArgs:args]; + } + } +} + +- (void)authorizeRequestImmediateArgs:(GTLClientLoginAuthorizationArgs *)args { + // This authorization entry point never attempts to fetch the token, + // but does call the completion routine + NSMutableURLRequest *request = args.request; + + NSString *token = self.token; + if ([token length] > 0) { + if (request) { + // Add the token to the authorization header + NSString *value = [NSString stringWithFormat:@"GoogleLogin auth=%@", + token]; + [request setValue:value forHTTPHeaderField:@"Authorization"]; + } + + args.error = nil; + } else if (args.error == nil) { + NSDictionary *userInfo = nil; + if (request) { + userInfo = [NSDictionary dictionaryWithObject:request + forKey:kGTLClientLoginErrorRequestKey]; + } + args.error = [NSError errorWithDomain:kGTLClientLoginErrorDomain + code:kGTLClientLoginErrorAuthorizationFailed + userInfo:userInfo]; + } + + // Invoke any callbacks on the proper threads + if (args.delegate) { + NSThread *targetThread = args.thread; + BOOL isSameThread = [targetThread isEqual:[NSThread currentThread]]; + + [self performSelector:@selector(invokeCallbackArgs:) + onThread:targetThread + withObject:args + waitUntilDone:isSameThread]; + } +} + +- (void)invokeCallbackArgs:(GTLClientLoginAuthorizationArgs *)args { + // Invoke the callbacks + NSError *error = args.error; + + id delegate = args.delegate; + SEL sel = args.selector; + if (delegate && sel) { + NSMutableURLRequest *request = args.request; + + NSMethodSignature *sig = [delegate methodSignatureForSelector:sel]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; + [invocation setSelector:sel]; + [invocation setTarget:delegate]; + [invocation setArgument:&self atIndex:2]; + [invocation setArgument:&request atIndex:3]; + [invocation setArgument:&error atIndex:4]; + [invocation invoke]; + } + +#if NS_BLOCKS_AVAILABLE + id handler = args.completionHandler; + if (handler) { + void (^authCompletionBlock)(NSError *) = handler; + authCompletionBlock(error); + } +#endif +} + +- (void)stopAuthorization { + [self.fetcher stopFetching]; + self.fetcher = nil; +} + +- (void)stopAuthorizationForRequest:(NSURLRequest *)request { + @synchronized(authorizationQueue_) { + NSUInteger argIndex = 0; + BOOL found = NO; + for (GTLClientLoginAuthorizationArgs *args in authorizationQueue_) { + if ([args request] == request) { + found = YES; + break; + } + argIndex++; + } + + if (found) { + [authorizationQueue_ removeObjectAtIndex:argIndex]; + + // If the queue is now empty, go ahead and stop the fetcher. + if ([authorizationQueue_ count] == 0) { + [self stopAuthorization]; + } + } + } +} + +- (BOOL)isAuthorizingRequest:(NSURLRequest *)request { + BOOL wasFound = NO; + @synchronized(authorizationQueue_) { + for (GTLClientLoginAuthorizationArgs *args in authorizationQueue_) { + if ([args request] == request) { + wasFound = YES; + break; + } + } + } + return wasFound; +} + +- (BOOL)isAuthorizedRequest:(NSURLRequest *)request { + NSString *authStr = [request valueForHTTPHeaderField:@"Authorization"]; + return ([authStr length] > 0); +} + +- (void)waitForCompletionWithTimeout:(NSTimeInterval)timeoutInSeconds { + // If there is a refresh fetcher pending, wait for it. + // + // This is only intended for unit test or for use in command-line tools. + GTMHTTPFetcher *fetcher = self.fetcher; + [fetcher waitForCompletionWithTimeout:timeoutInSeconds]; +} + +- (BOOL)primeForRefresh { + if (self.userEmail == nil || self.password == nil) { + // Cannot refresh without username and password + return NO; + } + self.token = nil; + self.tokenIssueDate = nil; + return YES; +} + +#pragma mark - + +- (NSString *)userEmail { + return userEmail_; +} + +- (void)setUserEmail:(NSString *)str { + BOOL isChanging = (userEmail_ != str + && (str == nil || ![userEmail_ isEqual:str])); + if (isChanging) { + self.token = nil; + } + + [userEmail_ autorelease]; + userEmail_ = [str copy]; +} + +- (NSString *)password { + if (password_) { + XorPlainMutableData(password_); + NSString *result = [[[NSString alloc] initWithData:password_ + encoding:NSUTF8StringEncoding] autorelease]; + XorPlainMutableData(password_); + return result; + } + return nil; +} + +- (void)setPassword:(NSString *)str { + [password_ autorelease]; + + if (str) { + // Avoid holding the password in the heap in plaintext + const char *utf8password = [str UTF8String]; + size_t passwordLength = strlen(utf8password); + password_ = [[NSMutableData alloc] initWithBytes:utf8password + length:passwordLength]; + XorPlainMutableData(password_); + } else { + password_ = nil; + } +} + +#pragma mark - + ++ (NSDictionary *)dictionaryWithResponseData:(NSData *)data { + // Build a dictionary from a response string of the form + // "cat=fluffy \n dog=spot". + NSString *str = [[[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding] autorelease]; + if (str == nil) return nil; + + NSArray *allLines = [str componentsSeparatedByString:@"\n"]; + NSMutableDictionary *responseDict; + + responseDict = [NSMutableDictionary dictionaryWithCapacity:[allLines count]]; + + for (NSString *line in allLines) { + NSScanner *scanner = [NSScanner scannerWithString:line]; + NSString *key; + NSString *value; + + if ([scanner scanUpToString:@"=" intoString:&key] + && [scanner scanString:@"=" intoString:NULL] + && [scanner scanUpToString:@"\n" intoString:&value]) { + + [responseDict setObject:value forKey:key]; + } + } + return responseDict; +} + +@end diff --git a/GTL/Source/Networking/GTLClientLoginAuthentication.h b/GTL/Source/Networking/GTLClientLoginAuthentication.h new file mode 100644 index 0000000..2322b93 --- /dev/null +++ b/GTL/Source/Networking/GTLClientLoginAuthentication.h @@ -0,0 +1,142 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLClientLoginAuthentication.h +// + +// GTLClientLoginAuthentication implements an authorizer for Google's +// ClientLogin protocol +// +// Protocol docs: +// http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html +// +// Sample usage: +// GTLClientLoginAuthentication *auth = [GTLClientLoginAuthentication authenticationForService:@"print" +// source:@"myCompany-myApp-v1"]; +// auth.userEmail = @"test@example.com"; +// auth.password = @"password"; +// +// Then set the auth object as the authorizer of a service object or a fetcher. + +#import + +#if GTL_BUILT_AS_FRAMEWORK +#import "GTL/GTLDefines.h" +#import "GTL/GTMHTTPFetcher.h" +#else +#import "GTLDefines.h" +#import "GTMHTTPFetcher.h" +#endif + +#undef _EXTERN +#undef _INITIALIZE_AS +#ifdef GTLCLIENTLOGINAUTHENTICATION_DEFINE_GLOBALS +#define _EXTERN +#define _INITIALIZE_AS(x) =x +#else +#define _EXTERN GTL_EXTERN +#define _INITIALIZE_AS(x) +#endif + +_EXTERN NSString * const kGTLClientLoginErrorDomain _INITIALIZE_AS(@"com.google.GTLClientLogin"); + +_EXTERN NSString * const kGTLClientLoginErrorRequestKey _INITIALIZE_AS(@"request"); + +enum { + kGTLClientLoginErrorAuthorizationFailed = -1001 +}; + +@interface GTLClientLoginAuthentication : NSObject { + @private + NSString *serviceID_; + NSString *source_; + NSString *domain_; + NSDictionary *additionalParams_; + NSDictionary *customHeaders_; + NSString *userEmail_; + NSMutableData *password_; + + GTMHTTPFetcher *fetcher_; + NSMutableArray *authorizationQueue_; + + NSString *token_; + NSDate *tokenIssueDate_; +} + ++ (GTLClientLoginAuthentication *)authenticationForService:(NSString *)serviceID + source:(NSString *)applicationID; + +@property (copy) NSString *userEmail; +@property (copy) NSString *password; + +// Each service supporting ClientLogin has a serviceID string +@property (copy) NSString *serviceID; + +// Each application should include a source (application ID) string of the form +// "companyName-applicationName-version" +@property (copy) NSString *source; + +// The Domain should be nil to authenticate against www.google.com; it may be +// localhost:n for unit testing to port n +@property (copy) NSString *domain; + +// A dictionary with additional parameters for the post body. +// +// The params dictionary may be used to specify a captcha response, as in +// if ([captchaToken length] > 0 && [captchaAnswer length] > 0) { +// auth.additionalParams = [NSDictionary dictionaryWithObjectsAndKeys: +// captchaToken, @"logintoken", +// captchaAnswer, @"logincaptcha", nil]; +// } +@property (copy) NSDictionary *additionalParams; + +// Custom headers to be added to the request; typically this is nil +@property (copy) NSDictionary *customHeaders; + +// The authorization token, if sign-in is successful +@property (copy) NSString *token; + +// The date the token was issued +@property (copy) NSDate *tokenIssueDate; + +// Main authorization entry points +// +// These will fetch the token, if necessary, and add the access token to +// the request, then invoke the callback. +// +// The request argument may be nil to just force a fetch of the token, if the +// token is nil. + +// The finish selector should have a signature matching +// - (void)authentication:(GTLClientLoginAuthentication *)auth +// request:(NSMutableURLRequest *)request +// finishedWithError:(NSError *)error; + +- (void)authorizeRequest:(NSMutableURLRequest *)request + delegate:(id)delegate + didFinishSelector:(SEL)sel; + +#if NS_BLOCKS_AVAILABLE +- (void)authorizeRequest:(NSMutableURLRequest *)request + completionHandler:(void (^)(NSError *error))handler; +#endif + +// Spin the run loop, discarding events, until the fetch has completed +// +// This is only for use in testing or in tools without a user interface. +- (void)waitForCompletionWithTimeout:(NSTimeInterval)timeoutInSeconds; + +@end diff --git a/GTL/Source/Networking/GTLClientLoginAuthentication.m b/GTL/Source/Networking/GTLClientLoginAuthentication.m new file mode 100644 index 0000000..a413ead --- /dev/null +++ b/GTL/Source/Networking/GTLClientLoginAuthentication.m @@ -0,0 +1,552 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLClientLoginAuthentication.m +// + +#define GTLCLIENTLOGINAUTHENTICATION_DEFINE_GLOBALS 1 +#import "GTLClientLoginAuthentication.h" + +#if GTL_BUILT_AS_FRAMEWORK +#import "GTL/GTLUtilities.h" +#else +#import "GTLUtilities.h" +#endif + +@class GTLClientLoginAuthorizationArgs; + +@interface GTLClientLoginAuthentication () +@property (retain) GTMHTTPFetcher *fetcher; +@property (retain) NSMutableArray *authorizationQueue; + +- (void)authorizeRequestArgs:(GTLClientLoginAuthorizationArgs *)args; +- (void)authorizeRequestImmediateArgs:(GTLClientLoginAuthorizationArgs *)args; + ++ (NSDictionary *)dictionaryWithResponseData:(NSData *)data; +@end + +// Internal utility class for wrapping requests needing authorization and their +// callbacks +@interface GTLClientLoginAuthorizationArgs : NSObject { + @private + NSMutableURLRequest *request_; + id delegate_; + SEL sel_; + id completionHandler_; + NSThread *thread_; + NSError *error_; +} + +@property (retain) NSMutableURLRequest *request; +@property (retain) id delegate; +@property (assign) SEL selector; +@property (copy) id completionHandler; +@property (retain) NSThread *thread; +@property (retain) NSError *error; + ++ (GTLClientLoginAuthorizationArgs *)argsWithRequest:(NSMutableURLRequest *)req + delegate:(id)delegate + selector:(SEL)sel + completionHandler:(id)completionHandler + thread:(NSThread *)thread; +@end + +// XorPlainMutableData is a simple way to keep passwords held in heap objects +// from being visible in memory dumps as plaintext +static void XorPlainMutableData(NSMutableData *mutableData) { + + // this helps avoid storing passwords on the heap in plaintext + const unsigned char theXORValue = 0x95; // 0x95 = 0xb10010101 + + unsigned char *dataPtr = [mutableData mutableBytes]; + NSUInteger length = [mutableData length]; + + for (NSUInteger idx = 0; idx < length; idx++) { + dataPtr[idx] ^= theXORValue; + } +} + +@implementation GTLClientLoginAuthorizationArgs + +@synthesize request = request_, + delegate = delegate_, + selector = sel_, + completionHandler = completionHandler_, + thread = thread_, + error = error_; + ++ (GTLClientLoginAuthorizationArgs *)argsWithRequest:(NSMutableURLRequest *)req + delegate:(id)delegate + selector:(SEL)sel + completionHandler:(id)completionHandler + thread:(NSThread *)thread { + GTLClientLoginAuthorizationArgs *obj; + obj = [[[GTLClientLoginAuthorizationArgs alloc] init] autorelease]; + obj.request = req; + obj.delegate = delegate; + obj.selector = sel; + obj.completionHandler = completionHandler; + obj.thread = thread; + return obj; +} + +- (void)dealloc { + self.request = nil; + self.delegate = nil; + self.selector = NULL; + self.completionHandler = nil; + self.thread = nil; + self.error = nil; + [super dealloc]; +} +@end + + +@implementation GTLClientLoginAuthentication + +@synthesize serviceID = serviceID_, + source = source_, + domain = domain_, + additionalParams = additionalParams_, + customHeaders = customHeaders_, + fetcher = fetcher_, + authorizationQueue = authorizationQueue_, + token = token_, + tokenIssueDate = tokenIssueDate_; + ++ (GTLClientLoginAuthentication *)authenticationForService:(NSString *)serviceID + source:(NSString *)applicationID { + GTLClientLoginAuthentication *auth; + auth = [[[GTLClientLoginAuthentication alloc] init] autorelease]; + auth.serviceID = serviceID; + auth.source = applicationID; + return auth; +} + +- (id)init { + self = [super init]; + if (self) { + authorizationQueue_ = [[NSMutableArray alloc] init]; + } + return self; +} + +- (NSString *)description { + return [NSString stringWithFormat:@"%@ %p: {%@}", + [self class], self, self.userEmail]; +} + +- (void)dealloc { + [serviceID_ release]; + [source_ release]; + [domain_ release]; + [additionalParams_ release]; + [customHeaders_ release]; + [userEmail_ release]; + [password_ release]; + [fetcher_ release]; + [authorizationQueue_ release]; + [token_ release]; + [tokenIssueDate_ release]; + + [super dealloc]; +} + +- (GTMHTTPFetcher *)clientLoginFetcher { + NSString *userEmail = self.userEmail; + NSString *password = self.password; + + GTL_DEBUG_ASSERT([userEmail length] > 0, @"Username missing"); + GTL_DEBUG_ASSERT([password length] > 0, @"Password missing"); + + NSString *domain = self.domain; + if ([domain length] == 0) { + domain = @"www.google.com"; + } + + // Unit tests may authenticate to a server running locally with + // a domain like "localhost:8080" + NSString *scheme = [domain hasPrefix:@"localhost:"] ? @"http" : @"https"; + + NSString *urlTemplate = @"%@://%@/accounts/ClientLogin"; + NSString *authURLString = [NSString stringWithFormat:urlTemplate, + scheme, domain]; + + NSURL *authURL = [NSURL URLWithString:authURLString]; + + NSMutableURLRequest *request; + request = [NSMutableURLRequest requestWithURL:authURL + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:60]; + + // Add custom request headers + NSDictionary *headers = self.customHeaders; + for (NSString *key in headers) { + NSString *value = [headers objectForKey:key]; + [request setValue:value forHTTPHeaderField:key]; + } + + NSString *source = self.source; + NSString *serviceID = self.serviceID; + + NSString *template = @"Email=%@&Passwd=%@&source=%@&service=%@&accountType=GOOGLE"; + NSString *postString = [NSString stringWithFormat:template, + [GTLUtilities stringByURLEncodingForURI:userEmail], + [GTLUtilities stringByURLEncodingForURI:password], + [GTLUtilities stringByURLEncodingForURI:source], + serviceID]; + + // Add custom post body parameters to the post string; typically params is + // nil, but it may have captcha token and answer + NSDictionary *params = self.additionalParams; + for (NSString *key in params) { + NSString *value = [params objectForKey:key]; + NSString *encValue = [GTLUtilities stringByURLEncodingForURI:value]; + postString = [postString stringByAppendingFormat:@"&%@=%@", + key, encValue]; + } + + // We're avoiding +[NSURCredential credentialWithUser:password:persistence:] + // because it fails to autorelease itself on OS X 10.4 .. 10.5.x + // rdar://5596278 + NSURLCredential *cred; + cred = [[[NSURLCredential alloc] initWithUser:userEmail + password:password + persistence:NSURLCredentialPersistenceForSession] autorelease]; + + GTMHTTPFetcher* fetcher = [GTMHTTPFetcher fetcherWithRequest:request]; + fetcher.comment = @"ClientLogin"; + fetcher.postData = [postString dataUsingEncoding:NSUTF8StringEncoding]; + fetcher.credential = cred; + fetcher.retryEnabled = YES; + fetcher.maxRetryInterval = 15; + + return fetcher; +} + +- (void)authorizeRequest:(NSMutableURLRequest *)request + delegate:(id)delegate + didFinishSelector:(SEL)sel { + GTMAssertSelectorNilOrImplementedWithArgs(delegate, sel, + @encode(GTLClientLoginAuthentication *), + @encode(NSMutableURLRequest *), + @encode(NSError *), 0); + GTLClientLoginAuthorizationArgs *args; + args = [GTLClientLoginAuthorizationArgs argsWithRequest:request + delegate:delegate + selector:sel + completionHandler:nil + thread:[NSThread currentThread]]; + [self authorizeRequestArgs:args]; +} + +#if NS_BLOCKS_AVAILABLE +// Authorizing with a completion block +- (void)authorizeRequest:(NSMutableURLRequest *)request + completionHandler:(void (^)(NSError *error))handler { + + GTLClientLoginAuthorizationArgs *args; + args = [GTLClientLoginAuthorizationArgs argsWithRequest:request + delegate:nil + selector:NULL + completionHandler:handler + thread:[NSThread currentThread]]; + [self authorizeRequestArgs:args]; +} +#endif + +- (void)authorizeRequestArgs:(GTLClientLoginAuthorizationArgs *)args { + + @synchronized(authorizationQueue_) { + BOOL hasToken = ([self.token length] > 0); + + if (hasToken) { + // If there's a token, ensure that it's not too old, which may happen + // if this app has been running for weeks. + // + // Google services can pick their own expiration interval for ClientLogin + // tokens, but the default and norm is 14 days. We'll force a fresh + // token fetch after 13 days. + NSDate *issueDate = self.tokenIssueDate; + if (issueDate) { + NSTimeInterval interval = [issueDate timeIntervalSinceNow]; + const NSTimeInterval kExpirationInterval = 60 * 60 * 24 * 13; + if (interval < - kExpirationInterval) { + self.token = nil; + hasToken = NO; + } + } + } + + if (hasToken) { + [self authorizeRequestImmediateArgs:args]; + } else { + // Attempt to fetch the token now; once we have a token, we will + // authorize the request and call back to the user + if (self.fetcher == nil) { + // There's not already a refresh pending + GTMHTTPFetcher *fetcher = [self clientLoginFetcher]; + [fetcher beginFetchWithDelegate:self + didFinishSelector:@selector(authFetcher:finishedWithData:error:)]; + self.fetcher = fetcher; + } else { + // There is already a pending fetcher, so this request can wait in the + // queue until it completes. + } + + [authorizationQueue_ addObject:args]; + } + } +} + +- (void)authFetcher:(GTMHTTPFetcher *)fetcher + finishedWithData:(NSData *)data + error:(NSError *)error { + @synchronized(authorizationQueue_) { + self.fetcher = nil; + + NSDictionary *responseDict = [[self class] dictionaryWithResponseData:data]; + NSString *token = [responseDict objectForKey:@"Auth"]; + + BOOL hasToken = ([token length] > 0); + self.token = (hasToken ? token : nil); + self.tokenIssueDate = (hasToken ? [NSDate date] : nil); + + // Swap in a new auth queue in case the callbacks try to immediately auth + // another request + NSArray *pendingAuthQueue = [NSArray arrayWithArray:authorizationQueue_]; + [authorizationQueue_ removeAllObjects]; + + if (error != nil && [responseDict count] > 0) { + // Show the caller the full error response + error = [NSError errorWithDomain:[error domain] + code:[error code] + userInfo:responseDict]; + } + + // Authorize and call back for all pending requests + for (GTLClientLoginAuthorizationArgs *args in pendingAuthQueue) { + if (!hasToken && args.error == nil) { + args.error = error; + } + [self authorizeRequestImmediateArgs:args]; + } + } +} + +- (void)authorizeRequestImmediateArgs:(GTLClientLoginAuthorizationArgs *)args { + // This authorization entry point never attempts to fetch the token, + // but does call the completion routine + NSMutableURLRequest *request = args.request; + + NSString *token = self.token; + if ([token length] > 0) { + if (request) { + // Add the token to the authorization header + NSString *value = [NSString stringWithFormat:@"GoogleLogin auth=%@", + token]; + [request setValue:value forHTTPHeaderField:@"Authorization"]; + } + + args.error = nil; + } else if (args.error == nil) { + NSDictionary *userInfo = nil; + if (request) { + userInfo = [NSDictionary dictionaryWithObject:request + forKey:kGTLClientLoginErrorRequestKey]; + } + args.error = [NSError errorWithDomain:kGTLClientLoginErrorDomain + code:kGTLClientLoginErrorAuthorizationFailed + userInfo:userInfo]; + } + + // Invoke any callbacks on the proper threads + if (args.delegate) { + NSThread *targetThread = args.thread; + BOOL isSameThread = [targetThread isEqual:[NSThread currentThread]]; + + [self performSelector:@selector(invokeCallbackArgs:) + onThread:targetThread + withObject:args + waitUntilDone:isSameThread]; + } +} + +- (void)invokeCallbackArgs:(GTLClientLoginAuthorizationArgs *)args { + // Invoke the callbacks + NSError *error = args.error; + + id delegate = args.delegate; + SEL sel = args.selector; + if (delegate && sel) { + NSMutableURLRequest *request = args.request; + + NSMethodSignature *sig = [delegate methodSignatureForSelector:sel]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; + [invocation setSelector:sel]; + [invocation setTarget:delegate]; + [invocation setArgument:&self atIndex:2]; + [invocation setArgument:&request atIndex:3]; + [invocation setArgument:&error atIndex:4]; + [invocation invoke]; + } + +#if NS_BLOCKS_AVAILABLE + id handler = args.completionHandler; + if (handler) { + void (^authCompletionBlock)(NSError *) = handler; + authCompletionBlock(error); + } +#endif +} + +- (void)stopAuthorization { + [self.fetcher stopFetching]; + self.fetcher = nil; +} + +- (void)stopAuthorizationForRequest:(NSURLRequest *)request { + @synchronized(authorizationQueue_) { + NSUInteger argIndex = 0; + BOOL found = NO; + for (GTLClientLoginAuthorizationArgs *args in authorizationQueue_) { + if ([args request] == request) { + found = YES; + break; + } + argIndex++; + } + + if (found) { + [authorizationQueue_ removeObjectAtIndex:argIndex]; + + // If the queue is now empty, go ahead and stop the fetcher. + if ([authorizationQueue_ count] == 0) { + [self stopAuthorization]; + } + } + } +} + +- (BOOL)isAuthorizingRequest:(NSURLRequest *)request { + BOOL wasFound = NO; + @synchronized(authorizationQueue_) { + for (GTLClientLoginAuthorizationArgs *args in authorizationQueue_) { + if ([args request] == request) { + wasFound = YES; + break; + } + } + } + return wasFound; +} + +- (BOOL)isAuthorizedRequest:(NSURLRequest *)request { + NSString *authStr = [request valueForHTTPHeaderField:@"Authorization"]; + return ([authStr length] > 0); +} + +- (void)waitForCompletionWithTimeout:(NSTimeInterval)timeoutInSeconds { + // If there is a refresh fetcher pending, wait for it. + // + // This is only intended for unit test or for use in command-line tools. + GTMHTTPFetcher *fetcher = self.fetcher; + [fetcher waitForCompletionWithTimeout:timeoutInSeconds]; +} + +- (BOOL)primeForRefresh { + if (self.userEmail == nil || self.password == nil) { + // Cannot refresh without username and password + return NO; + } + self.token = nil; + self.tokenIssueDate = nil; + return YES; +} + +#pragma mark - + +- (NSString *)userEmail { + return userEmail_; +} + +- (void)setUserEmail:(NSString *)str { + BOOL isChanging = (userEmail_ != str + && (str == nil || ![userEmail_ isEqual:str])); + if (isChanging) { + self.token = nil; + } + + [userEmail_ autorelease]; + userEmail_ = [str copy]; +} + +- (NSString *)password { + if (password_) { + XorPlainMutableData(password_); + NSString *result = [[[NSString alloc] initWithData:password_ + encoding:NSUTF8StringEncoding] autorelease]; + XorPlainMutableData(password_); + return result; + } + return nil; +} + +- (void)setPassword:(NSString *)str { + [password_ autorelease]; + + if (str) { + // Avoid holding the password in the heap in plaintext + const char *utf8password = [str UTF8String]; + size_t passwordLength = strlen(utf8password); + password_ = [[NSMutableData alloc] initWithBytes:utf8password + length:passwordLength]; + XorPlainMutableData(password_); + } else { + password_ = nil; + } +} + +#pragma mark - + ++ (NSDictionary *)dictionaryWithResponseData:(NSData *)data { + // Build a dictionary from a response string of the form + // "cat=fluffy \n dog=spot". + NSString *str = [[[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding] autorelease]; + if (str == nil) return nil; + + NSArray *allLines = [str componentsSeparatedByString:@"\n"]; + NSMutableDictionary *responseDict; + + responseDict = [NSMutableDictionary dictionaryWithCapacity:[allLines count]]; + + for (NSString *line in allLines) { + NSScanner *scanner = [NSScanner scannerWithString:line]; + NSString *key; + NSString *value; + + if ([scanner scanUpToString:@"=" intoString:&key] + && [scanner scanString:@"=" intoString:NULL] + && [scanner scanUpToString:@"\n" intoString:&value]) { + + [responseDict setObject:value forKey:key]; + } + } + return responseDict; +} + +@end diff --git a/GTL/Source/OAuth2/.svn/all-wcprops b/GTL/Source/OAuth2/.svn/all-wcprops new file mode 100644 index 0000000..be5f05f --- /dev/null +++ b/GTL/Source/OAuth2/.svn/all-wcprops @@ -0,0 +1,35 @@ +K 25 +svn:wc:ra_dav:version-url +V 29 +/svn/!svn/ver/99/trunk/Source +END +GTMOAuth2Authentication.h +K 25 +svn:wc:ra_dav:version-url +V 55 +/svn/!svn/ver/99/trunk/Source/GTMOAuth2Authentication.h +END +GTMOAuth2Authentication.m +K 25 +svn:wc:ra_dav:version-url +V 55 +/svn/!svn/ver/99/trunk/Source/GTMOAuth2Authentication.m +END +ReleaseNotes.txt +K 25 +svn:wc:ra_dav:version-url +V 46 +/svn/!svn/ver/92/trunk/Source/ReleaseNotes.txt +END +GTMOAuth2SignIn.h +K 25 +svn:wc:ra_dav:version-url +V 47 +/svn/!svn/ver/90/trunk/Source/GTMOAuth2SignIn.h +END +GTMOAuth2SignIn.m +K 25 +svn:wc:ra_dav:version-url +V 47 +/svn/!svn/ver/99/trunk/Source/GTMOAuth2SignIn.m +END diff --git a/GTL/Source/OAuth2/.svn/entries b/GTL/Source/OAuth2/.svn/entries new file mode 100644 index 0000000..4770343 --- /dev/null +++ b/GTL/Source/OAuth2/.svn/entries @@ -0,0 +1,207 @@ +10 + +dir +99 +http://gtm-oauth2.googlecode.com/svn/trunk/Source +http://gtm-oauth2.googlecode.com/svn + + + +2012-12-06T21:23:57.582218Z +99 +grobbins@google.com + + + + + + + + + + + + + + +22754eea-fc93-e339-b032-c1f495b90c16 + +Mac +dir + +GTMOAuth2Authentication.h +file + + + + +2012-12-09T08:42:42.000000Z +753fe2fc2dcdf273ea8429ac1b7b755c +2012-12-06T21:23:57.582218Z +99 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +13231 + +Touch +dir + +GTMOAuth2Authentication.m +file + + + + +2012-12-09T08:42:42.000000Z +d737b7c62457b21c76ce117c9d3705ff +2012-12-06T21:23:57.582218Z +99 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +40235 + +GTMOAuth2.xcodeproj +dir + +ReleaseNotes.txt +file + + + + +2012-12-09T08:42:42.000000Z +13ea24557d5f981ec4c483f0e1ea2e3e +2012-08-11T03:08:28.046869Z +92 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2878 + +GTMOAuth2SignIn.h +file + + + + +2012-12-09T08:42:42.000000Z +55318f1646339168ab6866383c8b5656 +2012-07-28T00:59:42.100910Z +90 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +6464 + +GTMOAuth2SignIn.m +file + + + + +2012-12-09T08:42:42.000000Z +5da464081d6862b633aff7c1fccc935b +2012-12-06T21:23:57.582218Z +99 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +28407 + diff --git a/GTL/Source/OAuth2/.svn/text-base/GTMOAuth2Authentication.h.svn-base b/GTL/Source/OAuth2/.svn/text-base/GTMOAuth2Authentication.h.svn-base new file mode 100644 index 0000000..8a7155a --- /dev/null +++ b/GTL/Source/OAuth2/.svn/text-base/GTMOAuth2Authentication.h.svn-base @@ -0,0 +1,333 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES + +// This class implements the OAuth 2 protocol for authorizing requests. +// http://tools.ietf.org/html/draft-ietf-oauth-v2 + +#import + +// GTMHTTPFetcher.h brings in GTLDefines/GDataDefines +#import "GTMHTTPFetcher.h" + +#undef _EXTERN +#undef _INITIALIZE_AS +#ifdef GTMOAUTH2AUTHENTICATION_DEFINE_GLOBALS + #define _EXTERN + #define _INITIALIZE_AS(x) =x +#else + #if defined(__cplusplus) + #define _EXTERN extern "C" + #else + #define _EXTERN extern + #endif + #define _INITIALIZE_AS(x) +#endif + +// Until all OAuth 2 providers are up to the same spec, we'll provide a crude +// way here to override the "Bearer" string in the Authorization header +#ifndef GTM_OAUTH2_BEARER +#define GTM_OAUTH2_BEARER "Bearer" +#endif + +// Service provider name allows stored authorization to be associated with +// the authorizing service +_EXTERN NSString* const kGTMOAuth2ServiceProviderGoogle _INITIALIZE_AS(@"Google"); + +// +// GTMOAuth2SignIn constants, included here for use by clients +// +_EXTERN NSString* const kGTMOAuth2ErrorDomain _INITIALIZE_AS(@"com.google.GTMOAuth2"); + +// Error userInfo keys +_EXTERN NSString* const kGTMOAuth2ErrorMessageKey _INITIALIZE_AS(@"error"); +_EXTERN NSString* const kGTMOAuth2ErrorRequestKey _INITIALIZE_AS(@"request"); +_EXTERN NSString* const kGTMOAuth2ErrorJSONKey _INITIALIZE_AS(@"json"); + +enum { + // Error code indicating that the window was prematurely closed + kGTMOAuth2ErrorWindowClosed = -1000, + kGTMOAuth2ErrorAuthorizationFailed = -1001, + kGTMOAuth2ErrorTokenExpired = -1002, + kGTMOAuth2ErrorTokenUnavailable = -1003, + kGTMOAuth2ErrorUnauthorizableRequest = -1004 +}; + + +// Notifications for token fetches +_EXTERN NSString* const kGTMOAuth2FetchStarted _INITIALIZE_AS(@"kGTMOAuth2FetchStarted"); +_EXTERN NSString* const kGTMOAuth2FetchStopped _INITIALIZE_AS(@"kGTMOAuth2FetchStopped"); + +_EXTERN NSString* const kGTMOAuth2FetcherKey _INITIALIZE_AS(@"fetcher"); +_EXTERN NSString* const kGTMOAuth2FetchTypeKey _INITIALIZE_AS(@"FetchType"); +_EXTERN NSString* const kGTMOAuth2FetchTypeToken _INITIALIZE_AS(@"token"); +_EXTERN NSString* const kGTMOAuth2FetchTypeRefresh _INITIALIZE_AS(@"refresh"); +_EXTERN NSString* const kGTMOAuth2FetchTypeAssertion _INITIALIZE_AS(@"assertion"); +_EXTERN NSString* const kGTMOAuth2FetchTypeUserInfo _INITIALIZE_AS(@"userInfo"); + +// Token-issuance errors +_EXTERN NSString* const kGTMOAuth2ErrorKey _INITIALIZE_AS(@"error"); + +_EXTERN NSString* const kGTMOAuth2ErrorInvalidRequest _INITIALIZE_AS(@"invalid_request"); +_EXTERN NSString* const kGTMOAuth2ErrorInvalidClient _INITIALIZE_AS(@"invalid_client"); +_EXTERN NSString* const kGTMOAuth2ErrorInvalidGrant _INITIALIZE_AS(@"invalid_grant"); +_EXTERN NSString* const kGTMOAuth2ErrorUnauthorizedClient _INITIALIZE_AS(@"unauthorized_client"); +_EXTERN NSString* const kGTMOAuth2ErrorUnsupportedGrantType _INITIALIZE_AS(@"unsupported_grant_type"); +_EXTERN NSString* const kGTMOAuth2ErrorInvalidScope _INITIALIZE_AS(@"invalid_scope"); + +// Notification that sign-in has completed, and token fetches will begin (useful +// for displaying interstitial messages after the window has closed) +_EXTERN NSString* const kGTMOAuth2UserSignedIn _INITIALIZE_AS(@"kGTMOAuth2UserSignedIn"); + +// Notification for token changes +_EXTERN NSString* const kGTMOAuth2AccessTokenRefreshed _INITIALIZE_AS(@"kGTMOAuth2AccessTokenRefreshed"); +_EXTERN NSString* const kGTMOAuth2RefreshTokenChanged _INITIALIZE_AS(@"kGTMOAuth2RefreshTokenChanged"); + +// Notification for WebView loading +_EXTERN NSString* const kGTMOAuth2WebViewStartedLoading _INITIALIZE_AS(@"kGTMOAuth2WebViewStartedLoading"); +_EXTERN NSString* const kGTMOAuth2WebViewStoppedLoading _INITIALIZE_AS(@"kGTMOAuth2WebViewStoppedLoading"); +_EXTERN NSString* const kGTMOAuth2WebViewKey _INITIALIZE_AS(@"kGTMOAuth2WebViewKey"); +_EXTERN NSString* const kGTMOAuth2WebViewStopKindKey _INITIALIZE_AS(@"kGTMOAuth2WebViewStopKindKey"); +_EXTERN NSString* const kGTMOAuth2WebViewFinished _INITIALIZE_AS(@"finished"); +_EXTERN NSString* const kGTMOAuth2WebViewFailed _INITIALIZE_AS(@"failed"); +_EXTERN NSString* const kGTMOAuth2WebViewCancelled _INITIALIZE_AS(@"cancelled"); + +// Notification for network loss during html sign-in display +_EXTERN NSString* const kGTMOAuth2NetworkLost _INITIALIZE_AS(@"kGTMOAuthNetworkLost"); +_EXTERN NSString* const kGTMOAuth2NetworkFound _INITIALIZE_AS(@"kGTMOAuthNetworkFound"); + +@interface GTMOAuth2Authentication : NSObject { + @private + NSString *clientID_; + NSString *clientSecret_; + NSString *redirectURI_; + NSMutableDictionary *parameters_; + + // authorization parameters + NSURL *tokenURL_; + NSDate *expirationDate_; + + NSDictionary *additionalTokenRequestParameters_; + + // queue of requests for authorization waiting for a valid access token + GTMHTTPFetcher *refreshFetcher_; + NSMutableArray *authorizationQueue_; + + id fetcherService_; // WEAK + + Class parserClass_; + + BOOL shouldAuthorizeAllRequests_; + + // arbitrary data retained for the user + id userData_; + NSMutableDictionary *properties_; +} + +// OAuth2 standard protocol parameters +// +// These should be the plain strings; any needed escaping will be provided by +// the library. + +// Request properties +@property (copy) NSString *clientID; +@property (copy) NSString *clientSecret; +@property (copy) NSString *redirectURI; +@property (retain) NSString *scope; +@property (retain) NSString *tokenType; +@property (retain) NSString *assertion; +@property (retain) NSString *refreshScope; + +// Apps may optionally add parameters here to be provided to the token +// endpoint on token requests and refreshes +@property (retain) NSDictionary *additionalTokenRequestParameters; + +// Response properties +@property (retain) NSMutableDictionary *parameters; + +@property (retain) NSString *accessToken; +@property (retain) NSString *refreshToken; +@property (retain) NSNumber *expiresIn; +@property (retain) NSString *code; +@property (retain) NSString *errorString; + +// URL for obtaining access tokens +@property (copy) NSURL *tokenURL; + +// Calculated expiration date (expiresIn seconds added to the +// time the access token was received.) +@property (copy) NSDate *expirationDate; + +// Service identifier, like "Google"; not used for authentication +// +// The provider name is just for allowing stored authorization to be associated +// with the authorizing service. +@property (copy) NSString *serviceProvider; + +// User ID; not used for authentication +@property (retain) NSString *userID; + +// User email and verified status; not used for authentication +// +// The verified string can be checked with -boolValue. If the result is false, +// then the email address is listed with the account on the server, but the +// address has not been confirmed as belonging to the owner of the account. +@property (retain) NSString *userEmail; +@property (retain) NSString *userEmailIsVerified; + +// Property indicating if this auth has a refresh or access token so is suitable +// for authorizing a request. This does not guarantee that the token is valid. +@property (readonly) BOOL canAuthorize; + +// Property indicating if this object will authorize plain http request +// (as well as any non-https requests.) Default is NO, only requests with the +// scheme https are authorized, since security may be compromised if tokens +// are sent over the wire using an unencrypted protocol like http. +@property (assign) BOOL shouldAuthorizeAllRequests; + +// userData is retained for the convenience of the caller +@property (retain) id userData; + +// Stored property values are retained for the convenience of the caller +@property (retain) NSDictionary *properties; + +// Property for the optional fetcher service instance to be used to create +// fetchers +// +// Fetcher service objects retain authorizations, so this is weak to avoid +// circular retains. +@property (assign) id fetcherService; // WEAK + +// Alternative JSON parsing class; this should implement the +// GTMOAuth2ParserClass informal protocol. If this property is +// not set, the class SBJSON must be available in the runtime. +@property (assign) Class parserClass; + +// Convenience method for creating an authentication object ++ (id)authenticationWithServiceProvider:(NSString *)serviceProvider + tokenURL:(NSURL *)tokenURL + redirectURI:(NSString *)redirectURI + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret; + +// Clear out any authentication values, prepare for a new request fetch +- (void)reset; + +// Main authorization entry points +// +// These will refresh the access token, if necessary, add the access token to +// the request, then invoke the callback. +// +// The request argument may be nil to just force a refresh of the access token, +// if needed. +// +// NOTE: To avoid accidental leaks of bearer tokens, the request must +// be for a URL with the scheme https unless the shouldAuthorizeAllRequests +// property is set. + +// The finish selector should have a signature matching +// - (void)authentication:(GTMOAuth2Authentication *)auth +// request:(NSMutableURLRequest *)request +// finishedWithError:(NSError *)error; + +- (void)authorizeRequest:(NSMutableURLRequest *)request + delegate:(id)delegate + didFinishSelector:(SEL)sel; + +#if NS_BLOCKS_AVAILABLE +- (void)authorizeRequest:(NSMutableURLRequest *)request + completionHandler:(void (^)(NSError *error))handler; +#endif + +// Synchronous entry point; authorizing this way cannot refresh an expired +// access token +- (BOOL)authorizeRequest:(NSMutableURLRequest *)request; + +// If the authentication is waiting for a refresh to complete, spin the run +// loop, discarding events, until the fetch has completed +// +// This is only for use in testing or in tools without a user interface. +- (void)waitForCompletionWithTimeout:(NSTimeInterval)timeoutInSeconds; + + +////////////////////////////////////////////////////////////////////////////// +// +// Internal properties and methods for use by GTMOAuth2SignIn +// + +// Pending fetcher to get a new access token, if any +@property (retain) GTMHTTPFetcher *refreshFetcher; + +// Check if a request is queued up to be authorized +- (BOOL)isAuthorizingRequest:(NSURLRequest *)request; + +// Check if a request appears to be authorized +- (BOOL)isAuthorizedRequest:(NSURLRequest *)request; + +// Stop any pending refresh fetch. This will also cancel the authorization +// for all fetch requests pending authorization. +- (void)stopAuthorization; + +// Prevents authorization callback for a given request. +- (void)stopAuthorizationForRequest:(NSURLRequest *)request; + +// OAuth fetch user-agent header value +- (NSString *)userAgent; + +// Parse and set token and token secret from response data +- (void)setKeysForResponseString:(NSString *)str; +- (void)setKeysForResponseDictionary:(NSDictionary *)dict; + +// Persistent token string for keychain storage +// +// We'll use the format "refresh_token=foo&serviceProvider=bar" so we can +// easily alter what portions of the auth data are stored +// +// Use these methods for serialization +- (NSString *)persistenceResponseString; +- (void)setKeysForPersistenceResponseString:(NSString *)str; + +// method to begin fetching an access token, used by the sign-in object +- (GTMHTTPFetcher *)beginTokenFetchWithDelegate:(id)delegate + didFinishSelector:(SEL)finishedSel; + +// Entry point to post a notification about a fetcher currently used for +// obtaining or refreshing a token; the sign-in object will also use this +// to indicate when the user's email address is being fetched. +// +// Fetch type constants are above under "notifications for token fetches" +- (void)notifyFetchIsRunning:(BOOL)isStarting + fetcher:(GTMHTTPFetcher *)fetcher + type:(NSString *)fetchType; + +// Arbitrary key-value properties retained for the user +- (void)setProperty:(id)obj forKey:(NSString *)key; +- (id)propertyForKey:(NSString *)key; + +// +// Utilities +// + ++ (NSString *)encodedOAuthValueForString:(NSString *)str; + ++ (NSString *)encodedQueryParametersForDictionary:(NSDictionary *)dict; + ++ (NSDictionary *)dictionaryWithResponseString:(NSString *)responseStr; + ++ (NSString *)scopeWithStrings:(NSString *)firsStr, ... NS_REQUIRES_NIL_TERMINATION; +@end + +#endif // GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES diff --git a/GTL/Source/OAuth2/.svn/text-base/GTMOAuth2Authentication.m.svn-base b/GTL/Source/OAuth2/.svn/text-base/GTMOAuth2Authentication.m.svn-base new file mode 100644 index 0000000..0ea5fd7 --- /dev/null +++ b/GTL/Source/OAuth2/.svn/text-base/GTMOAuth2Authentication.m.svn-base @@ -0,0 +1,1231 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES + +#define GTMOAUTH2AUTHENTICATION_DEFINE_GLOBALS 1 +#import "GTMOAuth2Authentication.h" + +// standard OAuth keys +static NSString *const kOAuth2AccessTokenKey = @"access_token"; +static NSString *const kOAuth2RefreshTokenKey = @"refresh_token"; +static NSString *const kOAuth2ClientIDKey = @"client_id"; +static NSString *const kOAuth2ClientSecretKey = @"client_secret"; +static NSString *const kOAuth2RedirectURIKey = @"redirect_uri"; +static NSString *const kOAuth2ResponseTypeKey = @"response_type"; +static NSString *const kOAuth2ScopeKey = @"scope"; +static NSString *const kOAuth2ErrorKey = @"error"; +static NSString *const kOAuth2TokenTypeKey = @"token_type"; +static NSString *const kOAuth2ExpiresInKey = @"expires_in"; +static NSString *const kOAuth2CodeKey = @"code"; +static NSString *const kOAuth2AssertionKey = @"assertion"; +static NSString *const kOAuth2RefreshScopeKey = @"refreshScope"; + +// additional persistent keys +static NSString *const kServiceProviderKey = @"serviceProvider"; +static NSString *const kUserIDKey = @"userID"; +static NSString *const kUserEmailKey = @"email"; +static NSString *const kUserEmailIsVerifiedKey = @"isVerified"; + +// fetcher keys +static NSString *const kTokenFetchDelegateKey = @"delegate"; +static NSString *const kTokenFetchSelectorKey = @"sel"; + +static NSString *const kRefreshFetchArgsKey = @"requestArgs"; + +// If GTMNSJSONSerialization is available, it is used for formatting JSON +#if (TARGET_OS_MAC && !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED < 1070)) || \ + (TARGET_OS_IPHONE && (__IPHONE_OS_VERSION_MAX_ALLOWED < 50000)) +@interface GTMNSJSONSerialization : NSObject ++ (id)JSONObjectWithData:(NSData *)data options:(NSUInteger)opt error:(NSError **)error; +@end +#endif + +@interface GTMOAuth2ParserClass : NSObject +// just enough of SBJSON to be able to parse +- (id)objectWithString:(NSString*)repr error:(NSError**)error; +@end + +// wrapper class for requests needing authorization and their callbacks +@interface GTMOAuth2AuthorizationArgs : NSObject { + @private + NSMutableURLRequest *request_; + id delegate_; + SEL sel_; + id completionHandler_; + NSThread *thread_; + NSError *error_; +} + +@property (retain) NSMutableURLRequest *request; +@property (retain) id delegate; +@property (assign) SEL selector; +@property (copy) id completionHandler; +@property (retain) NSThread *thread; +@property (retain) NSError *error; + ++ (GTMOAuth2AuthorizationArgs *)argsWithRequest:(NSMutableURLRequest *)req + delegate:(id)delegate + selector:(SEL)sel + completionHandler:(id)completionHandler + thread:(NSThread *)thread; +@end + +@implementation GTMOAuth2AuthorizationArgs + +@synthesize request = request_, + delegate = delegate_, + selector = sel_, + completionHandler = completionHandler_, + thread = thread_, + error = error_; + ++ (GTMOAuth2AuthorizationArgs *)argsWithRequest:(NSMutableURLRequest *)req + delegate:(id)delegate + selector:(SEL)sel + completionHandler:(id)completionHandler + thread:(NSThread *)thread { + GTMOAuth2AuthorizationArgs *obj; + obj = [[[GTMOAuth2AuthorizationArgs alloc] init] autorelease]; + obj.request = req; + obj.delegate = delegate; + obj.selector = sel; + obj.completionHandler = completionHandler; + obj.thread = thread; + return obj; +} + +- (void)dealloc { + [request_ release]; + [delegate_ release]; + [completionHandler_ release]; + [thread_ release]; + [error_ release]; + + [super dealloc]; +} +@end + + +@interface GTMOAuth2Authentication () + +@property (retain) NSMutableArray *authorizationQueue; + +- (void)setKeysForResponseJSONData:(NSData *)data; + +- (BOOL)authorizeRequestArgs:(GTMOAuth2AuthorizationArgs *)args; + +- (BOOL)authorizeRequestImmediateArgs:(GTMOAuth2AuthorizationArgs *)args; + +- (BOOL)shouldRefreshAccessToken; + +- (void)updateExpirationDate; + +- (NSDictionary *)dictionaryWithJSONData:(NSData *)data; + +- (void)tokenFetcher:(GTMHTTPFetcher *)fetcher + finishedWithData:(NSData *)data + error:(NSError *)error; + +- (void)auth:(GTMOAuth2Authentication *)auth +finishedRefreshWithFetcher:(GTMHTTPFetcher *)fetcher + error:(NSError *)error; + +- (void)invokeCallbackArgs:(GTMOAuth2AuthorizationArgs *)args; + ++ (void)invokeDelegate:(id)delegate + selector:(SEL)sel + object:(id)obj1 + object:(id)obj2 + object:(id)obj3; + ++ (NSString *)unencodedOAuthParameterForString:(NSString *)str; ++ (NSString *)encodedQueryParametersForDictionary:(NSDictionary *)dict; + ++ (NSDictionary *)dictionaryWithResponseData:(NSData *)data; + +@end + +@implementation GTMOAuth2Authentication + +@synthesize clientID = clientID_, + clientSecret = clientSecret_, + redirectURI = redirectURI_, + parameters = parameters_, + tokenURL = tokenURL_, + expirationDate = expirationDate_, + additionalTokenRequestParameters = additionalTokenRequestParameters_, + refreshFetcher = refreshFetcher_, + fetcherService = fetcherService_, + parserClass = parserClass_, + shouldAuthorizeAllRequests = shouldAuthorizeAllRequests_, + userData = userData_, + properties = properties_, + authorizationQueue = authorizationQueue_; + +// Response parameters +@dynamic accessToken, + refreshToken, + code, + assertion, + refreshScope, + errorString, + tokenType, + scope, + expiresIn, + serviceProvider, + userEmail, + userEmailIsVerified; + +@dynamic canAuthorize; + ++ (id)authenticationWithServiceProvider:(NSString *)serviceProvider + tokenURL:(NSURL *)tokenURL + redirectURI:(NSString *)redirectURI + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret { + GTMOAuth2Authentication *obj = [[[self alloc] init] autorelease]; + obj.serviceProvider = serviceProvider; + obj.tokenURL = tokenURL; + obj.redirectURI = redirectURI; + obj.clientID = clientID; + obj.clientSecret = clientSecret; + return obj; +} + +- (id)init { + self = [super init]; + if (self) { + authorizationQueue_ = [[NSMutableArray alloc] init]; + parameters_ = [[NSMutableDictionary alloc] init]; + } + return self; +} + +- (NSString *)description { + NSArray *props = [NSArray arrayWithObjects:@"accessToken", @"refreshToken", + @"code", @"assertion", @"expirationDate", @"errorString", + nil]; + NSMutableString *valuesStr = [NSMutableString string]; + NSString *separator = @""; + for (NSString *prop in props) { + id result = [self valueForKey:prop]; + if (result) { + [valuesStr appendFormat:@"%@%@=\"%@\"", separator, prop, result]; + separator = @", "; + } + } + + return [NSString stringWithFormat:@"%@ %p: {%@}", + [self class], self, valuesStr]; +} + +- (void)dealloc { + [clientID_ release]; + [clientSecret_ release]; + [redirectURI_ release]; + [parameters_ release]; + [tokenURL_ release]; + [expirationDate_ release]; + [additionalTokenRequestParameters_ release]; + [refreshFetcher_ release]; + [authorizationQueue_ release]; + [userData_ release]; + [properties_ release]; + + [super dealloc]; +} + +#pragma mark - + +- (void)setKeysForResponseDictionary:(NSDictionary *)dict { + if (dict == nil) return; + + // If a new code or access token is being set, remove the old expiration + NSString *newCode = [dict objectForKey:kOAuth2CodeKey]; + NSString *newAccessToken = [dict objectForKey:kOAuth2AccessTokenKey]; + if (newCode || newAccessToken) { + self.expiresIn = nil; + } + + BOOL didRefreshTokenChange = NO; + NSString *refreshToken = [dict objectForKey:kOAuth2RefreshTokenKey]; + if (refreshToken) { + NSString *priorRefreshToken = self.refreshToken; + + if (priorRefreshToken != refreshToken + && (priorRefreshToken == nil + || ![priorRefreshToken isEqual:refreshToken])) { + didRefreshTokenChange = YES; + } + } + + [self.parameters addEntriesFromDictionary:dict]; + [self updateExpirationDate]; + + if (didRefreshTokenChange) { + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc postNotificationName:kGTMOAuth2RefreshTokenChanged + object:self + userInfo:nil]; + } + // NSLog(@"keys set ----------------------------\n%@", dict); +} + +- (void)setKeysForResponseString:(NSString *)str { + NSDictionary *dict = [[self class] dictionaryWithResponseString:str]; + [self setKeysForResponseDictionary:dict]; +} + +- (void)setKeysForResponseJSONData:(NSData *)data { + NSDictionary *dict = [self dictionaryWithJSONData:data]; + [self setKeysForResponseDictionary:dict]; +} + +- (NSDictionary *)dictionaryWithJSONData:(NSData *)data { + NSMutableDictionary *obj = nil; + NSError *error = nil; + + Class serializer = NSClassFromString(@"NSJSONSerialization"); + if (serializer) { + const NSUInteger kOpts = (1UL << 0); // NSJSONReadingMutableContainers + obj = [serializer JSONObjectWithData:data + options:kOpts + error:&error]; +#if DEBUG + if (error) { + NSString *str = [[[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding] autorelease]; + NSLog(@"NSJSONSerialization error %@ parsing %@", + error, str); + } +#endif + return obj; + } else { + // try SBJsonParser or SBJSON + Class jsonParseClass = NSClassFromString(@"SBJsonParser"); + if (!jsonParseClass) { + jsonParseClass = NSClassFromString(@"SBJSON"); + } + if (jsonParseClass) { + GTMOAuth2ParserClass *parser = [[[jsonParseClass alloc] init] autorelease]; + NSString *jsonStr = [[[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding] autorelease]; + if (jsonStr) { + obj = [parser objectWithString:jsonStr error:&error]; +#if DEBUG + if (error) { + NSLog(@"%@ error %@ parsing %@", NSStringFromClass(jsonParseClass), + error, jsonStr); + } +#endif + return obj; + } + } else { +#if DEBUG + NSAssert(0, @"GTMOAuth2Authentication: No parser available"); +#endif + } + } + return nil; +} + +#pragma mark Authorizing Requests + +// General entry point for authorizing requests + +#if NS_BLOCKS_AVAILABLE +// Authorizing with a completion block +- (void)authorizeRequest:(NSMutableURLRequest *)request + completionHandler:(void (^)(NSError *error))handler { + + GTMOAuth2AuthorizationArgs *args; + args = [GTMOAuth2AuthorizationArgs argsWithRequest:request + delegate:nil + selector:NULL + completionHandler:handler + thread:[NSThread currentThread]]; + [self authorizeRequestArgs:args]; +} +#endif + +// Authorizing with a callback selector +// +// Selector has the signature +// - (void)authentication:(GTMOAuth2Authentication *)auth +// request:(NSMutableURLRequest *)request +// finishedWithError:(NSError *)error; +- (void)authorizeRequest:(NSMutableURLRequest *)request + delegate:(id)delegate + didFinishSelector:(SEL)sel { + GTMAssertSelectorNilOrImplementedWithArgs(delegate, sel, + @encode(GTMOAuth2Authentication *), + @encode(NSMutableURLRequest *), + @encode(NSError *), 0); + + GTMOAuth2AuthorizationArgs *args; + args = [GTMOAuth2AuthorizationArgs argsWithRequest:request + delegate:delegate + selector:sel + completionHandler:nil + thread:[NSThread currentThread]]; + [self authorizeRequestArgs:args]; +} + +// Internal routine common to delegate and block invocations +- (BOOL)authorizeRequestArgs:(GTMOAuth2AuthorizationArgs *)args { + BOOL didAttempt = NO; + + @synchronized(authorizationQueue_) { + + BOOL shouldRefresh = [self shouldRefreshAccessToken]; + + if (shouldRefresh) { + // attempt to refresh now; once we have a fresh access token, we will + // authorize the request and call back to the user + didAttempt = YES; + + if (self.refreshFetcher == nil) { + // there's not already a refresh pending + SEL finishedSel = @selector(auth:finishedRefreshWithFetcher:error:); + self.refreshFetcher = [self beginTokenFetchWithDelegate:self + didFinishSelector:finishedSel]; + if (self.refreshFetcher) { + [authorizationQueue_ addObject:args]; + } + } else { + // there's already a refresh pending + [authorizationQueue_ addObject:args]; + } + } + + if (!shouldRefresh || self.refreshFetcher == nil) { + // we're not fetching a new access token, so we can authorize the request + // now + didAttempt = [self authorizeRequestImmediateArgs:args]; + } + } + return didAttempt; +} + +- (void)auth:(GTMOAuth2Authentication *)auth +finishedRefreshWithFetcher:(GTMHTTPFetcher *)fetcher + error:(NSError *)error { + @synchronized(authorizationQueue_) { + // If there's an error, we want to try using the old access token anyway, + // in case it's a backend problem preventing refresh, in which case + // access tokens past their expiration date may still work + + self.refreshFetcher = nil; + + // Swap in a new auth queue in case the callbacks try to immediately auth + // another request + NSArray *pendingAuthQueue = [NSArray arrayWithArray:authorizationQueue_]; + [authorizationQueue_ removeAllObjects]; + + BOOL hasAccessToken = ([self.accessToken length] > 0); + + if (hasAccessToken && error == nil) { + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc postNotificationName:kGTMOAuth2AccessTokenRefreshed + object:self + userInfo:nil]; + } + + for (GTMOAuth2AuthorizationArgs *args in pendingAuthQueue) { + if (!hasAccessToken && args.error == nil) { + args.error = error; + } + + [self authorizeRequestImmediateArgs:args]; + } + } +} + +- (BOOL)isAuthorizingRequest:(NSURLRequest *)request { + BOOL wasFound = NO; + @synchronized(authorizationQueue_) { + for (GTMOAuth2AuthorizationArgs *args in authorizationQueue_) { + if ([args request] == request) { + wasFound = YES; + break; + } + } + } + return wasFound; +} + +- (BOOL)isAuthorizedRequest:(NSURLRequest *)request { + NSString *authStr = [request valueForHTTPHeaderField:@"Authorization"]; + return ([authStr length] > 0); +} + +- (void)stopAuthorization { + @synchronized(authorizationQueue_) { + [authorizationQueue_ removeAllObjects]; + + [self.refreshFetcher stopFetching]; + self.refreshFetcher = nil; + } +} + +- (void)stopAuthorizationForRequest:(NSURLRequest *)request { + @synchronized(authorizationQueue_) { + NSUInteger argIndex = 0; + BOOL found = NO; + for (GTMOAuth2AuthorizationArgs *args in authorizationQueue_) { + if ([args request] == request) { + found = YES; + break; + } + argIndex++; + } + + if (found) { + [authorizationQueue_ removeObjectAtIndex:argIndex]; + + // If the queue is now empty, go ahead and stop the fetcher. + if ([authorizationQueue_ count] == 0) { + [self stopAuthorization]; + } + } + } +} + +- (BOOL)authorizeRequestImmediateArgs:(GTMOAuth2AuthorizationArgs *)args { + // This authorization entry point never attempts to refresh the access token, + // but does call the completion routine + + NSMutableURLRequest *request = args.request; + + NSString *scheme = [[request URL] scheme]; + BOOL isAuthorizableRequest = self.shouldAuthorizeAllRequests + || [scheme caseInsensitiveCompare:@"https"] == NSOrderedSame; + if (!isAuthorizableRequest) { + // Request is not https, so may be insecure + // + // The NSError will be created below +#if DEBUG + NSLog(@"Cannot authorize request with scheme %@ (%@)", scheme, request); +#endif + } + + NSString *accessToken = self.accessToken; + if (isAuthorizableRequest && [accessToken length] > 0) { + if (request) { + // we have a likely valid access token + NSString *value = [NSString stringWithFormat:@"%s %@", + GTM_OAUTH2_BEARER, accessToken]; + [request setValue:value forHTTPHeaderField:@"Authorization"]; + } + + // We've authorized the request, even if the previous refresh + // failed with an error + args.error = nil; + } else if (args.error == nil) { + NSDictionary *userInfo = nil; + if (request) { + userInfo = [NSDictionary dictionaryWithObject:request + forKey:kGTMOAuth2ErrorRequestKey]; + } + NSInteger code = (isAuthorizableRequest ? + kGTMOAuth2ErrorAuthorizationFailed : + kGTMOAuth2ErrorUnauthorizableRequest); + args.error = [NSError errorWithDomain:kGTMOAuth2ErrorDomain + code:code + userInfo:userInfo]; + } + + // Invoke any callbacks on the proper thread + if (args.delegate || args.completionHandler) { + NSThread *targetThread = args.thread; + BOOL isSameThread = [targetThread isEqual:[NSThread currentThread]]; + + if (isSameThread) { + [self invokeCallbackArgs:args]; + } else { + SEL sel = @selector(invokeCallbackArgs:); + NSOperationQueue *delegateQueue = self.fetcherService.delegateQueue; + if (delegateQueue) { + NSInvocationOperation *op; + op = [[[NSInvocationOperation alloc] initWithTarget:self + selector:sel + object:args] autorelease]; + [delegateQueue addOperation:op]; + } else { + [self performSelector:sel + onThread:targetThread + withObject:args + waitUntilDone:NO]; + } + } + } + + BOOL didAuth = (args.error == nil); + return didAuth; +} + +- (void)invokeCallbackArgs:(GTMOAuth2AuthorizationArgs *)args { + // Invoke the callbacks + NSError *error = args.error; + + id delegate = args.delegate; + SEL sel = args.selector; + if (delegate && sel) { + NSMutableURLRequest *request = args.request; + + NSMethodSignature *sig = [delegate methodSignatureForSelector:sel]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; + [invocation setSelector:sel]; + [invocation setTarget:delegate]; + [invocation setArgument:&self atIndex:2]; + [invocation setArgument:&request atIndex:3]; + [invocation setArgument:&error atIndex:4]; + [invocation invoke]; + } + +#if NS_BLOCKS_AVAILABLE + id handler = args.completionHandler; + if (handler) { + void (^authCompletionBlock)(NSError *) = handler; + authCompletionBlock(error); + } +#endif +} + +- (BOOL)authorizeRequest:(NSMutableURLRequest *)request { + // Entry point for synchronous authorization mechanisms + GTMOAuth2AuthorizationArgs *args; + args = [GTMOAuth2AuthorizationArgs argsWithRequest:request + delegate:nil + selector:NULL + completionHandler:nil + thread:[NSThread currentThread]]; + return [self authorizeRequestImmediateArgs:args]; +} + +- (BOOL)canAuthorize { + NSString *token = self.refreshToken; + if (token == nil) { + // For services which do not support refresh tokens, we'll just check + // the access token + token = self.accessToken; + } + BOOL canAuth = [token length] > 0; + return canAuth; +} + +- (BOOL)shouldRefreshAccessToken { + // We should refresh the access token when it's missing or nearly expired + // and we have a refresh token + BOOL shouldRefresh = NO; + NSString *accessToken = self.accessToken; + NSString *refreshToken = self.refreshToken; + NSString *assertion = self.assertion; + NSString *code = self.code; + + BOOL hasRefreshToken = ([refreshToken length] > 0); + BOOL hasAccessToken = ([accessToken length] > 0); + BOOL hasAssertion = ([assertion length] > 0); + BOOL hasCode = ([code length] > 0); + + // Determine if we need to refresh the access token + if (hasRefreshToken || hasAssertion || hasCode) { + if (!hasAccessToken) { + shouldRefresh = YES; + } else { + // We'll consider the token expired if it expires 60 seconds from now + // or earlier + NSDate *expirationDate = self.expirationDate; + NSTimeInterval timeToExpire = [expirationDate timeIntervalSinceNow]; + if (expirationDate == nil || timeToExpire < 60.0) { + // access token has expired, or will in a few seconds + shouldRefresh = YES; + } + } + } + return shouldRefresh; +} + +- (void)waitForCompletionWithTimeout:(NSTimeInterval)timeoutInSeconds { + // If there is a refresh fetcher pending, wait for it. + // + // This is only intended for unit test or for use in command-line tools. + GTMHTTPFetcher *fetcher = self.refreshFetcher; + [fetcher waitForCompletionWithTimeout:timeoutInSeconds]; +} + +#pragma mark Token Fetch + +- (NSString *)userAgent { + NSBundle *bundle = [NSBundle mainBundle]; + NSString *appID = [bundle bundleIdentifier]; + + NSString *version = [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; + if (version == nil) { + version = [bundle objectForInfoDictionaryKey:@"CFBundleVersion"]; + } + + if (appID && version) { + appID = [appID stringByAppendingFormat:@"/%@", version]; + } + + NSString *userAgent = @"gtm-oauth2"; + if (appID) { + userAgent = [userAgent stringByAppendingFormat:@" %@", appID]; + } + return userAgent; +} + +- (GTMHTTPFetcher *)beginTokenFetchWithDelegate:(id)delegate + didFinishSelector:(SEL)finishedSel { + + NSMutableDictionary *paramsDict = [NSMutableDictionary dictionary]; + + NSString *fetchType; + + NSString *refreshToken = self.refreshToken; + NSString *code = self.code; + NSString *assertion = self.assertion; + + if (refreshToken) { + // We have a refresh token + [paramsDict setObject:@"refresh_token" forKey:@"grant_type"]; + [paramsDict setObject:refreshToken forKey:@"refresh_token"]; + + NSString *refreshScope = self.refreshScope; + if ([refreshScope length] > 0) { + [paramsDict setObject:refreshScope forKey:@"scope"]; + } + + fetchType = kGTMOAuth2FetchTypeRefresh; + } else if (code) { + // We have a code string + [paramsDict setObject:@"authorization_code" forKey:@"grant_type"]; + [paramsDict setObject:code forKey:@"code"]; + + NSString *redirectURI = self.redirectURI; + if ([redirectURI length] > 0) { + [paramsDict setObject:redirectURI forKey:@"redirect_uri"]; + } + + NSString *scope = self.scope; + if ([scope length] > 0) { + [paramsDict setObject:scope forKey:@"scope"]; + } + + fetchType = kGTMOAuth2FetchTypeToken; + } else if (assertion) { + // We have an assertion string + [paramsDict setObject:assertion forKey:@"assertion"]; + [paramsDict setObject:@"http://oauth.net/grant_type/jwt/1.0/bearer" + forKey:@"grant_type"]; + fetchType = kGTMOAuth2FetchTypeAssertion; + } else { +#if DEBUG + NSAssert(0, @"unexpected lack of code or refresh token for fetching"); +#endif + return nil; + } + + NSString *clientID = self.clientID; + if ([clientID length] > 0) { + [paramsDict setObject:clientID forKey:@"client_id"]; + } + + NSString *clientSecret = self.clientSecret; + if ([clientSecret length] > 0) { + [paramsDict setObject:clientSecret forKey:@"client_secret"]; + } + + NSDictionary *additionalParams = self.additionalTokenRequestParameters; + if (additionalParams) { + [paramsDict addEntriesFromDictionary:additionalParams]; + } + + NSString *paramStr = [[self class] encodedQueryParametersForDictionary:paramsDict]; + NSData *paramData = [paramStr dataUsingEncoding:NSUTF8StringEncoding]; + + NSURL *tokenURL = self.tokenURL; + + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:tokenURL]; + [request setValue:@"application/x-www-form-urlencoded" + forHTTPHeaderField:@"Content-Type"]; + + NSString *userAgent = [self userAgent]; + [request setValue:userAgent forHTTPHeaderField:@"User-Agent"]; + + GTMHTTPFetcher *fetcher; + id fetcherService = self.fetcherService; + if (fetcherService) { + fetcher = [fetcherService fetcherWithRequest:request]; + + // Don't use an authorizer for an auth token fetch + fetcher.authorizer = nil; + } else { + fetcher = [GTMHTTPFetcher fetcherWithRequest:request]; + } + + NSString *const template = (refreshToken ? @"refresh token for %@" : @"fetch tokens for %@"); + [fetcher setCommentWithFormat:template, [tokenURL host]]; + fetcher.postData = paramData; + fetcher.retryEnabled = YES; + fetcher.maxRetryInterval = 15.0; + + // Fetcher properties will retain the delegate + [fetcher setProperty:delegate forKey:kTokenFetchDelegateKey]; + if (finishedSel) { + NSString *selStr = NSStringFromSelector(finishedSel); + [fetcher setProperty:selStr forKey:kTokenFetchSelectorKey]; + } + + if ([fetcher beginFetchWithDelegate:self + didFinishSelector:@selector(tokenFetcher:finishedWithData:error:)]) { + // Fetch began + [self notifyFetchIsRunning:YES fetcher:fetcher type:fetchType]; + return fetcher; + } else { + // Failed to start fetching; typically a URL issue + NSError *error = [NSError errorWithDomain:kGTMHTTPFetcherStatusDomain + code:-1 + userInfo:nil]; + [[self class] invokeDelegate:delegate + selector:finishedSel + object:self + object:nil + object:error]; + return nil; + } +} + +- (void)tokenFetcher:(GTMHTTPFetcher *)fetcher + finishedWithData:(NSData *)data + error:(NSError *)error { + [self notifyFetchIsRunning:NO fetcher:fetcher type:nil]; + + NSDictionary *responseHeaders = [fetcher responseHeaders]; + NSString *responseType = [responseHeaders valueForKey:@"Content-Type"]; + BOOL isResponseJSON = [responseType hasPrefix:@"application/json"]; + BOOL hasData = ([data length] > 0); + + if (error) { + // Failed; if the error body is JSON, parse it and add it to the error's + // userInfo dictionary + if (hasData) { + if (isResponseJSON) { + NSDictionary *errorJson = [self dictionaryWithJSONData:data]; + if ([errorJson count] > 0) { +#if DEBUG + NSLog(@"Error %@\nError data:\n%@", error, errorJson); +#endif + // Add the JSON error body to the userInfo of the error + NSMutableDictionary *userInfo; + userInfo = [NSMutableDictionary dictionaryWithObject:errorJson + forKey:kGTMOAuth2ErrorJSONKey]; + NSDictionary *prevUserInfo = [error userInfo]; + if (prevUserInfo) { + [userInfo addEntriesFromDictionary:prevUserInfo]; + } + error = [NSError errorWithDomain:[error domain] + code:[error code] + userInfo:userInfo]; + } + } + } + } else { + // Succeeded; we have an access token +#if DEBUG + NSAssert(hasData, @"data missing in token response"); +#endif + + if (hasData) { + if (isResponseJSON) { + [self setKeysForResponseJSONData:data]; + } else { + // Support for legacy token servers that return form-urlencoded data + NSString *dataStr = [[[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding] autorelease]; + [self setKeysForResponseString:dataStr]; + } + +#if DEBUG + // Watch for token exchanges that return a non-bearer or unlabeled token + NSString *tokenType = [self tokenType]; + if (tokenType == nil + || [tokenType caseInsensitiveCompare:@"bearer"] != NSOrderedSame) { + NSLog(@"GTMOAuth2: Unexpected token type: %@", tokenType); + } +#endif + } + } + + id delegate = [fetcher propertyForKey:kTokenFetchDelegateKey]; + SEL sel = NULL; + NSString *selStr = [fetcher propertyForKey:kTokenFetchSelectorKey]; + if (selStr) sel = NSSelectorFromString(selStr); + + [[self class] invokeDelegate:delegate + selector:sel + object:self + object:fetcher + object:error]; + + // Prevent a circular reference from retaining the delegate + [fetcher setProperty:nil forKey:kTokenFetchDelegateKey]; +} + +#pragma mark Fetch Notifications + +- (void)notifyFetchIsRunning:(BOOL)isStarting + fetcher:(GTMHTTPFetcher *)fetcher + type:(NSString *)fetchType { + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + + NSString *name = (isStarting ? kGTMOAuth2FetchStarted : kGTMOAuth2FetchStopped); + NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys: + fetcher, kGTMOAuth2FetcherKey, + fetchType, kGTMOAuth2FetchTypeKey, // fetchType may be nil + nil]; + [nc postNotificationName:name + object:self + userInfo:dict]; +} + +#pragma mark Persistent Response Strings + +- (void)setKeysForPersistenceResponseString:(NSString *)str { + // All persistence keys can be set directly as if returned by a server + [self setKeysForResponseString:str]; +} + +// This returns a "response string" that can be passed later to +// setKeysForResponseString: to reuse an old access token in a new auth object +- (NSString *)persistenceResponseString { + NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithCapacity:4]; + + NSString *refreshToken = self.refreshToken; + NSString *accessToken = nil; + if (refreshToken == nil) { + // We store the access token only for services that do not support refresh + // tokens; otherwise, we assume the access token is too perishable to + // be worth storing + accessToken = self.accessToken; + } + + // Any nil values will not set a dictionary entry + [dict setValue:refreshToken forKey:kOAuth2RefreshTokenKey]; + [dict setValue:accessToken forKey:kOAuth2AccessTokenKey]; + [dict setValue:self.serviceProvider forKey:kServiceProviderKey]; + [dict setValue:self.userID forKey:kUserIDKey]; + [dict setValue:self.userEmail forKey:kUserEmailKey]; + [dict setValue:self.userEmailIsVerified forKey:kUserEmailIsVerifiedKey]; + [dict setValue:self.scope forKey:kOAuth2ScopeKey]; + + NSString *result = [[self class] encodedQueryParametersForDictionary:dict]; + return result; +} + +- (BOOL)primeForRefresh { + if (self.refreshToken == nil) { + // Cannot refresh without a refresh token + return NO; + } + self.accessToken = nil; + self.expiresIn = nil; + self.expirationDate = nil; + self.errorString = nil; + return YES; +} + +- (void)reset { + // Reset all per-authorization values + self.code = nil; + self.accessToken = nil; + self.refreshToken = nil; + self.assertion = nil; + self.expiresIn = nil; + self.errorString = nil; + self.expirationDate = nil; + self.userEmail = nil; + self.userEmailIsVerified = nil; +} + +#pragma mark Accessors for Response Parameters + +- (NSString *)accessToken { + return [self.parameters objectForKey:kOAuth2AccessTokenKey]; +} + +- (void)setAccessToken:(NSString *)str { + [self.parameters setValue:str forKey:kOAuth2AccessTokenKey]; +} + +- (NSString *)refreshToken { + return [self.parameters objectForKey:kOAuth2RefreshTokenKey]; +} + +- (void)setRefreshToken:(NSString *)str { + [self.parameters setValue:str forKey:kOAuth2RefreshTokenKey]; +} + +- (NSString *)code { + return [self.parameters objectForKey:kOAuth2CodeKey]; +} + +- (void)setCode:(NSString *)str { + [self.parameters setValue:str forKey:kOAuth2CodeKey]; +} + +- (NSString *)assertion { + return [self.parameters objectForKey:kOAuth2AssertionKey]; +} + +- (void)setAssertion:(NSString *)str { + [self.parameters setValue:str forKey:kOAuth2AssertionKey]; +} + +- (NSString *)refreshScope { + return [self.parameters objectForKey:kOAuth2RefreshScopeKey]; +} + +- (void)setRefreshScope:(NSString *)str { + [self.parameters setValue:str forKey:kOAuth2RefreshScopeKey]; +} + +- (NSString *)errorString { + return [self.parameters objectForKey:kOAuth2ErrorKey]; +} + +- (void)setErrorString:(NSString *)str { + [self.parameters setValue:str forKey:kOAuth2ErrorKey]; +} + +- (NSString *)tokenType { + return [self.parameters objectForKey:kOAuth2TokenTypeKey]; +} + +- (void)setTokenType:(NSString *)str { + [self.parameters setValue:str forKey:kOAuth2TokenTypeKey]; +} + +- (NSString *)scope { + return [self.parameters objectForKey:kOAuth2ScopeKey]; +} + +- (void)setScope:(NSString *)str { + [self.parameters setValue:str forKey:kOAuth2ScopeKey]; +} + +- (NSNumber *)expiresIn { + return [self.parameters objectForKey:kOAuth2ExpiresInKey]; +} + +- (void)setExpiresIn:(NSNumber *)num { + [self.parameters setValue:num forKey:kOAuth2ExpiresInKey]; + [self updateExpirationDate]; +} + +- (void)updateExpirationDate { + // Update our absolute expiration time to something close to when + // the server expects the expiration + NSDate *date = nil; + NSNumber *expiresIn = self.expiresIn; + if (expiresIn) { + unsigned long deltaSeconds = [expiresIn unsignedLongValue]; + if (deltaSeconds > 0) { + date = [NSDate dateWithTimeIntervalSinceNow:deltaSeconds]; + } + } + self.expirationDate = date; +} + +// +// Keys custom to this class, not part of OAuth 2 +// + +- (NSString *)serviceProvider { + return [self.parameters objectForKey:kServiceProviderKey]; +} + +- (void)setServiceProvider:(NSString *)str { + [self.parameters setValue:str forKey:kServiceProviderKey]; +} + +- (NSString *)userID { + return [self.parameters objectForKey:kUserIDKey]; +} + +- (void)setUserID:(NSString *)str { + [self.parameters setValue:str forKey:kUserIDKey]; +} + +- (NSString *)userEmail { + return [self.parameters objectForKey:kUserEmailKey]; +} + +- (void)setUserEmail:(NSString *)str { + [self.parameters setValue:str forKey:kUserEmailKey]; +} + +- (NSString *)userEmailIsVerified { + return [self.parameters objectForKey:kUserEmailIsVerifiedKey]; +} + +- (void)setUserEmailIsVerified:(NSString *)str { + [self.parameters setValue:str forKey:kUserEmailIsVerifiedKey]; +} + +#pragma mark User Properties + +- (void)setProperty:(id)obj forKey:(NSString *)key { + if (obj == nil) { + // User passed in nil, so delete the property + [properties_ removeObjectForKey:key]; + } else { + // Be sure the property dictionary exists + if (properties_ == nil) { + [self setProperties:[NSMutableDictionary dictionary]]; + } + [properties_ setObject:obj forKey:key]; + } +} + +- (id)propertyForKey:(NSString *)key { + id obj = [properties_ objectForKey:key]; + + // Be sure the returned pointer has the life of the autorelease pool, + // in case self is released immediately + return [[obj retain] autorelease]; +} + +#pragma mark Utility Routines + ++ (NSString *)encodedOAuthValueForString:(NSString *)str { + CFStringRef originalString = (CFStringRef) str; + CFStringRef leaveUnescaped = NULL; + CFStringRef forceEscaped = CFSTR("!*'();:@&=+$,/?%#[]"); + + CFStringRef escapedStr = NULL; + if (str) { + escapedStr = CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, + originalString, + leaveUnescaped, + forceEscaped, + kCFStringEncodingUTF8); + [(id)CFMakeCollectable(escapedStr) autorelease]; + } + + return (NSString *)escapedStr; +} + ++ (NSString *)encodedQueryParametersForDictionary:(NSDictionary *)dict { + // Make a string like "cat=fluffy@dog=spot" + NSMutableString *result = [NSMutableString string]; + NSArray *sortedKeys = [[dict allKeys] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)]; + NSString *joiner = @""; + for (NSString *key in sortedKeys) { + NSString *value = [dict objectForKey:key]; + NSString *encodedValue = [self encodedOAuthValueForString:value]; + NSString *encodedKey = [self encodedOAuthValueForString:key]; + [result appendFormat:@"%@%@=%@", joiner, encodedKey, encodedValue]; + joiner = @"&"; + } + return result; +} + ++ (void)invokeDelegate:(id)delegate + selector:(SEL)sel + object:(id)obj1 + object:(id)obj2 + object:(id)obj3 { + if (delegate && sel) { + NSMethodSignature *sig = [delegate methodSignatureForSelector:sel]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; + [invocation setSelector:sel]; + [invocation setTarget:delegate]; + [invocation setArgument:&obj1 atIndex:2]; + [invocation setArgument:&obj2 atIndex:3]; + [invocation setArgument:&obj3 atIndex:4]; + [invocation invoke]; + } +} + ++ (NSString *)unencodedOAuthParameterForString:(NSString *)str { + NSString *plainStr = [str stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + return plainStr; +} + ++ (NSDictionary *)dictionaryWithResponseString:(NSString *)responseStr { + // Build a dictionary from a response string of the form + // "cat=fluffy&dog=spot". Missing or empty values are considered + // empty strings; keys and values are percent-decoded. + if (responseStr == nil) return nil; + + NSArray *items = [responseStr componentsSeparatedByString:@"&"]; + + NSMutableDictionary *responseDict = [NSMutableDictionary dictionaryWithCapacity:[items count]]; + + for (NSString *item in items) { + NSString *key = nil; + NSString *value = @""; + + NSRange equalsRange = [item rangeOfString:@"="]; + if (equalsRange.location != NSNotFound) { + // The parameter has at least one '=' + key = [item substringToIndex:equalsRange.location]; + + // There are characters after the '=' + value = [item substringFromIndex:(equalsRange.location + 1)]; + } else { + // The parameter has no '=' + key = item; + } + + NSString *plainKey = [[self class] unencodedOAuthParameterForString:key]; + NSString *plainValue = [[self class] unencodedOAuthParameterForString:value]; + + [responseDict setObject:plainValue forKey:plainKey]; + } + + return responseDict; +} + ++ (NSDictionary *)dictionaryWithResponseData:(NSData *)data { + NSString *responseStr = [[[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding] autorelease]; + NSDictionary *dict = [self dictionaryWithResponseString:responseStr]; + return dict; +} + ++ (NSString *)scopeWithStrings:(NSString *)str, ... { + // concatenate the strings, joined by a single space + NSString *result = @""; + NSString *joiner = @""; + if (str) { + va_list argList; + va_start(argList, str); + while (str) { + result = [result stringByAppendingFormat:@"%@%@", joiner, str]; + joiner = @" "; + str = va_arg(argList, id); + } + va_end(argList); + } + return result; +} + +@end + +#endif // GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES diff --git a/GTL/Source/OAuth2/.svn/text-base/GTMOAuth2SignIn.h.svn-base b/GTL/Source/OAuth2/.svn/text-base/GTMOAuth2SignIn.h.svn-base new file mode 100644 index 0000000..90ccf39 --- /dev/null +++ b/GTL/Source/OAuth2/.svn/text-base/GTMOAuth2SignIn.h.svn-base @@ -0,0 +1,182 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// This sign-in object opens and closes the web view window as needed for +// users to sign in. For signing in to Google, it also obtains +// the authenticated user's email address. +// +// Typically, this will be managed for the application by +// GTMOAuth2ViewControllerTouch or GTMOAuth2WindowController, so this +// class's interface is interesting only if +// you are creating your own window controller for sign-in. +// +// +// Delegate methods implemented by the window controller +// +// The window controller implements two methods for use by the sign-in object, +// the webRequestSelector and the finishedSelector: +// +// webRequestSelector has a signature matching +// - (void)signIn:(GTMOAuth2SignIn *)signIn displayRequest:(NSURLRequest *)request +// +// The web request selector will be invoked with a request to be displayed, or +// nil to close the window when the final callback request has been encountered. +// +// +// finishedSelector has a signature matching +// - (void)signin:(GTMOAuth2SignIn *)signin finishedWithAuth:(GTMOAuth2Authentication *)auth error:(NSError *)error +// +// The finished selector will be invoked when sign-in has completed, except +// when explicitly canceled by calling cancelSigningIn +// + +#if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES + +#import +#import + +// GTMHTTPFetcher brings in GTLDefines/GDataDefines +#import "GTMHTTPFetcher.h" + +#import "GTMOAuth2Authentication.h" + +@interface GTMOAuth2SignIn : NSObject { + @private + GTMOAuth2Authentication *auth_; + + // the endpoint for displaying the sign-in page + NSURL *authorizationURL_; + NSDictionary *additionalAuthorizationParameters_; + + id delegate_; + SEL webRequestSelector_; + SEL finishedSelector_; + + BOOL hasHandledCallback_; + + GTMHTTPFetcher *pendingFetcher_; + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT + BOOL shouldFetchGoogleUserEmail_; + BOOL shouldFetchGoogleUserProfile_; + NSDictionary *userProfile_; +#endif + + SCNetworkReachabilityRef reachabilityRef_; + NSTimer *networkLossTimer_; + NSTimeInterval networkLossTimeoutInterval_; + BOOL hasNotifiedNetworkLoss_; + + id userData_; +} + +@property (nonatomic, retain) GTMOAuth2Authentication *authentication; + +@property (nonatomic, retain) NSURL *authorizationURL; +@property (nonatomic, retain) NSDictionary *additionalAuthorizationParameters; + +// The delegate is released when signing in finishes or is cancelled +@property (nonatomic, retain) id delegate; +@property (nonatomic, assign) SEL webRequestSelector; +@property (nonatomic, assign) SEL finishedSelector; + +@property (nonatomic, retain) id userData; + +// By default, signing in to Google will fetch the user's email, but will not +// fetch the user's profile. +// +// The email is saved in the auth object. +// The profile is available immediately after sign-in. +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT +@property (nonatomic, assign) BOOL shouldFetchGoogleUserEmail; +@property (nonatomic, assign) BOOL shouldFetchGoogleUserProfile; +@property (nonatomic, retain, readonly) NSDictionary *userProfile; +#endif + +// The default timeout for an unreachable network during display of the +// sign-in page is 30 seconds; set this to 0 to have no timeout +@property (nonatomic, assign) NSTimeInterval networkLossTimeoutInterval; + +// The delegate is retained until sign-in has completed or been canceled +// +// designated initializer +- (id)initWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + delegate:(id)delegate + webRequestSelector:(SEL)webRequestSelector + finishedSelector:(SEL)finishedSelector; + +// A default authentication object for signing in to Google services +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (GTMOAuth2Authentication *)standardGoogleAuthenticationForScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret; +#endif + +#pragma mark Methods used by the Window Controller + +// Start the sequence of fetches and sign-in window display for sign-in +- (BOOL)startSigningIn; + +// Stop any pending fetches, and close the window (but don't call the +// delegate's finishedSelector) +- (void)cancelSigningIn; + +// Window controllers must tell the sign-in object about any redirect +// requested by the web view, and any changes in the webview window title +// +// If these return YES then the event was handled by the +// sign-in object (typically by closing the window) and should be ignored by +// the window controller's web view + +- (BOOL)requestRedirectedToRequest:(NSURLRequest *)redirectedRequest; +- (BOOL)titleChanged:(NSString *)title; +- (BOOL)cookiesChanged:(NSHTTPCookieStorage *)cookieStorage; +- (BOOL)loadFailedWithError:(NSError *)error; + +// Window controllers must tell the sign-in object if the window was closed +// prematurely by the user (but not by the sign-in object); this calls the +// delegate's finishedSelector +- (void)windowWasClosed; + +#pragma mark - + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT +// Revocation of an authorized token from Google ++ (void)revokeTokenForGoogleAuthentication:(GTMOAuth2Authentication *)auth; + +// Create a fetcher for obtaining the user's Google email address or profile, +// according to the current auth scopes. +// +// The auth object must have been created with appropriate scopes. +// +// The fetcher's response data can be parsed with NSJSONSerialization. ++ (GTMHTTPFetcher *)userInfoFetcherWithAuth:(GTMOAuth2Authentication *)auth; +#endif + +#pragma mark - + +// Standard authentication values ++ (NSString *)nativeClientRedirectURI; +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (NSURL *)googleAuthorizationURL; ++ (NSURL *)googleTokenURL; ++ (NSURL *)googleUserInfoURL; +#endif + +@end + +#endif // #if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES diff --git a/GTL/Source/OAuth2/.svn/text-base/GTMOAuth2SignIn.m.svn-base b/GTL/Source/OAuth2/.svn/text-base/GTMOAuth2SignIn.m.svn-base new file mode 100644 index 0000000..8899d29 --- /dev/null +++ b/GTL/Source/OAuth2/.svn/text-base/GTMOAuth2SignIn.m.svn-base @@ -0,0 +1,820 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES + +#define GTMOAUTH2SIGNIN_DEFINE_GLOBALS 1 +#import "GTMOAuth2SignIn.h" + +// we'll default to timing out if the network becomes unreachable for more +// than 30 seconds when the sign-in page is displayed +static const NSTimeInterval kDefaultNetworkLossTimeoutInterval = 30.0; + +// URI indicating an installed app is signing in. This is described at +// +// http://code.google.com/apis/accounts/docs/OAuth2.html#IA +// +NSString *const kOOBString = @"urn:ietf:wg:oauth:2.0:oob"; + + +@interface GTMOAuth2Authentication (InternalMethods) +- (NSDictionary *)dictionaryWithJSONData:(NSData *)data; +@end + +@interface GTMOAuth2SignIn () +@property (assign) BOOL hasHandledCallback; +@property (retain) GTMHTTPFetcher *pendingFetcher; +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT +@property (nonatomic, retain, readwrite) NSDictionary *userProfile; +#endif + +- (void)invokeFinalCallbackWithError:(NSError *)error; + +- (BOOL)startWebRequest; ++ (NSMutableURLRequest *)mutableURLRequestWithURL:(NSURL *)oldURL + paramString:(NSString *)paramStr; +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT +- (void)fetchGoogleUserInfo; +#endif +- (void)finishSignInWithError:(NSError *)error; + +- (void)handleCallbackReached; + +- (void)auth:(GTMOAuth2Authentication *)auth +finishedWithFetcher:(GTMHTTPFetcher *)fetcher + error:(NSError *)error; + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT +- (void)infoFetcher:(GTMHTTPFetcher *)fetcher + finishedWithData:(NSData *)data + error:(NSError *)error; +#endif + +- (void)closeTheWindow; + +- (void)startReachabilityCheck; +- (void)stopReachabilityCheck; +- (void)reachabilityTarget:(SCNetworkReachabilityRef)reachabilityRef + changedFlags:(SCNetworkConnectionFlags)flags; +- (void)reachabilityTimerFired:(NSTimer *)timer; +@end + +@implementation GTMOAuth2SignIn + +@synthesize authentication = auth_; + +@synthesize authorizationURL = authorizationURL_; +@synthesize additionalAuthorizationParameters = additionalAuthorizationParameters_; + +@synthesize delegate = delegate_; +@synthesize webRequestSelector = webRequestSelector_; +@synthesize finishedSelector = finishedSelector_; +@synthesize hasHandledCallback = hasHandledCallback_; +@synthesize pendingFetcher = pendingFetcher_; +@synthesize userData = userData_; + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT +@synthesize shouldFetchGoogleUserEmail = shouldFetchGoogleUserEmail_; +@synthesize shouldFetchGoogleUserProfile = shouldFetchGoogleUserProfile_; +@synthesize userProfile = userProfile_; +#endif + +@synthesize networkLossTimeoutInterval = networkLossTimeoutInterval_; + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (NSURL *)googleAuthorizationURL { + NSString *str = @"https://accounts.google.com/o/oauth2/auth"; + return [NSURL URLWithString:str]; +} + ++ (NSURL *)googleTokenURL { + NSString *str = @"https://accounts.google.com/o/oauth2/token"; + return [NSURL URLWithString:str]; +} + ++ (NSURL *)googleRevocationURL { + NSString *urlStr = @"https://accounts.google.com/o/oauth2/revoke"; + return [NSURL URLWithString:urlStr]; +} + ++ (NSURL *)googleUserInfoURL { + NSString *urlStr = @"https://www.googleapis.com/oauth2/v1/userinfo"; + return [NSURL URLWithString:urlStr]; +} +#endif + ++ (NSString *)nativeClientRedirectURI { + return kOOBString; +} + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (GTMOAuth2Authentication *)standardGoogleAuthenticationForScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret { + NSString *redirectURI = [self nativeClientRedirectURI]; + NSURL *tokenURL = [self googleTokenURL]; + + GTMOAuth2Authentication *auth; + auth = [GTMOAuth2Authentication authenticationWithServiceProvider:kGTMOAuth2ServiceProviderGoogle + tokenURL:tokenURL + redirectURI:redirectURI + clientID:clientID + clientSecret:clientSecret]; + auth.scope = scope; + + return auth; +} +#endif + +- (id)initWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + delegate:(id)delegate + webRequestSelector:(SEL)webRequestSelector + finishedSelector:(SEL)finishedSelector { + // check the selectors on debug builds + GTMAssertSelectorNilOrImplementedWithArgs(delegate, webRequestSelector, + @encode(GTMOAuth2SignIn *), @encode(NSURLRequest *), 0); + GTMAssertSelectorNilOrImplementedWithArgs(delegate, finishedSelector, + @encode(GTMOAuth2SignIn *), @encode(GTMOAuth2Authentication *), + @encode(NSError *), 0); + + // designated initializer + self = [super init]; + if (self) { + auth_ = [auth retain]; + authorizationURL_ = [authorizationURL retain]; + delegate_ = [delegate retain]; + webRequestSelector_ = webRequestSelector; + finishedSelector_ = finishedSelector; + + // for Google authentication, we want to automatically fetch user info +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT + NSString *host = [authorizationURL host]; + if ([host hasSuffix:@".google.com"]) { + shouldFetchGoogleUserEmail_ = YES; + } +#endif + + // default timeout for a lost internet connection while the server + // UI is displayed is 30 seconds + networkLossTimeoutInterval_ = kDefaultNetworkLossTimeoutInterval; + } + return self; +} + +- (void)dealloc { + [self stopReachabilityCheck]; + + [auth_ release]; + [authorizationURL_ release]; + [additionalAuthorizationParameters_ release]; + [delegate_ release]; + [pendingFetcher_ release]; +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT + [userProfile_ release]; +#endif + [userData_ release]; + + [super dealloc]; +} + +#pragma mark Sign-in Sequence Methods + +// stop any pending fetches, and close the window (but don't call the +// delegate's finishedSelector) +- (void)cancelSigningIn { + [self.pendingFetcher stopFetching]; + self.pendingFetcher = nil; + + [self.authentication stopAuthorization]; + + [self closeTheWindow]; + + [delegate_ autorelease]; + delegate_ = nil; +} + +// +// This is the entry point to begin the sequence +// - display the authentication web page, and monitor redirects +// - exchange the code for an access token and a refresh token +// - for Google sign-in, fetch the user's email address +// - tell the delegate we're finished +// +- (BOOL)startSigningIn { + // For signing in to Google, append the scope for obtaining the authenticated + // user email and profile, as appropriate +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT + GTMOAuth2Authentication *auth = self.authentication; + if (self.shouldFetchGoogleUserEmail) { + NSString *const emailScope = @"https://www.googleapis.com/auth/userinfo.email"; + NSString *scope = auth.scope; + if ([scope rangeOfString:emailScope].location == NSNotFound) { + scope = [GTMOAuth2Authentication scopeWithStrings:scope, emailScope, nil]; + auth.scope = scope; + } + } + + if (self.shouldFetchGoogleUserProfile) { + NSString *const profileScope = @"https://www.googleapis.com/auth/userinfo.profile"; + NSString *scope = auth.scope; + if ([scope rangeOfString:profileScope].location == NSNotFound) { + scope = [GTMOAuth2Authentication scopeWithStrings:scope, profileScope, nil]; + auth.scope = scope; + } + } +#endif + + // start the authorization + return [self startWebRequest]; +} + +- (NSMutableDictionary *)parametersForWebRequest { + GTMOAuth2Authentication *auth = self.authentication; + NSString *clientID = auth.clientID; + NSString *redirectURI = auth.redirectURI; + + BOOL hasClientID = ([clientID length] > 0); + BOOL hasRedirect = ([redirectURI length] > 0 + || redirectURI == [[self class] nativeClientRedirectURI]); + if (!hasClientID || !hasRedirect) { +#if DEBUG + NSAssert(hasClientID, @"GTMOAuth2SignIn: clientID needed"); + NSAssert(hasRedirect, @"GTMOAuth2SignIn: redirectURI needed"); +#endif + return NO; + } + + // invoke the UI controller's web request selector to display + // the authorization page + + // add params to the authorization URL + NSString *scope = auth.scope; + if ([scope length] == 0) scope = nil; + + NSMutableDictionary *paramsDict = [NSMutableDictionary dictionaryWithObjectsAndKeys: + @"code", @"response_type", + clientID, @"client_id", + scope, @"scope", // scope may be nil + nil]; + if (redirectURI) { + [paramsDict setObject:redirectURI forKey:@"redirect_uri"]; + } + return paramsDict; +} + +- (BOOL)startWebRequest { + NSMutableDictionary *paramsDict = [self parametersForWebRequest]; + + NSDictionary *additionalParams = self.additionalAuthorizationParameters; + if (additionalParams) { + [paramsDict addEntriesFromDictionary:additionalParams]; + } + + NSString *paramStr = [GTMOAuth2Authentication encodedQueryParametersForDictionary:paramsDict]; + + NSURL *authorizationURL = self.authorizationURL; + NSMutableURLRequest *request; + request = [[self class] mutableURLRequestWithURL:authorizationURL + paramString:paramStr]; + + [delegate_ performSelector:self.webRequestSelector + withObject:self + withObject:request]; + + // at this point, we're waiting on the server-driven html UI, so + // we want notification if we lose connectivity to the web server + [self startReachabilityCheck]; + return YES; +} + +// utility for making a request from an old URL with some additional parameters ++ (NSMutableURLRequest *)mutableURLRequestWithURL:(NSURL *)oldURL + paramString:(NSString *)paramStr { + NSString *query = [oldURL query]; + if ([query length] > 0) { + query = [query stringByAppendingFormat:@"&%@", paramStr]; + } else { + query = paramStr; + } + + NSString *portStr = @""; + NSString *oldPort = [[oldURL port] stringValue]; + if ([oldPort length] > 0) { + portStr = [@":" stringByAppendingString:oldPort]; + } + + NSString *qMark = [query length] > 0 ? @"?" : @""; + NSString *newURLStr = [NSString stringWithFormat:@"%@://%@%@%@%@%@", + [oldURL scheme], [oldURL host], portStr, + [oldURL path], qMark, query]; + NSURL *newURL = [NSURL URLWithString:newURLStr]; + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:newURL]; + return request; +} + +// entry point for the window controller to tell us that the window +// prematurely closed +- (void)windowWasClosed { + [self stopReachabilityCheck]; + + NSError *error = [NSError errorWithDomain:kGTMOAuth2ErrorDomain + code:kGTMOAuth2ErrorWindowClosed + userInfo:nil]; + [self invokeFinalCallbackWithError:error]; +} + +// internal method to tell the window controller to close the window +- (void)closeTheWindow { + [self stopReachabilityCheck]; + + // a nil request means the window should be closed + [delegate_ performSelector:self.webRequestSelector + withObject:self + withObject:nil]; +} + +// entry point for the window controller to tell us what web page has been +// requested +// +// When the request is for the callback URL, this method invokes +// handleCallbackReached and returns YES +- (BOOL)requestRedirectedToRequest:(NSURLRequest *)redirectedRequest { + // for Google's installed app sign-in protocol, we'll look for the + // end-of-sign-in indicator in the titleChanged: method below + NSString *redirectURI = self.authentication.redirectURI; + if (redirectURI == nil) return NO; + + // when we're searching for the window title string, then we can ignore + // redirects + NSString *standardURI = [[self class] nativeClientRedirectURI]; + if (standardURI != nil && [redirectURI isEqual:standardURI]) return NO; + + // compare the redirectURI, which tells us when the web sign-in is done, + // to the actual redirection + NSURL *redirectURL = [NSURL URLWithString:redirectURI]; + NSURL *requestURL = [redirectedRequest URL]; + + // avoid comparing to nil host and path values (such as when redirected to + // "about:blank") + NSString *requestHost = [requestURL host]; + NSString *requestPath = [requestURL path]; + BOOL isCallback; + if (requestHost && requestPath) { + isCallback = [[redirectURL host] isEqual:[requestURL host]] + && [[redirectURL path] isEqual:[requestURL path]]; + } else if (requestURL) { + // handle "about:blank" + isCallback = [redirectURL isEqual:requestURL]; + } else { + isCallback = NO; + } + + if (!isCallback) { + // tell the caller that this request is nothing interesting + return NO; + } + + // we've reached the callback URL + + // try to get the access code + if (!self.hasHandledCallback) { + NSString *responseStr = [[redirectedRequest URL] query]; + [self.authentication setKeysForResponseString:responseStr]; + +#if DEBUG + NSAssert([self.authentication.code length] > 0 + || [self.authentication.errorString length] > 0, + @"response lacks auth code or error"); +#endif + + [self handleCallbackReached]; + } + // tell the delegate that we did handle this request + return YES; +} + +// entry point for the window controller to tell us when a new page title has +// been loadded +// +// When the title indicates sign-in has completed, this method invokes +// handleCallbackReached and returns YES +- (BOOL)titleChanged:(NSString *)title { + // return YES if the OAuth flow ending title was detected + + // right now we're just looking for a parameter list following the last space + // in the title string, but hopefully we'll eventually get something better + // from the server to search for + NSRange paramsRange = [title rangeOfString:@" " + options:NSBackwardsSearch]; + NSUInteger spaceIndex = paramsRange.location; + if (spaceIndex != NSNotFound) { + NSString *responseStr = [title substringFromIndex:(spaceIndex + 1)]; + + NSDictionary *dict = [GTMOAuth2Authentication dictionaryWithResponseString:responseStr]; + + NSString *code = [dict objectForKey:@"code"]; + NSString *error = [dict objectForKey:@"error"]; + if ([code length] > 0 || [error length] > 0) { + + if (!self.hasHandledCallback) { + [self.authentication setKeysForResponseDictionary:dict]; + + [self handleCallbackReached]; + } + return YES; + } + } + return NO; +} + +- (BOOL)cookiesChanged:(NSHTTPCookieStorage *)cookieStorage { + // We're ignoring these. + return NO; +}; + +// entry point for the window controller to tell us when a load has failed +// in the webview +// +// if the initial authorization URL fails, bail out so the user doesn't +// see an empty webview +- (BOOL)loadFailedWithError:(NSError *)error { + NSURL *authorizationURL = self.authorizationURL; + NSURL *failedURL = [[error userInfo] valueForKey:@"NSErrorFailingURLKey"]; // NSURLErrorFailingURLErrorKey defined in 10.6 + + BOOL isAuthURL = [[failedURL host] isEqual:[authorizationURL host]] + && [[failedURL path] isEqual:[authorizationURL path]]; + + if (isAuthURL) { + // We can assume that we have no pending fetchers, since we only + // handle failure to load the initial authorization URL + [self closeTheWindow]; + [self invokeFinalCallbackWithError:error]; + return YES; + } + return NO; +} + +- (void)handleCallbackReached { + // the callback page was requested, or the authenticate code was loaded + // into a page's title, so exchange the auth code for access & refresh tokens + // and tell the window to close + + // avoid duplicate signals that the callback point has been reached + self.hasHandledCallback = YES; + + [self closeTheWindow]; + + NSError *error = nil; + + GTMOAuth2Authentication *auth = self.authentication; + NSString *code = auth.code; + if ([code length] > 0) { + // exchange the code for a token + SEL sel = @selector(auth:finishedWithFetcher:error:); + GTMHTTPFetcher *fetcher = [auth beginTokenFetchWithDelegate:self + didFinishSelector:sel]; + if (fetcher == nil) { + error = [NSError errorWithDomain:kGTMHTTPFetcherStatusDomain + code:-1 + userInfo:nil]; + } else { + self.pendingFetcher = fetcher; + } + + // notify the app so it can put up a post-sign in, pre-token exchange UI + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc postNotificationName:kGTMOAuth2UserSignedIn + object:self + userInfo:nil]; + } else { + // the callback lacked an auth code + NSString *errStr = auth.errorString; + NSDictionary *userInfo = nil; + if ([errStr length] > 0) { + userInfo = [NSDictionary dictionaryWithObject:errStr + forKey:kGTMOAuth2ErrorMessageKey]; + } + + error = [NSError errorWithDomain:kGTMOAuth2ErrorDomain + code:kGTMOAuth2ErrorAuthorizationFailed + userInfo:userInfo]; + } + + if (error) { + [self finishSignInWithError:error]; + } +} + +- (void)auth:(GTMOAuth2Authentication *)auth +finishedWithFetcher:(GTMHTTPFetcher *)fetcher + error:(NSError *)error { + self.pendingFetcher = nil; + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT + if (error == nil + && (self.shouldFetchGoogleUserEmail || self.shouldFetchGoogleUserProfile) + && [self.authentication.serviceProvider isEqual:kGTMOAuth2ServiceProviderGoogle]) { + // fetch the user's information from the Google server + [self fetchGoogleUserInfo]; + } else { + // we're not authorizing with Google, so we're done + [self finishSignInWithError:error]; + } +#else + [self finishSignInWithError:error]; +#endif +} + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (GTMHTTPFetcher *)userInfoFetcherWithAuth:(GTMOAuth2Authentication *)auth { + // create a fetcher for obtaining the user's email or profile + NSURL *infoURL = [[self class] googleUserInfoURL]; + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:infoURL]; + + NSString *userAgent = [auth userAgent]; + [request setValue:userAgent forHTTPHeaderField:@"User-Agent"]; + [request setValue:@"no-cache" forHTTPHeaderField:@"Cache-Control"]; + + GTMHTTPFetcher *fetcher; + id fetcherService = auth.fetcherService; + if (fetcherService) { + fetcher = [fetcherService fetcherWithRequest:request]; + } else { + fetcher = [GTMHTTPFetcher fetcherWithRequest:request]; + } + fetcher.authorizer = auth; + fetcher.retryEnabled = YES; + fetcher.maxRetryInterval = 15.0; + fetcher.comment = @"user info"; + return fetcher; +} + +- (void)fetchGoogleUserInfo { + // fetch the user's email address or profile + GTMOAuth2Authentication *auth = self.authentication; + GTMHTTPFetcher *fetcher = [[self class] userInfoFetcherWithAuth:auth]; + [fetcher beginFetchWithDelegate:self + didFinishSelector:@selector(infoFetcher:finishedWithData:error:)]; + + self.pendingFetcher = fetcher; + + [auth notifyFetchIsRunning:YES + fetcher:fetcher + type:kGTMOAuth2FetchTypeUserInfo]; +} + +- (void)infoFetcher:(GTMHTTPFetcher *)fetcher + finishedWithData:(NSData *)data + error:(NSError *)error { + GTMOAuth2Authentication *auth = self.authentication; + [auth notifyFetchIsRunning:NO + fetcher:fetcher + type:nil]; + + self.pendingFetcher = nil; + + if (error) { +#if DEBUG + if (data) { + NSString *dataStr = [[[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding] autorelease]; + NSLog(@"infoFetcher error: %@\n%@", error, dataStr); + } +#endif + } else { + // We have the authenticated user's info + if (data) { + NSDictionary *profileDict = [auth dictionaryWithJSONData:data]; + if (profileDict) { + self.userProfile = profileDict; + + // Save the ID into the auth object + NSString *identifier = [profileDict objectForKey:@"id"]; + [auth setUserID:identifier]; + + // Save the email into the auth object + NSString *email = [profileDict objectForKey:@"email"]; + [auth setUserEmail:email]; + + NSNumber *verified = [profileDict objectForKey:@"verified_email"]; + [auth setUserEmailIsVerified:[verified stringValue]]; + } + } + } + [self finishSignInWithError:error]; +} + +#endif // !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT + +- (void)finishSignInWithError:(NSError *)error { + [self invokeFinalCallbackWithError:error]; +} + +// convenience method for making the final call to our delegate +- (void)invokeFinalCallbackWithError:(NSError *)error { + if (delegate_ && finishedSelector_) { + GTMOAuth2Authentication *auth = self.authentication; + + NSMethodSignature *sig = [delegate_ methodSignatureForSelector:finishedSelector_]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; + [invocation setSelector:finishedSelector_]; + [invocation setTarget:delegate_]; + [invocation setArgument:&self atIndex:2]; + [invocation setArgument:&auth atIndex:3]; + [invocation setArgument:&error atIndex:4]; + [invocation invoke]; + } + + // we'll no longer send messages to the delegate + // + // we want to autorelease it rather than assign to the property in case + // the delegate is below us in the call stack + [delegate_ autorelease]; + delegate_ = nil; +} + +#pragma mark Reachability monitoring + +static void ReachabilityCallBack(SCNetworkReachabilityRef target, + SCNetworkConnectionFlags flags, + void *info) { + // pass the flags to the signIn object + GTMOAuth2SignIn *signIn = (GTMOAuth2SignIn *)info; + + [signIn reachabilityTarget:target + changedFlags:flags]; +} + +- (void)startReachabilityCheck { + // the user may set the timeout to 0 to skip the reachability checking + // during display of the sign-in page + if (networkLossTimeoutInterval_ <= 0.0 || reachabilityRef_ != NULL) { + return; + } + + // create a reachability target from the authorization URL, add our callback, + // and schedule it on the run loop so we'll be notified if the network drops + NSURL *url = self.authorizationURL; + const char* host = [[url host] UTF8String]; + reachabilityRef_ = SCNetworkReachabilityCreateWithName(kCFAllocatorSystemDefault, + host); + if (reachabilityRef_) { + BOOL isScheduled = NO; + SCNetworkReachabilityContext ctx = { 0, self, NULL, NULL, NULL }; + + if (SCNetworkReachabilitySetCallback(reachabilityRef_, + ReachabilityCallBack, &ctx)) { + if (SCNetworkReachabilityScheduleWithRunLoop(reachabilityRef_, + CFRunLoopGetCurrent(), + kCFRunLoopDefaultMode)) { + isScheduled = YES; + } + } + + if (!isScheduled) { + CFRelease(reachabilityRef_); + reachabilityRef_ = NULL; + } + } +} + +- (void)destroyUnreachabilityTimer { + [networkLossTimer_ invalidate]; + [networkLossTimer_ autorelease]; + networkLossTimer_ = nil; +} + +- (void)reachabilityTarget:(SCNetworkReachabilityRef)reachabilityRef + changedFlags:(SCNetworkConnectionFlags)flags { + BOOL isConnected = (flags & kSCNetworkFlagsReachable) != 0 + && (flags & kSCNetworkFlagsConnectionRequired) == 0; + + if (isConnected) { + // server is again reachable + [self destroyUnreachabilityTimer]; + + if (hasNotifiedNetworkLoss_) { + // tell the user that the network has been found + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc postNotificationName:kGTMOAuth2NetworkFound + object:self + userInfo:nil]; + hasNotifiedNetworkLoss_ = NO; + } + } else { + // the server has become unreachable; start the timer, if necessary + if (networkLossTimer_ == nil + && networkLossTimeoutInterval_ > 0 + && !hasNotifiedNetworkLoss_) { + SEL sel = @selector(reachabilityTimerFired:); + networkLossTimer_ = [[NSTimer scheduledTimerWithTimeInterval:networkLossTimeoutInterval_ + target:self + selector:sel + userInfo:nil + repeats:NO] retain]; + } + } +} + +- (void)reachabilityTimerFired:(NSTimer *)timer { + // the user may call [[notification object] cancelSigningIn] to + // dismiss the sign-in + if (!hasNotifiedNetworkLoss_) { + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc postNotificationName:kGTMOAuth2NetworkLost + object:self + userInfo:nil]; + hasNotifiedNetworkLoss_ = YES; + } + + [self destroyUnreachabilityTimer]; +} + +- (void)stopReachabilityCheck { + [self destroyUnreachabilityTimer]; + + if (reachabilityRef_) { + SCNetworkReachabilityUnscheduleFromRunLoop(reachabilityRef_, + CFRunLoopGetCurrent(), + kCFRunLoopDefaultMode); + SCNetworkReachabilitySetCallback(reachabilityRef_, NULL, NULL); + + CFRelease(reachabilityRef_); + reachabilityRef_ = NULL; + } +} + +#pragma mark Token Revocation + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (void)revokeTokenForGoogleAuthentication:(GTMOAuth2Authentication *)auth { + if (auth.refreshToken != nil + && auth.canAuthorize + && [auth.serviceProvider isEqual:kGTMOAuth2ServiceProviderGoogle]) { + + // create a signed revocation request for this authentication object + NSURL *url = [self googleRevocationURL]; + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; + [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; + + NSString *token = auth.refreshToken; + NSString *encoded = [GTMOAuth2Authentication encodedOAuthValueForString:token]; + if (encoded != nil) { + NSString *body = [@"token=" stringByAppendingString:encoded]; + + [request setHTTPBody:[body dataUsingEncoding:NSUTF8StringEncoding]]; + [request setHTTPMethod:@"POST"]; + + NSString *userAgent = [auth userAgent]; + [request setValue:userAgent forHTTPHeaderField:@"User-Agent"]; + + // there's nothing to be done if revocation succeeds or fails + GTMHTTPFetcher *fetcher; + id fetcherService = auth.fetcherService; + if (fetcherService) { + fetcher = [fetcherService fetcherWithRequest:request]; + } else { + fetcher = [GTMHTTPFetcher fetcherWithRequest:request]; + } + fetcher.comment = @"revoke token"; + + // Use a completion handler fetch for better debugging, but only if we're + // guaranteed that blocks are available in the runtime +#if (!TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MIN_REQUIRED >= 1060)) || \ + (TARGET_OS_IPHONE && (__IPHONE_OS_VERSION_MIN_REQUIRED >= 40000)) + // Blocks are available + [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { + #if DEBUG + if (error) { + NSString *errStr = [[[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding] autorelease]; + NSLog(@"revoke error: %@", errStr); + } + #endif // DEBUG + }]; +#else + // Blocks may not be available + [fetcher beginFetchWithDelegate:nil didFinishSelector:NULL]; +#endif + } + } + [auth reset]; +} +#endif // !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT + +@end + +#endif // #if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES diff --git a/GTL/Source/OAuth2/.svn/text-base/ReleaseNotes.txt.svn-base b/GTL/Source/OAuth2/.svn/text-base/ReleaseNotes.txt.svn-base new file mode 100644 index 0000000..d4816a8 --- /dev/null +++ b/GTL/Source/OAuth2/.svn/text-base/ReleaseNotes.txt.svn-base @@ -0,0 +1,132 @@ +GTM OAuth 2 Release Notes + +Project site: http://code.google.com/p/gtm-oauth2/ +Discussion group: http://groups.google.com/group/gtm-oauth2 + +7-August-2012 + +Replaced initial html delay fix with a pending request mechanism. + +26-July-2012 + +Added popViewBlock property to GTMOAuth2ViewControllerTouch to allow +dismissing the view when it lacks a navigation controller. + + +13-April-2012 + +Support setting keychain accessibility for iOS. + + +4-April-2012 + +Add scope to persistenceResponseString so applications can inspect +the prior scope after loading the token from the keychain. + + +3-April-2012 + +Now pulls version 2.3.2 of SBJSON sources from github. + + +14-March-2012 + +Added notification on access token refresh. + + +7-October-2011 + +Added notifications for starting and stopping loads of UIWebView. + + +30-September-2011 + +Add brief delay to view controller to allow initial html to load. + + +21-September-2011 + +Added additionalTokenRequestParameters property to the authorization object. + +Updated the domain for clearing cookies when signing into Google services. + + +7-September-2011 + +Add support for token servers providing url-encoded responses (thanks ivo) + + +25-August-2011 + +Added convenience methods for creating autoreleased controllers. + + +24-August-2011 + +Fixed sign-in when Mac window controller displays as a standalone +modal window (thanks mirko) + + +2-August-2011 + +Projects may now define GTM_OAUTH2_SKIP_GOOGLE_SUPPORT to exclude +Google-specific code. The GTMOAuth2 project file also now includes +"non-Google" targets for building without Google-specific code. + + +18-July-2011 + +The authorization header now uses the "Bearer" prefix. + + +12-July-2011 + +Added an additionalAuthorizationParameters property to the SignIn class, used +by the sample apps to specify a display language for the sign-in pages. + + +20-June-2011 + +To avoid accidental leakage of tokens, the authentication object now +returns kGTMOAuth2ErrorUnauthorizableRequest when attempting to authorize +requests with schemes other than https. The property +shouldAuthorizeAllRequests can be set to override this and allow any +request to be authorized. + + +1-June-2011 + +Added Mac window controller property shouldAllowApplicationTermination + +Added user properties to window & view controllers. + +Fetchers may now optionally be created by a GTMHTTPFetcherService instance. + + +24-May-2011 + +Mac window controller now opens pop-up window links in an external browser +by default, and provides an externalRequestSelector property to let +the client provide custom handling. + + +4-May-2011 + +Addded support for services which provide access tokens, but no +refresh tokens. + + +Release 1.0.0 +6-April-2011 + +Initial public release. + + +JSON notes: + +This library currently relies on version 2.1.1 of SBJSON: + +http://json-framework.googlecode.com/svn/tags/2.1.1/Source/ + +The latest version of SBJSON is avaiilable at http://stig.github.com/json-framework/ + diff --git a/GTL/Source/OAuth2/GTMOAuth2.xcodeproj/.svn/all-wcprops b/GTL/Source/OAuth2/GTMOAuth2.xcodeproj/.svn/all-wcprops new file mode 100644 index 0000000..004385b --- /dev/null +++ b/GTL/Source/OAuth2/GTMOAuth2.xcodeproj/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 49 +/svn/!svn/ver/84/trunk/Source/GTMOAuth2.xcodeproj +END +project.pbxproj +K 25 +svn:wc:ra_dav:version-url +V 65 +/svn/!svn/ver/84/trunk/Source/GTMOAuth2.xcodeproj/project.pbxproj +END diff --git a/GTL/Source/OAuth2/GTMOAuth2.xcodeproj/.svn/entries b/GTL/Source/OAuth2/GTMOAuth2.xcodeproj/.svn/entries new file mode 100644 index 0000000..6c06718 --- /dev/null +++ b/GTL/Source/OAuth2/GTMOAuth2.xcodeproj/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +99 +http://gtm-oauth2.googlecode.com/svn/trunk/Source/GTMOAuth2.xcodeproj +http://gtm-oauth2.googlecode.com/svn + + + +2012-04-03T21:29:57.992602Z +84 +grobbins@google.com + + + + + + + + + + + + + + +22754eea-fc93-e339-b032-c1f495b90c16 + +project.pbxproj +file + + + + +2012-12-09T08:42:42.000000Z +4bc21f2e79e74737391f4c1ce503d391 +2012-04-03T21:29:57.992602Z +84 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +37294 + diff --git a/GTL/Source/OAuth2/GTMOAuth2.xcodeproj/.svn/text-base/project.pbxproj.svn-base b/GTL/Source/OAuth2/GTMOAuth2.xcodeproj/.svn/text-base/project.pbxproj.svn-base new file mode 100644 index 0000000..6e051af --- /dev/null +++ b/GTL/Source/OAuth2/GTMOAuth2.xcodeproj/.svn/text-base/project.pbxproj.svn-base @@ -0,0 +1,730 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4F24484B121F2E5C00FEE1DA /* GTMOAuth2Authentication.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F244848121F2E5C00FEE1DA /* GTMOAuth2Authentication.m */; }; + 4F24484C121F2E5C00FEE1DA /* GTMOAuth2SignIn.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F24484A121F2E5C00FEE1DA /* GTMOAuth2SignIn.m */; }; + 4F24491A121F370000FEE1DA /* GTMHTTPFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F244919121F370000FEE1DA /* GTMHTTPFetcher.m */; }; + 4F724A9012248CF5001A4AD0 /* GTMOAuth2Authentication.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F244848121F2E5C00FEE1DA /* GTMOAuth2Authentication.m */; }; + 4F724A9212248CF5001A4AD0 /* GTMOAuth2SignIn.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F24484A121F2E5C00FEE1DA /* GTMOAuth2SignIn.m */; }; + 4F724A9412248CF5001A4AD0 /* GTMHTTPFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F244919121F370000FEE1DA /* GTMHTTPFetcher.m */; }; + 4F724AB812248D6B001A4AD0 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F724AB512248D6B001A4AD0 /* Security.framework */; }; + 4F724ABA12248D6B001A4AD0 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F724AB712248D6B001A4AD0 /* SystemConfiguration.framework */; }; + 4F724BAB12248F75001A4AD0 /* GTMHTTPFetchHistory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F724BA912248F75001A4AD0 /* GTMHTTPFetchHistory.m */; }; + 4F724BB012248F81001A4AD0 /* GTMHTTPFetcherLogging.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F724BAE12248F81001A4AD0 /* GTMHTTPFetcherLogging.m */; }; + 4F8D436B133972F5000B4396 /* GTMOAuth2Window.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F8D436A133972F5000B4396 /* GTMOAuth2Window.xib */; }; + 4F8D437E1339735D000B4396 /* GTMOAuth2ViewControllerTouch.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F8D437C1339735D000B4396 /* GTMOAuth2ViewControllerTouch.m */; }; + 4F94D2D012288B8A00BC78AA /* GTMHTTPFetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F244918121F370000FEE1DA /* GTMHTTPFetcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F94D2D112288B8A00BC78AA /* GTMHTTPFetcherLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F724BAD12248F81001A4AD0 /* GTMHTTPFetcherLogging.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F94D2D212288B8A00BC78AA /* GTMHTTPFetchHistory.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F724BA812248F75001A4AD0 /* GTMHTTPFetchHistory.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F94D2D312288B8A00BC78AA /* GTMOAuth2Authentication.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F244847121F2E5C00FEE1DA /* GTMOAuth2Authentication.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F94D2D812288B8A00BC78AA /* GTMOAuth2SignIn.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F244849121F2E5C00FEE1DA /* GTMOAuth2SignIn.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F94D2D912288B8A00BC78AA /* GTMOAuth2WindowController.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F7249FA122485EE001A4AD0 /* GTMOAuth2WindowController.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F94D33E1228944800BC78AA /* GTMOAuth2WindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F7249FB122485EE001A4AD0 /* GTMOAuth2WindowController.m */; }; + 4FC754F113E77E25006A0C26 /* GTMOAuth2Authentication.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F244848121F2E5C00FEE1DA /* GTMOAuth2Authentication.m */; }; + 4FC754F213E77E25006A0C26 /* GTMOAuth2SignIn.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F24484A121F2E5C00FEE1DA /* GTMOAuth2SignIn.m */; }; + 4FC754F313E77E25006A0C26 /* GTMHTTPFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F244919121F370000FEE1DA /* GTMHTTPFetcher.m */; }; + 4FC754F413E77E25006A0C26 /* GTMOAuth2ViewControllerTouch.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F8D437C1339735D000B4396 /* GTMOAuth2ViewControllerTouch.m */; }; + 4FC754FD13E77E2B006A0C26 /* GTMHTTPFetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F244918121F370000FEE1DA /* GTMHTTPFetcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FC754FE13E77E2B006A0C26 /* GTMHTTPFetcherLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F724BAD12248F81001A4AD0 /* GTMHTTPFetcherLogging.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FC754FF13E77E2B006A0C26 /* GTMHTTPFetchHistory.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F724BA812248F75001A4AD0 /* GTMHTTPFetchHistory.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FC7550013E77E2B006A0C26 /* GTMOAuth2Authentication.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F244847121F2E5C00FEE1DA /* GTMOAuth2Authentication.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FC7550113E77E2B006A0C26 /* GTMOAuth2SignIn.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F244849121F2E5C00FEE1DA /* GTMOAuth2SignIn.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FC7550213E77E2B006A0C26 /* GTMOAuth2WindowController.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F7249FA122485EE001A4AD0 /* GTMOAuth2WindowController.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FC7550513E77E2B006A0C26 /* GTMOAuth2Window.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F8D436A133972F5000B4396 /* GTMOAuth2Window.xib */; }; + 4FC7550713E77E2B006A0C26 /* GTMOAuth2Authentication.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F244848121F2E5C00FEE1DA /* GTMOAuth2Authentication.m */; }; + 4FC7550813E77E2B006A0C26 /* GTMOAuth2SignIn.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F24484A121F2E5C00FEE1DA /* GTMOAuth2SignIn.m */; }; + 4FC7550913E77E2B006A0C26 /* GTMHTTPFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F244919121F370000FEE1DA /* GTMHTTPFetcher.m */; }; + 4FC7550A13E77E2B006A0C26 /* GTMHTTPFetchHistory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F724BA912248F75001A4AD0 /* GTMHTTPFetchHistory.m */; }; + 4FC7550B13E77E2B006A0C26 /* GTMHTTPFetcherLogging.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F724BAE12248F81001A4AD0 /* GTMHTTPFetcherLogging.m */; }; + 4FC7550C13E77E2B006A0C26 /* GTMOAuth2WindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F7249FB122485EE001A4AD0 /* GTMOAuth2WindowController.m */; }; + 4FC7550F13E77E2B006A0C26 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F724AB512248D6B001A4AD0 /* Security.framework */; }; + 4FC7551013E77E2B006A0C26 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F724AB712248D6B001A4AD0 /* SystemConfiguration.framework */; }; + 4FDB9F7A152BA239004A2830 /* SBJsonBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDB9F74152BA239004A2830 /* SBJsonBase.h */; }; + 4FDB9F7B152BA239004A2830 /* SBJsonBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDB9F74152BA239004A2830 /* SBJsonBase.h */; }; + 4FDB9F7C152BA239004A2830 /* SBJsonBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDB9F75152BA239004A2830 /* SBJsonBase.m */; }; + 4FDB9F7D152BA239004A2830 /* SBJsonBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDB9F75152BA239004A2830 /* SBJsonBase.m */; }; + 4FDB9F7E152BA239004A2830 /* SBJsonBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDB9F75152BA239004A2830 /* SBJsonBase.m */; }; + 4FDB9F7F152BA239004A2830 /* SBJsonBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDB9F75152BA239004A2830 /* SBJsonBase.m */; }; + 4FDB9F80152BA239004A2830 /* SBJsonParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDB9F76152BA239004A2830 /* SBJsonParser.h */; }; + 4FDB9F81152BA239004A2830 /* SBJsonParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDB9F76152BA239004A2830 /* SBJsonParser.h */; }; + 4FDB9F82152BA239004A2830 /* SBJsonParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDB9F77152BA239004A2830 /* SBJsonParser.m */; }; + 4FDB9F83152BA239004A2830 /* SBJsonParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDB9F77152BA239004A2830 /* SBJsonParser.m */; }; + 4FDB9F84152BA239004A2830 /* SBJsonParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDB9F77152BA239004A2830 /* SBJsonParser.m */; }; + 4FDB9F85152BA239004A2830 /* SBJsonParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDB9F77152BA239004A2830 /* SBJsonParser.m */; }; + 4FDB9F86152BA239004A2830 /* SBJsonWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDB9F78152BA239004A2830 /* SBJsonWriter.h */; }; + 4FDB9F87152BA239004A2830 /* SBJsonWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDB9F78152BA239004A2830 /* SBJsonWriter.h */; }; + 4FDB9F88152BA239004A2830 /* SBJsonWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDB9F79152BA239004A2830 /* SBJsonWriter.m */; }; + 4FDB9F89152BA239004A2830 /* SBJsonWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDB9F79152BA239004A2830 /* SBJsonWriter.m */; }; + 4FDB9F8A152BA239004A2830 /* SBJsonWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDB9F79152BA239004A2830 /* SBJsonWriter.m */; }; + 4FDB9F8B152BA239004A2830 /* SBJsonWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDB9F79152BA239004A2830 /* SBJsonWriter.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 4F244847121F2E5C00FEE1DA /* GTMOAuth2Authentication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMOAuth2Authentication.h; sourceTree = ""; }; + 4F244848121F2E5C00FEE1DA /* GTMOAuth2Authentication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMOAuth2Authentication.m; sourceTree = ""; }; + 4F244849121F2E5C00FEE1DA /* GTMOAuth2SignIn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMOAuth2SignIn.h; sourceTree = ""; }; + 4F24484A121F2E5C00FEE1DA /* GTMOAuth2SignIn.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMOAuth2SignIn.m; sourceTree = ""; }; + 4F244918121F370000FEE1DA /* GTMHTTPFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMHTTPFetcher.h; path = ../HTTPFetcher/GTMHTTPFetcher.h; sourceTree = SOURCE_ROOT; }; + 4F244919121F370000FEE1DA /* GTMHTTPFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPFetcher.m; path = ../HTTPFetcher/GTMHTTPFetcher.m; sourceTree = SOURCE_ROOT; }; + 4F3A8DBE125A61910080EB6C /* ReleaseNotes.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReleaseNotes.txt; sourceTree = ""; }; + 4F7249FA122485EE001A4AD0 /* GTMOAuth2WindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMOAuth2WindowController.h; path = Mac/GTMOAuth2WindowController.h; sourceTree = ""; }; + 4F7249FB122485EE001A4AD0 /* GTMOAuth2WindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMOAuth2WindowController.m; path = Mac/GTMOAuth2WindowController.m; sourceTree = ""; }; + 4F724AB512248D6B001A4AD0 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = ""; }; + 4F724AB612248D6B001A4AD0 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; }; + 4F724AB712248D6B001A4AD0 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = /System/Library/Frameworks/SystemConfiguration.framework; sourceTree = ""; }; + 4F724BA812248F75001A4AD0 /* GTMHTTPFetchHistory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMHTTPFetchHistory.h; path = ../HTTPFetcher/GTMHTTPFetchHistory.h; sourceTree = SOURCE_ROOT; }; + 4F724BA912248F75001A4AD0 /* GTMHTTPFetchHistory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPFetchHistory.m; path = ../HTTPFetcher/GTMHTTPFetchHistory.m; sourceTree = SOURCE_ROOT; }; + 4F724BAD12248F81001A4AD0 /* GTMHTTPFetcherLogging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMHTTPFetcherLogging.h; path = ../HTTPFetcher/GTMHTTPFetcherLogging.h; sourceTree = SOURCE_ROOT; }; + 4F724BAE12248F81001A4AD0 /* GTMHTTPFetcherLogging.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPFetcherLogging.m; path = ../HTTPFetcher/GTMHTTPFetcherLogging.m; sourceTree = SOURCE_ROOT; }; + 4F8D436A133972F5000B4396 /* GTMOAuth2Window.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = GTMOAuth2Window.xib; path = Mac/GTMOAuth2Window.xib; sourceTree = ""; }; + 4F8D437B1339735D000B4396 /* GTMOAuth2ViewControllerTouch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMOAuth2ViewControllerTouch.h; path = Touch/GTMOAuth2ViewControllerTouch.h; sourceTree = ""; }; + 4F8D437C1339735D000B4396 /* GTMOAuth2ViewControllerTouch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMOAuth2ViewControllerTouch.m; path = Touch/GTMOAuth2ViewControllerTouch.m; sourceTree = ""; }; + 4F8D437D1339735D000B4396 /* GTMOAuth2ViewTouch.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = GTMOAuth2ViewTouch.xib; path = Touch/GTMOAuth2ViewTouch.xib; sourceTree = ""; }; + 4FC754FA13E77E25006A0C26 /* libOAuthTouch2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libOAuthTouch2.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 4FDB9F74152BA239004A2830 /* SBJsonBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBJsonBase.h; path = ../JSON/SBJsonBase.h; sourceTree = ""; }; + 4FDB9F75152BA239004A2830 /* SBJsonBase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SBJsonBase.m; path = ../JSON/SBJsonBase.m; sourceTree = ""; }; + 4FDB9F76152BA239004A2830 /* SBJsonParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBJsonParser.h; path = ../JSON/SBJsonParser.h; sourceTree = ""; }; + 4FDB9F77152BA239004A2830 /* SBJsonParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SBJsonParser.m; path = ../JSON/SBJsonParser.m; sourceTree = ""; }; + 4FDB9F78152BA239004A2830 /* SBJsonWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBJsonWriter.h; path = ../JSON/SBJsonWriter.h; sourceTree = ""; }; + 4FDB9F79152BA239004A2830 /* SBJsonWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SBJsonWriter.m; path = ../JSON/SBJsonWriter.m; sourceTree = ""; }; + 4FF2B2F9133BC54600D75613 /* GTMOAuth2Framework-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GTMOAuth2Framework-Info.plist"; path = "Mac/GTMOAuth2Framework-Info.plist"; sourceTree = ""; }; + D2AAC07E0554694100DB518D /* libOAuthTouch2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libOAuthTouch2.a; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 4F724A6F12248B19001A4AD0 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F724AB812248D6B001A4AD0 /* Security.framework in Frameworks */, + 4F724ABA12248D6B001A4AD0 /* SystemConfiguration.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4FC754F613E77E25006A0C26 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4FC7550E13E77E2B006A0C26 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4FC7550F13E77E2B006A0C26 /* Security.framework in Frameworks */, + 4FC7551013E77E2B006A0C26 /* SystemConfiguration.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D2AAC07C0554694100DB518D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 034768DFFF38A50411DB9C8B /* Products */ = { + isa = PBXGroup; + children = ( + D2AAC07E0554694100DB518D /* libOAuthTouch2.a */, + 4FC754FA13E77E25006A0C26 /* libOAuthTouch2.a */, + ); + name = Products; + sourceTree = ""; + }; + 0867D691FE84028FC02AAC07 /* OAuthTouchStaticLibrary */ = { + isa = PBXGroup; + children = ( + 4F7249C012248423001A4AD0 /* Sources */, + 034768DFFF38A50411DB9C8B /* Products */, + 4F724AA112248D35001A4AD0 /* Libraries */, + 4F3A8DBE125A61910080EB6C /* ReleaseNotes.txt */, + ); + name = OAuthTouchStaticLibrary; + sourceTree = ""; + }; + 4F2037EB133A994400FE2666 /* JSON */ = { + isa = PBXGroup; + children = ( + 4FDB9F74152BA239004A2830 /* SBJsonBase.h */, + 4FDB9F75152BA239004A2830 /* SBJsonBase.m */, + 4FDB9F76152BA239004A2830 /* SBJsonParser.h */, + 4FDB9F77152BA239004A2830 /* SBJsonParser.m */, + 4FDB9F78152BA239004A2830 /* SBJsonWriter.h */, + 4FDB9F79152BA239004A2830 /* SBJsonWriter.m */, + ); + name = JSON; + sourceTree = ""; + }; + 4F7249C012248423001A4AD0 /* Sources */ = { + isa = PBXGroup; + children = ( + 4F244847121F2E5C00FEE1DA /* GTMOAuth2Authentication.h */, + 4F244848121F2E5C00FEE1DA /* GTMOAuth2Authentication.m */, + 4F244849121F2E5C00FEE1DA /* GTMOAuth2SignIn.h */, + 4F24484A121F2E5C00FEE1DA /* GTMOAuth2SignIn.m */, + 4F7249F2122485AC001A4AD0 /* Touch */, + 4F7249F3122485B2001A4AD0 /* Mac */, + 4F724BA712248F62001A4AD0 /* HTTPFetcher */, + 4F2037EB133A994400FE2666 /* JSON */, + ); + name = Sources; + sourceTree = ""; + }; + 4F7249F2122485AC001A4AD0 /* Touch */ = { + isa = PBXGroup; + children = ( + 4F8D437B1339735D000B4396 /* GTMOAuth2ViewControllerTouch.h */, + 4F8D437C1339735D000B4396 /* GTMOAuth2ViewControllerTouch.m */, + 4F8D437D1339735D000B4396 /* GTMOAuth2ViewTouch.xib */, + ); + name = Touch; + sourceTree = ""; + }; + 4F7249F3122485B2001A4AD0 /* Mac */ = { + isa = PBXGroup; + children = ( + 4F8D436A133972F5000B4396 /* GTMOAuth2Window.xib */, + 4F7249FA122485EE001A4AD0 /* GTMOAuth2WindowController.h */, + 4F7249FB122485EE001A4AD0 /* GTMOAuth2WindowController.m */, + 4FF2B2F9133BC54600D75613 /* GTMOAuth2Framework-Info.plist */, + ); + name = Mac; + sourceTree = ""; + }; + 4F724AA112248D35001A4AD0 /* Libraries */ = { + isa = PBXGroup; + children = ( + 4F724AB612248D6B001A4AD0 /* SenTestingKit.framework */, + 4F724AB512248D6B001A4AD0 /* Security.framework */, + 4F724AB712248D6B001A4AD0 /* SystemConfiguration.framework */, + ); + name = Libraries; + sourceTree = ""; + }; + 4F724BA712248F62001A4AD0 /* HTTPFetcher */ = { + isa = PBXGroup; + children = ( + 4F244918121F370000FEE1DA /* GTMHTTPFetcher.h */, + 4F244919121F370000FEE1DA /* GTMHTTPFetcher.m */, + 4F724BA812248F75001A4AD0 /* GTMHTTPFetchHistory.h */, + 4F724BA912248F75001A4AD0 /* GTMHTTPFetchHistory.m */, + 4F724BAD12248F81001A4AD0 /* GTMHTTPFetcherLogging.h */, + 4F724BAE12248F81001A4AD0 /* GTMHTTPFetcherLogging.m */, + ); + name = HTTPFetcher; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 4F724A6C12248B19001A4AD0 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F94D2D012288B8A00BC78AA /* GTMHTTPFetcher.h in Headers */, + 4F94D2D112288B8A00BC78AA /* GTMHTTPFetcherLogging.h in Headers */, + 4F94D2D212288B8A00BC78AA /* GTMHTTPFetchHistory.h in Headers */, + 4F94D2D312288B8A00BC78AA /* GTMOAuth2Authentication.h in Headers */, + 4F94D2D812288B8A00BC78AA /* GTMOAuth2SignIn.h in Headers */, + 4F94D2D912288B8A00BC78AA /* GTMOAuth2WindowController.h in Headers */, + 4FDB9F7A152BA239004A2830 /* SBJsonBase.h in Headers */, + 4FDB9F80152BA239004A2830 /* SBJsonParser.h in Headers */, + 4FDB9F86152BA239004A2830 /* SBJsonWriter.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4FC754FC13E77E2B006A0C26 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 4FC754FD13E77E2B006A0C26 /* GTMHTTPFetcher.h in Headers */, + 4FC754FE13E77E2B006A0C26 /* GTMHTTPFetcherLogging.h in Headers */, + 4FC754FF13E77E2B006A0C26 /* GTMHTTPFetchHistory.h in Headers */, + 4FC7550013E77E2B006A0C26 /* GTMOAuth2Authentication.h in Headers */, + 4FC7550113E77E2B006A0C26 /* GTMOAuth2SignIn.h in Headers */, + 4FC7550213E77E2B006A0C26 /* GTMOAuth2WindowController.h in Headers */, + 4FDB9F7B152BA239004A2830 /* SBJsonBase.h in Headers */, + 4FDB9F81152BA239004A2830 /* SBJsonParser.h in Headers */, + 4FDB9F87152BA239004A2830 /* SBJsonWriter.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 4F724A7012248B19001A4AD0 /* GTMOAuth2.framework */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4F724A7412248B19001A4AD0 /* Build configuration list for PBXNativeTarget "GTMOAuth2.framework" */; + buildPhases = ( + 4F724A6C12248B19001A4AD0 /* Headers */, + 4F724A6D12248B19001A4AD0 /* Resources */, + 4F724A6E12248B19001A4AD0 /* Sources */, + 4F724A6F12248B19001A4AD0 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = GTMOAuth2.framework; + productName = OAuth.framework; + productType = "com.apple.product-type.framework"; + }; + 4FC754EF13E77E25006A0C26 /* OAuthTouchNonGoogleStaticLib */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4FC754F713E77E25006A0C26 /* Build configuration list for PBXNativeTarget "OAuthTouchNonGoogleStaticLib" */; + buildPhases = ( + 4FC754F013E77E25006A0C26 /* Sources */, + 4FC754F613E77E25006A0C26 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = OAuthTouchNonGoogleStaticLib; + productName = OAuthTouchStaticLibrary; + productReference = 4FC754FA13E77E25006A0C26 /* libOAuthTouch2.a */; + productType = "com.apple.product-type.library.static"; + }; + 4FC754FB13E77E2B006A0C26 /* GTMOAuth2NonGoogle.framework */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4FC7551113E77E2B006A0C26 /* Build configuration list for PBXNativeTarget "GTMOAuth2NonGoogle.framework" */; + buildPhases = ( + 4FC754FC13E77E2B006A0C26 /* Headers */, + 4FC7550413E77E2B006A0C26 /* Resources */, + 4FC7550613E77E2B006A0C26 /* Sources */, + 4FC7550E13E77E2B006A0C26 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = GTMOAuth2NonGoogle.framework; + productName = OAuth.framework; + productType = "com.apple.product-type.framework"; + }; + D2AAC07D0554694100DB518D /* OAuthTouchStaticLib */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "OAuthTouchStaticLib" */; + buildPhases = ( + D2AAC07B0554694100DB518D /* Sources */, + D2AAC07C0554694100DB518D /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = OAuthTouchStaticLib; + productName = OAuthTouchStaticLibrary; + productReference = D2AAC07E0554694100DB518D /* libOAuthTouch2.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 0867D690FE84028FC02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "GTMOAuth2" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 0867D691FE84028FC02AAC07 /* OAuthTouchStaticLibrary */; + productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D2AAC07D0554694100DB518D /* OAuthTouchStaticLib */, + 4FC754EF13E77E25006A0C26 /* OAuthTouchNonGoogleStaticLib */, + 4F724A7012248B19001A4AD0 /* GTMOAuth2.framework */, + 4FC754FB13E77E2B006A0C26 /* GTMOAuth2NonGoogle.framework */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 4F724A6D12248B19001A4AD0 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F8D436B133972F5000B4396 /* GTMOAuth2Window.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4FC7550413E77E2B006A0C26 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4FC7550513E77E2B006A0C26 /* GTMOAuth2Window.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 4F724A6E12248B19001A4AD0 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F724A9012248CF5001A4AD0 /* GTMOAuth2Authentication.m in Sources */, + 4F724A9212248CF5001A4AD0 /* GTMOAuth2SignIn.m in Sources */, + 4F724A9412248CF5001A4AD0 /* GTMHTTPFetcher.m in Sources */, + 4F724BAB12248F75001A4AD0 /* GTMHTTPFetchHistory.m in Sources */, + 4F724BB012248F81001A4AD0 /* GTMHTTPFetcherLogging.m in Sources */, + 4F94D33E1228944800BC78AA /* GTMOAuth2WindowController.m in Sources */, + 4FDB9F7E152BA239004A2830 /* SBJsonBase.m in Sources */, + 4FDB9F84152BA239004A2830 /* SBJsonParser.m in Sources */, + 4FDB9F8A152BA239004A2830 /* SBJsonWriter.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4FC754F013E77E25006A0C26 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4FC754F113E77E25006A0C26 /* GTMOAuth2Authentication.m in Sources */, + 4FC754F213E77E25006A0C26 /* GTMOAuth2SignIn.m in Sources */, + 4FC754F313E77E25006A0C26 /* GTMHTTPFetcher.m in Sources */, + 4FC754F413E77E25006A0C26 /* GTMOAuth2ViewControllerTouch.m in Sources */, + 4FDB9F7D152BA239004A2830 /* SBJsonBase.m in Sources */, + 4FDB9F83152BA239004A2830 /* SBJsonParser.m in Sources */, + 4FDB9F89152BA239004A2830 /* SBJsonWriter.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4FC7550613E77E2B006A0C26 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4FC7550713E77E2B006A0C26 /* GTMOAuth2Authentication.m in Sources */, + 4FC7550813E77E2B006A0C26 /* GTMOAuth2SignIn.m in Sources */, + 4FC7550913E77E2B006A0C26 /* GTMHTTPFetcher.m in Sources */, + 4FC7550A13E77E2B006A0C26 /* GTMHTTPFetchHistory.m in Sources */, + 4FC7550B13E77E2B006A0C26 /* GTMHTTPFetcherLogging.m in Sources */, + 4FC7550C13E77E2B006A0C26 /* GTMOAuth2WindowController.m in Sources */, + 4FDB9F7F152BA239004A2830 /* SBJsonBase.m in Sources */, + 4FDB9F85152BA239004A2830 /* SBJsonParser.m in Sources */, + 4FDB9F8B152BA239004A2830 /* SBJsonWriter.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D2AAC07B0554694100DB518D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F24484B121F2E5C00FEE1DA /* GTMOAuth2Authentication.m in Sources */, + 4F24484C121F2E5C00FEE1DA /* GTMOAuth2SignIn.m in Sources */, + 4F24491A121F370000FEE1DA /* GTMHTTPFetcher.m in Sources */, + 4F8D437E1339735D000B4396 /* GTMOAuth2ViewControllerTouch.m in Sources */, + 4FDB9F7C152BA239004A2830 /* SBJsonBase.m in Sources */, + 4FDB9F82152BA239004A2830 /* SBJsonParser.m in Sources */, + 4FDB9F88152BA239004A2830 /* SBJsonWriter.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1DEB921F08733DC00010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + INSTALL_PATH = /usr/local/lib; + PRODUCT_NAME = OAuthTouch2; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 1DEB922008733DC00010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + GCC_MODEL_TUNING = G5; + INSTALL_PATH = /usr/local/lib; + PRODUCT_NAME = OAuthTouch2; + SDKROOT = iphoneos; + }; + name = Release; + }; + 1DEB922308733DC00010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; + GCC_WARN_ABOUT_MISSING_NEWLINE = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; + GCC_WARN_MISSING_PARENTHESES = YES; + GCC_WARN_SHADOW = YES; + GCC_WARN_SIGN_COMPARE = YES; + GCC_WARN_STRICT_SELECTOR_MATCH = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNKNOWN_PRAGMAS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_LABEL = YES; + GCC_WARN_UNUSED_VALUE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DDEBUG=1"; + OTHER_LDFLAGS = "-ObjC"; + SDKROOT = macosx; + }; + name = Debug; + }; + 1DEB922408733DC00010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; + GCC_WARN_ABOUT_MISSING_NEWLINE = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; + GCC_WARN_MISSING_PARENTHESES = YES; + GCC_WARN_SHADOW = YES; + GCC_WARN_SIGN_COMPARE = YES; + GCC_WARN_STRICT_SELECTOR_MATCH = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNKNOWN_PRAGMAS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_LABEL = YES; + GCC_WARN_UNUSED_VALUE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_LDFLAGS = "-ObjC"; + SDKROOT = macosx; + }; + name = Release; + }; + 4F724A7212248B19001A4AD0 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(DEVELOPER_FRAMEWORKS_DIR)\"", + ); + FRAMEWORK_VERSION = A; + GCC_DYNAMIC_NO_PIC = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; + INFOPLIST_FILE = "Mac/GTMOAuth2Framework-Info.plist"; + INSTALL_PATH = "$(HOME)/Library/Frameworks"; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PRODUCT_NAME = GTMOAuth2; + SDKROOT = macosx; + }; + name = Debug; + }; + 4F724A7312248B19001A4AD0 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(DEVELOPER_FRAMEWORKS_DIR)\"", + ); + FRAMEWORK_VERSION = A; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; + INFOPLIST_FILE = "Mac/GTMOAuth2Framework-Info.plist"; + INSTALL_PATH = "$(HOME)/Library/Frameworks"; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PRODUCT_NAME = GTMOAuth2; + SDKROOT = macosx; + ZERO_LINK = NO; + }; + name = Release; + }; + 4FC754F813E77E25006A0C26 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + INSTALL_PATH = /usr/local/lib; + OTHER_CFLAGS = ( + "-DGTM_OAUTH2_SKIP_GOOGLE_SUPPORT=1", + "$(inherited)", + ); + PRODUCT_NAME = OAuthTouch2; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 4FC754F913E77E25006A0C26 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + GCC_MODEL_TUNING = G5; + INSTALL_PATH = /usr/local/lib; + OTHER_CFLAGS = "-DGTM_OAUTH2_SKIP_GOOGLE_SUPPORT=1"; + PRODUCT_NAME = OAuthTouch2; + SDKROOT = iphoneos; + }; + name = Release; + }; + 4FC7551213E77E2B006A0C26 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(DEVELOPER_FRAMEWORKS_DIR)\"", + ); + FRAMEWORK_VERSION = A; + GCC_DYNAMIC_NO_PIC = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; + INFOPLIST_FILE = "Mac/GTMOAuth2Framework-Info.plist"; + INSTALL_PATH = "$(HOME)/Library/Frameworks"; + OTHER_CFLAGS = ( + "-DGTM_OAUTH2_SKIP_GOOGLE_SUPPORT=1", + "$(inherited)", + ); + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PRODUCT_NAME = GTMOAuth2; + SDKROOT = macosx; + }; + name = Debug; + }; + 4FC7551313E77E2B006A0C26 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(DEVELOPER_FRAMEWORKS_DIR)\"", + ); + FRAMEWORK_VERSION = A; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; + INFOPLIST_FILE = "Mac/GTMOAuth2Framework-Info.plist"; + INSTALL_PATH = "$(HOME)/Library/Frameworks"; + OTHER_CFLAGS = "-DGTM_OAUTH2_SKIP_GOOGLE_SUPPORT=1"; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PRODUCT_NAME = GTMOAuth2; + SDKROOT = macosx; + ZERO_LINK = NO; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "OAuthTouchStaticLib" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB921F08733DC00010E9CD /* Debug */, + 1DEB922008733DC00010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "GTMOAuth2" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB922308733DC00010E9CD /* Debug */, + 1DEB922408733DC00010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4F724A7412248B19001A4AD0 /* Build configuration list for PBXNativeTarget "GTMOAuth2.framework" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4F724A7212248B19001A4AD0 /* Debug */, + 4F724A7312248B19001A4AD0 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4FC754F713E77E25006A0C26 /* Build configuration list for PBXNativeTarget "OAuthTouchNonGoogleStaticLib" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4FC754F813E77E25006A0C26 /* Debug */, + 4FC754F913E77E25006A0C26 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4FC7551113E77E2B006A0C26 /* Build configuration list for PBXNativeTarget "GTMOAuth2NonGoogle.framework" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4FC7551213E77E2B006A0C26 /* Debug */, + 4FC7551313E77E2B006A0C26 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 0867D690FE84028FC02AAC07 /* Project object */; +} diff --git a/GTL/Source/OAuth2/GTMOAuth2.xcodeproj/project.pbxproj b/GTL/Source/OAuth2/GTMOAuth2.xcodeproj/project.pbxproj new file mode 100644 index 0000000..6e051af --- /dev/null +++ b/GTL/Source/OAuth2/GTMOAuth2.xcodeproj/project.pbxproj @@ -0,0 +1,730 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4F24484B121F2E5C00FEE1DA /* GTMOAuth2Authentication.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F244848121F2E5C00FEE1DA /* GTMOAuth2Authentication.m */; }; + 4F24484C121F2E5C00FEE1DA /* GTMOAuth2SignIn.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F24484A121F2E5C00FEE1DA /* GTMOAuth2SignIn.m */; }; + 4F24491A121F370000FEE1DA /* GTMHTTPFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F244919121F370000FEE1DA /* GTMHTTPFetcher.m */; }; + 4F724A9012248CF5001A4AD0 /* GTMOAuth2Authentication.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F244848121F2E5C00FEE1DA /* GTMOAuth2Authentication.m */; }; + 4F724A9212248CF5001A4AD0 /* GTMOAuth2SignIn.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F24484A121F2E5C00FEE1DA /* GTMOAuth2SignIn.m */; }; + 4F724A9412248CF5001A4AD0 /* GTMHTTPFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F244919121F370000FEE1DA /* GTMHTTPFetcher.m */; }; + 4F724AB812248D6B001A4AD0 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F724AB512248D6B001A4AD0 /* Security.framework */; }; + 4F724ABA12248D6B001A4AD0 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F724AB712248D6B001A4AD0 /* SystemConfiguration.framework */; }; + 4F724BAB12248F75001A4AD0 /* GTMHTTPFetchHistory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F724BA912248F75001A4AD0 /* GTMHTTPFetchHistory.m */; }; + 4F724BB012248F81001A4AD0 /* GTMHTTPFetcherLogging.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F724BAE12248F81001A4AD0 /* GTMHTTPFetcherLogging.m */; }; + 4F8D436B133972F5000B4396 /* GTMOAuth2Window.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F8D436A133972F5000B4396 /* GTMOAuth2Window.xib */; }; + 4F8D437E1339735D000B4396 /* GTMOAuth2ViewControllerTouch.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F8D437C1339735D000B4396 /* GTMOAuth2ViewControllerTouch.m */; }; + 4F94D2D012288B8A00BC78AA /* GTMHTTPFetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F244918121F370000FEE1DA /* GTMHTTPFetcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F94D2D112288B8A00BC78AA /* GTMHTTPFetcherLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F724BAD12248F81001A4AD0 /* GTMHTTPFetcherLogging.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F94D2D212288B8A00BC78AA /* GTMHTTPFetchHistory.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F724BA812248F75001A4AD0 /* GTMHTTPFetchHistory.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F94D2D312288B8A00BC78AA /* GTMOAuth2Authentication.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F244847121F2E5C00FEE1DA /* GTMOAuth2Authentication.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F94D2D812288B8A00BC78AA /* GTMOAuth2SignIn.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F244849121F2E5C00FEE1DA /* GTMOAuth2SignIn.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F94D2D912288B8A00BC78AA /* GTMOAuth2WindowController.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F7249FA122485EE001A4AD0 /* GTMOAuth2WindowController.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4F94D33E1228944800BC78AA /* GTMOAuth2WindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F7249FB122485EE001A4AD0 /* GTMOAuth2WindowController.m */; }; + 4FC754F113E77E25006A0C26 /* GTMOAuth2Authentication.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F244848121F2E5C00FEE1DA /* GTMOAuth2Authentication.m */; }; + 4FC754F213E77E25006A0C26 /* GTMOAuth2SignIn.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F24484A121F2E5C00FEE1DA /* GTMOAuth2SignIn.m */; }; + 4FC754F313E77E25006A0C26 /* GTMHTTPFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F244919121F370000FEE1DA /* GTMHTTPFetcher.m */; }; + 4FC754F413E77E25006A0C26 /* GTMOAuth2ViewControllerTouch.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F8D437C1339735D000B4396 /* GTMOAuth2ViewControllerTouch.m */; }; + 4FC754FD13E77E2B006A0C26 /* GTMHTTPFetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F244918121F370000FEE1DA /* GTMHTTPFetcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FC754FE13E77E2B006A0C26 /* GTMHTTPFetcherLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F724BAD12248F81001A4AD0 /* GTMHTTPFetcherLogging.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FC754FF13E77E2B006A0C26 /* GTMHTTPFetchHistory.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F724BA812248F75001A4AD0 /* GTMHTTPFetchHistory.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FC7550013E77E2B006A0C26 /* GTMOAuth2Authentication.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F244847121F2E5C00FEE1DA /* GTMOAuth2Authentication.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FC7550113E77E2B006A0C26 /* GTMOAuth2SignIn.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F244849121F2E5C00FEE1DA /* GTMOAuth2SignIn.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FC7550213E77E2B006A0C26 /* GTMOAuth2WindowController.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F7249FA122485EE001A4AD0 /* GTMOAuth2WindowController.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FC7550513E77E2B006A0C26 /* GTMOAuth2Window.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F8D436A133972F5000B4396 /* GTMOAuth2Window.xib */; }; + 4FC7550713E77E2B006A0C26 /* GTMOAuth2Authentication.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F244848121F2E5C00FEE1DA /* GTMOAuth2Authentication.m */; }; + 4FC7550813E77E2B006A0C26 /* GTMOAuth2SignIn.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F24484A121F2E5C00FEE1DA /* GTMOAuth2SignIn.m */; }; + 4FC7550913E77E2B006A0C26 /* GTMHTTPFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F244919121F370000FEE1DA /* GTMHTTPFetcher.m */; }; + 4FC7550A13E77E2B006A0C26 /* GTMHTTPFetchHistory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F724BA912248F75001A4AD0 /* GTMHTTPFetchHistory.m */; }; + 4FC7550B13E77E2B006A0C26 /* GTMHTTPFetcherLogging.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F724BAE12248F81001A4AD0 /* GTMHTTPFetcherLogging.m */; }; + 4FC7550C13E77E2B006A0C26 /* GTMOAuth2WindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F7249FB122485EE001A4AD0 /* GTMOAuth2WindowController.m */; }; + 4FC7550F13E77E2B006A0C26 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F724AB512248D6B001A4AD0 /* Security.framework */; }; + 4FC7551013E77E2B006A0C26 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F724AB712248D6B001A4AD0 /* SystemConfiguration.framework */; }; + 4FDB9F7A152BA239004A2830 /* SBJsonBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDB9F74152BA239004A2830 /* SBJsonBase.h */; }; + 4FDB9F7B152BA239004A2830 /* SBJsonBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDB9F74152BA239004A2830 /* SBJsonBase.h */; }; + 4FDB9F7C152BA239004A2830 /* SBJsonBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDB9F75152BA239004A2830 /* SBJsonBase.m */; }; + 4FDB9F7D152BA239004A2830 /* SBJsonBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDB9F75152BA239004A2830 /* SBJsonBase.m */; }; + 4FDB9F7E152BA239004A2830 /* SBJsonBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDB9F75152BA239004A2830 /* SBJsonBase.m */; }; + 4FDB9F7F152BA239004A2830 /* SBJsonBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDB9F75152BA239004A2830 /* SBJsonBase.m */; }; + 4FDB9F80152BA239004A2830 /* SBJsonParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDB9F76152BA239004A2830 /* SBJsonParser.h */; }; + 4FDB9F81152BA239004A2830 /* SBJsonParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDB9F76152BA239004A2830 /* SBJsonParser.h */; }; + 4FDB9F82152BA239004A2830 /* SBJsonParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDB9F77152BA239004A2830 /* SBJsonParser.m */; }; + 4FDB9F83152BA239004A2830 /* SBJsonParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDB9F77152BA239004A2830 /* SBJsonParser.m */; }; + 4FDB9F84152BA239004A2830 /* SBJsonParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDB9F77152BA239004A2830 /* SBJsonParser.m */; }; + 4FDB9F85152BA239004A2830 /* SBJsonParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDB9F77152BA239004A2830 /* SBJsonParser.m */; }; + 4FDB9F86152BA239004A2830 /* SBJsonWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDB9F78152BA239004A2830 /* SBJsonWriter.h */; }; + 4FDB9F87152BA239004A2830 /* SBJsonWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDB9F78152BA239004A2830 /* SBJsonWriter.h */; }; + 4FDB9F88152BA239004A2830 /* SBJsonWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDB9F79152BA239004A2830 /* SBJsonWriter.m */; }; + 4FDB9F89152BA239004A2830 /* SBJsonWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDB9F79152BA239004A2830 /* SBJsonWriter.m */; }; + 4FDB9F8A152BA239004A2830 /* SBJsonWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDB9F79152BA239004A2830 /* SBJsonWriter.m */; }; + 4FDB9F8B152BA239004A2830 /* SBJsonWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FDB9F79152BA239004A2830 /* SBJsonWriter.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 4F244847121F2E5C00FEE1DA /* GTMOAuth2Authentication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMOAuth2Authentication.h; sourceTree = ""; }; + 4F244848121F2E5C00FEE1DA /* GTMOAuth2Authentication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMOAuth2Authentication.m; sourceTree = ""; }; + 4F244849121F2E5C00FEE1DA /* GTMOAuth2SignIn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMOAuth2SignIn.h; sourceTree = ""; }; + 4F24484A121F2E5C00FEE1DA /* GTMOAuth2SignIn.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMOAuth2SignIn.m; sourceTree = ""; }; + 4F244918121F370000FEE1DA /* GTMHTTPFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMHTTPFetcher.h; path = ../HTTPFetcher/GTMHTTPFetcher.h; sourceTree = SOURCE_ROOT; }; + 4F244919121F370000FEE1DA /* GTMHTTPFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPFetcher.m; path = ../HTTPFetcher/GTMHTTPFetcher.m; sourceTree = SOURCE_ROOT; }; + 4F3A8DBE125A61910080EB6C /* ReleaseNotes.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReleaseNotes.txt; sourceTree = ""; }; + 4F7249FA122485EE001A4AD0 /* GTMOAuth2WindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMOAuth2WindowController.h; path = Mac/GTMOAuth2WindowController.h; sourceTree = ""; }; + 4F7249FB122485EE001A4AD0 /* GTMOAuth2WindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMOAuth2WindowController.m; path = Mac/GTMOAuth2WindowController.m; sourceTree = ""; }; + 4F724AB512248D6B001A4AD0 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = ""; }; + 4F724AB612248D6B001A4AD0 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; }; + 4F724AB712248D6B001A4AD0 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = /System/Library/Frameworks/SystemConfiguration.framework; sourceTree = ""; }; + 4F724BA812248F75001A4AD0 /* GTMHTTPFetchHistory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMHTTPFetchHistory.h; path = ../HTTPFetcher/GTMHTTPFetchHistory.h; sourceTree = SOURCE_ROOT; }; + 4F724BA912248F75001A4AD0 /* GTMHTTPFetchHistory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPFetchHistory.m; path = ../HTTPFetcher/GTMHTTPFetchHistory.m; sourceTree = SOURCE_ROOT; }; + 4F724BAD12248F81001A4AD0 /* GTMHTTPFetcherLogging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMHTTPFetcherLogging.h; path = ../HTTPFetcher/GTMHTTPFetcherLogging.h; sourceTree = SOURCE_ROOT; }; + 4F724BAE12248F81001A4AD0 /* GTMHTTPFetcherLogging.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMHTTPFetcherLogging.m; path = ../HTTPFetcher/GTMHTTPFetcherLogging.m; sourceTree = SOURCE_ROOT; }; + 4F8D436A133972F5000B4396 /* GTMOAuth2Window.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = GTMOAuth2Window.xib; path = Mac/GTMOAuth2Window.xib; sourceTree = ""; }; + 4F8D437B1339735D000B4396 /* GTMOAuth2ViewControllerTouch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMOAuth2ViewControllerTouch.h; path = Touch/GTMOAuth2ViewControllerTouch.h; sourceTree = ""; }; + 4F8D437C1339735D000B4396 /* GTMOAuth2ViewControllerTouch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMOAuth2ViewControllerTouch.m; path = Touch/GTMOAuth2ViewControllerTouch.m; sourceTree = ""; }; + 4F8D437D1339735D000B4396 /* GTMOAuth2ViewTouch.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = GTMOAuth2ViewTouch.xib; path = Touch/GTMOAuth2ViewTouch.xib; sourceTree = ""; }; + 4FC754FA13E77E25006A0C26 /* libOAuthTouch2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libOAuthTouch2.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 4FDB9F74152BA239004A2830 /* SBJsonBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBJsonBase.h; path = ../JSON/SBJsonBase.h; sourceTree = ""; }; + 4FDB9F75152BA239004A2830 /* SBJsonBase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SBJsonBase.m; path = ../JSON/SBJsonBase.m; sourceTree = ""; }; + 4FDB9F76152BA239004A2830 /* SBJsonParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBJsonParser.h; path = ../JSON/SBJsonParser.h; sourceTree = ""; }; + 4FDB9F77152BA239004A2830 /* SBJsonParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SBJsonParser.m; path = ../JSON/SBJsonParser.m; sourceTree = ""; }; + 4FDB9F78152BA239004A2830 /* SBJsonWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBJsonWriter.h; path = ../JSON/SBJsonWriter.h; sourceTree = ""; }; + 4FDB9F79152BA239004A2830 /* SBJsonWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SBJsonWriter.m; path = ../JSON/SBJsonWriter.m; sourceTree = ""; }; + 4FF2B2F9133BC54600D75613 /* GTMOAuth2Framework-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GTMOAuth2Framework-Info.plist"; path = "Mac/GTMOAuth2Framework-Info.plist"; sourceTree = ""; }; + D2AAC07E0554694100DB518D /* libOAuthTouch2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libOAuthTouch2.a; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 4F724A6F12248B19001A4AD0 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F724AB812248D6B001A4AD0 /* Security.framework in Frameworks */, + 4F724ABA12248D6B001A4AD0 /* SystemConfiguration.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4FC754F613E77E25006A0C26 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4FC7550E13E77E2B006A0C26 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4FC7550F13E77E2B006A0C26 /* Security.framework in Frameworks */, + 4FC7551013E77E2B006A0C26 /* SystemConfiguration.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D2AAC07C0554694100DB518D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 034768DFFF38A50411DB9C8B /* Products */ = { + isa = PBXGroup; + children = ( + D2AAC07E0554694100DB518D /* libOAuthTouch2.a */, + 4FC754FA13E77E25006A0C26 /* libOAuthTouch2.a */, + ); + name = Products; + sourceTree = ""; + }; + 0867D691FE84028FC02AAC07 /* OAuthTouchStaticLibrary */ = { + isa = PBXGroup; + children = ( + 4F7249C012248423001A4AD0 /* Sources */, + 034768DFFF38A50411DB9C8B /* Products */, + 4F724AA112248D35001A4AD0 /* Libraries */, + 4F3A8DBE125A61910080EB6C /* ReleaseNotes.txt */, + ); + name = OAuthTouchStaticLibrary; + sourceTree = ""; + }; + 4F2037EB133A994400FE2666 /* JSON */ = { + isa = PBXGroup; + children = ( + 4FDB9F74152BA239004A2830 /* SBJsonBase.h */, + 4FDB9F75152BA239004A2830 /* SBJsonBase.m */, + 4FDB9F76152BA239004A2830 /* SBJsonParser.h */, + 4FDB9F77152BA239004A2830 /* SBJsonParser.m */, + 4FDB9F78152BA239004A2830 /* SBJsonWriter.h */, + 4FDB9F79152BA239004A2830 /* SBJsonWriter.m */, + ); + name = JSON; + sourceTree = ""; + }; + 4F7249C012248423001A4AD0 /* Sources */ = { + isa = PBXGroup; + children = ( + 4F244847121F2E5C00FEE1DA /* GTMOAuth2Authentication.h */, + 4F244848121F2E5C00FEE1DA /* GTMOAuth2Authentication.m */, + 4F244849121F2E5C00FEE1DA /* GTMOAuth2SignIn.h */, + 4F24484A121F2E5C00FEE1DA /* GTMOAuth2SignIn.m */, + 4F7249F2122485AC001A4AD0 /* Touch */, + 4F7249F3122485B2001A4AD0 /* Mac */, + 4F724BA712248F62001A4AD0 /* HTTPFetcher */, + 4F2037EB133A994400FE2666 /* JSON */, + ); + name = Sources; + sourceTree = ""; + }; + 4F7249F2122485AC001A4AD0 /* Touch */ = { + isa = PBXGroup; + children = ( + 4F8D437B1339735D000B4396 /* GTMOAuth2ViewControllerTouch.h */, + 4F8D437C1339735D000B4396 /* GTMOAuth2ViewControllerTouch.m */, + 4F8D437D1339735D000B4396 /* GTMOAuth2ViewTouch.xib */, + ); + name = Touch; + sourceTree = ""; + }; + 4F7249F3122485B2001A4AD0 /* Mac */ = { + isa = PBXGroup; + children = ( + 4F8D436A133972F5000B4396 /* GTMOAuth2Window.xib */, + 4F7249FA122485EE001A4AD0 /* GTMOAuth2WindowController.h */, + 4F7249FB122485EE001A4AD0 /* GTMOAuth2WindowController.m */, + 4FF2B2F9133BC54600D75613 /* GTMOAuth2Framework-Info.plist */, + ); + name = Mac; + sourceTree = ""; + }; + 4F724AA112248D35001A4AD0 /* Libraries */ = { + isa = PBXGroup; + children = ( + 4F724AB612248D6B001A4AD0 /* SenTestingKit.framework */, + 4F724AB512248D6B001A4AD0 /* Security.framework */, + 4F724AB712248D6B001A4AD0 /* SystemConfiguration.framework */, + ); + name = Libraries; + sourceTree = ""; + }; + 4F724BA712248F62001A4AD0 /* HTTPFetcher */ = { + isa = PBXGroup; + children = ( + 4F244918121F370000FEE1DA /* GTMHTTPFetcher.h */, + 4F244919121F370000FEE1DA /* GTMHTTPFetcher.m */, + 4F724BA812248F75001A4AD0 /* GTMHTTPFetchHistory.h */, + 4F724BA912248F75001A4AD0 /* GTMHTTPFetchHistory.m */, + 4F724BAD12248F81001A4AD0 /* GTMHTTPFetcherLogging.h */, + 4F724BAE12248F81001A4AD0 /* GTMHTTPFetcherLogging.m */, + ); + name = HTTPFetcher; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 4F724A6C12248B19001A4AD0 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F94D2D012288B8A00BC78AA /* GTMHTTPFetcher.h in Headers */, + 4F94D2D112288B8A00BC78AA /* GTMHTTPFetcherLogging.h in Headers */, + 4F94D2D212288B8A00BC78AA /* GTMHTTPFetchHistory.h in Headers */, + 4F94D2D312288B8A00BC78AA /* GTMOAuth2Authentication.h in Headers */, + 4F94D2D812288B8A00BC78AA /* GTMOAuth2SignIn.h in Headers */, + 4F94D2D912288B8A00BC78AA /* GTMOAuth2WindowController.h in Headers */, + 4FDB9F7A152BA239004A2830 /* SBJsonBase.h in Headers */, + 4FDB9F80152BA239004A2830 /* SBJsonParser.h in Headers */, + 4FDB9F86152BA239004A2830 /* SBJsonWriter.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4FC754FC13E77E2B006A0C26 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 4FC754FD13E77E2B006A0C26 /* GTMHTTPFetcher.h in Headers */, + 4FC754FE13E77E2B006A0C26 /* GTMHTTPFetcherLogging.h in Headers */, + 4FC754FF13E77E2B006A0C26 /* GTMHTTPFetchHistory.h in Headers */, + 4FC7550013E77E2B006A0C26 /* GTMOAuth2Authentication.h in Headers */, + 4FC7550113E77E2B006A0C26 /* GTMOAuth2SignIn.h in Headers */, + 4FC7550213E77E2B006A0C26 /* GTMOAuth2WindowController.h in Headers */, + 4FDB9F7B152BA239004A2830 /* SBJsonBase.h in Headers */, + 4FDB9F81152BA239004A2830 /* SBJsonParser.h in Headers */, + 4FDB9F87152BA239004A2830 /* SBJsonWriter.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 4F724A7012248B19001A4AD0 /* GTMOAuth2.framework */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4F724A7412248B19001A4AD0 /* Build configuration list for PBXNativeTarget "GTMOAuth2.framework" */; + buildPhases = ( + 4F724A6C12248B19001A4AD0 /* Headers */, + 4F724A6D12248B19001A4AD0 /* Resources */, + 4F724A6E12248B19001A4AD0 /* Sources */, + 4F724A6F12248B19001A4AD0 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = GTMOAuth2.framework; + productName = OAuth.framework; + productType = "com.apple.product-type.framework"; + }; + 4FC754EF13E77E25006A0C26 /* OAuthTouchNonGoogleStaticLib */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4FC754F713E77E25006A0C26 /* Build configuration list for PBXNativeTarget "OAuthTouchNonGoogleStaticLib" */; + buildPhases = ( + 4FC754F013E77E25006A0C26 /* Sources */, + 4FC754F613E77E25006A0C26 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = OAuthTouchNonGoogleStaticLib; + productName = OAuthTouchStaticLibrary; + productReference = 4FC754FA13E77E25006A0C26 /* libOAuthTouch2.a */; + productType = "com.apple.product-type.library.static"; + }; + 4FC754FB13E77E2B006A0C26 /* GTMOAuth2NonGoogle.framework */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4FC7551113E77E2B006A0C26 /* Build configuration list for PBXNativeTarget "GTMOAuth2NonGoogle.framework" */; + buildPhases = ( + 4FC754FC13E77E2B006A0C26 /* Headers */, + 4FC7550413E77E2B006A0C26 /* Resources */, + 4FC7550613E77E2B006A0C26 /* Sources */, + 4FC7550E13E77E2B006A0C26 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = GTMOAuth2NonGoogle.framework; + productName = OAuth.framework; + productType = "com.apple.product-type.framework"; + }; + D2AAC07D0554694100DB518D /* OAuthTouchStaticLib */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "OAuthTouchStaticLib" */; + buildPhases = ( + D2AAC07B0554694100DB518D /* Sources */, + D2AAC07C0554694100DB518D /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = OAuthTouchStaticLib; + productName = OAuthTouchStaticLibrary; + productReference = D2AAC07E0554694100DB518D /* libOAuthTouch2.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 0867D690FE84028FC02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "GTMOAuth2" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 0867D691FE84028FC02AAC07 /* OAuthTouchStaticLibrary */; + productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D2AAC07D0554694100DB518D /* OAuthTouchStaticLib */, + 4FC754EF13E77E25006A0C26 /* OAuthTouchNonGoogleStaticLib */, + 4F724A7012248B19001A4AD0 /* GTMOAuth2.framework */, + 4FC754FB13E77E2B006A0C26 /* GTMOAuth2NonGoogle.framework */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 4F724A6D12248B19001A4AD0 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F8D436B133972F5000B4396 /* GTMOAuth2Window.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4FC7550413E77E2B006A0C26 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4FC7550513E77E2B006A0C26 /* GTMOAuth2Window.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 4F724A6E12248B19001A4AD0 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F724A9012248CF5001A4AD0 /* GTMOAuth2Authentication.m in Sources */, + 4F724A9212248CF5001A4AD0 /* GTMOAuth2SignIn.m in Sources */, + 4F724A9412248CF5001A4AD0 /* GTMHTTPFetcher.m in Sources */, + 4F724BAB12248F75001A4AD0 /* GTMHTTPFetchHistory.m in Sources */, + 4F724BB012248F81001A4AD0 /* GTMHTTPFetcherLogging.m in Sources */, + 4F94D33E1228944800BC78AA /* GTMOAuth2WindowController.m in Sources */, + 4FDB9F7E152BA239004A2830 /* SBJsonBase.m in Sources */, + 4FDB9F84152BA239004A2830 /* SBJsonParser.m in Sources */, + 4FDB9F8A152BA239004A2830 /* SBJsonWriter.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4FC754F013E77E25006A0C26 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4FC754F113E77E25006A0C26 /* GTMOAuth2Authentication.m in Sources */, + 4FC754F213E77E25006A0C26 /* GTMOAuth2SignIn.m in Sources */, + 4FC754F313E77E25006A0C26 /* GTMHTTPFetcher.m in Sources */, + 4FC754F413E77E25006A0C26 /* GTMOAuth2ViewControllerTouch.m in Sources */, + 4FDB9F7D152BA239004A2830 /* SBJsonBase.m in Sources */, + 4FDB9F83152BA239004A2830 /* SBJsonParser.m in Sources */, + 4FDB9F89152BA239004A2830 /* SBJsonWriter.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4FC7550613E77E2B006A0C26 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4FC7550713E77E2B006A0C26 /* GTMOAuth2Authentication.m in Sources */, + 4FC7550813E77E2B006A0C26 /* GTMOAuth2SignIn.m in Sources */, + 4FC7550913E77E2B006A0C26 /* GTMHTTPFetcher.m in Sources */, + 4FC7550A13E77E2B006A0C26 /* GTMHTTPFetchHistory.m in Sources */, + 4FC7550B13E77E2B006A0C26 /* GTMHTTPFetcherLogging.m in Sources */, + 4FC7550C13E77E2B006A0C26 /* GTMOAuth2WindowController.m in Sources */, + 4FDB9F7F152BA239004A2830 /* SBJsonBase.m in Sources */, + 4FDB9F85152BA239004A2830 /* SBJsonParser.m in Sources */, + 4FDB9F8B152BA239004A2830 /* SBJsonWriter.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D2AAC07B0554694100DB518D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4F24484B121F2E5C00FEE1DA /* GTMOAuth2Authentication.m in Sources */, + 4F24484C121F2E5C00FEE1DA /* GTMOAuth2SignIn.m in Sources */, + 4F24491A121F370000FEE1DA /* GTMHTTPFetcher.m in Sources */, + 4F8D437E1339735D000B4396 /* GTMOAuth2ViewControllerTouch.m in Sources */, + 4FDB9F7C152BA239004A2830 /* SBJsonBase.m in Sources */, + 4FDB9F82152BA239004A2830 /* SBJsonParser.m in Sources */, + 4FDB9F88152BA239004A2830 /* SBJsonWriter.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1DEB921F08733DC00010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + INSTALL_PATH = /usr/local/lib; + PRODUCT_NAME = OAuthTouch2; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 1DEB922008733DC00010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + GCC_MODEL_TUNING = G5; + INSTALL_PATH = /usr/local/lib; + PRODUCT_NAME = OAuthTouch2; + SDKROOT = iphoneos; + }; + name = Release; + }; + 1DEB922308733DC00010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; + GCC_WARN_ABOUT_MISSING_NEWLINE = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; + GCC_WARN_MISSING_PARENTHESES = YES; + GCC_WARN_SHADOW = YES; + GCC_WARN_SIGN_COMPARE = YES; + GCC_WARN_STRICT_SELECTOR_MATCH = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNKNOWN_PRAGMAS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_LABEL = YES; + GCC_WARN_UNUSED_VALUE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DDEBUG=1"; + OTHER_LDFLAGS = "-ObjC"; + SDKROOT = macosx; + }; + name = Debug; + }; + 1DEB922408733DC00010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; + GCC_WARN_ABOUT_MISSING_NEWLINE = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; + GCC_WARN_MISSING_PARENTHESES = YES; + GCC_WARN_SHADOW = YES; + GCC_WARN_SIGN_COMPARE = YES; + GCC_WARN_STRICT_SELECTOR_MATCH = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNKNOWN_PRAGMAS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_LABEL = YES; + GCC_WARN_UNUSED_VALUE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_LDFLAGS = "-ObjC"; + SDKROOT = macosx; + }; + name = Release; + }; + 4F724A7212248B19001A4AD0 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(DEVELOPER_FRAMEWORKS_DIR)\"", + ); + FRAMEWORK_VERSION = A; + GCC_DYNAMIC_NO_PIC = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; + INFOPLIST_FILE = "Mac/GTMOAuth2Framework-Info.plist"; + INSTALL_PATH = "$(HOME)/Library/Frameworks"; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PRODUCT_NAME = GTMOAuth2; + SDKROOT = macosx; + }; + name = Debug; + }; + 4F724A7312248B19001A4AD0 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(DEVELOPER_FRAMEWORKS_DIR)\"", + ); + FRAMEWORK_VERSION = A; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; + INFOPLIST_FILE = "Mac/GTMOAuth2Framework-Info.plist"; + INSTALL_PATH = "$(HOME)/Library/Frameworks"; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PRODUCT_NAME = GTMOAuth2; + SDKROOT = macosx; + ZERO_LINK = NO; + }; + name = Release; + }; + 4FC754F813E77E25006A0C26 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + INSTALL_PATH = /usr/local/lib; + OTHER_CFLAGS = ( + "-DGTM_OAUTH2_SKIP_GOOGLE_SUPPORT=1", + "$(inherited)", + ); + PRODUCT_NAME = OAuthTouch2; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 4FC754F913E77E25006A0C26 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + GCC_MODEL_TUNING = G5; + INSTALL_PATH = /usr/local/lib; + OTHER_CFLAGS = "-DGTM_OAUTH2_SKIP_GOOGLE_SUPPORT=1"; + PRODUCT_NAME = OAuthTouch2; + SDKROOT = iphoneos; + }; + name = Release; + }; + 4FC7551213E77E2B006A0C26 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(DEVELOPER_FRAMEWORKS_DIR)\"", + ); + FRAMEWORK_VERSION = A; + GCC_DYNAMIC_NO_PIC = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; + INFOPLIST_FILE = "Mac/GTMOAuth2Framework-Info.plist"; + INSTALL_PATH = "$(HOME)/Library/Frameworks"; + OTHER_CFLAGS = ( + "-DGTM_OAUTH2_SKIP_GOOGLE_SUPPORT=1", + "$(inherited)", + ); + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PRODUCT_NAME = GTMOAuth2; + SDKROOT = macosx; + }; + name = Debug; + }; + 4FC7551313E77E2B006A0C26 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(DEVELOPER_FRAMEWORKS_DIR)\"", + ); + FRAMEWORK_VERSION = A; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; + INFOPLIST_FILE = "Mac/GTMOAuth2Framework-Info.plist"; + INSTALL_PATH = "$(HOME)/Library/Frameworks"; + OTHER_CFLAGS = "-DGTM_OAUTH2_SKIP_GOOGLE_SUPPORT=1"; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PRODUCT_NAME = GTMOAuth2; + SDKROOT = macosx; + ZERO_LINK = NO; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "OAuthTouchStaticLib" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB921F08733DC00010E9CD /* Debug */, + 1DEB922008733DC00010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "GTMOAuth2" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB922308733DC00010E9CD /* Debug */, + 1DEB922408733DC00010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4F724A7412248B19001A4AD0 /* Build configuration list for PBXNativeTarget "GTMOAuth2.framework" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4F724A7212248B19001A4AD0 /* Debug */, + 4F724A7312248B19001A4AD0 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4FC754F713E77E25006A0C26 /* Build configuration list for PBXNativeTarget "OAuthTouchNonGoogleStaticLib" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4FC754F813E77E25006A0C26 /* Debug */, + 4FC754F913E77E25006A0C26 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4FC7551113E77E2B006A0C26 /* Build configuration list for PBXNativeTarget "GTMOAuth2NonGoogle.framework" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4FC7551213E77E2B006A0C26 /* Debug */, + 4FC7551313E77E2B006A0C26 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 0867D690FE84028FC02AAC07 /* Project object */; +} diff --git a/GTL/Source/OAuth2/GTMOAuth2Authentication.h b/GTL/Source/OAuth2/GTMOAuth2Authentication.h new file mode 100644 index 0000000..8a7155a --- /dev/null +++ b/GTL/Source/OAuth2/GTMOAuth2Authentication.h @@ -0,0 +1,333 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES + +// This class implements the OAuth 2 protocol for authorizing requests. +// http://tools.ietf.org/html/draft-ietf-oauth-v2 + +#import + +// GTMHTTPFetcher.h brings in GTLDefines/GDataDefines +#import "GTMHTTPFetcher.h" + +#undef _EXTERN +#undef _INITIALIZE_AS +#ifdef GTMOAUTH2AUTHENTICATION_DEFINE_GLOBALS + #define _EXTERN + #define _INITIALIZE_AS(x) =x +#else + #if defined(__cplusplus) + #define _EXTERN extern "C" + #else + #define _EXTERN extern + #endif + #define _INITIALIZE_AS(x) +#endif + +// Until all OAuth 2 providers are up to the same spec, we'll provide a crude +// way here to override the "Bearer" string in the Authorization header +#ifndef GTM_OAUTH2_BEARER +#define GTM_OAUTH2_BEARER "Bearer" +#endif + +// Service provider name allows stored authorization to be associated with +// the authorizing service +_EXTERN NSString* const kGTMOAuth2ServiceProviderGoogle _INITIALIZE_AS(@"Google"); + +// +// GTMOAuth2SignIn constants, included here for use by clients +// +_EXTERN NSString* const kGTMOAuth2ErrorDomain _INITIALIZE_AS(@"com.google.GTMOAuth2"); + +// Error userInfo keys +_EXTERN NSString* const kGTMOAuth2ErrorMessageKey _INITIALIZE_AS(@"error"); +_EXTERN NSString* const kGTMOAuth2ErrorRequestKey _INITIALIZE_AS(@"request"); +_EXTERN NSString* const kGTMOAuth2ErrorJSONKey _INITIALIZE_AS(@"json"); + +enum { + // Error code indicating that the window was prematurely closed + kGTMOAuth2ErrorWindowClosed = -1000, + kGTMOAuth2ErrorAuthorizationFailed = -1001, + kGTMOAuth2ErrorTokenExpired = -1002, + kGTMOAuth2ErrorTokenUnavailable = -1003, + kGTMOAuth2ErrorUnauthorizableRequest = -1004 +}; + + +// Notifications for token fetches +_EXTERN NSString* const kGTMOAuth2FetchStarted _INITIALIZE_AS(@"kGTMOAuth2FetchStarted"); +_EXTERN NSString* const kGTMOAuth2FetchStopped _INITIALIZE_AS(@"kGTMOAuth2FetchStopped"); + +_EXTERN NSString* const kGTMOAuth2FetcherKey _INITIALIZE_AS(@"fetcher"); +_EXTERN NSString* const kGTMOAuth2FetchTypeKey _INITIALIZE_AS(@"FetchType"); +_EXTERN NSString* const kGTMOAuth2FetchTypeToken _INITIALIZE_AS(@"token"); +_EXTERN NSString* const kGTMOAuth2FetchTypeRefresh _INITIALIZE_AS(@"refresh"); +_EXTERN NSString* const kGTMOAuth2FetchTypeAssertion _INITIALIZE_AS(@"assertion"); +_EXTERN NSString* const kGTMOAuth2FetchTypeUserInfo _INITIALIZE_AS(@"userInfo"); + +// Token-issuance errors +_EXTERN NSString* const kGTMOAuth2ErrorKey _INITIALIZE_AS(@"error"); + +_EXTERN NSString* const kGTMOAuth2ErrorInvalidRequest _INITIALIZE_AS(@"invalid_request"); +_EXTERN NSString* const kGTMOAuth2ErrorInvalidClient _INITIALIZE_AS(@"invalid_client"); +_EXTERN NSString* const kGTMOAuth2ErrorInvalidGrant _INITIALIZE_AS(@"invalid_grant"); +_EXTERN NSString* const kGTMOAuth2ErrorUnauthorizedClient _INITIALIZE_AS(@"unauthorized_client"); +_EXTERN NSString* const kGTMOAuth2ErrorUnsupportedGrantType _INITIALIZE_AS(@"unsupported_grant_type"); +_EXTERN NSString* const kGTMOAuth2ErrorInvalidScope _INITIALIZE_AS(@"invalid_scope"); + +// Notification that sign-in has completed, and token fetches will begin (useful +// for displaying interstitial messages after the window has closed) +_EXTERN NSString* const kGTMOAuth2UserSignedIn _INITIALIZE_AS(@"kGTMOAuth2UserSignedIn"); + +// Notification for token changes +_EXTERN NSString* const kGTMOAuth2AccessTokenRefreshed _INITIALIZE_AS(@"kGTMOAuth2AccessTokenRefreshed"); +_EXTERN NSString* const kGTMOAuth2RefreshTokenChanged _INITIALIZE_AS(@"kGTMOAuth2RefreshTokenChanged"); + +// Notification for WebView loading +_EXTERN NSString* const kGTMOAuth2WebViewStartedLoading _INITIALIZE_AS(@"kGTMOAuth2WebViewStartedLoading"); +_EXTERN NSString* const kGTMOAuth2WebViewStoppedLoading _INITIALIZE_AS(@"kGTMOAuth2WebViewStoppedLoading"); +_EXTERN NSString* const kGTMOAuth2WebViewKey _INITIALIZE_AS(@"kGTMOAuth2WebViewKey"); +_EXTERN NSString* const kGTMOAuth2WebViewStopKindKey _INITIALIZE_AS(@"kGTMOAuth2WebViewStopKindKey"); +_EXTERN NSString* const kGTMOAuth2WebViewFinished _INITIALIZE_AS(@"finished"); +_EXTERN NSString* const kGTMOAuth2WebViewFailed _INITIALIZE_AS(@"failed"); +_EXTERN NSString* const kGTMOAuth2WebViewCancelled _INITIALIZE_AS(@"cancelled"); + +// Notification for network loss during html sign-in display +_EXTERN NSString* const kGTMOAuth2NetworkLost _INITIALIZE_AS(@"kGTMOAuthNetworkLost"); +_EXTERN NSString* const kGTMOAuth2NetworkFound _INITIALIZE_AS(@"kGTMOAuthNetworkFound"); + +@interface GTMOAuth2Authentication : NSObject { + @private + NSString *clientID_; + NSString *clientSecret_; + NSString *redirectURI_; + NSMutableDictionary *parameters_; + + // authorization parameters + NSURL *tokenURL_; + NSDate *expirationDate_; + + NSDictionary *additionalTokenRequestParameters_; + + // queue of requests for authorization waiting for a valid access token + GTMHTTPFetcher *refreshFetcher_; + NSMutableArray *authorizationQueue_; + + id fetcherService_; // WEAK + + Class parserClass_; + + BOOL shouldAuthorizeAllRequests_; + + // arbitrary data retained for the user + id userData_; + NSMutableDictionary *properties_; +} + +// OAuth2 standard protocol parameters +// +// These should be the plain strings; any needed escaping will be provided by +// the library. + +// Request properties +@property (copy) NSString *clientID; +@property (copy) NSString *clientSecret; +@property (copy) NSString *redirectURI; +@property (retain) NSString *scope; +@property (retain) NSString *tokenType; +@property (retain) NSString *assertion; +@property (retain) NSString *refreshScope; + +// Apps may optionally add parameters here to be provided to the token +// endpoint on token requests and refreshes +@property (retain) NSDictionary *additionalTokenRequestParameters; + +// Response properties +@property (retain) NSMutableDictionary *parameters; + +@property (retain) NSString *accessToken; +@property (retain) NSString *refreshToken; +@property (retain) NSNumber *expiresIn; +@property (retain) NSString *code; +@property (retain) NSString *errorString; + +// URL for obtaining access tokens +@property (copy) NSURL *tokenURL; + +// Calculated expiration date (expiresIn seconds added to the +// time the access token was received.) +@property (copy) NSDate *expirationDate; + +// Service identifier, like "Google"; not used for authentication +// +// The provider name is just for allowing stored authorization to be associated +// with the authorizing service. +@property (copy) NSString *serviceProvider; + +// User ID; not used for authentication +@property (retain) NSString *userID; + +// User email and verified status; not used for authentication +// +// The verified string can be checked with -boolValue. If the result is false, +// then the email address is listed with the account on the server, but the +// address has not been confirmed as belonging to the owner of the account. +@property (retain) NSString *userEmail; +@property (retain) NSString *userEmailIsVerified; + +// Property indicating if this auth has a refresh or access token so is suitable +// for authorizing a request. This does not guarantee that the token is valid. +@property (readonly) BOOL canAuthorize; + +// Property indicating if this object will authorize plain http request +// (as well as any non-https requests.) Default is NO, only requests with the +// scheme https are authorized, since security may be compromised if tokens +// are sent over the wire using an unencrypted protocol like http. +@property (assign) BOOL shouldAuthorizeAllRequests; + +// userData is retained for the convenience of the caller +@property (retain) id userData; + +// Stored property values are retained for the convenience of the caller +@property (retain) NSDictionary *properties; + +// Property for the optional fetcher service instance to be used to create +// fetchers +// +// Fetcher service objects retain authorizations, so this is weak to avoid +// circular retains. +@property (assign) id fetcherService; // WEAK + +// Alternative JSON parsing class; this should implement the +// GTMOAuth2ParserClass informal protocol. If this property is +// not set, the class SBJSON must be available in the runtime. +@property (assign) Class parserClass; + +// Convenience method for creating an authentication object ++ (id)authenticationWithServiceProvider:(NSString *)serviceProvider + tokenURL:(NSURL *)tokenURL + redirectURI:(NSString *)redirectURI + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret; + +// Clear out any authentication values, prepare for a new request fetch +- (void)reset; + +// Main authorization entry points +// +// These will refresh the access token, if necessary, add the access token to +// the request, then invoke the callback. +// +// The request argument may be nil to just force a refresh of the access token, +// if needed. +// +// NOTE: To avoid accidental leaks of bearer tokens, the request must +// be for a URL with the scheme https unless the shouldAuthorizeAllRequests +// property is set. + +// The finish selector should have a signature matching +// - (void)authentication:(GTMOAuth2Authentication *)auth +// request:(NSMutableURLRequest *)request +// finishedWithError:(NSError *)error; + +- (void)authorizeRequest:(NSMutableURLRequest *)request + delegate:(id)delegate + didFinishSelector:(SEL)sel; + +#if NS_BLOCKS_AVAILABLE +- (void)authorizeRequest:(NSMutableURLRequest *)request + completionHandler:(void (^)(NSError *error))handler; +#endif + +// Synchronous entry point; authorizing this way cannot refresh an expired +// access token +- (BOOL)authorizeRequest:(NSMutableURLRequest *)request; + +// If the authentication is waiting for a refresh to complete, spin the run +// loop, discarding events, until the fetch has completed +// +// This is only for use in testing or in tools without a user interface. +- (void)waitForCompletionWithTimeout:(NSTimeInterval)timeoutInSeconds; + + +////////////////////////////////////////////////////////////////////////////// +// +// Internal properties and methods for use by GTMOAuth2SignIn +// + +// Pending fetcher to get a new access token, if any +@property (retain) GTMHTTPFetcher *refreshFetcher; + +// Check if a request is queued up to be authorized +- (BOOL)isAuthorizingRequest:(NSURLRequest *)request; + +// Check if a request appears to be authorized +- (BOOL)isAuthorizedRequest:(NSURLRequest *)request; + +// Stop any pending refresh fetch. This will also cancel the authorization +// for all fetch requests pending authorization. +- (void)stopAuthorization; + +// Prevents authorization callback for a given request. +- (void)stopAuthorizationForRequest:(NSURLRequest *)request; + +// OAuth fetch user-agent header value +- (NSString *)userAgent; + +// Parse and set token and token secret from response data +- (void)setKeysForResponseString:(NSString *)str; +- (void)setKeysForResponseDictionary:(NSDictionary *)dict; + +// Persistent token string for keychain storage +// +// We'll use the format "refresh_token=foo&serviceProvider=bar" so we can +// easily alter what portions of the auth data are stored +// +// Use these methods for serialization +- (NSString *)persistenceResponseString; +- (void)setKeysForPersistenceResponseString:(NSString *)str; + +// method to begin fetching an access token, used by the sign-in object +- (GTMHTTPFetcher *)beginTokenFetchWithDelegate:(id)delegate + didFinishSelector:(SEL)finishedSel; + +// Entry point to post a notification about a fetcher currently used for +// obtaining or refreshing a token; the sign-in object will also use this +// to indicate when the user's email address is being fetched. +// +// Fetch type constants are above under "notifications for token fetches" +- (void)notifyFetchIsRunning:(BOOL)isStarting + fetcher:(GTMHTTPFetcher *)fetcher + type:(NSString *)fetchType; + +// Arbitrary key-value properties retained for the user +- (void)setProperty:(id)obj forKey:(NSString *)key; +- (id)propertyForKey:(NSString *)key; + +// +// Utilities +// + ++ (NSString *)encodedOAuthValueForString:(NSString *)str; + ++ (NSString *)encodedQueryParametersForDictionary:(NSDictionary *)dict; + ++ (NSDictionary *)dictionaryWithResponseString:(NSString *)responseStr; + ++ (NSString *)scopeWithStrings:(NSString *)firsStr, ... NS_REQUIRES_NIL_TERMINATION; +@end + +#endif // GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES diff --git a/GTL/Source/OAuth2/GTMOAuth2Authentication.m b/GTL/Source/OAuth2/GTMOAuth2Authentication.m new file mode 100644 index 0000000..0ea5fd7 --- /dev/null +++ b/GTL/Source/OAuth2/GTMOAuth2Authentication.m @@ -0,0 +1,1231 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES + +#define GTMOAUTH2AUTHENTICATION_DEFINE_GLOBALS 1 +#import "GTMOAuth2Authentication.h" + +// standard OAuth keys +static NSString *const kOAuth2AccessTokenKey = @"access_token"; +static NSString *const kOAuth2RefreshTokenKey = @"refresh_token"; +static NSString *const kOAuth2ClientIDKey = @"client_id"; +static NSString *const kOAuth2ClientSecretKey = @"client_secret"; +static NSString *const kOAuth2RedirectURIKey = @"redirect_uri"; +static NSString *const kOAuth2ResponseTypeKey = @"response_type"; +static NSString *const kOAuth2ScopeKey = @"scope"; +static NSString *const kOAuth2ErrorKey = @"error"; +static NSString *const kOAuth2TokenTypeKey = @"token_type"; +static NSString *const kOAuth2ExpiresInKey = @"expires_in"; +static NSString *const kOAuth2CodeKey = @"code"; +static NSString *const kOAuth2AssertionKey = @"assertion"; +static NSString *const kOAuth2RefreshScopeKey = @"refreshScope"; + +// additional persistent keys +static NSString *const kServiceProviderKey = @"serviceProvider"; +static NSString *const kUserIDKey = @"userID"; +static NSString *const kUserEmailKey = @"email"; +static NSString *const kUserEmailIsVerifiedKey = @"isVerified"; + +// fetcher keys +static NSString *const kTokenFetchDelegateKey = @"delegate"; +static NSString *const kTokenFetchSelectorKey = @"sel"; + +static NSString *const kRefreshFetchArgsKey = @"requestArgs"; + +// If GTMNSJSONSerialization is available, it is used for formatting JSON +#if (TARGET_OS_MAC && !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED < 1070)) || \ + (TARGET_OS_IPHONE && (__IPHONE_OS_VERSION_MAX_ALLOWED < 50000)) +@interface GTMNSJSONSerialization : NSObject ++ (id)JSONObjectWithData:(NSData *)data options:(NSUInteger)opt error:(NSError **)error; +@end +#endif + +@interface GTMOAuth2ParserClass : NSObject +// just enough of SBJSON to be able to parse +- (id)objectWithString:(NSString*)repr error:(NSError**)error; +@end + +// wrapper class for requests needing authorization and their callbacks +@interface GTMOAuth2AuthorizationArgs : NSObject { + @private + NSMutableURLRequest *request_; + id delegate_; + SEL sel_; + id completionHandler_; + NSThread *thread_; + NSError *error_; +} + +@property (retain) NSMutableURLRequest *request; +@property (retain) id delegate; +@property (assign) SEL selector; +@property (copy) id completionHandler; +@property (retain) NSThread *thread; +@property (retain) NSError *error; + ++ (GTMOAuth2AuthorizationArgs *)argsWithRequest:(NSMutableURLRequest *)req + delegate:(id)delegate + selector:(SEL)sel + completionHandler:(id)completionHandler + thread:(NSThread *)thread; +@end + +@implementation GTMOAuth2AuthorizationArgs + +@synthesize request = request_, + delegate = delegate_, + selector = sel_, + completionHandler = completionHandler_, + thread = thread_, + error = error_; + ++ (GTMOAuth2AuthorizationArgs *)argsWithRequest:(NSMutableURLRequest *)req + delegate:(id)delegate + selector:(SEL)sel + completionHandler:(id)completionHandler + thread:(NSThread *)thread { + GTMOAuth2AuthorizationArgs *obj; + obj = [[[GTMOAuth2AuthorizationArgs alloc] init] autorelease]; + obj.request = req; + obj.delegate = delegate; + obj.selector = sel; + obj.completionHandler = completionHandler; + obj.thread = thread; + return obj; +} + +- (void)dealloc { + [request_ release]; + [delegate_ release]; + [completionHandler_ release]; + [thread_ release]; + [error_ release]; + + [super dealloc]; +} +@end + + +@interface GTMOAuth2Authentication () + +@property (retain) NSMutableArray *authorizationQueue; + +- (void)setKeysForResponseJSONData:(NSData *)data; + +- (BOOL)authorizeRequestArgs:(GTMOAuth2AuthorizationArgs *)args; + +- (BOOL)authorizeRequestImmediateArgs:(GTMOAuth2AuthorizationArgs *)args; + +- (BOOL)shouldRefreshAccessToken; + +- (void)updateExpirationDate; + +- (NSDictionary *)dictionaryWithJSONData:(NSData *)data; + +- (void)tokenFetcher:(GTMHTTPFetcher *)fetcher + finishedWithData:(NSData *)data + error:(NSError *)error; + +- (void)auth:(GTMOAuth2Authentication *)auth +finishedRefreshWithFetcher:(GTMHTTPFetcher *)fetcher + error:(NSError *)error; + +- (void)invokeCallbackArgs:(GTMOAuth2AuthorizationArgs *)args; + ++ (void)invokeDelegate:(id)delegate + selector:(SEL)sel + object:(id)obj1 + object:(id)obj2 + object:(id)obj3; + ++ (NSString *)unencodedOAuthParameterForString:(NSString *)str; ++ (NSString *)encodedQueryParametersForDictionary:(NSDictionary *)dict; + ++ (NSDictionary *)dictionaryWithResponseData:(NSData *)data; + +@end + +@implementation GTMOAuth2Authentication + +@synthesize clientID = clientID_, + clientSecret = clientSecret_, + redirectURI = redirectURI_, + parameters = parameters_, + tokenURL = tokenURL_, + expirationDate = expirationDate_, + additionalTokenRequestParameters = additionalTokenRequestParameters_, + refreshFetcher = refreshFetcher_, + fetcherService = fetcherService_, + parserClass = parserClass_, + shouldAuthorizeAllRequests = shouldAuthorizeAllRequests_, + userData = userData_, + properties = properties_, + authorizationQueue = authorizationQueue_; + +// Response parameters +@dynamic accessToken, + refreshToken, + code, + assertion, + refreshScope, + errorString, + tokenType, + scope, + expiresIn, + serviceProvider, + userEmail, + userEmailIsVerified; + +@dynamic canAuthorize; + ++ (id)authenticationWithServiceProvider:(NSString *)serviceProvider + tokenURL:(NSURL *)tokenURL + redirectURI:(NSString *)redirectURI + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret { + GTMOAuth2Authentication *obj = [[[self alloc] init] autorelease]; + obj.serviceProvider = serviceProvider; + obj.tokenURL = tokenURL; + obj.redirectURI = redirectURI; + obj.clientID = clientID; + obj.clientSecret = clientSecret; + return obj; +} + +- (id)init { + self = [super init]; + if (self) { + authorizationQueue_ = [[NSMutableArray alloc] init]; + parameters_ = [[NSMutableDictionary alloc] init]; + } + return self; +} + +- (NSString *)description { + NSArray *props = [NSArray arrayWithObjects:@"accessToken", @"refreshToken", + @"code", @"assertion", @"expirationDate", @"errorString", + nil]; + NSMutableString *valuesStr = [NSMutableString string]; + NSString *separator = @""; + for (NSString *prop in props) { + id result = [self valueForKey:prop]; + if (result) { + [valuesStr appendFormat:@"%@%@=\"%@\"", separator, prop, result]; + separator = @", "; + } + } + + return [NSString stringWithFormat:@"%@ %p: {%@}", + [self class], self, valuesStr]; +} + +- (void)dealloc { + [clientID_ release]; + [clientSecret_ release]; + [redirectURI_ release]; + [parameters_ release]; + [tokenURL_ release]; + [expirationDate_ release]; + [additionalTokenRequestParameters_ release]; + [refreshFetcher_ release]; + [authorizationQueue_ release]; + [userData_ release]; + [properties_ release]; + + [super dealloc]; +} + +#pragma mark - + +- (void)setKeysForResponseDictionary:(NSDictionary *)dict { + if (dict == nil) return; + + // If a new code or access token is being set, remove the old expiration + NSString *newCode = [dict objectForKey:kOAuth2CodeKey]; + NSString *newAccessToken = [dict objectForKey:kOAuth2AccessTokenKey]; + if (newCode || newAccessToken) { + self.expiresIn = nil; + } + + BOOL didRefreshTokenChange = NO; + NSString *refreshToken = [dict objectForKey:kOAuth2RefreshTokenKey]; + if (refreshToken) { + NSString *priorRefreshToken = self.refreshToken; + + if (priorRefreshToken != refreshToken + && (priorRefreshToken == nil + || ![priorRefreshToken isEqual:refreshToken])) { + didRefreshTokenChange = YES; + } + } + + [self.parameters addEntriesFromDictionary:dict]; + [self updateExpirationDate]; + + if (didRefreshTokenChange) { + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc postNotificationName:kGTMOAuth2RefreshTokenChanged + object:self + userInfo:nil]; + } + // NSLog(@"keys set ----------------------------\n%@", dict); +} + +- (void)setKeysForResponseString:(NSString *)str { + NSDictionary *dict = [[self class] dictionaryWithResponseString:str]; + [self setKeysForResponseDictionary:dict]; +} + +- (void)setKeysForResponseJSONData:(NSData *)data { + NSDictionary *dict = [self dictionaryWithJSONData:data]; + [self setKeysForResponseDictionary:dict]; +} + +- (NSDictionary *)dictionaryWithJSONData:(NSData *)data { + NSMutableDictionary *obj = nil; + NSError *error = nil; + + Class serializer = NSClassFromString(@"NSJSONSerialization"); + if (serializer) { + const NSUInteger kOpts = (1UL << 0); // NSJSONReadingMutableContainers + obj = [serializer JSONObjectWithData:data + options:kOpts + error:&error]; +#if DEBUG + if (error) { + NSString *str = [[[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding] autorelease]; + NSLog(@"NSJSONSerialization error %@ parsing %@", + error, str); + } +#endif + return obj; + } else { + // try SBJsonParser or SBJSON + Class jsonParseClass = NSClassFromString(@"SBJsonParser"); + if (!jsonParseClass) { + jsonParseClass = NSClassFromString(@"SBJSON"); + } + if (jsonParseClass) { + GTMOAuth2ParserClass *parser = [[[jsonParseClass alloc] init] autorelease]; + NSString *jsonStr = [[[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding] autorelease]; + if (jsonStr) { + obj = [parser objectWithString:jsonStr error:&error]; +#if DEBUG + if (error) { + NSLog(@"%@ error %@ parsing %@", NSStringFromClass(jsonParseClass), + error, jsonStr); + } +#endif + return obj; + } + } else { +#if DEBUG + NSAssert(0, @"GTMOAuth2Authentication: No parser available"); +#endif + } + } + return nil; +} + +#pragma mark Authorizing Requests + +// General entry point for authorizing requests + +#if NS_BLOCKS_AVAILABLE +// Authorizing with a completion block +- (void)authorizeRequest:(NSMutableURLRequest *)request + completionHandler:(void (^)(NSError *error))handler { + + GTMOAuth2AuthorizationArgs *args; + args = [GTMOAuth2AuthorizationArgs argsWithRequest:request + delegate:nil + selector:NULL + completionHandler:handler + thread:[NSThread currentThread]]; + [self authorizeRequestArgs:args]; +} +#endif + +// Authorizing with a callback selector +// +// Selector has the signature +// - (void)authentication:(GTMOAuth2Authentication *)auth +// request:(NSMutableURLRequest *)request +// finishedWithError:(NSError *)error; +- (void)authorizeRequest:(NSMutableURLRequest *)request + delegate:(id)delegate + didFinishSelector:(SEL)sel { + GTMAssertSelectorNilOrImplementedWithArgs(delegate, sel, + @encode(GTMOAuth2Authentication *), + @encode(NSMutableURLRequest *), + @encode(NSError *), 0); + + GTMOAuth2AuthorizationArgs *args; + args = [GTMOAuth2AuthorizationArgs argsWithRequest:request + delegate:delegate + selector:sel + completionHandler:nil + thread:[NSThread currentThread]]; + [self authorizeRequestArgs:args]; +} + +// Internal routine common to delegate and block invocations +- (BOOL)authorizeRequestArgs:(GTMOAuth2AuthorizationArgs *)args { + BOOL didAttempt = NO; + + @synchronized(authorizationQueue_) { + + BOOL shouldRefresh = [self shouldRefreshAccessToken]; + + if (shouldRefresh) { + // attempt to refresh now; once we have a fresh access token, we will + // authorize the request and call back to the user + didAttempt = YES; + + if (self.refreshFetcher == nil) { + // there's not already a refresh pending + SEL finishedSel = @selector(auth:finishedRefreshWithFetcher:error:); + self.refreshFetcher = [self beginTokenFetchWithDelegate:self + didFinishSelector:finishedSel]; + if (self.refreshFetcher) { + [authorizationQueue_ addObject:args]; + } + } else { + // there's already a refresh pending + [authorizationQueue_ addObject:args]; + } + } + + if (!shouldRefresh || self.refreshFetcher == nil) { + // we're not fetching a new access token, so we can authorize the request + // now + didAttempt = [self authorizeRequestImmediateArgs:args]; + } + } + return didAttempt; +} + +- (void)auth:(GTMOAuth2Authentication *)auth +finishedRefreshWithFetcher:(GTMHTTPFetcher *)fetcher + error:(NSError *)error { + @synchronized(authorizationQueue_) { + // If there's an error, we want to try using the old access token anyway, + // in case it's a backend problem preventing refresh, in which case + // access tokens past their expiration date may still work + + self.refreshFetcher = nil; + + // Swap in a new auth queue in case the callbacks try to immediately auth + // another request + NSArray *pendingAuthQueue = [NSArray arrayWithArray:authorizationQueue_]; + [authorizationQueue_ removeAllObjects]; + + BOOL hasAccessToken = ([self.accessToken length] > 0); + + if (hasAccessToken && error == nil) { + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc postNotificationName:kGTMOAuth2AccessTokenRefreshed + object:self + userInfo:nil]; + } + + for (GTMOAuth2AuthorizationArgs *args in pendingAuthQueue) { + if (!hasAccessToken && args.error == nil) { + args.error = error; + } + + [self authorizeRequestImmediateArgs:args]; + } + } +} + +- (BOOL)isAuthorizingRequest:(NSURLRequest *)request { + BOOL wasFound = NO; + @synchronized(authorizationQueue_) { + for (GTMOAuth2AuthorizationArgs *args in authorizationQueue_) { + if ([args request] == request) { + wasFound = YES; + break; + } + } + } + return wasFound; +} + +- (BOOL)isAuthorizedRequest:(NSURLRequest *)request { + NSString *authStr = [request valueForHTTPHeaderField:@"Authorization"]; + return ([authStr length] > 0); +} + +- (void)stopAuthorization { + @synchronized(authorizationQueue_) { + [authorizationQueue_ removeAllObjects]; + + [self.refreshFetcher stopFetching]; + self.refreshFetcher = nil; + } +} + +- (void)stopAuthorizationForRequest:(NSURLRequest *)request { + @synchronized(authorizationQueue_) { + NSUInteger argIndex = 0; + BOOL found = NO; + for (GTMOAuth2AuthorizationArgs *args in authorizationQueue_) { + if ([args request] == request) { + found = YES; + break; + } + argIndex++; + } + + if (found) { + [authorizationQueue_ removeObjectAtIndex:argIndex]; + + // If the queue is now empty, go ahead and stop the fetcher. + if ([authorizationQueue_ count] == 0) { + [self stopAuthorization]; + } + } + } +} + +- (BOOL)authorizeRequestImmediateArgs:(GTMOAuth2AuthorizationArgs *)args { + // This authorization entry point never attempts to refresh the access token, + // but does call the completion routine + + NSMutableURLRequest *request = args.request; + + NSString *scheme = [[request URL] scheme]; + BOOL isAuthorizableRequest = self.shouldAuthorizeAllRequests + || [scheme caseInsensitiveCompare:@"https"] == NSOrderedSame; + if (!isAuthorizableRequest) { + // Request is not https, so may be insecure + // + // The NSError will be created below +#if DEBUG + NSLog(@"Cannot authorize request with scheme %@ (%@)", scheme, request); +#endif + } + + NSString *accessToken = self.accessToken; + if (isAuthorizableRequest && [accessToken length] > 0) { + if (request) { + // we have a likely valid access token + NSString *value = [NSString stringWithFormat:@"%s %@", + GTM_OAUTH2_BEARER, accessToken]; + [request setValue:value forHTTPHeaderField:@"Authorization"]; + } + + // We've authorized the request, even if the previous refresh + // failed with an error + args.error = nil; + } else if (args.error == nil) { + NSDictionary *userInfo = nil; + if (request) { + userInfo = [NSDictionary dictionaryWithObject:request + forKey:kGTMOAuth2ErrorRequestKey]; + } + NSInteger code = (isAuthorizableRequest ? + kGTMOAuth2ErrorAuthorizationFailed : + kGTMOAuth2ErrorUnauthorizableRequest); + args.error = [NSError errorWithDomain:kGTMOAuth2ErrorDomain + code:code + userInfo:userInfo]; + } + + // Invoke any callbacks on the proper thread + if (args.delegate || args.completionHandler) { + NSThread *targetThread = args.thread; + BOOL isSameThread = [targetThread isEqual:[NSThread currentThread]]; + + if (isSameThread) { + [self invokeCallbackArgs:args]; + } else { + SEL sel = @selector(invokeCallbackArgs:); + NSOperationQueue *delegateQueue = self.fetcherService.delegateQueue; + if (delegateQueue) { + NSInvocationOperation *op; + op = [[[NSInvocationOperation alloc] initWithTarget:self + selector:sel + object:args] autorelease]; + [delegateQueue addOperation:op]; + } else { + [self performSelector:sel + onThread:targetThread + withObject:args + waitUntilDone:NO]; + } + } + } + + BOOL didAuth = (args.error == nil); + return didAuth; +} + +- (void)invokeCallbackArgs:(GTMOAuth2AuthorizationArgs *)args { + // Invoke the callbacks + NSError *error = args.error; + + id delegate = args.delegate; + SEL sel = args.selector; + if (delegate && sel) { + NSMutableURLRequest *request = args.request; + + NSMethodSignature *sig = [delegate methodSignatureForSelector:sel]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; + [invocation setSelector:sel]; + [invocation setTarget:delegate]; + [invocation setArgument:&self atIndex:2]; + [invocation setArgument:&request atIndex:3]; + [invocation setArgument:&error atIndex:4]; + [invocation invoke]; + } + +#if NS_BLOCKS_AVAILABLE + id handler = args.completionHandler; + if (handler) { + void (^authCompletionBlock)(NSError *) = handler; + authCompletionBlock(error); + } +#endif +} + +- (BOOL)authorizeRequest:(NSMutableURLRequest *)request { + // Entry point for synchronous authorization mechanisms + GTMOAuth2AuthorizationArgs *args; + args = [GTMOAuth2AuthorizationArgs argsWithRequest:request + delegate:nil + selector:NULL + completionHandler:nil + thread:[NSThread currentThread]]; + return [self authorizeRequestImmediateArgs:args]; +} + +- (BOOL)canAuthorize { + NSString *token = self.refreshToken; + if (token == nil) { + // For services which do not support refresh tokens, we'll just check + // the access token + token = self.accessToken; + } + BOOL canAuth = [token length] > 0; + return canAuth; +} + +- (BOOL)shouldRefreshAccessToken { + // We should refresh the access token when it's missing or nearly expired + // and we have a refresh token + BOOL shouldRefresh = NO; + NSString *accessToken = self.accessToken; + NSString *refreshToken = self.refreshToken; + NSString *assertion = self.assertion; + NSString *code = self.code; + + BOOL hasRefreshToken = ([refreshToken length] > 0); + BOOL hasAccessToken = ([accessToken length] > 0); + BOOL hasAssertion = ([assertion length] > 0); + BOOL hasCode = ([code length] > 0); + + // Determine if we need to refresh the access token + if (hasRefreshToken || hasAssertion || hasCode) { + if (!hasAccessToken) { + shouldRefresh = YES; + } else { + // We'll consider the token expired if it expires 60 seconds from now + // or earlier + NSDate *expirationDate = self.expirationDate; + NSTimeInterval timeToExpire = [expirationDate timeIntervalSinceNow]; + if (expirationDate == nil || timeToExpire < 60.0) { + // access token has expired, or will in a few seconds + shouldRefresh = YES; + } + } + } + return shouldRefresh; +} + +- (void)waitForCompletionWithTimeout:(NSTimeInterval)timeoutInSeconds { + // If there is a refresh fetcher pending, wait for it. + // + // This is only intended for unit test or for use in command-line tools. + GTMHTTPFetcher *fetcher = self.refreshFetcher; + [fetcher waitForCompletionWithTimeout:timeoutInSeconds]; +} + +#pragma mark Token Fetch + +- (NSString *)userAgent { + NSBundle *bundle = [NSBundle mainBundle]; + NSString *appID = [bundle bundleIdentifier]; + + NSString *version = [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; + if (version == nil) { + version = [bundle objectForInfoDictionaryKey:@"CFBundleVersion"]; + } + + if (appID && version) { + appID = [appID stringByAppendingFormat:@"/%@", version]; + } + + NSString *userAgent = @"gtm-oauth2"; + if (appID) { + userAgent = [userAgent stringByAppendingFormat:@" %@", appID]; + } + return userAgent; +} + +- (GTMHTTPFetcher *)beginTokenFetchWithDelegate:(id)delegate + didFinishSelector:(SEL)finishedSel { + + NSMutableDictionary *paramsDict = [NSMutableDictionary dictionary]; + + NSString *fetchType; + + NSString *refreshToken = self.refreshToken; + NSString *code = self.code; + NSString *assertion = self.assertion; + + if (refreshToken) { + // We have a refresh token + [paramsDict setObject:@"refresh_token" forKey:@"grant_type"]; + [paramsDict setObject:refreshToken forKey:@"refresh_token"]; + + NSString *refreshScope = self.refreshScope; + if ([refreshScope length] > 0) { + [paramsDict setObject:refreshScope forKey:@"scope"]; + } + + fetchType = kGTMOAuth2FetchTypeRefresh; + } else if (code) { + // We have a code string + [paramsDict setObject:@"authorization_code" forKey:@"grant_type"]; + [paramsDict setObject:code forKey:@"code"]; + + NSString *redirectURI = self.redirectURI; + if ([redirectURI length] > 0) { + [paramsDict setObject:redirectURI forKey:@"redirect_uri"]; + } + + NSString *scope = self.scope; + if ([scope length] > 0) { + [paramsDict setObject:scope forKey:@"scope"]; + } + + fetchType = kGTMOAuth2FetchTypeToken; + } else if (assertion) { + // We have an assertion string + [paramsDict setObject:assertion forKey:@"assertion"]; + [paramsDict setObject:@"http://oauth.net/grant_type/jwt/1.0/bearer" + forKey:@"grant_type"]; + fetchType = kGTMOAuth2FetchTypeAssertion; + } else { +#if DEBUG + NSAssert(0, @"unexpected lack of code or refresh token for fetching"); +#endif + return nil; + } + + NSString *clientID = self.clientID; + if ([clientID length] > 0) { + [paramsDict setObject:clientID forKey:@"client_id"]; + } + + NSString *clientSecret = self.clientSecret; + if ([clientSecret length] > 0) { + [paramsDict setObject:clientSecret forKey:@"client_secret"]; + } + + NSDictionary *additionalParams = self.additionalTokenRequestParameters; + if (additionalParams) { + [paramsDict addEntriesFromDictionary:additionalParams]; + } + + NSString *paramStr = [[self class] encodedQueryParametersForDictionary:paramsDict]; + NSData *paramData = [paramStr dataUsingEncoding:NSUTF8StringEncoding]; + + NSURL *tokenURL = self.tokenURL; + + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:tokenURL]; + [request setValue:@"application/x-www-form-urlencoded" + forHTTPHeaderField:@"Content-Type"]; + + NSString *userAgent = [self userAgent]; + [request setValue:userAgent forHTTPHeaderField:@"User-Agent"]; + + GTMHTTPFetcher *fetcher; + id fetcherService = self.fetcherService; + if (fetcherService) { + fetcher = [fetcherService fetcherWithRequest:request]; + + // Don't use an authorizer for an auth token fetch + fetcher.authorizer = nil; + } else { + fetcher = [GTMHTTPFetcher fetcherWithRequest:request]; + } + + NSString *const template = (refreshToken ? @"refresh token for %@" : @"fetch tokens for %@"); + [fetcher setCommentWithFormat:template, [tokenURL host]]; + fetcher.postData = paramData; + fetcher.retryEnabled = YES; + fetcher.maxRetryInterval = 15.0; + + // Fetcher properties will retain the delegate + [fetcher setProperty:delegate forKey:kTokenFetchDelegateKey]; + if (finishedSel) { + NSString *selStr = NSStringFromSelector(finishedSel); + [fetcher setProperty:selStr forKey:kTokenFetchSelectorKey]; + } + + if ([fetcher beginFetchWithDelegate:self + didFinishSelector:@selector(tokenFetcher:finishedWithData:error:)]) { + // Fetch began + [self notifyFetchIsRunning:YES fetcher:fetcher type:fetchType]; + return fetcher; + } else { + // Failed to start fetching; typically a URL issue + NSError *error = [NSError errorWithDomain:kGTMHTTPFetcherStatusDomain + code:-1 + userInfo:nil]; + [[self class] invokeDelegate:delegate + selector:finishedSel + object:self + object:nil + object:error]; + return nil; + } +} + +- (void)tokenFetcher:(GTMHTTPFetcher *)fetcher + finishedWithData:(NSData *)data + error:(NSError *)error { + [self notifyFetchIsRunning:NO fetcher:fetcher type:nil]; + + NSDictionary *responseHeaders = [fetcher responseHeaders]; + NSString *responseType = [responseHeaders valueForKey:@"Content-Type"]; + BOOL isResponseJSON = [responseType hasPrefix:@"application/json"]; + BOOL hasData = ([data length] > 0); + + if (error) { + // Failed; if the error body is JSON, parse it and add it to the error's + // userInfo dictionary + if (hasData) { + if (isResponseJSON) { + NSDictionary *errorJson = [self dictionaryWithJSONData:data]; + if ([errorJson count] > 0) { +#if DEBUG + NSLog(@"Error %@\nError data:\n%@", error, errorJson); +#endif + // Add the JSON error body to the userInfo of the error + NSMutableDictionary *userInfo; + userInfo = [NSMutableDictionary dictionaryWithObject:errorJson + forKey:kGTMOAuth2ErrorJSONKey]; + NSDictionary *prevUserInfo = [error userInfo]; + if (prevUserInfo) { + [userInfo addEntriesFromDictionary:prevUserInfo]; + } + error = [NSError errorWithDomain:[error domain] + code:[error code] + userInfo:userInfo]; + } + } + } + } else { + // Succeeded; we have an access token +#if DEBUG + NSAssert(hasData, @"data missing in token response"); +#endif + + if (hasData) { + if (isResponseJSON) { + [self setKeysForResponseJSONData:data]; + } else { + // Support for legacy token servers that return form-urlencoded data + NSString *dataStr = [[[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding] autorelease]; + [self setKeysForResponseString:dataStr]; + } + +#if DEBUG + // Watch for token exchanges that return a non-bearer or unlabeled token + NSString *tokenType = [self tokenType]; + if (tokenType == nil + || [tokenType caseInsensitiveCompare:@"bearer"] != NSOrderedSame) { + NSLog(@"GTMOAuth2: Unexpected token type: %@", tokenType); + } +#endif + } + } + + id delegate = [fetcher propertyForKey:kTokenFetchDelegateKey]; + SEL sel = NULL; + NSString *selStr = [fetcher propertyForKey:kTokenFetchSelectorKey]; + if (selStr) sel = NSSelectorFromString(selStr); + + [[self class] invokeDelegate:delegate + selector:sel + object:self + object:fetcher + object:error]; + + // Prevent a circular reference from retaining the delegate + [fetcher setProperty:nil forKey:kTokenFetchDelegateKey]; +} + +#pragma mark Fetch Notifications + +- (void)notifyFetchIsRunning:(BOOL)isStarting + fetcher:(GTMHTTPFetcher *)fetcher + type:(NSString *)fetchType { + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + + NSString *name = (isStarting ? kGTMOAuth2FetchStarted : kGTMOAuth2FetchStopped); + NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys: + fetcher, kGTMOAuth2FetcherKey, + fetchType, kGTMOAuth2FetchTypeKey, // fetchType may be nil + nil]; + [nc postNotificationName:name + object:self + userInfo:dict]; +} + +#pragma mark Persistent Response Strings + +- (void)setKeysForPersistenceResponseString:(NSString *)str { + // All persistence keys can be set directly as if returned by a server + [self setKeysForResponseString:str]; +} + +// This returns a "response string" that can be passed later to +// setKeysForResponseString: to reuse an old access token in a new auth object +- (NSString *)persistenceResponseString { + NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithCapacity:4]; + + NSString *refreshToken = self.refreshToken; + NSString *accessToken = nil; + if (refreshToken == nil) { + // We store the access token only for services that do not support refresh + // tokens; otherwise, we assume the access token is too perishable to + // be worth storing + accessToken = self.accessToken; + } + + // Any nil values will not set a dictionary entry + [dict setValue:refreshToken forKey:kOAuth2RefreshTokenKey]; + [dict setValue:accessToken forKey:kOAuth2AccessTokenKey]; + [dict setValue:self.serviceProvider forKey:kServiceProviderKey]; + [dict setValue:self.userID forKey:kUserIDKey]; + [dict setValue:self.userEmail forKey:kUserEmailKey]; + [dict setValue:self.userEmailIsVerified forKey:kUserEmailIsVerifiedKey]; + [dict setValue:self.scope forKey:kOAuth2ScopeKey]; + + NSString *result = [[self class] encodedQueryParametersForDictionary:dict]; + return result; +} + +- (BOOL)primeForRefresh { + if (self.refreshToken == nil) { + // Cannot refresh without a refresh token + return NO; + } + self.accessToken = nil; + self.expiresIn = nil; + self.expirationDate = nil; + self.errorString = nil; + return YES; +} + +- (void)reset { + // Reset all per-authorization values + self.code = nil; + self.accessToken = nil; + self.refreshToken = nil; + self.assertion = nil; + self.expiresIn = nil; + self.errorString = nil; + self.expirationDate = nil; + self.userEmail = nil; + self.userEmailIsVerified = nil; +} + +#pragma mark Accessors for Response Parameters + +- (NSString *)accessToken { + return [self.parameters objectForKey:kOAuth2AccessTokenKey]; +} + +- (void)setAccessToken:(NSString *)str { + [self.parameters setValue:str forKey:kOAuth2AccessTokenKey]; +} + +- (NSString *)refreshToken { + return [self.parameters objectForKey:kOAuth2RefreshTokenKey]; +} + +- (void)setRefreshToken:(NSString *)str { + [self.parameters setValue:str forKey:kOAuth2RefreshTokenKey]; +} + +- (NSString *)code { + return [self.parameters objectForKey:kOAuth2CodeKey]; +} + +- (void)setCode:(NSString *)str { + [self.parameters setValue:str forKey:kOAuth2CodeKey]; +} + +- (NSString *)assertion { + return [self.parameters objectForKey:kOAuth2AssertionKey]; +} + +- (void)setAssertion:(NSString *)str { + [self.parameters setValue:str forKey:kOAuth2AssertionKey]; +} + +- (NSString *)refreshScope { + return [self.parameters objectForKey:kOAuth2RefreshScopeKey]; +} + +- (void)setRefreshScope:(NSString *)str { + [self.parameters setValue:str forKey:kOAuth2RefreshScopeKey]; +} + +- (NSString *)errorString { + return [self.parameters objectForKey:kOAuth2ErrorKey]; +} + +- (void)setErrorString:(NSString *)str { + [self.parameters setValue:str forKey:kOAuth2ErrorKey]; +} + +- (NSString *)tokenType { + return [self.parameters objectForKey:kOAuth2TokenTypeKey]; +} + +- (void)setTokenType:(NSString *)str { + [self.parameters setValue:str forKey:kOAuth2TokenTypeKey]; +} + +- (NSString *)scope { + return [self.parameters objectForKey:kOAuth2ScopeKey]; +} + +- (void)setScope:(NSString *)str { + [self.parameters setValue:str forKey:kOAuth2ScopeKey]; +} + +- (NSNumber *)expiresIn { + return [self.parameters objectForKey:kOAuth2ExpiresInKey]; +} + +- (void)setExpiresIn:(NSNumber *)num { + [self.parameters setValue:num forKey:kOAuth2ExpiresInKey]; + [self updateExpirationDate]; +} + +- (void)updateExpirationDate { + // Update our absolute expiration time to something close to when + // the server expects the expiration + NSDate *date = nil; + NSNumber *expiresIn = self.expiresIn; + if (expiresIn) { + unsigned long deltaSeconds = [expiresIn unsignedLongValue]; + if (deltaSeconds > 0) { + date = [NSDate dateWithTimeIntervalSinceNow:deltaSeconds]; + } + } + self.expirationDate = date; +} + +// +// Keys custom to this class, not part of OAuth 2 +// + +- (NSString *)serviceProvider { + return [self.parameters objectForKey:kServiceProviderKey]; +} + +- (void)setServiceProvider:(NSString *)str { + [self.parameters setValue:str forKey:kServiceProviderKey]; +} + +- (NSString *)userID { + return [self.parameters objectForKey:kUserIDKey]; +} + +- (void)setUserID:(NSString *)str { + [self.parameters setValue:str forKey:kUserIDKey]; +} + +- (NSString *)userEmail { + return [self.parameters objectForKey:kUserEmailKey]; +} + +- (void)setUserEmail:(NSString *)str { + [self.parameters setValue:str forKey:kUserEmailKey]; +} + +- (NSString *)userEmailIsVerified { + return [self.parameters objectForKey:kUserEmailIsVerifiedKey]; +} + +- (void)setUserEmailIsVerified:(NSString *)str { + [self.parameters setValue:str forKey:kUserEmailIsVerifiedKey]; +} + +#pragma mark User Properties + +- (void)setProperty:(id)obj forKey:(NSString *)key { + if (obj == nil) { + // User passed in nil, so delete the property + [properties_ removeObjectForKey:key]; + } else { + // Be sure the property dictionary exists + if (properties_ == nil) { + [self setProperties:[NSMutableDictionary dictionary]]; + } + [properties_ setObject:obj forKey:key]; + } +} + +- (id)propertyForKey:(NSString *)key { + id obj = [properties_ objectForKey:key]; + + // Be sure the returned pointer has the life of the autorelease pool, + // in case self is released immediately + return [[obj retain] autorelease]; +} + +#pragma mark Utility Routines + ++ (NSString *)encodedOAuthValueForString:(NSString *)str { + CFStringRef originalString = (CFStringRef) str; + CFStringRef leaveUnescaped = NULL; + CFStringRef forceEscaped = CFSTR("!*'();:@&=+$,/?%#[]"); + + CFStringRef escapedStr = NULL; + if (str) { + escapedStr = CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, + originalString, + leaveUnescaped, + forceEscaped, + kCFStringEncodingUTF8); + [(id)CFMakeCollectable(escapedStr) autorelease]; + } + + return (NSString *)escapedStr; +} + ++ (NSString *)encodedQueryParametersForDictionary:(NSDictionary *)dict { + // Make a string like "cat=fluffy@dog=spot" + NSMutableString *result = [NSMutableString string]; + NSArray *sortedKeys = [[dict allKeys] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)]; + NSString *joiner = @""; + for (NSString *key in sortedKeys) { + NSString *value = [dict objectForKey:key]; + NSString *encodedValue = [self encodedOAuthValueForString:value]; + NSString *encodedKey = [self encodedOAuthValueForString:key]; + [result appendFormat:@"%@%@=%@", joiner, encodedKey, encodedValue]; + joiner = @"&"; + } + return result; +} + ++ (void)invokeDelegate:(id)delegate + selector:(SEL)sel + object:(id)obj1 + object:(id)obj2 + object:(id)obj3 { + if (delegate && sel) { + NSMethodSignature *sig = [delegate methodSignatureForSelector:sel]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; + [invocation setSelector:sel]; + [invocation setTarget:delegate]; + [invocation setArgument:&obj1 atIndex:2]; + [invocation setArgument:&obj2 atIndex:3]; + [invocation setArgument:&obj3 atIndex:4]; + [invocation invoke]; + } +} + ++ (NSString *)unencodedOAuthParameterForString:(NSString *)str { + NSString *plainStr = [str stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + return plainStr; +} + ++ (NSDictionary *)dictionaryWithResponseString:(NSString *)responseStr { + // Build a dictionary from a response string of the form + // "cat=fluffy&dog=spot". Missing or empty values are considered + // empty strings; keys and values are percent-decoded. + if (responseStr == nil) return nil; + + NSArray *items = [responseStr componentsSeparatedByString:@"&"]; + + NSMutableDictionary *responseDict = [NSMutableDictionary dictionaryWithCapacity:[items count]]; + + for (NSString *item in items) { + NSString *key = nil; + NSString *value = @""; + + NSRange equalsRange = [item rangeOfString:@"="]; + if (equalsRange.location != NSNotFound) { + // The parameter has at least one '=' + key = [item substringToIndex:equalsRange.location]; + + // There are characters after the '=' + value = [item substringFromIndex:(equalsRange.location + 1)]; + } else { + // The parameter has no '=' + key = item; + } + + NSString *plainKey = [[self class] unencodedOAuthParameterForString:key]; + NSString *plainValue = [[self class] unencodedOAuthParameterForString:value]; + + [responseDict setObject:plainValue forKey:plainKey]; + } + + return responseDict; +} + ++ (NSDictionary *)dictionaryWithResponseData:(NSData *)data { + NSString *responseStr = [[[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding] autorelease]; + NSDictionary *dict = [self dictionaryWithResponseString:responseStr]; + return dict; +} + ++ (NSString *)scopeWithStrings:(NSString *)str, ... { + // concatenate the strings, joined by a single space + NSString *result = @""; + NSString *joiner = @""; + if (str) { + va_list argList; + va_start(argList, str); + while (str) { + result = [result stringByAppendingFormat:@"%@%@", joiner, str]; + joiner = @" "; + str = va_arg(argList, id); + } + va_end(argList); + } + return result; +} + +@end + +#endif // GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES diff --git a/GTL/Source/OAuth2/GTMOAuth2SignIn.h b/GTL/Source/OAuth2/GTMOAuth2SignIn.h new file mode 100644 index 0000000..90ccf39 --- /dev/null +++ b/GTL/Source/OAuth2/GTMOAuth2SignIn.h @@ -0,0 +1,182 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// This sign-in object opens and closes the web view window as needed for +// users to sign in. For signing in to Google, it also obtains +// the authenticated user's email address. +// +// Typically, this will be managed for the application by +// GTMOAuth2ViewControllerTouch or GTMOAuth2WindowController, so this +// class's interface is interesting only if +// you are creating your own window controller for sign-in. +// +// +// Delegate methods implemented by the window controller +// +// The window controller implements two methods for use by the sign-in object, +// the webRequestSelector and the finishedSelector: +// +// webRequestSelector has a signature matching +// - (void)signIn:(GTMOAuth2SignIn *)signIn displayRequest:(NSURLRequest *)request +// +// The web request selector will be invoked with a request to be displayed, or +// nil to close the window when the final callback request has been encountered. +// +// +// finishedSelector has a signature matching +// - (void)signin:(GTMOAuth2SignIn *)signin finishedWithAuth:(GTMOAuth2Authentication *)auth error:(NSError *)error +// +// The finished selector will be invoked when sign-in has completed, except +// when explicitly canceled by calling cancelSigningIn +// + +#if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES + +#import +#import + +// GTMHTTPFetcher brings in GTLDefines/GDataDefines +#import "GTMHTTPFetcher.h" + +#import "GTMOAuth2Authentication.h" + +@interface GTMOAuth2SignIn : NSObject { + @private + GTMOAuth2Authentication *auth_; + + // the endpoint for displaying the sign-in page + NSURL *authorizationURL_; + NSDictionary *additionalAuthorizationParameters_; + + id delegate_; + SEL webRequestSelector_; + SEL finishedSelector_; + + BOOL hasHandledCallback_; + + GTMHTTPFetcher *pendingFetcher_; + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT + BOOL shouldFetchGoogleUserEmail_; + BOOL shouldFetchGoogleUserProfile_; + NSDictionary *userProfile_; +#endif + + SCNetworkReachabilityRef reachabilityRef_; + NSTimer *networkLossTimer_; + NSTimeInterval networkLossTimeoutInterval_; + BOOL hasNotifiedNetworkLoss_; + + id userData_; +} + +@property (nonatomic, retain) GTMOAuth2Authentication *authentication; + +@property (nonatomic, retain) NSURL *authorizationURL; +@property (nonatomic, retain) NSDictionary *additionalAuthorizationParameters; + +// The delegate is released when signing in finishes or is cancelled +@property (nonatomic, retain) id delegate; +@property (nonatomic, assign) SEL webRequestSelector; +@property (nonatomic, assign) SEL finishedSelector; + +@property (nonatomic, retain) id userData; + +// By default, signing in to Google will fetch the user's email, but will not +// fetch the user's profile. +// +// The email is saved in the auth object. +// The profile is available immediately after sign-in. +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT +@property (nonatomic, assign) BOOL shouldFetchGoogleUserEmail; +@property (nonatomic, assign) BOOL shouldFetchGoogleUserProfile; +@property (nonatomic, retain, readonly) NSDictionary *userProfile; +#endif + +// The default timeout for an unreachable network during display of the +// sign-in page is 30 seconds; set this to 0 to have no timeout +@property (nonatomic, assign) NSTimeInterval networkLossTimeoutInterval; + +// The delegate is retained until sign-in has completed or been canceled +// +// designated initializer +- (id)initWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + delegate:(id)delegate + webRequestSelector:(SEL)webRequestSelector + finishedSelector:(SEL)finishedSelector; + +// A default authentication object for signing in to Google services +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (GTMOAuth2Authentication *)standardGoogleAuthenticationForScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret; +#endif + +#pragma mark Methods used by the Window Controller + +// Start the sequence of fetches and sign-in window display for sign-in +- (BOOL)startSigningIn; + +// Stop any pending fetches, and close the window (but don't call the +// delegate's finishedSelector) +- (void)cancelSigningIn; + +// Window controllers must tell the sign-in object about any redirect +// requested by the web view, and any changes in the webview window title +// +// If these return YES then the event was handled by the +// sign-in object (typically by closing the window) and should be ignored by +// the window controller's web view + +- (BOOL)requestRedirectedToRequest:(NSURLRequest *)redirectedRequest; +- (BOOL)titleChanged:(NSString *)title; +- (BOOL)cookiesChanged:(NSHTTPCookieStorage *)cookieStorage; +- (BOOL)loadFailedWithError:(NSError *)error; + +// Window controllers must tell the sign-in object if the window was closed +// prematurely by the user (but not by the sign-in object); this calls the +// delegate's finishedSelector +- (void)windowWasClosed; + +#pragma mark - + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT +// Revocation of an authorized token from Google ++ (void)revokeTokenForGoogleAuthentication:(GTMOAuth2Authentication *)auth; + +// Create a fetcher for obtaining the user's Google email address or profile, +// according to the current auth scopes. +// +// The auth object must have been created with appropriate scopes. +// +// The fetcher's response data can be parsed with NSJSONSerialization. ++ (GTMHTTPFetcher *)userInfoFetcherWithAuth:(GTMOAuth2Authentication *)auth; +#endif + +#pragma mark - + +// Standard authentication values ++ (NSString *)nativeClientRedirectURI; +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (NSURL *)googleAuthorizationURL; ++ (NSURL *)googleTokenURL; ++ (NSURL *)googleUserInfoURL; +#endif + +@end + +#endif // #if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES diff --git a/GTL/Source/OAuth2/GTMOAuth2SignIn.m b/GTL/Source/OAuth2/GTMOAuth2SignIn.m new file mode 100644 index 0000000..8899d29 --- /dev/null +++ b/GTL/Source/OAuth2/GTMOAuth2SignIn.m @@ -0,0 +1,820 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES + +#define GTMOAUTH2SIGNIN_DEFINE_GLOBALS 1 +#import "GTMOAuth2SignIn.h" + +// we'll default to timing out if the network becomes unreachable for more +// than 30 seconds when the sign-in page is displayed +static const NSTimeInterval kDefaultNetworkLossTimeoutInterval = 30.0; + +// URI indicating an installed app is signing in. This is described at +// +// http://code.google.com/apis/accounts/docs/OAuth2.html#IA +// +NSString *const kOOBString = @"urn:ietf:wg:oauth:2.0:oob"; + + +@interface GTMOAuth2Authentication (InternalMethods) +- (NSDictionary *)dictionaryWithJSONData:(NSData *)data; +@end + +@interface GTMOAuth2SignIn () +@property (assign) BOOL hasHandledCallback; +@property (retain) GTMHTTPFetcher *pendingFetcher; +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT +@property (nonatomic, retain, readwrite) NSDictionary *userProfile; +#endif + +- (void)invokeFinalCallbackWithError:(NSError *)error; + +- (BOOL)startWebRequest; ++ (NSMutableURLRequest *)mutableURLRequestWithURL:(NSURL *)oldURL + paramString:(NSString *)paramStr; +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT +- (void)fetchGoogleUserInfo; +#endif +- (void)finishSignInWithError:(NSError *)error; + +- (void)handleCallbackReached; + +- (void)auth:(GTMOAuth2Authentication *)auth +finishedWithFetcher:(GTMHTTPFetcher *)fetcher + error:(NSError *)error; + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT +- (void)infoFetcher:(GTMHTTPFetcher *)fetcher + finishedWithData:(NSData *)data + error:(NSError *)error; +#endif + +- (void)closeTheWindow; + +- (void)startReachabilityCheck; +- (void)stopReachabilityCheck; +- (void)reachabilityTarget:(SCNetworkReachabilityRef)reachabilityRef + changedFlags:(SCNetworkConnectionFlags)flags; +- (void)reachabilityTimerFired:(NSTimer *)timer; +@end + +@implementation GTMOAuth2SignIn + +@synthesize authentication = auth_; + +@synthesize authorizationURL = authorizationURL_; +@synthesize additionalAuthorizationParameters = additionalAuthorizationParameters_; + +@synthesize delegate = delegate_; +@synthesize webRequestSelector = webRequestSelector_; +@synthesize finishedSelector = finishedSelector_; +@synthesize hasHandledCallback = hasHandledCallback_; +@synthesize pendingFetcher = pendingFetcher_; +@synthesize userData = userData_; + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT +@synthesize shouldFetchGoogleUserEmail = shouldFetchGoogleUserEmail_; +@synthesize shouldFetchGoogleUserProfile = shouldFetchGoogleUserProfile_; +@synthesize userProfile = userProfile_; +#endif + +@synthesize networkLossTimeoutInterval = networkLossTimeoutInterval_; + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (NSURL *)googleAuthorizationURL { + NSString *str = @"https://accounts.google.com/o/oauth2/auth"; + return [NSURL URLWithString:str]; +} + ++ (NSURL *)googleTokenURL { + NSString *str = @"https://accounts.google.com/o/oauth2/token"; + return [NSURL URLWithString:str]; +} + ++ (NSURL *)googleRevocationURL { + NSString *urlStr = @"https://accounts.google.com/o/oauth2/revoke"; + return [NSURL URLWithString:urlStr]; +} + ++ (NSURL *)googleUserInfoURL { + NSString *urlStr = @"https://www.googleapis.com/oauth2/v1/userinfo"; + return [NSURL URLWithString:urlStr]; +} +#endif + ++ (NSString *)nativeClientRedirectURI { + return kOOBString; +} + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (GTMOAuth2Authentication *)standardGoogleAuthenticationForScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret { + NSString *redirectURI = [self nativeClientRedirectURI]; + NSURL *tokenURL = [self googleTokenURL]; + + GTMOAuth2Authentication *auth; + auth = [GTMOAuth2Authentication authenticationWithServiceProvider:kGTMOAuth2ServiceProviderGoogle + tokenURL:tokenURL + redirectURI:redirectURI + clientID:clientID + clientSecret:clientSecret]; + auth.scope = scope; + + return auth; +} +#endif + +- (id)initWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + delegate:(id)delegate + webRequestSelector:(SEL)webRequestSelector + finishedSelector:(SEL)finishedSelector { + // check the selectors on debug builds + GTMAssertSelectorNilOrImplementedWithArgs(delegate, webRequestSelector, + @encode(GTMOAuth2SignIn *), @encode(NSURLRequest *), 0); + GTMAssertSelectorNilOrImplementedWithArgs(delegate, finishedSelector, + @encode(GTMOAuth2SignIn *), @encode(GTMOAuth2Authentication *), + @encode(NSError *), 0); + + // designated initializer + self = [super init]; + if (self) { + auth_ = [auth retain]; + authorizationURL_ = [authorizationURL retain]; + delegate_ = [delegate retain]; + webRequestSelector_ = webRequestSelector; + finishedSelector_ = finishedSelector; + + // for Google authentication, we want to automatically fetch user info +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT + NSString *host = [authorizationURL host]; + if ([host hasSuffix:@".google.com"]) { + shouldFetchGoogleUserEmail_ = YES; + } +#endif + + // default timeout for a lost internet connection while the server + // UI is displayed is 30 seconds + networkLossTimeoutInterval_ = kDefaultNetworkLossTimeoutInterval; + } + return self; +} + +- (void)dealloc { + [self stopReachabilityCheck]; + + [auth_ release]; + [authorizationURL_ release]; + [additionalAuthorizationParameters_ release]; + [delegate_ release]; + [pendingFetcher_ release]; +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT + [userProfile_ release]; +#endif + [userData_ release]; + + [super dealloc]; +} + +#pragma mark Sign-in Sequence Methods + +// stop any pending fetches, and close the window (but don't call the +// delegate's finishedSelector) +- (void)cancelSigningIn { + [self.pendingFetcher stopFetching]; + self.pendingFetcher = nil; + + [self.authentication stopAuthorization]; + + [self closeTheWindow]; + + [delegate_ autorelease]; + delegate_ = nil; +} + +// +// This is the entry point to begin the sequence +// - display the authentication web page, and monitor redirects +// - exchange the code for an access token and a refresh token +// - for Google sign-in, fetch the user's email address +// - tell the delegate we're finished +// +- (BOOL)startSigningIn { + // For signing in to Google, append the scope for obtaining the authenticated + // user email and profile, as appropriate +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT + GTMOAuth2Authentication *auth = self.authentication; + if (self.shouldFetchGoogleUserEmail) { + NSString *const emailScope = @"https://www.googleapis.com/auth/userinfo.email"; + NSString *scope = auth.scope; + if ([scope rangeOfString:emailScope].location == NSNotFound) { + scope = [GTMOAuth2Authentication scopeWithStrings:scope, emailScope, nil]; + auth.scope = scope; + } + } + + if (self.shouldFetchGoogleUserProfile) { + NSString *const profileScope = @"https://www.googleapis.com/auth/userinfo.profile"; + NSString *scope = auth.scope; + if ([scope rangeOfString:profileScope].location == NSNotFound) { + scope = [GTMOAuth2Authentication scopeWithStrings:scope, profileScope, nil]; + auth.scope = scope; + } + } +#endif + + // start the authorization + return [self startWebRequest]; +} + +- (NSMutableDictionary *)parametersForWebRequest { + GTMOAuth2Authentication *auth = self.authentication; + NSString *clientID = auth.clientID; + NSString *redirectURI = auth.redirectURI; + + BOOL hasClientID = ([clientID length] > 0); + BOOL hasRedirect = ([redirectURI length] > 0 + || redirectURI == [[self class] nativeClientRedirectURI]); + if (!hasClientID || !hasRedirect) { +#if DEBUG + NSAssert(hasClientID, @"GTMOAuth2SignIn: clientID needed"); + NSAssert(hasRedirect, @"GTMOAuth2SignIn: redirectURI needed"); +#endif + return NO; + } + + // invoke the UI controller's web request selector to display + // the authorization page + + // add params to the authorization URL + NSString *scope = auth.scope; + if ([scope length] == 0) scope = nil; + + NSMutableDictionary *paramsDict = [NSMutableDictionary dictionaryWithObjectsAndKeys: + @"code", @"response_type", + clientID, @"client_id", + scope, @"scope", // scope may be nil + nil]; + if (redirectURI) { + [paramsDict setObject:redirectURI forKey:@"redirect_uri"]; + } + return paramsDict; +} + +- (BOOL)startWebRequest { + NSMutableDictionary *paramsDict = [self parametersForWebRequest]; + + NSDictionary *additionalParams = self.additionalAuthorizationParameters; + if (additionalParams) { + [paramsDict addEntriesFromDictionary:additionalParams]; + } + + NSString *paramStr = [GTMOAuth2Authentication encodedQueryParametersForDictionary:paramsDict]; + + NSURL *authorizationURL = self.authorizationURL; + NSMutableURLRequest *request; + request = [[self class] mutableURLRequestWithURL:authorizationURL + paramString:paramStr]; + + [delegate_ performSelector:self.webRequestSelector + withObject:self + withObject:request]; + + // at this point, we're waiting on the server-driven html UI, so + // we want notification if we lose connectivity to the web server + [self startReachabilityCheck]; + return YES; +} + +// utility for making a request from an old URL with some additional parameters ++ (NSMutableURLRequest *)mutableURLRequestWithURL:(NSURL *)oldURL + paramString:(NSString *)paramStr { + NSString *query = [oldURL query]; + if ([query length] > 0) { + query = [query stringByAppendingFormat:@"&%@", paramStr]; + } else { + query = paramStr; + } + + NSString *portStr = @""; + NSString *oldPort = [[oldURL port] stringValue]; + if ([oldPort length] > 0) { + portStr = [@":" stringByAppendingString:oldPort]; + } + + NSString *qMark = [query length] > 0 ? @"?" : @""; + NSString *newURLStr = [NSString stringWithFormat:@"%@://%@%@%@%@%@", + [oldURL scheme], [oldURL host], portStr, + [oldURL path], qMark, query]; + NSURL *newURL = [NSURL URLWithString:newURLStr]; + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:newURL]; + return request; +} + +// entry point for the window controller to tell us that the window +// prematurely closed +- (void)windowWasClosed { + [self stopReachabilityCheck]; + + NSError *error = [NSError errorWithDomain:kGTMOAuth2ErrorDomain + code:kGTMOAuth2ErrorWindowClosed + userInfo:nil]; + [self invokeFinalCallbackWithError:error]; +} + +// internal method to tell the window controller to close the window +- (void)closeTheWindow { + [self stopReachabilityCheck]; + + // a nil request means the window should be closed + [delegate_ performSelector:self.webRequestSelector + withObject:self + withObject:nil]; +} + +// entry point for the window controller to tell us what web page has been +// requested +// +// When the request is for the callback URL, this method invokes +// handleCallbackReached and returns YES +- (BOOL)requestRedirectedToRequest:(NSURLRequest *)redirectedRequest { + // for Google's installed app sign-in protocol, we'll look for the + // end-of-sign-in indicator in the titleChanged: method below + NSString *redirectURI = self.authentication.redirectURI; + if (redirectURI == nil) return NO; + + // when we're searching for the window title string, then we can ignore + // redirects + NSString *standardURI = [[self class] nativeClientRedirectURI]; + if (standardURI != nil && [redirectURI isEqual:standardURI]) return NO; + + // compare the redirectURI, which tells us when the web sign-in is done, + // to the actual redirection + NSURL *redirectURL = [NSURL URLWithString:redirectURI]; + NSURL *requestURL = [redirectedRequest URL]; + + // avoid comparing to nil host and path values (such as when redirected to + // "about:blank") + NSString *requestHost = [requestURL host]; + NSString *requestPath = [requestURL path]; + BOOL isCallback; + if (requestHost && requestPath) { + isCallback = [[redirectURL host] isEqual:[requestURL host]] + && [[redirectURL path] isEqual:[requestURL path]]; + } else if (requestURL) { + // handle "about:blank" + isCallback = [redirectURL isEqual:requestURL]; + } else { + isCallback = NO; + } + + if (!isCallback) { + // tell the caller that this request is nothing interesting + return NO; + } + + // we've reached the callback URL + + // try to get the access code + if (!self.hasHandledCallback) { + NSString *responseStr = [[redirectedRequest URL] query]; + [self.authentication setKeysForResponseString:responseStr]; + +#if DEBUG + NSAssert([self.authentication.code length] > 0 + || [self.authentication.errorString length] > 0, + @"response lacks auth code or error"); +#endif + + [self handleCallbackReached]; + } + // tell the delegate that we did handle this request + return YES; +} + +// entry point for the window controller to tell us when a new page title has +// been loadded +// +// When the title indicates sign-in has completed, this method invokes +// handleCallbackReached and returns YES +- (BOOL)titleChanged:(NSString *)title { + // return YES if the OAuth flow ending title was detected + + // right now we're just looking for a parameter list following the last space + // in the title string, but hopefully we'll eventually get something better + // from the server to search for + NSRange paramsRange = [title rangeOfString:@" " + options:NSBackwardsSearch]; + NSUInteger spaceIndex = paramsRange.location; + if (spaceIndex != NSNotFound) { + NSString *responseStr = [title substringFromIndex:(spaceIndex + 1)]; + + NSDictionary *dict = [GTMOAuth2Authentication dictionaryWithResponseString:responseStr]; + + NSString *code = [dict objectForKey:@"code"]; + NSString *error = [dict objectForKey:@"error"]; + if ([code length] > 0 || [error length] > 0) { + + if (!self.hasHandledCallback) { + [self.authentication setKeysForResponseDictionary:dict]; + + [self handleCallbackReached]; + } + return YES; + } + } + return NO; +} + +- (BOOL)cookiesChanged:(NSHTTPCookieStorage *)cookieStorage { + // We're ignoring these. + return NO; +}; + +// entry point for the window controller to tell us when a load has failed +// in the webview +// +// if the initial authorization URL fails, bail out so the user doesn't +// see an empty webview +- (BOOL)loadFailedWithError:(NSError *)error { + NSURL *authorizationURL = self.authorizationURL; + NSURL *failedURL = [[error userInfo] valueForKey:@"NSErrorFailingURLKey"]; // NSURLErrorFailingURLErrorKey defined in 10.6 + + BOOL isAuthURL = [[failedURL host] isEqual:[authorizationURL host]] + && [[failedURL path] isEqual:[authorizationURL path]]; + + if (isAuthURL) { + // We can assume that we have no pending fetchers, since we only + // handle failure to load the initial authorization URL + [self closeTheWindow]; + [self invokeFinalCallbackWithError:error]; + return YES; + } + return NO; +} + +- (void)handleCallbackReached { + // the callback page was requested, or the authenticate code was loaded + // into a page's title, so exchange the auth code for access & refresh tokens + // and tell the window to close + + // avoid duplicate signals that the callback point has been reached + self.hasHandledCallback = YES; + + [self closeTheWindow]; + + NSError *error = nil; + + GTMOAuth2Authentication *auth = self.authentication; + NSString *code = auth.code; + if ([code length] > 0) { + // exchange the code for a token + SEL sel = @selector(auth:finishedWithFetcher:error:); + GTMHTTPFetcher *fetcher = [auth beginTokenFetchWithDelegate:self + didFinishSelector:sel]; + if (fetcher == nil) { + error = [NSError errorWithDomain:kGTMHTTPFetcherStatusDomain + code:-1 + userInfo:nil]; + } else { + self.pendingFetcher = fetcher; + } + + // notify the app so it can put up a post-sign in, pre-token exchange UI + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc postNotificationName:kGTMOAuth2UserSignedIn + object:self + userInfo:nil]; + } else { + // the callback lacked an auth code + NSString *errStr = auth.errorString; + NSDictionary *userInfo = nil; + if ([errStr length] > 0) { + userInfo = [NSDictionary dictionaryWithObject:errStr + forKey:kGTMOAuth2ErrorMessageKey]; + } + + error = [NSError errorWithDomain:kGTMOAuth2ErrorDomain + code:kGTMOAuth2ErrorAuthorizationFailed + userInfo:userInfo]; + } + + if (error) { + [self finishSignInWithError:error]; + } +} + +- (void)auth:(GTMOAuth2Authentication *)auth +finishedWithFetcher:(GTMHTTPFetcher *)fetcher + error:(NSError *)error { + self.pendingFetcher = nil; + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT + if (error == nil + && (self.shouldFetchGoogleUserEmail || self.shouldFetchGoogleUserProfile) + && [self.authentication.serviceProvider isEqual:kGTMOAuth2ServiceProviderGoogle]) { + // fetch the user's information from the Google server + [self fetchGoogleUserInfo]; + } else { + // we're not authorizing with Google, so we're done + [self finishSignInWithError:error]; + } +#else + [self finishSignInWithError:error]; +#endif +} + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (GTMHTTPFetcher *)userInfoFetcherWithAuth:(GTMOAuth2Authentication *)auth { + // create a fetcher for obtaining the user's email or profile + NSURL *infoURL = [[self class] googleUserInfoURL]; + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:infoURL]; + + NSString *userAgent = [auth userAgent]; + [request setValue:userAgent forHTTPHeaderField:@"User-Agent"]; + [request setValue:@"no-cache" forHTTPHeaderField:@"Cache-Control"]; + + GTMHTTPFetcher *fetcher; + id fetcherService = auth.fetcherService; + if (fetcherService) { + fetcher = [fetcherService fetcherWithRequest:request]; + } else { + fetcher = [GTMHTTPFetcher fetcherWithRequest:request]; + } + fetcher.authorizer = auth; + fetcher.retryEnabled = YES; + fetcher.maxRetryInterval = 15.0; + fetcher.comment = @"user info"; + return fetcher; +} + +- (void)fetchGoogleUserInfo { + // fetch the user's email address or profile + GTMOAuth2Authentication *auth = self.authentication; + GTMHTTPFetcher *fetcher = [[self class] userInfoFetcherWithAuth:auth]; + [fetcher beginFetchWithDelegate:self + didFinishSelector:@selector(infoFetcher:finishedWithData:error:)]; + + self.pendingFetcher = fetcher; + + [auth notifyFetchIsRunning:YES + fetcher:fetcher + type:kGTMOAuth2FetchTypeUserInfo]; +} + +- (void)infoFetcher:(GTMHTTPFetcher *)fetcher + finishedWithData:(NSData *)data + error:(NSError *)error { + GTMOAuth2Authentication *auth = self.authentication; + [auth notifyFetchIsRunning:NO + fetcher:fetcher + type:nil]; + + self.pendingFetcher = nil; + + if (error) { +#if DEBUG + if (data) { + NSString *dataStr = [[[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding] autorelease]; + NSLog(@"infoFetcher error: %@\n%@", error, dataStr); + } +#endif + } else { + // We have the authenticated user's info + if (data) { + NSDictionary *profileDict = [auth dictionaryWithJSONData:data]; + if (profileDict) { + self.userProfile = profileDict; + + // Save the ID into the auth object + NSString *identifier = [profileDict objectForKey:@"id"]; + [auth setUserID:identifier]; + + // Save the email into the auth object + NSString *email = [profileDict objectForKey:@"email"]; + [auth setUserEmail:email]; + + NSNumber *verified = [profileDict objectForKey:@"verified_email"]; + [auth setUserEmailIsVerified:[verified stringValue]]; + } + } + } + [self finishSignInWithError:error]; +} + +#endif // !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT + +- (void)finishSignInWithError:(NSError *)error { + [self invokeFinalCallbackWithError:error]; +} + +// convenience method for making the final call to our delegate +- (void)invokeFinalCallbackWithError:(NSError *)error { + if (delegate_ && finishedSelector_) { + GTMOAuth2Authentication *auth = self.authentication; + + NSMethodSignature *sig = [delegate_ methodSignatureForSelector:finishedSelector_]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; + [invocation setSelector:finishedSelector_]; + [invocation setTarget:delegate_]; + [invocation setArgument:&self atIndex:2]; + [invocation setArgument:&auth atIndex:3]; + [invocation setArgument:&error atIndex:4]; + [invocation invoke]; + } + + // we'll no longer send messages to the delegate + // + // we want to autorelease it rather than assign to the property in case + // the delegate is below us in the call stack + [delegate_ autorelease]; + delegate_ = nil; +} + +#pragma mark Reachability monitoring + +static void ReachabilityCallBack(SCNetworkReachabilityRef target, + SCNetworkConnectionFlags flags, + void *info) { + // pass the flags to the signIn object + GTMOAuth2SignIn *signIn = (GTMOAuth2SignIn *)info; + + [signIn reachabilityTarget:target + changedFlags:flags]; +} + +- (void)startReachabilityCheck { + // the user may set the timeout to 0 to skip the reachability checking + // during display of the sign-in page + if (networkLossTimeoutInterval_ <= 0.0 || reachabilityRef_ != NULL) { + return; + } + + // create a reachability target from the authorization URL, add our callback, + // and schedule it on the run loop so we'll be notified if the network drops + NSURL *url = self.authorizationURL; + const char* host = [[url host] UTF8String]; + reachabilityRef_ = SCNetworkReachabilityCreateWithName(kCFAllocatorSystemDefault, + host); + if (reachabilityRef_) { + BOOL isScheduled = NO; + SCNetworkReachabilityContext ctx = { 0, self, NULL, NULL, NULL }; + + if (SCNetworkReachabilitySetCallback(reachabilityRef_, + ReachabilityCallBack, &ctx)) { + if (SCNetworkReachabilityScheduleWithRunLoop(reachabilityRef_, + CFRunLoopGetCurrent(), + kCFRunLoopDefaultMode)) { + isScheduled = YES; + } + } + + if (!isScheduled) { + CFRelease(reachabilityRef_); + reachabilityRef_ = NULL; + } + } +} + +- (void)destroyUnreachabilityTimer { + [networkLossTimer_ invalidate]; + [networkLossTimer_ autorelease]; + networkLossTimer_ = nil; +} + +- (void)reachabilityTarget:(SCNetworkReachabilityRef)reachabilityRef + changedFlags:(SCNetworkConnectionFlags)flags { + BOOL isConnected = (flags & kSCNetworkFlagsReachable) != 0 + && (flags & kSCNetworkFlagsConnectionRequired) == 0; + + if (isConnected) { + // server is again reachable + [self destroyUnreachabilityTimer]; + + if (hasNotifiedNetworkLoss_) { + // tell the user that the network has been found + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc postNotificationName:kGTMOAuth2NetworkFound + object:self + userInfo:nil]; + hasNotifiedNetworkLoss_ = NO; + } + } else { + // the server has become unreachable; start the timer, if necessary + if (networkLossTimer_ == nil + && networkLossTimeoutInterval_ > 0 + && !hasNotifiedNetworkLoss_) { + SEL sel = @selector(reachabilityTimerFired:); + networkLossTimer_ = [[NSTimer scheduledTimerWithTimeInterval:networkLossTimeoutInterval_ + target:self + selector:sel + userInfo:nil + repeats:NO] retain]; + } + } +} + +- (void)reachabilityTimerFired:(NSTimer *)timer { + // the user may call [[notification object] cancelSigningIn] to + // dismiss the sign-in + if (!hasNotifiedNetworkLoss_) { + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc postNotificationName:kGTMOAuth2NetworkLost + object:self + userInfo:nil]; + hasNotifiedNetworkLoss_ = YES; + } + + [self destroyUnreachabilityTimer]; +} + +- (void)stopReachabilityCheck { + [self destroyUnreachabilityTimer]; + + if (reachabilityRef_) { + SCNetworkReachabilityUnscheduleFromRunLoop(reachabilityRef_, + CFRunLoopGetCurrent(), + kCFRunLoopDefaultMode); + SCNetworkReachabilitySetCallback(reachabilityRef_, NULL, NULL); + + CFRelease(reachabilityRef_); + reachabilityRef_ = NULL; + } +} + +#pragma mark Token Revocation + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (void)revokeTokenForGoogleAuthentication:(GTMOAuth2Authentication *)auth { + if (auth.refreshToken != nil + && auth.canAuthorize + && [auth.serviceProvider isEqual:kGTMOAuth2ServiceProviderGoogle]) { + + // create a signed revocation request for this authentication object + NSURL *url = [self googleRevocationURL]; + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; + [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; + + NSString *token = auth.refreshToken; + NSString *encoded = [GTMOAuth2Authentication encodedOAuthValueForString:token]; + if (encoded != nil) { + NSString *body = [@"token=" stringByAppendingString:encoded]; + + [request setHTTPBody:[body dataUsingEncoding:NSUTF8StringEncoding]]; + [request setHTTPMethod:@"POST"]; + + NSString *userAgent = [auth userAgent]; + [request setValue:userAgent forHTTPHeaderField:@"User-Agent"]; + + // there's nothing to be done if revocation succeeds or fails + GTMHTTPFetcher *fetcher; + id fetcherService = auth.fetcherService; + if (fetcherService) { + fetcher = [fetcherService fetcherWithRequest:request]; + } else { + fetcher = [GTMHTTPFetcher fetcherWithRequest:request]; + } + fetcher.comment = @"revoke token"; + + // Use a completion handler fetch for better debugging, but only if we're + // guaranteed that blocks are available in the runtime +#if (!TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MIN_REQUIRED >= 1060)) || \ + (TARGET_OS_IPHONE && (__IPHONE_OS_VERSION_MIN_REQUIRED >= 40000)) + // Blocks are available + [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { + #if DEBUG + if (error) { + NSString *errStr = [[[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding] autorelease]; + NSLog(@"revoke error: %@", errStr); + } + #endif // DEBUG + }]; +#else + // Blocks may not be available + [fetcher beginFetchWithDelegate:nil didFinishSelector:NULL]; +#endif + } + } + [auth reset]; +} +#endif // !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT + +@end + +#endif // #if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES diff --git a/GTL/Source/OAuth2/Mac/.svn/all-wcprops b/GTL/Source/OAuth2/Mac/.svn/all-wcprops new file mode 100644 index 0000000..ed512ef --- /dev/null +++ b/GTL/Source/OAuth2/Mac/.svn/all-wcprops @@ -0,0 +1,29 @@ +K 25 +svn:wc:ra_dav:version-url +V 33 +/svn/!svn/ver/99/trunk/Source/Mac +END +GTMOAuth2WindowController.m +K 25 +svn:wc:ra_dav:version-url +V 61 +/svn/!svn/ver/99/trunk/Source/Mac/GTMOAuth2WindowController.m +END +GTMOAuth2Window.xib +K 25 +svn:wc:ra_dav:version-url +V 53 +/svn/!svn/ver/33/trunk/Source/Mac/GTMOAuth2Window.xib +END +GTMOAuth2Framework-Info.plist +K 25 +svn:wc:ra_dav:version-url +V 63 +/svn/!svn/ver/11/trunk/Source/Mac/GTMOAuth2Framework-Info.plist +END +GTMOAuth2WindowController.h +K 25 +svn:wc:ra_dav:version-url +V 61 +/svn/!svn/ver/70/trunk/Source/Mac/GTMOAuth2WindowController.h +END diff --git a/GTL/Source/OAuth2/Mac/.svn/entries b/GTL/Source/OAuth2/Mac/.svn/entries new file mode 100644 index 0000000..5f2bd68 --- /dev/null +++ b/GTL/Source/OAuth2/Mac/.svn/entries @@ -0,0 +1,164 @@ +10 + +dir +99 +http://gtm-oauth2.googlecode.com/svn/trunk/Source/Mac +http://gtm-oauth2.googlecode.com/svn + + + +2012-12-06T21:23:57.582218Z +99 +grobbins@google.com + + + + + + + + + + + + + + +22754eea-fc93-e339-b032-c1f495b90c16 + +GTMOAuth2WindowController.m +file + + + + +2012-12-09T08:42:42.000000Z +4dd146471a4fdcfaa21b3f4bb6478663 +2012-12-06T21:23:57.582218Z +99 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +25692 + +GTMOAuth2Window.xib +file + + + + +2012-12-09T08:42:42.000000Z +aae34ea7f052e72014ad0a30d3b75566 +2011-05-26T19:35:54.519002Z +33 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +27752 + +GTMOAuth2Framework-Info.plist +file + + + + +2012-12-09T08:42:42.000000Z +6e581f7c7598f726149c882605ac56b1 +2011-03-24T19:15:36.047395Z +11 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +695 + +GTMOAuth2WindowController.h +file + + + + +2012-12-09T08:42:42.000000Z +446054cffeddc6d012afa4c80499fa18 +2011-10-19T23:22:42.017486Z +70 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +12762 + diff --git a/GTL/Source/OAuth2/Mac/.svn/text-base/GTMOAuth2Framework-Info.plist.svn-base b/GTL/Source/OAuth2/Mac/.svn/text-base/GTMOAuth2Framework-Info.plist.svn-base new file mode 100644 index 0000000..4433570 --- /dev/null +++ b/GTL/Source/OAuth2/Mac/.svn/text-base/GTMOAuth2Framework-Info.plist.svn-base @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.google.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/GTL/Source/OAuth2/Mac/.svn/text-base/GTMOAuth2Window.xib.svn-base b/GTL/Source/OAuth2/Mac/.svn/text-base/GTMOAuth2Window.xib.svn-base new file mode 100644 index 0000000..096ff76 --- /dev/null +++ b/GTL/Source/OAuth2/Mac/.svn/text-base/GTMOAuth2Window.xib.svn-base @@ -0,0 +1,657 @@ + + + + 1050 + 10J869 + 851 + 1038.35 + 461.00 + + YES + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.WebKitIBPlugin + + + YES + 851 + 851 + + + + YES + + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.WebKitIBPlugin + + + YES + + YES + + + YES + + + + YES + + GTMOAuth2WindowController + + + FirstResponder + + + NSApplication + + + 11 + 2 + {{74, 707}, {515, 419}} + 536870912 + Sign In + NSWindow + + {1.79769e+308, 1.79769e+308} + {475, 290} + + + 256 + + YES + + + 274 + + YES + + YES + Apple HTML pasteboard type + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple URL pasteboard type + Apple Web Archive pasteboard type + NSColor pasteboard type + NSFilenamesPboardType + NSStringPboardType + NeXT RTFD pasteboard type + NeXT Rich Text Format v1.0 pasteboard type + NeXT TIFF v4.0 pasteboard type + WebURLsWithTitlesPboardType + public.png + public.url + public.url-name + + + {{0, 20}, {515, 399}} + + + + + + + + YES + + YES + WebKitDefaultFixedFontSize + WebKitDefaultFontSize + WebKitMinimumFontSize + + + YES + + + + + + + YES + YES + + + + 289 + {{479, 0}, {16, 19}} + + YES + + 67239424 + 134217728 + + + LucidaGrande + 13 + 1044 + + + -2041822977 + 134 + + NSImage + NSStopProgressTemplate + + + Gw + 400 + 75 + + + + + 289 + {{437, 0}, {16, 19}} + + YES + + 67239424 + 134217728 + + + + -2041822977 + 134 + + NSImage + NSGoLeftTemplate + + + + 400 + 75 + + + + + 289 + {{456, 0}, {16, 19}} + + YES + + 67239424 + 134217728 + + + + -2042347265 + 134 + + NSImage + NSGoRightTemplate + + + + 400 + 75 + + + + + 292 + {{2, 1}, {429, 18}} + + YES + + -2080244224 + 131072 + Stay signed in to this account + + LucidaGrande + 11 + 3100 + + + 1211912703 + 2 + + NSImage + NSSwitch + + + NSSwitch + + + + 200 + 25 + + + + {515, 419} + + + {{0, 0}, {1920, 1178}} + {475, 312} + {1.79769e+308, 1.79769e+308} + + + YES + + + + + YES + + + delegate + + + + 7 + + + + window + + + + 8 + + + + goBack: + + + + 28 + + + + goForward: + + + + 29 + + + + enabled: webView.canGoBack + + + + + + enabled: webView.canGoBack + enabled + webView.canGoBack + 2 + + + 31 + + + + enabled: webView.canGoForward + + + + + + enabled: webView.canGoForward + enabled + webView.canGoForward + 2 + + + 35 + + + + closeWindow: + + + + 42 + + + + keychainCheckbox + + + + 46 + + + + webBackButton + + + + 47 + + + + webCloseButton + + + + 48 + + + + webView + + + + 49 + + + + + YES + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 3 + + + YES + + + + + + 4 + + + YES + + + + + + + + + + 5 + + + + + 17 + + + YES + + + + + + 18 + + + + + 19 + + + YES + + + + + + 20 + + + + + 26 + + + YES + + + + + + 27 + + + + + 32 + + + + + 43 + + + YES + + + + + + 44 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 17.IBPluginDependency + 18.IBPluginDependency + 19.IBPluginDependency + 20.IBPluginDependency + 26.IBPluginDependency + 27.IBPluginDependency + 3.IBEditorWindowLastContentRect + 3.IBPluginDependency + 3.IBViewEditorWindowController.showingLayoutRectangles + 3.IBWindowTemplateEditedContentRect + 3.NSWindowTemplate.visibleAtLaunch + 3.WindowOrigin + 3.editorWindowContentRectSynchronizationRect + 3.windowTemplate.hasMinSize + 3.windowTemplate.minSize + 4.IBPluginDependency + 43.IBPluginDependency + 44.IBPluginDependency + 5.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{112, 709}, {515, 419}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{112, 709}, {515, 419}} + + {196, 240} + {{357, 418}, {480, 270}} + + {475, 290} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.WebKitIBPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 49 + + + + YES + + GTMOAuth2WindowController + NSWindowController + + closeWindow: + id + + + closeWindow: + + closeWindow: + id + + + + YES + + YES + completionPlaceholder_ + delegate_ + keychainCheckbox + userData_ + webBackButton + webCloseButton + webView + + + YES + id + id + NSButton + id + NSButton + NSButton + WebView + + + + YES + + YES + completionPlaceholder_ + delegate_ + keychainCheckbox + userData_ + webBackButton + webCloseButton + webView + + + YES + + completionPlaceholder_ + id + + + delegate_ + id + + + keychainCheckbox + NSButton + + + userData_ + id + + + webBackButton + NSButton + + + webCloseButton + NSButton + + + webView + WebView + + + + + IBProjectSource + Mac/GTMOAuth2WindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../GTMOAuth.xcodeproj + 3 + + YES + + YES + NSGoLeftTemplate + NSGoRightTemplate + NSStopProgressTemplate + NSSwitch + + + YES + {9, 9} + {9, 9} + {11, 11} + {15, 15} + + + + diff --git a/GTL/Source/OAuth2/Mac/.svn/text-base/GTMOAuth2WindowController.h.svn-base b/GTL/Source/OAuth2/Mac/.svn/text-base/GTMOAuth2WindowController.h.svn-base new file mode 100644 index 0000000..9ff89b7 --- /dev/null +++ b/GTL/Source/OAuth2/Mac/.svn/text-base/GTMOAuth2WindowController.h.svn-base @@ -0,0 +1,332 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// GTMOAuth2WindowController +// +// This window controller for Mac handles sign-in via OAuth2 to Google or +// other services. +// +// This controller is not reusable; create a new instance of this controller +// every time the user will sign in. +// +// Sample usage for signing in to a Google service: +// +// static NSString *const kKeychainItemName = @”My App: Google Plus”; +// NSString *scope = @"https://www.googleapis.com/auth/plus.me"; +// +// +// GTMOAuth2WindowController *windowController; +// windowController = [[[GTMOAuth2WindowController alloc] initWithScope:scope +// clientID:clientID +// clientSecret:clientSecret +// keychainItemName:kKeychainItemName +// resourceBundle:nil] autorelease]; +// +// [windowController signInSheetModalForWindow:mMainWindow +// delegate:self +// finishedSelector:@selector(windowController:finishedWithAuth:error:)]; +// +// The finished selector should have a signature matching this: +// +// - (void)windowController:(GTMOAuth2WindowController *)windowController +// finishedWithAuth:(GTMOAuth2Authentication *)auth +// error:(NSError *)error { +// if (error != nil) { +// // sign in failed +// } else { +// // sign in succeeded +// // +// // with the GTL library, pass the authentication to the service object, +// // like +// // [[self contactService] setAuthorizer:auth]; +// // +// // or use it to sign a request directly, like +// // BOOL isAuthorizing = [self authorizeRequest:request +// // delegate:self +// // didFinishSelector:@selector(auth:finishedWithError:)]; +// } +// } +// +// To sign in to services other than Google, use the longer init method, +// as shown in the sample application +// +// If the network connection is lost for more than 30 seconds while the sign-in +// html is displayed, the notification kGTLOAuthNetworkLost will be sent. + +#if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES + +#include + +#if !TARGET_OS_IPHONE + +#import +#import + +// GTMHTTPFetcher.h brings in GTLDefines/GDataDefines +#import "GTMHTTPFetcher.h" + +#import "GTMOAuth2SignIn.h" +#import "GTMOAuth2Authentication.h" +#import "GTMHTTPFetchHistory.h" // for GTMCookieStorage + +@class GTMOAuth2SignIn; + +@interface GTMOAuth2WindowController : NSWindowController { + @private + // IBOutlets + NSButton *keychainCheckbox_; + WebView *webView_; + NSButton *webCloseButton_; + NSButton *webBackButton_; + + // the object responsible for the sign-in networking sequence; it holds + // onto the authentication object as well + GTMOAuth2SignIn *signIn_; + + // the page request to load when awakeFromNib occurs + NSURLRequest *initialRequest_; + + // local storage for WebKit cookies so they're not shared with Safari + GTMCookieStorage *cookieStorage_; + + // the user we're calling back + // + // the delegate is retained only until the callback is invoked + // or the sign-in is canceled + id delegate_; + SEL finishedSelector_; + +#if NS_BLOCKS_AVAILABLE + void (^completionBlock_)(GTMOAuth2Authentication *, NSError *); +#elif !__LP64__ + // placeholders: for 32-bit builds, keep the size of the object's ivar section + // the same with and without blocks +#ifndef __clang_analyzer__ + id completionPlaceholder_; +#endif +#endif + + // flag allowing application to quit during display of sign-in sheet on 10.6 + // and later + BOOL shouldAllowApplicationTermination_; + + // delegate method for handling URLs to be opened in external windows + SEL externalRequestSelector_; + + BOOL isWindowShown_; + + // paranoid flag to ensure we only close once during the sign-in sequence + BOOL hasDoneFinalRedirect_; + + // paranoid flag to ensure we only call the user back once + BOOL hasCalledFinished_; + + // if non-nil, we display as a sheet on the specified window + NSWindow *sheetModalForWindow_; + + // if non-empty, the name of the application and service used for the + // keychain item + NSString *keychainItemName_; + + // if non-nil, the html string to be displayed immediately upon opening + // of the web view + NSString *initialHTMLString_; + + // if true, we allow default WebView handling of cookies, so the + // same user remains signed in each time the dialog is displayed + BOOL shouldPersistUser_; + + // user-defined data + id userData_; + NSMutableDictionary *properties_; +} + +// User interface elements +@property (nonatomic, assign) IBOutlet NSButton *keychainCheckbox; +@property (nonatomic, assign) IBOutlet WebView *webView; +@property (nonatomic, assign) IBOutlet NSButton *webCloseButton; +@property (nonatomic, assign) IBOutlet NSButton *webBackButton; + +// The application and service name to use for saving the auth tokens +// to the keychain +@property (nonatomic, copy) NSString *keychainItemName; + +// If true, the sign-in will remember which user was last signed in +// +// Defaults to false, so showing the sign-in window will always ask for +// the username and password, rather than skip to the grant authorization +// page. During development, it may be convenient to set this to true +// to speed up signing in. +@property (nonatomic, assign) BOOL shouldPersistUser; + +// Optional html string displayed immediately upon opening the web view +// +// This string is visible just until the sign-in web page loads, and +// may be used for a "Loading..." type of message +@property (nonatomic, copy) NSString *initialHTMLString; + +// The default timeout for an unreachable network during display of the +// sign-in page is 30 seconds, after which the notification +// kGTLOAuthNetworkLost is sent; set this to 0 to have no timeout +@property (nonatomic, assign) NSTimeInterval networkLossTimeoutInterval; + +// On 10.6 and later, the sheet can allow application termination by calling +// NSWindow's setPreventsApplicationTerminationWhenModal: +@property (nonatomic, assign) BOOL shouldAllowApplicationTermination; + +// Selector for a delegate method to handle requests sent to an external +// browser. +// +// Selector should have a signature matching +// - (void)windowController:(GTMOAuth2WindowController *)controller +// opensRequest:(NSURLRequest *)request; +// +// The controller's default behavior is to use NSWorkspace's openURL: +@property (nonatomic, assign) SEL externalRequestSelector; + +// The underlying object to hold authentication tokens and authorize http +// requests +@property (nonatomic, retain, readonly) GTMOAuth2Authentication *authentication; + +// The underlying object which performs the sign-in networking sequence +@property (nonatomic, retain, readonly) GTMOAuth2SignIn *signIn; + +// Any arbitrary data object the user would like the controller to retain +@property (nonatomic, retain) id userData; + +// Stored property values are retained for the convenience of the caller +- (void)setProperty:(id)obj forKey:(NSString *)key; +- (id)propertyForKey:(NSString *)key; + +@property (nonatomic, retain) NSDictionary *properties; + +- (IBAction)closeWindow:(id)sender; + +// Create a controller for authenticating to Google services +// +// scope is the requested scope of authorization +// (like "http://www.google.com/m8/feeds") +// +// keychainItemName is used for storing the token on the keychain, +// and is required for the "remember for later" checkbox to be shown; +// keychainItemName should be like "My Application: Google Contacts" +// (or set to nil if no persistent keychain storage is desired) +// +// resourceBundle may be nil if the window is in the main bundle's nib +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (id)controllerWithScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret + keychainItemName:(NSString *)keychainItemName // may be nil + resourceBundle:(NSBundle *)bundle; // may be nil + +- (id)initWithScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret + keychainItemName:(NSString *)keychainItemName + resourceBundle:(NSBundle *)bundle; +#endif + +// Create a controller for authenticating to non-Google services, taking +// explicit endpoint URLs and an authentication object ++ (id)controllerWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + keychainItemName:(NSString *)keychainItemName // may be nil + resourceBundle:(NSBundle *)bundle; // may be nil + +// This is the designated initializer +- (id)initWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + keychainItemName:(NSString *)keychainItemName + resourceBundle:(NSBundle *)bundle; + +// Entry point to begin displaying the sign-in window +// +// the finished selector should have a signature matching +// - (void)windowController:(GTMOAuth2WindowController *)windowController +// finishedWithAuth:(GTMOAuth2Authentication *)auth +// error:(NSError *)error { +// +// Once the finished method has been invoked with no error, the auth object +// may be used to authorize requests (refreshing the access token, if necessary, +// and adding the auth header) like: +// +// [authorizer authorizeRequest:myNSMutableURLRequest] +// delegate:self +// didFinishSelector:@selector(auth:finishedWithError:)]; +// +// or can be stored in a GTL service object like +// GTLServiceGoogleContact *service = [self contactService]; +// [service setAuthorizer:auth]; +// +// The delegate is retained only until the finished selector is invoked or +// the sign-in is canceled +- (void)signInSheetModalForWindow:(NSWindow *)parentWindowOrNil + delegate:(id)delegate + finishedSelector:(SEL)finishedSelector; + +#if NS_BLOCKS_AVAILABLE +- (void)signInSheetModalForWindow:(NSWindow *)parentWindowOrNil + completionHandler:(void (^)(GTMOAuth2Authentication *auth, NSError *error))handler; +#endif + +- (void)cancelSigningIn; + +// Subclasses may override authNibName to specify a custom name ++ (NSString *)authNibName; + +// apps may replace the sign-in class with their own subclass of it ++ (Class)signInClass; ++ (void)setSignInClass:(Class)theClass; + +// Revocation of an authorized token from Google +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (void)revokeTokenForGoogleAuthentication:(GTMOAuth2Authentication *)auth; +#endif + +// Keychain +// +// The keychain checkbox is shown if the keychain application service +// name (typically set in the initWithScope: method) is non-empty +// + +// Create an authentication object for Google services from the access +// token and secret stored in the keychain; if no token is available, return +// an unauthorized auth object +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (GTMOAuth2Authentication *)authForGoogleFromKeychainForName:(NSString *)keychainItemName + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret; +#endif + +// Add tokens from the keychain, if available, to the authentication object +// +// returns YES if the authentication object was authorized from the keychain ++ (BOOL)authorizeFromKeychainForName:(NSString *)keychainItemName + authentication:(GTMOAuth2Authentication *)auth; + +// Method for deleting the stored access token and secret, useful for "signing +// out" ++ (BOOL)removeAuthFromKeychainForName:(NSString *)keychainItemName; + +// Method for saving the stored access token and secret; typically, this method +// is used only by the window controller ++ (BOOL)saveAuthToKeychainForName:(NSString *)keychainItemName + authentication:(GTMOAuth2Authentication *)auth; +@end + +#endif // #if !TARGET_OS_IPHONE + +#endif // #if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES diff --git a/GTL/Source/OAuth2/Mac/.svn/text-base/GTMOAuth2WindowController.m.svn-base b/GTL/Source/OAuth2/Mac/.svn/text-base/GTMOAuth2WindowController.m.svn-base new file mode 100644 index 0000000..c0a1c80 --- /dev/null +++ b/GTL/Source/OAuth2/Mac/.svn/text-base/GTMOAuth2WindowController.m.svn-base @@ -0,0 +1,725 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES + +#if !TARGET_OS_IPHONE + +#import "GTMOAuth2WindowController.h" + +@interface GTMOAuth2WindowController () +@property (nonatomic, retain) GTMOAuth2SignIn *signIn; +@property (nonatomic, copy) NSURLRequest *initialRequest; +@property (nonatomic, retain) GTMCookieStorage *cookieStorage; +@property (nonatomic, retain) NSWindow *sheetModalForWindow; + +- (void)signInCommonForWindow:(NSWindow *)parentWindowOrNil; +- (void)setupSheetTerminationHandling; +- (void)destroyWindow; +- (void)handlePrematureWindowClose; +- (BOOL)shouldUseKeychain; +- (void)signIn:(GTMOAuth2SignIn *)signIn displayRequest:(NSURLRequest *)request; +- (void)signIn:(GTMOAuth2SignIn *)signIn finishedWithAuth:(GTMOAuth2Authentication *)auth error:(NSError *)error; +- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo; + +- (void)handleCookiesForResponse:(NSURLResponse *)response; +- (NSURLRequest *)addCookiesToRequest:(NSURLRequest *)request; +@end + +const char *kKeychainAccountName = "OAuth"; + +@implementation GTMOAuth2WindowController + +// IBOutlets +@synthesize keychainCheckbox = keychainCheckbox_, + webView = webView_, + webCloseButton = webCloseButton_, + webBackButton = webBackButton_; + +// regular ivars +@synthesize signIn = signIn_, + initialRequest = initialRequest_, + cookieStorage = cookieStorage_, + sheetModalForWindow = sheetModalForWindow_, + keychainItemName = keychainItemName_, + initialHTMLString = initialHTMLString_, + shouldAllowApplicationTermination = shouldAllowApplicationTermination_, + externalRequestSelector = externalRequestSelector_, + shouldPersistUser = shouldPersistUser_, + userData = userData_, + properties = properties_; + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT +// Create a controller for authenticating to Google services ++ (id)controllerWithScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret + keychainItemName:(NSString *)keychainItemName + resourceBundle:(NSBundle *)bundle { + return [[[self alloc] initWithScope:scope + clientID:clientID + clientSecret:clientSecret + keychainItemName:keychainItemName + resourceBundle:bundle] autorelease]; +} + +- (id)initWithScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret + keychainItemName:(NSString *)keychainItemName + resourceBundle:(NSBundle *)bundle { + Class signInClass = [[self class] signInClass]; + GTMOAuth2Authentication *auth; + auth = [signInClass standardGoogleAuthenticationForScope:scope + clientID:clientID + clientSecret:clientSecret]; + NSURL *authorizationURL = [signInClass googleAuthorizationURL]; + return [self initWithAuthentication:auth + authorizationURL:authorizationURL + keychainItemName:keychainItemName + resourceBundle:bundle]; +} +#endif + +// Create a controller for authenticating to any service ++ (id)controllerWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + keychainItemName:(NSString *)keychainItemName + resourceBundle:(NSBundle *)bundle { + return [[[self alloc] initWithAuthentication:auth + authorizationURL:authorizationURL + keychainItemName:keychainItemName + resourceBundle:bundle] autorelease]; +} + +- (id)initWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + keychainItemName:(NSString *)keychainItemName + resourceBundle:(NSBundle *)bundle { + if (bundle == nil) { + bundle = [NSBundle mainBundle]; + } + + NSString *nibName = [[self class] authNibName]; + NSString *nibPath = [bundle pathForResource:nibName + ofType:@"nib"]; + self = [super initWithWindowNibPath:nibPath + owner:self]; + if (self != nil) { + // use the supplied auth and OAuth endpoint URLs + Class signInClass = [[self class] signInClass]; + signIn_ = [[signInClass alloc] initWithAuthentication:auth + authorizationURL:authorizationURL + delegate:self + webRequestSelector:@selector(signIn:displayRequest:) + finishedSelector:@selector(signIn:finishedWithAuth:error:)]; + keychainItemName_ = [keychainItemName copy]; + + // create local, temporary storage for WebKit cookies + cookieStorage_ = [[GTMCookieStorage alloc] init]; + } + return self; +} + +- (void)dealloc { + [signIn_ release]; + [initialRequest_ release]; + [cookieStorage_ release]; + [delegate_ release]; +#if NS_BLOCKS_AVAILABLE + [completionBlock_ release]; +#endif + [sheetModalForWindow_ release]; + [keychainItemName_ release]; + [initialHTMLString_ release]; + [userData_ release]; + [properties_ release]; + + [super dealloc]; +} + +- (void)awakeFromNib { + // load the requested initial sign-in page + [self.webView setResourceLoadDelegate:self]; + [self.webView setPolicyDelegate:self]; + + // the app may prefer some html other than blank white to be displayed + // before the sign-in web page loads + NSString *html = self.initialHTMLString; + if ([html length] > 0) { + [[self.webView mainFrame] loadHTMLString:html baseURL:nil]; + } + + // hide the keychain checkbox if we're not supporting keychain + BOOL hideKeychainCheckbox = ![self shouldUseKeychain]; + + const NSTimeInterval kJanuary2011 = 1293840000; + BOOL isDateValid = ([[NSDate date] timeIntervalSince1970] > kJanuary2011); + if (isDateValid) { + // start the asynchronous load of the sign-in web page + [[self.webView mainFrame] performSelector:@selector(loadRequest:) + withObject:self.initialRequest + afterDelay:0.01 + inModes:[NSArray arrayWithObject:NSRunLoopCommonModes]]; + } else { + // clock date is invalid, so signing in would fail with an unhelpful error + // from the server. Warn the user in an html string showing a watch icon, + // question mark, and the system date and time. Hopefully this will clue + // in brighter users, or at least let them make a useful screenshot to show + // to developers. + // + // Even better is for apps to check the system clock and show some more + // helpful, localized instructions for users; this is really a fallback. + NSString *const htmlTemplate = @"

" + @"⌚ ?
System Clock Incorrect
%@" + @"
"; + NSString *errHTML = [NSString stringWithFormat:htmlTemplate, [NSDate date]]; + + [[webView_ mainFrame] loadHTMLString:errHTML baseURL:nil]; + hideKeychainCheckbox = YES; + } + +#if DEBUG + // Verify that Javascript is enabled + BOOL hasJS = [[webView_ preferences] isJavaScriptEnabled]; + NSAssert(hasJS, @"GTMOAuth2: Javascript is required"); +#endif + + [keychainCheckbox_ setHidden:hideKeychainCheckbox]; +} + ++ (NSString *)authNibName { + // subclasses may override this to specify a custom nib name + return @"GTMOAuth2Window"; +} + +#pragma mark - + +- (void)signInSheetModalForWindow:(NSWindow *)parentWindowOrNil + delegate:(id)delegate + finishedSelector:(SEL)finishedSelector { + // check the selector on debug builds + GTMAssertSelectorNilOrImplementedWithArgs(delegate, finishedSelector, + @encode(GTMOAuth2WindowController *), @encode(GTMOAuth2Authentication *), + @encode(NSError *), 0); + + delegate_ = [delegate retain]; + finishedSelector_ = finishedSelector; + + [self signInCommonForWindow:parentWindowOrNil]; +} + +#if NS_BLOCKS_AVAILABLE +- (void)signInSheetModalForWindow:(NSWindow *)parentWindowOrNil + completionHandler:(void (^)(GTMOAuth2Authentication *, NSError *))handler { + completionBlock_ = [handler copy]; + + [self signInCommonForWindow:parentWindowOrNil]; +} +#endif + +- (void)signInCommonForWindow:(NSWindow *)parentWindowOrNil { + self.sheetModalForWindow = parentWindowOrNil; + hasDoneFinalRedirect_ = NO; + hasCalledFinished_ = NO; + + [self.signIn startSigningIn]; +} + +- (void)cancelSigningIn { + // The user has explicitly asked us to cancel signing in + // (so no further callback is required) + hasCalledFinished_ = YES; + + [delegate_ autorelease]; + delegate_ = nil; + +#if NS_BLOCKS_AVAILABLE + [completionBlock_ autorelease]; + completionBlock_ = nil; +#endif + + // The signIn object's cancel method will close the window + [self.signIn cancelSigningIn]; + hasDoneFinalRedirect_ = YES; +} + +- (IBAction)closeWindow:(id)sender { + // dismiss the window/sheet before we call back the client + [self destroyWindow]; + [self handlePrematureWindowClose]; +} + +#pragma mark SignIn callbacks + +- (void)signIn:(GTMOAuth2SignIn *)signIn displayRequest:(NSURLRequest *)request { + // this is the signIn object's webRequest method, telling the controller + // to either display the request in the webview, or close the window + // + // All web requests and all window closing goes through this routine + +#if DEBUG + if ((isWindowShown_ && request != nil) + || (!isWindowShown_ && request == nil)) { + NSLog(@"Window state unexpected for request %@", [request URL]); + return; + } +#endif + + if (request != nil) { + // display the request + self.initialRequest = request; + + NSWindow *parentWindow = self.sheetModalForWindow; + if (parentWindow) { + [self setupSheetTerminationHandling]; + + NSWindow *sheet = [self window]; + [NSApp beginSheet:sheet + modalForWindow:parentWindow + modalDelegate:self + didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) + contextInfo:nil]; + } else { + // modeless + [self showWindow:self]; + } + isWindowShown_ = YES; + } else { + // request was nil + [self destroyWindow]; + } +} + +- (void)setupSheetTerminationHandling { + NSWindow *sheet = [self window]; + + SEL sel = @selector(setPreventsApplicationTerminationWhenModal:); + if ([sheet respondsToSelector:sel]) { + // setPreventsApplicationTerminationWhenModal is available in NSWindow + // on 10.6 and later + BOOL boolVal = !self.shouldAllowApplicationTermination; + NSMethodSignature *sig = [sheet methodSignatureForSelector:sel]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; + [invocation setSelector:sel]; + [invocation setTarget:sheet]; + [invocation setArgument:&boolVal atIndex:2]; + [invocation invoke]; + } +} + +- (void)destroyWindow { + // no request; close the window (but not immediately, in case + // we're called in response to some window event) + NSWindow *parentWindow = self.sheetModalForWindow; + if (parentWindow) { + [NSApp endSheet:[self window]]; + } else { + [[self window] performSelector:@selector(close) + withObject:nil + afterDelay:0.1 + inModes:[NSArray arrayWithObject:NSRunLoopCommonModes]]; + + // Avoid more callbacks after the delayed close happens, as the window + // controller may be gone. + [[self webView] setResourceLoadDelegate:nil]; + } + isWindowShown_ = NO; +} + +- (void)handlePrematureWindowClose { + if (!hasDoneFinalRedirect_) { + // tell the sign-in object to tell the user's finished method + // that we're done + [self.signIn windowWasClosed]; + hasDoneFinalRedirect_ = YES; + } +} + +- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { + [sheet orderOut:self]; + + self.sheetModalForWindow = nil; +} + +- (void)signIn:(GTMOAuth2SignIn *)signIn finishedWithAuth:(GTMOAuth2Authentication *)auth error:(NSError *)error { + if (!hasCalledFinished_) { + hasCalledFinished_ = YES; + + if (error == nil) { + BOOL shouldUseKeychain = [self shouldUseKeychain]; + if (shouldUseKeychain) { + BOOL canAuthorize = auth.canAuthorize; + BOOL isKeychainChecked = ([keychainCheckbox_ state] == NSOnState); + + NSString *keychainItemName = self.keychainItemName; + + if (isKeychainChecked && canAuthorize) { + // save the auth params in the keychain + [[self class] saveAuthToKeychainForName:keychainItemName + authentication:auth]; + } else { + // remove the auth params from the keychain + [[self class] removeAuthFromKeychainForName:keychainItemName]; + } + } + } + + if (delegate_ && finishedSelector_) { + SEL sel = finishedSelector_; + NSMethodSignature *sig = [delegate_ methodSignatureForSelector:sel]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; + [invocation setSelector:sel]; + [invocation setTarget:delegate_]; + [invocation setArgument:&self atIndex:2]; + [invocation setArgument:&auth atIndex:3]; + [invocation setArgument:&error atIndex:4]; + [invocation invoke]; + } + + [delegate_ autorelease]; + delegate_ = nil; + +#if NS_BLOCKS_AVAILABLE + if (completionBlock_) { + completionBlock_(auth, error); + + // release the block here to avoid a retain loop on the controller + [completionBlock_ autorelease]; + completionBlock_ = nil; + } +#endif + } +} + +static Class gSignInClass = Nil; + ++ (Class)signInClass { + if (gSignInClass == Nil) { + gSignInClass = [GTMOAuth2SignIn class]; + } + return gSignInClass; +} + ++ (void)setSignInClass:(Class)theClass { + gSignInClass = theClass; +} + +#pragma mark Token Revocation + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (void)revokeTokenForGoogleAuthentication:(GTMOAuth2Authentication *)auth { + [[self signInClass] revokeTokenForGoogleAuthentication:auth]; +} +#endif + +#pragma mark WebView methods + +- (NSURLRequest *)webView:(WebView *)sender resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse fromDataSource:(WebDataSource *)dataSource { + // override WebKit's cookie storage with our own to avoid cookie persistence + // across sign-ins and interaction with the Safari browser's sign-in state + [self handleCookiesForResponse:redirectResponse]; + request = [self addCookiesToRequest:request]; + + if (!hasDoneFinalRedirect_) { + hasDoneFinalRedirect_ = [self.signIn requestRedirectedToRequest:request]; + if (hasDoneFinalRedirect_) { + // signIn has told the window to close + return nil; + } + } + return request; +} + +- (void)webView:(WebView *)sender resource:(id)identifier didReceiveResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)dataSource { + // override WebKit's cookie storage with our own + [self handleCookiesForResponse:response]; +} + +- (void)webView:(WebView *)sender resource:(id)identifier didFinishLoadingFromDataSource:(WebDataSource *)dataSource { + NSString *title = [sender stringByEvaluatingJavaScriptFromString:@"document.title"]; + if ([title length] > 0) { + [self.signIn titleChanged:title]; + } + + [signIn_ cookiesChanged:(NSHTTPCookieStorage *)cookieStorage_]; +} + +- (void)webView:(WebView *)sender resource:(id)identifier didFailLoadingWithError:(NSError *)error fromDataSource:(WebDataSource *)dataSource { + [self.signIn loadFailedWithError:error]; +} + +- (void)windowWillClose:(NSNotification *)note { + if (isWindowShown_) { + [self handlePrematureWindowClose]; + } + isWindowShown_ = NO; +} + +- (void)webView:(WebView *)webView +decidePolicyForNewWindowAction:(NSDictionary *)actionInformation + request:(NSURLRequest *)request + newFrameName:(NSString *)frameName +decisionListener:(id)listener { + SEL sel = self.externalRequestSelector; + if (sel) { + [delegate_ performSelector:sel + withObject:self + withObject:request]; + } else { + // default behavior is to open the URL in NSWorkspace's default browser + NSURL *url = [request URL]; + [[NSWorkspace sharedWorkspace] openURL:url]; + } + [listener ignore]; +} + +#pragma mark Cookie management + +// Rather than let the WebView use Safari's default cookie storage, we intercept +// requests and response to segregate and later discard cookies from signing in. +// +// This allows the application to actually sign out by discarding the auth token +// rather than the user being kept signed in by the cookies. + +- (void)handleCookiesForResponse:(NSURLResponse *)response { + if (self.shouldPersistUser) { + // we'll let WebKit handle the cookies; they'll persist across apps + // and across runs of this app + return; + } + + if ([response respondsToSelector:@selector(allHeaderFields)]) { + // grab the cookies from the header as NSHTTPCookies and store them locally + NSDictionary *headers = [(NSHTTPURLResponse *)response allHeaderFields]; + if (headers) { + NSURL *url = [response URL]; + NSArray *cookies = [NSHTTPCookie cookiesWithResponseHeaderFields:headers + forURL:url]; + if ([cookies count] > 0) { + [cookieStorage_ setCookies:cookies]; + } + } + } +} + +- (NSURLRequest *)addCookiesToRequest:(NSURLRequest *)request { + if (self.shouldPersistUser) { + // we'll let WebKit handle the cookies; they'll persist across apps + // and across runs of this app + return request; + } + + // override WebKit's usual automatic storage of cookies + NSMutableURLRequest *mutableRequest = [[request mutableCopy] autorelease]; + [mutableRequest setHTTPShouldHandleCookies:NO]; + + // add our locally-stored cookies for this URL, if any + NSArray *cookies = [cookieStorage_ cookiesForURL:[request URL]]; + if ([cookies count] > 0) { + NSDictionary *headers = [NSHTTPCookie requestHeaderFieldsWithCookies:cookies]; + NSString *cookieHeader = [headers objectForKey:@"Cookie"]; + if (cookieHeader) { + [mutableRequest setValue:cookieHeader forHTTPHeaderField:@"Cookie"]; + } + } + return mutableRequest; +} + +#pragma mark Keychain support + ++ (NSString *)prefsKeyForName:(NSString *)keychainItemName { + NSString *result = [@"OAuth2: " stringByAppendingString:keychainItemName]; + return result; +} + ++ (BOOL)saveAuthToKeychainForName:(NSString *)keychainItemName + authentication:(GTMOAuth2Authentication *)auth { + + [self removeAuthFromKeychainForName:keychainItemName]; + + // don't save unless we have a token that can really authorize requests + if (!auth.canAuthorize) return NO; + + // make a response string containing the values we want to save + NSString *password = [auth persistenceResponseString]; + + SecKeychainRef defaultKeychain = NULL; + SecKeychainItemRef *dontWantItemRef= NULL; + const char *utf8ServiceName = [keychainItemName UTF8String]; + const char *utf8Password = [password UTF8String]; + + OSStatus err = SecKeychainAddGenericPassword(defaultKeychain, + (UInt32) strlen(utf8ServiceName), utf8ServiceName, + (UInt32) strlen(kKeychainAccountName), kKeychainAccountName, + (UInt32) strlen(utf8Password), utf8Password, + dontWantItemRef); + BOOL didSucceed = (err == noErr); + if (didSucceed) { + // write to preferences that we have a keychain item (so we know later + // that we can read from the keychain without raising a permissions dialog) + NSString *prefKey = [self prefsKeyForName:keychainItemName]; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults setBool:YES forKey:prefKey]; + } + + return didSucceed; +} + ++ (BOOL)removeAuthFromKeychainForName:(NSString *)keychainItemName { + + SecKeychainRef defaultKeychain = NULL; + SecKeychainItemRef itemRef = NULL; + const char *utf8ServiceName = [keychainItemName UTF8String]; + + // we don't really care about the password here, we just want to + // get the SecKeychainItemRef so we can delete it. + OSStatus err = SecKeychainFindGenericPassword (defaultKeychain, + (UInt32) strlen(utf8ServiceName), utf8ServiceName, + (UInt32) strlen(kKeychainAccountName), kKeychainAccountName, + 0, NULL, // ignore password + &itemRef); + if (err != noErr) { + // failure to find is success + return YES; + } else { + // found something, so delete it + err = SecKeychainItemDelete(itemRef); + CFRelease(itemRef); + + // remove our preference key + NSString *prefKey = [self prefsKeyForName:keychainItemName]; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults removeObjectForKey:prefKey]; + + return (err == noErr); + } +} + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (GTMOAuth2Authentication *)authForGoogleFromKeychainForName:(NSString *)keychainItemName + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret { + Class signInClass = [self signInClass]; + NSURL *tokenURL = [signInClass googleTokenURL]; + NSString *redirectURI = [signInClass nativeClientRedirectURI]; + + GTMOAuth2Authentication *auth; + auth = [GTMOAuth2Authentication authenticationWithServiceProvider:kGTMOAuth2ServiceProviderGoogle + tokenURL:tokenURL + redirectURI:redirectURI + clientID:clientID + clientSecret:clientSecret]; + + [GTMOAuth2WindowController authorizeFromKeychainForName:keychainItemName + authentication:auth]; + return auth; +} +#endif + ++ (BOOL)authorizeFromKeychainForName:(NSString *)keychainItemName + authentication:(GTMOAuth2Authentication *)newAuth { + [newAuth setAccessToken:nil]; + + // before accessing the keychain, check preferences to verify that we've + // previously saved a token to the keychain (so we don't needlessly raise + // a keychain access permission dialog) + NSString *prefKey = [self prefsKeyForName:keychainItemName]; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + BOOL flag = [defaults boolForKey:prefKey]; + if (!flag) { + return NO; + } + + BOOL didGetTokens = NO; + + SecKeychainRef defaultKeychain = NULL; + const char *utf8ServiceName = [keychainItemName UTF8String]; + SecKeychainItemRef *dontWantItemRef = NULL; + + void *passwordBuff = NULL; + UInt32 passwordBuffLength = 0; + + OSStatus err = SecKeychainFindGenericPassword(defaultKeychain, + (UInt32) strlen(utf8ServiceName), utf8ServiceName, + (UInt32) strlen(kKeychainAccountName), kKeychainAccountName, + &passwordBuffLength, &passwordBuff, + dontWantItemRef); + if (err == noErr && passwordBuff != NULL) { + + NSString *password = [[[NSString alloc] initWithBytes:passwordBuff + length:passwordBuffLength + encoding:NSUTF8StringEncoding] autorelease]; + + // free the password buffer that was allocated above + SecKeychainItemFreeContent(NULL, passwordBuff); + + if (password != nil) { + [newAuth setKeysForResponseString:password]; + didGetTokens = YES; + } + } + return didGetTokens; +} + +#pragma mark User Properties + +- (void)setProperty:(id)obj forKey:(NSString *)key { + if (obj == nil) { + // User passed in nil, so delete the property + [properties_ removeObjectForKey:key]; + } else { + // Be sure the property dictionary exists + if (properties_ == nil) { + [self setProperties:[NSMutableDictionary dictionary]]; + } + [properties_ setObject:obj forKey:key]; + } +} + +- (id)propertyForKey:(NSString *)key { + id obj = [properties_ objectForKey:key]; + + // Be sure the returned pointer has the life of the autorelease pool, + // in case self is released immediately + return [[obj retain] autorelease]; +} + +#pragma mark Accessors + +- (GTMOAuth2Authentication *)authentication { + return self.signIn.authentication; +} + +- (void)setNetworkLossTimeoutInterval:(NSTimeInterval)val { + self.signIn.networkLossTimeoutInterval = val; +} + +- (NSTimeInterval)networkLossTimeoutInterval { + return self.signIn.networkLossTimeoutInterval; +} + +- (BOOL)shouldUseKeychain { + NSString *name = self.keychainItemName; + return ([name length] > 0); +} + +@end + +#endif // #if !TARGET_OS_IPHONE + +#endif // #if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES diff --git a/GTL/Source/OAuth2/Mac/GTMOAuth2Framework-Info.plist b/GTL/Source/OAuth2/Mac/GTMOAuth2Framework-Info.plist new file mode 100644 index 0000000..4433570 --- /dev/null +++ b/GTL/Source/OAuth2/Mac/GTMOAuth2Framework-Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.google.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/GTL/Source/OAuth2/Mac/GTMOAuth2Window.xib b/GTL/Source/OAuth2/Mac/GTMOAuth2Window.xib new file mode 100644 index 0000000..096ff76 --- /dev/null +++ b/GTL/Source/OAuth2/Mac/GTMOAuth2Window.xib @@ -0,0 +1,657 @@ + + + + 1050 + 10J869 + 851 + 1038.35 + 461.00 + + YES + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.WebKitIBPlugin + + + YES + 851 + 851 + + + + YES + + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.WebKitIBPlugin + + + YES + + YES + + + YES + + + + YES + + GTMOAuth2WindowController + + + FirstResponder + + + NSApplication + + + 11 + 2 + {{74, 707}, {515, 419}} + 536870912 + Sign In + NSWindow + + {1.79769e+308, 1.79769e+308} + {475, 290} + + + 256 + + YES + + + 274 + + YES + + YES + Apple HTML pasteboard type + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple URL pasteboard type + Apple Web Archive pasteboard type + NSColor pasteboard type + NSFilenamesPboardType + NSStringPboardType + NeXT RTFD pasteboard type + NeXT Rich Text Format v1.0 pasteboard type + NeXT TIFF v4.0 pasteboard type + WebURLsWithTitlesPboardType + public.png + public.url + public.url-name + + + {{0, 20}, {515, 399}} + + + + + + + + YES + + YES + WebKitDefaultFixedFontSize + WebKitDefaultFontSize + WebKitMinimumFontSize + + + YES + + + + + + + YES + YES + + + + 289 + {{479, 0}, {16, 19}} + + YES + + 67239424 + 134217728 + + + LucidaGrande + 13 + 1044 + + + -2041822977 + 134 + + NSImage + NSStopProgressTemplate + + + Gw + 400 + 75 + + + + + 289 + {{437, 0}, {16, 19}} + + YES + + 67239424 + 134217728 + + + + -2041822977 + 134 + + NSImage + NSGoLeftTemplate + + + + 400 + 75 + + + + + 289 + {{456, 0}, {16, 19}} + + YES + + 67239424 + 134217728 + + + + -2042347265 + 134 + + NSImage + NSGoRightTemplate + + + + 400 + 75 + + + + + 292 + {{2, 1}, {429, 18}} + + YES + + -2080244224 + 131072 + Stay signed in to this account + + LucidaGrande + 11 + 3100 + + + 1211912703 + 2 + + NSImage + NSSwitch + + + NSSwitch + + + + 200 + 25 + + + + {515, 419} + + + {{0, 0}, {1920, 1178}} + {475, 312} + {1.79769e+308, 1.79769e+308} + + + YES + + + + + YES + + + delegate + + + + 7 + + + + window + + + + 8 + + + + goBack: + + + + 28 + + + + goForward: + + + + 29 + + + + enabled: webView.canGoBack + + + + + + enabled: webView.canGoBack + enabled + webView.canGoBack + 2 + + + 31 + + + + enabled: webView.canGoForward + + + + + + enabled: webView.canGoForward + enabled + webView.canGoForward + 2 + + + 35 + + + + closeWindow: + + + + 42 + + + + keychainCheckbox + + + + 46 + + + + webBackButton + + + + 47 + + + + webCloseButton + + + + 48 + + + + webView + + + + 49 + + + + + YES + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 3 + + + YES + + + + + + 4 + + + YES + + + + + + + + + + 5 + + + + + 17 + + + YES + + + + + + 18 + + + + + 19 + + + YES + + + + + + 20 + + + + + 26 + + + YES + + + + + + 27 + + + + + 32 + + + + + 43 + + + YES + + + + + + 44 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 17.IBPluginDependency + 18.IBPluginDependency + 19.IBPluginDependency + 20.IBPluginDependency + 26.IBPluginDependency + 27.IBPluginDependency + 3.IBEditorWindowLastContentRect + 3.IBPluginDependency + 3.IBViewEditorWindowController.showingLayoutRectangles + 3.IBWindowTemplateEditedContentRect + 3.NSWindowTemplate.visibleAtLaunch + 3.WindowOrigin + 3.editorWindowContentRectSynchronizationRect + 3.windowTemplate.hasMinSize + 3.windowTemplate.minSize + 4.IBPluginDependency + 43.IBPluginDependency + 44.IBPluginDependency + 5.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{112, 709}, {515, 419}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{112, 709}, {515, 419}} + + {196, 240} + {{357, 418}, {480, 270}} + + {475, 290} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.WebKitIBPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 49 + + + + YES + + GTMOAuth2WindowController + NSWindowController + + closeWindow: + id + + + closeWindow: + + closeWindow: + id + + + + YES + + YES + completionPlaceholder_ + delegate_ + keychainCheckbox + userData_ + webBackButton + webCloseButton + webView + + + YES + id + id + NSButton + id + NSButton + NSButton + WebView + + + + YES + + YES + completionPlaceholder_ + delegate_ + keychainCheckbox + userData_ + webBackButton + webCloseButton + webView + + + YES + + completionPlaceholder_ + id + + + delegate_ + id + + + keychainCheckbox + NSButton + + + userData_ + id + + + webBackButton + NSButton + + + webCloseButton + NSButton + + + webView + WebView + + + + + IBProjectSource + Mac/GTMOAuth2WindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../GTMOAuth.xcodeproj + 3 + + YES + + YES + NSGoLeftTemplate + NSGoRightTemplate + NSStopProgressTemplate + NSSwitch + + + YES + {9, 9} + {9, 9} + {11, 11} + {15, 15} + + + + diff --git a/GTL/Source/OAuth2/Mac/GTMOAuth2WindowController.h b/GTL/Source/OAuth2/Mac/GTMOAuth2WindowController.h new file mode 100644 index 0000000..9ff89b7 --- /dev/null +++ b/GTL/Source/OAuth2/Mac/GTMOAuth2WindowController.h @@ -0,0 +1,332 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// GTMOAuth2WindowController +// +// This window controller for Mac handles sign-in via OAuth2 to Google or +// other services. +// +// This controller is not reusable; create a new instance of this controller +// every time the user will sign in. +// +// Sample usage for signing in to a Google service: +// +// static NSString *const kKeychainItemName = @”My App: Google Plus”; +// NSString *scope = @"https://www.googleapis.com/auth/plus.me"; +// +// +// GTMOAuth2WindowController *windowController; +// windowController = [[[GTMOAuth2WindowController alloc] initWithScope:scope +// clientID:clientID +// clientSecret:clientSecret +// keychainItemName:kKeychainItemName +// resourceBundle:nil] autorelease]; +// +// [windowController signInSheetModalForWindow:mMainWindow +// delegate:self +// finishedSelector:@selector(windowController:finishedWithAuth:error:)]; +// +// The finished selector should have a signature matching this: +// +// - (void)windowController:(GTMOAuth2WindowController *)windowController +// finishedWithAuth:(GTMOAuth2Authentication *)auth +// error:(NSError *)error { +// if (error != nil) { +// // sign in failed +// } else { +// // sign in succeeded +// // +// // with the GTL library, pass the authentication to the service object, +// // like +// // [[self contactService] setAuthorizer:auth]; +// // +// // or use it to sign a request directly, like +// // BOOL isAuthorizing = [self authorizeRequest:request +// // delegate:self +// // didFinishSelector:@selector(auth:finishedWithError:)]; +// } +// } +// +// To sign in to services other than Google, use the longer init method, +// as shown in the sample application +// +// If the network connection is lost for more than 30 seconds while the sign-in +// html is displayed, the notification kGTLOAuthNetworkLost will be sent. + +#if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES + +#include + +#if !TARGET_OS_IPHONE + +#import +#import + +// GTMHTTPFetcher.h brings in GTLDefines/GDataDefines +#import "GTMHTTPFetcher.h" + +#import "GTMOAuth2SignIn.h" +#import "GTMOAuth2Authentication.h" +#import "GTMHTTPFetchHistory.h" // for GTMCookieStorage + +@class GTMOAuth2SignIn; + +@interface GTMOAuth2WindowController : NSWindowController { + @private + // IBOutlets + NSButton *keychainCheckbox_; + WebView *webView_; + NSButton *webCloseButton_; + NSButton *webBackButton_; + + // the object responsible for the sign-in networking sequence; it holds + // onto the authentication object as well + GTMOAuth2SignIn *signIn_; + + // the page request to load when awakeFromNib occurs + NSURLRequest *initialRequest_; + + // local storage for WebKit cookies so they're not shared with Safari + GTMCookieStorage *cookieStorage_; + + // the user we're calling back + // + // the delegate is retained only until the callback is invoked + // or the sign-in is canceled + id delegate_; + SEL finishedSelector_; + +#if NS_BLOCKS_AVAILABLE + void (^completionBlock_)(GTMOAuth2Authentication *, NSError *); +#elif !__LP64__ + // placeholders: for 32-bit builds, keep the size of the object's ivar section + // the same with and without blocks +#ifndef __clang_analyzer__ + id completionPlaceholder_; +#endif +#endif + + // flag allowing application to quit during display of sign-in sheet on 10.6 + // and later + BOOL shouldAllowApplicationTermination_; + + // delegate method for handling URLs to be opened in external windows + SEL externalRequestSelector_; + + BOOL isWindowShown_; + + // paranoid flag to ensure we only close once during the sign-in sequence + BOOL hasDoneFinalRedirect_; + + // paranoid flag to ensure we only call the user back once + BOOL hasCalledFinished_; + + // if non-nil, we display as a sheet on the specified window + NSWindow *sheetModalForWindow_; + + // if non-empty, the name of the application and service used for the + // keychain item + NSString *keychainItemName_; + + // if non-nil, the html string to be displayed immediately upon opening + // of the web view + NSString *initialHTMLString_; + + // if true, we allow default WebView handling of cookies, so the + // same user remains signed in each time the dialog is displayed + BOOL shouldPersistUser_; + + // user-defined data + id userData_; + NSMutableDictionary *properties_; +} + +// User interface elements +@property (nonatomic, assign) IBOutlet NSButton *keychainCheckbox; +@property (nonatomic, assign) IBOutlet WebView *webView; +@property (nonatomic, assign) IBOutlet NSButton *webCloseButton; +@property (nonatomic, assign) IBOutlet NSButton *webBackButton; + +// The application and service name to use for saving the auth tokens +// to the keychain +@property (nonatomic, copy) NSString *keychainItemName; + +// If true, the sign-in will remember which user was last signed in +// +// Defaults to false, so showing the sign-in window will always ask for +// the username and password, rather than skip to the grant authorization +// page. During development, it may be convenient to set this to true +// to speed up signing in. +@property (nonatomic, assign) BOOL shouldPersistUser; + +// Optional html string displayed immediately upon opening the web view +// +// This string is visible just until the sign-in web page loads, and +// may be used for a "Loading..." type of message +@property (nonatomic, copy) NSString *initialHTMLString; + +// The default timeout for an unreachable network during display of the +// sign-in page is 30 seconds, after which the notification +// kGTLOAuthNetworkLost is sent; set this to 0 to have no timeout +@property (nonatomic, assign) NSTimeInterval networkLossTimeoutInterval; + +// On 10.6 and later, the sheet can allow application termination by calling +// NSWindow's setPreventsApplicationTerminationWhenModal: +@property (nonatomic, assign) BOOL shouldAllowApplicationTermination; + +// Selector for a delegate method to handle requests sent to an external +// browser. +// +// Selector should have a signature matching +// - (void)windowController:(GTMOAuth2WindowController *)controller +// opensRequest:(NSURLRequest *)request; +// +// The controller's default behavior is to use NSWorkspace's openURL: +@property (nonatomic, assign) SEL externalRequestSelector; + +// The underlying object to hold authentication tokens and authorize http +// requests +@property (nonatomic, retain, readonly) GTMOAuth2Authentication *authentication; + +// The underlying object which performs the sign-in networking sequence +@property (nonatomic, retain, readonly) GTMOAuth2SignIn *signIn; + +// Any arbitrary data object the user would like the controller to retain +@property (nonatomic, retain) id userData; + +// Stored property values are retained for the convenience of the caller +- (void)setProperty:(id)obj forKey:(NSString *)key; +- (id)propertyForKey:(NSString *)key; + +@property (nonatomic, retain) NSDictionary *properties; + +- (IBAction)closeWindow:(id)sender; + +// Create a controller for authenticating to Google services +// +// scope is the requested scope of authorization +// (like "http://www.google.com/m8/feeds") +// +// keychainItemName is used for storing the token on the keychain, +// and is required for the "remember for later" checkbox to be shown; +// keychainItemName should be like "My Application: Google Contacts" +// (or set to nil if no persistent keychain storage is desired) +// +// resourceBundle may be nil if the window is in the main bundle's nib +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (id)controllerWithScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret + keychainItemName:(NSString *)keychainItemName // may be nil + resourceBundle:(NSBundle *)bundle; // may be nil + +- (id)initWithScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret + keychainItemName:(NSString *)keychainItemName + resourceBundle:(NSBundle *)bundle; +#endif + +// Create a controller for authenticating to non-Google services, taking +// explicit endpoint URLs and an authentication object ++ (id)controllerWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + keychainItemName:(NSString *)keychainItemName // may be nil + resourceBundle:(NSBundle *)bundle; // may be nil + +// This is the designated initializer +- (id)initWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + keychainItemName:(NSString *)keychainItemName + resourceBundle:(NSBundle *)bundle; + +// Entry point to begin displaying the sign-in window +// +// the finished selector should have a signature matching +// - (void)windowController:(GTMOAuth2WindowController *)windowController +// finishedWithAuth:(GTMOAuth2Authentication *)auth +// error:(NSError *)error { +// +// Once the finished method has been invoked with no error, the auth object +// may be used to authorize requests (refreshing the access token, if necessary, +// and adding the auth header) like: +// +// [authorizer authorizeRequest:myNSMutableURLRequest] +// delegate:self +// didFinishSelector:@selector(auth:finishedWithError:)]; +// +// or can be stored in a GTL service object like +// GTLServiceGoogleContact *service = [self contactService]; +// [service setAuthorizer:auth]; +// +// The delegate is retained only until the finished selector is invoked or +// the sign-in is canceled +- (void)signInSheetModalForWindow:(NSWindow *)parentWindowOrNil + delegate:(id)delegate + finishedSelector:(SEL)finishedSelector; + +#if NS_BLOCKS_AVAILABLE +- (void)signInSheetModalForWindow:(NSWindow *)parentWindowOrNil + completionHandler:(void (^)(GTMOAuth2Authentication *auth, NSError *error))handler; +#endif + +- (void)cancelSigningIn; + +// Subclasses may override authNibName to specify a custom name ++ (NSString *)authNibName; + +// apps may replace the sign-in class with their own subclass of it ++ (Class)signInClass; ++ (void)setSignInClass:(Class)theClass; + +// Revocation of an authorized token from Google +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (void)revokeTokenForGoogleAuthentication:(GTMOAuth2Authentication *)auth; +#endif + +// Keychain +// +// The keychain checkbox is shown if the keychain application service +// name (typically set in the initWithScope: method) is non-empty +// + +// Create an authentication object for Google services from the access +// token and secret stored in the keychain; if no token is available, return +// an unauthorized auth object +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (GTMOAuth2Authentication *)authForGoogleFromKeychainForName:(NSString *)keychainItemName + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret; +#endif + +// Add tokens from the keychain, if available, to the authentication object +// +// returns YES if the authentication object was authorized from the keychain ++ (BOOL)authorizeFromKeychainForName:(NSString *)keychainItemName + authentication:(GTMOAuth2Authentication *)auth; + +// Method for deleting the stored access token and secret, useful for "signing +// out" ++ (BOOL)removeAuthFromKeychainForName:(NSString *)keychainItemName; + +// Method for saving the stored access token and secret; typically, this method +// is used only by the window controller ++ (BOOL)saveAuthToKeychainForName:(NSString *)keychainItemName + authentication:(GTMOAuth2Authentication *)auth; +@end + +#endif // #if !TARGET_OS_IPHONE + +#endif // #if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES diff --git a/GTL/Source/OAuth2/Mac/GTMOAuth2WindowController.m b/GTL/Source/OAuth2/Mac/GTMOAuth2WindowController.m new file mode 100644 index 0000000..c0a1c80 --- /dev/null +++ b/GTL/Source/OAuth2/Mac/GTMOAuth2WindowController.m @@ -0,0 +1,725 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES + +#if !TARGET_OS_IPHONE + +#import "GTMOAuth2WindowController.h" + +@interface GTMOAuth2WindowController () +@property (nonatomic, retain) GTMOAuth2SignIn *signIn; +@property (nonatomic, copy) NSURLRequest *initialRequest; +@property (nonatomic, retain) GTMCookieStorage *cookieStorage; +@property (nonatomic, retain) NSWindow *sheetModalForWindow; + +- (void)signInCommonForWindow:(NSWindow *)parentWindowOrNil; +- (void)setupSheetTerminationHandling; +- (void)destroyWindow; +- (void)handlePrematureWindowClose; +- (BOOL)shouldUseKeychain; +- (void)signIn:(GTMOAuth2SignIn *)signIn displayRequest:(NSURLRequest *)request; +- (void)signIn:(GTMOAuth2SignIn *)signIn finishedWithAuth:(GTMOAuth2Authentication *)auth error:(NSError *)error; +- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo; + +- (void)handleCookiesForResponse:(NSURLResponse *)response; +- (NSURLRequest *)addCookiesToRequest:(NSURLRequest *)request; +@end + +const char *kKeychainAccountName = "OAuth"; + +@implementation GTMOAuth2WindowController + +// IBOutlets +@synthesize keychainCheckbox = keychainCheckbox_, + webView = webView_, + webCloseButton = webCloseButton_, + webBackButton = webBackButton_; + +// regular ivars +@synthesize signIn = signIn_, + initialRequest = initialRequest_, + cookieStorage = cookieStorage_, + sheetModalForWindow = sheetModalForWindow_, + keychainItemName = keychainItemName_, + initialHTMLString = initialHTMLString_, + shouldAllowApplicationTermination = shouldAllowApplicationTermination_, + externalRequestSelector = externalRequestSelector_, + shouldPersistUser = shouldPersistUser_, + userData = userData_, + properties = properties_; + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT +// Create a controller for authenticating to Google services ++ (id)controllerWithScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret + keychainItemName:(NSString *)keychainItemName + resourceBundle:(NSBundle *)bundle { + return [[[self alloc] initWithScope:scope + clientID:clientID + clientSecret:clientSecret + keychainItemName:keychainItemName + resourceBundle:bundle] autorelease]; +} + +- (id)initWithScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret + keychainItemName:(NSString *)keychainItemName + resourceBundle:(NSBundle *)bundle { + Class signInClass = [[self class] signInClass]; + GTMOAuth2Authentication *auth; + auth = [signInClass standardGoogleAuthenticationForScope:scope + clientID:clientID + clientSecret:clientSecret]; + NSURL *authorizationURL = [signInClass googleAuthorizationURL]; + return [self initWithAuthentication:auth + authorizationURL:authorizationURL + keychainItemName:keychainItemName + resourceBundle:bundle]; +} +#endif + +// Create a controller for authenticating to any service ++ (id)controllerWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + keychainItemName:(NSString *)keychainItemName + resourceBundle:(NSBundle *)bundle { + return [[[self alloc] initWithAuthentication:auth + authorizationURL:authorizationURL + keychainItemName:keychainItemName + resourceBundle:bundle] autorelease]; +} + +- (id)initWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + keychainItemName:(NSString *)keychainItemName + resourceBundle:(NSBundle *)bundle { + if (bundle == nil) { + bundle = [NSBundle mainBundle]; + } + + NSString *nibName = [[self class] authNibName]; + NSString *nibPath = [bundle pathForResource:nibName + ofType:@"nib"]; + self = [super initWithWindowNibPath:nibPath + owner:self]; + if (self != nil) { + // use the supplied auth and OAuth endpoint URLs + Class signInClass = [[self class] signInClass]; + signIn_ = [[signInClass alloc] initWithAuthentication:auth + authorizationURL:authorizationURL + delegate:self + webRequestSelector:@selector(signIn:displayRequest:) + finishedSelector:@selector(signIn:finishedWithAuth:error:)]; + keychainItemName_ = [keychainItemName copy]; + + // create local, temporary storage for WebKit cookies + cookieStorage_ = [[GTMCookieStorage alloc] init]; + } + return self; +} + +- (void)dealloc { + [signIn_ release]; + [initialRequest_ release]; + [cookieStorage_ release]; + [delegate_ release]; +#if NS_BLOCKS_AVAILABLE + [completionBlock_ release]; +#endif + [sheetModalForWindow_ release]; + [keychainItemName_ release]; + [initialHTMLString_ release]; + [userData_ release]; + [properties_ release]; + + [super dealloc]; +} + +- (void)awakeFromNib { + // load the requested initial sign-in page + [self.webView setResourceLoadDelegate:self]; + [self.webView setPolicyDelegate:self]; + + // the app may prefer some html other than blank white to be displayed + // before the sign-in web page loads + NSString *html = self.initialHTMLString; + if ([html length] > 0) { + [[self.webView mainFrame] loadHTMLString:html baseURL:nil]; + } + + // hide the keychain checkbox if we're not supporting keychain + BOOL hideKeychainCheckbox = ![self shouldUseKeychain]; + + const NSTimeInterval kJanuary2011 = 1293840000; + BOOL isDateValid = ([[NSDate date] timeIntervalSince1970] > kJanuary2011); + if (isDateValid) { + // start the asynchronous load of the sign-in web page + [[self.webView mainFrame] performSelector:@selector(loadRequest:) + withObject:self.initialRequest + afterDelay:0.01 + inModes:[NSArray arrayWithObject:NSRunLoopCommonModes]]; + } else { + // clock date is invalid, so signing in would fail with an unhelpful error + // from the server. Warn the user in an html string showing a watch icon, + // question mark, and the system date and time. Hopefully this will clue + // in brighter users, or at least let them make a useful screenshot to show + // to developers. + // + // Even better is for apps to check the system clock and show some more + // helpful, localized instructions for users; this is really a fallback. + NSString *const htmlTemplate = @"
" + @"⌚ ?
System Clock Incorrect
%@" + @"
"; + NSString *errHTML = [NSString stringWithFormat:htmlTemplate, [NSDate date]]; + + [[webView_ mainFrame] loadHTMLString:errHTML baseURL:nil]; + hideKeychainCheckbox = YES; + } + +#if DEBUG + // Verify that Javascript is enabled + BOOL hasJS = [[webView_ preferences] isJavaScriptEnabled]; + NSAssert(hasJS, @"GTMOAuth2: Javascript is required"); +#endif + + [keychainCheckbox_ setHidden:hideKeychainCheckbox]; +} + ++ (NSString *)authNibName { + // subclasses may override this to specify a custom nib name + return @"GTMOAuth2Window"; +} + +#pragma mark - + +- (void)signInSheetModalForWindow:(NSWindow *)parentWindowOrNil + delegate:(id)delegate + finishedSelector:(SEL)finishedSelector { + // check the selector on debug builds + GTMAssertSelectorNilOrImplementedWithArgs(delegate, finishedSelector, + @encode(GTMOAuth2WindowController *), @encode(GTMOAuth2Authentication *), + @encode(NSError *), 0); + + delegate_ = [delegate retain]; + finishedSelector_ = finishedSelector; + + [self signInCommonForWindow:parentWindowOrNil]; +} + +#if NS_BLOCKS_AVAILABLE +- (void)signInSheetModalForWindow:(NSWindow *)parentWindowOrNil + completionHandler:(void (^)(GTMOAuth2Authentication *, NSError *))handler { + completionBlock_ = [handler copy]; + + [self signInCommonForWindow:parentWindowOrNil]; +} +#endif + +- (void)signInCommonForWindow:(NSWindow *)parentWindowOrNil { + self.sheetModalForWindow = parentWindowOrNil; + hasDoneFinalRedirect_ = NO; + hasCalledFinished_ = NO; + + [self.signIn startSigningIn]; +} + +- (void)cancelSigningIn { + // The user has explicitly asked us to cancel signing in + // (so no further callback is required) + hasCalledFinished_ = YES; + + [delegate_ autorelease]; + delegate_ = nil; + +#if NS_BLOCKS_AVAILABLE + [completionBlock_ autorelease]; + completionBlock_ = nil; +#endif + + // The signIn object's cancel method will close the window + [self.signIn cancelSigningIn]; + hasDoneFinalRedirect_ = YES; +} + +- (IBAction)closeWindow:(id)sender { + // dismiss the window/sheet before we call back the client + [self destroyWindow]; + [self handlePrematureWindowClose]; +} + +#pragma mark SignIn callbacks + +- (void)signIn:(GTMOAuth2SignIn *)signIn displayRequest:(NSURLRequest *)request { + // this is the signIn object's webRequest method, telling the controller + // to either display the request in the webview, or close the window + // + // All web requests and all window closing goes through this routine + +#if DEBUG + if ((isWindowShown_ && request != nil) + || (!isWindowShown_ && request == nil)) { + NSLog(@"Window state unexpected for request %@", [request URL]); + return; + } +#endif + + if (request != nil) { + // display the request + self.initialRequest = request; + + NSWindow *parentWindow = self.sheetModalForWindow; + if (parentWindow) { + [self setupSheetTerminationHandling]; + + NSWindow *sheet = [self window]; + [NSApp beginSheet:sheet + modalForWindow:parentWindow + modalDelegate:self + didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) + contextInfo:nil]; + } else { + // modeless + [self showWindow:self]; + } + isWindowShown_ = YES; + } else { + // request was nil + [self destroyWindow]; + } +} + +- (void)setupSheetTerminationHandling { + NSWindow *sheet = [self window]; + + SEL sel = @selector(setPreventsApplicationTerminationWhenModal:); + if ([sheet respondsToSelector:sel]) { + // setPreventsApplicationTerminationWhenModal is available in NSWindow + // on 10.6 and later + BOOL boolVal = !self.shouldAllowApplicationTermination; + NSMethodSignature *sig = [sheet methodSignatureForSelector:sel]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; + [invocation setSelector:sel]; + [invocation setTarget:sheet]; + [invocation setArgument:&boolVal atIndex:2]; + [invocation invoke]; + } +} + +- (void)destroyWindow { + // no request; close the window (but not immediately, in case + // we're called in response to some window event) + NSWindow *parentWindow = self.sheetModalForWindow; + if (parentWindow) { + [NSApp endSheet:[self window]]; + } else { + [[self window] performSelector:@selector(close) + withObject:nil + afterDelay:0.1 + inModes:[NSArray arrayWithObject:NSRunLoopCommonModes]]; + + // Avoid more callbacks after the delayed close happens, as the window + // controller may be gone. + [[self webView] setResourceLoadDelegate:nil]; + } + isWindowShown_ = NO; +} + +- (void)handlePrematureWindowClose { + if (!hasDoneFinalRedirect_) { + // tell the sign-in object to tell the user's finished method + // that we're done + [self.signIn windowWasClosed]; + hasDoneFinalRedirect_ = YES; + } +} + +- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { + [sheet orderOut:self]; + + self.sheetModalForWindow = nil; +} + +- (void)signIn:(GTMOAuth2SignIn *)signIn finishedWithAuth:(GTMOAuth2Authentication *)auth error:(NSError *)error { + if (!hasCalledFinished_) { + hasCalledFinished_ = YES; + + if (error == nil) { + BOOL shouldUseKeychain = [self shouldUseKeychain]; + if (shouldUseKeychain) { + BOOL canAuthorize = auth.canAuthorize; + BOOL isKeychainChecked = ([keychainCheckbox_ state] == NSOnState); + + NSString *keychainItemName = self.keychainItemName; + + if (isKeychainChecked && canAuthorize) { + // save the auth params in the keychain + [[self class] saveAuthToKeychainForName:keychainItemName + authentication:auth]; + } else { + // remove the auth params from the keychain + [[self class] removeAuthFromKeychainForName:keychainItemName]; + } + } + } + + if (delegate_ && finishedSelector_) { + SEL sel = finishedSelector_; + NSMethodSignature *sig = [delegate_ methodSignatureForSelector:sel]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; + [invocation setSelector:sel]; + [invocation setTarget:delegate_]; + [invocation setArgument:&self atIndex:2]; + [invocation setArgument:&auth atIndex:3]; + [invocation setArgument:&error atIndex:4]; + [invocation invoke]; + } + + [delegate_ autorelease]; + delegate_ = nil; + +#if NS_BLOCKS_AVAILABLE + if (completionBlock_) { + completionBlock_(auth, error); + + // release the block here to avoid a retain loop on the controller + [completionBlock_ autorelease]; + completionBlock_ = nil; + } +#endif + } +} + +static Class gSignInClass = Nil; + ++ (Class)signInClass { + if (gSignInClass == Nil) { + gSignInClass = [GTMOAuth2SignIn class]; + } + return gSignInClass; +} + ++ (void)setSignInClass:(Class)theClass { + gSignInClass = theClass; +} + +#pragma mark Token Revocation + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (void)revokeTokenForGoogleAuthentication:(GTMOAuth2Authentication *)auth { + [[self signInClass] revokeTokenForGoogleAuthentication:auth]; +} +#endif + +#pragma mark WebView methods + +- (NSURLRequest *)webView:(WebView *)sender resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse fromDataSource:(WebDataSource *)dataSource { + // override WebKit's cookie storage with our own to avoid cookie persistence + // across sign-ins and interaction with the Safari browser's sign-in state + [self handleCookiesForResponse:redirectResponse]; + request = [self addCookiesToRequest:request]; + + if (!hasDoneFinalRedirect_) { + hasDoneFinalRedirect_ = [self.signIn requestRedirectedToRequest:request]; + if (hasDoneFinalRedirect_) { + // signIn has told the window to close + return nil; + } + } + return request; +} + +- (void)webView:(WebView *)sender resource:(id)identifier didReceiveResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)dataSource { + // override WebKit's cookie storage with our own + [self handleCookiesForResponse:response]; +} + +- (void)webView:(WebView *)sender resource:(id)identifier didFinishLoadingFromDataSource:(WebDataSource *)dataSource { + NSString *title = [sender stringByEvaluatingJavaScriptFromString:@"document.title"]; + if ([title length] > 0) { + [self.signIn titleChanged:title]; + } + + [signIn_ cookiesChanged:(NSHTTPCookieStorage *)cookieStorage_]; +} + +- (void)webView:(WebView *)sender resource:(id)identifier didFailLoadingWithError:(NSError *)error fromDataSource:(WebDataSource *)dataSource { + [self.signIn loadFailedWithError:error]; +} + +- (void)windowWillClose:(NSNotification *)note { + if (isWindowShown_) { + [self handlePrematureWindowClose]; + } + isWindowShown_ = NO; +} + +- (void)webView:(WebView *)webView +decidePolicyForNewWindowAction:(NSDictionary *)actionInformation + request:(NSURLRequest *)request + newFrameName:(NSString *)frameName +decisionListener:(id)listener { + SEL sel = self.externalRequestSelector; + if (sel) { + [delegate_ performSelector:sel + withObject:self + withObject:request]; + } else { + // default behavior is to open the URL in NSWorkspace's default browser + NSURL *url = [request URL]; + [[NSWorkspace sharedWorkspace] openURL:url]; + } + [listener ignore]; +} + +#pragma mark Cookie management + +// Rather than let the WebView use Safari's default cookie storage, we intercept +// requests and response to segregate and later discard cookies from signing in. +// +// This allows the application to actually sign out by discarding the auth token +// rather than the user being kept signed in by the cookies. + +- (void)handleCookiesForResponse:(NSURLResponse *)response { + if (self.shouldPersistUser) { + // we'll let WebKit handle the cookies; they'll persist across apps + // and across runs of this app + return; + } + + if ([response respondsToSelector:@selector(allHeaderFields)]) { + // grab the cookies from the header as NSHTTPCookies and store them locally + NSDictionary *headers = [(NSHTTPURLResponse *)response allHeaderFields]; + if (headers) { + NSURL *url = [response URL]; + NSArray *cookies = [NSHTTPCookie cookiesWithResponseHeaderFields:headers + forURL:url]; + if ([cookies count] > 0) { + [cookieStorage_ setCookies:cookies]; + } + } + } +} + +- (NSURLRequest *)addCookiesToRequest:(NSURLRequest *)request { + if (self.shouldPersistUser) { + // we'll let WebKit handle the cookies; they'll persist across apps + // and across runs of this app + return request; + } + + // override WebKit's usual automatic storage of cookies + NSMutableURLRequest *mutableRequest = [[request mutableCopy] autorelease]; + [mutableRequest setHTTPShouldHandleCookies:NO]; + + // add our locally-stored cookies for this URL, if any + NSArray *cookies = [cookieStorage_ cookiesForURL:[request URL]]; + if ([cookies count] > 0) { + NSDictionary *headers = [NSHTTPCookie requestHeaderFieldsWithCookies:cookies]; + NSString *cookieHeader = [headers objectForKey:@"Cookie"]; + if (cookieHeader) { + [mutableRequest setValue:cookieHeader forHTTPHeaderField:@"Cookie"]; + } + } + return mutableRequest; +} + +#pragma mark Keychain support + ++ (NSString *)prefsKeyForName:(NSString *)keychainItemName { + NSString *result = [@"OAuth2: " stringByAppendingString:keychainItemName]; + return result; +} + ++ (BOOL)saveAuthToKeychainForName:(NSString *)keychainItemName + authentication:(GTMOAuth2Authentication *)auth { + + [self removeAuthFromKeychainForName:keychainItemName]; + + // don't save unless we have a token that can really authorize requests + if (!auth.canAuthorize) return NO; + + // make a response string containing the values we want to save + NSString *password = [auth persistenceResponseString]; + + SecKeychainRef defaultKeychain = NULL; + SecKeychainItemRef *dontWantItemRef= NULL; + const char *utf8ServiceName = [keychainItemName UTF8String]; + const char *utf8Password = [password UTF8String]; + + OSStatus err = SecKeychainAddGenericPassword(defaultKeychain, + (UInt32) strlen(utf8ServiceName), utf8ServiceName, + (UInt32) strlen(kKeychainAccountName), kKeychainAccountName, + (UInt32) strlen(utf8Password), utf8Password, + dontWantItemRef); + BOOL didSucceed = (err == noErr); + if (didSucceed) { + // write to preferences that we have a keychain item (so we know later + // that we can read from the keychain without raising a permissions dialog) + NSString *prefKey = [self prefsKeyForName:keychainItemName]; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults setBool:YES forKey:prefKey]; + } + + return didSucceed; +} + ++ (BOOL)removeAuthFromKeychainForName:(NSString *)keychainItemName { + + SecKeychainRef defaultKeychain = NULL; + SecKeychainItemRef itemRef = NULL; + const char *utf8ServiceName = [keychainItemName UTF8String]; + + // we don't really care about the password here, we just want to + // get the SecKeychainItemRef so we can delete it. + OSStatus err = SecKeychainFindGenericPassword (defaultKeychain, + (UInt32) strlen(utf8ServiceName), utf8ServiceName, + (UInt32) strlen(kKeychainAccountName), kKeychainAccountName, + 0, NULL, // ignore password + &itemRef); + if (err != noErr) { + // failure to find is success + return YES; + } else { + // found something, so delete it + err = SecKeychainItemDelete(itemRef); + CFRelease(itemRef); + + // remove our preference key + NSString *prefKey = [self prefsKeyForName:keychainItemName]; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults removeObjectForKey:prefKey]; + + return (err == noErr); + } +} + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (GTMOAuth2Authentication *)authForGoogleFromKeychainForName:(NSString *)keychainItemName + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret { + Class signInClass = [self signInClass]; + NSURL *tokenURL = [signInClass googleTokenURL]; + NSString *redirectURI = [signInClass nativeClientRedirectURI]; + + GTMOAuth2Authentication *auth; + auth = [GTMOAuth2Authentication authenticationWithServiceProvider:kGTMOAuth2ServiceProviderGoogle + tokenURL:tokenURL + redirectURI:redirectURI + clientID:clientID + clientSecret:clientSecret]; + + [GTMOAuth2WindowController authorizeFromKeychainForName:keychainItemName + authentication:auth]; + return auth; +} +#endif + ++ (BOOL)authorizeFromKeychainForName:(NSString *)keychainItemName + authentication:(GTMOAuth2Authentication *)newAuth { + [newAuth setAccessToken:nil]; + + // before accessing the keychain, check preferences to verify that we've + // previously saved a token to the keychain (so we don't needlessly raise + // a keychain access permission dialog) + NSString *prefKey = [self prefsKeyForName:keychainItemName]; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + BOOL flag = [defaults boolForKey:prefKey]; + if (!flag) { + return NO; + } + + BOOL didGetTokens = NO; + + SecKeychainRef defaultKeychain = NULL; + const char *utf8ServiceName = [keychainItemName UTF8String]; + SecKeychainItemRef *dontWantItemRef = NULL; + + void *passwordBuff = NULL; + UInt32 passwordBuffLength = 0; + + OSStatus err = SecKeychainFindGenericPassword(defaultKeychain, + (UInt32) strlen(utf8ServiceName), utf8ServiceName, + (UInt32) strlen(kKeychainAccountName), kKeychainAccountName, + &passwordBuffLength, &passwordBuff, + dontWantItemRef); + if (err == noErr && passwordBuff != NULL) { + + NSString *password = [[[NSString alloc] initWithBytes:passwordBuff + length:passwordBuffLength + encoding:NSUTF8StringEncoding] autorelease]; + + // free the password buffer that was allocated above + SecKeychainItemFreeContent(NULL, passwordBuff); + + if (password != nil) { + [newAuth setKeysForResponseString:password]; + didGetTokens = YES; + } + } + return didGetTokens; +} + +#pragma mark User Properties + +- (void)setProperty:(id)obj forKey:(NSString *)key { + if (obj == nil) { + // User passed in nil, so delete the property + [properties_ removeObjectForKey:key]; + } else { + // Be sure the property dictionary exists + if (properties_ == nil) { + [self setProperties:[NSMutableDictionary dictionary]]; + } + [properties_ setObject:obj forKey:key]; + } +} + +- (id)propertyForKey:(NSString *)key { + id obj = [properties_ objectForKey:key]; + + // Be sure the returned pointer has the life of the autorelease pool, + // in case self is released immediately + return [[obj retain] autorelease]; +} + +#pragma mark Accessors + +- (GTMOAuth2Authentication *)authentication { + return self.signIn.authentication; +} + +- (void)setNetworkLossTimeoutInterval:(NSTimeInterval)val { + self.signIn.networkLossTimeoutInterval = val; +} + +- (NSTimeInterval)networkLossTimeoutInterval { + return self.signIn.networkLossTimeoutInterval; +} + +- (BOOL)shouldUseKeychain { + NSString *name = self.keychainItemName; + return ([name length] > 0); +} + +@end + +#endif // #if !TARGET_OS_IPHONE + +#endif // #if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES diff --git a/GTL/Source/OAuth2/ReleaseNotes.txt b/GTL/Source/OAuth2/ReleaseNotes.txt new file mode 100644 index 0000000..d4816a8 --- /dev/null +++ b/GTL/Source/OAuth2/ReleaseNotes.txt @@ -0,0 +1,132 @@ +GTM OAuth 2 Release Notes + +Project site: http://code.google.com/p/gtm-oauth2/ +Discussion group: http://groups.google.com/group/gtm-oauth2 + +7-August-2012 + +Replaced initial html delay fix with a pending request mechanism. + +26-July-2012 + +Added popViewBlock property to GTMOAuth2ViewControllerTouch to allow +dismissing the view when it lacks a navigation controller. + + +13-April-2012 + +Support setting keychain accessibility for iOS. + + +4-April-2012 + +Add scope to persistenceResponseString so applications can inspect +the prior scope after loading the token from the keychain. + + +3-April-2012 + +Now pulls version 2.3.2 of SBJSON sources from github. + + +14-March-2012 + +Added notification on access token refresh. + + +7-October-2011 + +Added notifications for starting and stopping loads of UIWebView. + + +30-September-2011 + +Add brief delay to view controller to allow initial html to load. + + +21-September-2011 + +Added additionalTokenRequestParameters property to the authorization object. + +Updated the domain for clearing cookies when signing into Google services. + + +7-September-2011 + +Add support for token servers providing url-encoded responses (thanks ivo) + + +25-August-2011 + +Added convenience methods for creating autoreleased controllers. + + +24-August-2011 + +Fixed sign-in when Mac window controller displays as a standalone +modal window (thanks mirko) + + +2-August-2011 + +Projects may now define GTM_OAUTH2_SKIP_GOOGLE_SUPPORT to exclude +Google-specific code. The GTMOAuth2 project file also now includes +"non-Google" targets for building without Google-specific code. + + +18-July-2011 + +The authorization header now uses the "Bearer" prefix. + + +12-July-2011 + +Added an additionalAuthorizationParameters property to the SignIn class, used +by the sample apps to specify a display language for the sign-in pages. + + +20-June-2011 + +To avoid accidental leakage of tokens, the authentication object now +returns kGTMOAuth2ErrorUnauthorizableRequest when attempting to authorize +requests with schemes other than https. The property +shouldAuthorizeAllRequests can be set to override this and allow any +request to be authorized. + + +1-June-2011 + +Added Mac window controller property shouldAllowApplicationTermination + +Added user properties to window & view controllers. + +Fetchers may now optionally be created by a GTMHTTPFetcherService instance. + + +24-May-2011 + +Mac window controller now opens pop-up window links in an external browser +by default, and provides an externalRequestSelector property to let +the client provide custom handling. + + +4-May-2011 + +Addded support for services which provide access tokens, but no +refresh tokens. + + +Release 1.0.0 +6-April-2011 + +Initial public release. + + +JSON notes: + +This library currently relies on version 2.1.1 of SBJSON: + +http://json-framework.googlecode.com/svn/tags/2.1.1/Source/ + +The latest version of SBJSON is avaiilable at http://stig.github.com/json-framework/ + diff --git a/GTL/Source/OAuth2/Touch/.svn/all-wcprops b/GTL/Source/OAuth2/Touch/.svn/all-wcprops new file mode 100644 index 0000000..160bc06 --- /dev/null +++ b/GTL/Source/OAuth2/Touch/.svn/all-wcprops @@ -0,0 +1,23 @@ +K 25 +svn:wc:ra_dav:version-url +V 35 +/svn/!svn/ver/99/trunk/Source/Touch +END +GTMOAuth2ViewControllerTouch.h +K 25 +svn:wc:ra_dav:version-url +V 66 +/svn/!svn/ver/96/trunk/Source/Touch/GTMOAuth2ViewControllerTouch.h +END +GTMOAuth2ViewControllerTouch.m +K 25 +svn:wc:ra_dav:version-url +V 66 +/svn/!svn/ver/99/trunk/Source/Touch/GTMOAuth2ViewControllerTouch.m +END +GTMOAuth2ViewTouch.xib +K 25 +svn:wc:ra_dav:version-url +V 58 +/svn/!svn/ver/97/trunk/Source/Touch/GTMOAuth2ViewTouch.xib +END diff --git a/GTL/Source/OAuth2/Touch/.svn/entries b/GTL/Source/OAuth2/Touch/.svn/entries new file mode 100644 index 0000000..3be6198 --- /dev/null +++ b/GTL/Source/OAuth2/Touch/.svn/entries @@ -0,0 +1,130 @@ +10 + +dir +99 +http://gtm-oauth2.googlecode.com/svn/trunk/Source/Touch +http://gtm-oauth2.googlecode.com/svn + + + +2012-12-06T21:23:57.582218Z +99 +grobbins@google.com + + + + + + + + + + + + + + +22754eea-fc93-e339-b032-c1f495b90c16 + +GTMOAuth2ViewControllerTouch.h +file + + + + +2012-12-09T08:42:42.000000Z +b4e91e96d143a8375e1388660f0797be +2012-10-25T21:40:38.979578Z +96 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +13388 + +GTMOAuth2ViewControllerTouch.m +file + + + + +2012-12-09T08:42:42.000000Z +c1934d612f60c77d82971dca6a959c8c +2012-12-06T21:23:57.582218Z +99 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +37268 + +GTMOAuth2ViewTouch.xib +file + + + + +2012-12-09T08:42:42.000000Z +370d39e5bbf7181b3edcf0801f5cb354 +2012-10-31T19:44:39.029728Z +97 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +21347 + diff --git a/GTL/Source/OAuth2/Touch/.svn/text-base/GTMOAuth2ViewControllerTouch.h.svn-base b/GTL/Source/OAuth2/Touch/.svn/text-base/GTMOAuth2ViewControllerTouch.h.svn-base new file mode 100644 index 0000000..d20b330 --- /dev/null +++ b/GTL/Source/OAuth2/Touch/.svn/text-base/GTMOAuth2ViewControllerTouch.h.svn-base @@ -0,0 +1,361 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMOAuth2ViewControllerTouch.h +// +// This view controller for iPhone handles sign-in via OAuth to Google or +// other services. +// +// This controller is not reusable; create a new instance of this controller +// every time the user will sign in. +// + +#if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES + +#import + +#if TARGET_OS_IPHONE + +#import + +#import "GTMOAuth2Authentication.h" + +#undef _EXTERN +#undef _INITIALIZE_AS +#ifdef GTMOAUTH2VIEWCONTROLLERTOUCH_DEFINE_GLOBALS +#define _EXTERN +#define _INITIALIZE_AS(x) =x +#else +#define _EXTERN extern +#define _INITIALIZE_AS(x) +#endif + +_EXTERN NSString* const kGTMOAuth2KeychainErrorDomain _INITIALIZE_AS(@"com.google.GTMOAuthKeychain"); + + +@class GTMOAuth2SignIn; +@class GTMOAuth2ViewControllerTouch; + +@interface GTMOAuth2ViewControllerTouch : UIViewController { + @private + UIButton *backButton_; + UIButton *forwardButton_; + UIActivityIndicatorView *initialActivityIndicator_; + UIView *navButtonsView_; + UIBarButtonItem *rightBarButtonItem_; + UIWebView *webView_; + + // The object responsible for the sign-in networking sequence; it holds + // onto the authentication object as well. + GTMOAuth2SignIn *signIn_; + + // the page request to load when awakeFromNib occurs + NSURLRequest *request_; + + // The user we're calling back + // + // The delegate is retained only until the callback is invoked + // or the sign-in is canceled + id delegate_; + SEL finishedSelector_; + +#if NS_BLOCKS_AVAILABLE + void (^completionBlock_)(GTMOAuth2ViewControllerTouch *, GTMOAuth2Authentication *, NSError *); + + void (^popViewBlock_)(void); +#endif + + NSString *keychainItemName_; + CFTypeRef keychainItemAccessibility_; + + // if non-nil, the html string to be displayed immediately upon opening + // of the web view + NSString *initialHTMLString_; + + // set to 1 or -1 if the user sets the showsInitialActivityIndicator + // property + int mustShowActivityIndicator_; + + // if non-nil, the URL for which cookies will be deleted when the + // browser view is dismissed + NSURL *browserCookiesURL_; + + id userData_; + NSMutableDictionary *properties_; + +#if __IPHONE_OS_VERSION_MIN_REQUIRED < 60000 + // We delegate the decision to our owning NavigationController (if any). + // But, the NavigationController will call us back, and ask us. + // BOOL keeps us from infinite looping. + BOOL isInsideShouldAutorotateToInterfaceOrientation_; +#endif + + // YES, when view first shown in this signIn session. + BOOL isViewShown_; + + // YES, after the view has fully transitioned in. + BOOL didViewAppear_; + + // YES between sends of start and stop notifications + BOOL hasNotifiedWebViewStartedLoading_; + + // To prevent us from calling our delegate's selector more than once. + BOOL hasCalledFinished_; + + // Set in a webView callback. + BOOL hasDoneFinalRedirect_; + + // Set during the pop initiated by the sign-in object; otherwise, + // viewWillDisappear indicates that some external change of the view + // has stopped the sign-in. + BOOL didDismissSelf_; +} + +// the application and service name to use for saving the auth tokens +// to the keychain +@property (nonatomic, copy) NSString *keychainItemName; + +// the keychain item accessibility is a system constant for use +// with kSecAttrAccessible. +// +// Since it's a system constant, we do not need to retain it. +@property (nonatomic, assign) CFTypeRef keychainItemAccessibility; + +// optional html string displayed immediately upon opening the web view +// +// This string is visible just until the sign-in web page loads, and +// may be used for a "Loading..." type of message or to set the +// initial view color +@property (nonatomic, copy) NSString *initialHTMLString; + +// an activity indicator shows during initial webview load when no initial HTML +// string is specified, but the activity indicator can be forced to be shown +// with this property +@property (nonatomic, assign) BOOL showsInitialActivityIndicator; + +// the underlying object to hold authentication tokens and authorize http +// requests +@property (nonatomic, retain, readonly) GTMOAuth2Authentication *authentication; + +// the underlying object which performs the sign-in networking sequence +@property (nonatomic, retain, readonly) GTMOAuth2SignIn *signIn; + +// user interface elements +@property (nonatomic, retain) IBOutlet UIButton *backButton; +@property (nonatomic, retain) IBOutlet UIButton *forwardButton; +@property (nonatomic, retain) IBOutlet UIActivityIndicatorView *initialActivityIndicator; +@property (nonatomic, retain) IBOutlet UIView *navButtonsView; +@property (nonatomic, retain) IBOutlet UIBarButtonItem *rightBarButtonItem; +@property (nonatomic, retain) IBOutlet UIWebView *webView; + +#if NS_BLOCKS_AVAILABLE +// An optional block to be called when the view should be popped. If not set, +// the view controller will use its navigation controller to pop the view. +@property (nonatomic, copy) void (^popViewBlock)(void); +#endif + +// the default timeout for an unreachable network during display of the +// sign-in page is 10 seconds; set this to 0 to have no timeout +@property (nonatomic, assign) NSTimeInterval networkLossTimeoutInterval; + +// if set, cookies are deleted for this URL when the view is hidden +// +// For Google sign-ins, this is set by default to https://google.com/accounts +// but it may be explicitly set to nil to disable clearing of browser cookies +@property (nonatomic, retain) NSURL *browserCookiesURL; + +// userData is retained for the convenience of the caller +@property (nonatomic, retain) id userData; + +// Stored property values are retained for the convenience of the caller +- (void)setProperty:(id)obj forKey:(NSString *)key; +- (id)propertyForKey:(NSString *)key; + +@property (nonatomic, retain) NSDictionary *properties; + +// Method for creating a controller to authenticate to Google services +// +// scope is the requested scope of authorization +// (like "http://www.google.com/m8/feeds") +// +// keychain item name is used for storing the token on the keychain, +// keychainItemName should be like "My Application: Google Latitude" +// (or set to nil if no persistent keychain storage is desired) +// +// the delegate is retained only until the finished selector is invoked +// or the sign-in is canceled +// +// If you don't like the default nibName and bundle, you can change them +// using the UIViewController properties once you've made one of these. +// +// finishedSelector is called after authentication completes. It should follow +// this signature. +// +// - (void)viewController:(GTMOAuth2ViewControllerTouch *)viewController +// finishedWithAuth:(GTMOAuth2Authentication *)auth +// error:(NSError *)error; +// +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (id)controllerWithScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret + keychainItemName:(NSString *)keychainItemName + delegate:(id)delegate + finishedSelector:(SEL)finishedSelector; + +- (id)initWithScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret + keychainItemName:(NSString *)keychainItemName + delegate:(id)delegate + finishedSelector:(SEL)finishedSelector; + +#if NS_BLOCKS_AVAILABLE ++ (id)controllerWithScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret + keychainItemName:(NSString *)keychainItemName + completionHandler:(void (^)(GTMOAuth2ViewControllerTouch *viewController, GTMOAuth2Authentication *auth, NSError *error))handler; + +- (id)initWithScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret + keychainItemName:(NSString *)keychainItemName + completionHandler:(void (^)(GTMOAuth2ViewControllerTouch *viewController, GTMOAuth2Authentication *auth, NSError *error))handler; +#endif +#endif + +// Create a controller for authenticating to non-Google services, taking +// explicit endpoint URLs and an authentication object ++ (id)controllerWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + keychainItemName:(NSString *)keychainItemName // may be nil + delegate:(id)delegate + finishedSelector:(SEL)finishedSelector; + +// This is the designated initializer +- (id)initWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + keychainItemName:(NSString *)keychainItemName + delegate:(id)delegate + finishedSelector:(SEL)finishedSelector; + +#if NS_BLOCKS_AVAILABLE ++ (id)controllerWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + keychainItemName:(NSString *)keychainItemName // may be nil + completionHandler:(void (^)(GTMOAuth2ViewControllerTouch *viewController, GTMOAuth2Authentication *auth, NSError *error))handler; + +- (id)initWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + keychainItemName:(NSString *)keychainItemName + completionHandler:(void (^)(GTMOAuth2ViewControllerTouch *viewController, GTMOAuth2Authentication *auth, NSError *error))handler; +#endif + +// subclasses may override authNibName to specify a custom name ++ (NSString *)authNibName; + +// subclasses may override authNibBundle to specify a custom bundle ++ (NSBundle *)authNibBundle; + +// apps may replace the sign-in class with their own subclass of it ++ (Class)signInClass; ++ (void)setSignInClass:(Class)theClass; + +- (void)cancelSigningIn; + +// revocation of an authorized token from Google +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (void)revokeTokenForGoogleAuthentication:(GTMOAuth2Authentication *)auth; +#endif + +// +// Keychain +// + +// create an authentication object for Google services from the access +// token and secret stored in the keychain; if no token is available, return +// an unauthorized auth object +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (GTMOAuth2Authentication *)authForGoogleFromKeychainForName:(NSString *)keychainItemName + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret; +#endif + +// add tokens from the keychain, if available, to the authentication object +// +// returns YES if the authentication object was authorized from the keychain ++ (BOOL)authorizeFromKeychainForName:(NSString *)keychainItemName + authentication:(GTMOAuth2Authentication *)auth; + +// method for deleting the stored access token and secret, useful for "signing +// out" ++ (BOOL)removeAuthFromKeychainForName:(NSString *)keychainItemName; + +// method for saving the stored access token and secret ++ (BOOL)saveParamsToKeychainForName:(NSString *)keychainItemName + accessibility:(CFTypeRef)accessibility + authentication:(GTMOAuth2Authentication *)auth; + +// older version, defaults to kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly ++ (BOOL)saveParamsToKeychainForName:(NSString *)keychainItemName + authentication:(GTMOAuth2Authentication *)auth; + +@end + +// To function, GTMOAuth2ViewControllerTouch needs a certain amount of access +// to the iPhone's keychain. To keep things simple, its keychain access is +// broken out into a helper class. We declare it here in case you'd like to use +// it too, to store passwords. + +enum { + kGTMOAuth2KeychainErrorBadArguments = -1301, + kGTMOAuth2KeychainErrorNoPassword = -1302 +}; + + +@interface GTMOAuth2Keychain : NSObject + ++ (GTMOAuth2Keychain *)defaultKeychain; + +// OK to pass nil for the error parameter. +- (NSString *)passwordForService:(NSString *)service + account:(NSString *)account + error:(NSError **)error; + +// OK to pass nil for the error parameter. +- (BOOL)removePasswordForService:(NSString *)service + account:(NSString *)account + error:(NSError **)error; + +// OK to pass nil for the error parameter. +// +// accessibility should be one of the constants for kSecAttrAccessible +// such as kSecAttrAccessibleWhenUnlocked +- (BOOL)setPassword:(NSString *)password + forService:(NSString *)service + accessibility:(CFTypeRef)accessibility + account:(NSString *)account + error:(NSError **)error; + +// For unit tests: allow setting a mock object ++ (void)setDefaultKeychain:(GTMOAuth2Keychain *)keychain; + +@end + +#endif // TARGET_OS_IPHONE + +#endif // #if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES diff --git a/GTL/Source/OAuth2/Touch/.svn/text-base/GTMOAuth2ViewControllerTouch.m.svn-base b/GTL/Source/OAuth2/Touch/.svn/text-base/GTMOAuth2ViewControllerTouch.m.svn-base new file mode 100644 index 0000000..40cf4ae --- /dev/null +++ b/GTL/Source/OAuth2/Touch/.svn/text-base/GTMOAuth2ViewControllerTouch.m.svn-base @@ -0,0 +1,1035 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMOAuth2ViewControllerTouch.m +// + +#import +#import + +#if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES + +#if TARGET_OS_IPHONE + +#define GTMOAUTH2VIEWCONTROLLERTOUCH_DEFINE_GLOBALS 1 +#import "GTMOAuth2ViewControllerTouch.h" + +#import "GTMOAuth2SignIn.h" +#import "GTMOAuth2Authentication.h" + +static NSString * const kGTMOAuth2AccountName = @"OAuth"; +static GTMOAuth2Keychain* sDefaultKeychain = nil; + +@interface GTMOAuth2ViewControllerTouch() + +@property (nonatomic, copy) NSURLRequest *request; + +- (void)signIn:(GTMOAuth2SignIn *)signIn displayRequest:(NSURLRequest *)request; +- (void)signIn:(GTMOAuth2SignIn *)signIn +finishedWithAuth:(GTMOAuth2Authentication *)auth + error:(NSError *)error; +- (BOOL)isNavigationBarTranslucent; +- (void)moveWebViewFromUnderNavigationBar; +- (void)popView; +- (void)clearBrowserCookies; +@end + +@implementation GTMOAuth2ViewControllerTouch + +// IBOutlets +@synthesize request = request_, + backButton = backButton_, + forwardButton = forwardButton_, + navButtonsView = navButtonsView_, + rightBarButtonItem = rightBarButtonItem_, + webView = webView_, + initialActivityIndicator = initialActivityIndicator_; + +@synthesize keychainItemName = keychainItemName_, + keychainItemAccessibility = keychainItemAccessibility_, + initialHTMLString = initialHTMLString_, + browserCookiesURL = browserCookiesURL_, + signIn = signIn_, + userData = userData_, + properties = properties_; + +#if NS_BLOCKS_AVAILABLE +@synthesize popViewBlock = popViewBlock_; +#endif + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (id)controllerWithScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret + keychainItemName:(NSString *)keychainItemName + delegate:(id)delegate + finishedSelector:(SEL)finishedSelector { + return [[[self alloc] initWithScope:scope + clientID:clientID + clientSecret:clientSecret + keychainItemName:keychainItemName + delegate:delegate + finishedSelector:finishedSelector] autorelease]; +} + +- (id)initWithScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret + keychainItemName:(NSString *)keychainItemName + delegate:(id)delegate + finishedSelector:(SEL)finishedSelector { + // convenient entry point for Google authentication + + Class signInClass = [[self class] signInClass]; + + GTMOAuth2Authentication *auth; + auth = [signInClass standardGoogleAuthenticationForScope:scope + clientID:clientID + clientSecret:clientSecret]; + NSURL *authorizationURL = [signInClass googleAuthorizationURL]; + return [self initWithAuthentication:auth + authorizationURL:authorizationURL + keychainItemName:keychainItemName + delegate:delegate + finishedSelector:finishedSelector]; +} + +#if NS_BLOCKS_AVAILABLE + ++ (id)controllerWithScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret + keychainItemName:(NSString *)keychainItemName + completionHandler:(void (^)(GTMOAuth2ViewControllerTouch *viewController, GTMOAuth2Authentication *auth, NSError *error))handler { + return [[[self alloc] initWithScope:scope + clientID:clientID + clientSecret:clientSecret + keychainItemName:keychainItemName + completionHandler:handler] autorelease]; +} + +- (id)initWithScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret + keychainItemName:(NSString *)keychainItemName + completionHandler:(void (^)(GTMOAuth2ViewControllerTouch *viewController, GTMOAuth2Authentication *auth, NSError *error))handler { + // convenient entry point for Google authentication + + Class signInClass = [[self class] signInClass]; + + GTMOAuth2Authentication *auth; + auth = [signInClass standardGoogleAuthenticationForScope:scope + clientID:clientID + clientSecret:clientSecret]; + NSURL *authorizationURL = [signInClass googleAuthorizationURL]; + self = [self initWithAuthentication:auth + authorizationURL:authorizationURL + keychainItemName:keychainItemName + delegate:nil + finishedSelector:NULL]; + if (self) { + completionBlock_ = [handler copy]; + } + return self; +} + +#endif // NS_BLOCKS_AVAILABLE +#endif // !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT + ++ (id)controllerWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + keychainItemName:(NSString *)keychainItemName + delegate:(id)delegate + finishedSelector:(SEL)finishedSelector { + return [[[self alloc] initWithAuthentication:auth + authorizationURL:authorizationURL + keychainItemName:keychainItemName + delegate:delegate + finishedSelector:finishedSelector] autorelease]; +} + +- (id)initWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + keychainItemName:(NSString *)keychainItemName + delegate:(id)delegate + finishedSelector:(SEL)finishedSelector { + + NSString *nibName = [[self class] authNibName]; + NSBundle *nibBundle = [[self class] authNibBundle]; + + self = [super initWithNibName:nibName bundle:nibBundle]; + if (self != nil) { + delegate_ = [delegate retain]; + finishedSelector_ = finishedSelector; + + Class signInClass = [[self class] signInClass]; + + // use the supplied auth and OAuth endpoint URLs + signIn_ = [[signInClass alloc] initWithAuthentication:auth + authorizationURL:authorizationURL + delegate:self + webRequestSelector:@selector(signIn:displayRequest:) + finishedSelector:@selector(signIn:finishedWithAuth:error:)]; + + // if the user is signing in to a Google service, we'll delete the + // Google authentication browser cookies upon completion + // + // for other service domains, or to disable clearing of the cookies, + // set the browserCookiesURL property explicitly + NSString *authorizationHost = [signIn_.authorizationURL host]; + if ([authorizationHost hasSuffix:@".google.com"]) { + NSString *urlStr = [NSString stringWithFormat:@"https://%@/", + authorizationHost]; + NSURL *cookiesURL = [NSURL URLWithString:urlStr]; + [self setBrowserCookiesURL:cookiesURL]; + } + + [self setKeychainItemName:keychainItemName]; + } + return self; +} + +#if NS_BLOCKS_AVAILABLE ++ (id)controllerWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + keychainItemName:(NSString *)keychainItemName + completionHandler:(void (^)(GTMOAuth2ViewControllerTouch *viewController, GTMOAuth2Authentication *auth, NSError *error))handler { + return [[[self alloc] initWithAuthentication:auth + authorizationURL:authorizationURL + keychainItemName:keychainItemName + completionHandler:handler] autorelease]; +} + +- (id)initWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + keychainItemName:(NSString *)keychainItemName + completionHandler:(void (^)(GTMOAuth2ViewControllerTouch *viewController, GTMOAuth2Authentication *auth, NSError *error))handler { + // fall back to the non-blocks init + self = [self initWithAuthentication:auth + authorizationURL:authorizationURL + keychainItemName:keychainItemName + delegate:nil + finishedSelector:NULL]; + if (self) { + completionBlock_ = [handler copy]; + } + return self; +} +#endif + +- (void)dealloc { + [webView_ setDelegate:nil]; + + [backButton_ release]; + [forwardButton_ release]; + [initialActivityIndicator_ release]; + [navButtonsView_ release]; + [rightBarButtonItem_ release]; + [webView_ release]; + [signIn_ release]; + [request_ release]; + [delegate_ release]; +#if NS_BLOCKS_AVAILABLE + [completionBlock_ release]; + [popViewBlock_ release]; +#endif + [keychainItemName_ release]; + [initialHTMLString_ release]; + [browserCookiesURL_ release]; + [userData_ release]; + [properties_ release]; + + [super dealloc]; +} + ++ (NSString *)authNibName { + // subclasses may override this to specify a custom nib name + return @"GTMOAuth2ViewTouch"; +} + ++ (NSBundle *)authNibBundle { + // subclasses may override this to specify a custom nib bundle + return nil; +} + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (GTMOAuth2Authentication *)authForGoogleFromKeychainForName:(NSString *)keychainItemName + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret { + Class signInClass = [self signInClass]; + NSURL *tokenURL = [signInClass googleTokenURL]; + NSString *redirectURI = [signInClass nativeClientRedirectURI]; + + GTMOAuth2Authentication *auth; + auth = [GTMOAuth2Authentication authenticationWithServiceProvider:kGTMOAuth2ServiceProviderGoogle + tokenURL:tokenURL + redirectURI:redirectURI + clientID:clientID + clientSecret:clientSecret]; + [[self class] authorizeFromKeychainForName:keychainItemName + authentication:auth]; + return auth; +} +#endif + ++ (BOOL)authorizeFromKeychainForName:(NSString *)keychainItemName + authentication:(GTMOAuth2Authentication *)newAuth { + newAuth.accessToken = nil; + + BOOL didGetTokens = NO; + GTMOAuth2Keychain *keychain = [GTMOAuth2Keychain defaultKeychain]; + NSString *password = [keychain passwordForService:keychainItemName + account:kGTMOAuth2AccountName + error:nil]; + if (password != nil) { + [newAuth setKeysForResponseString:password]; + didGetTokens = YES; + } + return didGetTokens; +} + ++ (BOOL)removeAuthFromKeychainForName:(NSString *)keychainItemName { + GTMOAuth2Keychain *keychain = [GTMOAuth2Keychain defaultKeychain]; + return [keychain removePasswordForService:keychainItemName + account:kGTMOAuth2AccountName + error:nil]; +} + ++ (BOOL)saveParamsToKeychainForName:(NSString *)keychainItemName + authentication:(GTMOAuth2Authentication *)auth { + return [self saveParamsToKeychainForName:keychainItemName + accessibility:NULL + authentication:auth]; +} + ++ (BOOL)saveParamsToKeychainForName:(NSString *)keychainItemName + accessibility:(CFTypeRef)accessibility + authentication:(GTMOAuth2Authentication *)auth { + [self removeAuthFromKeychainForName:keychainItemName]; + // don't save unless we have a token that can really authorize requests + if (![auth canAuthorize]) return NO; + + if (accessibility == NULL + && &kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly != NULL) { + accessibility = kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly; + } + + // make a response string containing the values we want to save + NSString *password = [auth persistenceResponseString]; + GTMOAuth2Keychain *keychain = [GTMOAuth2Keychain defaultKeychain]; + return [keychain setPassword:password + forService:keychainItemName + accessibility:accessibility + account:kGTMOAuth2AccountName + error:nil]; +} + +- (void)loadView { + NSString *nibPath = nil; + NSBundle *nibBundle = [self nibBundle]; + if (nibBundle == nil) { + nibBundle = [NSBundle mainBundle]; + } + NSString *nibName = self.nibName; + if (nibName != nil) { + nibPath = [nibBundle pathForResource:nibName ofType:@"nib"]; + } + if (nibPath != nil && [[NSFileManager defaultManager] fileExistsAtPath:nibPath]) { + [super loadView]; + } else { + // One of the requirements of loadView is that a valid view object is set to + // self.view upon completion. Otherwise, subclasses that attempt to + // access self.view after calling [super loadView] will enter an infinite + // loop due to the fact that UIViewController's -view accessor calls + // loadView when self.view is nil. + self.view = [[[UIView alloc] init] autorelease]; + +#if DEBUG + NSLog(@"missing %@.nib", nibName); +#endif + } +} + + +- (void)viewDidLoad { + rightBarButtonItem_.customView = navButtonsView_; + self.navigationItem.rightBarButtonItem = rightBarButtonItem_; +} + +- (void)popView { +#if NS_BLOCKS_AVAILABLE + void (^popViewBlock)() = self.popViewBlock; +#else + id popViewBlock = nil; +#endif + + if (popViewBlock || self.navigationController.topViewController == self) { + if (!self.view.hidden) { + // Set the flag to our viewWillDisappear method so it knows + // this is a disappearance initiated by the sign-in object, + // not the user cancelling via the navigation controller + didDismissSelf_ = YES; + + if (popViewBlock) { +#if NS_BLOCKS_AVAILABLE + popViewBlock(); + self.popViewBlock = nil; +#endif + } else { + [self.navigationController popViewControllerAnimated:YES]; + } + self.view.hidden = YES; + } + } +} + +- (void)notifyWithName:(NSString *)name + webView:(UIWebView *)webView + kind:(NSString *)kind { + BOOL isStarting = [name isEqual:kGTMOAuth2WebViewStartedLoading]; + if (hasNotifiedWebViewStartedLoading_ == isStarting) { + // Duplicate notification + // + // UIWebView's delegate methods are so unbalanced that there's little + // point trying to keep a count, as it could easily end up stuck greater + // than zero. + // + // We don't really have a way to track the starts and stops of + // subframe loads, too, as the webView in the notification is always + // for the topmost request. + return; + } + hasNotifiedWebViewStartedLoading_ = isStarting; + + // Notification for webview load starting and stopping + NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys: + webView, kGTMOAuth2WebViewKey, + kind, kGTMOAuth2WebViewStopKindKey, // kind may be nil + nil]; + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc postNotificationName:name + object:self + userInfo:dict]; +} + +- (void)cancelSigningIn { + // The application has explicitly asked us to cancel signing in + // (so no further callback is required) + hasCalledFinished_ = YES; + + [delegate_ autorelease]; + delegate_ = nil; + +#if NS_BLOCKS_AVAILABLE + [completionBlock_ autorelease]; + completionBlock_ = nil; +#endif + + // The sign-in object's cancel method will close the window + [signIn_ cancelSigningIn]; + hasDoneFinalRedirect_ = YES; +} + +static Class gSignInClass = Nil; + ++ (Class)signInClass { + if (gSignInClass == Nil) { + gSignInClass = [GTMOAuth2SignIn class]; + } + return gSignInClass; +} + ++ (void)setSignInClass:(Class)theClass { + gSignInClass = theClass; +} + +#pragma mark Token Revocation + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (void)revokeTokenForGoogleAuthentication:(GTMOAuth2Authentication *)auth { + [[self signInClass] revokeTokenForGoogleAuthentication:auth]; +} +#endif + +#pragma mark Browser Cookies + +- (GTMOAuth2Authentication *)authentication { + return self.signIn.authentication; +} + +- (void)clearBrowserCookies { + // if browserCookiesURL is non-nil, then get cookies for that URL + // and delete them from the common application cookie storage + NSURL *cookiesURL = [self browserCookiesURL]; + if (cookiesURL) { + NSHTTPCookieStorage *cookieStorage; + + cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; + NSArray *cookies = [cookieStorage cookiesForURL:cookiesURL]; + + for (NSHTTPCookie *cookie in cookies) { + [cookieStorage deleteCookie:cookie]; + } + } +} + +#pragma mark Accessors + +- (void)setNetworkLossTimeoutInterval:(NSTimeInterval)val { + signIn_.networkLossTimeoutInterval = val; +} + +- (NSTimeInterval)networkLossTimeoutInterval { + return signIn_.networkLossTimeoutInterval; +} + +- (BOOL)shouldUseKeychain { + NSString *name = self.keychainItemName; + return ([name length] > 0); +} + +- (BOOL)showsInitialActivityIndicator { + return (mustShowActivityIndicator_ == 1 || initialHTMLString_ == nil); +} + +- (void)setShowsInitialActivityIndicator:(BOOL)flag { + mustShowActivityIndicator_ = (flag ? 1 : -1); +} + +#pragma mark User Properties + +- (void)setProperty:(id)obj forKey:(NSString *)key { + if (obj == nil) { + // User passed in nil, so delete the property + [properties_ removeObjectForKey:key]; + } else { + // Be sure the property dictionary exists + if (properties_ == nil) { + [self setProperties:[NSMutableDictionary dictionary]]; + } + [properties_ setObject:obj forKey:key]; + } +} + +- (id)propertyForKey:(NSString *)key { + id obj = [properties_ objectForKey:key]; + + // Be sure the returned pointer has the life of the autorelease pool, + // in case self is released immediately + return [[obj retain] autorelease]; +} + +#pragma mark SignIn callbacks + +- (void)signIn:(GTMOAuth2SignIn *)signIn displayRequest:(NSURLRequest *)request { + // This is the signIn object's webRequest method, telling the controller + // to either display the request in the webview, or if the request is nil, + // to close the window. + // + // All web requests and all window closing goes through this routine + +#if DEBUG + if (self.navigationController) { + if (self.navigationController.topViewController != self && request != nil) { + NSLog(@"Unexpected: Request to show, when already on top. request %@", [request URL]); + } else if(self.navigationController.topViewController != self && request == nil) { + NSLog(@"Unexpected: Request to pop, when not on top. request nil"); + } + } +#endif + + if (request != nil) { + const NSTimeInterval kJanuary2011 = 1293840000; + BOOL isDateValid = ([[NSDate date] timeIntervalSince1970] > kJanuary2011); + if (isDateValid) { + // Display the request. + self.request = request; + // The app may prefer some html other than blank white to be displayed + // before the sign-in web page loads. + // The first fetch might be slow, so the client programmer may want + // to show a local "loading" message. + // On iOS 5+, UIWebView will ignore loadHTMLString: if it's followed by + // a loadRequest: call, so if there is a "loading" message we defer + // the loadRequest: until after after we've drawn the "loading" message. + // + // If there is no initial html string, we show the activity indicator + // unless the user set showsInitialActivityIndicator to NO; if there + // is an initial html string, we hide the indicator unless the user set + // showsInitialActivityIndicator to YES. + NSString *html = self.initialHTMLString; + if ([html length] > 0) { + [initialActivityIndicator_ setHidden:(mustShowActivityIndicator_ < 1)]; + [self.webView loadHTMLString:html baseURL:nil]; + } else { + [initialActivityIndicator_ setHidden:(mustShowActivityIndicator_ < 0)]; + [self.webView loadRequest:request]; + } + } else { + // clock date is invalid, so signing in would fail with an unhelpful error + // from the server. Warn the user in an html string showing a watch icon, + // question mark, and the system date and time. Hopefully this will clue + // in brighter users, or at least give them a clue when they report the + // problem to developers. + // + // Even better is for apps to check the system clock and show some more + // helpful, localized instructions for users; this is really a fallback. + NSString *const html = @"
" + @"⌚ ?
System Clock Incorrect
%@" + @"
"; + NSString *errHTML = [NSString stringWithFormat:html, [NSDate date]]; + + [[self webView] loadHTMLString:errHTML baseURL:nil]; + } + } else { + // request was nil. + [self popView]; + } +} + +- (void)signIn:(GTMOAuth2SignIn *)signIn + finishedWithAuth:(GTMOAuth2Authentication *)auth + error:(NSError *)error { + if (!hasCalledFinished_) { + hasCalledFinished_ = YES; + + if (error == nil) { + if (self.shouldUseKeychain) { + NSString *keychainItemName = self.keychainItemName; + if (auth.canAuthorize) { + // save the auth params in the keychain + CFTypeRef accessibility = self.keychainItemAccessibility; + [[self class] saveParamsToKeychainForName:keychainItemName + accessibility:accessibility + authentication:auth]; + } else { + // remove the auth params from the keychain + [[self class] removeAuthFromKeychainForName:keychainItemName]; + } + } + } + + if (delegate_ && finishedSelector_) { + SEL sel = finishedSelector_; + NSMethodSignature *sig = [delegate_ methodSignatureForSelector:sel]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; + [invocation setSelector:sel]; + [invocation setTarget:delegate_]; + [invocation setArgument:&self atIndex:2]; + [invocation setArgument:&auth atIndex:3]; + [invocation setArgument:&error atIndex:4]; + [invocation invoke]; + } + + [delegate_ autorelease]; + delegate_ = nil; + +#if NS_BLOCKS_AVAILABLE + if (completionBlock_) { + completionBlock_(self, auth, error); + + // release the block here to avoid a retain loop on the controller + [completionBlock_ autorelease]; + completionBlock_ = nil; + } +#endif + } +} + +- (void)moveWebViewFromUnderNavigationBar { + CGRect dontCare; + CGRect webFrame = self.view.bounds; + UINavigationBar *navigationBar = self.navigationController.navigationBar; + CGRectDivide(webFrame, &dontCare, &webFrame, + navigationBar.frame.size.height, CGRectMinYEdge); + [self.webView setFrame:webFrame]; +} + +// isTranslucent is defined in iPhoneOS 3.0 on. +- (BOOL)isNavigationBarTranslucent { + UINavigationBar *navigationBar = [[self navigationController] navigationBar]; + BOOL isTranslucent = + ([navigationBar respondsToSelector:@selector(isTranslucent)] && + [navigationBar isTranslucent]); + return isTranslucent; +} + +#pragma mark - +#pragma mark Protocol implementations + +- (void)viewWillAppear:(BOOL)animated { + if (!isViewShown_) { + isViewShown_ = YES; + if ([self isNavigationBarTranslucent]) { + [self moveWebViewFromUnderNavigationBar]; + } + if (![signIn_ startSigningIn]) { + // Can't start signing in. We must pop our view. + // UIWebview needs time to stabilize. Animations need time to complete. + // We remove ourself from the view stack after that. + [self performSelector:@selector(popView) + withObject:nil + afterDelay:0.5 + inModes:[NSArray arrayWithObject:NSRunLoopCommonModes]]; + } + } + [super viewWillAppear:animated]; +} + +- (void)viewDidAppear:(BOOL)animated { + didViewAppear_ = YES; + [super viewDidAppear:animated]; +} + +- (void)viewWillDisappear:(BOOL)animated { + if (!didDismissSelf_) { + // We won't receive further webview delegate messages, so be sure the + // started loading notification is balanced, if necessary + [self notifyWithName:kGTMOAuth2WebViewStoppedLoading + webView:self.webView + kind:kGTMOAuth2WebViewCancelled]; + + // We are not popping ourselves, so presumably we are being popped by the + // navigation controller; tell the sign-in object to close up shop + // + // this will indirectly call our signIn:finishedWithAuth:error: method + // for us + [signIn_ windowWasClosed]; + +#if NS_BLOCKS_AVAILABLE + self.popViewBlock = nil; +#endif + } + + // prevent the next sign-in from showing in the WebView that the user is + // already signed in + [self clearBrowserCookies]; + + [super viewWillDisappear:animated]; +} + +- (void)viewDidLayoutSubviews { + // We don't call super's version of this method because + // -[UIViewController viewDidLayoutSubviews] is documented as a no-op, that + // didn't exist before iOS 5. + [initialActivityIndicator_ setCenter:[webView_ center]]; +} + +- (BOOL)webView:(UIWebView *)webView + shouldStartLoadWithRequest:(NSURLRequest *)request + navigationType:(UIWebViewNavigationType)navigationType { + + if (!hasDoneFinalRedirect_) { + hasDoneFinalRedirect_ = [signIn_ requestRedirectedToRequest:request]; + if (hasDoneFinalRedirect_) { + // signIn has told the view to close + return NO; + } + } + return YES; +} + +- (void)updateUI { + [backButton_ setEnabled:[[self webView] canGoBack]]; + [forwardButton_ setEnabled:[[self webView] canGoForward]]; +} + +- (void)webViewDidStartLoad:(UIWebView *)webView { + [self notifyWithName:kGTMOAuth2WebViewStartedLoading + webView:webView + kind:nil]; + [self updateUI]; +} + +- (void)webViewDidFinishLoad:(UIWebView *)webView { + [self notifyWithName:kGTMOAuth2WebViewStoppedLoading + webView:webView + kind:kGTMOAuth2WebViewFinished]; + + NSString *title = [webView stringByEvaluatingJavaScriptFromString:@"document.title"]; + if ([title length] > 0) { + [signIn_ titleChanged:title]; + } else { +#if DEBUG + // Verify that Javascript is enabled + NSString *result = [webView stringByEvaluatingJavaScriptFromString:@"1+1"]; + NSAssert([result integerValue] == 2, @"GTMOAuth2: Javascript is required"); +#endif + } + + if (self.request && [self.initialHTMLString length] > 0) { + // The request was pending. + [self setInitialHTMLString:nil]; + [self.webView loadRequest:self.request]; + } else { + [initialActivityIndicator_ setHidden:YES]; + [signIn_ cookiesChanged:[NSHTTPCookieStorage sharedHTTPCookieStorage]]; + + [self updateUI]; + } +} + +- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error { + [self notifyWithName:kGTMOAuth2WebViewStoppedLoading + webView:webView + kind:kGTMOAuth2WebViewFailed]; + + // Tell the sign-in object that a load failed; if it was the authorization + // URL, it will pop the view and return an error to the delegate. + if (didViewAppear_) { + BOOL isUserInterruption = ([error code] == NSURLErrorCancelled + && [[error domain] isEqual:NSURLErrorDomain]); + if (isUserInterruption) { + // Ignore this error: + // Users report that this error occurs when clicking too quickly on the + // accept button, before the page has completely loaded. Ignoring + // this error seems to provide a better experience than does immediately + // cancelling sign-in. + // + // This error also occurs whenever UIWebView is sent the stopLoading + // message, so if we ever send that message intentionally, we need to + // revisit this bypass. + return; + } + + [signIn_ loadFailedWithError:error]; + } else { + // UIWebview needs time to stabilize. Animations need time to complete. + [signIn_ performSelector:@selector(loadFailedWithError:) + withObject:error + afterDelay:0.5 + inModes:[NSArray arrayWithObject:NSRunLoopCommonModes]]; + } +} + +#if __IPHONE_OS_VERSION_MIN_REQUIRED < 60000 +// When running on a device with an OS version < 6, this gets called. +// +// Since it is never called in iOS 6 or greater, if your min deployment +// target is iOS6 or greater, then you don't need to have this method compiled +// into your app. +// +// When running on a device with an OS version 6 or greater, this code is +// not called. - (NSUInteger)supportedInterfaceOrientations; would be called, +// if it existed. Since it is absent, +// Allow the default orientations: All for iPad, all but upside down for iPhone. +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + BOOL value = YES; + if (!isInsideShouldAutorotateToInterfaceOrientation_) { + isInsideShouldAutorotateToInterfaceOrientation_ = YES; + UIViewController *navigationController = [self navigationController]; + if (navigationController != nil) { + value = [navigationController shouldAutorotateToInterfaceOrientation:interfaceOrientation]; + } else { + value = [super shouldAutorotateToInterfaceOrientation:interfaceOrientation]; + } + isInsideShouldAutorotateToInterfaceOrientation_ = NO; + } + return value; +} +#endif + + +@end + + +#pragma mark Common Code + +@implementation GTMOAuth2Keychain + ++ (GTMOAuth2Keychain *)defaultKeychain { + if (sDefaultKeychain == nil) { + sDefaultKeychain = [[self alloc] init]; + } + return sDefaultKeychain; +} + + +// For unit tests: allow setting a mock object ++ (void)setDefaultKeychain:(GTMOAuth2Keychain *)keychain { + if (sDefaultKeychain != keychain) { + [sDefaultKeychain release]; + sDefaultKeychain = [keychain retain]; + } +} + +- (NSString *)keyForService:(NSString *)service account:(NSString *)account { + return [NSString stringWithFormat:@"com.google.GTMOAuth.%@%@", service, account]; +} + +// The Keychain API isn't available on the iPhone simulator in SDKs before 3.0, +// so, on early simulators we use a fake API, that just writes, unencrypted, to +// NSUserDefaults. +#if TARGET_IPHONE_SIMULATOR && __IPHONE_OS_VERSION_MAX_ALLOWED < 30000 +#pragma mark Simulator + +// Simulator - just simulated, not secure. +- (NSString *)passwordForService:(NSString *)service account:(NSString *)account error:(NSError **)error { + NSString *result = nil; + if (0 < [service length] && 0 < [account length]) { + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSString *key = [self keyForService:service account:account]; + result = [defaults stringForKey:key]; + if (result == nil && error != NULL) { + *error = [NSError errorWithDomain:kGTMOAuth2KeychainErrorDomain + code:kGTMOAuth2KeychainErrorNoPassword + userInfo:nil]; + } + } else if (error != NULL) { + *error = [NSError errorWithDomain:kGTMOAuth2KeychainErrorDomain + code:kGTMOAuth2KeychainErrorBadArguments + userInfo:nil]; + } + return result; + +} + + +// Simulator - just simulated, not secure. +- (BOOL)removePasswordForService:(NSString *)service account:(NSString *)account error:(NSError **)error { + BOOL didSucceed = NO; + if (0 < [service length] && 0 < [account length]) { + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSString *key = [self keyForService:service account:account]; + [defaults removeObjectForKey:key]; + [defaults synchronize]; + } else if (error != NULL) { + *error = [NSError errorWithDomain:kGTMOAuth2KeychainErrorDomain + code:kGTMOAuth2KeychainErrorBadArguments + userInfo:nil]; + } + return didSucceed; +} + +// Simulator - just simulated, not secure. +- (BOOL)setPassword:(NSString *)password + forService:(NSString *)service + accessibility:(CFTypeRef)accessibility + account:(NSString *)account + error:(NSError **)error { + BOOL didSucceed = NO; + if (0 < [password length] && 0 < [service length] && 0 < [account length]) { + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSString *key = [self keyForService:service account:account]; + [defaults setObject:password forKey:key]; + [defaults synchronize]; + didSucceed = YES; + } else if (error != NULL) { + *error = [NSError errorWithDomain:kGTMOAuth2KeychainErrorDomain + code:kGTMOAuth2KeychainErrorBadArguments + userInfo:nil]; + } + return didSucceed; +} + +#else // ! TARGET_IPHONE_SIMULATOR +#pragma mark Device + ++ (NSMutableDictionary *)keychainQueryForService:(NSString *)service account:(NSString *)account { + NSMutableDictionary *query = [NSMutableDictionary dictionaryWithObjectsAndKeys: + (id)kSecClassGenericPassword, (id)kSecClass, + @"OAuth", (id)kSecAttrGeneric, + account, (id)kSecAttrAccount, + service, (id)kSecAttrService, + nil]; + return query; +} + +- (NSMutableDictionary *)keychainQueryForService:(NSString *)service account:(NSString *)account { + return [[self class] keychainQueryForService:service account:account]; +} + + + +// iPhone +- (NSString *)passwordForService:(NSString *)service account:(NSString *)account error:(NSError **)error { + OSStatus status = kGTMOAuth2KeychainErrorBadArguments; + NSString *result = nil; + if (0 < [service length] && 0 < [account length]) { + CFDataRef passwordData = NULL; + NSMutableDictionary *keychainQuery = [self keychainQueryForService:service account:account]; + [keychainQuery setObject:(id)kCFBooleanTrue forKey:(id)kSecReturnData]; + [keychainQuery setObject:(id)kSecMatchLimitOne forKey:(id)kSecMatchLimit]; + + status = SecItemCopyMatching((CFDictionaryRef)keychainQuery, + (CFTypeRef *)&passwordData); + if (status == noErr && 0 < [(NSData *)passwordData length]) { + result = [[[NSString alloc] initWithData:(NSData *)passwordData + encoding:NSUTF8StringEncoding] autorelease]; + } + if (passwordData != NULL) { + CFRelease(passwordData); + } + } + if (status != noErr && error != NULL) { + *error = [NSError errorWithDomain:kGTMOAuth2KeychainErrorDomain + code:status + userInfo:nil]; + } + return result; +} + + +// iPhone +- (BOOL)removePasswordForService:(NSString *)service account:(NSString *)account error:(NSError **)error { + OSStatus status = kGTMOAuth2KeychainErrorBadArguments; + if (0 < [service length] && 0 < [account length]) { + NSMutableDictionary *keychainQuery = [self keychainQueryForService:service account:account]; + status = SecItemDelete((CFDictionaryRef)keychainQuery); + } + if (status != noErr && error != NULL) { + *error = [NSError errorWithDomain:kGTMOAuth2KeychainErrorDomain + code:status + userInfo:nil]; + } + return status == noErr; +} + +// iPhone +- (BOOL)setPassword:(NSString *)password + forService:(NSString *)service + accessibility:(CFTypeRef)accessibility + account:(NSString *)account + error:(NSError **)error { + OSStatus status = kGTMOAuth2KeychainErrorBadArguments; + if (0 < [service length] && 0 < [account length]) { + [self removePasswordForService:service account:account error:nil]; + if (0 < [password length]) { + NSMutableDictionary *keychainQuery = [self keychainQueryForService:service account:account]; + NSData *passwordData = [password dataUsingEncoding:NSUTF8StringEncoding]; + [keychainQuery setObject:passwordData forKey:(id)kSecValueData]; + + if (accessibility != NULL && &kSecAttrAccessible != NULL) { + [keychainQuery setObject:(id)accessibility + forKey:(id)kSecAttrAccessible]; + } + status = SecItemAdd((CFDictionaryRef)keychainQuery, NULL); + } + } + if (status != noErr && error != NULL) { + *error = [NSError errorWithDomain:kGTMOAuth2KeychainErrorDomain + code:status + userInfo:nil]; + } + return status == noErr; +} + +#endif // ! TARGET_IPHONE_SIMULATOR + +@end + +#endif // TARGET_OS_IPHONE + +#endif // #if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES diff --git a/GTL/Source/OAuth2/Touch/.svn/text-base/GTMOAuth2ViewTouch.xib.svn-base b/GTL/Source/OAuth2/Touch/.svn/text-base/GTMOAuth2ViewTouch.xib.svn-base new file mode 100644 index 0000000..4f91fa4 --- /dev/null +++ b/GTL/Source/OAuth2/Touch/.svn/text-base/GTMOAuth2ViewTouch.xib.svn-base @@ -0,0 +1,494 @@ + + + + 1024 + 12C60 + 2840 + 1187.34 + 625.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 1926 + + + YES + IBProxyObject + IBUIActivityIndicatorView + IBUIBarButtonItem + IBUIButton + IBUINavigationItem + IBUIView + IBUIWebView + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + OAuth + IBCocoaTouchFramework + + + IBCocoaTouchFramework + 1 + + + + 292 + + YES + + + 292 + {30, 30} + + + + NO + NO + IBCocoaTouchFramework + 0 + 0 + {0, -2} + + + 3 + MQA + + + 2 + MC41OTYwNzg0NiAwLjY4NjI3NDUzIDAuOTUyOTQxMjQgMC42MDAwMDAwMgA + + + + 3 + MC41AA + + + Helvetica-Bold + Helvetica + 2 + 24 + + + Helvetica-Bold + 24 + 16 + + + + + 292 + {{30, 0}, {30, 30}} + + + + NO + NO + IBCocoaTouchFramework + 0 + 0 + {0, -2} + + + + 2 + MC41ODQzMTM3NSAwLjY3NDUwOTgyIDAuOTUyOTQxMjQgMC42MDAwMDAwMgA + + + + + + + + {60, 30} + + + + + 3 + MSAwAA + + NO + NO + + 3 + 3 + + IBCocoaTouchFramework + + + + 274 + + YES + + + 274 + {320, 460} + + + + + 1 + MSAxIDEAA + + YES + YES + IBCocoaTouchFramework + 1 + YES + + + + 301 + {{150, 115}, {20, 20}} + + + + _NS:9 + NO + IBCocoaTouchFramework + NO + YES + 2 + + + {320, 460} + + + + + 3 + MQA + + 2 + + + IBCocoaTouchFramework + + + + + YES + + + rightBarButtonItem + + + + 20 + + + + navButtonsView + + + + 22 + + + + backButton + + + + 25 + + + + forwardButton + + + + 26 + + + + view + + + + 28 + + + + webView + + + + 29 + + + + initialActivityIndicator + + + + 33 + + + + delegate + + + + 9 + + + + rightBarButtonItem + + + + 14 + + + + goBack + + + 7 + + 18 + + + + goForward + + + 7 + + 19 + + + + + YES + + 0 + + YES + + + + + + -1 + + + File's Owner + + + -2 + + + + + 6 + + + YES + + + + + 10 + + + + + 15 + + + YES + + + + + + + 16 + + + + + 17 + + + + + 27 + + + YES + + + + + + + 4 + + + + + 31 + + + + + + + YES + + YES + -1.CustomClassName + -1.IBPluginDependency + -2.CustomClassName + -2.IBPluginDependency + 10.IBPluginDependency + 15.IBPluginDependency + 16.IBPluginDependency + 17.IBPluginDependency + 27.IBPluginDependency + 31.IBPluginDependency + 4.IBPluginDependency + 6.IBPluginDependency + + + YES + GTMOAuth2ViewControllerTouch + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + + + + YES + + + + + 33 + + + + YES + + GTMOAuth2ViewControllerTouch + UIViewController + + YES + + YES + backButton + forwardButton + initialActivityIndicator + navButtonsView + rightBarButtonItem + webView + + + YES + UIButton + UIButton + UIActivityIndicatorView + UIView + UIBarButtonItem + UIWebView + + + + YES + + YES + backButton + forwardButton + initialActivityIndicator + navButtonsView + rightBarButtonItem + webView + + + YES + + backButton + UIButton + + + forwardButton + UIButton + + + initialActivityIndicator + UIActivityIndicatorView + + + navButtonsView + UIView + + + rightBarButtonItem + UIBarButtonItem + + + webView + UIWebView + + + + + IBProjectSource + ./Classes/GTMOAuth2ViewControllerTouch.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + 3 + 1926 + + diff --git a/GTL/Source/OAuth2/Touch/GTMOAuth2ViewControllerTouch.h b/GTL/Source/OAuth2/Touch/GTMOAuth2ViewControllerTouch.h new file mode 100644 index 0000000..d20b330 --- /dev/null +++ b/GTL/Source/OAuth2/Touch/GTMOAuth2ViewControllerTouch.h @@ -0,0 +1,361 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMOAuth2ViewControllerTouch.h +// +// This view controller for iPhone handles sign-in via OAuth to Google or +// other services. +// +// This controller is not reusable; create a new instance of this controller +// every time the user will sign in. +// + +#if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES + +#import + +#if TARGET_OS_IPHONE + +#import + +#import "GTMOAuth2Authentication.h" + +#undef _EXTERN +#undef _INITIALIZE_AS +#ifdef GTMOAUTH2VIEWCONTROLLERTOUCH_DEFINE_GLOBALS +#define _EXTERN +#define _INITIALIZE_AS(x) =x +#else +#define _EXTERN extern +#define _INITIALIZE_AS(x) +#endif + +_EXTERN NSString* const kGTMOAuth2KeychainErrorDomain _INITIALIZE_AS(@"com.google.GTMOAuthKeychain"); + + +@class GTMOAuth2SignIn; +@class GTMOAuth2ViewControllerTouch; + +@interface GTMOAuth2ViewControllerTouch : UIViewController { + @private + UIButton *backButton_; + UIButton *forwardButton_; + UIActivityIndicatorView *initialActivityIndicator_; + UIView *navButtonsView_; + UIBarButtonItem *rightBarButtonItem_; + UIWebView *webView_; + + // The object responsible for the sign-in networking sequence; it holds + // onto the authentication object as well. + GTMOAuth2SignIn *signIn_; + + // the page request to load when awakeFromNib occurs + NSURLRequest *request_; + + // The user we're calling back + // + // The delegate is retained only until the callback is invoked + // or the sign-in is canceled + id delegate_; + SEL finishedSelector_; + +#if NS_BLOCKS_AVAILABLE + void (^completionBlock_)(GTMOAuth2ViewControllerTouch *, GTMOAuth2Authentication *, NSError *); + + void (^popViewBlock_)(void); +#endif + + NSString *keychainItemName_; + CFTypeRef keychainItemAccessibility_; + + // if non-nil, the html string to be displayed immediately upon opening + // of the web view + NSString *initialHTMLString_; + + // set to 1 or -1 if the user sets the showsInitialActivityIndicator + // property + int mustShowActivityIndicator_; + + // if non-nil, the URL for which cookies will be deleted when the + // browser view is dismissed + NSURL *browserCookiesURL_; + + id userData_; + NSMutableDictionary *properties_; + +#if __IPHONE_OS_VERSION_MIN_REQUIRED < 60000 + // We delegate the decision to our owning NavigationController (if any). + // But, the NavigationController will call us back, and ask us. + // BOOL keeps us from infinite looping. + BOOL isInsideShouldAutorotateToInterfaceOrientation_; +#endif + + // YES, when view first shown in this signIn session. + BOOL isViewShown_; + + // YES, after the view has fully transitioned in. + BOOL didViewAppear_; + + // YES between sends of start and stop notifications + BOOL hasNotifiedWebViewStartedLoading_; + + // To prevent us from calling our delegate's selector more than once. + BOOL hasCalledFinished_; + + // Set in a webView callback. + BOOL hasDoneFinalRedirect_; + + // Set during the pop initiated by the sign-in object; otherwise, + // viewWillDisappear indicates that some external change of the view + // has stopped the sign-in. + BOOL didDismissSelf_; +} + +// the application and service name to use for saving the auth tokens +// to the keychain +@property (nonatomic, copy) NSString *keychainItemName; + +// the keychain item accessibility is a system constant for use +// with kSecAttrAccessible. +// +// Since it's a system constant, we do not need to retain it. +@property (nonatomic, assign) CFTypeRef keychainItemAccessibility; + +// optional html string displayed immediately upon opening the web view +// +// This string is visible just until the sign-in web page loads, and +// may be used for a "Loading..." type of message or to set the +// initial view color +@property (nonatomic, copy) NSString *initialHTMLString; + +// an activity indicator shows during initial webview load when no initial HTML +// string is specified, but the activity indicator can be forced to be shown +// with this property +@property (nonatomic, assign) BOOL showsInitialActivityIndicator; + +// the underlying object to hold authentication tokens and authorize http +// requests +@property (nonatomic, retain, readonly) GTMOAuth2Authentication *authentication; + +// the underlying object which performs the sign-in networking sequence +@property (nonatomic, retain, readonly) GTMOAuth2SignIn *signIn; + +// user interface elements +@property (nonatomic, retain) IBOutlet UIButton *backButton; +@property (nonatomic, retain) IBOutlet UIButton *forwardButton; +@property (nonatomic, retain) IBOutlet UIActivityIndicatorView *initialActivityIndicator; +@property (nonatomic, retain) IBOutlet UIView *navButtonsView; +@property (nonatomic, retain) IBOutlet UIBarButtonItem *rightBarButtonItem; +@property (nonatomic, retain) IBOutlet UIWebView *webView; + +#if NS_BLOCKS_AVAILABLE +// An optional block to be called when the view should be popped. If not set, +// the view controller will use its navigation controller to pop the view. +@property (nonatomic, copy) void (^popViewBlock)(void); +#endif + +// the default timeout for an unreachable network during display of the +// sign-in page is 10 seconds; set this to 0 to have no timeout +@property (nonatomic, assign) NSTimeInterval networkLossTimeoutInterval; + +// if set, cookies are deleted for this URL when the view is hidden +// +// For Google sign-ins, this is set by default to https://google.com/accounts +// but it may be explicitly set to nil to disable clearing of browser cookies +@property (nonatomic, retain) NSURL *browserCookiesURL; + +// userData is retained for the convenience of the caller +@property (nonatomic, retain) id userData; + +// Stored property values are retained for the convenience of the caller +- (void)setProperty:(id)obj forKey:(NSString *)key; +- (id)propertyForKey:(NSString *)key; + +@property (nonatomic, retain) NSDictionary *properties; + +// Method for creating a controller to authenticate to Google services +// +// scope is the requested scope of authorization +// (like "http://www.google.com/m8/feeds") +// +// keychain item name is used for storing the token on the keychain, +// keychainItemName should be like "My Application: Google Latitude" +// (or set to nil if no persistent keychain storage is desired) +// +// the delegate is retained only until the finished selector is invoked +// or the sign-in is canceled +// +// If you don't like the default nibName and bundle, you can change them +// using the UIViewController properties once you've made one of these. +// +// finishedSelector is called after authentication completes. It should follow +// this signature. +// +// - (void)viewController:(GTMOAuth2ViewControllerTouch *)viewController +// finishedWithAuth:(GTMOAuth2Authentication *)auth +// error:(NSError *)error; +// +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (id)controllerWithScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret + keychainItemName:(NSString *)keychainItemName + delegate:(id)delegate + finishedSelector:(SEL)finishedSelector; + +- (id)initWithScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret + keychainItemName:(NSString *)keychainItemName + delegate:(id)delegate + finishedSelector:(SEL)finishedSelector; + +#if NS_BLOCKS_AVAILABLE ++ (id)controllerWithScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret + keychainItemName:(NSString *)keychainItemName + completionHandler:(void (^)(GTMOAuth2ViewControllerTouch *viewController, GTMOAuth2Authentication *auth, NSError *error))handler; + +- (id)initWithScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret + keychainItemName:(NSString *)keychainItemName + completionHandler:(void (^)(GTMOAuth2ViewControllerTouch *viewController, GTMOAuth2Authentication *auth, NSError *error))handler; +#endif +#endif + +// Create a controller for authenticating to non-Google services, taking +// explicit endpoint URLs and an authentication object ++ (id)controllerWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + keychainItemName:(NSString *)keychainItemName // may be nil + delegate:(id)delegate + finishedSelector:(SEL)finishedSelector; + +// This is the designated initializer +- (id)initWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + keychainItemName:(NSString *)keychainItemName + delegate:(id)delegate + finishedSelector:(SEL)finishedSelector; + +#if NS_BLOCKS_AVAILABLE ++ (id)controllerWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + keychainItemName:(NSString *)keychainItemName // may be nil + completionHandler:(void (^)(GTMOAuth2ViewControllerTouch *viewController, GTMOAuth2Authentication *auth, NSError *error))handler; + +- (id)initWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + keychainItemName:(NSString *)keychainItemName + completionHandler:(void (^)(GTMOAuth2ViewControllerTouch *viewController, GTMOAuth2Authentication *auth, NSError *error))handler; +#endif + +// subclasses may override authNibName to specify a custom name ++ (NSString *)authNibName; + +// subclasses may override authNibBundle to specify a custom bundle ++ (NSBundle *)authNibBundle; + +// apps may replace the sign-in class with their own subclass of it ++ (Class)signInClass; ++ (void)setSignInClass:(Class)theClass; + +- (void)cancelSigningIn; + +// revocation of an authorized token from Google +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (void)revokeTokenForGoogleAuthentication:(GTMOAuth2Authentication *)auth; +#endif + +// +// Keychain +// + +// create an authentication object for Google services from the access +// token and secret stored in the keychain; if no token is available, return +// an unauthorized auth object +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (GTMOAuth2Authentication *)authForGoogleFromKeychainForName:(NSString *)keychainItemName + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret; +#endif + +// add tokens from the keychain, if available, to the authentication object +// +// returns YES if the authentication object was authorized from the keychain ++ (BOOL)authorizeFromKeychainForName:(NSString *)keychainItemName + authentication:(GTMOAuth2Authentication *)auth; + +// method for deleting the stored access token and secret, useful for "signing +// out" ++ (BOOL)removeAuthFromKeychainForName:(NSString *)keychainItemName; + +// method for saving the stored access token and secret ++ (BOOL)saveParamsToKeychainForName:(NSString *)keychainItemName + accessibility:(CFTypeRef)accessibility + authentication:(GTMOAuth2Authentication *)auth; + +// older version, defaults to kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly ++ (BOOL)saveParamsToKeychainForName:(NSString *)keychainItemName + authentication:(GTMOAuth2Authentication *)auth; + +@end + +// To function, GTMOAuth2ViewControllerTouch needs a certain amount of access +// to the iPhone's keychain. To keep things simple, its keychain access is +// broken out into a helper class. We declare it here in case you'd like to use +// it too, to store passwords. + +enum { + kGTMOAuth2KeychainErrorBadArguments = -1301, + kGTMOAuth2KeychainErrorNoPassword = -1302 +}; + + +@interface GTMOAuth2Keychain : NSObject + ++ (GTMOAuth2Keychain *)defaultKeychain; + +// OK to pass nil for the error parameter. +- (NSString *)passwordForService:(NSString *)service + account:(NSString *)account + error:(NSError **)error; + +// OK to pass nil for the error parameter. +- (BOOL)removePasswordForService:(NSString *)service + account:(NSString *)account + error:(NSError **)error; + +// OK to pass nil for the error parameter. +// +// accessibility should be one of the constants for kSecAttrAccessible +// such as kSecAttrAccessibleWhenUnlocked +- (BOOL)setPassword:(NSString *)password + forService:(NSString *)service + accessibility:(CFTypeRef)accessibility + account:(NSString *)account + error:(NSError **)error; + +// For unit tests: allow setting a mock object ++ (void)setDefaultKeychain:(GTMOAuth2Keychain *)keychain; + +@end + +#endif // TARGET_OS_IPHONE + +#endif // #if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES diff --git a/GTL/Source/OAuth2/Touch/GTMOAuth2ViewControllerTouch.m b/GTL/Source/OAuth2/Touch/GTMOAuth2ViewControllerTouch.m new file mode 100644 index 0000000..40cf4ae --- /dev/null +++ b/GTL/Source/OAuth2/Touch/GTMOAuth2ViewControllerTouch.m @@ -0,0 +1,1035 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTMOAuth2ViewControllerTouch.m +// + +#import +#import + +#if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES + +#if TARGET_OS_IPHONE + +#define GTMOAUTH2VIEWCONTROLLERTOUCH_DEFINE_GLOBALS 1 +#import "GTMOAuth2ViewControllerTouch.h" + +#import "GTMOAuth2SignIn.h" +#import "GTMOAuth2Authentication.h" + +static NSString * const kGTMOAuth2AccountName = @"OAuth"; +static GTMOAuth2Keychain* sDefaultKeychain = nil; + +@interface GTMOAuth2ViewControllerTouch() + +@property (nonatomic, copy) NSURLRequest *request; + +- (void)signIn:(GTMOAuth2SignIn *)signIn displayRequest:(NSURLRequest *)request; +- (void)signIn:(GTMOAuth2SignIn *)signIn +finishedWithAuth:(GTMOAuth2Authentication *)auth + error:(NSError *)error; +- (BOOL)isNavigationBarTranslucent; +- (void)moveWebViewFromUnderNavigationBar; +- (void)popView; +- (void)clearBrowserCookies; +@end + +@implementation GTMOAuth2ViewControllerTouch + +// IBOutlets +@synthesize request = request_, + backButton = backButton_, + forwardButton = forwardButton_, + navButtonsView = navButtonsView_, + rightBarButtonItem = rightBarButtonItem_, + webView = webView_, + initialActivityIndicator = initialActivityIndicator_; + +@synthesize keychainItemName = keychainItemName_, + keychainItemAccessibility = keychainItemAccessibility_, + initialHTMLString = initialHTMLString_, + browserCookiesURL = browserCookiesURL_, + signIn = signIn_, + userData = userData_, + properties = properties_; + +#if NS_BLOCKS_AVAILABLE +@synthesize popViewBlock = popViewBlock_; +#endif + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (id)controllerWithScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret + keychainItemName:(NSString *)keychainItemName + delegate:(id)delegate + finishedSelector:(SEL)finishedSelector { + return [[[self alloc] initWithScope:scope + clientID:clientID + clientSecret:clientSecret + keychainItemName:keychainItemName + delegate:delegate + finishedSelector:finishedSelector] autorelease]; +} + +- (id)initWithScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret + keychainItemName:(NSString *)keychainItemName + delegate:(id)delegate + finishedSelector:(SEL)finishedSelector { + // convenient entry point for Google authentication + + Class signInClass = [[self class] signInClass]; + + GTMOAuth2Authentication *auth; + auth = [signInClass standardGoogleAuthenticationForScope:scope + clientID:clientID + clientSecret:clientSecret]; + NSURL *authorizationURL = [signInClass googleAuthorizationURL]; + return [self initWithAuthentication:auth + authorizationURL:authorizationURL + keychainItemName:keychainItemName + delegate:delegate + finishedSelector:finishedSelector]; +} + +#if NS_BLOCKS_AVAILABLE + ++ (id)controllerWithScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret + keychainItemName:(NSString *)keychainItemName + completionHandler:(void (^)(GTMOAuth2ViewControllerTouch *viewController, GTMOAuth2Authentication *auth, NSError *error))handler { + return [[[self alloc] initWithScope:scope + clientID:clientID + clientSecret:clientSecret + keychainItemName:keychainItemName + completionHandler:handler] autorelease]; +} + +- (id)initWithScope:(NSString *)scope + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret + keychainItemName:(NSString *)keychainItemName + completionHandler:(void (^)(GTMOAuth2ViewControllerTouch *viewController, GTMOAuth2Authentication *auth, NSError *error))handler { + // convenient entry point for Google authentication + + Class signInClass = [[self class] signInClass]; + + GTMOAuth2Authentication *auth; + auth = [signInClass standardGoogleAuthenticationForScope:scope + clientID:clientID + clientSecret:clientSecret]; + NSURL *authorizationURL = [signInClass googleAuthorizationURL]; + self = [self initWithAuthentication:auth + authorizationURL:authorizationURL + keychainItemName:keychainItemName + delegate:nil + finishedSelector:NULL]; + if (self) { + completionBlock_ = [handler copy]; + } + return self; +} + +#endif // NS_BLOCKS_AVAILABLE +#endif // !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT + ++ (id)controllerWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + keychainItemName:(NSString *)keychainItemName + delegate:(id)delegate + finishedSelector:(SEL)finishedSelector { + return [[[self alloc] initWithAuthentication:auth + authorizationURL:authorizationURL + keychainItemName:keychainItemName + delegate:delegate + finishedSelector:finishedSelector] autorelease]; +} + +- (id)initWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + keychainItemName:(NSString *)keychainItemName + delegate:(id)delegate + finishedSelector:(SEL)finishedSelector { + + NSString *nibName = [[self class] authNibName]; + NSBundle *nibBundle = [[self class] authNibBundle]; + + self = [super initWithNibName:nibName bundle:nibBundle]; + if (self != nil) { + delegate_ = [delegate retain]; + finishedSelector_ = finishedSelector; + + Class signInClass = [[self class] signInClass]; + + // use the supplied auth and OAuth endpoint URLs + signIn_ = [[signInClass alloc] initWithAuthentication:auth + authorizationURL:authorizationURL + delegate:self + webRequestSelector:@selector(signIn:displayRequest:) + finishedSelector:@selector(signIn:finishedWithAuth:error:)]; + + // if the user is signing in to a Google service, we'll delete the + // Google authentication browser cookies upon completion + // + // for other service domains, or to disable clearing of the cookies, + // set the browserCookiesURL property explicitly + NSString *authorizationHost = [signIn_.authorizationURL host]; + if ([authorizationHost hasSuffix:@".google.com"]) { + NSString *urlStr = [NSString stringWithFormat:@"https://%@/", + authorizationHost]; + NSURL *cookiesURL = [NSURL URLWithString:urlStr]; + [self setBrowserCookiesURL:cookiesURL]; + } + + [self setKeychainItemName:keychainItemName]; + } + return self; +} + +#if NS_BLOCKS_AVAILABLE ++ (id)controllerWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + keychainItemName:(NSString *)keychainItemName + completionHandler:(void (^)(GTMOAuth2ViewControllerTouch *viewController, GTMOAuth2Authentication *auth, NSError *error))handler { + return [[[self alloc] initWithAuthentication:auth + authorizationURL:authorizationURL + keychainItemName:keychainItemName + completionHandler:handler] autorelease]; +} + +- (id)initWithAuthentication:(GTMOAuth2Authentication *)auth + authorizationURL:(NSURL *)authorizationURL + keychainItemName:(NSString *)keychainItemName + completionHandler:(void (^)(GTMOAuth2ViewControllerTouch *viewController, GTMOAuth2Authentication *auth, NSError *error))handler { + // fall back to the non-blocks init + self = [self initWithAuthentication:auth + authorizationURL:authorizationURL + keychainItemName:keychainItemName + delegate:nil + finishedSelector:NULL]; + if (self) { + completionBlock_ = [handler copy]; + } + return self; +} +#endif + +- (void)dealloc { + [webView_ setDelegate:nil]; + + [backButton_ release]; + [forwardButton_ release]; + [initialActivityIndicator_ release]; + [navButtonsView_ release]; + [rightBarButtonItem_ release]; + [webView_ release]; + [signIn_ release]; + [request_ release]; + [delegate_ release]; +#if NS_BLOCKS_AVAILABLE + [completionBlock_ release]; + [popViewBlock_ release]; +#endif + [keychainItemName_ release]; + [initialHTMLString_ release]; + [browserCookiesURL_ release]; + [userData_ release]; + [properties_ release]; + + [super dealloc]; +} + ++ (NSString *)authNibName { + // subclasses may override this to specify a custom nib name + return @"GTMOAuth2ViewTouch"; +} + ++ (NSBundle *)authNibBundle { + // subclasses may override this to specify a custom nib bundle + return nil; +} + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (GTMOAuth2Authentication *)authForGoogleFromKeychainForName:(NSString *)keychainItemName + clientID:(NSString *)clientID + clientSecret:(NSString *)clientSecret { + Class signInClass = [self signInClass]; + NSURL *tokenURL = [signInClass googleTokenURL]; + NSString *redirectURI = [signInClass nativeClientRedirectURI]; + + GTMOAuth2Authentication *auth; + auth = [GTMOAuth2Authentication authenticationWithServiceProvider:kGTMOAuth2ServiceProviderGoogle + tokenURL:tokenURL + redirectURI:redirectURI + clientID:clientID + clientSecret:clientSecret]; + [[self class] authorizeFromKeychainForName:keychainItemName + authentication:auth]; + return auth; +} +#endif + ++ (BOOL)authorizeFromKeychainForName:(NSString *)keychainItemName + authentication:(GTMOAuth2Authentication *)newAuth { + newAuth.accessToken = nil; + + BOOL didGetTokens = NO; + GTMOAuth2Keychain *keychain = [GTMOAuth2Keychain defaultKeychain]; + NSString *password = [keychain passwordForService:keychainItemName + account:kGTMOAuth2AccountName + error:nil]; + if (password != nil) { + [newAuth setKeysForResponseString:password]; + didGetTokens = YES; + } + return didGetTokens; +} + ++ (BOOL)removeAuthFromKeychainForName:(NSString *)keychainItemName { + GTMOAuth2Keychain *keychain = [GTMOAuth2Keychain defaultKeychain]; + return [keychain removePasswordForService:keychainItemName + account:kGTMOAuth2AccountName + error:nil]; +} + ++ (BOOL)saveParamsToKeychainForName:(NSString *)keychainItemName + authentication:(GTMOAuth2Authentication *)auth { + return [self saveParamsToKeychainForName:keychainItemName + accessibility:NULL + authentication:auth]; +} + ++ (BOOL)saveParamsToKeychainForName:(NSString *)keychainItemName + accessibility:(CFTypeRef)accessibility + authentication:(GTMOAuth2Authentication *)auth { + [self removeAuthFromKeychainForName:keychainItemName]; + // don't save unless we have a token that can really authorize requests + if (![auth canAuthorize]) return NO; + + if (accessibility == NULL + && &kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly != NULL) { + accessibility = kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly; + } + + // make a response string containing the values we want to save + NSString *password = [auth persistenceResponseString]; + GTMOAuth2Keychain *keychain = [GTMOAuth2Keychain defaultKeychain]; + return [keychain setPassword:password + forService:keychainItemName + accessibility:accessibility + account:kGTMOAuth2AccountName + error:nil]; +} + +- (void)loadView { + NSString *nibPath = nil; + NSBundle *nibBundle = [self nibBundle]; + if (nibBundle == nil) { + nibBundle = [NSBundle mainBundle]; + } + NSString *nibName = self.nibName; + if (nibName != nil) { + nibPath = [nibBundle pathForResource:nibName ofType:@"nib"]; + } + if (nibPath != nil && [[NSFileManager defaultManager] fileExistsAtPath:nibPath]) { + [super loadView]; + } else { + // One of the requirements of loadView is that a valid view object is set to + // self.view upon completion. Otherwise, subclasses that attempt to + // access self.view after calling [super loadView] will enter an infinite + // loop due to the fact that UIViewController's -view accessor calls + // loadView when self.view is nil. + self.view = [[[UIView alloc] init] autorelease]; + +#if DEBUG + NSLog(@"missing %@.nib", nibName); +#endif + } +} + + +- (void)viewDidLoad { + rightBarButtonItem_.customView = navButtonsView_; + self.navigationItem.rightBarButtonItem = rightBarButtonItem_; +} + +- (void)popView { +#if NS_BLOCKS_AVAILABLE + void (^popViewBlock)() = self.popViewBlock; +#else + id popViewBlock = nil; +#endif + + if (popViewBlock || self.navigationController.topViewController == self) { + if (!self.view.hidden) { + // Set the flag to our viewWillDisappear method so it knows + // this is a disappearance initiated by the sign-in object, + // not the user cancelling via the navigation controller + didDismissSelf_ = YES; + + if (popViewBlock) { +#if NS_BLOCKS_AVAILABLE + popViewBlock(); + self.popViewBlock = nil; +#endif + } else { + [self.navigationController popViewControllerAnimated:YES]; + } + self.view.hidden = YES; + } + } +} + +- (void)notifyWithName:(NSString *)name + webView:(UIWebView *)webView + kind:(NSString *)kind { + BOOL isStarting = [name isEqual:kGTMOAuth2WebViewStartedLoading]; + if (hasNotifiedWebViewStartedLoading_ == isStarting) { + // Duplicate notification + // + // UIWebView's delegate methods are so unbalanced that there's little + // point trying to keep a count, as it could easily end up stuck greater + // than zero. + // + // We don't really have a way to track the starts and stops of + // subframe loads, too, as the webView in the notification is always + // for the topmost request. + return; + } + hasNotifiedWebViewStartedLoading_ = isStarting; + + // Notification for webview load starting and stopping + NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys: + webView, kGTMOAuth2WebViewKey, + kind, kGTMOAuth2WebViewStopKindKey, // kind may be nil + nil]; + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc postNotificationName:name + object:self + userInfo:dict]; +} + +- (void)cancelSigningIn { + // The application has explicitly asked us to cancel signing in + // (so no further callback is required) + hasCalledFinished_ = YES; + + [delegate_ autorelease]; + delegate_ = nil; + +#if NS_BLOCKS_AVAILABLE + [completionBlock_ autorelease]; + completionBlock_ = nil; +#endif + + // The sign-in object's cancel method will close the window + [signIn_ cancelSigningIn]; + hasDoneFinalRedirect_ = YES; +} + +static Class gSignInClass = Nil; + ++ (Class)signInClass { + if (gSignInClass == Nil) { + gSignInClass = [GTMOAuth2SignIn class]; + } + return gSignInClass; +} + ++ (void)setSignInClass:(Class)theClass { + gSignInClass = theClass; +} + +#pragma mark Token Revocation + +#if !GTM_OAUTH2_SKIP_GOOGLE_SUPPORT ++ (void)revokeTokenForGoogleAuthentication:(GTMOAuth2Authentication *)auth { + [[self signInClass] revokeTokenForGoogleAuthentication:auth]; +} +#endif + +#pragma mark Browser Cookies + +- (GTMOAuth2Authentication *)authentication { + return self.signIn.authentication; +} + +- (void)clearBrowserCookies { + // if browserCookiesURL is non-nil, then get cookies for that URL + // and delete them from the common application cookie storage + NSURL *cookiesURL = [self browserCookiesURL]; + if (cookiesURL) { + NSHTTPCookieStorage *cookieStorage; + + cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; + NSArray *cookies = [cookieStorage cookiesForURL:cookiesURL]; + + for (NSHTTPCookie *cookie in cookies) { + [cookieStorage deleteCookie:cookie]; + } + } +} + +#pragma mark Accessors + +- (void)setNetworkLossTimeoutInterval:(NSTimeInterval)val { + signIn_.networkLossTimeoutInterval = val; +} + +- (NSTimeInterval)networkLossTimeoutInterval { + return signIn_.networkLossTimeoutInterval; +} + +- (BOOL)shouldUseKeychain { + NSString *name = self.keychainItemName; + return ([name length] > 0); +} + +- (BOOL)showsInitialActivityIndicator { + return (mustShowActivityIndicator_ == 1 || initialHTMLString_ == nil); +} + +- (void)setShowsInitialActivityIndicator:(BOOL)flag { + mustShowActivityIndicator_ = (flag ? 1 : -1); +} + +#pragma mark User Properties + +- (void)setProperty:(id)obj forKey:(NSString *)key { + if (obj == nil) { + // User passed in nil, so delete the property + [properties_ removeObjectForKey:key]; + } else { + // Be sure the property dictionary exists + if (properties_ == nil) { + [self setProperties:[NSMutableDictionary dictionary]]; + } + [properties_ setObject:obj forKey:key]; + } +} + +- (id)propertyForKey:(NSString *)key { + id obj = [properties_ objectForKey:key]; + + // Be sure the returned pointer has the life of the autorelease pool, + // in case self is released immediately + return [[obj retain] autorelease]; +} + +#pragma mark SignIn callbacks + +- (void)signIn:(GTMOAuth2SignIn *)signIn displayRequest:(NSURLRequest *)request { + // This is the signIn object's webRequest method, telling the controller + // to either display the request in the webview, or if the request is nil, + // to close the window. + // + // All web requests and all window closing goes through this routine + +#if DEBUG + if (self.navigationController) { + if (self.navigationController.topViewController != self && request != nil) { + NSLog(@"Unexpected: Request to show, when already on top. request %@", [request URL]); + } else if(self.navigationController.topViewController != self && request == nil) { + NSLog(@"Unexpected: Request to pop, when not on top. request nil"); + } + } +#endif + + if (request != nil) { + const NSTimeInterval kJanuary2011 = 1293840000; + BOOL isDateValid = ([[NSDate date] timeIntervalSince1970] > kJanuary2011); + if (isDateValid) { + // Display the request. + self.request = request; + // The app may prefer some html other than blank white to be displayed + // before the sign-in web page loads. + // The first fetch might be slow, so the client programmer may want + // to show a local "loading" message. + // On iOS 5+, UIWebView will ignore loadHTMLString: if it's followed by + // a loadRequest: call, so if there is a "loading" message we defer + // the loadRequest: until after after we've drawn the "loading" message. + // + // If there is no initial html string, we show the activity indicator + // unless the user set showsInitialActivityIndicator to NO; if there + // is an initial html string, we hide the indicator unless the user set + // showsInitialActivityIndicator to YES. + NSString *html = self.initialHTMLString; + if ([html length] > 0) { + [initialActivityIndicator_ setHidden:(mustShowActivityIndicator_ < 1)]; + [self.webView loadHTMLString:html baseURL:nil]; + } else { + [initialActivityIndicator_ setHidden:(mustShowActivityIndicator_ < 0)]; + [self.webView loadRequest:request]; + } + } else { + // clock date is invalid, so signing in would fail with an unhelpful error + // from the server. Warn the user in an html string showing a watch icon, + // question mark, and the system date and time. Hopefully this will clue + // in brighter users, or at least give them a clue when they report the + // problem to developers. + // + // Even better is for apps to check the system clock and show some more + // helpful, localized instructions for users; this is really a fallback. + NSString *const html = @"
" + @"⌚ ?
System Clock Incorrect
%@" + @"
"; + NSString *errHTML = [NSString stringWithFormat:html, [NSDate date]]; + + [[self webView] loadHTMLString:errHTML baseURL:nil]; + } + } else { + // request was nil. + [self popView]; + } +} + +- (void)signIn:(GTMOAuth2SignIn *)signIn + finishedWithAuth:(GTMOAuth2Authentication *)auth + error:(NSError *)error { + if (!hasCalledFinished_) { + hasCalledFinished_ = YES; + + if (error == nil) { + if (self.shouldUseKeychain) { + NSString *keychainItemName = self.keychainItemName; + if (auth.canAuthorize) { + // save the auth params in the keychain + CFTypeRef accessibility = self.keychainItemAccessibility; + [[self class] saveParamsToKeychainForName:keychainItemName + accessibility:accessibility + authentication:auth]; + } else { + // remove the auth params from the keychain + [[self class] removeAuthFromKeychainForName:keychainItemName]; + } + } + } + + if (delegate_ && finishedSelector_) { + SEL sel = finishedSelector_; + NSMethodSignature *sig = [delegate_ methodSignatureForSelector:sel]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; + [invocation setSelector:sel]; + [invocation setTarget:delegate_]; + [invocation setArgument:&self atIndex:2]; + [invocation setArgument:&auth atIndex:3]; + [invocation setArgument:&error atIndex:4]; + [invocation invoke]; + } + + [delegate_ autorelease]; + delegate_ = nil; + +#if NS_BLOCKS_AVAILABLE + if (completionBlock_) { + completionBlock_(self, auth, error); + + // release the block here to avoid a retain loop on the controller + [completionBlock_ autorelease]; + completionBlock_ = nil; + } +#endif + } +} + +- (void)moveWebViewFromUnderNavigationBar { + CGRect dontCare; + CGRect webFrame = self.view.bounds; + UINavigationBar *navigationBar = self.navigationController.navigationBar; + CGRectDivide(webFrame, &dontCare, &webFrame, + navigationBar.frame.size.height, CGRectMinYEdge); + [self.webView setFrame:webFrame]; +} + +// isTranslucent is defined in iPhoneOS 3.0 on. +- (BOOL)isNavigationBarTranslucent { + UINavigationBar *navigationBar = [[self navigationController] navigationBar]; + BOOL isTranslucent = + ([navigationBar respondsToSelector:@selector(isTranslucent)] && + [navigationBar isTranslucent]); + return isTranslucent; +} + +#pragma mark - +#pragma mark Protocol implementations + +- (void)viewWillAppear:(BOOL)animated { + if (!isViewShown_) { + isViewShown_ = YES; + if ([self isNavigationBarTranslucent]) { + [self moveWebViewFromUnderNavigationBar]; + } + if (![signIn_ startSigningIn]) { + // Can't start signing in. We must pop our view. + // UIWebview needs time to stabilize. Animations need time to complete. + // We remove ourself from the view stack after that. + [self performSelector:@selector(popView) + withObject:nil + afterDelay:0.5 + inModes:[NSArray arrayWithObject:NSRunLoopCommonModes]]; + } + } + [super viewWillAppear:animated]; +} + +- (void)viewDidAppear:(BOOL)animated { + didViewAppear_ = YES; + [super viewDidAppear:animated]; +} + +- (void)viewWillDisappear:(BOOL)animated { + if (!didDismissSelf_) { + // We won't receive further webview delegate messages, so be sure the + // started loading notification is balanced, if necessary + [self notifyWithName:kGTMOAuth2WebViewStoppedLoading + webView:self.webView + kind:kGTMOAuth2WebViewCancelled]; + + // We are not popping ourselves, so presumably we are being popped by the + // navigation controller; tell the sign-in object to close up shop + // + // this will indirectly call our signIn:finishedWithAuth:error: method + // for us + [signIn_ windowWasClosed]; + +#if NS_BLOCKS_AVAILABLE + self.popViewBlock = nil; +#endif + } + + // prevent the next sign-in from showing in the WebView that the user is + // already signed in + [self clearBrowserCookies]; + + [super viewWillDisappear:animated]; +} + +- (void)viewDidLayoutSubviews { + // We don't call super's version of this method because + // -[UIViewController viewDidLayoutSubviews] is documented as a no-op, that + // didn't exist before iOS 5. + [initialActivityIndicator_ setCenter:[webView_ center]]; +} + +- (BOOL)webView:(UIWebView *)webView + shouldStartLoadWithRequest:(NSURLRequest *)request + navigationType:(UIWebViewNavigationType)navigationType { + + if (!hasDoneFinalRedirect_) { + hasDoneFinalRedirect_ = [signIn_ requestRedirectedToRequest:request]; + if (hasDoneFinalRedirect_) { + // signIn has told the view to close + return NO; + } + } + return YES; +} + +- (void)updateUI { + [backButton_ setEnabled:[[self webView] canGoBack]]; + [forwardButton_ setEnabled:[[self webView] canGoForward]]; +} + +- (void)webViewDidStartLoad:(UIWebView *)webView { + [self notifyWithName:kGTMOAuth2WebViewStartedLoading + webView:webView + kind:nil]; + [self updateUI]; +} + +- (void)webViewDidFinishLoad:(UIWebView *)webView { + [self notifyWithName:kGTMOAuth2WebViewStoppedLoading + webView:webView + kind:kGTMOAuth2WebViewFinished]; + + NSString *title = [webView stringByEvaluatingJavaScriptFromString:@"document.title"]; + if ([title length] > 0) { + [signIn_ titleChanged:title]; + } else { +#if DEBUG + // Verify that Javascript is enabled + NSString *result = [webView stringByEvaluatingJavaScriptFromString:@"1+1"]; + NSAssert([result integerValue] == 2, @"GTMOAuth2: Javascript is required"); +#endif + } + + if (self.request && [self.initialHTMLString length] > 0) { + // The request was pending. + [self setInitialHTMLString:nil]; + [self.webView loadRequest:self.request]; + } else { + [initialActivityIndicator_ setHidden:YES]; + [signIn_ cookiesChanged:[NSHTTPCookieStorage sharedHTTPCookieStorage]]; + + [self updateUI]; + } +} + +- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error { + [self notifyWithName:kGTMOAuth2WebViewStoppedLoading + webView:webView + kind:kGTMOAuth2WebViewFailed]; + + // Tell the sign-in object that a load failed; if it was the authorization + // URL, it will pop the view and return an error to the delegate. + if (didViewAppear_) { + BOOL isUserInterruption = ([error code] == NSURLErrorCancelled + && [[error domain] isEqual:NSURLErrorDomain]); + if (isUserInterruption) { + // Ignore this error: + // Users report that this error occurs when clicking too quickly on the + // accept button, before the page has completely loaded. Ignoring + // this error seems to provide a better experience than does immediately + // cancelling sign-in. + // + // This error also occurs whenever UIWebView is sent the stopLoading + // message, so if we ever send that message intentionally, we need to + // revisit this bypass. + return; + } + + [signIn_ loadFailedWithError:error]; + } else { + // UIWebview needs time to stabilize. Animations need time to complete. + [signIn_ performSelector:@selector(loadFailedWithError:) + withObject:error + afterDelay:0.5 + inModes:[NSArray arrayWithObject:NSRunLoopCommonModes]]; + } +} + +#if __IPHONE_OS_VERSION_MIN_REQUIRED < 60000 +// When running on a device with an OS version < 6, this gets called. +// +// Since it is never called in iOS 6 or greater, if your min deployment +// target is iOS6 or greater, then you don't need to have this method compiled +// into your app. +// +// When running on a device with an OS version 6 or greater, this code is +// not called. - (NSUInteger)supportedInterfaceOrientations; would be called, +// if it existed. Since it is absent, +// Allow the default orientations: All for iPad, all but upside down for iPhone. +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + BOOL value = YES; + if (!isInsideShouldAutorotateToInterfaceOrientation_) { + isInsideShouldAutorotateToInterfaceOrientation_ = YES; + UIViewController *navigationController = [self navigationController]; + if (navigationController != nil) { + value = [navigationController shouldAutorotateToInterfaceOrientation:interfaceOrientation]; + } else { + value = [super shouldAutorotateToInterfaceOrientation:interfaceOrientation]; + } + isInsideShouldAutorotateToInterfaceOrientation_ = NO; + } + return value; +} +#endif + + +@end + + +#pragma mark Common Code + +@implementation GTMOAuth2Keychain + ++ (GTMOAuth2Keychain *)defaultKeychain { + if (sDefaultKeychain == nil) { + sDefaultKeychain = [[self alloc] init]; + } + return sDefaultKeychain; +} + + +// For unit tests: allow setting a mock object ++ (void)setDefaultKeychain:(GTMOAuth2Keychain *)keychain { + if (sDefaultKeychain != keychain) { + [sDefaultKeychain release]; + sDefaultKeychain = [keychain retain]; + } +} + +- (NSString *)keyForService:(NSString *)service account:(NSString *)account { + return [NSString stringWithFormat:@"com.google.GTMOAuth.%@%@", service, account]; +} + +// The Keychain API isn't available on the iPhone simulator in SDKs before 3.0, +// so, on early simulators we use a fake API, that just writes, unencrypted, to +// NSUserDefaults. +#if TARGET_IPHONE_SIMULATOR && __IPHONE_OS_VERSION_MAX_ALLOWED < 30000 +#pragma mark Simulator + +// Simulator - just simulated, not secure. +- (NSString *)passwordForService:(NSString *)service account:(NSString *)account error:(NSError **)error { + NSString *result = nil; + if (0 < [service length] && 0 < [account length]) { + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSString *key = [self keyForService:service account:account]; + result = [defaults stringForKey:key]; + if (result == nil && error != NULL) { + *error = [NSError errorWithDomain:kGTMOAuth2KeychainErrorDomain + code:kGTMOAuth2KeychainErrorNoPassword + userInfo:nil]; + } + } else if (error != NULL) { + *error = [NSError errorWithDomain:kGTMOAuth2KeychainErrorDomain + code:kGTMOAuth2KeychainErrorBadArguments + userInfo:nil]; + } + return result; + +} + + +// Simulator - just simulated, not secure. +- (BOOL)removePasswordForService:(NSString *)service account:(NSString *)account error:(NSError **)error { + BOOL didSucceed = NO; + if (0 < [service length] && 0 < [account length]) { + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSString *key = [self keyForService:service account:account]; + [defaults removeObjectForKey:key]; + [defaults synchronize]; + } else if (error != NULL) { + *error = [NSError errorWithDomain:kGTMOAuth2KeychainErrorDomain + code:kGTMOAuth2KeychainErrorBadArguments + userInfo:nil]; + } + return didSucceed; +} + +// Simulator - just simulated, not secure. +- (BOOL)setPassword:(NSString *)password + forService:(NSString *)service + accessibility:(CFTypeRef)accessibility + account:(NSString *)account + error:(NSError **)error { + BOOL didSucceed = NO; + if (0 < [password length] && 0 < [service length] && 0 < [account length]) { + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSString *key = [self keyForService:service account:account]; + [defaults setObject:password forKey:key]; + [defaults synchronize]; + didSucceed = YES; + } else if (error != NULL) { + *error = [NSError errorWithDomain:kGTMOAuth2KeychainErrorDomain + code:kGTMOAuth2KeychainErrorBadArguments + userInfo:nil]; + } + return didSucceed; +} + +#else // ! TARGET_IPHONE_SIMULATOR +#pragma mark Device + ++ (NSMutableDictionary *)keychainQueryForService:(NSString *)service account:(NSString *)account { + NSMutableDictionary *query = [NSMutableDictionary dictionaryWithObjectsAndKeys: + (id)kSecClassGenericPassword, (id)kSecClass, + @"OAuth", (id)kSecAttrGeneric, + account, (id)kSecAttrAccount, + service, (id)kSecAttrService, + nil]; + return query; +} + +- (NSMutableDictionary *)keychainQueryForService:(NSString *)service account:(NSString *)account { + return [[self class] keychainQueryForService:service account:account]; +} + + + +// iPhone +- (NSString *)passwordForService:(NSString *)service account:(NSString *)account error:(NSError **)error { + OSStatus status = kGTMOAuth2KeychainErrorBadArguments; + NSString *result = nil; + if (0 < [service length] && 0 < [account length]) { + CFDataRef passwordData = NULL; + NSMutableDictionary *keychainQuery = [self keychainQueryForService:service account:account]; + [keychainQuery setObject:(id)kCFBooleanTrue forKey:(id)kSecReturnData]; + [keychainQuery setObject:(id)kSecMatchLimitOne forKey:(id)kSecMatchLimit]; + + status = SecItemCopyMatching((CFDictionaryRef)keychainQuery, + (CFTypeRef *)&passwordData); + if (status == noErr && 0 < [(NSData *)passwordData length]) { + result = [[[NSString alloc] initWithData:(NSData *)passwordData + encoding:NSUTF8StringEncoding] autorelease]; + } + if (passwordData != NULL) { + CFRelease(passwordData); + } + } + if (status != noErr && error != NULL) { + *error = [NSError errorWithDomain:kGTMOAuth2KeychainErrorDomain + code:status + userInfo:nil]; + } + return result; +} + + +// iPhone +- (BOOL)removePasswordForService:(NSString *)service account:(NSString *)account error:(NSError **)error { + OSStatus status = kGTMOAuth2KeychainErrorBadArguments; + if (0 < [service length] && 0 < [account length]) { + NSMutableDictionary *keychainQuery = [self keychainQueryForService:service account:account]; + status = SecItemDelete((CFDictionaryRef)keychainQuery); + } + if (status != noErr && error != NULL) { + *error = [NSError errorWithDomain:kGTMOAuth2KeychainErrorDomain + code:status + userInfo:nil]; + } + return status == noErr; +} + +// iPhone +- (BOOL)setPassword:(NSString *)password + forService:(NSString *)service + accessibility:(CFTypeRef)accessibility + account:(NSString *)account + error:(NSError **)error { + OSStatus status = kGTMOAuth2KeychainErrorBadArguments; + if (0 < [service length] && 0 < [account length]) { + [self removePasswordForService:service account:account error:nil]; + if (0 < [password length]) { + NSMutableDictionary *keychainQuery = [self keychainQueryForService:service account:account]; + NSData *passwordData = [password dataUsingEncoding:NSUTF8StringEncoding]; + [keychainQuery setObject:passwordData forKey:(id)kSecValueData]; + + if (accessibility != NULL && &kSecAttrAccessible != NULL) { + [keychainQuery setObject:(id)accessibility + forKey:(id)kSecAttrAccessible]; + } + status = SecItemAdd((CFDictionaryRef)keychainQuery, NULL); + } + } + if (status != noErr && error != NULL) { + *error = [NSError errorWithDomain:kGTMOAuth2KeychainErrorDomain + code:status + userInfo:nil]; + } + return status == noErr; +} + +#endif // ! TARGET_IPHONE_SIMULATOR + +@end + +#endif // TARGET_OS_IPHONE + +#endif // #if GTM_INCLUDE_OAUTH2 || !GDATA_REQUIRE_SERVICE_INCLUDES diff --git a/GTL/Source/OAuth2/Touch/GTMOAuth2ViewTouch.xib b/GTL/Source/OAuth2/Touch/GTMOAuth2ViewTouch.xib new file mode 100644 index 0000000..4f91fa4 --- /dev/null +++ b/GTL/Source/OAuth2/Touch/GTMOAuth2ViewTouch.xib @@ -0,0 +1,494 @@ + + + + 1024 + 12C60 + 2840 + 1187.34 + 625.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 1926 + + + YES + IBProxyObject + IBUIActivityIndicatorView + IBUIBarButtonItem + IBUIButton + IBUINavigationItem + IBUIView + IBUIWebView + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + OAuth + IBCocoaTouchFramework + + + IBCocoaTouchFramework + 1 + + + + 292 + + YES + + + 292 + {30, 30} + + + + NO + NO + IBCocoaTouchFramework + 0 + 0 + {0, -2} + + + 3 + MQA + + + 2 + MC41OTYwNzg0NiAwLjY4NjI3NDUzIDAuOTUyOTQxMjQgMC42MDAwMDAwMgA + + + + 3 + MC41AA + + + Helvetica-Bold + Helvetica + 2 + 24 + + + Helvetica-Bold + 24 + 16 + + + + + 292 + {{30, 0}, {30, 30}} + + + + NO + NO + IBCocoaTouchFramework + 0 + 0 + {0, -2} + + + + 2 + MC41ODQzMTM3NSAwLjY3NDUwOTgyIDAuOTUyOTQxMjQgMC42MDAwMDAwMgA + + + + + + + + {60, 30} + + + + + 3 + MSAwAA + + NO + NO + + 3 + 3 + + IBCocoaTouchFramework + + + + 274 + + YES + + + 274 + {320, 460} + + + + + 1 + MSAxIDEAA + + YES + YES + IBCocoaTouchFramework + 1 + YES + + + + 301 + {{150, 115}, {20, 20}} + + + + _NS:9 + NO + IBCocoaTouchFramework + NO + YES + 2 + + + {320, 460} + + + + + 3 + MQA + + 2 + + + IBCocoaTouchFramework + + + + + YES + + + rightBarButtonItem + + + + 20 + + + + navButtonsView + + + + 22 + + + + backButton + + + + 25 + + + + forwardButton + + + + 26 + + + + view + + + + 28 + + + + webView + + + + 29 + + + + initialActivityIndicator + + + + 33 + + + + delegate + + + + 9 + + + + rightBarButtonItem + + + + 14 + + + + goBack + + + 7 + + 18 + + + + goForward + + + 7 + + 19 + + + + + YES + + 0 + + YES + + + + + + -1 + + + File's Owner + + + -2 + + + + + 6 + + + YES + + + + + 10 + + + + + 15 + + + YES + + + + + + + 16 + + + + + 17 + + + + + 27 + + + YES + + + + + + + 4 + + + + + 31 + + + + + + + YES + + YES + -1.CustomClassName + -1.IBPluginDependency + -2.CustomClassName + -2.IBPluginDependency + 10.IBPluginDependency + 15.IBPluginDependency + 16.IBPluginDependency + 17.IBPluginDependency + 27.IBPluginDependency + 31.IBPluginDependency + 4.IBPluginDependency + 6.IBPluginDependency + + + YES + GTMOAuth2ViewControllerTouch + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + + + + YES + + + + + 33 + + + + YES + + GTMOAuth2ViewControllerTouch + UIViewController + + YES + + YES + backButton + forwardButton + initialActivityIndicator + navButtonsView + rightBarButtonItem + webView + + + YES + UIButton + UIButton + UIActivityIndicatorView + UIView + UIBarButtonItem + UIWebView + + + + YES + + YES + backButton + forwardButton + initialActivityIndicator + navButtonsView + rightBarButtonItem + webView + + + YES + + backButton + UIButton + + + forwardButton + UIButton + + + initialActivityIndicator + UIActivityIndicatorView + + + navButtonsView + UIView + + + rightBarButtonItem + UIBarButtonItem + + + webView + UIWebView + + + + + IBProjectSource + ./Classes/GTMOAuth2ViewControllerTouch.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + 3 + 1926 + + diff --git a/GTL/Source/Objects/.svn/all-wcprops b/GTL/Source/Objects/.svn/all-wcprops new file mode 100644 index 0000000..dafa41e --- /dev/null +++ b/GTL/Source/Objects/.svn/all-wcprops @@ -0,0 +1,113 @@ +K 25 +svn:wc:ra_dav:version-url +V 38 +/svn/!svn/ver/249/trunk/Source/Objects +END +GTLBatchResult.m +K 25 +svn:wc:ra_dav:version-url +V 55 +/svn/!svn/ver/117/trunk/Source/Objects/GTLBatchResult.m +END +GTLErrorObject.m +K 25 +svn:wc:ra_dav:version-url +V 54 +/svn/!svn/ver/60/trunk/Source/Objects/GTLErrorObject.m +END +GTLDateTime.h +K 25 +svn:wc:ra_dav:version-url +V 52 +/svn/!svn/ver/199/trunk/Source/Objects/GTLDateTime.h +END +GTLRuntimeCommon.h +K 25 +svn:wc:ra_dav:version-url +V 56 +/svn/!svn/ver/14/trunk/Source/Objects/GTLRuntimeCommon.h +END +GTLService.h +K 25 +svn:wc:ra_dav:version-url +V 51 +/svn/!svn/ver/222/trunk/Source/Objects/GTLService.h +END +GTLRuntimeCommon.m +K 25 +svn:wc:ra_dav:version-url +V 57 +/svn/!svn/ver/191/trunk/Source/Objects/GTLRuntimeCommon.m +END +GTLDateTime.m +K 25 +svn:wc:ra_dav:version-url +V 52 +/svn/!svn/ver/199/trunk/Source/Objects/GTLDateTime.m +END +GTLQuery.h +K 25 +svn:wc:ra_dav:version-url +V 49 +/svn/!svn/ver/190/trunk/Source/Objects/GTLQuery.h +END +GTLService.m +K 25 +svn:wc:ra_dav:version-url +V 51 +/svn/!svn/ver/222/trunk/Source/Objects/GTLService.m +END +GTLObject.h +K 25 +svn:wc:ra_dav:version-url +V 50 +/svn/!svn/ver/217/trunk/Source/Objects/GTLObject.h +END +GTLBatchQuery.h +K 25 +svn:wc:ra_dav:version-url +V 54 +/svn/!svn/ver/190/trunk/Source/Objects/GTLBatchQuery.h +END +GTLUploadParameters.h +K 25 +svn:wc:ra_dav:version-url +V 60 +/svn/!svn/ver/190/trunk/Source/Objects/GTLUploadParameters.h +END +GTLQuery.m +K 25 +svn:wc:ra_dav:version-url +V 48 +/svn/!svn/ver/90/trunk/Source/Objects/GTLQuery.m +END +GTLObject.m +K 25 +svn:wc:ra_dav:version-url +V 50 +/svn/!svn/ver/249/trunk/Source/Objects/GTLObject.m +END +GTLBatchQuery.m +K 25 +svn:wc:ra_dav:version-url +V 54 +/svn/!svn/ver/157/trunk/Source/Objects/GTLBatchQuery.m +END +GTLUploadParameters.m +K 25 +svn:wc:ra_dav:version-url +V 60 +/svn/!svn/ver/169/trunk/Source/Objects/GTLUploadParameters.m +END +GTLErrorObject.h +K 25 +svn:wc:ra_dav:version-url +V 54 +/svn/!svn/ver/60/trunk/Source/Objects/GTLErrorObject.h +END +GTLBatchResult.h +K 25 +svn:wc:ra_dav:version-url +V 55 +/svn/!svn/ver/117/trunk/Source/Objects/GTLBatchResult.h +END diff --git a/GTL/Source/Objects/.svn/entries b/GTL/Source/Objects/.svn/entries new file mode 100644 index 0000000..b2cdfae --- /dev/null +++ b/GTL/Source/Objects/.svn/entries @@ -0,0 +1,640 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Objects +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-12-06T21:45:46.693811Z +249 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +GTLBatchResult.m +file + + + + +2012-12-09T08:42:33.000000Z +05e1eb16070f39656260bd0f367da534 +2011-12-06T19:55:58.945157Z +117 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2990 + +GTLErrorObject.m +file + + + + +2012-12-09T08:42:33.000000Z +69339db0daa710b581ebf06a5c0462a9 +2011-09-21T22:16:00.375586Z +60 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2351 + +GTLDateTime.h +file + + + + +2012-12-09T08:42:33.000000Z +39b7da0ac42df33a87c8e6f769ebad69 +2012-08-06T20:16:00.435937Z +199 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2182 + +GTLRuntimeCommon.h +file + + + + +2012-12-09T08:42:33.000000Z +9d68dcd7006cf95662efe97674f99ca7 +2011-06-24T20:24:16.908736Z +14 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1841 + +GTLService.h +file + + + + +2012-12-09T08:42:33.000000Z +4049b7b01d7a416f8ce43194f2d1b758 +2012-09-29T05:26:05.144848Z +222 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +24288 + +GTLRuntimeCommon.m +file + + + + +2012-12-09T08:42:33.000000Z +4fa1ae057f3f1446c1c4820937863703 +2012-07-18T20:34:03.559762Z +191 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +41746 + +GTLDateTime.m +file + + + + +2012-12-09T08:42:33.000000Z +e139d90ad2f8af44e2b221f0518a2974 +2012-08-06T20:16:00.435937Z +199 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +14306 + +GTLQuery.h +file + + + + +2012-12-09T08:42:33.000000Z +78cb8cab875fad41f4ef721470d36b86 +2012-07-18T20:32:26.319595Z +190 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4495 + +GTLService.m +file + + + + +2012-12-09T08:42:33.000000Z +23dafb8388182491dfe3ecb433cb4020 +2012-09-29T05:26:05.144848Z +222 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +93098 + +GTLObject.h +file + + + + +2012-12-09T08:42:33.000000Z +db62e029f17caa64efbc419c34c65818 +2012-09-19T01:35:38.787995Z +217 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +6874 + +GTLBatchQuery.h +file + + + + +2012-12-09T08:42:33.000000Z +a8b6b0c42b6d6afc82006f9fbed8b82e +2012-07-18T20:32:26.319595Z +190 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1576 + +GTLUploadParameters.h +file + + + + +2012-12-09T08:42:33.000000Z +f78438821c57bbad21b3b621f5b082ff +2012-07-18T20:32:26.319595Z +190 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1902 + +GTLQuery.m +file + + + + +2012-12-09T08:42:33.000000Z +00e710bda0d65a08f208b515f235eff5 +2011-11-07T21:13:21.467164Z +90 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +7912 + +GTLObject.m +file + + + + +2012-12-09T08:42:33.000000Z +18d073e60e4b30f71cf1d6870272393c +2012-12-06T21:45:46.693811Z +249 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +23387 + +GTLBatchQuery.m +file + + + + +2012-12-09T08:42:33.000000Z +a25adec1c8e1c9bfaa67c775113119ac +2012-05-30T00:32:14.609394Z +157 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3695 + +GTLUploadParameters.m +file + + + + +2012-12-09T08:42:33.000000Z +9dceadba4c1609b7fa47e3ce9fbfff4e +2012-06-19T21:52:36.704909Z +169 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3105 + +GTLErrorObject.h +file + + + + +2012-12-09T08:42:33.000000Z +57fc05a8055b7759166507ac280e2e16 +2011-09-21T22:16:00.375586Z +60 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1414 + +GTLBatchResult.h +file + + + + +2012-12-09T08:42:33.000000Z +c803937ccd13007f2aa0ec7fa17f8936 +2011-12-06T19:55:58.945157Z +117 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1841 + diff --git a/GTL/Source/Objects/.svn/text-base/GTLBatchQuery.h.svn-base b/GTL/Source/Objects/.svn/text-base/GTLBatchQuery.h.svn-base new file mode 100644 index 0000000..2f20137 --- /dev/null +++ b/GTL/Source/Objects/.svn/text-base/GTLBatchQuery.h.svn-base @@ -0,0 +1,52 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBatchQuery.h +// + +// Batch query documentation: +// https://code.google.com/p/google-api-objectivec-client/wiki/Introduction#Batch_Operations + +#import "GTLQuery.h" + +@interface GTLBatchQuery : NSObject { + @private + NSMutableArray *queries_; + NSMutableDictionary *requestIDMap_; + BOOL skipAuthorization_; + NSDictionary *additionalHTTPHeaders_; +} + +// Queries included in this batch. Each query should have a unique requestID. +@property (retain) NSArray *queries; + +// Clients may set this to YES to disallow authorization. Defaults to NO. +@property (assign) BOOL shouldSkipAuthorization; + +// Any additional HTTP headers for this batch. +// +// These headers override the same keys from the service object's +// additionalHTTPHeaders. +@property (copy) NSDictionary *additionalHTTPHeaders; + ++ (id)batchQuery; ++ (id)batchQueryWithQueries:(NSArray *)array; + +- (void)addQuery:(GTLQuery *)query; + +- (GTLQuery *)queryForRequestID:(NSString *)requestID; + +@end diff --git a/GTL/Source/Objects/.svn/text-base/GTLBatchQuery.m.svn-base b/GTL/Source/Objects/.svn/text-base/GTLBatchQuery.m.svn-base new file mode 100644 index 0000000..f62eaca --- /dev/null +++ b/GTL/Source/Objects/.svn/text-base/GTLBatchQuery.m.svn-base @@ -0,0 +1,133 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBatchQuery.m +// + +#import "GTLBatchQuery.h" + +@implementation GTLBatchQuery + +@synthesize shouldSkipAuthorization = skipAuthorization_, + additionalHTTPHeaders = additionalHTTPHeaders_; + ++ (id)batchQuery { + GTLBatchQuery *obj = [[[self alloc] init] autorelease]; + return obj; +} + ++ (id)batchQueryWithQueries:(NSArray *)queries { + GTLBatchQuery *obj = [self batchQuery]; + obj.queries = queries; + return obj; +} + +- (id)copyWithZone:(NSZone *)zone { + // Deep copy the list of queries + NSArray *copiesOfQueries = [[[NSArray alloc] initWithArray:self.queries + copyItems:YES] autorelease]; + GTLBatchQuery *newBatch = [[[self class] allocWithZone:zone] init]; + newBatch.queries = copiesOfQueries; + newBatch.shouldSkipAuthorization = self.shouldSkipAuthorization; + newBatch.additionalHTTPHeaders = self.additionalHTTPHeaders; + return newBatch; +} + +- (void)dealloc { + [queries_ release]; + [additionalHTTPHeaders_ release]; + [requestIDMap_ release]; + + [super dealloc]; +} + +- (NSString *)description { + NSArray *queries = self.queries; + NSArray *methodNames = [queries valueForKey:@"methodName"]; + NSArray *dedupedNames = [[NSSet setWithArray:methodNames] allObjects]; + NSString *namesStr = [dedupedNames componentsJoinedByString:@","]; + + return [NSString stringWithFormat:@"%@ %p (queries:%lu methods:%@)", + [self class], self, (unsigned long) [queries count], namesStr]; +} + +#pragma mark - + +- (BOOL)isBatchQuery { + return YES; +} + +- (GTLUploadParameters *)uploadParameters { + // File upload is not supported for batches + return nil; +} + +- (void)executionDidStop { + NSArray *queries = self.queries; + [queries makeObjectsPerformSelector:@selector(executionDidStop)]; +} + +- (GTLQuery *)queryForRequestID:(NSString *)requestID { + GTLQuery *result = [requestIDMap_ objectForKey:requestID]; + if (result) return result; + + // We've not before tried to look up a query, or the map is stale + [requestIDMap_ release]; + requestIDMap_ = [[NSMutableDictionary alloc] init]; + + for (GTLQuery *query in queries_) { + [requestIDMap_ setObject:query forKey:query.requestID]; + } + + result = [requestIDMap_ objectForKey:requestID]; + return result; +} + +#pragma mark - + +- (void)setQueries:(NSArray *)array { +#if DEBUG + for (id obj in array) { + GTLQuery *query = obj; + GTL_DEBUG_ASSERT([query isKindOfClass:[GTLQuery class]], + @"unexpected query class: %@", [obj class]); + GTL_DEBUG_ASSERT(query.uploadParameters == nil, + @"batch may not contain upload: %@", query); + } +#endif + + [queries_ autorelease]; + queries_ = [array mutableCopy]; +} + +- (NSArray *)queries { + return queries_; +} + +- (void)addQuery:(GTLQuery *)query { + GTL_DEBUG_ASSERT([query isKindOfClass:[GTLQuery class]], + @"unexpected query class: %@", [query class]); + GTL_DEBUG_ASSERT(query.uploadParameters == nil, + @"batch may not contain upload: %@", query); + + if (queries_ == nil) { + queries_ = [[NSMutableArray alloc] init]; + } + + [queries_ addObject:query]; +} + +@end diff --git a/GTL/Source/Objects/.svn/text-base/GTLBatchResult.h.svn-base b/GTL/Source/Objects/.svn/text-base/GTLBatchResult.h.svn-base new file mode 100644 index 0000000..9675aaf --- /dev/null +++ b/GTL/Source/Objects/.svn/text-base/GTLBatchResult.h.svn-base @@ -0,0 +1,58 @@ +/* Copyright (c) 2011 Google Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// +// GTLBatchResult.h +// + +#import "GTLObject.h" + +@interface GTLBatchResult : GTLObject { + @private + NSMutableDictionary *successes_; + NSMutableDictionary *failures_; +} + +// Dictionaries of results for all queries in the batch +// +// Dictionary keys are requestID strings; objects are results or +// GTLErrorObjects. +// +// For successes with no returned object (such as from delete operations), +// the object for the dictionary entry is NSNull. +// +// +// The original query for each result is available from the service ticket, +// for example +// +// NSDictionary *successes = batchResults.successes; +// for (NSString *requestID in successes) { +// GTLObject *obj = [successes objectForKey:requestID]; +// GTLQuery *query = [ticket queryForRequestID:requestID]; +// NSLog(@"Query %@ returned object %@", query, obj); +// } +// +// NSDictionary *failures = batchResults.failures; +// for (NSString *requestID in failures) { +// GTLErrorObject *errorObj = [failures objectForKey:requestID]; +// GTLQuery *query = [ticket queryForRequestID:requestID]; +// NSLog(@"Query %@ failed with error %@", query, errorObj); +// } +// + +@property (retain) NSMutableDictionary *successes; +@property (retain) NSMutableDictionary *failures; + +@end diff --git a/GTL/Source/Objects/.svn/text-base/GTLBatchResult.m.svn-base b/GTL/Source/Objects/.svn/text-base/GTLBatchResult.m.svn-base new file mode 100644 index 0000000..f17748d --- /dev/null +++ b/GTL/Source/Objects/.svn/text-base/GTLBatchResult.m.svn-base @@ -0,0 +1,92 @@ +/* Copyright (c) 2011 Google Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// +// GTLBatchResult.m +// + +#import "GTLBatchResult.h" + +#import "GTLErrorObject.h" + +@implementation GTLBatchResult + +@synthesize successes = successes_, + failures = failures_; + +- (id)copyWithZone:(NSZone *)zone { + GTLBatchResult* newObject = [super copyWithZone:zone]; + newObject.successes = [[self.successes mutableCopyWithZone:zone] autorelease]; + newObject.failures = [[self.failures mutableCopyWithZone:zone] autorelease]; + return newObject; +} + +- (void)dealloc { + [successes_ release]; + [failures_ release]; + + [super dealloc]; +} + +- (NSString *)description { + return [NSString stringWithFormat:@"%@ %p (successes:%lu failures:%lu)", + [self class], self, + (unsigned long) [self.successes count], + (unsigned long) [self.failures count]]; +} + +#pragma mark - + +- (void)createItemsWithClassMap:(NSDictionary *)batchClassMap { + // This is called by GTLObject objectForJSON:defaultClass: + // JSON is defined to be a dictionary, but for batch results, it really + // is any array. + id json = self.JSON; + GTL_DEBUG_ASSERT([json isKindOfClass:[NSArray class]], + @"didn't get an array for the batch results"); + NSArray *jsonArray = json; + + NSMutableDictionary *successes = [NSMutableDictionary dictionary]; + NSMutableDictionary *failures = [NSMutableDictionary dictionary]; + + for (NSMutableDictionary *rpcResponse in jsonArray) { + NSString *responseID = [rpcResponse objectForKey:@"id"]; + + NSMutableDictionary *errorJSON = [rpcResponse objectForKey:@"error"]; + if (errorJSON) { + GTLErrorObject *errorObject = [GTLErrorObject objectWithJSON:errorJSON]; + [failures setValue:errorObject forKey:responseID]; + } else { + NSMutableDictionary *resultJSON = [rpcResponse objectForKey:@"result"]; + + NSDictionary *surrogates = self.surrogates; + Class defaultClass = [batchClassMap objectForKey:responseID]; + + id resultObject = [[self class] objectForJSON:resultJSON + defaultClass:defaultClass + surrogates:surrogates + batchClassMap:nil]; + if (resultObject == nil) { + // methods like delete return no object + resultObject = [NSNull null]; + } + [successes setValue:resultObject forKey:responseID]; + } + } + self.successes = successes; + self.failures = failures; +} + +@end diff --git a/GTL/Source/Objects/.svn/text-base/GTLDateTime.h.svn-base b/GTL/Source/Objects/.svn/text-base/GTLDateTime.h.svn-base new file mode 100644 index 0000000..f6b1ffb --- /dev/null +++ b/GTL/Source/Objects/.svn/text-base/GTLDateTime.h.svn-base @@ -0,0 +1,60 @@ +/* Copyright (c) 2011 Google Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// +// GTLDateTime.h +// +// This is an immutable class representing a date and optionally a +// time with time zone. +// + +#import +#import "GTLDefines.h" + +@interface GTLDateTime : NSObject { + NSDateComponents *dateComponents_; + NSInteger milliseconds_; // This is only for the fraction of a second 0-999 + NSInteger offsetSeconds_; // may be NSUndefinedDateComponent + BOOL isUniversalTime_; // preserves "Z" + NSTimeZone *timeZone_; // specific time zone by name, if known +} + ++ (GTLDateTime *)dateTimeWithRFC3339String:(NSString *)str; + +// timeZone may be nil if the time zone is not known. ++ (GTLDateTime *)dateTimeWithDate:(NSDate *)date timeZone:(NSTimeZone *)tz; + +// Use this method to make a dateTime for an all-day event (date only, so +// hasTime is NO.) ++ (GTLDateTime *)dateTimeForAllDayWithDate:(NSDate *)date; + ++ (GTLDateTime *)dateTimeWithDateComponents:(NSDateComponents *)date; + +@property (nonatomic, readonly) NSDate *date; +@property (nonatomic, readonly) NSCalendar *calendar; + +@property (nonatomic, readonly) NSString *RFC3339String; +@property (nonatomic, readonly) NSString *stringValue; // same as RFC3339String + +@property (nonatomic, readonly, retain) NSTimeZone *timeZone; +@property (nonatomic, readonly, copy) NSDateComponents *dateComponents; +@property (nonatomic, readonly) NSInteger milliseconds; // This is only for the fraction of a second 0-999 + +@property (nonatomic, readonly) BOOL hasTime; +@property (nonatomic, readonly) NSInteger offsetSeconds; +@property (nonatomic, readonly, getter=isUniversalTime) BOOL universalTime; + + +@end diff --git a/GTL/Source/Objects/.svn/text-base/GTLDateTime.m.svn-base b/GTL/Source/Objects/.svn/text-base/GTLDateTime.m.svn-base new file mode 100644 index 0000000..632943d --- /dev/null +++ b/GTL/Source/Objects/.svn/text-base/GTLDateTime.m.svn-base @@ -0,0 +1,446 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDateTime.m +// + +#import "GTLDateTime.h" + +@interface GTLDateTime () + +- (void)setFromDate:(NSDate *)date timeZone:(NSTimeZone *)tz; +- (void)setFromRFC3339String:(NSString *)str; + +@property (nonatomic, retain, readwrite) NSTimeZone *timeZone; +@property (nonatomic, copy, readwrite) NSDateComponents *dateComponents; +@property (nonatomic, assign, readwrite) NSInteger milliseconds; + +@property (nonatomic, assign, readwrite) BOOL hasTime; +@property (nonatomic, assign, readwrite) NSInteger offsetSeconds; +@property (nonatomic, assign, getter=isUniversalTime, readwrite) BOOL universalTime; + +@end + +@implementation GTLDateTime + +// A note about milliseconds_: +// RFC 3339 has support for fractions of a second. NSDateComponents is all +// NSInteger based, so it can't handle a fraction of a second. NSDate is +// built on NSTimeInterval so it has sub-millisecond precision. GTL takes +// the compromise of supporting the RFC's optional fractional second support +// by maintaining a number of milliseconds past what fits in the +// NSDateComponents. The parsing and string conversions will include +// 3 decimal digits (hence milliseconds). When going to a string, the decimal +// digits are only included if the milliseconds are non zero. + +@dynamic date; +@dynamic calendar; +@dynamic RFC3339String; +@dynamic stringValue; +@dynamic timeZone; +@dynamic hasTime; + +@synthesize dateComponents = dateComponents_, + milliseconds = milliseconds_, + offsetSeconds = offsetSeconds_, + universalTime = isUniversalTime_; + ++ (GTLDateTime *)dateTimeWithRFC3339String:(NSString *)str { + if (str == nil) return nil; + + GTLDateTime *result = [[[self alloc] init] autorelease]; + [result setFromRFC3339String:str]; + return result; +} + ++ (GTLDateTime *)dateTimeWithDate:(NSDate *)date timeZone:(NSTimeZone *)tz { + if (date == nil) return nil; + + GTLDateTime *result = [[[self alloc] init] autorelease]; + [result setFromDate:date timeZone:tz]; + return result; +} + ++ (GTLDateTime *)dateTimeForAllDayWithDate:(NSDate *)date { + if (date == nil) return nil; + + GTLDateTime *result = [[[self alloc] init] autorelease]; + [result setFromDate:date timeZone:nil]; + result.hasTime = NO; + return result; +} + ++ (GTLDateTime *)dateTimeWithDateComponents:(NSDateComponents *)components { + NSCalendar *cal = [[[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar] autorelease]; + NSDate *date = [cal dateFromComponents:components]; +#if GTL_IPHONE + NSTimeZone *tz = [components timeZone]; +#else + // NSDateComponents added timeZone: in Mac OS X 10.7. + NSTimeZone *tz = nil; + if ([components respondsToSelector:@selector(timeZone)]) { + tz = [components timeZone]; + } +#endif + return [self dateTimeWithDate:date timeZone:tz]; +} + +- (void)dealloc { + [dateComponents_ release]; + [timeZone_ release]; + [super dealloc]; +} + +- (id)copyWithZone:(NSZone *)zone { + // Object is immutable + return [self retain]; +} + +// until NSDateComponent implements isEqual, we'll use this +- (BOOL)doesDateComponents:(NSDateComponents *)dc1 + equalDateComponents:(NSDateComponents *)dc2 { + + return [dc1 era] == [dc2 era] + && [dc1 year] == [dc2 year] + && [dc1 month] == [dc2 month] + && [dc1 day] == [dc2 day] + && [dc1 hour] == [dc2 hour] + && [dc1 minute] == [dc2 minute] + && [dc1 second] == [dc2 second] + && [dc1 week] == [dc2 week] + && [dc1 weekday] == [dc2 weekday] + && [dc1 weekdayOrdinal] == [dc2 weekdayOrdinal]; +} + +- (BOOL)isEqual:(GTLDateTime *)other { + + if (self == other) return YES; + if (![other isKindOfClass:[GTLDateTime class]]) return NO; + + BOOL areDateComponentsEqual = [self doesDateComponents:self.dateComponents + equalDateComponents:other.dateComponents]; + NSTimeZone *tz1 = self.timeZone; + NSTimeZone *tz2 = other.timeZone; + BOOL areTimeZonesEqual = (tz1 == tz2 || (tz2 && [tz1 isEqual:tz2])); + + return self.offsetSeconds == other.offsetSeconds + && self.isUniversalTime == other.isUniversalTime + && self.milliseconds == other.milliseconds + && areDateComponentsEqual + && areTimeZonesEqual; +} + +- (NSString *)description { + return [NSString stringWithFormat:@"%@ %p: {%@}", + [self class], self, self.RFC3339String]; +} + +- (NSTimeZone *)timeZone { + if (timeZone_) { + return timeZone_; + } + + if (self.isUniversalTime) { + NSTimeZone *ztz = [NSTimeZone timeZoneWithName:@"Universal"]; + return ztz; + } + + NSInteger offsetSeconds = self.offsetSeconds; + + if (offsetSeconds != NSUndefinedDateComponent) { + NSTimeZone *tz = [NSTimeZone timeZoneForSecondsFromGMT:offsetSeconds]; + return tz; + } + return nil; +} + +- (void)setTimeZone:(NSTimeZone *)timeZone { + [timeZone_ release]; + timeZone_ = [timeZone retain]; + + if (timeZone) { + NSInteger offsetSeconds = [timeZone secondsFromGMTForDate:self.date]; + self.offsetSeconds = offsetSeconds; + } else { + self.offsetSeconds = NSUndefinedDateComponent; + } +} + +- (NSCalendar *)calendar { + NSCalendar *cal = [[[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar] autorelease]; + NSTimeZone *tz = self.timeZone; + if (tz) { + [cal setTimeZone:tz]; + } + return cal; +} + +- (NSDate *)date { + NSCalendar *cal = self.calendar; + NSDateComponents *dateComponents = self.dateComponents; + NSTimeInterval extraMillisecondsAsSeconds = 0.0; + + if (!self.hasTime) { + // we're not keeping track of a time, but NSDate always is based on + // an absolute time. We want to avoid returning an NSDate where the + // calendar date appears different from what was used to create our + // date-time object. + // + // We'll make a copy of the date components, setting the time on our + // copy to noon GMT, since that ensures the date renders correctly for + // any time zone + NSDateComponents *noonDateComponents = [[dateComponents copy] autorelease]; + [noonDateComponents setHour:12]; + [noonDateComponents setMinute:0]; + [noonDateComponents setSecond:0]; + dateComponents = noonDateComponents; + + NSTimeZone *gmt = [NSTimeZone timeZoneWithName:@"Universal"]; + [cal setTimeZone:gmt]; + } else { + // Add in the fractional seconds that don't fit into NSDateComponents. + extraMillisecondsAsSeconds = ((NSTimeInterval)self.milliseconds) / 1000.0; + } + + NSDate *date = [cal dateFromComponents:dateComponents]; + + // Add in any milliseconds that didn't fit into the dateComponents. + if (extraMillisecondsAsSeconds > 0.0) { +#if GTL_IPHONE || (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_5) + date = [date dateByAddingTimeInterval:extraMillisecondsAsSeconds]; +#else + date = [date addTimeInterval:extraMillisecondsAsSeconds]; +#endif + } + + return date; +} + +- (NSString *)stringValue { + return self.RFC3339String; +} + +- (NSString *)RFC3339String { + NSDateComponents *dateComponents = self.dateComponents; + NSInteger offset = self.offsetSeconds; + + NSString *timeString = @""; // timeString like "T15:10:46-08:00" + + if (self.hasTime) { + + NSString *timeOffsetString; // timeOffsetString like "-08:00" + + if (self.isUniversalTime) { + timeOffsetString = @"Z"; + } else if (offset == NSUndefinedDateComponent) { + // unknown offset is rendered as -00:00 per + // http://www.ietf.org/rfc/rfc3339.txt section 4.3 + timeOffsetString = @"-00:00"; + } else { + NSString *sign = @"+"; + if (offset < 0) { + sign = @"-"; + offset = -offset; + } + timeOffsetString = [NSString stringWithFormat:@"%@%02ld:%02ld", + sign, (long)(offset/(60*60)) % 24, (long)(offset / 60) % 60]; + } + + NSString *fractionalSecondsString = @""; + if (self.milliseconds > 0.0) { + fractionalSecondsString = [NSString stringWithFormat:@".%03ld", (long)self.milliseconds]; + } + + timeString = [NSString stringWithFormat:@"T%02ld:%02ld:%02ld%@%@", + (long)[dateComponents hour], (long)[dateComponents minute], + (long)[dateComponents second], fractionalSecondsString, timeOffsetString]; + } + + // full dateString like "2006-11-17T15:10:46-08:00" + NSString *dateString = [NSString stringWithFormat:@"%04ld-%02ld-%02ld%@", + (long)[dateComponents year], (long)[dateComponents month], + (long)[dateComponents day], timeString]; + + return dateString; +} + +- (void)setFromDate:(NSDate *)date timeZone:(NSTimeZone *)tz { + NSCalendar *cal = [[[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar] autorelease]; + if (tz) { + [cal setTimeZone:tz]; + } + + NSUInteger const kComponentBits = (NSYearCalendarUnit | NSMonthCalendarUnit + | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit + | NSSecondCalendarUnit); + + NSDateComponents *components = [cal components:kComponentBits fromDate:date]; + self.dateComponents = components; + + // Extract the fractional seconds. + NSTimeInterval asTimeInterval = [date timeIntervalSince1970]; + NSTimeInterval worker = asTimeInterval - trunc(asTimeInterval); + self.milliseconds = (NSInteger)round(worker * 1000.0); + + self.universalTime = NO; + + NSInteger offset = NSUndefinedDateComponent; + + if (tz) { + offset = [tz secondsFromGMTForDate:date]; + + if (offset == 0 && [tz isEqualToTimeZone:[NSTimeZone timeZoneWithName:@"Universal"]]) { + self.universalTime = YES; + } + } + self.offsetSeconds = offset; + + // though offset seconds are authoritative, we'll retain the time zone + // since we can't regenerate it reliably from just the offset + timeZone_ = [tz retain]; +} + +- (void)setFromRFC3339String:(NSString *)str { + + NSInteger year = NSUndefinedDateComponent; + NSInteger month = NSUndefinedDateComponent; + NSInteger day = NSUndefinedDateComponent; + NSInteger hour = NSUndefinedDateComponent; + NSInteger minute = NSUndefinedDateComponent; + NSInteger sec = NSUndefinedDateComponent; + NSInteger milliseconds = 0; + double secDouble = -1.0; + NSString* sign = nil; + NSInteger offsetHour = 0; + NSInteger offsetMinute = 0; + + if ([str length] > 0) { + NSScanner* scanner = [NSScanner scannerWithString:str]; + // There should be no whitespace, so no skip characters. + [scanner setCharactersToBeSkipped:nil]; + + NSCharacterSet* dashSet = [NSCharacterSet characterSetWithCharactersInString:@"-"]; + NSCharacterSet* tSet = [NSCharacterSet characterSetWithCharactersInString:@"Tt "]; + NSCharacterSet* colonSet = [NSCharacterSet characterSetWithCharactersInString:@":"]; + NSCharacterSet* plusMinusZSet = [NSCharacterSet characterSetWithCharactersInString:@"+-zZ"]; + + // for example, scan 2006-11-17T15:10:46-08:00 + // or 2006-11-17T15:10:46Z + if (// yyyy-mm-dd + [scanner scanInteger:&year] && + [scanner scanCharactersFromSet:dashSet intoString:NULL] && + [scanner scanInteger:&month] && + [scanner scanCharactersFromSet:dashSet intoString:NULL] && + [scanner scanInteger:&day] && + // Thh:mm:ss + [scanner scanCharactersFromSet:tSet intoString:NULL] && + [scanner scanInteger:&hour] && + [scanner scanCharactersFromSet:colonSet intoString:NULL] && + [scanner scanInteger:&minute] && + [scanner scanCharactersFromSet:colonSet intoString:NULL] && + [scanner scanDouble:&secDouble]) { + + // At this point we got secDouble, pull it apart. + sec = (NSInteger)secDouble; + double worker = secDouble - ((double)sec); + milliseconds = (NSInteger)round(worker * 1000.0); + + // Finish parsing, now the offset info. + if (// Z or +hh:mm + [scanner scanCharactersFromSet:plusMinusZSet intoString:&sign] && + [scanner scanInteger:&offsetHour] && + [scanner scanCharactersFromSet:colonSet intoString:NULL] && + [scanner scanInteger:&offsetMinute]) { + } + } + } + + NSDateComponents *dateComponents = [[[NSDateComponents alloc] init] autorelease]; + [dateComponents setYear:year]; + [dateComponents setMonth:month]; + [dateComponents setDay:day]; + [dateComponents setHour:hour]; + [dateComponents setMinute:minute]; + [dateComponents setSecond:sec]; + + self.dateComponents = dateComponents; + self.milliseconds = milliseconds; + + // determine the offset, like from Z, or -08:00:00.0 + + self.timeZone = nil; + + NSInteger totalOffset = NSUndefinedDateComponent; + self.universalTime = NO; + + if ([sign caseInsensitiveCompare:@"Z"] == NSOrderedSame) { + + self.universalTime = YES; + totalOffset = 0; + + } else if (sign != nil) { + + totalOffset = (60 * offsetMinute) + (60 * 60 * offsetHour); + + if ([sign isEqual:@"-"]) { + + if (totalOffset == 0) { + // special case: offset of -0.00 means undefined offset + totalOffset = NSUndefinedDateComponent; + } else { + totalOffset *= -1; + } + } + } + + self.offsetSeconds = totalOffset; +} + +- (BOOL)hasTime { + NSDateComponents *dateComponents = self.dateComponents; + + BOOL hasTime = ([dateComponents hour] != NSUndefinedDateComponent + && [dateComponents minute] != NSUndefinedDateComponent); + + return hasTime; +} + +- (void)setHasTime:(BOOL)shouldHaveTime { + + // we'll set time values to zero or NSUndefinedDateComponent as appropriate + BOOL hadTime = self.hasTime; + + if (shouldHaveTime && !hadTime) { + [dateComponents_ setHour:0]; + [dateComponents_ setMinute:0]; + [dateComponents_ setSecond:0]; + milliseconds_ = 0; + offsetSeconds_ = NSUndefinedDateComponent; + isUniversalTime_ = NO; + + } else if (hadTime && !shouldHaveTime) { + [dateComponents_ setHour:NSUndefinedDateComponent]; + [dateComponents_ setMinute:NSUndefinedDateComponent]; + [dateComponents_ setSecond:NSUndefinedDateComponent]; + milliseconds_ = 0; + offsetSeconds_ = NSUndefinedDateComponent; + isUniversalTime_ = NO; + self.timeZone = nil; + } +} + + +@end diff --git a/GTL/Source/Objects/.svn/text-base/GTLErrorObject.h.svn-base b/GTL/Source/Objects/.svn/text-base/GTLErrorObject.h.svn-base new file mode 100644 index 0000000..c2ec67d --- /dev/null +++ b/GTL/Source/Objects/.svn/text-base/GTLErrorObject.h.svn-base @@ -0,0 +1,45 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLErrorObject.h +// + +#import "GTLObject.h" + +@class GTLErrorObjectData; + +@interface GTLErrorObject : GTLObject +@property (retain) NSNumber *code; +@property (retain) NSString *message; +@property (retain) NSArray *data; // of GTLErrorObjectData + +// Convenience accessor for creating an NSError from a GTLErrorObject. +@property (readonly) NSError *foundationError; + +// Convenience accessor for extracting the GTLErrorObject that was used to +// create an NSError. +// +// Returns nil if the error was not originally from a GTLErrorObject. ++ (GTLErrorObject *)underlyingObjectForError:(NSError *)foundationError; + +@end + +@interface GTLErrorObjectData : GTLObject +@property (retain) NSString *domain; +@property (retain) NSString *reason; +@property (retain) NSString *message; +@property (retain) NSString *location; +@end diff --git a/GTL/Source/Objects/.svn/text-base/GTLErrorObject.m.svn-base b/GTL/Source/Objects/.svn/text-base/GTLErrorObject.m.svn-base new file mode 100644 index 0000000..1fa1023 --- /dev/null +++ b/GTL/Source/Objects/.svn/text-base/GTLErrorObject.m.svn-base @@ -0,0 +1,78 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLErrorObject.m +// + +#import "GTLErrorObject.h" +#import "GTLService.h" + +@implementation GTLErrorObject + +@dynamic code; +@dynamic message; +@dynamic data; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = [NSDictionary dictionaryWithObject:[GTLErrorObjectData class] + forKey:@"data"]; + return map; +} + +- (NSError *)foundationError { + NSMutableDictionary *userInfo; + + // This structured GTLErrorObject will be available in the error's userInfo + // dictionary + userInfo = [NSMutableDictionary dictionaryWithObject:self + forKey:kGTLStructuredErrorKey]; + + NSString *reasonStr = self.message; + if (reasonStr) { + // We always store an error in the userInfo key "error" + [userInfo setObject:reasonStr + forKey:kGTLServerErrorStringKey]; + + // Store a user-readable "reason" to show up when an error is logged, + // in parentheses like NSError does it + NSString *parenthesized = [NSString stringWithFormat:@"(%@)", reasonStr]; + [userInfo setObject:parenthesized + forKey:NSLocalizedFailureReasonErrorKey]; + } + + NSInteger code = [self.code integerValue]; + NSError *error = [NSError errorWithDomain:kGTLJSONRPCErrorDomain + code:code + userInfo:userInfo]; + return error; +} + ++ (GTLErrorObject *)underlyingObjectForError:(NSError *)foundationError { + NSDictionary *userInfo = [foundationError userInfo]; + GTLErrorObject *errorObj = [userInfo objectForKey:kGTLStructuredErrorKey]; + return errorObj; +} + +@end + +@implementation GTLErrorObjectData +@dynamic domain; +@dynamic reason; +@dynamic message; +@dynamic location; +@end + + diff --git a/GTL/Source/Objects/.svn/text-base/GTLObject.h.svn-base b/GTL/Source/Objects/.svn/text-base/GTLObject.h.svn-base new file mode 100644 index 0000000..42d79fe --- /dev/null +++ b/GTL/Source/Objects/.svn/text-base/GTLObject.h.svn-base @@ -0,0 +1,206 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLObject.h +// + +// GTLObject documentation: +// https://code.google.com/p/google-api-objectivec-client/wiki/Introduction#Objects_and_Queries + +#import + +#import "GTLDefines.h" +#import "GTLUtilities.h" +#import "GTLDateTime.h" + +#undef _EXTERN +#undef _INITIALIZE_AS +#ifdef GTLOBJECT_DEFINE_GLOBALS +#define _EXTERN +#define _INITIALIZE_AS(x) =x +#else +#define _EXTERN extern +#define _INITIALIZE_AS(x) +#endif + +@protocol GTLCollectionProtocol +@optional +@property (retain) NSArray *items; +@end + +@protocol GTLBatchItemCreationProtocol +- (void)createItemsWithClassMap:(NSDictionary *)batchClassMap; +@end + +@interface GTLObject : NSObject { + + @private + + NSMutableDictionary *json_; + + // Used when creating the subobjects from this one. + NSDictionary *surrogates_; + + // Any complex object hung off this object goes into the cache so the + // next fetch will get the same object back instead of having to recreate + // it. + NSMutableDictionary *childCache_; + + // Anything defined by the client; retained but not used internally; not + // copied by copyWithZone: + NSMutableDictionary *userProperties_; +} + +@property (nonatomic, retain) NSMutableDictionary *JSON; +@property (nonatomic, retain) NSDictionary *surrogates; +@property (nonatomic, retain) NSMutableDictionary *userProperties; + +/////////////////////////////////////////////////////////////////////////////// +// +// Public methods +// +// These methods are intended for users of the library +// + ++ (id)object; ++ (id)objectWithJSON:(NSMutableDictionary *)dict; + +- (id)copyWithZone:(NSZone *)zone; + +- (NSString *)JSONString; + +// generic access to json; also creates it if necessary +- (void)setJSONValue:(id)obj forKey:(NSString *)key; +- (id)JSONValueForKey:(NSString *)key; + +// Returns the list of keys in this object's JSON that aren't listed as +// properties on the object. +- (NSArray *)additionalJSONKeys; + +// Any keys in the JSON that aren't listed as @properties on the object +// are counted as "additional properties". These allow you to get/set them. +- (id)additionalPropertyForName:(NSString *)name; +- (void)setAdditionalProperty:(id)obj forName:(NSString *)name; +- (NSDictionary *)additionalProperties; + +// User properties are supported for client convenience, but are not copied by +// copyWithZone. User Properties keys beginning with _ are reserved by the library. +- (void)setProperty:(id)obj forKey:(NSString *)key; // pass nil obj to remove property +- (id)propertyForKey:(NSString *)key; + +// userData is stored as a property with key "_userData" +- (void)setUserData:(id)obj; +- (id)userData; + +// Makes a partial query-compatible string describing the fields present +// in this object. (Note: only the first element of any array is examined.) +// +// http://code.google.com/apis/tasks/v1/performance.html#partial +// +- (NSString *)fieldsDescription; + +// Makes an object containing only the changes needed to do a partial update +// (patch), where the patch would be to change an object from the original +// to the receiver, such as +// +// GTLSomeObject *patchObject = [newVersion patchObjectFromOriginal:oldVersion]; +// +// http://code.google.com/apis/tasks/v1/performance.html#patch +// +// NOTE: this method returns nil if there are no changes between the original +// and the receiver. +- (id)patchObjectFromOriginal:(GTLObject *)original; + +// Method creating a null value to set object properties for patch queries that +// delete fields. Do not use this except when setting an object property for +// a patch query. ++ (id)nullValue; + +/////////////////////////////////////////////////////////////////////////////// +// +// Protected methods +// +// These methods are intended for subclasses of GTLObject +// + +// class registration ("kind" strings) for subclasses ++ (Class)registeredObjectClassForKind:(NSString *)kind; ++ (void)registerObjectClassForKind:(NSString *)kind; + +// creation of objects from a JSON dictionary ++ (GTLObject *)objectForJSON:(NSMutableDictionary *)json + defaultClass:(Class)defaultClass + surrogates:(NSDictionary *)surrogates + batchClassMap:(NSDictionary *)batchClassMap; + +// property-to-key mapping (for JSON keys which are not used as method names) ++ (NSDictionary *)propertyToJSONKeyMap; + +// property-to-Class mapping for array properties (to say what is in the array) ++ (NSDictionary *)arrayPropertyToClassMap; + +// The default class for additional JSON keys ++ (Class)classForAdditionalProperties; + +@end + +// Collection objects with an "items" property should derive from GTLCollection +// object. This provides support for fast object enumeration, the +// itemAtIndex: convenience method, and indexed subscripts. +// +// Subclasses must implement the items method dynamically. +@interface GTLCollectionObject : GTLObject { + @private + NSDictionary *identifierMap_; +} + +// itemAtIndex: and objectAtIndexedSubscript: return nil when the index exceeds +// the bounds of the items array. +- (id)itemAtIndex:(NSUInteger)idx; + +- (id)objectAtIndexedSubscript:(NSInteger)idx; + +// itemForIdentifier: looks up items from the collection object by identifier, +// and returns the first one. +// +// Typically, items will have a unique identifier (with key "id" in the +// object's JSON). This method returns the first item found in the collection +// with the specified identifier. +// +// The first time this method is used, the collection will cache a map of +// identifiers to items. If the items list for the instance somehow changes, +// use the reset method below to force a new cache to be created for this +// collection. +- (id)itemForIdentifier:(NSString *)key; + +// Identifiers for all items are cached when the first one is obtained. +// This method resets the cache. It is needed only if the item list has +// changed. +- (void)resetIdentifierMap; + +@end + +@interface GTLCollectionObject (DynamicMethods) +- (NSArray *)items; +@end + +// Base object use for when an service method directly returns an array instead +// of an object. Normally methods should return an object with an 'items' +// property, this exists for the methods not up to spec. +@interface GTLResultArray : GTLCollectionObject +// This method should only be called by subclasses. +- (NSArray *)itemsWithItemClass:(Class)itemClass; +@end diff --git a/GTL/Source/Objects/.svn/text-base/GTLObject.m.svn-base b/GTL/Source/Objects/.svn/text-base/GTLObject.m.svn-base new file mode 100644 index 0000000..83c2d19 --- /dev/null +++ b/GTL/Source/Objects/.svn/text-base/GTLObject.m.svn-base @@ -0,0 +1,722 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLObject.m +// + +#define GTLOBJECT_DEFINE_GLOBALS 1 + +#include + +#import "GTLObject.h" +#import "GTLRuntimeCommon.h" +#import "GTLJSONParser.h" + +static NSString *const kUserDataPropertyKey = @"_userData"; + +@interface GTLObject () ++ (NSMutableArray *)allDeclaredProperties; ++ (NSArray *)allKnownKeys; + ++ (NSArray *)fieldsElementsForJSON:(NSDictionary *)targetJSON; ++ (NSString *)fieldsDescriptionForJSON:(NSDictionary *)targetJSON; + ++ (NSMutableDictionary *)patchDictionaryForJSON:(NSDictionary *)newJSON + fromOriginalJSON:(NSDictionary *)originalJSON; +@end + +@implementation GTLObject + +@synthesize JSON = json_, + surrogates = surrogates_, + userProperties = userProperties_; + ++ (id)object { + return [[[self alloc] init] autorelease]; +} + ++ (id)objectWithJSON:(NSMutableDictionary *)dict { + GTLObject *obj = [self object]; + obj.JSON = dict; + return obj; +} + ++ (NSDictionary *)propertyToJSONKeyMap { + return nil; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + return nil; +} + ++ (Class)classForAdditionalProperties { + return Nil; +} + +- (BOOL)isEqual:(GTLObject *)other { + if (self == other) return YES; + if (other == nil) return NO; + + // The objects should be the same class, or one should be a subclass of the + // other's class + if (![other isKindOfClass:[self class]] + && ![self isKindOfClass:[other class]]) return NO; + + // What we're not comparing here: + // properties + return GTL_AreEqualOrBothNil(json_, [other JSON]); +} + +// By definition, for two objects to potentially be considered equal, +// they must have the same hash value. The hash is mostly ignored, +// but removeObjectsInArray: in Leopard does seem to check the hash, +// and NSObject's default hash method just returns the instance pointer. +// We'll define hash here for all of our GTLObjects. +- (NSUInteger)hash { + return (NSUInteger) (void *) [GTLObject class]; +} + +- (id)copyWithZone:(NSZone *)zone { + GTLObject* newObject = [[[self class] allocWithZone:zone] init]; + CFPropertyListRef ref = CFPropertyListCreateDeepCopy(kCFAllocatorDefault, + json_, kCFPropertyListMutableContainers); + GTL_DEBUG_ASSERT(ref != NULL, @"GTLObject: copy failed (probably a non-plist type in the JSON)"); + newObject.JSON = [NSMakeCollectable(ref) autorelease]; + newObject.surrogates = self.surrogates; + + // What we're not copying: + // userProperties + return newObject; +} + +- (NSString *)descriptionWithLocale:(id)locale { + return [self description]; +} + +- (void)dealloc { + [json_ release]; + [surrogates_ release]; + [childCache_ release]; + [userProperties_ release]; + + [super dealloc]; +} + +#pragma mark JSON values + +- (void)setJSONValue:(id)obj forKey:(NSString *)key { + NSMutableDictionary *dict = self.JSON; + if (dict == nil && obj != nil) { + dict = [NSMutableDictionary dictionaryWithCapacity:1]; + self.JSON = dict; + } + [dict setValue:obj forKey:key]; +} + +- (id)JSONValueForKey:(NSString *)key { + id obj = [self.JSON objectForKey:key]; + return obj; +} + +- (NSString *)JSONString { + NSError *error = nil; + NSString *str = [GTLJSONParser stringWithObject:[self JSON] + humanReadable:YES + error:&error]; + if (error) { + return [error description]; + } + return str; +} + +- (NSArray *)additionalJSONKeys { + NSArray *knownKeys = [[self class] allKnownKeys]; + NSMutableArray *result = [NSMutableArray arrayWithArray:[json_ allKeys]]; + [result removeObjectsInArray:knownKeys]; + // Return nil instead of an empty array. + if ([result count] == 0) { + result = nil; + } + return result; +} + +#pragma mark Partial - Fields + +- (NSString *)fieldsDescription { + NSString *str = [GTLObject fieldsDescriptionForJSON:self.JSON]; + return str; +} + ++ (NSString *)fieldsDescriptionForJSON:(NSDictionary *)targetJSON { + // Internal routine: recursively generate a string field description + // by joining elements + NSArray *array = [self fieldsElementsForJSON:targetJSON]; + NSString *str = [array componentsJoinedByString:@","]; + return str; +} + ++ (NSArray *)fieldsElementsForJSON:(NSDictionary *)targetJSON { + // Internal routine: recursively generate an array of field description + // element strings + NSMutableArray *resultFields = [NSMutableArray array]; + + // Sorting the dictionary keys gives us deterministic results when iterating + NSArray *sortedKeys = [[targetJSON allKeys] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)]; + for (NSString *key in sortedKeys) { + // We'll build a comma-separated list of fields + id value = [targetJSON objectForKey:key]; + if ([value isKindOfClass:[NSString class]] + || [value isKindOfClass:[NSNumber class]]) { + // Basic type (string, number), so the key is what we want + [resultFields addObject:key]; + } else if ([value isKindOfClass:[NSDictionary class]]) { + // Object (dictionary): "parent/child1,parent/child2,parent/child3" + NSArray *subElements = [self fieldsElementsForJSON:value]; + for (NSString *subElem in subElements) { + NSString *prepended = [NSString stringWithFormat:@"%@/%@", + key, subElem]; + [resultFields addObject:prepended]; + } + } else if ([value isKindOfClass:[NSArray class]]) { + // Array; we'll generate from the first array entry: + // "parent(child1,child2,child3)" + // + // Open question: should this instead create the union of elements for + // all items in the array, rather than just get fields from the first + // array object? + if ([(NSArray *)value count] > 0) { + id firstObj = [value objectAtIndex:0]; + if ([firstObj isKindOfClass:[NSDictionary class]]) { + // An array of objects + NSString *contentsStr = [self fieldsDescriptionForJSON:firstObj]; + NSString *encapsulated = [NSString stringWithFormat:@"%@(%@)", + key, contentsStr]; + [resultFields addObject:encapsulated]; + } else { + // An array of some basic type, or of arrays + [resultFields addObject:key]; + } + } + } else { + GTL_ASSERT(0, @"GTLObject unknown field element for %@ (%@)", + key, NSStringFromClass([value class])); + } + } + return resultFields; +} + +#pragma mark Partial - Patch + +- (id)patchObjectFromOriginal:(GTLObject *)original { + id resultObj; + NSMutableDictionary *resultJSON = [GTLObject patchDictionaryForJSON:self.JSON + fromOriginalJSON:original.JSON]; + if ([resultJSON count] > 0) { + resultObj = [[self class] objectWithJSON:resultJSON]; + } else { + // Client apps should not attempt to patch with an object containing + // empty JSON + resultObj = nil; + } + return resultObj; +} + ++ (NSMutableDictionary *)patchDictionaryForJSON:(NSDictionary *)newJSON + fromOriginalJSON:(NSDictionary *)originalJSON { + // Internal recursive routine to create an object suitable for + // our patch semantics + NSMutableDictionary *resultJSON = [NSMutableDictionary dictionary]; + + // Iterate through keys present in the old object + NSArray *originalKeys = [originalJSON allKeys]; + for (NSString *key in originalKeys) { + id originalValue = [originalJSON objectForKey:key]; + id newValue = [newJSON valueForKey:key]; + if (newValue == nil) { + // There is no new value for this key, so set the value to NSNull + [resultJSON setValue:[NSNull null] forKey:key]; + } else if (!GTL_AreEqualOrBothNil(originalValue, newValue)) { + // The values for this key differ + if ([originalValue isKindOfClass:[NSDictionary class]] + && [newValue isKindOfClass:[NSDictionary class]]) { + // Both are objects; recurse + NSMutableDictionary *subDict = [self patchDictionaryForJSON:newValue + fromOriginalJSON:originalValue]; + [resultJSON setValue:subDict forKey:key]; + } else { + // They are non-object values; the new replaces the old. Per the + // documentation for patch, this replaces entire arrays. + [resultJSON setValue:newValue forKey:key]; + } + } else { + // The values are the same; omit this key-value pair + } + } + + // Iterate through keys present only in the new object, and add them to the + // result + NSMutableArray *newKeys = [NSMutableArray arrayWithArray:[newJSON allKeys]]; + [newKeys removeObjectsInArray:originalKeys]; + + for (NSString *key in newKeys) { + id value = [newJSON objectForKey:key]; + [resultJSON setValue:value forKey:key]; + } + return resultJSON; +} + ++ (id)nullValue { + return [NSNull null]; +} + +#pragma mark Additional Properties + +- (id)additionalPropertyForName:(NSString *)name { + // Return the cached object, if any, before creating one. + id result = [self cacheChildForKey:name]; + if (result != nil) { + return result; + } + + Class defaultClass = [[self class] classForAdditionalProperties]; + id jsonObj = [self JSONValueForKey:name]; + BOOL shouldCache = NO; + if (jsonObj != nil) { + NSDictionary *surrogates = self.surrogates; + result = [GTLRuntimeCommon objectFromJSON:jsonObj + defaultClass:defaultClass + surrogates:surrogates + isCacheable:&shouldCache]; + } + + [self setCacheChild:(shouldCache ? result : nil) + forKey:name]; + return result; +} + +- (void)setAdditionalProperty:(id)obj forName:(NSString *)name { + BOOL shouldCache = NO; + Class defaultClass = [[self class] classForAdditionalProperties]; + id json = [GTLRuntimeCommon jsonFromAPIObject:obj + expectedClass:defaultClass + isCacheable:&shouldCache]; + [self setJSONValue:json forKey:name]; + [self setCacheChild:(shouldCache ? obj : nil) + forKey:name]; +} + +- (NSDictionary *)additionalProperties { + NSMutableDictionary *result = [NSMutableDictionary dictionary]; + + NSArray *propertyNames = [self additionalJSONKeys]; + for (NSString *name in propertyNames) { + id obj = [self additionalPropertyForName:name]; + [result setObject:obj forKey:name]; + } + + return result; +} + +#pragma mark Child Cache methods + +// There is no property for childCache_ as there shouldn't be KVC/KVO +// support for it, it's an implementation detail. + +- (void)setCacheChild:(id)obj forKey:(NSString *)key { + if (childCache_ == nil && obj != nil) { + childCache_ = [[NSMutableDictionary alloc] initWithObjectsAndKeys: + obj, key, nil]; + } else { + [childCache_ setValue:obj forKey:key]; + } +} + +- (id)cacheChildForKey:(NSString *)key { + id obj = [childCache_ objectForKey:key]; + return obj; +} + +#pragma mark userData and user properties + +- (void)setUserData:(id)userData { + [self setProperty:userData forKey:kUserDataPropertyKey]; +} + +- (id)userData { + // be sure the returned pointer has the life of the autorelease pool, + // in case self is released immediately + return [[[self propertyForKey:kUserDataPropertyKey] retain] autorelease]; +} + +- (void)setProperty:(id)obj forKey:(NSString *)key { + if (obj == nil) { + // user passed in nil, so delete the property + [userProperties_ removeObjectForKey:key]; + } else { + // be sure the property dictionary exists + if (userProperties_ == nil) { + self.userProperties = [NSMutableDictionary dictionary]; + } + [userProperties_ setObject:obj forKey:key]; + } +} + +- (id)propertyForKey:(NSString *)key { + id obj = [userProperties_ objectForKey:key]; + + // be sure the returned pointer has the life of the autorelease pool, + // in case self is released immediately + return [[obj retain] autorelease]; +} + +#pragma mark Support methods + ++ (NSMutableArray *)allDeclaredProperties { + NSMutableArray *array = [NSMutableArray array]; + + // walk from this class up the hierarchy to GTLObject + Class topClass = class_getSuperclass([GTLObject class]); + for (Class currClass = self; + currClass != topClass; + currClass = class_getSuperclass(currClass)) { + // step through this class's properties, and add the property names to the + // array + objc_property_t *properties = class_copyPropertyList(currClass, NULL); + if (properties) { + for (objc_property_t *prop = properties; + *prop != NULL; + ++prop) { + const char *propName = property_getName(*prop); + // We only want dynamic properties; their attributes contain ",D". + const char *attr = property_getAttributes(*prop); + const char *dynamicMarker = strstr(attr, ",D"); + if (dynamicMarker && + (dynamicMarker[2] == 0 || dynamicMarker[2] == ',' )) { + [array addObject:[NSString stringWithUTF8String:propName]]; + } + } + free(properties); + } + } + return array; +} + ++ (NSArray *)allKnownKeys { + NSArray *allProps = [self allDeclaredProperties]; + NSMutableArray *knownKeys = [NSMutableArray arrayWithArray:allProps]; + + NSDictionary *propMap = [GTLObject propertyToJSONKeyMapForClass:[self class]]; + + NSUInteger idx = 0; + for (NSString *propName in allProps) { + NSString *jsonKey = [propMap objectForKey:propName]; + if (jsonKey) { + [knownKeys replaceObjectAtIndex:idx + withObject:jsonKey]; + } + ++idx; + } + return knownKeys; +} + +- (NSString *)description { + // find the list of declared and otherwise known JSON keys for this class + NSArray *knownKeys = [[self class] allKnownKeys]; + + NSMutableString *descStr = [NSMutableString string]; + + NSString *spacer = @""; + for (NSString *key in json_) { + NSString *value = nil; + // show question mark for JSON keys not supported by a declared property: + // foo?:"Hi mom." + NSString *qmark = [knownKeys containsObject:key] ? @"" : @"?"; + + // determine property value to dislay + id rawValue = [json_ valueForKey:key]; + if ([rawValue isKindOfClass:[NSDictionary class]]) { + // for dictionaries, show the list of keys: + // {key1,key2,key3} + NSString *subkeyList = [[rawValue allKeys] componentsJoinedByString:@","]; + value = [NSString stringWithFormat:@"{%@}", subkeyList]; + } else if ([rawValue isKindOfClass:[NSArray class]]) { + // for arrays, show the number of items in the array: + // [3] + value = [NSString stringWithFormat:@"[%lu]", (unsigned long)[(NSArray *)rawValue count]]; + } else if ([rawValue isKindOfClass:[NSString class]]) { + // for strings, show the string in quotes: + // "Hi mom." + value = [NSString stringWithFormat:@"\"%@\"", rawValue]; + } else { + // for numbers, show just the number + value = [rawValue description]; + } + [descStr appendFormat:@"%@%@%@:%@", spacer, key, qmark, value]; + spacer = @" "; + } + + NSString *str = [NSString stringWithFormat:@"%@ %p: {%@}", + [self class], self, descStr]; + return str; +} + +#pragma mark Class Registration + +static NSMutableDictionary *gKindMap = nil; + ++ (Class)registeredObjectClassForKind:(NSString *)kind { + Class resultClass = [gKindMap objectForKey:kind]; + return resultClass; +} + ++ (void)registerObjectClassForKind:(NSString *)kind { + // there's no autorelease pool in place at +load time, so we'll create our own + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + if (gKindMap == nil) { + gKindMap = [GTLUtilities newStaticDictionary]; + } + + Class selfClass = [self class]; + +#if DEBUG + // ensure this is a unique registration + if ([gKindMap objectForKey:kind] != nil ) { + GTL_DEBUG_LOG(@"%@ (%@) registration conflicts with %@", + selfClass, kind, [gKindMap objectForKey:kind]); + } + if ([[gKindMap allKeysForObject:selfClass] count] != 0) { + GTL_DEBUG_LOG(@"%@ (%@) registration conflicts with %@", + selfClass, kind, [gKindMap allKeysForObject:selfClass]); + } +#endif + + [gKindMap setValue:selfClass forKey:kind]; + + // we drain here to keep the clang static analyzer quiet + [pool drain]; +} + +#pragma mark Object Instantiation + ++ (GTLObject *)objectForJSON:(NSMutableDictionary *)json + defaultClass:(Class)defaultClass + surrogates:(NSDictionary *)surrogates + batchClassMap:(NSDictionary *)batchClassMap { + if ([json count] == 0 || [json isEqual:[NSNull null]]) { + // no actual result, such as the response from a delete + return nil; + } + + // Determine the class to instantiate, based on the original fetch + // request or by looking up "kind" string from the registration at + // +load time of GTLObject subclasses + // + // We're letting the dynamic kind override the default class so + // feeds of heterogenous entries can use the defaultClass as a + // fallback + Class classToCreate = defaultClass; + NSString *kind = nil; + if ([json isKindOfClass:[NSDictionary class]]) { + kind = [json valueForKey:@"kind"]; + if ([kind isKindOfClass:[NSString class]] && [kind length] > 0) { + Class dynamicClass = [GTLObject registeredObjectClassForKind:kind]; + if (dynamicClass) { + classToCreate = dynamicClass; + } + } + } + + // Warn the developer that no specific class of GTLObject + // was requested with the fetch call, and no class is found + // compiled in to match the "kind" attribute of the JSON + // returned by the server + GTL_ASSERT(classToCreate != nil, + @"Could not find registered GTLObject subclass to " + "match JSON with kind \"%@\"", kind); + + if (classToCreate == nil) { + classToCreate = [self class]; + } + + // See if the top-level class for the JSON is listed in the surrogates; + // if so, instantiate the surrogate class instead + Class baseSurrogate = [surrogates objectForKey:classToCreate]; + if (baseSurrogate) { + classToCreate = baseSurrogate; + } + + // now instantiate the GTLObject + GTLObject *parsedObject = [classToCreate object]; + + parsedObject.surrogates = surrogates; + parsedObject.JSON = json; + + // it's time to instantiate inner items + if ([parsedObject conformsToProtocol:@protocol(GTLBatchItemCreationProtocol)]) { + id batch = + (id ) parsedObject; + [batch createItemsWithClassMap:batchClassMap]; + } + + return parsedObject; +} + +#pragma mark Runtime Utilities + +static NSMutableDictionary *gJSONKeyMapCache = nil; +static NSMutableDictionary *gArrayPropertyToClassMapCache = nil; + ++ (void)initialize { + // Note that initialize is guaranteed by the runtime to be called in a + // thread-safe manner + if (gJSONKeyMapCache == nil) { + gJSONKeyMapCache = [GTLUtilities newStaticDictionary]; + } + if (gArrayPropertyToClassMapCache == nil) { + gArrayPropertyToClassMapCache = [GTLUtilities newStaticDictionary]; + } +} + ++ (NSDictionary *)propertyToJSONKeyMapForClass:(Class)aClass { + NSDictionary *resultMap = + [GTLUtilities mergedClassDictionaryForSelector:@selector(propertyToJSONKeyMap) + startClass:aClass + ancestorClass:[GTLObject class] + cache:gJSONKeyMapCache]; + return resultMap; +} + ++ (NSDictionary *)arrayPropertyToClassMapForClass:(Class)aClass { + NSDictionary *resultMap = + [GTLUtilities mergedClassDictionaryForSelector:@selector(arrayPropertyToClassMap) + startClass:aClass + ancestorClass:[GTLObject class] + cache:gArrayPropertyToClassMapCache]; + return resultMap; +} + +#pragma mark Runtime Support + ++ (Class)ancestorClass { + return [GTLObject class]; +} + ++ (BOOL)resolveInstanceMethod:(SEL)sel { + BOOL resolved = [GTLRuntimeCommon resolveInstanceMethod:sel onClass:self]; + if (resolved) + return YES; + + return [super resolveInstanceMethod:sel]; +} + +@end + +@implementation GTLCollectionObject +// Subclasses must implement the items method dynamically. + +- (void)dealloc { + [identifierMap_ release]; + [super dealloc]; +} + +- (id)itemAtIndex:(NSUInteger)idx { + NSArray *items = [self performSelector:@selector(items)]; + if (idx < [items count]) { + return [items objectAtIndex:idx]; + } + return nil; +} + +- (id)objectAtIndexedSubscript:(NSInteger)idx { + if (idx >= 0) { + return [self itemAtIndex:(NSUInteger)idx]; + } + return nil; +} + +- (id)itemForIdentifier:(NSString *)key { + if (identifierMap_ == nil) { + NSArray *items = [self performSelector:@selector(items)]; + NSMutableDictionary *dict = + [NSMutableDictionary dictionaryWithCapacity:[items count]]; + for (id item in items) { + id identifier = [item valueForKey:@"identifier"]; + if (identifier != nil && identifier != [NSNull null]) { + if ([dict objectForKey:identifier] == nil) { + [dict setObject:item forKey:identifier]; + } + } + } + identifierMap_ = [dict copy]; + } + return [identifierMap_ objectForKey:key]; +} + +- (void)resetIdentifierMap { + [identifierMap_ release]; + identifierMap_ = nil; +} + +// NSFastEnumeration protocol +- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state + objects:(id *)stackbuf + count:(NSUInteger)len { + NSArray *items = [self performSelector:@selector(items)]; + NSUInteger result = [items countByEnumeratingWithState:state + objects:stackbuf + count:len]; + return result; +} + +@end + +@implementation GTLResultArray + +- (NSArray *)itemsWithItemClass:(Class)itemClass { + // Return the cached array before creating on demand. + NSString *cacheKey = @"result_array_items"; + NSMutableArray *cachedArray = [self cacheChildForKey:cacheKey]; + if (cachedArray != nil) { + return cachedArray; + } + NSArray *result = nil; + NSArray *array = (NSArray *)[self JSON]; + if (array != nil) { + if ([array isKindOfClass:[NSArray class]]) { + NSDictionary *surrogates = self.surrogates; + result = [GTLRuntimeCommon objectFromJSON:array + defaultClass:itemClass + surrogates:surrogates + isCacheable:NULL]; + } else { +#if DEBUG + if (![array isKindOfClass:[NSNull class]]) { + GTL_DEBUG_LOG(@"GTLObject: unexpected JSON: %@ should be an array, actually is a %@:\n%@", + NSStringFromClass([self class]), + NSStringFromClass([array class]), + array); + } +#endif + result = array; + } + } + + [self setCacheChild:result forKey:cacheKey]; + return result; +} + +@end diff --git a/GTL/Source/Objects/.svn/text-base/GTLQuery.h.svn-base b/GTL/Source/Objects/.svn/text-base/GTLQuery.h.svn-base new file mode 100644 index 0000000..7b9f813 --- /dev/null +++ b/GTL/Source/Objects/.svn/text-base/GTLQuery.h.svn-base @@ -0,0 +1,135 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQuery.h +// + +// Query documentation: +// https://code.google.com/p/google-api-objectivec-client/wiki/Introduction#Query_Operations + +#import "GTLObject.h" +#import "GTLUploadParameters.h" + +@protocol GTLQueryProtocol +- (BOOL)isBatchQuery; +- (BOOL)shouldSkipAuthorization; +- (void)executionDidStop; +- (NSDictionary *)additionalHTTPHeaders; +- (GTLUploadParameters *)uploadParameters; +@end + +@protocol GTLQueryCollectionProtocol +@optional +@property (retain) NSString *pageToken; +@property (retain) NSNumber *startIndex; +@end + +@class GTLServiceTicket; + +@interface GTLQuery : NSObject { + @private + NSString *methodName_; + NSMutableDictionary *json_; + GTLObject *bodyObject_; + NSMutableDictionary *childCache_; + NSString *requestID_; + GTLUploadParameters *uploadParameters_; + NSDictionary *urlQueryParameters_; + NSDictionary *additionalHTTPHeaders_; + Class expectedObjectClass_; + BOOL skipAuthorization_; +#if NS_BLOCKS_AVAILABLE + void (^completionBlock_)(GTLServiceTicket *ticket, id object, NSError *error); +#elif !__LP64__ + // Placeholders: for 32-bit builds, keep the size of the object's ivar section + // the same with and without blocks + id completionPlaceholder_; +#endif +} + +// The rpc method name. +@property (readonly) NSString *methodName; + +// The JSON dictionary of all the parameters set on this query. +@property (retain) NSMutableDictionary *JSON; + +// The object set to be uploaded with the query. +@property (retain) GTLObject *bodyObject; + +// Each query must have a request ID string. The user may replace the +// default assigned request ID with a custom string, provided that if +// used in a batch query, all request IDs in the batch must be unique. +@property (copy) NSString *requestID; + +// For queries which support file upload, the MIME type and file handle +// or data must be provided. +@property (copy) GTLUploadParameters *uploadParameters; + +// Any url query parameters to add to the query (useful for debugging with some +// services). +@property (copy) NSDictionary *urlQueryParameters; + +// Any additional HTTP headers for this query. Not valid when this query +// is added to a batch. +// +// These headers override the same keys from the service object's +// additionalHTTPHeaders. +@property (copy) NSDictionary *additionalHTTPHeaders; + +// The GTLObject subclass expected for results (used if the result doesn't +// include a kind attribute). +@property (assign) Class expectedObjectClass; + +// Clients may set this to YES to disallow authorization. Defaults to NO. +@property (assign) BOOL shouldSkipAuthorization; + +#if NS_BLOCKS_AVAILABLE +// Clients may provide an optional callback block to be called immediately +// before the executeQuery: callback. +// +// The completionBlock property is particularly useful for queries executed +// in a batch. +// +// Errors passed to the completionBlock will have an "underlying" GTLErrorObject +// when the server returned an error for this specific query: +// +// GTLErrorObject *errorObj = [GTLErrorObject underlyingObjectForError:error]; +// if (errorObj) { +// // the server returned this error for this specific query +// } else { +// // the batch execution failed +// } +@property (copy) void (^completionBlock)(GTLServiceTicket *ticket, id object, NSError *error); +#endif + +// methodName is the RPC method name to use. ++ (id)queryWithMethodName:(NSString *)methodName; + +// methodName is the RPC method name to use. +- (id)initWithMethodName:(NSString *)method; + +// If you need to set a parameter that is not listed as a property for a +// query class, you can do so via this api. If you need to clear it after +// setting, pass nil for obj. +- (void)setCustomParameter:(id)obj forKey:(NSString *)key; + +// Auto-generated request IDs ++ (NSString *)nextRequestID; + +// Methods for subclasses to override. ++ (NSDictionary *)parameterNameMap; ++ (NSDictionary *)arrayPropertyToClassMap; +@end diff --git a/GTL/Source/Objects/.svn/text-base/GTLQuery.m.svn-base b/GTL/Source/Objects/.svn/text-base/GTLQuery.m.svn-base new file mode 100644 index 0000000..55f9822 --- /dev/null +++ b/GTL/Source/Objects/.svn/text-base/GTLQuery.m.svn-base @@ -0,0 +1,267 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQuery.m +// + +#include + +#import "GTLQuery.h" +#import "GTLRuntimeCommon.h" +#import "GTLUtilities.h" + +@interface GTLQuery () +@end + +@implementation GTLQuery + +// Implementation Note: bodyObject could be done as a dynamic property and map +// it to the key "resource". But we expose the object on the ServiceTicket +// for developers, and so sending it through the plumbing already in the +// parameters and outside of that gets into a grey area. For requests sent +// via this class, we don't need to touch the JSON, but for developers that +// have to use the lower level apis for something we'd need to know to add +// it to the JSON. + +@synthesize methodName = methodName_, + JSON = json_, + bodyObject = bodyObject_, + requestID = requestID_, + uploadParameters = uploadParameters_, + urlQueryParameters = urlQueryParameters_, + additionalHTTPHeaders = additionalHTTPHeaders_, + expectedObjectClass = expectedObjectClass_, + shouldSkipAuthorization = skipAuthorization_; + +#if NS_BLOCKS_AVAILABLE +@synthesize completionBlock = completionBlock_; +#endif + ++ (id)queryWithMethodName:(NSString *)methodName { + return [[[self alloc] initWithMethodName:methodName] autorelease]; +} + +- (id)initWithMethodName:(NSString *)methodName { + self = [super init]; + if (self) { + requestID_ = [[[self class] nextRequestID] retain]; + + methodName_ = [methodName copy]; + if ([methodName_ length] == 0) { + [self release]; + self = nil; + } + } + return self; +} + +- (void)dealloc { + [methodName_ release]; + [json_ release]; + [bodyObject_ release]; + [childCache_ release]; + [requestID_ release]; + [uploadParameters_ release]; + [urlQueryParameters_ release]; + [additionalHTTPHeaders_ release]; +#if NS_BLOCKS_AVAILABLE + [completionBlock_ release]; +#endif + + [super dealloc]; +} + + +- (id)copyWithZone:(NSZone *)zone { + GTLQuery *query = + [[[self class] allocWithZone:zone] initWithMethodName:self.methodName]; + + if ([json_ count] > 0) { + // Deep copy the parameters + CFPropertyListRef ref = CFPropertyListCreateDeepCopy(kCFAllocatorDefault, + json_, kCFPropertyListMutableContainers); + query.JSON = [NSMakeCollectable(ref) autorelease]; + } + query.bodyObject = self.bodyObject; + query.requestID = self.requestID; + query.uploadParameters = self.uploadParameters; + query.urlQueryParameters = self.urlQueryParameters; + query.additionalHTTPHeaders = self.additionalHTTPHeaders; + query.expectedObjectClass = self.expectedObjectClass; + query.shouldSkipAuthorization = self.shouldSkipAuthorization; +#if NS_BLOCKS_AVAILABLE + query.completionBlock = self.completionBlock; +#endif + return query; +} + +- (NSString *)description { + NSArray *keys = [self.JSON allKeys]; + NSArray *params = [keys sortedArrayUsingSelector:@selector(compare:)]; + NSString *paramsSummary = @""; + if ([params count] > 0) { + paramsSummary = [NSString stringWithFormat:@" params:(%@)", + [params componentsJoinedByString:@","]]; + } + + keys = [self.urlQueryParameters allKeys]; + NSArray *urlQParams = [keys sortedArrayUsingSelector:@selector(compare:)]; + NSString *urlQParamsSummary = @""; + if ([urlQParams count] > 0) { + urlQParamsSummary = [NSString stringWithFormat:@" urlQParams:(%@)", + [urlQParams componentsJoinedByString:@","]]; + } + + GTLObject *bodyObj = self.bodyObject; + NSString *bodyObjSummary = @""; + if (bodyObj != nil) { + bodyObjSummary = [NSString stringWithFormat:@" bodyObject:%@", [bodyObj class]]; + } + + NSString *uploadStr = @""; + GTLUploadParameters *uploadParams = self.uploadParameters; + if (uploadParams) { + uploadStr = [NSString stringWithFormat:@" %@", uploadParams]; + } + + return [NSString stringWithFormat:@"%@ %p: {method:%@%@%@%@%@}", + [self class], self, self.methodName, + paramsSummary, urlQParamsSummary, bodyObjSummary, uploadStr]; +} + +- (void)setCustomParameter:(id)obj forKey:(NSString *)key { + [self setJSONValue:obj forKey:key]; +} + +- (BOOL)isBatchQuery { + return NO; +} + +- (void)executionDidStop { +#if NS_BLOCKS_AVAILABLE + self.completionBlock = nil; +#endif +} + ++ (NSString *)nextRequestID { + static unsigned long lastRequestID = 0; + NSString *result; + + @synchronized([GTLQuery class]) { + ++lastRequestID; + result = [NSString stringWithFormat:@"gtl_%lu", + (unsigned long) lastRequestID]; + } + return result; +} + +#pragma mark GTLRuntimeCommon Support + +- (void)setJSONValue:(id)obj forKey:(NSString *)key { + NSMutableDictionary *dict = self.JSON; + if (dict == nil && obj != nil) { + dict = [NSMutableDictionary dictionaryWithCapacity:1]; + self.JSON = dict; + } + [dict setValue:obj forKey:key]; +} + +- (id)JSONValueForKey:(NSString *)key { + id obj = [self.JSON objectForKey:key]; + return obj; +} + +// There is no property for childCache_ as there shouldn't be KVC/KVO +// support for it, it's an implementation detail. + +- (void)setCacheChild:(id)obj forKey:(NSString *)key { + if (childCache_ == nil && obj != nil) { + childCache_ = + [[NSMutableDictionary alloc] initWithObjectsAndKeys:obj, key, nil]; + } else { + [childCache_ setValue:obj forKey:key]; + } +} + +- (id)cacheChildForKey:(NSString *)key { + id obj = [childCache_ objectForKey:key]; + return obj; +} + +#pragma mark Methods for Subclasses to Override + ++ (NSDictionary *)parameterNameMap { + return nil; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + return nil; +} + +#pragma mark Runtime Utilities + +static NSMutableDictionary *gParameterNameMapCache = nil; +static NSMutableDictionary *gArrayPropertyToClassMapCache = nil; + ++ (void)initialize { + // note that initialize is guaranteed by the runtime to be called in a + // thread-safe manner + if (gParameterNameMapCache == nil) { + gParameterNameMapCache = [GTLUtilities newStaticDictionary]; + } + if (gArrayPropertyToClassMapCache == nil) { + gArrayPropertyToClassMapCache = [GTLUtilities newStaticDictionary]; + } +} + ++ (NSDictionary *)propertyToJSONKeyMapForClass:(Class)aClass { + NSDictionary *resultMap = + [GTLUtilities mergedClassDictionaryForSelector:@selector(parameterNameMap) + startClass:aClass + ancestorClass:[GTLQuery class] + cache:gParameterNameMapCache]; + return resultMap; +} + ++ (NSDictionary *)arrayPropertyToClassMapForClass:(Class)aClass { + NSDictionary *resultMap = + [GTLUtilities mergedClassDictionaryForSelector:@selector(arrayPropertyToClassMap) + startClass:aClass + ancestorClass:[GTLQuery class] + cache:gArrayPropertyToClassMapCache]; + return resultMap; +} + +#pragma mark Runtime Support + +- (NSDictionary *)surrogates { + // Stub method just needed for RumtimeCommon, query doesn't use surrogates. + return nil; +} + ++ (Class)ancestorClass { + return [GTLQuery class]; +} + ++ (BOOL)resolveInstanceMethod:(SEL)sel { + BOOL resolved = [GTLRuntimeCommon resolveInstanceMethod:sel onClass:self]; + if (resolved) + return YES; + + return [super resolveInstanceMethod:sel]; +} + +@end diff --git a/GTL/Source/Objects/.svn/text-base/GTLRuntimeCommon.h.svn-base b/GTL/Source/Objects/.svn/text-base/GTLRuntimeCommon.h.svn-base new file mode 100644 index 0000000..28822b5 --- /dev/null +++ b/GTL/Source/Objects/.svn/text-base/GTLRuntimeCommon.h.svn-base @@ -0,0 +1,57 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLRuntimeCommon.h +// + + +#import + +#import "GTLDefines.h" + +// This protocol and support class are an internal implementation detail so +// GTLObject and GTLQuery can share some code. + +@protocol GTLRuntimeCommon +@required +// Get/Set properties +- (void)setJSONValue:(id)obj forKey:(NSString *)key; +- (id)JSONValueForKey:(NSString *)key; +// Child cache +- (void)setCacheChild:(id)obj forKey:(NSString *)key; +- (id)cacheChildForKey:(NSString *)key; +// Surrogate class mappings. +- (NSDictionary *)surrogates; +// Key map ++ (NSDictionary *)propertyToJSONKeyMapForClass:(Class)aClass; +// Array item types ++ (NSDictionary *)arrayPropertyToClassMapForClass:(Class)aClass; +// The parent class for dynamic support ++ (Class)ancestorClass; +@end + +@interface GTLRuntimeCommon : NSObject +// Wire things up. ++ (BOOL)resolveInstanceMethod:(SEL)sel onClass:(Class)onClass; +// Helpers ++ (id)objectFromJSON:(id)json + defaultClass:(Class)defaultClass + surrogates:(NSDictionary *)surrogates + isCacheable:(BOOL*)isCacheable; ++ (id)jsonFromAPIObject:(id)obj + expectedClass:(Class)expectedClass + isCacheable:(BOOL*)isCacheable; +@end diff --git a/GTL/Source/Objects/.svn/text-base/GTLRuntimeCommon.m.svn-base b/GTL/Source/Objects/.svn/text-base/GTLRuntimeCommon.m.svn-base new file mode 100644 index 0000000..5f6613d --- /dev/null +++ b/GTL/Source/Objects/.svn/text-base/GTLRuntimeCommon.m.svn-base @@ -0,0 +1,1141 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLRuntimeCommon.m +// + +#include + +#import "GTLRuntimeCommon.h" + +#import "GTLDateTime.h" +#import "GTLObject.h" +#import "GTLUtilities.h" + +static NSString *const kReturnClassKey = @"returnClass"; +static NSString *const kContainedClassKey = @"containedClass"; +static NSString *const kJSONKey = @"jsonKey"; + +// Note: NSObject's class is used as a marker for the expected/default class +// when Discovery says it can be any type of object. + +@implementation GTLRuntimeCommon + +// Helper to generically convert JSON to an api object type. ++ (id)objectFromJSON:(id)json + defaultClass:(Class)defaultClass + surrogates:(NSDictionary *)surrogates + isCacheable:(BOOL*)isCacheable { + id result = nil; + BOOL canBeCached = YES; + + // TODO(TVL): use defaultClass to validate things like expectedClass is + // done in jsonFromAPIObject:expectedClass:isCacheable:? + + if ([json isKindOfClass:[NSDictionary class]]) { + // If no default, or the default was any object, then default to base + // object here (and hope there is a kind to get the right thing). + if ((defaultClass == Nil) || [defaultClass isEqual:[NSObject class]]) { + defaultClass = [GTLObject class]; + } + result = [GTLObject objectForJSON:json + defaultClass:defaultClass + surrogates:surrogates + batchClassMap:nil]; + } else if ([json isKindOfClass:[NSArray class]]) { + NSArray *jsonArray = json; + // make an object for each JSON dictionary in the array + NSMutableArray *resultArray = [NSMutableArray arrayWithCapacity:[jsonArray count]]; + for (id jsonItem in jsonArray) { + id item = [self objectFromJSON:jsonItem + defaultClass:defaultClass + surrogates:surrogates + isCacheable:NULL]; + [resultArray addObject:item]; + } + result = resultArray; + } else if ([json isKindOfClass:[NSString class]]) { + // DateTimes live in JSON as strings, so convert + if ([defaultClass isEqual:[GTLDateTime class]]) { + result = [GTLDateTime dateTimeWithRFC3339String:json]; + } else { + result = json; + canBeCached = NO; + } + } else if ([json isKindOfClass:[NSNumber class]] || + [json isKindOfClass:[NSNull class]]) { + result = json; + canBeCached = NO; + } else { + GTL_DEBUG_LOG(@"GTLRuntimeCommon: unsupported class '%s' in objectFromJSON", + class_getName([json class])); + } + + if (isCacheable) { + *isCacheable = canBeCached; + } + return result; +} + +// Helper to generically convert an api object type to JSON. +// |expectedClass| is the type that was expected for |obj|. ++ (id)jsonFromAPIObject:(id)obj + expectedClass:(Class)expectedClass + isCacheable:(BOOL*)isCacheable { + id result = nil; + BOOL canBeCached = YES; + BOOL checkExpected = (expectedClass != Nil); + + if ([obj isKindOfClass:[NSString class]]) { + result = [[obj copy] autorelease]; + canBeCached = NO; + } else if ([obj isKindOfClass:[NSNumber class]] || + [obj isKindOfClass:[NSNull class]]) { + result = obj; + canBeCached = NO; + } else if ([obj isKindOfClass:[GTLObject class]]) { + result = [obj JSON]; + if (result == nil) { + // adding an empty object; it should have a JSON dictionary so it can + // hold future assignments + [obj setJSON:[NSMutableDictionary dictionary]]; + result = [obj JSON]; + } + } else if ([obj isKindOfClass:[NSArray class]]) { + checkExpected = NO; + NSArray *array = obj; + // get the JSON for each thing in the array + NSMutableArray *resultArray = [NSMutableArray arrayWithCapacity:[array count]]; + for (id item in array) { + id itemJSON = [self jsonFromAPIObject:item + expectedClass:expectedClass + isCacheable:NULL]; + [resultArray addObject:itemJSON]; + } + result = resultArray; + } else if ([obj isKindOfClass:[GTLDateTime class]]) { + // DateTimes live in JSON as strings, so convert. + GTLDateTime *dateTime = obj; + result = [dateTime stringValue]; + } else { + checkExpected = NO; + GTL_DEBUG_LOG(@"GTLRuntimeCommon: unsupported class '%s' in jsonFromAPIObject", + class_getName([obj class])); + } + + if (checkExpected) { + // If the default was any object, then clear it to skip validation checks. + if ([expectedClass isEqual:[NSObject class]] || + [obj isKindOfClass:[NSNull class]]) { + expectedClass = nil; + } + if (expectedClass && ![obj isKindOfClass:expectedClass]) { + GTL_DEBUG_LOG(@"GTLRuntimeCommon: jsonFromAPIObject expected class '%s' instead got '%s'", + class_getName(expectedClass), class_getName([obj class])); + } + } + + if (isCacheable) { + *isCacheable = canBeCached; + } + return result; +} + +#pragma mark JSON/Object Utilities + +static NSMutableDictionary *gDispatchCache = nil; + +static CFStringRef SelectorKeyCopyDescriptionCallBack(const void *key) { + // Make a CFString from the key + NSString *name = NSStringFromSelector((SEL) key); + CFStringRef str = CFStringCreateCopy(kCFAllocatorDefault, (CFStringRef) name); + return str; +} + +// Save the dispatch details for the specified class and selector ++ (void)setStoredDispatchForClass:(Class)dispatchClass + selector:(SEL)sel + returnClass:(Class)returnClass + containedClass:(Class)containedClass + jsonKey:(NSString *)jsonKey { + // cache structure: + // class -> + // selector -> + // returnClass + // containedClass + // jsonKey + @synchronized([GTLRuntimeCommon class]) { + if (gDispatchCache == nil) { + gDispatchCache = [GTLUtilities newStaticDictionary]; + } + + CFMutableDictionaryRef classDict = + (CFMutableDictionaryRef) [gDispatchCache objectForKey:dispatchClass]; + if (classDict == nil) { + // We create a CFDictionary since the keys are raw selectors rather than + // NSStrings + const CFDictionaryKeyCallBacks keyCallBacks = { + .version = 0, + .retain = NULL, + .release = NULL, + .copyDescription = SelectorKeyCopyDescriptionCallBack, + .equal = NULL, // defaults to pointer comparison + .hash = NULL // defaults to the pointer value + }; + const CFIndex capacity = 0; // no limit + classDict = CFDictionaryCreateMutable(kCFAllocatorDefault, capacity, + &keyCallBacks, + &kCFTypeDictionaryValueCallBacks); + [gDispatchCache setObject:(id)classDict + forKey:(id)dispatchClass]; + CFRelease(classDict); + } + + NSDictionary *selDict = (NSDictionary *)CFDictionaryGetValue(classDict, sel); + if (selDict == nil) { + selDict = [NSDictionary dictionaryWithObjectsAndKeys: + jsonKey, kJSONKey, + returnClass, kReturnClassKey, // can be nil (primitive types) + containedClass, kContainedClassKey, // may be nil + nil]; + CFDictionarySetValue(classDict, sel, selDict); + } else { + // we already have a dictionary for this selector on this class, which is + // surprising + GTL_DEBUG_LOG(@"Storing duplicate dispatch for %@ selector %@", + dispatchClass, NSStringFromSelector(sel)); + } + } +} + ++ (BOOL)getStoredDispatchForClass:(Class)dispatchClass + selector:(SEL)sel + returnClass:(Class *)outReturnClass + containedClass:(Class *)outContainedClass + jsonKey:(NSString **)outJsonKey { + @synchronized([GTLRuntimeCommon class]) { + // walk from this class up the hierarchy to the ancestor class + Class topClass = class_getSuperclass([dispatchClass ancestorClass]); + for (Class currClass = dispatchClass; + currClass != topClass; + currClass = class_getSuperclass(currClass)) { + + CFMutableDictionaryRef classDict = + (CFMutableDictionaryRef) [gDispatchCache objectForKey:currClass]; + if (classDict) { + NSMutableDictionary *selDict = + (NSMutableDictionary *) CFDictionaryGetValue(classDict, sel); + if (selDict) { + if (outReturnClass) { + *outReturnClass = [selDict objectForKey:kReturnClassKey]; + } + if (outContainedClass) { + *outContainedClass = [selDict objectForKey:kContainedClassKey]; + } + if (outJsonKey) { + *outJsonKey = [selDict objectForKey:kJSONKey]; + } + return YES; + } + } + } + } + GTL_DEBUG_LOG(@"Failed to find stored dispatch info for %@ %s", + dispatchClass, sel_getName(sel)); + return NO; +} + +#pragma mark IMPs - getters and setters for specific object types + +#if !__LP64__ + +// NSInteger on 32bit +static NSInteger DynamicInteger32Getter(id self, SEL sel) { + // get an NSInteger (NSNumber) from the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [self JSONValueForKey:jsonKey]; + num = GTL_EnsureNSNumber(num); + NSInteger result = [num integerValue]; + return result; + } + return 0; +} + +static void DynamicInteger32Setter(id self, SEL sel, NSInteger val) { + // save an NSInteger (NSNumber) into the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [NSNumber numberWithInteger:val]; + [self setJSONValue:num forKey:jsonKey]; + } +} + +// NSUInteger on 32bit +static NSUInteger DynamicUInteger32Getter(id self, SEL sel) { + // get an NSUInteger (NSNumber) from the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [self JSONValueForKey:jsonKey]; + num = GTL_EnsureNSNumber(num); + NSUInteger result = [num unsignedIntegerValue]; + return result; + } + return 0; +} + +static void DynamicUInteger32Setter(id self, SEL sel, NSUInteger val) { + // save an NSUInteger (NSNumber) into the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [NSNumber numberWithUnsignedInteger:val]; + [self setJSONValue:num forKey:jsonKey]; + } +} + +#endif // !__LP64__ + +// NSInteger on 64bit, long long on 32bit and 64bit +static long long DynamicLongLongGetter(id self, SEL sel) { + // get a long long (NSNumber) from the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [self JSONValueForKey:jsonKey]; + num = GTL_EnsureNSNumber(num); + long long result = [num longLongValue]; + return result; + } + return 0; +} + +static void DynamicLongLongSetter(id self, SEL sel, long long val) { + // save a long long (NSNumber) into the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [NSNumber numberWithLongLong:val]; + [self setJSONValue:num forKey:jsonKey]; + } +} + +// NSUInteger on 64bit, unsiged long long on 32bit and 64bit +static unsigned long long DynamicULongLongGetter(id self, SEL sel) { + // get an unsigned long long (NSNumber) from the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [self JSONValueForKey:jsonKey]; + num = GTL_EnsureNSNumber(num); + unsigned long long result = [num unsignedLongLongValue]; + return result; + } + return 0; +} + +static void DynamicULongLongSetter(id self, SEL sel, unsigned long long val) { + // save an unsigned long long (NSNumber) into the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [NSNumber numberWithUnsignedLongLong:val]; + [self setJSONValue:num forKey:jsonKey]; + } +} + +// float +static float DynamicFloatGetter(id self, SEL sel) { + // get a float (NSNumber) from the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [self JSONValueForKey:jsonKey]; + num = GTL_EnsureNSNumber(num); + float result = [num floatValue]; + return result; + } + return 0.0f; +} + +static void DynamicFloatSetter(id self, SEL sel, float val) { + // save a float (NSNumber) into the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [NSNumber numberWithFloat:val]; + [self setJSONValue:num forKey:jsonKey]; + } +} + +// double +static double DynamicDoubleGetter(id self, SEL sel) { + // get a double (NSNumber) from the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [self JSONValueForKey:jsonKey]; + num = GTL_EnsureNSNumber(num); + double result = [num doubleValue]; + return result; + } + return 0.0; +} + +static void DynamicDoubleSetter(id self, SEL sel, double val) { + // save a double (NSNumber) into the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [NSNumber numberWithDouble:val]; + [self setJSONValue:num forKey:jsonKey]; + } +} + +// BOOL +static BOOL DynamicBooleanGetter(id self, SEL sel) { + // get a BOOL (NSNumber) from the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [self JSONValueForKey:jsonKey]; + BOOL flag = [num boolValue]; + return flag; + } + return NO; +} + +static void DynamicBooleanSetter(id self, SEL sel, BOOL val) { + // save a BOOL (NSNumber) into the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [NSNumber numberWithBool:val]; + [self setJSONValue:num forKey:jsonKey]; + } +} + +// NSString +static NSString *DynamicStringGetter(id self, SEL sel) { + // get an NSString from the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + + NSString *str = [self JSONValueForKey:jsonKey]; + return str; + } + return nil; +} + +static void DynamicStringSetter(id self, SEL sel, + NSString *str) { + // save an NSString into the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSString *copiedStr = [str copy]; + [self setJSONValue:copiedStr forKey:jsonKey]; + [copiedStr release]; + } +} + +// GTLDateTime +static GTLDateTime *DynamicDateTimeGetter(id self, SEL sel) { + // get a GTLDateTime from the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + + // Return the cached object before creating on demand. + GTLDateTime *cachedDateTime = [self cacheChildForKey:jsonKey]; + if (cachedDateTime != nil) { + return cachedDateTime; + } + NSString *str = [self JSONValueForKey:jsonKey]; + id cacheValue, resultValue; + if (![str isKindOfClass:[NSNull class]]) { + GTLDateTime *dateTime = [GTLDateTime dateTimeWithRFC3339String:str]; + + cacheValue = dateTime; + resultValue = dateTime; + } else { + cacheValue = nil; + resultValue = [NSNull null]; + } + [self setCacheChild:cacheValue forKey:jsonKey]; + return resultValue; + } + return nil; +} + +static void DynamicDateTimeSetter(id self, SEL sel, + GTLDateTime *dateTime) { + // save an GTLDateTime into the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + id cacheValue, jsonValue; + if (![dateTime isKindOfClass:[NSNull class]]) { + jsonValue = [dateTime stringValue]; + cacheValue = dateTime; + } else { + jsonValue = [NSNull null]; + cacheValue = nil; + } + + [self setJSONValue:jsonValue forKey:jsonKey]; + [self setCacheChild:cacheValue forKey:jsonKey]; + } +} + +// NSNumber +static NSNumber *DynamicNumberGetter(id self, SEL sel) { + // get an NSNumber from the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + + NSNumber *num = [self JSONValueForKey:jsonKey]; + num = GTL_EnsureNSNumber(num); + return num; + } + return nil; +} + +static void DynamicNumberSetter(id self, SEL sel, + NSNumber *num) { + // save an NSNumber into the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + [self setJSONValue:num forKey:jsonKey]; + } +} + +// GTLObject +static GTLObject *DynamicObjectGetter(id self, SEL sel) { + // get a GTLObject from the JSON dictionary + NSString *jsonKey = nil; + Class returnClass = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:&returnClass + containedClass:NULL + jsonKey:&jsonKey]) { + + // Return the cached object before creating on demand. + GTLObject *cachedObj = [self cacheChildForKey:jsonKey]; + if (cachedObj != nil) { + return cachedObj; + } + NSMutableDictionary *dict = [self JSONValueForKey:jsonKey]; + if ([dict isKindOfClass:[NSMutableDictionary class]]) { + // get the class of the object being returned, and instantiate it + if (returnClass == Nil) { + returnClass = [GTLObject class]; + } + + NSDictionary *surrogates = self.surrogates; + GTLObject *obj = [GTLObject objectForJSON:dict + defaultClass:returnClass + surrogates:surrogates + batchClassMap:nil]; + [self setCacheChild:obj forKey:jsonKey]; + return obj; + } else if ([dict isKindOfClass:[NSNull class]]) { + [self setCacheChild:nil forKey:jsonKey]; + return (id) [NSNull null]; + } else if (dict != nil) { + // unexpected; probably got a string -- let the caller figure it out + GTL_DEBUG_LOG(@"GTLObject: unexpected JSON: %@.%@ should be a dictionary, actually is a %@:\n%@", + NSStringFromClass(selfClass), NSStringFromSelector(sel), + NSStringFromClass([dict class]), dict); + return (GTLObject *)dict; + } + } + return nil; +} + +static void DynamicObjectSetter(id self, SEL sel, + GTLObject *obj) { + // save a GTLObject into the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + id cacheValue, jsonValue; + if (![obj isKindOfClass:[NSNull class]]) { + NSMutableDictionary *dict = [obj JSON]; + if (dict == nil && obj != nil) { + // adding an empty object; it should have a JSON dictionary so it can + // hold future assignments + obj.JSON = [NSMutableDictionary dictionary]; + jsonValue = obj.JSON; + } else { + jsonValue = dict; + } + cacheValue = obj; + } else { + jsonValue = [NSNull null]; + cacheValue = nil; + } + [self setJSONValue:jsonValue forKey:jsonKey]; + [self setCacheChild:cacheValue forKey:jsonKey]; + } +} + +// get an NSArray of GTLObjects, NSStrings, or NSNumbers from the +// JSON dictionary for this object +static NSMutableArray *DynamicArrayGetter(id self, SEL sel) { + NSString *jsonKey = nil; + Class containedClass = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:&containedClass + jsonKey:&jsonKey]) { + + // Return the cached array before creating on demand. + NSMutableArray *cachedArray = [self cacheChildForKey:jsonKey]; + if (cachedArray != nil) { + return cachedArray; + } + NSMutableArray *result = nil; + NSArray *array = [self JSONValueForKey:jsonKey]; + if (array != nil) { + if ([array isKindOfClass:[NSArray class]]) { + NSDictionary *surrogates = self.surrogates; + result = [GTLRuntimeCommon objectFromJSON:array + defaultClass:containedClass + surrogates:surrogates + isCacheable:NULL]; + } else { +#if DEBUG + if (![array isKindOfClass:[NSNull class]]) { + GTL_DEBUG_LOG(@"GTLObject: unexpected JSON: %@.%@ should be an array, actually is a %@:\n%@", + NSStringFromClass(selfClass), NSStringFromSelector(sel), + NSStringFromClass([array class]), array); + } +#endif + result = (NSMutableArray *)array; + } + } + + [self setCacheChild:result forKey:jsonKey]; + return result; + } + return nil; +} + +static void DynamicArraySetter(id self, SEL sel, + NSMutableArray *array) { + // save an array of GTLObjects objects into the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + Class containedClass = nil; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:&containedClass + jsonKey:&jsonKey]) { + id json = [GTLRuntimeCommon jsonFromAPIObject:array + expectedClass:containedClass + isCacheable:NULL]; + [self setJSONValue:json forKey:jsonKey]; + [self setCacheChild:array forKey:jsonKey]; + } +} + +// type 'id' +static id DynamicNSObjectGetter(id self, SEL sel) { + NSString *jsonKey = nil; + Class returnClass = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:&returnClass + containedClass:NULL + jsonKey:&jsonKey]) { + + // Return the cached object before creating on demand. + id cachedObj = [self cacheChildForKey:jsonKey]; + if (cachedObj != nil) { + return cachedObj; + } + + id jsonObj = [self JSONValueForKey:jsonKey]; + if (jsonObj != nil) { + BOOL shouldCache = NO; + NSDictionary *surrogates = self.surrogates; + id result = [GTLRuntimeCommon objectFromJSON:jsonObj + defaultClass:nil + surrogates:surrogates + isCacheable:&shouldCache]; + + [self setCacheChild:(shouldCache ? result : nil) + forKey:jsonKey]; + return result; + } + } + return nil; +} + +static void DynamicNSObjectSetter(id self, SEL sel, id obj) { + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + BOOL shouldCache = NO; + id json = [GTLRuntimeCommon jsonFromAPIObject:obj + expectedClass:Nil + isCacheable:&shouldCache]; + [self setJSONValue:json forKey:jsonKey]; + [self setCacheChild:(shouldCache ? obj : nil) + forKey:jsonKey]; + } +} + +#pragma mark Runtime lookup support + +static objc_property_t PropertyForSel(Class startClass, + SEL sel, BOOL isSetter, + Class *outFoundClass) { + const char *baseName = sel_getName(sel); + size_t baseNameLen = strlen(baseName); + if (isSetter) { + baseName += 3; // skip "set" + baseNameLen -= 4; // subtract "set" and the final colon + } + + // walk from this class up the hierarchy to the ancestor class + Class topClass = class_getSuperclass([startClass ancestorClass]); + for (Class currClass = startClass; + currClass != topClass; + currClass = class_getSuperclass(currClass)) { + // step through this class's properties + objc_property_t foundProp = NULL; + objc_property_t *properties = class_copyPropertyList(currClass, NULL); + if (properties) { + for (objc_property_t *prop = properties; *prop != NULL; ++prop) { + const char *propName = property_getName(*prop); + size_t propNameLen = strlen(propName); + + // search for an exact-name match (a getter), but case-insensitive on the + // first character (in case baseName comes from a setter) + if (baseNameLen == propNameLen + && strncasecmp(baseName, propName, 1) == 0 + && (baseNameLen <= 1 + || strncmp(baseName + 1, propName + 1, baseNameLen - 1) == 0)) { + // return the actual property name + foundProp = *prop; + + // if requested, return the class containing the property + if (outFoundClass) *outFoundClass = currClass; + break; + } + } + free(properties); + } + if (foundProp) return foundProp; + } + + // not found; this occasionally happens when the system looks for a method + // like "getFoo" or "descriptionWithLocale:indent:" + return NULL; +} + +typedef struct { + const char *attributePrefix; + + const char *setterEncoding; + IMP setterFunction; + const char *getterEncoding; + IMP getterFunction; + + // These are the "fixed" return classes, but some properties will require + // looking up the return class instead (because it is a subclass of + // GTLObject). + const char *returnClassName; + Class returnClass; + BOOL extractReturnClass; + +} GTLDynamicImpInfo; + +static const GTLDynamicImpInfo *DynamicImpInfoForProperty(objc_property_t prop, + Class *outReturnClass) { + + if (outReturnClass) *outReturnClass = nil; + + // dynamic method resolution: + // http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtDynamicResolution.html + // + // property runtimes: + // http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtPropertyIntrospection.html + + // Get and parse the property attributes, which look something like + // T@"NSString",&,D,P + // Ti,D -- NSInteger on 32bit + // Tq,D -- NSInteger on 64bit, long long on 32bit & 64bit + // Tc,D -- BOOL comes as char + // T@"NSString",D + // T@"GTLLink",D + // T@"NSArray",D + + + static GTLDynamicImpInfo kImplInfo[] = { +#if !__LP64__ + { // NSInteger on 32bit + "Ti", + "v@:i", (IMP)DynamicInteger32Setter, + "i@:", (IMP)DynamicInteger32Getter, + nil, nil, + NO + }, + { // NSUInteger on 32bit + "TI", + "v@:I", (IMP)DynamicUInteger32Setter, + "I@:", (IMP)DynamicUInteger32Getter, + nil, nil, + NO + }, +#endif + { // NSInteger on 64bit, long long on 32bit and 64bit. + "Tq", + "v@:q", (IMP)DynamicLongLongSetter, + "q@:", (IMP)DynamicLongLongGetter, + nil, nil, + NO + }, + { // NSUInteger on 64bit, long long on 32bit and 64bit. + "TQ", + "v@:Q", (IMP)DynamicULongLongSetter, + "Q@:", (IMP)DynamicULongLongGetter, + nil, nil, + NO + }, + { // float + "Tf", + "v@:f", (IMP)DynamicFloatSetter, + "f@:", (IMP)DynamicFloatGetter, + nil, nil, + NO + }, + { // double + "Td", + "v@:d", (IMP)DynamicDoubleSetter, + "d@:", (IMP)DynamicDoubleGetter, + nil, nil, + NO + }, + { // BOOL + "Tc", + "v@:c", (IMP)DynamicBooleanSetter, + "c@:", (IMP)DynamicBooleanGetter, + nil, nil, + NO + }, + { // NSString + "T@\"NSString\"", + "v@:@", (IMP)DynamicStringSetter, + "@@:", (IMP)DynamicStringGetter, + "NSString", nil, + NO + }, + { // NSNumber + "T@\"NSNumber\"", + "v@:@", (IMP)DynamicNumberSetter, + "@@:", (IMP)DynamicNumberGetter, + "NSNumber", nil, + NO + }, + { // GTLDateTime +#if !defined(GTL_TARGET_NAMESPACE) + "T@\"GTLDateTime\"", + "v@:@", (IMP)DynamicDateTimeSetter, + "@@:", (IMP)DynamicDateTimeGetter, + "GTLDateTime", nil, + NO +#else + "T@\"" GTL_TARGET_NAMESPACE_STRING "_" "GTLDateTime\"", + "v@:@", (IMP)DynamicDateTimeSetter, + "@@:", (IMP)DynamicDateTimeGetter, + GTL_TARGET_NAMESPACE_STRING "_" "GTLDateTime", nil, + NO +#endif + }, + { // NSArray with type + "T@\"NSArray\"", + "v@:@", (IMP)DynamicArraySetter, + "@@:", (IMP)DynamicArrayGetter, + "NSArray", nil, + NO + }, + { // id (any of the objects above) + "T@,", + "v@:@", (IMP)DynamicNSObjectSetter, + "@@:", (IMP)DynamicNSObjectGetter, + "NSObject", nil, + NO + }, + { // GTLObject - Last, cause it's a special case and prefix is general + "T@\"", + "v@:@", (IMP)DynamicObjectSetter, + "@@:", (IMP)DynamicObjectGetter, + nil, nil, + YES + }, + }; + + static BOOL hasLookedUpClasses = NO; + if (!hasLookedUpClasses) { + // Unfortunately, you can't put [NSString class] into the static structure, + // so this lookup has to be done at runtime. + hasLookedUpClasses = YES; + for (uint32_t idx = 0; idx < sizeof(kImplInfo)/sizeof(kImplInfo[0]); ++idx) { + if (kImplInfo[idx].returnClassName) { + kImplInfo[idx].returnClass = objc_getClass(kImplInfo[idx].returnClassName); + NSCAssert1(kImplInfo[idx].returnClass != nil, + @"GTLRuntimeCommon: class lookup failed: %s", kImplInfo[idx].returnClassName); + } + } + } + + const char *attr = property_getAttributes(prop); + + const char *dynamicMarker = strstr(attr, ",D"); + if (!dynamicMarker || + (dynamicMarker[2] != 0 && dynamicMarker[2] != ',' )) { + GTL_DEBUG_LOG(@"GTLRuntimeCommon: property %s isn't dynamic, attributes %s", + property_getName(prop), attr ? attr : "(nil)"); + return NULL; + } + + const GTLDynamicImpInfo *result = NULL; + + // Cycle over the list + + for (uint32_t idx = 0; idx < sizeof(kImplInfo)/sizeof(kImplInfo[0]); ++idx) { + const char *attributePrefix = kImplInfo[idx].attributePrefix; + if (strncmp(attr, attributePrefix, strlen(attributePrefix)) == 0) { + result = &kImplInfo[idx]; + if (outReturnClass) *outReturnClass = result->returnClass; + break; + } + } + + if (result == NULL) { + GTL_DEBUG_LOG(@"GTLRuntimeCommon: unexpected attributes %s for property %s", + attr ? attr : "(nil)", property_getName(prop)); + return NULL; + } + + if (result->extractReturnClass && outReturnClass) { + + // add a null at the next quotation mark + char *attrCopy = strdup(attr); + char *classNameStart = attrCopy + 3; + char *classNameEnd = strstr(classNameStart, "\""); + if (classNameEnd) { + *classNameEnd = '\0'; + + // Lookup the return class + *outReturnClass = objc_getClass(classNameStart); + if (*outReturnClass == nil) { + GTL_DEBUG_LOG(@"GTLRuntimeCommon: did not find class with name \"%s\" " + "for property \"%s\" with attributes \"%s\"", + classNameStart, property_getName(prop), attr); + } + } else { + GTL_DEBUG_LOG(@"GTLRuntimeCommon: Failed to find end of class name for " + "property \"%s\" with attributes \"%s\"", + property_getName(prop), attr); + } + free(attrCopy); + } + + return result; +} + +#pragma mark Runtime - wiring point + ++ (BOOL)resolveInstanceMethod:(SEL)sel onClass:(Class)onClass { + // dynamic method resolution: + // http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtDynamicResolution.html + // + // property runtimes: + // http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtPropertyIntrospection.html + + const char *selName = sel_getName(sel); + size_t selNameLen = strlen(selName); + char lastChar = selName[selNameLen - 1]; + BOOL isSetter = (lastChar == ':'); + + // look for a declared property matching this selector name exactly + Class foundClass = nil; + + objc_property_t prop = PropertyForSel(onClass, sel, isSetter, &foundClass); + if (prop != NULL && foundClass != nil) { + + Class returnClass = nil; + const GTLDynamicImpInfo *implInfo = DynamicImpInfoForProperty(prop, + &returnClass); + if (implInfo == NULL) { + GTL_DEBUG_LOG(@"GTLRuntimeCommon: unexpected return type class %s for " + "property \"%s\" of class \"%s\"", + returnClass ? class_getName(returnClass) : "", + property_getName(prop), + class_getName(onClass)); + } + + if (implInfo != NULL) { + IMP imp = ( isSetter ? implInfo->setterFunction : implInfo->getterFunction ); + const char *encoding = ( isSetter ? implInfo->setterEncoding : implInfo->getterEncoding ); + + class_addMethod(foundClass, sel, imp, encoding); + + const char *propName = property_getName(prop); + NSString *propStr = [NSString stringWithUTF8String:propName]; + + // replace the property name with the proper JSON key if it's + // special-cased with a map in the found class; otherwise, the property + // name is the JSON key + NSDictionary *keyMap = + [[foundClass ancestorClass] propertyToJSONKeyMapForClass:foundClass]; + NSString *jsonKey = [keyMap objectForKey:propStr]; + if (jsonKey == nil) { + jsonKey = propStr; + } + + Class containedClass = nil; + + // For arrays we need to look up what the contained class is. + if (imp == (IMP)DynamicArraySetter || imp == (IMP)DynamicArrayGetter) { + NSDictionary *classMap = + [[foundClass ancestorClass] arrayPropertyToClassMapForClass:foundClass]; + containedClass = [classMap objectForKey:jsonKey]; + if (containedClass == Nil) { + GTL_DEBUG_LOG(@"GTLRuntimeCommon: expected array item class for " + "property \"%s\" of class \"%s\"", + property_getName(prop), class_getName(foundClass)); + } + } + + // save the dispatch info to the cache + [GTLRuntimeCommon setStoredDispatchForClass:foundClass + selector:sel + returnClass:returnClass + containedClass:containedClass + jsonKey:jsonKey]; + return YES; + } + } + + return NO; +} + +@end diff --git a/GTL/Source/Objects/.svn/text-base/GTLService.h.svn-base b/GTL/Source/Objects/.svn/text-base/GTLService.h.svn-base new file mode 100644 index 0000000..c2b8b99 --- /dev/null +++ b/GTL/Source/Objects/.svn/text-base/GTLService.h.svn-base @@ -0,0 +1,607 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLService.h +// + +// Service object documentation: +// https://code.google.com/p/google-api-objectivec-client/wiki/Introduction#Services_and_Tickets + +#import + +#import "GTLDefines.h" +#import "GTMHTTPFetcherService.h" +#import "GTLBatchQuery.h" +#import "GTLBatchResult.h" +#import "GTLDateTime.h" +#import "GTLErrorObject.h" +#import "GTLFramework.h" +#import "GTLJSONParser.h" +#import "GTLObject.h" +#import "GTLQuery.h" +#import "GTLUtilities.h" + +#undef _EXTERN +#undef _INITIALIZE_AS +#ifdef GTLSERVICE_DEFINE_GLOBALS +#define _EXTERN +#define _INITIALIZE_AS(x) =x +#else +#define _EXTERN extern +#define _INITIALIZE_AS(x) +#endif + +// Error domains +_EXTERN NSString* const kGTLServiceErrorDomain _INITIALIZE_AS(@"com.google.GTLServiceDomain"); +enum { + kGTLErrorQueryResultMissing = -3000, + kGTLErrorWaitTimedOut = -3001 +}; + +_EXTERN NSString* const kGTLJSONRPCErrorDomain _INITIALIZE_AS(@"com.google.GTLJSONRPCErrorDomain"); + +// We'll consistently store the server error string in the userInfo under +// this key +_EXTERN NSString* const kGTLServerErrorStringKey _INITIALIZE_AS(@"error"); + +_EXTERN Class const kGTLUseRegisteredClass _INITIALIZE_AS(nil); + +_EXTERN NSUInteger const kGTLStandardUploadChunkSize _INITIALIZE_AS(NSUIntegerMax); + +// When servers return us structured JSON errors, the NSError will +// contain a GTLErrorObject in the userInfo dictionary under the key +// kGTLStructuredErrorsKey +_EXTERN NSString* const kGTLStructuredErrorKey _INITIALIZE_AS(@"GTLStructuredError"); + +// When specifying an ETag for updating or deleting a single entry, use +// kGTLETagWildcard to tell the server to replace the current value +// unconditionally. Do not use this in entries in a batch feed. +_EXTERN NSString* const kGTLETagWildcard _INITIALIZE_AS(@"*"); + +// Notifications when parsing of a fetcher feed or entry begins or ends +_EXTERN NSString* const kGTLServiceTicketParsingStartedNotification _INITIALIZE_AS(@"kGTLServiceTicketParsingStartedNotification"); +_EXTERN NSString* const kGTLServiceTicketParsingStoppedNotification _INITIALIZE_AS(@"kGTLServiceTicketParsingStoppedNotification"); + +@class GTLServiceTicket; + +// Block types used for fetch callbacks +// +// These typedefs are not used in the header file method declarations +// since it's more useful when code sense expansions show the argument +// types rather than the typedefs + +#if NS_BLOCKS_AVAILABLE +typedef void (^GTLServiceCompletionHandler)(GTLServiceTicket *ticket, id object, NSError *error); + +typedef void (^GTLServiceUploadProgressBlock)(GTLServiceTicket *ticket, unsigned long long numberOfBytesRead, unsigned long long dataLength); +#else +typedef void *GTLServiceCompletionHandler; + +typedef void *GTLServiceUploadProgressBlock; +#endif // NS_BLOCKS_AVAILABLE + +#pragma mark - + +// +// Service base class +// + +@interface GTLService : NSObject { + @private + NSOperationQueue *parseQueue_; + NSString *userAgent_; + GTMHTTPFetcherService *fetcherService_; + NSString *userAgentAddition_; + + NSMutableDictionary *serviceProperties_; // initial values for properties in future tickets + + NSDictionary *surrogates_; // initial value for surrogates in future tickets + + SEL uploadProgressSelector_; // optional + +#if NS_BLOCKS_AVAILABLE + BOOL (^retryBlock_)(GTLServiceTicket *, BOOL, NSError *); + void (^uploadProgressBlock_)(GTLServiceTicket *ticket, + unsigned long long numberOfBytesRead, + unsigned long long dataLength); +#elif !__LP64__ + // Placeholders: for 32-bit builds, keep the size of the object's ivar section + // the same with and without blocks + id retryPlaceholder_; + id uploadProgressPlaceholder_; +#endif + + NSUInteger uploadChunkSize_; // zero when uploading via multi-part MIME http body + + BOOL isRetryEnabled_; // user allows auto-retries + SEL retrySelector_; // optional; set with setServiceRetrySelector + NSTimeInterval maxRetryInterval_; // default to 600. seconds + + BOOL shouldFetchNextPages_; + + NSString *apiKey_; + BOOL isRESTDataWrapperRequired_; + NSString *apiVersion_; + NSURL *rpcURL_; + NSURL *rpcUploadURL_; + NSDictionary *urlQueryParameters_; + NSDictionary *additionalHTTPHeaders_; +} + +#pragma mark Query Execution + +// The finishedSelector has a signature matching: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(GTLObject *)object +// error:(NSError *)error +// +// If an error occurs, the error parameter will be non-nil. Otherwise, +// the object parameter will point to a GTLObject, if any was returned by +// the fetch. (Delete fetches return no object, so the second parameter will +// be nil.) +// +// If the query object is a GTLBatchQuery, the object passed to the callback +// will be a GTLBatchResult; see the batch query documentation: +// https://code.google.com/p/google-api-objectivec-client/wiki/Introduction#Batch_Operations + +- (GTLServiceTicket *)executeQuery:(id)query + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector; + +#if NS_BLOCKS_AVAILABLE +- (GTLServiceTicket *)executeQuery:(id)query + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler; +#endif + +// Automatic page fetches +// +// Tickets can optionally do a sequence of fetches for queries where +// repeated requests with nextPageToken or nextStartIndex values is required to +// retrieve items of all pages of the response collection. The client's +// callback is invoked only when all items have been retrieved, or an error has +// occurred. During the fetch, the items accumulated so far are available from +// the ticket. +// +// Note that the final object may be a combination of multiple page responses +// so it may not be the same as if all results had been returned in a single +// page. Some fields of the response such as total item counts may reflect only +// the final page's values. +// +// Automatic page fetches will return an error if more than 25 page fetches are +// required. For debug builds, this will log a warning to the console when more +// than 2 page fetches occur, as a reminder that the query's maxResults +// parameter should probably be increased to specify more items returned per +// page. +// +// Default value is NO. +@property (nonatomic, assign) BOOL shouldFetchNextPages; + +// Retrying; see comments on retry support at the top of GTMHTTPFetcher. +// +// Default value is NO. +@property (nonatomic, assign, getter=isRetryEnabled) BOOL retryEnabled; + +// Some services require a developer key for quotas and limits. Setting this +// will include it on all request sent to this service via a GTLQuery class. +@property (nonatomic, copy) NSString *APIKey; + +// An authorizer adds user authentication headers to the request as needed. +@property (nonatomic, retain) id authorizer; + +// Retry selector is optional for retries. +// +// If present, it should have the signature: +// -(BOOL)ticket:(GTLServiceTicket *)ticket willRetry:(BOOL)suggestedWillRetry forError:(NSError *)error +// and return YES to cause a retry. Note that unlike the GTMHTTPFetcher retry +// selector, this selector's first argument is a ticket, not a fetcher. + +@property (nonatomic, assign) SEL retrySelector; +#if NS_BLOCKS_AVAILABLE +@property (copy) BOOL (^retryBlock)(GTLServiceTicket *ticket, BOOL suggestedWillRetry, NSError *error); +#endif + +@property (nonatomic, assign) NSTimeInterval maxRetryInterval; + +// +// Fetches may be done using RPC or REST APIs, without creating +// a GTLQuery object +// + +#pragma mark RPC Fetch Methods + +// +// These methods may be used for RPC fetches without creating a GTLQuery object +// + +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + parameters:(NSDictionary *)parameters + objectClass:(Class)objectClass + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector; + +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + insertingObject:(GTLObject *)bodyObject + objectClass:(Class)objectClass + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector; + +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + parameters:(NSDictionary *)parameters + insertingObject:(GTLObject *)bodyObject + objectClass:(Class)objectClass + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector; + +#if NS_BLOCKS_AVAILABLE +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + parameters:(NSDictionary *)parameters + objectClass:(Class)objectClass + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler; + +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + insertingObject:(GTLObject *)bodyObject + objectClass:(Class)objectClass + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler; + +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + parameters:(NSDictionary *)parameters + insertingObject:(GTLObject *)bodyObject + objectClass:(Class)objectClass + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler; +#endif + +#pragma mark REST Fetch Methods + +- (GTLServiceTicket *)fetchObjectWithURL:(NSURL *)objectURL + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector; + +- (GTLServiceTicket *)fetchObjectWithURL:(NSURL *)objectURL + objectClass:(Class)objectClass + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector; + +- (GTLServiceTicket *)fetchPublicObjectWithURL:(NSURL *)objectURL + objectClass:(Class)objectClass + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector; + +- (GTLServiceTicket *)fetchObjectByInsertingObject:(GTLObject *)bodyToPut + forURL:(NSURL *)destinationURL + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector; + +- (GTLServiceTicket *)fetchObjectByUpdatingObject:(GTLObject *)bodyToPut + forURL:(NSURL *)destinationURL + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector; + +- (GTLServiceTicket *)deleteResourceURL:(NSURL *)destinationURL + ETag:(NSString *)etagOrNil + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector; + +#if NS_BLOCKS_AVAILABLE +- (GTLServiceTicket *)fetchObjectWithURL:(NSURL *)objectURL + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler; + +- (GTLServiceTicket *)fetchObjectByInsertingObject:(GTLObject *)bodyToPut + forURL:(NSURL *)destinationURL + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler; + +- (GTLServiceTicket *)fetchObjectByUpdatingObject:(GTLObject *)bodyToPut + forURL:(NSURL *)destinationURL + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler; + +- (GTLServiceTicket *)deleteResourceURL:(NSURL *)destinationURL + ETag:(NSString *)etagOrNil + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler; +#endif + +#pragma mark User Properties + +// Properties and userData are supported for client convenience. +// +// Property keys beginning with _ are reserved by the library. +// +// The service properties dictionary is copied to become the initial property +// dictionary for each ticket. +- (void)setServiceProperty:(id)obj forKey:(NSString *)key; // pass nil obj to remove property +- (id)servicePropertyForKey:(NSString *)key; + +@property (nonatomic, copy) NSDictionary *serviceProperties; + +// The service userData becomes the initial value for each future ticket's +// userData. +@property (nonatomic, retain) id serviceUserData; + +#pragma mark Request Settings + +// Set the surrogates to be used for future tickets. Surrogates are subclasses +// to be used instead of standard classes when creating objects from the JSON. +// For example, this code will make the framework generate objects +// using MyCalendarItemSubclass instead of GTLItemCalendar and +// MyCalendarEventSubclass instead of GTLItemCalendarEvent. +// +// NSDictionary *surrogates = [NSDictionary dictionaryWithObjectsAndKeys: +// [MyCalendarEntrySubclass class], [GTLItemCalendar class], +// [MyCalendarEventSubclass class], [GTLItemCalendarEvent class], +// nil]; +// [calendarService setServiceSurrogates:surrogates]; +// +@property (nonatomic, retain) NSDictionary *surrogates; + +// On iOS 4 and later, the fetch may optionally continue in the background +// until finished or stopped by OS expiration. +// +// The default value is NO. +// +// For Mac OS X, background fetches are always supported, and this property +// is ignored. +@property (nonatomic, assign) BOOL shouldFetchInBackground; + +// Callbacks can be invoked on an operation queue rather than via the run loop +// starting on 10.7 and iOS 6. Do not specify both run loop modes and an +// operation queue. Specifying a delegate queue typically looks like this: +// +// service.delegateQueue = [[[NSOperationQueue alloc] init] autorelease]; +// +// Since the callbacks will be on a thread of the operation queue, the client +// may re-dispatch from the callbacks to a known dispatch queue or to the +// main queue. +@property (nonatomic, retain) NSOperationQueue *delegateQueue; + +// Run loop modes are used for scheduling NSURLConnections. +// +// The default value, nil, schedules connections using the current run +// loop mode. To use the service during a modal dialog, be sure to specify +// NSModalPanelRunLoopMode as one of the modes. +@property (nonatomic, retain) NSArray *runLoopModes; + +// Applications needing an additional identifier in the server logs may specify +// one. +@property (nonatomic, copy) NSString *userAgentAddition; + +// Applications have a default user-agent based on the application signature +// in the Info.plist settings. Most applications should not explicitly set +// this property. +@property (nonatomic, copy) NSString *userAgent; + +// The request user agent includes the library and OS version appended to the +// base userAgent, along with the optional addition string. +@property (nonatomic, readonly) NSString *requestUserAgent; + +// Applications may call requestForURL:httpMethod to get a request with the +// proper user-agent and ETag headers +// +// For http method, pass nil (for default GET method), POST, PUT, or DELETE +- (NSMutableURLRequest *)requestForURL:(NSURL *)url + ETag:(NSString *)etagOrNil + httpMethod:(NSString *)httpMethodOrNil; + +// objectRequestForURL returns an NSMutableURLRequest for a JSON GTL object +// +// The object is the object being sent to the server, or nil; +// the http method may be nil for GET, or POST, PUT, DELETE +- (NSMutableURLRequest *)objectRequestForURL:(NSURL *)url + object:(GTLObject *)object + ETag:(NSString *)etag + httpMethod:(NSString *)httpMethod + isREST:(BOOL)isREST + additionalHeaders:(NSDictionary *)additionalHeaders + ticket:(GTLServiceTicket *)ticket; + +// The queue used for parsing JSON responses (previously this property +// was called operationQueue) +@property (nonatomic, retain) NSOperationQueue *parseQueue; + +// The fetcher service object issues the GTMHTTPFetcher instances +// for this API service +@property (nonatomic, retain) GTMHTTPFetcherService *fetcherService; + +// Default storage for cookies is in the service object's fetchHistory. +// +// Apps that want to share cookies between all standalone fetchers and the +// service object may specify static application-wide cookie storage, +// kGTMHTTPFetcherCookieStorageMethodStatic. +@property (nonatomic, assign) NSInteger cookieStorageMethod; + +// When sending REST style queries, should the payload be wrapped in a "data" +// element, and will the reply be wrapped in an "data" element. +@property (nonatomic, assign) BOOL isRESTDataWrapperRequired; + +// Any url query parameters to add to urls (useful for debugging with some +// services). +@property (copy) NSDictionary *urlQueryParameters; + +// Any extra http headers to set on requests for GTLObjects. +@property (copy) NSDictionary *additionalHTTPHeaders; + +// The service API version. +@property (nonatomic, copy) NSString *apiVersion; + +// The URL for sending RPC requests for this service. +@property (nonatomic, retain) NSURL *rpcURL; + +// The URL for sending RPC requests which initiate file upload. +@property (nonatomic, retain) NSURL *rpcUploadURL; + +// Set a non-zero value to enable uploading via chunked fetches +// (resumable uploads); typically this defaults to kGTLStandardUploadChunkSize +// for service subclasses that support chunked uploads +@property (nonatomic, assign) NSUInteger serviceUploadChunkSize; + +// Service subclasses may specify their own default chunk size ++ (NSUInteger)defaultServiceUploadChunkSize; + +// The service uploadProgressSelector becomes the initial value for each future +// ticket's uploadProgressSelector. +// +// The optional uploadProgressSelector will be called in the delegate as bytes +// are uploaded to the server. It should have a signature matching +// +// - (void)ticket:(GTLServiceTicket *)ticket +// hasDeliveredByteCount:(unsigned long long)numberOfBytesRead +// ofTotalByteCount:(unsigned long long)dataLength; +@property (nonatomic, assign) SEL uploadProgressSelector; + +#if NS_BLOCKS_AVAILABLE +@property (copy) void (^uploadProgressBlock)(GTLServiceTicket *ticket, unsigned long long numberOfBytesRead, unsigned long long dataLength); +#endif + +// Wait synchronously for fetch to complete (strongly discouraged) +// +// This just runs the current event loop until the fetch completes +// or the timout limit is reached. This may discard unexpected events +// that occur while spinning, so it's really not appropriate for use +// in serious applications. +// +// Returns true if an object was successfully fetched. If the wait +// timed out, returns false and the returned error is nil. +// +// The returned object or error, if any, will be already autoreleased +// +// This routine will likely be removed in some future releases of the library. +- (BOOL)waitForTicket:(GTLServiceTicket *)ticket + timeout:(NSTimeInterval)timeoutInSeconds + fetchedObject:(GTLObject **)outObjectOrNil + error:(NSError **)outErrorOrNil; +@end + +#pragma mark - + +// +// Ticket base class +// +@interface GTLServiceTicket : NSObject { + GTLService *service_; + + NSMutableDictionary *ticketProperties_; + NSDictionary *surrogates_; + + GTMHTTPFetcher *objectFetcher_; + SEL uploadProgressSelector_; + BOOL shouldFetchNextPages_; + BOOL isRetryEnabled_; + SEL retrySelector_; + NSTimeInterval maxRetryInterval_; + +#if NS_BLOCKS_AVAILABLE + BOOL (^retryBlock_)(GTLServiceTicket *, BOOL, NSError *); + void (^uploadProgressBlock_)(GTLServiceTicket *ticket, + unsigned long long numberOfBytesRead, + unsigned long long dataLength); +#elif !__LP64__ + // Placeholders: for 32-bit builds, keep the size of the object's ivar section + // the same with and without blocks + id retryPlaceholder_; + id uploadProgressPlaceholder_; +#endif + + GTLObject *postedObject_; + GTLObject *fetchedObject_; + id executingQuery_; + id originalQuery_; + NSError *fetchError_; + BOOL hasCalledCallback_; + NSUInteger pagesFetchedCounter_; + + NSString *apiKey_; + BOOL isREST_; + + NSOperation *parseOperation_; +} + ++ (id)ticketForService:(GTLService *)service; + +- (id)initWithService:(GTLService *)service; + +- (id)service; + +#pragma mark Execution Control +// if cancelTicket is called, the fetch is stopped if it is in progress, +// the callbacks will not be called, and the ticket will no longer be useful +// (though the client must still release the ticket if it retained the ticket) +- (void)cancelTicket; + +// chunked upload tickets may be paused +- (void)pauseUpload; +- (void)resumeUpload; +- (BOOL)isUploadPaused; + +@property (nonatomic, retain) GTMHTTPFetcher *objectFetcher; +@property (nonatomic, assign) SEL uploadProgressSelector; + +// Services which do not require an user authorization may require a developer +// API key for quota management +@property (nonatomic, copy) NSString *APIKey; + +#pragma mark User Properties + +// Properties and userData are supported for client convenience. +// +// Property keys beginning with _ are reserved by the library. +- (void)setProperty:(id)obj forKey:(NSString *)key; // pass nil obj to remove property +- (id)propertyForKey:(NSString *)key; + +@property (nonatomic, copy) NSDictionary *properties; +@property (nonatomic, retain) id userData; + +#pragma mark Payload + +@property (nonatomic, retain) GTLObject *postedObject; +@property (nonatomic, retain) GTLObject *fetchedObject; +@property (nonatomic, retain) id executingQuery; // Query currently being fetched by this ticket +@property (nonatomic, retain) id originalQuery; // Query used to create this ticket +- (GTLQuery *)queryForRequestID:(NSString *)requestID; // Returns the query from within the batch with the given id. + +@property (nonatomic, retain) NSDictionary *surrogates; + +#pragma mark Retry + +@property (nonatomic, assign, getter=isRetryEnabled) BOOL retryEnabled; +@property (nonatomic, assign) SEL retrySelector; +#if NS_BLOCKS_AVAILABLE +@property (copy) BOOL (^retryBlock)(GTLServiceTicket *ticket, BOOL suggestedWillRetry, NSError *error); +#endif +@property (nonatomic, assign) NSTimeInterval maxRetryInterval; + +#pragma mark Status + +@property (nonatomic, readonly) NSInteger statusCode; // server status from object fetch +@property (nonatomic, retain) NSError *fetchError; +@property (nonatomic, assign) BOOL hasCalledCallback; + +#pragma mark Pagination + +@property (nonatomic, assign) BOOL shouldFetchNextPages; +@property (nonatomic, assign) NSUInteger pagesFetchedCounter; + +#pragma mark Upload + +#if NS_BLOCKS_AVAILABLE +@property (copy) void (^uploadProgressBlock)(GTLServiceTicket *ticket, unsigned long long numberOfBytesRead, unsigned long long dataLength); +#endif + +@end + + +// Category to provide opaque access to tickets stored in fetcher properties +@interface GTMHTTPFetcher (GTLServiceTicketAdditions) +- (id)ticket; +@end + diff --git a/GTL/Source/Objects/.svn/text-base/GTLService.m.svn-base b/GTL/Source/Objects/.svn/text-base/GTLService.m.svn-base new file mode 100644 index 0000000..78dbd27 --- /dev/null +++ b/GTL/Source/Objects/.svn/text-base/GTLService.m.svn-base @@ -0,0 +1,2404 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLService.m +// + +#import +#if TARGET_OS_MAC +#include +#endif + +#if TARGET_OS_IPHONE +#import +#endif + +#define GTLSERVICE_DEFINE_GLOBALS 1 +#import "GTLService.h" + +static NSString *const kUserDataPropertyKey = @"_userData"; + +static NSString* const kFetcherDelegateKey = @"_delegate"; +static NSString* const kFetcherObjectClassKey = @"_objectClass"; +static NSString* const kFetcherFinishedSelectorKey = @"_finishedSelector"; +static NSString* const kFetcherCompletionHandlerKey = @"_completionHandler"; +static NSString* const kFetcherTicketKey = @"_ticket"; +static NSString* const kFetcherFetchErrorKey = @"_fetchError"; +static NSString* const kFetcherParsingNotificationKey = @"_parseNotification"; +static NSString* const kFetcherParsedObjectKey = @"_parsedObject"; +static NSString* const kFetcherBatchClassMapKey = @"_batchClassMap"; +static NSString* const kFetcherCallbackThreadKey = @"_callbackThread"; +static NSString* const kFetcherCallbackRunLoopModesKey = @"_runLoopModes"; + +static const NSUInteger kMaxNumberOfNextPagesFetched = 25; + +// we'll enforce 50K chunks minimum just to avoid the server getting hit +// with too many small upload chunks +static const NSUInteger kMinimumUploadChunkSize = 50000; +static const NSUInteger kStandardUploadChunkSize = NSUIntegerMax; + +// Helper to get the ETag if it is defined on an object. +static NSString *ETagIfPresent(GTLObject *obj) { + NSString *result = [obj.JSON objectForKey:@"etag"]; + return result; +} + +@interface GTLServiceTicket () +@property (retain) NSOperation *parseOperation; +@property (assign) BOOL isREST; +@end + +// category to provide opaque access to tickets stored in fetcher properties +@implementation GTMHTTPFetcher (GTLServiceTicketAdditions) +- (id)ticket { + return [self propertyForKey:kFetcherTicketKey]; +} +@end + +// If GTMHTTPUploadFetcher is available, it can be used for chunked uploads +// +// We locally declare some methods of GTMHTTPUploadFetcher so we +// do not need to import the header, as some projects may not have it available +@interface GTMHTTPUploadFetcher : GTMHTTPFetcher ++ (GTMHTTPUploadFetcher *)uploadFetcherWithRequest:(NSURLRequest *)request + uploadData:(NSData *)data + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(NSUInteger)chunkSize + fetcherService:(GTMHTTPFetcherService *)fetcherService; ++ (GTMHTTPUploadFetcher *)uploadFetcherWithRequest:(NSURLRequest *)request + uploadFileHandle:(NSFileHandle *)uploadFileHandle + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(NSUInteger)chunkSize + fetcherService:(GTMHTTPFetcherService *)fetcherService; ++ (GTMHTTPUploadFetcher *)uploadFetcherWithLocation:(NSURL *)location + uploadFileHandle:(NSFileHandle *)fileHandle + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(NSUInteger)chunkSize + fetcherService:(GTMHTTPFetcherService *)fetcherService; +- (void)pauseFetching; +- (void)resumeFetching; +- (BOOL)isPaused; +@end + + +@interface GTLService () +- (void)prepareToParseObjectForFetcher:(GTMHTTPFetcher *)fetcher; +- (void)handleParsedObjectForFetcher:(GTMHTTPFetcher *)fetcher; +- (BOOL)fetchNextPageWithQuery:(GTLQuery *)query + delegate:(id)delegate + didFinishedSelector:(SEL)finishedSelector + completionHandler:(GTLServiceCompletionHandler)completionHandler + ticket:(GTLServiceTicket *)ticket; +- (id )nextPageQueryForQuery:(GTLQuery *)query + result:(GTLObject *)object + ticket:(GTLServiceTicket *)ticket; +- (GTLObject *)mergedNewResultObject:(GTLObject *)newResult + oldResultObject:(GTLObject *)oldResult + forQuery:(GTLQuery *)query; +- (GTMHTTPUploadFetcher *)uploadFetcherWithRequest:(NSURLRequest *)request + fetcherService:(GTMHTTPFetcherService *)fetcherService + params:(GTLUploadParameters *)uploadParams; ++ (void)invokeCallback:(SEL)callbackSel + target:(id)target + ticket:(id)ticket + object:(id)object + error:(id)error; +- (BOOL)invokeRetrySelector:(SEL)retrySelector + delegate:(id)delegate + ticket:(GTLServiceTicket *)ticket + willRetry:(BOOL)willRetry + error:(NSError *)error; +- (BOOL)objectFetcher:(GTMHTTPFetcher *)fetcher + willRetry:(BOOL)willRetry + forError:(NSError *)error; +- (void)objectFetcher:(GTMHTTPFetcher *)fetcher + finishedWithData:(NSData *)data + error:(NSError *)error; +- (void)parseObjectFromDataOfFetcher:(GTMHTTPFetcher *)fetcher; +@end + +@interface GTLObject (StandardProperties) +@property (retain) NSString *ETag; +@property (retain) NSString *nextPageToken; +@property (retain) NSNumber *nextStartIndex; +@end + +@implementation GTLService + +@synthesize userAgentAddition = userAgentAddition_, + fetcherService = fetcherService_, + parseQueue = parseQueue_, + shouldFetchNextPages = shouldFetchNextPages_, + surrogates = surrogates_, + uploadProgressSelector = uploadProgressSelector_, + retryEnabled = isRetryEnabled_, + retrySelector = retrySelector_, + maxRetryInterval = maxRetryInterval_, + APIKey = apiKey_, + isRESTDataWrapperRequired = isRESTDataWrapperRequired_, + urlQueryParameters = urlQueryParameters_, + additionalHTTPHeaders = additionalHTTPHeaders_, + apiVersion = apiVersion_, + rpcURL = rpcURL_, + rpcUploadURL = rpcUploadURL_; + +#if NS_BLOCKS_AVAILABLE +@synthesize retryBlock = retryBlock_, + uploadProgressBlock = uploadProgressBlock_; +#endif + ++ (Class)ticketClass { + return [GTLServiceTicket class]; +} + +- (id)init { + self = [super init]; + if (self) { + +#if GTL_IPHONE || (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_5) + // For 10.6 and up, always use an operation queue + parseQueue_ = [[NSOperationQueue alloc] init]; +#elif !GTL_SKIP_PARSE_THREADING + // Avoid NSOperationQueue prior to 10.5.6, per + // http://www.mikeash.com/?page=pyblog/use-nsoperationqueue.html + SInt32 bcdSystemVersion = 0; + (void) Gestalt(gestaltSystemVersion, &bcdSystemVersion); + + if (bcdSystemVersion >= 0x1057) { + parseQueue_ = [[NSOperationQueue alloc] init]; + } +#else + // parseQueue_ defaults to nil, so parsing will be done immediately + // on the current thread +#endif + + fetcherService_ = [[GTMHTTPFetcherService alloc] init]; + + NSUInteger chunkSize = [[self class] defaultServiceUploadChunkSize]; + self.serviceUploadChunkSize = chunkSize; + } + return self; +} + +- (void)dealloc { + [parseQueue_ release]; + [userAgent_ release]; + [fetcherService_ release]; + [userAgentAddition_ release]; + [serviceProperties_ release]; + [surrogates_ release]; +#if NS_BLOCKS_AVAILABLE + [uploadProgressBlock_ release]; + [retryBlock_ release]; +#endif + [apiKey_ release]; + [apiVersion_ release]; + [rpcURL_ release]; + [rpcUploadURL_ release]; + [urlQueryParameters_ release]; + [additionalHTTPHeaders_ release]; + + [super dealloc]; +} + +- (NSString *)requestUserAgent { + NSString *userAgent = self.userAgent; + if ([userAgent length] == 0) { + // the service instance is missing an explicit user-agent; use the bundle ID + // or process name + NSBundle *owningBundle = [NSBundle bundleForClass:[self class]]; + if (owningBundle == nil + || [[owningBundle bundleIdentifier] isEqual:@"com.google.GTLFramework"]) { + + owningBundle = [NSBundle mainBundle]; + } + + userAgent = GTMApplicationIdentifier(owningBundle); + } + + NSString *requestUserAgent = userAgent; + + // if the user agent already specifies the library version, we'll + // use it verbatim in the request + NSString *libraryString = @"google-api-objc-client"; + NSRange libRange = [userAgent rangeOfString:libraryString + options:NSCaseInsensitiveSearch]; + if (libRange.location == NSNotFound) { + // the user agent doesn't specify the client library, so append that + // information, and the system version + NSString *libVersionString = GTLFrameworkVersionString(); + + NSString *systemString = GTMSystemVersionString(); + + // We don't clean this with GTMCleanedUserAgentString so spaces are + // preserved + NSString *userAgentAddition = self.userAgentAddition; + NSString *customString = userAgentAddition ? + [@" " stringByAppendingString:userAgentAddition] : @""; + + // Google servers look for gzip in the user agent before sending gzip- + // encoded responses. See Service.java + requestUserAgent = [NSString stringWithFormat:@"%@ %@/%@ %@%@ (gzip)", + userAgent, libraryString, libVersionString, systemString, customString]; + } + return requestUserAgent; +} + +- (NSMutableURLRequest *)requestForURL:(NSURL *)url + ETag:(NSString *)etag + httpMethod:(NSString *)httpMethod + ticket:(GTLServiceTicket *)ticket { + + // subclasses may add headers to this + NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] initWithURL:url + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:60] autorelease]; + NSString *requestUserAgent = self.requestUserAgent; + [request setValue:requestUserAgent forHTTPHeaderField:@"User-Agent"]; + + if ([httpMethod length] > 0) { + [request setHTTPMethod:httpMethod]; + } + + if ([etag length] > 0) { + + // it's rather unexpected for an etagged object to be provided for a GET, + // but we'll check for an etag anyway, similar to HttpGDataRequest.java, + // and if present use it to request only an unchanged resource + + BOOL isDoingHTTPGet = (httpMethod == nil + || [httpMethod caseInsensitiveCompare:@"GET"] == NSOrderedSame); + + if (isDoingHTTPGet) { + + // set the etag header, even if weak, indicating we don't want + // another copy of the resource if it's the same as the object + [request setValue:etag forHTTPHeaderField:@"If-None-Match"]; + + } else { + + // if we're doing PUT or DELETE, set the etag header indicating + // we only want to update the resource if our copy matches the current + // one (unless the etag is weak and so shouldn't be a constraint at all) + BOOL isWeakETag = [etag hasPrefix:@"W/"]; + + BOOL isModifying = + [httpMethod caseInsensitiveCompare:@"PUT"] == NSOrderedSame + || [httpMethod caseInsensitiveCompare:@"DELETE"] == NSOrderedSame + || [httpMethod caseInsensitiveCompare:@"PATCH"] == NSOrderedSame; + + if (isModifying && !isWeakETag) { + [request setValue:etag forHTTPHeaderField:@"If-Match"]; + } + } + } + + return request; +} + +- (NSMutableURLRequest *)requestForURL:(NSURL *)url + ETag:(NSString *)etag + httpMethod:(NSString *)httpMethod { + // this public entry point authenticates from the service object but + // not from the auth token in the ticket + return [self requestForURL:url ETag:etag httpMethod:httpMethod ticket:nil]; +} + +// objectRequestForURL returns an NSMutableURLRequest for a GTLObject +// +// the object is the object being sent to the server, or nil; +// the http method may be nil for get, or POST, PUT, DELETE + +- (NSMutableURLRequest *)objectRequestForURL:(NSURL *)url + object:(GTLObject *)object + ETag:(NSString *)etag + httpMethod:(NSString *)httpMethod + isREST:(BOOL)isREST + additionalHeaders:(NSDictionary *)additionalHeaders + ticket:(GTLServiceTicket *)ticket { + if (object) { + // if the object being sent has an etag, add it to the request header to + // avoid retrieving a duplicate or to avoid writing over an updated + // version of the resource on the server + // + // Typically, delete requests will provide an explicit ETag parameter, and + // other requests will have the ETag carried inside the object being updated + if (etag == nil) { + SEL selEtag = @selector(ETag); + if ([object respondsToSelector:selEtag]) { + etag = [object performSelector:selEtag]; + } + } + } + + NSMutableURLRequest *request = [self requestForURL:url + ETag:etag + httpMethod:httpMethod + ticket:ticket]; + NSString *acceptValue; + NSString *contentTypeValue; + if (isREST) { + acceptValue = @"application/json"; + contentTypeValue = @"application/json; charset=utf-8"; + } else { + acceptValue = @"application/json-rpc"; + contentTypeValue = @"application/json-rpc; charset=utf-8"; + } + [request setValue:acceptValue forHTTPHeaderField:@"Accept"]; + [request setValue:contentTypeValue forHTTPHeaderField:@"Content-Type"]; + + [request setValue:@"no-cache" forHTTPHeaderField:@"Cache-Control"]; + + // Add the additional http headers from the service, and then from the query + NSDictionary *headers = self.additionalHTTPHeaders; + for (NSString *key in headers) { + NSString *value = [headers valueForKey:key]; + [request setValue:value forHTTPHeaderField:key]; + } + + headers = additionalHeaders; + for (NSString *key in headers) { + NSString *value = [headers valueForKey:key]; + [request setValue:value forHTTPHeaderField:key]; + } + + return request; +} + +#pragma mark - + +// common fetch starting method + +- (GTLServiceTicket *)fetchObjectWithURL:(NSURL *)targetURL + objectClass:(Class)objectClass + bodyObject:(GTLObject *)bodyObject + dataToPost:(NSData *)dataToPost + ETag:(NSString *)etag + httpMethod:(NSString *)httpMethod + mayAuthorize:(BOOL)mayAuthorize + isREST:(BOOL)isREST + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector + completionHandler:(id)completionHandler // GTLServiceCompletionHandler + executingQuery:(id)query + ticket:(GTLServiceTicket *)ticket { + + GTMAssertSelectorNilOrImplementedWithArgs(delegate, finishedSelector, @encode(GTLServiceTicket *), @encode(GTLObject *), @encode(NSError *), 0); + + // The completionHandler argument is declared as an id, not as a block + // pointer, so this can be built with the 10.6 SDK and still run on 10.5. + // If the argument were declared as a block pointer, the invocation for + // fetchObjectWithURL: created in GTLService would cause an exception + // since 10.5's NSInvocation cannot deal with encoding of block pointers. + + GTL_DEBUG_ASSERT(targetURL != nil, @"no url?"); + if (targetURL == nil) return nil; + + // we need to create a ticket unless one was created earlier (like during + // authentication) + if (!ticket) { + ticket = [[[self class] ticketClass] ticketForService:self]; + } + + ticket.isREST = isREST; + + // Add any service specific query parameters. + NSDictionary *urlQueryParameters = self.urlQueryParameters; + if ([urlQueryParameters count] > 0) { + targetURL = [GTLUtilities URLWithString:[targetURL absoluteString] + queryParameters:urlQueryParameters]; + } + + // If this is REST and there is a developer key, add it onto the url. RPC + // adds the key into the payload, not on the url. + NSString *apiKey = self.APIKey; + if (isREST && [apiKey length] > 0) { + NSString *const kDeveloperAPIQueryParamKey = @"key"; + NSDictionary *queryParameters; + queryParameters = [NSDictionary dictionaryWithObject:apiKey + forKey:kDeveloperAPIQueryParamKey]; + targetURL = [GTLUtilities URLWithString:[targetURL absoluteString] + queryParameters:queryParameters]; + } + + NSDictionary *additionalHeaders = query.additionalHTTPHeaders; + + NSMutableURLRequest *request = [self objectRequestForURL:targetURL + object:bodyObject + ETag:etag + httpMethod:httpMethod + isREST:isREST + additionalHeaders:additionalHeaders + ticket:ticket]; + + GTMAssertSelectorNilOrImplementedWithArgs(delegate, ticket.uploadProgressSelector, + @encode(GTLServiceTicket *), @encode(unsigned long long), + @encode(unsigned long long), 0); + GTMAssertSelectorNilOrImplementedWithArgs(delegate, ticket.retrySelector, + @encode(GTLServiceTicket *), @encode(BOOL), @encode(NSError *), 0); + + SEL finishedSel = @selector(objectFetcher:finishedWithData:error:); + + ticket.postedObject = bodyObject; + + ticket.executingQuery = query; + if (ticket.originalQuery == nil) { + ticket.originalQuery = query; + } + + GTMHTTPFetcherService *fetcherService = self.fetcherService; + GTMHTTPFetcher *fetcher; + + GTLUploadParameters *uploadParams = query.uploadParameters; + if (uploadParams == nil) { + // Not uploading a file with this request + fetcher = [fetcherService fetcherWithRequest:request]; + } else { + fetcher = [self uploadFetcherWithRequest:request + fetcherService:fetcherService + params:uploadParams]; + } + + if (finishedSelector) { + // if we don't have a method name, default to the finished selector as + // a useful fetcher log comment + fetcher.comment = NSStringFromSelector(finishedSelector); + } + + // allow the user to specify static app-wide cookies for fetching + NSInteger cookieStorageMethod = [self cookieStorageMethod]; + if (cookieStorageMethod >= 0) { + fetcher.cookieStorageMethod = cookieStorageMethod; + } + + if (!mayAuthorize) { + fetcher.authorizer = nil; + } + + // copy the ticket's retry settings into the fetcher + fetcher.retryEnabled = ticket.retryEnabled; + fetcher.maxRetryInterval = ticket.maxRetryInterval; + + BOOL shouldExamineRetries; +#if NS_BLOCKS_AVAILABLE + shouldExamineRetries = (ticket.retrySelector != nil + || ticket.retryBlock != nil); +#else + shouldExamineRetries = (ticket.retrySelector != nil); +#endif + if (shouldExamineRetries) { + [fetcher setRetrySelector:@selector(objectFetcher:willRetry:forError:)]; + } + + // remember the object fetcher in the ticket + ticket.objectFetcher = fetcher; + + // add parameters used by the callbacks + + [fetcher setProperty:objectClass forKey:kFetcherObjectClassKey]; + + [fetcher setProperty:delegate forKey:kFetcherDelegateKey]; + + [fetcher setProperty:NSStringFromSelector(finishedSelector) + forKey:kFetcherFinishedSelectorKey]; + + [fetcher setProperty:ticket + forKey:kFetcherTicketKey]; + +#if NS_BLOCKS_AVAILABLE + // copy the completion handler block to the heap; this does nothing if the + // block is already on the heap + completionHandler = [[completionHandler copy] autorelease]; + [fetcher setProperty:completionHandler + forKey:kFetcherCompletionHandlerKey]; +#endif + + // set the upload data + fetcher.postData = dataToPost; + + // failed fetches call the failure selector, which will delete the ticket + BOOL didFetch = [fetcher beginFetchWithDelegate:self + didFinishSelector:finishedSel]; + + // If something weird happens and the networking callbacks have been called + // already synchronously, we don't want to return the ticket since the caller + // will never know when to stop retaining it, so we'll make sure the + // success/failure callbacks have not yet been called by checking the + // ticket + if (!didFetch || ticket.hasCalledCallback) { + fetcher.properties = nil; + return nil; + } + + return ticket; +} + +- (GTMHTTPUploadFetcher *)uploadFetcherWithRequest:(NSURLRequest *)request + fetcherService:(GTMHTTPFetcherService *)fetcherService + params:(GTLUploadParameters *)uploadParams { + // Hang on to the user's requested chunk size, and ensure it's not tiny + NSUInteger uploadChunkSize = [self serviceUploadChunkSize]; + if (uploadChunkSize < kMinimumUploadChunkSize) { + uploadChunkSize = kMinimumUploadChunkSize; + } + +#ifdef GTL_TARGET_NAMESPACE + // Prepend the class name prefix + Class uploadClass = NSClassFromString(@GTL_TARGET_NAMESPACE_STRING + "_GTMHTTPUploadFetcher"); +#else + Class uploadClass = NSClassFromString(@"GTMHTTPUploadFetcher"); +#endif + GTL_ASSERT(uploadClass != nil, @"GTMHTTPUploadFetcher needed"); + + NSString *uploadMIMEType = uploadParams.MIMEType; + NSData *uploadData = uploadParams.data; + NSFileHandle *uploadFileHandle = uploadParams.fileHandle; + NSURL *uploadLocationURL = uploadParams.uploadLocationURL; + + GTMHTTPUploadFetcher *fetcher; + if (uploadData) { + fetcher = [uploadClass uploadFetcherWithRequest:request + uploadData:uploadData + uploadMIMEType:uploadMIMEType + chunkSize:uploadChunkSize + fetcherService:fetcherService]; + } else if (uploadLocationURL) { + GTL_DEBUG_ASSERT(uploadFileHandle != nil, + @"Resume requires a file handle"); + fetcher = [uploadClass uploadFetcherWithLocation:uploadLocationURL + uploadFileHandle:uploadFileHandle + uploadMIMEType:uploadMIMEType + chunkSize:uploadChunkSize + fetcherService:fetcherService]; + } else { + fetcher = [uploadClass uploadFetcherWithRequest:request + uploadFileHandle:uploadFileHandle + uploadMIMEType:uploadMIMEType + chunkSize:uploadChunkSize + fetcherService:fetcherService]; + } + + NSString *slug = [uploadParams slug]; + if ([slug length] > 0) { + [[fetcher mutableRequest] setValue:slug forHTTPHeaderField:@"Slug"]; + } + return fetcher; +} + +#pragma mark - + +// RPC fetch methods + +- (NSDictionary *)rpcPayloadForMethodNamed:(NSString *)methodName + parameters:(NSDictionary *)parameters + bodyObject:(GTLObject *)bodyObject + requestID:(NSString *)requestID { + GTL_DEBUG_ASSERT([requestID length] > 0, @"Got an empty request id"); + + // First, merge the developer key and bodyObject into the parameters. + + NSString *apiKey = self.APIKey; + NSUInteger apiKeyLen = [apiKey length]; + + NSString *const kDeveloperAPIParamKey = @"key"; + NSString *const kBodyObjectParamKey = @"resource"; + + NSDictionary *finalParams; + if ((apiKeyLen == 0) && (bodyObject == nil)) { + // Nothing needs to be added, just send the dict along. + finalParams = parameters; + } else { + NSMutableDictionary *worker = [NSMutableDictionary dictionary]; + if ([parameters count] > 0) { + [worker addEntriesFromDictionary:parameters]; + } + if ((apiKeyLen > 0) + && ([worker objectForKey:kDeveloperAPIParamKey] == nil)) { + [worker setObject:apiKey forKey:kDeveloperAPIParamKey]; + } + if (bodyObject != nil) { + GTL_DEBUG_ASSERT([parameters objectForKey:kBodyObjectParamKey] == nil, + @"There was already something under the 'data' key?!"); + [worker setObject:[bodyObject JSON] forKey:kBodyObjectParamKey]; + } + finalParams = worker; + } + + // Now, build up the full dictionary for the JSON-RPC (this is the body of + // the HTTP PUT). + + // Spec calls for the jsonrpc entry. Google doesn't require it, but include + // it so the code can work with other servers. + NSMutableDictionary *rpcPayload = [NSMutableDictionary dictionaryWithObjectsAndKeys: + @"2.0", @"jsonrpc", + methodName, @"method", + requestID, @"id", + nil]; + + // Google extension, provide the version of the api. + NSString *apiVersion = self.apiVersion; + if ([apiVersion length] > 0) { + [rpcPayload setObject:apiVersion forKey:@"apiVersion"]; + } + + if ([finalParams count] > 0) { + [rpcPayload setObject:finalParams forKey:@"params"]; + } + + return rpcPayload; +} + +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + objectClass:(Class)objectClass + parameters:(NSDictionary *)parameters + bodyObject:(GTLObject *)bodyObject + requestID:(NSString *)requestID + urlQueryParameters:(NSDictionary *)urlQueryParameters + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector + completionHandler:(id)completionHandler // GTLServiceCompletionHandler + executingQuery:(id)executingQuery + ticket:(GTLServiceTicket *)ticket { + GTL_DEBUG_ASSERT([methodName length] > 0, @"Got an empty method name"); + if ([methodName length] == 0) return nil; + + // If we didn't get a requestID, assign one (call came from one of the public + // calls that doesn't take a GTLQuery object). + if (requestID == nil) { + requestID = [GTLQuery nextRequestID]; + } + + NSData *dataToPost = nil; + GTLUploadParameters *uploadParameters = executingQuery.uploadParameters; + BOOL shouldSendBody = !uploadParameters.shouldSendUploadOnly; + if (shouldSendBody) { + NSDictionary *rpcPayload = [self rpcPayloadForMethodNamed:methodName + parameters:parameters + bodyObject:bodyObject + requestID:requestID]; + + NSError *error = nil; + dataToPost = [GTLJSONParser dataWithObject:rpcPayload + humanReadable:NO + error:&error]; + if (dataToPost == nil) { + // There is the chance something went into parameters that wasn't valid. + GTL_DEBUG_LOG(@"JSON generation error: %@", error); + return nil; + } + } + + BOOL isUploading = (uploadParameters != nil); + NSURL *rpcURL = (isUploading ? self.rpcUploadURL : self.rpcURL); + + if ([urlQueryParameters count] > 0) { + rpcURL = [GTLUtilities URLWithString:[rpcURL absoluteString] + queryParameters:urlQueryParameters]; + } + + BOOL mayAuthorize = (executingQuery ? + !executingQuery.shouldSkipAuthorization : YES); + + GTLServiceTicket *resultTicket = [self fetchObjectWithURL:rpcURL + objectClass:objectClass + bodyObject:bodyObject + dataToPost:dataToPost + ETag:nil + httpMethod:@"POST" + mayAuthorize:mayAuthorize + isREST:NO + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:completionHandler + executingQuery:executingQuery + ticket:ticket]; + + // Set the fetcher log comment to default to the method name + NSUInteger pageNumber = resultTicket.pagesFetchedCounter; + if (pageNumber == 0) { + resultTicket.objectFetcher.comment = methodName; + } else { + // Also put the page number in the log comment + [resultTicket.objectFetcher setCommentWithFormat:@"%@ (page %lu)", + methodName, (unsigned long) (pageNumber + 1)]; + } + + return resultTicket; +} + +- (GTLServiceTicket *)executeBatchQuery:(GTLBatchQuery *)batch + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector + completionHandler:(id)completionHandler // GTLServiceCompletionHandler + ticket:(GTLServiceTicket *)ticket { + GTLBatchQuery *batchCopy = [[batch copy] autorelease]; + NSArray *queries = batchCopy.queries; + NSUInteger numberOfQueries = [queries count]; + if (numberOfQueries == 0) return nil; + + // Build up the array of RPC calls. + NSMutableArray *rpcPayloads = [NSMutableArray arrayWithCapacity:numberOfQueries]; + NSMutableArray *requestIDs = [NSMutableSet setWithCapacity:numberOfQueries]; + for (GTLQuery *query in queries) { + NSString *methodName = query.methodName; + NSDictionary *parameters = query.JSON; + GTLObject *bodyObject = query.bodyObject; + NSString *requestID = query.requestID; + + if ([methodName length] == 0 || [requestID length] == 0) { + GTL_DEBUG_ASSERT(0, @"Invalid query - id:%@ method:%@", + requestID, methodName); + return nil; + } + + GTL_DEBUG_ASSERT(query.additionalHTTPHeaders == nil, + @"additionalHTTPHeaders 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); + + NSDictionary *rpcPayload = [self rpcPayloadForMethodNamed:methodName + parameters:parameters + bodyObject:bodyObject + requestID:requestID]; + [rpcPayloads addObject:rpcPayload]; + + if ([requestIDs containsObject:requestID]) { + GTL_DEBUG_LOG(@"Duplicate request id in batch: %@", requestID); + return nil; + } + [requestIDs addObject:requestID]; + } + + NSError *error = nil; + NSData *dataToPost = nil; + dataToPost = [GTLJSONParser dataWithObject:rpcPayloads + humanReadable:NO + error:&error]; + if (dataToPost == nil) { + // There is the chance something went into parameters that wasn't valid. + GTL_DEBUG_LOG(@"JSON generation error: %@", error); + return nil; + } + + 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; + GTLServiceTicket *resultTicket = [self fetchObjectWithURL:rpcURL + objectClass:[GTLBatchResult class] + bodyObject:nil + dataToPost:dataToPost + ETag:nil + httpMethod:@"POST" + mayAuthorize:mayAuthorize + isREST:NO + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:completionHandler + executingQuery:batch + ticket:ticket]; + +#if !STRIP_GTM_FETCH_LOGGING + // Set the fetcher log comment + // + // Because this has expensive set operations, it's conditionally + // compiled in + NSArray *methodNames = [queries valueForKey:@"methodName"]; + methodNames = [[NSSet setWithArray:methodNames] allObjects]; // de-dupe + NSString *methodsStr = [methodNames componentsJoinedByString:@", "]; + + NSUInteger pageNumber = ticket.pagesFetchedCounter; + NSString *pageStr = @""; + if (pageNumber > 0) { + pageStr = [NSString stringWithFormat:@"page %lu, ", + (unsigned long) pageNumber + 1]; + } + [resultTicket.objectFetcher setCommentWithFormat:@"batch: %@ (%@%lu queries)", + methodsStr, pageStr, (unsigned long) numberOfQueries]; +#endif + + return resultTicket; +} + + +#pragma mark - + +// REST fetch methods + +- (GTLServiceTicket *)fetchObjectWithURL:(NSURL *)targetURL + objectClass:(Class)objectClass + bodyObject:(GTLObject *)bodyObject + ETag:(NSString *)etag + httpMethod:(NSString *)httpMethod + mayAuthorize:(BOOL)mayAuthorize + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector + completionHandler:(id)completionHandler // GTLServiceCompletionHandler + ticket:(GTLServiceTicket *)ticket { + // if no URL was supplied, treat this as if the fetch failed (below) + // and immediately return a nil ticket, skipping the callbacks + // + // this might be considered normal (say, updating a read-only entry + // that lacks an edit link) though higher-level calls may assert or + // return errors depending on the specific usage + if (targetURL == nil) return nil; + + NSData *dataToPost = nil; + if (bodyObject != nil) { + NSError *error = nil; + + NSDictionary *whatToSend; + NSDictionary *json = bodyObject.JSON; + if (isRESTDataWrapperRequired_) { + // create the top-level "data" object + NSDictionary *dataDict = [NSDictionary dictionaryWithObject:json + forKey:@"data"]; + whatToSend = dataDict; + } else { + whatToSend = json; + } + dataToPost = [GTLJSONParser dataWithObject:whatToSend + humanReadable:NO + error:&error]; + if (dataToPost == nil) { + GTL_DEBUG_LOG(@"JSON generation error: %@", error); + } + } + + return [self fetchObjectWithURL:targetURL + objectClass:objectClass + bodyObject:bodyObject + dataToPost:dataToPost + ETag:etag + httpMethod:httpMethod + mayAuthorize:mayAuthorize + isREST:YES + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:completionHandler + executingQuery:nil + ticket:ticket]; +} + +- (void)invokeProgressCallbackForTicket:(GTLServiceTicket *)ticket + deliveredBytes:(unsigned long long)numReadSoFar + totalBytes:(unsigned long long)total { + + SEL progressSelector = [ticket uploadProgressSelector]; + if (progressSelector) { + + GTMHTTPFetcher *fetcher = ticket.objectFetcher; + id delegate = [fetcher propertyForKey:kFetcherDelegateKey]; + + NSMethodSignature *signature = [delegate methodSignatureForSelector:progressSelector]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; + + [invocation setSelector:progressSelector]; + [invocation setTarget:delegate]; + [invocation setArgument:&ticket atIndex:2]; + [invocation setArgument:&numReadSoFar atIndex:3]; + [invocation setArgument:&total atIndex:4]; + [invocation invoke]; + } + +#if NS_BLOCKS_AVAILABLE + GTLServiceUploadProgressBlock block = ticket.uploadProgressBlock; + if (block) { + block(ticket, numReadSoFar, total); + } +#endif +} + +// sentData callback from fetcher +- (void)objectFetcher:(GTMHTTPFetcher *)fetcher + didSendBytes:(NSInteger)bytesSent + totalBytesSent:(NSInteger)totalBytesSent +totalBytesExpectedToSend:(NSInteger)totalBytesExpected { + + GTLServiceTicket *ticket = [fetcher propertyForKey:kFetcherTicketKey]; + + [self invokeProgressCallbackForTicket:ticket + deliveredBytes:(unsigned long long)totalBytesSent + totalBytes:(unsigned long long)totalBytesExpected]; +} + +- (void)objectFetcher:(GTMHTTPFetcher *)fetcher finishedWithData:(NSData *)data error:(NSError *)error { + // we now have the JSON data for an object, or an error + if (error == nil) { + if ([data length] > 0) { + [self prepareToParseObjectForFetcher:fetcher]; + } else { + // no data (such as when deleting) + [self handleParsedObjectForFetcher:fetcher]; + } + } else { + // There was an error from the fetch + NSInteger status = [error code]; + if (status >= 300) { + // Return the HTTP error status code along with a more descriptive error + // from within the HTTP response payload. + NSData *responseData = fetcher.downloadedData; + if ([responseData length] > 0) { + NSDictionary *responseHeaders = fetcher.responseHeaders; + NSString *contentType = [responseHeaders objectForKey:@"Content-Type"]; + + if ([data length] > 0) { + if ([contentType hasPrefix:@"application/json"]) { + NSError *parseError = nil; + NSMutableDictionary *jsonWrapper = [GTLJSONParser objectWithData:data + error:&parseError]; + if (parseError) { + // We could not parse the JSON payload + error = parseError; + } else { + // Convert the JSON error payload into a structured error + NSMutableDictionary *errorJSON = [jsonWrapper valueForKey:@"error"]; + GTLErrorObject *errorObject = [GTLErrorObject objectWithJSON:errorJSON]; + error = [errorObject foundationError]; + } + } else { + // No structured JSON error was available; make a plaintext server + // error response visible in the error object. + NSString *reasonStr = [[[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding] autorelease]; + NSDictionary *userInfo = [NSDictionary dictionaryWithObject:reasonStr + forKey:NSLocalizedFailureReasonErrorKey]; + error = [NSError errorWithDomain:kGTMHTTPFetcherStatusDomain + code:status + userInfo:userInfo]; + } + } else { + // Response data length is zero; we'll settle for returning the + // fetcher's error. + } + } + } + + // store the error, call the callbacks, and bail + [fetcher setProperty:error + forKey:kFetcherFetchErrorKey]; + + [self handleParsedObjectForFetcher:fetcher]; + } +} + +// Three methods handle parsing of the fetched JSON data: +// - prepareToParse posts a start notification and then spawns off parsing +// on the operation queue (if there's an operation queue) +// - parseObject does the parsing of the JSON string +// - handleParsedObject posts the stop notification and calls the callback +// with the parsed object or an error +// +// The middle method may run on a separate thread. + +- (void)prepareToParseObjectForFetcher:(GTMHTTPFetcher *)fetcher { + // save the current thread into the fetcher, since we'll handle additional + // fetches and callbacks on this thread + [fetcher setProperty:[NSThread currentThread] + forKey:kFetcherCallbackThreadKey]; + + // copy the run loop modes, if any, so we don't need to access them + // from the parsing thread + [fetcher setProperty:[[[self runLoopModes] copy] autorelease] + forKey:kFetcherCallbackRunLoopModesKey]; + + // we post parsing notifications now to ensure they're on caller's + // original thread + GTLServiceTicket *ticket = [fetcher propertyForKey:kFetcherTicketKey]; + NSNotificationCenter *defaultNC = [NSNotificationCenter defaultCenter]; + [defaultNC postNotificationName:kGTLServiceTicketParsingStartedNotification + object:ticket]; + [fetcher setProperty:@"1" + forKey:kFetcherParsingNotificationKey]; + + id executingQuery = ticket.executingQuery; + if ([executingQuery isBatchQuery]) { + // build a dictionary of expected classes for the batch responses + GTLBatchQuery *batchQuery = executingQuery; + NSArray *queries = batchQuery.queries; + NSDictionary *batchClassMap = [NSMutableDictionary dictionaryWithCapacity:[queries count]]; + for (GTLQuery *query in queries) { + [batchClassMap setValue:query.expectedObjectClass + forKey:query.requestID]; + } + [fetcher setProperty:batchClassMap + forKey:kFetcherBatchClassMapKey]; + } + + // if there's an operation queue, then use that to schedule parsing on another + // thread + SEL parseSel = @selector(parseObjectFromDataOfFetcher:); + NSOperationQueue *queue = self.parseQueue; + if (queue) { + NSInvocationOperation *op; + op = [[[NSInvocationOperation alloc] initWithTarget:self + selector:parseSel + object:fetcher] autorelease]; + ticket.parseOperation = op; + [queue addOperation:op]; + // the fetcher now belongs to the parsing thread + } else { + // parse on the current thread, on Mac OS X 10.4 through 10.5.7 + // or when the project defines GTL_SKIP_PARSE_THREADING + [self performSelector:parseSel + withObject:fetcher]; + } +} + +- (void)parseObjectFromDataOfFetcher:(GTMHTTPFetcher *)fetcher { + // This method runs in a separate thread + + // Generally protect the fetcher properties, since canceling a ticket would + // release the fetcher properties dictionary + NSMutableDictionary *properties = [[fetcher.properties retain] autorelease]; + + // The callback thread is retaining the fetcher, so the fetcher shouldn't keep + // retaining the callback thread + NSThread *callbackThread = [properties valueForKey:kFetcherCallbackThreadKey]; + [[callbackThread retain] autorelease]; + [properties removeObjectForKey:kFetcherCallbackThreadKey]; + + GTLServiceTicket *ticket = [properties valueForKey:kFetcherTicketKey]; + [[ticket retain] autorelease]; + + NSDictionary *responseHeaders = fetcher.responseHeaders; + NSString *contentType = [responseHeaders objectForKey:@"Content-Type"]; + NSData *data = fetcher.downloadedData; + + NSOperation *parseOperation = ticket.parseOperation; + + GTL_DEBUG_ASSERT([contentType hasPrefix:@"application/json"], + @"Got unexpected content type '%@'", contentType); + if ([contentType hasPrefix:@"application/json"] && [data length] > 0) { +#if GTL_LOG_PERFORMANCE + NSTimeInterval secs1, secs2; + secs1 = [NSDate timeIntervalSinceReferenceDate]; +#endif + + NSError *parseError = nil; + NSMutableDictionary *jsonWrapper = [GTLJSONParser objectWithData:data + error:&parseError]; + if ([parseOperation isCancelled]) return; + + if (parseError != nil) { + [properties setValue:parseError forKey:kFetcherFetchErrorKey]; + } else { + NSMutableDictionary *json; + NSDictionary *batchClassMap = nil; + + // In theory, just checking for "application/json-rpc" vs + // "application/json" would work. But the JSON-RPC spec allows for + // "application/json" also so we have to carry a flag all the way in + // saying which type of result to expect and process as. + BOOL isREST = ticket.isREST; + if (isREST) { + if (isRESTDataWrapperRequired_) { + json = [jsonWrapper valueForKey:@"data"]; + } else { + json = jsonWrapper; + } + } else { + batchClassMap = [properties valueForKey:kFetcherBatchClassMapKey]; + if (batchClassMap) { + // A batch gets the whole array as it's json. + json = jsonWrapper; + } else { + json = [jsonWrapper valueForKey:@"result"]; + } + } + + if (json != nil) { + Class defaultClass = [properties valueForKey:kFetcherObjectClassKey]; + NSDictionary *surrogates = ticket.surrogates; + + GTLObject *parsedObject = [GTLObject objectForJSON:json + defaultClass:defaultClass + surrogates:surrogates + batchClassMap:batchClassMap]; + + [properties setValue:parsedObject forKey:kFetcherParsedObjectKey]; + } else if (!isREST) { + NSMutableDictionary *errorJSON = [jsonWrapper valueForKey:@"error"]; + GTL_DEBUG_ASSERT(errorJSON != nil, @"no result or error in response:\n%@", + jsonWrapper); + GTLErrorObject *errorObject = [GTLErrorObject objectWithJSON:errorJSON]; + NSError *error = [errorObject foundationError]; + + // Store the error and let it go to the callback + [properties setValue:error + forKey:kFetcherFetchErrorKey]; + } + } + +#if GTL_LOG_PERFORMANCE + secs2 = [NSDate timeIntervalSinceReferenceDate]; + NSLog(@"allocation of %@ took %f seconds", objectClass, secs2 - secs1); +#endif + } + + if ([parseOperation isCancelled]) return; + + SEL parseDoneSel = @selector(handleParsedObjectForFetcher:); + NSArray *runLoopModes = [properties valueForKey:kFetcherCallbackRunLoopModesKey]; + // If this callback was enqueued, then the fetcher has already released + // its delegateQueue. We'll use our own delegateQueue to determine how to + // invoke the callbacks. + NSOperationQueue *delegateQueue = self.delegateQueue; + if (delegateQueue) { + NSInvocationOperation *op; + op = [[[NSInvocationOperation alloc] initWithTarget:self + selector:parseDoneSel + object:fetcher] autorelease]; + [delegateQueue addOperation:op]; + } else if (runLoopModes) { + [self performSelector:parseDoneSel + onThread:callbackThread + withObject:fetcher + waitUntilDone:NO + modes:runLoopModes]; + } else { + // Defaults to common modes + [self performSelector:parseDoneSel + onThread:callbackThread + withObject:fetcher + waitUntilDone:NO]; + } + // the fetcher now belongs to the callback thread +} + +- (void)handleParsedObjectForFetcher:(GTMHTTPFetcher *)fetcher { + // After parsing is complete, this is invoked on the thread that the + // fetch was performed on + // + // There may not be an object due to a fetch or parsing error + + GTLServiceTicket *ticket = [fetcher propertyForKey:kFetcherTicketKey]; + ticket.parseOperation = nil; + + // unpack the callback parameters + id delegate = [fetcher propertyForKey:kFetcherDelegateKey]; + NSString *selString = [fetcher propertyForKey:kFetcherFinishedSelectorKey]; + SEL finishedSelector = NSSelectorFromString(selString); + +#if NS_BLOCKS_AVAILABLE + GTLServiceCompletionHandler completionHandler; + completionHandler = [fetcher propertyForKey:kFetcherCompletionHandlerKey]; +#else + id completionHandler = nil; +#endif + + GTLObject *object = [fetcher propertyForKey:kFetcherParsedObjectKey]; + NSError *error = [fetcher propertyForKey:kFetcherFetchErrorKey]; + + GTLQuery *executingQuery = (GTLQuery *)ticket.executingQuery; + + BOOL shouldFetchNextPages = ticket.shouldFetchNextPages; + GTLObject *previousObject = ticket.fetchedObject; + + if (shouldFetchNextPages + && (previousObject != nil) + && (object != nil)) { + // Accumulate new results + object = [self mergedNewResultObject:object + oldResultObject:previousObject + forQuery:executingQuery]; + } + + ticket.fetchedObject = object; + ticket.fetchError = error; + + if ([fetcher propertyForKey:kFetcherParsingNotificationKey] != nil) { + // we want to always balance the start and stop notifications + NSNotificationCenter *defaultNC = [NSNotificationCenter defaultCenter]; + [defaultNC postNotificationName:kGTLServiceTicketParsingStoppedNotification + object:ticket]; + } + + BOOL shouldCallCallbacks = YES; + + // Use the nextPageToken to fetch any later pages for non-batch queries + // + // This assumes a pagination model where objects have entries in an "items" + // field and a "nextPageToken" field, and queries support a "pageToken" + // parameter. + if (ticket.shouldFetchNextPages) { + // Determine if we should fetch more pages of results + + GTLQuery *nextPageQuery = [self nextPageQueryForQuery:executingQuery + result:object + ticket:ticket]; + if (nextPageQuery) { + BOOL isFetchingMore = [self fetchNextPageWithQuery:nextPageQuery + delegate:delegate + didFinishedSelector:finishedSelector + completionHandler:completionHandler + ticket:ticket]; + if (isFetchingMore) { + shouldCallCallbacks = NO; + } + } else { + // No more page tokens are present +#if DEBUG && !GTL_SKIP_PAGES_WARNING + // Each next page followed to accumulate all pages of a feed takes up to + // a few seconds. When multiple pages are being fetched, that + // usually indicates that a larger page size (that is, more items per + // feed fetched) should be requested. + // + // To avoid fetching many pages, set query.maxResults so the feed + // requested is large enough to rarely need to follow next links. + NSUInteger pageCount = ticket.pagesFetchedCounter; + if (pageCount > 2) { + NSString *queryLabel = [executingQuery isBatchQuery] ? + @"batch query" : executingQuery.methodName; + NSLog(@"Executing %@ required fetching %u pages; use a query with a" + @" larger maxResults for faster results", + queryLabel, (unsigned int) pageCount); + } +#endif + } + } + + // We no longer care about the queries for page 2 or later, so for the client + // inspecting the ticket in the callback, the executing query should be + // the original one + ticket.executingQuery = ticket.originalQuery; + + if (shouldCallCallbacks) { + // First, call query-specific callback blocks. We do this before the + // fetch callback to let applications do any final clean-up (or update + // their UI) in the fetch callback. + GTLQuery *originalQuery = (GTLQuery *)ticket.originalQuery; +#if NS_BLOCKS_AVAILABLE + if (![originalQuery isBatchQuery]) { + // Single query + GTLServiceCompletionHandler completionBlock = originalQuery.completionBlock; + if (completionBlock) { + completionBlock(ticket, object, error); + } + } else { + // Batch query + // + // We'll step through the queries of the original batch, not of the + // batch result + GTLBatchQuery *batchQuery = (GTLBatchQuery *)originalQuery; + GTLBatchResult *batchResult = (GTLBatchResult *)object; + NSDictionary *successes = batchResult.successes; + NSDictionary *failures = batchResult.failures; + + for (GTLQuery *oneQuery in batchQuery.queries) { + GTLServiceCompletionHandler completionBlock = oneQuery.completionBlock; + if (completionBlock) { + // If there was no networking error, look for a query-specific + // error or result + GTLObject *oneResult = nil; + NSError *oneError = error; + if (oneError == nil) { + NSString *requestID = [oneQuery requestID]; + GTLErrorObject *gtlError = [failures objectForKey:requestID]; + if (gtlError) { + oneError = [gtlError foundationError]; + } else { + oneResult = [successes objectForKey:requestID]; + if (oneResult == nil) { + // We found neither a success nor a failure for this + // query, unexpectedly + GTL_DEBUG_LOG(@"GTLService: Batch result missing for request %@", + requestID); + oneError = [NSError errorWithDomain:kGTLServiceErrorDomain + code:kGTLErrorQueryResultMissing + userInfo:nil]; + } + } + } + completionBlock(ticket, oneResult, oneError); + } + } + } +#endif + // Release query callback blocks + [originalQuery executionDidStop]; + + if (finishedSelector) { + [[self class] invokeCallback:finishedSelector + target:delegate + ticket:ticket + object:object + error:error]; + } + +#if NS_BLOCKS_AVAILABLE + if (completionHandler) { + completionHandler(ticket, object, error); + } +#endif + ticket.hasCalledCallback = YES; + } + fetcher.properties = nil; + +#if NS_BLOCKS_AVAILABLE + // Tickets don't know when the fetch has completed, so the service will + // release their blocks here to avoid unintended retain loops + ticket.retryBlock = nil; + ticket.uploadProgressBlock = nil; +#endif +} + +#pragma mark - + ++ (void)invokeCallback:(SEL)callbackSel + target:(id)target + ticket:(id)ticket + object:(id)object + error:(id)error { + + // GTL fetch callbacks have no return value + NSMethodSignature *signature = [target methodSignatureForSelector:callbackSel]; + NSInvocation *retryInvocation = [NSInvocation invocationWithMethodSignature:signature]; + [retryInvocation setSelector:callbackSel]; + [retryInvocation setTarget:target]; + [retryInvocation setArgument:&ticket atIndex:2]; + [retryInvocation setArgument:&object atIndex:3]; + [retryInvocation setArgument:&error atIndex:4]; + [retryInvocation invoke]; +} + +// The object fetcher may call into this retry method; this one invokes the +// selector provided by the user. +- (BOOL)objectFetcher:(GTMHTTPFetcher *)fetcher willRetry:(BOOL)willRetry forError:(NSError *)error { + + GTLServiceTicket *ticket = [fetcher propertyForKey:kFetcherTicketKey]; + SEL retrySelector = ticket.retrySelector; + if (retrySelector) { + id delegate = [fetcher propertyForKey:kFetcherDelegateKey]; + + willRetry = [self invokeRetrySelector:retrySelector + delegate:delegate + ticket:ticket + willRetry:willRetry + error:error]; + } + +#if NS_BLOCKS_AVAILABLE + BOOL (^retryBlock)(GTLServiceTicket *, BOOL, NSError *) = ticket.retryBlock; + if (retryBlock) { + willRetry = retryBlock(ticket, willRetry, error); + } +#endif + + return willRetry; +} + +- (BOOL)invokeRetrySelector:(SEL)retrySelector + delegate:(id)delegate + ticket:(GTLServiceTicket *)ticket + willRetry:(BOOL)willRetry + error:(NSError *)error { + + if ([delegate respondsToSelector:retrySelector]) { + // Unlike the retry selector invocation in GTMHTTPFetcher, this invocation + // passes the ticket rather than the fetcher as argument 2 + NSMethodSignature *signature = [delegate methodSignatureForSelector:retrySelector]; + NSInvocation *retryInvocation = [NSInvocation invocationWithMethodSignature:signature]; + [retryInvocation setSelector:retrySelector]; + [retryInvocation setTarget:delegate]; + [retryInvocation setArgument:&ticket atIndex:2]; // ticket passed + [retryInvocation setArgument:&willRetry atIndex:3]; + [retryInvocation setArgument:&error atIndex:4]; + [retryInvocation invoke]; + + [retryInvocation getReturnValue:&willRetry]; + } + return willRetry; +} + +- (BOOL)waitForTicket:(GTLServiceTicket *)ticket + timeout:(NSTimeInterval)timeoutInSeconds + fetchedObject:(GTLObject **)outObjectOrNil + error:(NSError **)outErrorOrNil { + + NSDate* giveUpDate = [NSDate dateWithTimeIntervalSinceNow:timeoutInSeconds]; + + // loop until the fetch completes with an object or an error, + // or until the timeout has expired + while (![ticket hasCalledCallback] + && [giveUpDate timeIntervalSinceNow] > 0) { + + // run the current run loop 1/1000 of a second to give the networking + // code a chance to work + NSDate *stopDate = [NSDate dateWithTimeIntervalSinceNow:0.001]; + [[NSRunLoop currentRunLoop] runUntilDate:stopDate]; + } + + NSError *fetchError = ticket.fetchError; + + if (![ticket hasCalledCallback] && fetchError == nil) { + fetchError = [NSError errorWithDomain:kGTLServiceErrorDomain + code:kGTLErrorWaitTimedOut + userInfo:nil]; + } + + if (outObjectOrNil) *outObjectOrNil = ticket.fetchedObject; + if (outErrorOrNil) *outErrorOrNil = fetchError; + + return (fetchError == nil); +} + +#pragma mark - + +// Given a single or batch query and its result, make a new query +// for the next pages, if any. Returns nil if there's no additional +// query to make. +// +// This method calls itself recursively to make the individual next page +// queries for a batch query. +- (id )nextPageQueryForQuery:(GTLQuery *)query + result:(GTLObject *)object + ticket:(GTLServiceTicket *)ticket { + if (!query.isBatchQuery) { + // This is a single query + + // Determine if we should fetch more pages of results + GTLQuery *nextPageQuery = nil; + NSString *nextPageToken = nil; + NSNumber *nextStartIndex = nil; + + if ([object respondsToSelector:@selector(nextPageToken)] + && [query respondsToSelector:@selector(pageToken)]) { + nextPageToken = [object performSelector:@selector(nextPageToken)]; + } + + if ([object respondsToSelector:@selector(nextStartIndex)] + && [query respondsToSelector:@selector(startIndex)]) { + nextStartIndex = [object performSelector:@selector(nextStartIndex)]; + } + + if (nextPageToken || nextStartIndex) { + // Make a query for the next page, preserving the request ID + nextPageQuery = [[query copy] autorelease]; + nextPageQuery.requestID = query.requestID; + + if (nextPageToken) { + [nextPageQuery performSelector:@selector(setPageToken:) + withObject:nextPageToken]; + } else { + // Use KVC to unwrap the scalar type instead of converting the + // NSNumber to an integer and using NSInvocation + [nextPageQuery setValue:nextStartIndex + forKey:@"startIndex"]; + } + } + return nextPageQuery; + } else { + // This is a batch query + // + // Check if there's a next page to fetch for any of the success + // results by invoking this method recursively on each of those results + GTLBatchResult *batchResult = (GTLBatchResult *)object; + GTLBatchQuery *nextPageBatchQuery = nil; + NSDictionary *successes = batchResult.successes; + + for (NSString *requestID in successes) { + GTLObject *singleObject = [successes objectForKey:requestID]; + GTLQuery *singleQuery = [ticket queryForRequestID:requestID]; + + GTLQuery *newQuery = [self nextPageQueryForQuery:singleQuery + result:singleObject + ticket:ticket]; + if (newQuery) { + // There is another query to fetch + if (nextPageBatchQuery == nil) { + nextPageBatchQuery = [GTLBatchQuery batchQuery]; + } + [nextPageBatchQuery addQuery:newQuery]; + } + } + return nextPageBatchQuery; + } +} + +// When a ticket is set to fetch more pages for feeds, this routine +// initiates the fetch for each additional feed page +- (BOOL)fetchNextPageWithQuery:(GTLQuery *)query + delegate:(id)delegate + didFinishedSelector:(SEL)finishedSelector + completionHandler:(GTLServiceCompletionHandler)completionHandler + ticket:(GTLServiceTicket *)ticket { + // Sanity check the number of pages fetched already + NSUInteger oldPagesFetchedCounter = ticket.pagesFetchedCounter; + + if (oldPagesFetchedCounter > kMaxNumberOfNextPagesFetched) { + // Sanity check failed: way too many pages were fetched + // + // The client should be querying with a higher max results per page + // to avoid this + GTL_DEBUG_ASSERT(0, @"Fetched too many next pages for %@", + query.methodName); + return NO; + } + + ticket.pagesFetchedCounter = 1 + oldPagesFetchedCounter; + + GTLServiceTicket *newTicket; + if (query.isBatchQuery) { + newTicket = [self executeBatchQuery:(GTLBatchQuery *)query + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:completionHandler + ticket:ticket]; + } else { + newTicket = [self fetchObjectWithMethodNamed:query.methodName + objectClass:query.expectedObjectClass + parameters:query.JSON + bodyObject:query.bodyObject + requestID:query.requestID + urlQueryParameters:query.urlQueryParameters + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:completionHandler + executingQuery:query + ticket:ticket]; + } + + // In the bizarre case that the fetch didn't begin, newTicket will be + // nil. So long as the new ticket is the same as the ticket we're + // continuing, then we're happy. + return (newTicket == ticket); +} + +// Given a new single or batch result (meaning additional pages for a previous +// query result), merge it into the old result. +- (GTLObject *)mergedNewResultObject:(GTLObject *)newResult + oldResultObject:(GTLObject *)oldResult + forQuery:(GTLQuery *)query { + if (query.isBatchQuery) { + // Batch query result + // + // The new batch results are a subset of the old result's queries, since + // not all queries in the batch necessarily have additional pages. + // + // New success objects replace old success objects, with the old items + // prepended; new failure objects replace old success objects. + // We will update the old batch results with accumulated items, using the + // new objects, and return the old batch. + // + // We reuse the old batch results object because it may include some earlier + // results which did not have additional pages. + GTLBatchResult *newBatchResult = (GTLBatchResult *)newResult; + GTLBatchResult *oldBatchResult = (GTLBatchResult *)oldResult; + + NSMutableDictionary *newSuccesses = newBatchResult.successes; + NSMutableDictionary *newFailures = newBatchResult.failures; + NSMutableDictionary *oldSuccesses = oldBatchResult.successes; + NSMutableDictionary *oldFailures = oldBatchResult.failures; + + for (NSString *requestID in newSuccesses) { + // Prepend the old items to the new response's items + // + // We can assume the objects are collections since they're present in + // additional pages. + GTLCollectionObject *newObj = [newSuccesses objectForKey:requestID]; + GTLCollectionObject *oldObj = [oldSuccesses objectForKey:requestID]; + + NSMutableArray *items = [NSMutableArray arrayWithArray:oldObj.items]; + [items addObjectsFromArray:newObj.items]; + [newObj performSelector:@selector(setItems:) withObject:items]; + + // Replace the old object with the new one + [oldSuccesses setObject:newObj forKey:requestID]; + } + + for (NSString *requestID in newFailures) { + // Replace old successes or failures with the new failure + GTLErrorObject *newError = [newFailures objectForKey:requestID]; + [oldFailures setObject:newError forKey:requestID]; + [oldSuccesses removeObjectForKey:requestID]; + } + return oldBatchResult; + } else { + // Single query result + // + // Merge the items into the new object, and return that. + // + // We can assume the objects are collections since they're present in + // additional pages. + GTLCollectionObject *newObj = (GTLCollectionObject *)newResult; + GTLCollectionObject *oldObj = (GTLCollectionObject *)oldResult; + + NSMutableArray *items = [NSMutableArray arrayWithArray:oldObj.items]; + [items addObjectsFromArray:newObj.items]; + [newObj performSelector:@selector(setItems:) withObject:items]; + + return newObj; + } +} + +#pragma mark - + +// GTLQuery methods. + +- (GTLServiceTicket *)executeQuery:(id)queryObj + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector { + if ([queryObj isBatchQuery]) { + return [self executeBatchQuery:queryObj + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:NULL + ticket:nil]; + } + + GTLQuery *query = [[(GTLQuery *)queryObj copy] autorelease]; + NSString *methodName = query.methodName; + NSDictionary *params = query.JSON; + GTLObject *bodyObject = query.bodyObject; + + return [self fetchObjectWithMethodNamed:methodName + objectClass:query.expectedObjectClass + parameters:params + bodyObject:bodyObject + requestID:query.requestID + urlQueryParameters:query.urlQueryParameters + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:nil + executingQuery:query + ticket:nil]; +} + +#if NS_BLOCKS_AVAILABLE +- (GTLServiceTicket *)executeQuery:(id)queryObj + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler { + if ([queryObj isBatchQuery]) { + return [self executeBatchQuery:queryObj + delegate:nil + didFinishSelector:NULL + completionHandler:handler + ticket:nil]; + } + + GTLQuery *query = [[(GTLQuery *)queryObj copy] autorelease]; + NSString *methodName = query.methodName; + NSDictionary *params = query.JSON; + GTLObject *bodyObject = query.bodyObject; + + return [self fetchObjectWithMethodNamed:methodName + objectClass:query.expectedObjectClass + parameters:params + bodyObject:bodyObject + requestID:query.requestID + urlQueryParameters:query.urlQueryParameters + delegate:nil + didFinishSelector:NULL + completionHandler:handler + executingQuery:query + ticket:nil]; +} +#endif + +#pragma mark - + +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + parameters:(NSDictionary *)parameters + objectClass:(Class)objectClass + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector { + return [self fetchObjectWithMethodNamed:methodName + objectClass:objectClass + parameters:parameters + bodyObject:nil + requestID:nil + urlQueryParameters:nil + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:nil + executingQuery:nil + ticket:nil]; +} + +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + insertingObject:(GTLObject *)bodyObject + objectClass:(Class)objectClass + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector { + return [self fetchObjectWithMethodNamed:methodName + objectClass:objectClass + parameters:nil + bodyObject:bodyObject + requestID:nil + urlQueryParameters:nil + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:nil + executingQuery:nil + ticket:nil]; +} + +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + parameters:(NSDictionary *)parameters + insertingObject:(GTLObject *)bodyObject + objectClass:(Class)objectClass + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector { + return [self fetchObjectWithMethodNamed:methodName + objectClass:objectClass + parameters:parameters + bodyObject:bodyObject + requestID:nil + urlQueryParameters:nil + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:nil + executingQuery:nil + ticket:nil]; +} + +#if NS_BLOCKS_AVAILABLE +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + parameters:(NSDictionary *)parameters + objectClass:(Class)objectClass + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler { + return [self fetchObjectWithMethodNamed:methodName + objectClass:objectClass + parameters:parameters + bodyObject:nil + requestID:nil + urlQueryParameters:nil + delegate:nil + didFinishSelector:NULL + completionHandler:handler + executingQuery:nil + ticket:nil]; +} + +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + insertingObject:(GTLObject *)bodyObject + objectClass:(Class)objectClass + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler { + return [self fetchObjectWithMethodNamed:methodName + objectClass:objectClass + parameters:nil + bodyObject:bodyObject + requestID:nil + urlQueryParameters:nil + delegate:nil + didFinishSelector:NULL + completionHandler:handler + executingQuery:nil + ticket:nil]; +} + +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + parameters:(NSDictionary *)parameters + insertingObject:(GTLObject *)bodyObject + objectClass:(Class)objectClass + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler { + return [self fetchObjectWithMethodNamed:methodName + objectClass:objectClass + parameters:parameters + bodyObject:bodyObject + requestID:nil + urlQueryParameters:nil + delegate:nil + didFinishSelector:NULL + completionHandler:handler + executingQuery:nil + ticket:nil]; +} +#endif + +#pragma mark - + +// These external entry points doing a REST style fetch. + +- (GTLServiceTicket *)fetchObjectWithURL:(NSURL *)feedURL + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector { + // no object class specified; use registered class + return [self fetchObjectWithURL:feedURL + objectClass:nil + bodyObject:nil + ETag:nil + httpMethod:nil + mayAuthorize:YES + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:nil + ticket:nil]; +} + +- (GTLServiceTicket *)fetchPublicObjectWithURL:(NSURL *)feedURL + objectClass:(Class)objectClass + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector { + return [self fetchObjectWithURL:feedURL + objectClass:objectClass + bodyObject:nil + ETag:nil + httpMethod:nil + mayAuthorize:NO + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:nil + ticket:nil]; +} + +- (GTLServiceTicket *)fetchObjectWithURL:(NSURL *)feedURL + objectClass:(Class)objectClass + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector { + return [self fetchObjectWithURL:feedURL + objectClass:objectClass + bodyObject:nil + ETag:nil + httpMethod:nil + mayAuthorize:YES + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:nil + ticket:nil]; +} + + +- (GTLServiceTicket *)fetchObjectByInsertingObject:(GTLObject *)bodyToPost + forURL:(NSURL *)destinationURL + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector { + Class objClass = [bodyToPost class]; + NSString *etag = ETagIfPresent(bodyToPost); + + return [self fetchObjectWithURL:destinationURL + objectClass:objClass + bodyObject:bodyToPost + ETag:etag + httpMethod:@"POST" + mayAuthorize:YES + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:nil + ticket:nil]; +} + +- (GTLServiceTicket *)fetchObjectByUpdatingObject:(GTLObject *)bodyToPut + forURL:(NSURL *)destinationURL + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector { + Class objClass = [bodyToPut class]; + NSString *etag = ETagIfPresent(bodyToPut); + + return [self fetchObjectWithURL:destinationURL + objectClass:objClass + bodyObject:bodyToPut + ETag:etag + httpMethod:@"PUT" + mayAuthorize:YES + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:nil + ticket:nil]; +} + + +- (GTLServiceTicket *)deleteResourceURL:(NSURL *)destinationURL + ETag:(NSString *)etagOrNil + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector { + return [self fetchObjectWithURL:destinationURL + objectClass:nil + bodyObject:nil + ETag:etagOrNil + httpMethod:@"DELETE" + mayAuthorize:YES + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:nil + ticket:nil]; +} + + +#if NS_BLOCKS_AVAILABLE +- (GTLServiceTicket *)fetchObjectWithURL:(NSURL *)objectURL + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler { + return [self fetchObjectWithURL:objectURL + objectClass:nil + bodyObject:nil + ETag:nil + httpMethod:nil + mayAuthorize:YES + delegate:nil + didFinishSelector:NULL + completionHandler:handler + ticket:nil]; +} + +- (GTLServiceTicket *)fetchObjectByInsertingObject:(GTLObject *)bodyToPost + forURL:(NSURL *)destinationURL + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler { + Class objClass = [bodyToPost class]; + NSString *etag = ETagIfPresent(bodyToPost); + + return [self fetchObjectWithURL:destinationURL + objectClass:objClass + bodyObject:bodyToPost + ETag:etag + httpMethod:@"POST" + mayAuthorize:YES + delegate:nil + didFinishSelector:NULL + completionHandler:handler + ticket:nil]; +} + +- (GTLServiceTicket *)fetchObjectByUpdatingObject:(GTLObject *)bodyToPut + forURL:(NSURL *)destinationURL + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler { + Class objClass = [bodyToPut class]; + NSString *etag = ETagIfPresent(bodyToPut); + + return [self fetchObjectWithURL:destinationURL + objectClass:objClass + bodyObject:bodyToPut + ETag:etag + httpMethod:@"PUT" + mayAuthorize:YES + delegate:nil + didFinishSelector:NULL + completionHandler:handler + ticket:nil]; +} + +- (GTLServiceTicket *)deleteResourceURL:(NSURL *)destinationURL + ETag:(NSString *)etagOrNil + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler { + return [self fetchObjectWithURL:destinationURL + objectClass:nil + bodyObject:nil + ETag:etagOrNil + httpMethod:@"DELETE" + mayAuthorize:YES + delegate:nil + didFinishSelector:NULL + completionHandler:handler + ticket:nil]; +} + +#endif // NS_BLOCKS_AVAILABLE + +#pragma mark - + +- (NSString *)userAgent { + return userAgent_; +} + +- (void)setExactUserAgent:(NSString *)userAgent { + // internal use only + [userAgent_ release]; + userAgent_ = [userAgent copy]; +} + +- (void)setUserAgent:(NSString *)userAgent { + // remove whitespace and unfriendly characters + NSString *str = GTMCleanedUserAgentString(userAgent); + [self setExactUserAgent:str]; +} + +// +// The following methods pass through to the fetcher service object +// + +- (void)setCookieStorageMethod:(NSInteger)method { + self.fetcherService.cookieStorageMethod = method; +} + +- (NSInteger)cookieStorageMethod { + return self.fetcherService.cookieStorageMethod; +} + +- (void)setShouldFetchInBackground:(BOOL)flag { + self.fetcherService.shouldFetchInBackground = flag; +} + +- (BOOL)shouldFetchInBackground { + return self.fetcherService.shouldFetchInBackground; +} + +- (void)setDelegateQueue:(NSOperationQueue *)delegateQueue { + self.fetcherService.delegateQueue = delegateQueue; +} + +- (NSOperationQueue *)delegateQueue { + return self.fetcherService.delegateQueue; +} + +- (void)setRunLoopModes:(NSArray *)array { + self.fetcherService.runLoopModes = array; +} + +- (NSArray *)runLoopModes { + return self.fetcherService.runLoopModes; +} + +#pragma mark - + +// The service properties becomes the initial value for each future ticket's +// properties +- (void)setServiceProperties:(NSDictionary *)dict { + [serviceProperties_ autorelease]; + serviceProperties_ = [dict mutableCopy]; +} + +- (NSDictionary *)serviceProperties { + // be sure the returned pointer has the life of the autorelease pool, + // in case self is released immediately + return [[serviceProperties_ retain] autorelease]; +} + +- (void)setServiceProperty:(id)obj forKey:(NSString *)key { + + if (obj == nil) { + // user passed in nil, so delete the property + [serviceProperties_ removeObjectForKey:key]; + } else { + // be sure the property dictionary exists + if (serviceProperties_ == nil) { + [self setServiceProperties:[NSDictionary dictionary]]; + } + [serviceProperties_ setObject:obj forKey:key]; + } +} + +- (id)servicePropertyForKey:(NSString *)key { + id obj = [serviceProperties_ objectForKey:key]; + + // be sure the returned pointer has the life of the autorelease pool, + // in case self is released immediately + return [[obj retain] autorelease]; +} + +- (void)setServiceUserData:(id)userData { + [self setServiceProperty:userData forKey:kUserDataPropertyKey]; +} + +- (id)serviceUserData { + return [[[self servicePropertyForKey:kUserDataPropertyKey] retain] autorelease]; +} + +- (void)setAuthorizer:(id )authorizer { + self.fetcherService.authorizer = authorizer; +} + +- (id )authorizer { + return self.fetcherService.authorizer; +} + ++ (NSUInteger)defaultServiceUploadChunkSize { + // subclasses may override + return kStandardUploadChunkSize; +} + +- (NSUInteger)serviceUploadChunkSize { + return uploadChunkSize_; +} + +- (void)setServiceUploadChunkSize:(NSUInteger)val { + + if (val == kGTLStandardUploadChunkSize) { + // determine an appropriate upload chunk size for the system + + if (![GTMHTTPFetcher doesSupportSentDataCallback]) { + // for 10.4 and iPhone 2, we need a small upload chunk size so there + // are frequent intrachunk callbacks for progress monitoring + val = 75000; + } else { +#if GTL_IPHONE + val = 1000000; +#else + if (NSFoundationVersionNumber >= 751.00) { + // Mac OS X 10.6 + // + // we'll pick a huge upload chunk size, which minimizes http overhead + // and server effort, and we'll hope that NSURLConnection can finally + // handle big uploads reliably + val = 25000000; + } else { + // Mac OS X 10.5 + // + // NSURLConnection is more reliable on POSTs in 10.5 than it was in + // 10.4, but it still fails mysteriously on big uploads on some + // systems, so we'll limit the chunks to a megabyte + val = 1000000; + } +#endif + } + } + uploadChunkSize_ = val; +} + +@end + +@implementation GTLServiceTicket + +@synthesize shouldFetchNextPages = shouldFetchNextPages_, + surrogates = surrogates_, + uploadProgressSelector = uploadProgressSelector_, + retryEnabled = isRetryEnabled_, + hasCalledCallback = hasCalledCallback_, + retrySelector = retrySelector_, + maxRetryInterval = maxRetryInterval_, + objectFetcher = objectFetcher_, + postedObject = postedObject_, + fetchedObject = fetchedObject_, + executingQuery = executingQuery_, + originalQuery = originalQuery_, + fetchError = fetchError_, + pagesFetchedCounter = pagesFetchedCounter_, + APIKey = apiKey_, + parseOperation = parseOperation_, + isREST = isREST_; + +#if NS_BLOCKS_AVAILABLE +@synthesize retryBlock = retryBlock_; +#endif + ++ (id)ticketForService:(GTLService *)service { + return [[[self alloc] initWithService:service] autorelease]; +} + +- (id)initWithService:(GTLService *)service { + self = [super init]; + if (self) { + service_ = [service retain]; + + ticketProperties_ = [service.serviceProperties mutableCopy]; + surrogates_ = [service.surrogates retain]; + uploadProgressSelector_ = service.uploadProgressSelector; + isRetryEnabled_ = service.retryEnabled; + retrySelector_ = service.retrySelector; + maxRetryInterval_ = service.maxRetryInterval; + shouldFetchNextPages_ = service.shouldFetchNextPages; + apiKey_ = [service.APIKey copy]; + +#if NS_BLOCKS_AVAILABLE + uploadProgressBlock_ = [service.uploadProgressBlock copy]; + retryBlock_ = [service.retryBlock copy]; +#endif + } + return self; +} + +- (void)dealloc { + [service_ release]; + [ticketProperties_ release]; + [surrogates_ release]; + [objectFetcher_ release]; +#if NS_BLOCKS_AVAILABLE + [uploadProgressBlock_ release]; + [retryBlock_ release]; +#endif + [postedObject_ release]; + [fetchedObject_ release]; + [executingQuery_ release]; + [originalQuery_ release]; + [fetchError_ release]; + [apiKey_ release]; + [parseOperation_ release]; + + [super dealloc]; +} + +- (NSString *)description { + NSString *devKeyInfo = @""; + if (apiKey_ != nil) { + devKeyInfo = [NSString stringWithFormat:@" devKey:%@", apiKey_]; + } + + NSString *authorizerInfo = @""; + id authorizer = self.objectFetcher.authorizer; + if (authorizer != nil) { + authorizerInfo = [NSString stringWithFormat:@" authorizer:%@", authorizer]; + } + + return [NSString stringWithFormat:@"%@ %p: {service:%@%@%@ fetcher:%@ }", + [self class], self, service_, devKeyInfo, authorizerInfo, objectFetcher_]; +} + +- (void)pauseUpload { + BOOL canPause = [objectFetcher_ respondsToSelector:@selector(pauseFetching)]; + GTL_DEBUG_ASSERT(canPause, @"unpauseable ticket"); + + if (canPause) { + [(GTMHTTPUploadFetcher *)objectFetcher_ pauseFetching]; + } +} + +- (void)resumeUpload { + BOOL canResume = [objectFetcher_ respondsToSelector:@selector(resumeFetching)]; + GTL_DEBUG_ASSERT(canResume, @"unresumable ticket"); + + if (canResume) { + [(GTMHTTPUploadFetcher *)objectFetcher_ resumeFetching]; + } +} + +- (BOOL)isUploadPaused { + BOOL isPausable = [objectFetcher_ respondsToSelector:@selector(isPaused)]; + GTL_DEBUG_ASSERT(isPausable, @"unpauseable ticket"); + + if (isPausable) { + return [(GTMHTTPUploadFetcher *)objectFetcher_ isPaused]; + } + return NO; +} + +- (void)cancelTicket { + NSOperation *parseOperation = self.parseOperation; + [parseOperation cancel]; + self.parseOperation = nil; + + [objectFetcher_ stopFetching]; + objectFetcher_.properties = nil; + + self.objectFetcher = nil; + self.properties = nil; + self.uploadProgressSelector = nil; + +#if NS_BLOCKS_AVAILABLE + self.uploadProgressBlock = nil; + self.retryBlock = nil; +#endif + [self.executingQuery executionDidStop]; + self.executingQuery = self.originalQuery; + + [service_ autorelease]; + service_ = nil; +} + +- (id)service { + return service_; +} + +- (void)setUserData:(id)userData { + [self setProperty:userData forKey:kUserDataPropertyKey]; +} + +- (id)userData { + // be sure the returned pointer has the life of the autorelease pool, + // in case self is released immediately + return [[[self propertyForKey:kUserDataPropertyKey] retain] autorelease]; +} + +- (void)setProperties:(NSDictionary *)dict { + [ticketProperties_ autorelease]; + ticketProperties_ = [dict mutableCopy]; +} + +- (NSDictionary *)properties { + // be sure the returned pointer has the life of the autorelease pool, + // in case self is released immediately + return [[ticketProperties_ retain] autorelease]; +} + +- (void)setProperty:(id)obj forKey:(NSString *)key { + if (obj == nil) { + // user passed in nil, so delete the property + [ticketProperties_ removeObjectForKey:key]; + } else { + // be sure the property dictionary exists + if (ticketProperties_ == nil) { + // call setProperties so observers are notified + [self setProperties:[NSDictionary dictionary]]; + } + [ticketProperties_ setObject:obj forKey:key]; + } +} + +- (id)propertyForKey:(NSString *)key { + id obj = [ticketProperties_ objectForKey:key]; + + // be sure the returned pointer has the life of the autorelease pool, + // in case self is released immediately + return [[obj retain] autorelease]; +} + +- (NSDictionary *)surrogates { + return surrogates_; +} + +- (void)setSurrogates:(NSDictionary *)dict { + [surrogates_ autorelease]; + surrogates_ = [dict retain]; +} + +- (SEL)uploadProgressSelector { + return uploadProgressSelector_; +} + +- (void)setUploadProgressSelector:(SEL)progressSelector { + uploadProgressSelector_ = progressSelector; + + // if the user is turning on the progress selector in the ticket after the + // ticket's fetcher has been created, we need to give the fetcher our sentData + // callback. + // + // The progress monitor must be set in the service prior to creation of the + // ticket on 10.4 and iPhone 2.0, since on those systems the upload data must + // be wrapped with a ProgressMonitorInputStream prior to the creation of the + // fetcher. + if (progressSelector != NULL) { + SEL sentDataSel = @selector(objectFetcher:didSendBytes:totalBytesSent:totalBytesExpectedToSend:); + [[self objectFetcher] setSentDataSelector:sentDataSel]; + } +} + +#if NS_BLOCKS_AVAILABLE +- (void)setUploadProgressBlock:(GTLServiceUploadProgressBlock)block { + [uploadProgressBlock_ autorelease]; + uploadProgressBlock_ = [block copy]; + + if (uploadProgressBlock_) { + // As above, we need the fetcher to call us back when bytes are sent. + SEL sentDataSel = @selector(objectFetcher:didSendBytes:totalBytesSent:totalBytesExpectedToSend:); + [[self objectFetcher] setSentDataSelector:sentDataSel]; + } +} + +- (GTLServiceUploadProgressBlock)uploadProgressBlock { + return uploadProgressBlock_; +} +#endif + +- (NSInteger)statusCode { + return [objectFetcher_ statusCode]; +} + +- (GTLQuery *)queryForRequestID:(NSString *)requestID { + id queryObj = self.executingQuery; + if ([queryObj isBatchQuery]) { + GTLBatchQuery *batch = (GTLBatchQuery *)queryObj; + GTLQuery *result = [batch queryForRequestID:requestID]; + return result; + } else { + GTL_DEBUG_ASSERT(0, @"just use ticket.executingQuery"); + return nil; + } +} + +@end diff --git a/GTL/Source/Objects/.svn/text-base/GTLUploadParameters.h.svn-base b/GTL/Source/Objects/.svn/text-base/GTLUploadParameters.h.svn-base new file mode 100644 index 0000000..9abd275 --- /dev/null +++ b/GTL/Source/Objects/.svn/text-base/GTLUploadParameters.h.svn-base @@ -0,0 +1,60 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUploadParameters.h +// + +// Uploading documentation: +// https://code.google.com/p/google-api-objectivec-client/wiki/Introduction#Uploading_Files + +#import + +#import "GTLDefines.h" + +@interface GTLUploadParameters : NSObject { + @private + NSString *MIMEType_; + NSData *data_; + NSFileHandle *fileHandle_; + NSURL *uploadLocationURL_; + NSString *slug_; + BOOL shouldSendUploadOnly_; +} + +// Uploading requires MIME type and one of +// - data to be uploaded +// - file handle for uploading +@property (copy) NSString *MIMEType; +@property (retain) NSData *data; +@property (retain) NSFileHandle *fileHandle; + +// Resuming an in-progress upload is done with the upload location URL, +// and requires a file handle for uploading +@property (retain) NSURL *uploadLocationURL; + +// Some services need a slug (filename) header +@property (copy) NSString *slug; + +// Uploads may be done without a JSON body in the initial request +@property (assign) BOOL shouldSendUploadOnly; + ++ (GTLUploadParameters *)uploadParametersWithData:(NSData *)data + MIMEType:(NSString *)mimeType; + ++ (GTLUploadParameters *)uploadParametersWithFileHandle:(NSFileHandle *)fileHandle + MIMEType:(NSString *)mimeType; + +@end diff --git a/GTL/Source/Objects/.svn/text-base/GTLUploadParameters.m.svn-base b/GTL/Source/Objects/.svn/text-base/GTLUploadParameters.m.svn-base new file mode 100644 index 0000000..1a668a9 --- /dev/null +++ b/GTL/Source/Objects/.svn/text-base/GTLUploadParameters.m.svn-base @@ -0,0 +1,107 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLObject.m +// + +#include + +#import "GTLUploadParameters.h" + +@implementation GTLUploadParameters + +@synthesize MIMEType = MIMEType_, + data = data_, + fileHandle = fileHandle_, + uploadLocationURL = uploadLocationURL_, + slug = slug_, + shouldSendUploadOnly = shouldSendUploadOnly_; + ++ (GTLUploadParameters *)uploadParametersWithData:(NSData *)data + MIMEType:(NSString *)mimeType { + GTLUploadParameters *params = [[[GTLUploadParameters alloc] init] autorelease]; + params.data = data; + params.MIMEType = mimeType; + return params; +} + ++ (GTLUploadParameters *)uploadParametersWithFileHandle:(NSFileHandle *)fileHandle + MIMEType:(NSString *)mimeType { + GTLUploadParameters *params = [[[GTLUploadParameters alloc] init] autorelease]; + params.fileHandle = fileHandle; + params.MIMEType = mimeType; + return params; +} + +- (id)copyWithZone:(NSZone *)zone { + GTLUploadParameters *newParams = [[[self class] allocWithZone:zone] init]; + newParams.MIMEType = self.MIMEType; + newParams.data = self.data; + newParams.fileHandle = self.fileHandle; + newParams.uploadLocationURL = self.uploadLocationURL; + newParams.slug = self.slug; + newParams.shouldSendUploadOnly = self.shouldSendUploadOnly; + return newParams; +} + +- (void)dealloc { + [MIMEType_ release]; + [data_ release]; + [fileHandle_ release]; + [uploadLocationURL_ release]; + [slug_ release]; + + [super dealloc]; +} + +- (NSString *)description { + NSMutableArray *array = [NSMutableArray array]; + NSString *str = [NSString stringWithFormat:@"MIMEType:%@", MIMEType_]; + [array addObject:str]; + + if (data_) { + str = [NSString stringWithFormat:@"data:%llu bytes", + (unsigned long long)[data_ length]]; + [array addObject:str]; + } + + if (fileHandle_) { + str = [NSString stringWithFormat:@"fileHandle:%@", fileHandle_]; + [array addObject:str]; + } + + if (uploadLocationURL_) { + str = [NSString stringWithFormat:@"uploadLocation:%@", + [uploadLocationURL_ absoluteString]]; + [array addObject:str]; + } + + if (slug_) { + str = [NSString stringWithFormat:@"slug:%@", slug_]; + [array addObject:str]; + } + + if (shouldSendUploadOnly_) { + [array addObject:@"shouldSendUploadOnly"]; + } + + NSString *descStr = [array componentsJoinedByString:@", "]; + str = [NSString stringWithFormat:@"%@ %p: {%@}", + [self class], self, descStr]; + return str; +} + +@end diff --git a/GTL/Source/Objects/GTLBatchQuery.h b/GTL/Source/Objects/GTLBatchQuery.h new file mode 100644 index 0000000..2f20137 --- /dev/null +++ b/GTL/Source/Objects/GTLBatchQuery.h @@ -0,0 +1,52 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBatchQuery.h +// + +// Batch query documentation: +// https://code.google.com/p/google-api-objectivec-client/wiki/Introduction#Batch_Operations + +#import "GTLQuery.h" + +@interface GTLBatchQuery : NSObject { + @private + NSMutableArray *queries_; + NSMutableDictionary *requestIDMap_; + BOOL skipAuthorization_; + NSDictionary *additionalHTTPHeaders_; +} + +// Queries included in this batch. Each query should have a unique requestID. +@property (retain) NSArray *queries; + +// Clients may set this to YES to disallow authorization. Defaults to NO. +@property (assign) BOOL shouldSkipAuthorization; + +// Any additional HTTP headers for this batch. +// +// These headers override the same keys from the service object's +// additionalHTTPHeaders. +@property (copy) NSDictionary *additionalHTTPHeaders; + ++ (id)batchQuery; ++ (id)batchQueryWithQueries:(NSArray *)array; + +- (void)addQuery:(GTLQuery *)query; + +- (GTLQuery *)queryForRequestID:(NSString *)requestID; + +@end diff --git a/GTL/Source/Objects/GTLBatchQuery.m b/GTL/Source/Objects/GTLBatchQuery.m new file mode 100644 index 0000000..f62eaca --- /dev/null +++ b/GTL/Source/Objects/GTLBatchQuery.m @@ -0,0 +1,133 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBatchQuery.m +// + +#import "GTLBatchQuery.h" + +@implementation GTLBatchQuery + +@synthesize shouldSkipAuthorization = skipAuthorization_, + additionalHTTPHeaders = additionalHTTPHeaders_; + ++ (id)batchQuery { + GTLBatchQuery *obj = [[[self alloc] init] autorelease]; + return obj; +} + ++ (id)batchQueryWithQueries:(NSArray *)queries { + GTLBatchQuery *obj = [self batchQuery]; + obj.queries = queries; + return obj; +} + +- (id)copyWithZone:(NSZone *)zone { + // Deep copy the list of queries + NSArray *copiesOfQueries = [[[NSArray alloc] initWithArray:self.queries + copyItems:YES] autorelease]; + GTLBatchQuery *newBatch = [[[self class] allocWithZone:zone] init]; + newBatch.queries = copiesOfQueries; + newBatch.shouldSkipAuthorization = self.shouldSkipAuthorization; + newBatch.additionalHTTPHeaders = self.additionalHTTPHeaders; + return newBatch; +} + +- (void)dealloc { + [queries_ release]; + [additionalHTTPHeaders_ release]; + [requestIDMap_ release]; + + [super dealloc]; +} + +- (NSString *)description { + NSArray *queries = self.queries; + NSArray *methodNames = [queries valueForKey:@"methodName"]; + NSArray *dedupedNames = [[NSSet setWithArray:methodNames] allObjects]; + NSString *namesStr = [dedupedNames componentsJoinedByString:@","]; + + return [NSString stringWithFormat:@"%@ %p (queries:%lu methods:%@)", + [self class], self, (unsigned long) [queries count], namesStr]; +} + +#pragma mark - + +- (BOOL)isBatchQuery { + return YES; +} + +- (GTLUploadParameters *)uploadParameters { + // File upload is not supported for batches + return nil; +} + +- (void)executionDidStop { + NSArray *queries = self.queries; + [queries makeObjectsPerformSelector:@selector(executionDidStop)]; +} + +- (GTLQuery *)queryForRequestID:(NSString *)requestID { + GTLQuery *result = [requestIDMap_ objectForKey:requestID]; + if (result) return result; + + // We've not before tried to look up a query, or the map is stale + [requestIDMap_ release]; + requestIDMap_ = [[NSMutableDictionary alloc] init]; + + for (GTLQuery *query in queries_) { + [requestIDMap_ setObject:query forKey:query.requestID]; + } + + result = [requestIDMap_ objectForKey:requestID]; + return result; +} + +#pragma mark - + +- (void)setQueries:(NSArray *)array { +#if DEBUG + for (id obj in array) { + GTLQuery *query = obj; + GTL_DEBUG_ASSERT([query isKindOfClass:[GTLQuery class]], + @"unexpected query class: %@", [obj class]); + GTL_DEBUG_ASSERT(query.uploadParameters == nil, + @"batch may not contain upload: %@", query); + } +#endif + + [queries_ autorelease]; + queries_ = [array mutableCopy]; +} + +- (NSArray *)queries { + return queries_; +} + +- (void)addQuery:(GTLQuery *)query { + GTL_DEBUG_ASSERT([query isKindOfClass:[GTLQuery class]], + @"unexpected query class: %@", [query class]); + GTL_DEBUG_ASSERT(query.uploadParameters == nil, + @"batch may not contain upload: %@", query); + + if (queries_ == nil) { + queries_ = [[NSMutableArray alloc] init]; + } + + [queries_ addObject:query]; +} + +@end diff --git a/GTL/Source/Objects/GTLBatchResult.h b/GTL/Source/Objects/GTLBatchResult.h new file mode 100644 index 0000000..9675aaf --- /dev/null +++ b/GTL/Source/Objects/GTLBatchResult.h @@ -0,0 +1,58 @@ +/* Copyright (c) 2011 Google Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// +// GTLBatchResult.h +// + +#import "GTLObject.h" + +@interface GTLBatchResult : GTLObject { + @private + NSMutableDictionary *successes_; + NSMutableDictionary *failures_; +} + +// Dictionaries of results for all queries in the batch +// +// Dictionary keys are requestID strings; objects are results or +// GTLErrorObjects. +// +// For successes with no returned object (such as from delete operations), +// the object for the dictionary entry is NSNull. +// +// +// The original query for each result is available from the service ticket, +// for example +// +// NSDictionary *successes = batchResults.successes; +// for (NSString *requestID in successes) { +// GTLObject *obj = [successes objectForKey:requestID]; +// GTLQuery *query = [ticket queryForRequestID:requestID]; +// NSLog(@"Query %@ returned object %@", query, obj); +// } +// +// NSDictionary *failures = batchResults.failures; +// for (NSString *requestID in failures) { +// GTLErrorObject *errorObj = [failures objectForKey:requestID]; +// GTLQuery *query = [ticket queryForRequestID:requestID]; +// NSLog(@"Query %@ failed with error %@", query, errorObj); +// } +// + +@property (retain) NSMutableDictionary *successes; +@property (retain) NSMutableDictionary *failures; + +@end diff --git a/GTL/Source/Objects/GTLBatchResult.m b/GTL/Source/Objects/GTLBatchResult.m new file mode 100644 index 0000000..f17748d --- /dev/null +++ b/GTL/Source/Objects/GTLBatchResult.m @@ -0,0 +1,92 @@ +/* Copyright (c) 2011 Google Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// +// GTLBatchResult.m +// + +#import "GTLBatchResult.h" + +#import "GTLErrorObject.h" + +@implementation GTLBatchResult + +@synthesize successes = successes_, + failures = failures_; + +- (id)copyWithZone:(NSZone *)zone { + GTLBatchResult* newObject = [super copyWithZone:zone]; + newObject.successes = [[self.successes mutableCopyWithZone:zone] autorelease]; + newObject.failures = [[self.failures mutableCopyWithZone:zone] autorelease]; + return newObject; +} + +- (void)dealloc { + [successes_ release]; + [failures_ release]; + + [super dealloc]; +} + +- (NSString *)description { + return [NSString stringWithFormat:@"%@ %p (successes:%lu failures:%lu)", + [self class], self, + (unsigned long) [self.successes count], + (unsigned long) [self.failures count]]; +} + +#pragma mark - + +- (void)createItemsWithClassMap:(NSDictionary *)batchClassMap { + // This is called by GTLObject objectForJSON:defaultClass: + // JSON is defined to be a dictionary, but for batch results, it really + // is any array. + id json = self.JSON; + GTL_DEBUG_ASSERT([json isKindOfClass:[NSArray class]], + @"didn't get an array for the batch results"); + NSArray *jsonArray = json; + + NSMutableDictionary *successes = [NSMutableDictionary dictionary]; + NSMutableDictionary *failures = [NSMutableDictionary dictionary]; + + for (NSMutableDictionary *rpcResponse in jsonArray) { + NSString *responseID = [rpcResponse objectForKey:@"id"]; + + NSMutableDictionary *errorJSON = [rpcResponse objectForKey:@"error"]; + if (errorJSON) { + GTLErrorObject *errorObject = [GTLErrorObject objectWithJSON:errorJSON]; + [failures setValue:errorObject forKey:responseID]; + } else { + NSMutableDictionary *resultJSON = [rpcResponse objectForKey:@"result"]; + + NSDictionary *surrogates = self.surrogates; + Class defaultClass = [batchClassMap objectForKey:responseID]; + + id resultObject = [[self class] objectForJSON:resultJSON + defaultClass:defaultClass + surrogates:surrogates + batchClassMap:nil]; + if (resultObject == nil) { + // methods like delete return no object + resultObject = [NSNull null]; + } + [successes setValue:resultObject forKey:responseID]; + } + } + self.successes = successes; + self.failures = failures; +} + +@end diff --git a/GTL/Source/Objects/GTLDateTime.h b/GTL/Source/Objects/GTLDateTime.h new file mode 100644 index 0000000..f6b1ffb --- /dev/null +++ b/GTL/Source/Objects/GTLDateTime.h @@ -0,0 +1,60 @@ +/* Copyright (c) 2011 Google Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// +// GTLDateTime.h +// +// This is an immutable class representing a date and optionally a +// time with time zone. +// + +#import +#import "GTLDefines.h" + +@interface GTLDateTime : NSObject { + NSDateComponents *dateComponents_; + NSInteger milliseconds_; // This is only for the fraction of a second 0-999 + NSInteger offsetSeconds_; // may be NSUndefinedDateComponent + BOOL isUniversalTime_; // preserves "Z" + NSTimeZone *timeZone_; // specific time zone by name, if known +} + ++ (GTLDateTime *)dateTimeWithRFC3339String:(NSString *)str; + +// timeZone may be nil if the time zone is not known. ++ (GTLDateTime *)dateTimeWithDate:(NSDate *)date timeZone:(NSTimeZone *)tz; + +// Use this method to make a dateTime for an all-day event (date only, so +// hasTime is NO.) ++ (GTLDateTime *)dateTimeForAllDayWithDate:(NSDate *)date; + ++ (GTLDateTime *)dateTimeWithDateComponents:(NSDateComponents *)date; + +@property (nonatomic, readonly) NSDate *date; +@property (nonatomic, readonly) NSCalendar *calendar; + +@property (nonatomic, readonly) NSString *RFC3339String; +@property (nonatomic, readonly) NSString *stringValue; // same as RFC3339String + +@property (nonatomic, readonly, retain) NSTimeZone *timeZone; +@property (nonatomic, readonly, copy) NSDateComponents *dateComponents; +@property (nonatomic, readonly) NSInteger milliseconds; // This is only for the fraction of a second 0-999 + +@property (nonatomic, readonly) BOOL hasTime; +@property (nonatomic, readonly) NSInteger offsetSeconds; +@property (nonatomic, readonly, getter=isUniversalTime) BOOL universalTime; + + +@end diff --git a/GTL/Source/Objects/GTLDateTime.m b/GTL/Source/Objects/GTLDateTime.m new file mode 100644 index 0000000..632943d --- /dev/null +++ b/GTL/Source/Objects/GTLDateTime.m @@ -0,0 +1,446 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDateTime.m +// + +#import "GTLDateTime.h" + +@interface GTLDateTime () + +- (void)setFromDate:(NSDate *)date timeZone:(NSTimeZone *)tz; +- (void)setFromRFC3339String:(NSString *)str; + +@property (nonatomic, retain, readwrite) NSTimeZone *timeZone; +@property (nonatomic, copy, readwrite) NSDateComponents *dateComponents; +@property (nonatomic, assign, readwrite) NSInteger milliseconds; + +@property (nonatomic, assign, readwrite) BOOL hasTime; +@property (nonatomic, assign, readwrite) NSInteger offsetSeconds; +@property (nonatomic, assign, getter=isUniversalTime, readwrite) BOOL universalTime; + +@end + +@implementation GTLDateTime + +// A note about milliseconds_: +// RFC 3339 has support for fractions of a second. NSDateComponents is all +// NSInteger based, so it can't handle a fraction of a second. NSDate is +// built on NSTimeInterval so it has sub-millisecond precision. GTL takes +// the compromise of supporting the RFC's optional fractional second support +// by maintaining a number of milliseconds past what fits in the +// NSDateComponents. The parsing and string conversions will include +// 3 decimal digits (hence milliseconds). When going to a string, the decimal +// digits are only included if the milliseconds are non zero. + +@dynamic date; +@dynamic calendar; +@dynamic RFC3339String; +@dynamic stringValue; +@dynamic timeZone; +@dynamic hasTime; + +@synthesize dateComponents = dateComponents_, + milliseconds = milliseconds_, + offsetSeconds = offsetSeconds_, + universalTime = isUniversalTime_; + ++ (GTLDateTime *)dateTimeWithRFC3339String:(NSString *)str { + if (str == nil) return nil; + + GTLDateTime *result = [[[self alloc] init] autorelease]; + [result setFromRFC3339String:str]; + return result; +} + ++ (GTLDateTime *)dateTimeWithDate:(NSDate *)date timeZone:(NSTimeZone *)tz { + if (date == nil) return nil; + + GTLDateTime *result = [[[self alloc] init] autorelease]; + [result setFromDate:date timeZone:tz]; + return result; +} + ++ (GTLDateTime *)dateTimeForAllDayWithDate:(NSDate *)date { + if (date == nil) return nil; + + GTLDateTime *result = [[[self alloc] init] autorelease]; + [result setFromDate:date timeZone:nil]; + result.hasTime = NO; + return result; +} + ++ (GTLDateTime *)dateTimeWithDateComponents:(NSDateComponents *)components { + NSCalendar *cal = [[[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar] autorelease]; + NSDate *date = [cal dateFromComponents:components]; +#if GTL_IPHONE + NSTimeZone *tz = [components timeZone]; +#else + // NSDateComponents added timeZone: in Mac OS X 10.7. + NSTimeZone *tz = nil; + if ([components respondsToSelector:@selector(timeZone)]) { + tz = [components timeZone]; + } +#endif + return [self dateTimeWithDate:date timeZone:tz]; +} + +- (void)dealloc { + [dateComponents_ release]; + [timeZone_ release]; + [super dealloc]; +} + +- (id)copyWithZone:(NSZone *)zone { + // Object is immutable + return [self retain]; +} + +// until NSDateComponent implements isEqual, we'll use this +- (BOOL)doesDateComponents:(NSDateComponents *)dc1 + equalDateComponents:(NSDateComponents *)dc2 { + + return [dc1 era] == [dc2 era] + && [dc1 year] == [dc2 year] + && [dc1 month] == [dc2 month] + && [dc1 day] == [dc2 day] + && [dc1 hour] == [dc2 hour] + && [dc1 minute] == [dc2 minute] + && [dc1 second] == [dc2 second] + && [dc1 week] == [dc2 week] + && [dc1 weekday] == [dc2 weekday] + && [dc1 weekdayOrdinal] == [dc2 weekdayOrdinal]; +} + +- (BOOL)isEqual:(GTLDateTime *)other { + + if (self == other) return YES; + if (![other isKindOfClass:[GTLDateTime class]]) return NO; + + BOOL areDateComponentsEqual = [self doesDateComponents:self.dateComponents + equalDateComponents:other.dateComponents]; + NSTimeZone *tz1 = self.timeZone; + NSTimeZone *tz2 = other.timeZone; + BOOL areTimeZonesEqual = (tz1 == tz2 || (tz2 && [tz1 isEqual:tz2])); + + return self.offsetSeconds == other.offsetSeconds + && self.isUniversalTime == other.isUniversalTime + && self.milliseconds == other.milliseconds + && areDateComponentsEqual + && areTimeZonesEqual; +} + +- (NSString *)description { + return [NSString stringWithFormat:@"%@ %p: {%@}", + [self class], self, self.RFC3339String]; +} + +- (NSTimeZone *)timeZone { + if (timeZone_) { + return timeZone_; + } + + if (self.isUniversalTime) { + NSTimeZone *ztz = [NSTimeZone timeZoneWithName:@"Universal"]; + return ztz; + } + + NSInteger offsetSeconds = self.offsetSeconds; + + if (offsetSeconds != NSUndefinedDateComponent) { + NSTimeZone *tz = [NSTimeZone timeZoneForSecondsFromGMT:offsetSeconds]; + return tz; + } + return nil; +} + +- (void)setTimeZone:(NSTimeZone *)timeZone { + [timeZone_ release]; + timeZone_ = [timeZone retain]; + + if (timeZone) { + NSInteger offsetSeconds = [timeZone secondsFromGMTForDate:self.date]; + self.offsetSeconds = offsetSeconds; + } else { + self.offsetSeconds = NSUndefinedDateComponent; + } +} + +- (NSCalendar *)calendar { + NSCalendar *cal = [[[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar] autorelease]; + NSTimeZone *tz = self.timeZone; + if (tz) { + [cal setTimeZone:tz]; + } + return cal; +} + +- (NSDate *)date { + NSCalendar *cal = self.calendar; + NSDateComponents *dateComponents = self.dateComponents; + NSTimeInterval extraMillisecondsAsSeconds = 0.0; + + if (!self.hasTime) { + // we're not keeping track of a time, but NSDate always is based on + // an absolute time. We want to avoid returning an NSDate where the + // calendar date appears different from what was used to create our + // date-time object. + // + // We'll make a copy of the date components, setting the time on our + // copy to noon GMT, since that ensures the date renders correctly for + // any time zone + NSDateComponents *noonDateComponents = [[dateComponents copy] autorelease]; + [noonDateComponents setHour:12]; + [noonDateComponents setMinute:0]; + [noonDateComponents setSecond:0]; + dateComponents = noonDateComponents; + + NSTimeZone *gmt = [NSTimeZone timeZoneWithName:@"Universal"]; + [cal setTimeZone:gmt]; + } else { + // Add in the fractional seconds that don't fit into NSDateComponents. + extraMillisecondsAsSeconds = ((NSTimeInterval)self.milliseconds) / 1000.0; + } + + NSDate *date = [cal dateFromComponents:dateComponents]; + + // Add in any milliseconds that didn't fit into the dateComponents. + if (extraMillisecondsAsSeconds > 0.0) { +#if GTL_IPHONE || (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_5) + date = [date dateByAddingTimeInterval:extraMillisecondsAsSeconds]; +#else + date = [date addTimeInterval:extraMillisecondsAsSeconds]; +#endif + } + + return date; +} + +- (NSString *)stringValue { + return self.RFC3339String; +} + +- (NSString *)RFC3339String { + NSDateComponents *dateComponents = self.dateComponents; + NSInteger offset = self.offsetSeconds; + + NSString *timeString = @""; // timeString like "T15:10:46-08:00" + + if (self.hasTime) { + + NSString *timeOffsetString; // timeOffsetString like "-08:00" + + if (self.isUniversalTime) { + timeOffsetString = @"Z"; + } else if (offset == NSUndefinedDateComponent) { + // unknown offset is rendered as -00:00 per + // http://www.ietf.org/rfc/rfc3339.txt section 4.3 + timeOffsetString = @"-00:00"; + } else { + NSString *sign = @"+"; + if (offset < 0) { + sign = @"-"; + offset = -offset; + } + timeOffsetString = [NSString stringWithFormat:@"%@%02ld:%02ld", + sign, (long)(offset/(60*60)) % 24, (long)(offset / 60) % 60]; + } + + NSString *fractionalSecondsString = @""; + if (self.milliseconds > 0.0) { + fractionalSecondsString = [NSString stringWithFormat:@".%03ld", (long)self.milliseconds]; + } + + timeString = [NSString stringWithFormat:@"T%02ld:%02ld:%02ld%@%@", + (long)[dateComponents hour], (long)[dateComponents minute], + (long)[dateComponents second], fractionalSecondsString, timeOffsetString]; + } + + // full dateString like "2006-11-17T15:10:46-08:00" + NSString *dateString = [NSString stringWithFormat:@"%04ld-%02ld-%02ld%@", + (long)[dateComponents year], (long)[dateComponents month], + (long)[dateComponents day], timeString]; + + return dateString; +} + +- (void)setFromDate:(NSDate *)date timeZone:(NSTimeZone *)tz { + NSCalendar *cal = [[[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar] autorelease]; + if (tz) { + [cal setTimeZone:tz]; + } + + NSUInteger const kComponentBits = (NSYearCalendarUnit | NSMonthCalendarUnit + | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit + | NSSecondCalendarUnit); + + NSDateComponents *components = [cal components:kComponentBits fromDate:date]; + self.dateComponents = components; + + // Extract the fractional seconds. + NSTimeInterval asTimeInterval = [date timeIntervalSince1970]; + NSTimeInterval worker = asTimeInterval - trunc(asTimeInterval); + self.milliseconds = (NSInteger)round(worker * 1000.0); + + self.universalTime = NO; + + NSInteger offset = NSUndefinedDateComponent; + + if (tz) { + offset = [tz secondsFromGMTForDate:date]; + + if (offset == 0 && [tz isEqualToTimeZone:[NSTimeZone timeZoneWithName:@"Universal"]]) { + self.universalTime = YES; + } + } + self.offsetSeconds = offset; + + // though offset seconds are authoritative, we'll retain the time zone + // since we can't regenerate it reliably from just the offset + timeZone_ = [tz retain]; +} + +- (void)setFromRFC3339String:(NSString *)str { + + NSInteger year = NSUndefinedDateComponent; + NSInteger month = NSUndefinedDateComponent; + NSInteger day = NSUndefinedDateComponent; + NSInteger hour = NSUndefinedDateComponent; + NSInteger minute = NSUndefinedDateComponent; + NSInteger sec = NSUndefinedDateComponent; + NSInteger milliseconds = 0; + double secDouble = -1.0; + NSString* sign = nil; + NSInteger offsetHour = 0; + NSInteger offsetMinute = 0; + + if ([str length] > 0) { + NSScanner* scanner = [NSScanner scannerWithString:str]; + // There should be no whitespace, so no skip characters. + [scanner setCharactersToBeSkipped:nil]; + + NSCharacterSet* dashSet = [NSCharacterSet characterSetWithCharactersInString:@"-"]; + NSCharacterSet* tSet = [NSCharacterSet characterSetWithCharactersInString:@"Tt "]; + NSCharacterSet* colonSet = [NSCharacterSet characterSetWithCharactersInString:@":"]; + NSCharacterSet* plusMinusZSet = [NSCharacterSet characterSetWithCharactersInString:@"+-zZ"]; + + // for example, scan 2006-11-17T15:10:46-08:00 + // or 2006-11-17T15:10:46Z + if (// yyyy-mm-dd + [scanner scanInteger:&year] && + [scanner scanCharactersFromSet:dashSet intoString:NULL] && + [scanner scanInteger:&month] && + [scanner scanCharactersFromSet:dashSet intoString:NULL] && + [scanner scanInteger:&day] && + // Thh:mm:ss + [scanner scanCharactersFromSet:tSet intoString:NULL] && + [scanner scanInteger:&hour] && + [scanner scanCharactersFromSet:colonSet intoString:NULL] && + [scanner scanInteger:&minute] && + [scanner scanCharactersFromSet:colonSet intoString:NULL] && + [scanner scanDouble:&secDouble]) { + + // At this point we got secDouble, pull it apart. + sec = (NSInteger)secDouble; + double worker = secDouble - ((double)sec); + milliseconds = (NSInteger)round(worker * 1000.0); + + // Finish parsing, now the offset info. + if (// Z or +hh:mm + [scanner scanCharactersFromSet:plusMinusZSet intoString:&sign] && + [scanner scanInteger:&offsetHour] && + [scanner scanCharactersFromSet:colonSet intoString:NULL] && + [scanner scanInteger:&offsetMinute]) { + } + } + } + + NSDateComponents *dateComponents = [[[NSDateComponents alloc] init] autorelease]; + [dateComponents setYear:year]; + [dateComponents setMonth:month]; + [dateComponents setDay:day]; + [dateComponents setHour:hour]; + [dateComponents setMinute:minute]; + [dateComponents setSecond:sec]; + + self.dateComponents = dateComponents; + self.milliseconds = milliseconds; + + // determine the offset, like from Z, or -08:00:00.0 + + self.timeZone = nil; + + NSInteger totalOffset = NSUndefinedDateComponent; + self.universalTime = NO; + + if ([sign caseInsensitiveCompare:@"Z"] == NSOrderedSame) { + + self.universalTime = YES; + totalOffset = 0; + + } else if (sign != nil) { + + totalOffset = (60 * offsetMinute) + (60 * 60 * offsetHour); + + if ([sign isEqual:@"-"]) { + + if (totalOffset == 0) { + // special case: offset of -0.00 means undefined offset + totalOffset = NSUndefinedDateComponent; + } else { + totalOffset *= -1; + } + } + } + + self.offsetSeconds = totalOffset; +} + +- (BOOL)hasTime { + NSDateComponents *dateComponents = self.dateComponents; + + BOOL hasTime = ([dateComponents hour] != NSUndefinedDateComponent + && [dateComponents minute] != NSUndefinedDateComponent); + + return hasTime; +} + +- (void)setHasTime:(BOOL)shouldHaveTime { + + // we'll set time values to zero or NSUndefinedDateComponent as appropriate + BOOL hadTime = self.hasTime; + + if (shouldHaveTime && !hadTime) { + [dateComponents_ setHour:0]; + [dateComponents_ setMinute:0]; + [dateComponents_ setSecond:0]; + milliseconds_ = 0; + offsetSeconds_ = NSUndefinedDateComponent; + isUniversalTime_ = NO; + + } else if (hadTime && !shouldHaveTime) { + [dateComponents_ setHour:NSUndefinedDateComponent]; + [dateComponents_ setMinute:NSUndefinedDateComponent]; + [dateComponents_ setSecond:NSUndefinedDateComponent]; + milliseconds_ = 0; + offsetSeconds_ = NSUndefinedDateComponent; + isUniversalTime_ = NO; + self.timeZone = nil; + } +} + + +@end diff --git a/GTL/Source/Objects/GTLErrorObject.h b/GTL/Source/Objects/GTLErrorObject.h new file mode 100644 index 0000000..c2ec67d --- /dev/null +++ b/GTL/Source/Objects/GTLErrorObject.h @@ -0,0 +1,45 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLErrorObject.h +// + +#import "GTLObject.h" + +@class GTLErrorObjectData; + +@interface GTLErrorObject : GTLObject +@property (retain) NSNumber *code; +@property (retain) NSString *message; +@property (retain) NSArray *data; // of GTLErrorObjectData + +// Convenience accessor for creating an NSError from a GTLErrorObject. +@property (readonly) NSError *foundationError; + +// Convenience accessor for extracting the GTLErrorObject that was used to +// create an NSError. +// +// Returns nil if the error was not originally from a GTLErrorObject. ++ (GTLErrorObject *)underlyingObjectForError:(NSError *)foundationError; + +@end + +@interface GTLErrorObjectData : GTLObject +@property (retain) NSString *domain; +@property (retain) NSString *reason; +@property (retain) NSString *message; +@property (retain) NSString *location; +@end diff --git a/GTL/Source/Objects/GTLErrorObject.m b/GTL/Source/Objects/GTLErrorObject.m new file mode 100644 index 0000000..1fa1023 --- /dev/null +++ b/GTL/Source/Objects/GTLErrorObject.m @@ -0,0 +1,78 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLErrorObject.m +// + +#import "GTLErrorObject.h" +#import "GTLService.h" + +@implementation GTLErrorObject + +@dynamic code; +@dynamic message; +@dynamic data; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = [NSDictionary dictionaryWithObject:[GTLErrorObjectData class] + forKey:@"data"]; + return map; +} + +- (NSError *)foundationError { + NSMutableDictionary *userInfo; + + // This structured GTLErrorObject will be available in the error's userInfo + // dictionary + userInfo = [NSMutableDictionary dictionaryWithObject:self + forKey:kGTLStructuredErrorKey]; + + NSString *reasonStr = self.message; + if (reasonStr) { + // We always store an error in the userInfo key "error" + [userInfo setObject:reasonStr + forKey:kGTLServerErrorStringKey]; + + // Store a user-readable "reason" to show up when an error is logged, + // in parentheses like NSError does it + NSString *parenthesized = [NSString stringWithFormat:@"(%@)", reasonStr]; + [userInfo setObject:parenthesized + forKey:NSLocalizedFailureReasonErrorKey]; + } + + NSInteger code = [self.code integerValue]; + NSError *error = [NSError errorWithDomain:kGTLJSONRPCErrorDomain + code:code + userInfo:userInfo]; + return error; +} + ++ (GTLErrorObject *)underlyingObjectForError:(NSError *)foundationError { + NSDictionary *userInfo = [foundationError userInfo]; + GTLErrorObject *errorObj = [userInfo objectForKey:kGTLStructuredErrorKey]; + return errorObj; +} + +@end + +@implementation GTLErrorObjectData +@dynamic domain; +@dynamic reason; +@dynamic message; +@dynamic location; +@end + + diff --git a/GTL/Source/Objects/GTLObject.h b/GTL/Source/Objects/GTLObject.h new file mode 100644 index 0000000..42d79fe --- /dev/null +++ b/GTL/Source/Objects/GTLObject.h @@ -0,0 +1,206 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLObject.h +// + +// GTLObject documentation: +// https://code.google.com/p/google-api-objectivec-client/wiki/Introduction#Objects_and_Queries + +#import + +#import "GTLDefines.h" +#import "GTLUtilities.h" +#import "GTLDateTime.h" + +#undef _EXTERN +#undef _INITIALIZE_AS +#ifdef GTLOBJECT_DEFINE_GLOBALS +#define _EXTERN +#define _INITIALIZE_AS(x) =x +#else +#define _EXTERN extern +#define _INITIALIZE_AS(x) +#endif + +@protocol GTLCollectionProtocol +@optional +@property (retain) NSArray *items; +@end + +@protocol GTLBatchItemCreationProtocol +- (void)createItemsWithClassMap:(NSDictionary *)batchClassMap; +@end + +@interface GTLObject : NSObject { + + @private + + NSMutableDictionary *json_; + + // Used when creating the subobjects from this one. + NSDictionary *surrogates_; + + // Any complex object hung off this object goes into the cache so the + // next fetch will get the same object back instead of having to recreate + // it. + NSMutableDictionary *childCache_; + + // Anything defined by the client; retained but not used internally; not + // copied by copyWithZone: + NSMutableDictionary *userProperties_; +} + +@property (nonatomic, retain) NSMutableDictionary *JSON; +@property (nonatomic, retain) NSDictionary *surrogates; +@property (nonatomic, retain) NSMutableDictionary *userProperties; + +/////////////////////////////////////////////////////////////////////////////// +// +// Public methods +// +// These methods are intended for users of the library +// + ++ (id)object; ++ (id)objectWithJSON:(NSMutableDictionary *)dict; + +- (id)copyWithZone:(NSZone *)zone; + +- (NSString *)JSONString; + +// generic access to json; also creates it if necessary +- (void)setJSONValue:(id)obj forKey:(NSString *)key; +- (id)JSONValueForKey:(NSString *)key; + +// Returns the list of keys in this object's JSON that aren't listed as +// properties on the object. +- (NSArray *)additionalJSONKeys; + +// Any keys in the JSON that aren't listed as @properties on the object +// are counted as "additional properties". These allow you to get/set them. +- (id)additionalPropertyForName:(NSString *)name; +- (void)setAdditionalProperty:(id)obj forName:(NSString *)name; +- (NSDictionary *)additionalProperties; + +// User properties are supported for client convenience, but are not copied by +// copyWithZone. User Properties keys beginning with _ are reserved by the library. +- (void)setProperty:(id)obj forKey:(NSString *)key; // pass nil obj to remove property +- (id)propertyForKey:(NSString *)key; + +// userData is stored as a property with key "_userData" +- (void)setUserData:(id)obj; +- (id)userData; + +// Makes a partial query-compatible string describing the fields present +// in this object. (Note: only the first element of any array is examined.) +// +// http://code.google.com/apis/tasks/v1/performance.html#partial +// +- (NSString *)fieldsDescription; + +// Makes an object containing only the changes needed to do a partial update +// (patch), where the patch would be to change an object from the original +// to the receiver, such as +// +// GTLSomeObject *patchObject = [newVersion patchObjectFromOriginal:oldVersion]; +// +// http://code.google.com/apis/tasks/v1/performance.html#patch +// +// NOTE: this method returns nil if there are no changes between the original +// and the receiver. +- (id)patchObjectFromOriginal:(GTLObject *)original; + +// Method creating a null value to set object properties for patch queries that +// delete fields. Do not use this except when setting an object property for +// a patch query. ++ (id)nullValue; + +/////////////////////////////////////////////////////////////////////////////// +// +// Protected methods +// +// These methods are intended for subclasses of GTLObject +// + +// class registration ("kind" strings) for subclasses ++ (Class)registeredObjectClassForKind:(NSString *)kind; ++ (void)registerObjectClassForKind:(NSString *)kind; + +// creation of objects from a JSON dictionary ++ (GTLObject *)objectForJSON:(NSMutableDictionary *)json + defaultClass:(Class)defaultClass + surrogates:(NSDictionary *)surrogates + batchClassMap:(NSDictionary *)batchClassMap; + +// property-to-key mapping (for JSON keys which are not used as method names) ++ (NSDictionary *)propertyToJSONKeyMap; + +// property-to-Class mapping for array properties (to say what is in the array) ++ (NSDictionary *)arrayPropertyToClassMap; + +// The default class for additional JSON keys ++ (Class)classForAdditionalProperties; + +@end + +// Collection objects with an "items" property should derive from GTLCollection +// object. This provides support for fast object enumeration, the +// itemAtIndex: convenience method, and indexed subscripts. +// +// Subclasses must implement the items method dynamically. +@interface GTLCollectionObject : GTLObject { + @private + NSDictionary *identifierMap_; +} + +// itemAtIndex: and objectAtIndexedSubscript: return nil when the index exceeds +// the bounds of the items array. +- (id)itemAtIndex:(NSUInteger)idx; + +- (id)objectAtIndexedSubscript:(NSInteger)idx; + +// itemForIdentifier: looks up items from the collection object by identifier, +// and returns the first one. +// +// Typically, items will have a unique identifier (with key "id" in the +// object's JSON). This method returns the first item found in the collection +// with the specified identifier. +// +// The first time this method is used, the collection will cache a map of +// identifiers to items. If the items list for the instance somehow changes, +// use the reset method below to force a new cache to be created for this +// collection. +- (id)itemForIdentifier:(NSString *)key; + +// Identifiers for all items are cached when the first one is obtained. +// This method resets the cache. It is needed only if the item list has +// changed. +- (void)resetIdentifierMap; + +@end + +@interface GTLCollectionObject (DynamicMethods) +- (NSArray *)items; +@end + +// Base object use for when an service method directly returns an array instead +// of an object. Normally methods should return an object with an 'items' +// property, this exists for the methods not up to spec. +@interface GTLResultArray : GTLCollectionObject +// This method should only be called by subclasses. +- (NSArray *)itemsWithItemClass:(Class)itemClass; +@end diff --git a/GTL/Source/Objects/GTLObject.m b/GTL/Source/Objects/GTLObject.m new file mode 100644 index 0000000..83c2d19 --- /dev/null +++ b/GTL/Source/Objects/GTLObject.m @@ -0,0 +1,722 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLObject.m +// + +#define GTLOBJECT_DEFINE_GLOBALS 1 + +#include + +#import "GTLObject.h" +#import "GTLRuntimeCommon.h" +#import "GTLJSONParser.h" + +static NSString *const kUserDataPropertyKey = @"_userData"; + +@interface GTLObject () ++ (NSMutableArray *)allDeclaredProperties; ++ (NSArray *)allKnownKeys; + ++ (NSArray *)fieldsElementsForJSON:(NSDictionary *)targetJSON; ++ (NSString *)fieldsDescriptionForJSON:(NSDictionary *)targetJSON; + ++ (NSMutableDictionary *)patchDictionaryForJSON:(NSDictionary *)newJSON + fromOriginalJSON:(NSDictionary *)originalJSON; +@end + +@implementation GTLObject + +@synthesize JSON = json_, + surrogates = surrogates_, + userProperties = userProperties_; + ++ (id)object { + return [[[self alloc] init] autorelease]; +} + ++ (id)objectWithJSON:(NSMutableDictionary *)dict { + GTLObject *obj = [self object]; + obj.JSON = dict; + return obj; +} + ++ (NSDictionary *)propertyToJSONKeyMap { + return nil; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + return nil; +} + ++ (Class)classForAdditionalProperties { + return Nil; +} + +- (BOOL)isEqual:(GTLObject *)other { + if (self == other) return YES; + if (other == nil) return NO; + + // The objects should be the same class, or one should be a subclass of the + // other's class + if (![other isKindOfClass:[self class]] + && ![self isKindOfClass:[other class]]) return NO; + + // What we're not comparing here: + // properties + return GTL_AreEqualOrBothNil(json_, [other JSON]); +} + +// By definition, for two objects to potentially be considered equal, +// they must have the same hash value. The hash is mostly ignored, +// but removeObjectsInArray: in Leopard does seem to check the hash, +// and NSObject's default hash method just returns the instance pointer. +// We'll define hash here for all of our GTLObjects. +- (NSUInteger)hash { + return (NSUInteger) (void *) [GTLObject class]; +} + +- (id)copyWithZone:(NSZone *)zone { + GTLObject* newObject = [[[self class] allocWithZone:zone] init]; + CFPropertyListRef ref = CFPropertyListCreateDeepCopy(kCFAllocatorDefault, + json_, kCFPropertyListMutableContainers); + GTL_DEBUG_ASSERT(ref != NULL, @"GTLObject: copy failed (probably a non-plist type in the JSON)"); + newObject.JSON = [NSMakeCollectable(ref) autorelease]; + newObject.surrogates = self.surrogates; + + // What we're not copying: + // userProperties + return newObject; +} + +- (NSString *)descriptionWithLocale:(id)locale { + return [self description]; +} + +- (void)dealloc { + [json_ release]; + [surrogates_ release]; + [childCache_ release]; + [userProperties_ release]; + + [super dealloc]; +} + +#pragma mark JSON values + +- (void)setJSONValue:(id)obj forKey:(NSString *)key { + NSMutableDictionary *dict = self.JSON; + if (dict == nil && obj != nil) { + dict = [NSMutableDictionary dictionaryWithCapacity:1]; + self.JSON = dict; + } + [dict setValue:obj forKey:key]; +} + +- (id)JSONValueForKey:(NSString *)key { + id obj = [self.JSON objectForKey:key]; + return obj; +} + +- (NSString *)JSONString { + NSError *error = nil; + NSString *str = [GTLJSONParser stringWithObject:[self JSON] + humanReadable:YES + error:&error]; + if (error) { + return [error description]; + } + return str; +} + +- (NSArray *)additionalJSONKeys { + NSArray *knownKeys = [[self class] allKnownKeys]; + NSMutableArray *result = [NSMutableArray arrayWithArray:[json_ allKeys]]; + [result removeObjectsInArray:knownKeys]; + // Return nil instead of an empty array. + if ([result count] == 0) { + result = nil; + } + return result; +} + +#pragma mark Partial - Fields + +- (NSString *)fieldsDescription { + NSString *str = [GTLObject fieldsDescriptionForJSON:self.JSON]; + return str; +} + ++ (NSString *)fieldsDescriptionForJSON:(NSDictionary *)targetJSON { + // Internal routine: recursively generate a string field description + // by joining elements + NSArray *array = [self fieldsElementsForJSON:targetJSON]; + NSString *str = [array componentsJoinedByString:@","]; + return str; +} + ++ (NSArray *)fieldsElementsForJSON:(NSDictionary *)targetJSON { + // Internal routine: recursively generate an array of field description + // element strings + NSMutableArray *resultFields = [NSMutableArray array]; + + // Sorting the dictionary keys gives us deterministic results when iterating + NSArray *sortedKeys = [[targetJSON allKeys] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)]; + for (NSString *key in sortedKeys) { + // We'll build a comma-separated list of fields + id value = [targetJSON objectForKey:key]; + if ([value isKindOfClass:[NSString class]] + || [value isKindOfClass:[NSNumber class]]) { + // Basic type (string, number), so the key is what we want + [resultFields addObject:key]; + } else if ([value isKindOfClass:[NSDictionary class]]) { + // Object (dictionary): "parent/child1,parent/child2,parent/child3" + NSArray *subElements = [self fieldsElementsForJSON:value]; + for (NSString *subElem in subElements) { + NSString *prepended = [NSString stringWithFormat:@"%@/%@", + key, subElem]; + [resultFields addObject:prepended]; + } + } else if ([value isKindOfClass:[NSArray class]]) { + // Array; we'll generate from the first array entry: + // "parent(child1,child2,child3)" + // + // Open question: should this instead create the union of elements for + // all items in the array, rather than just get fields from the first + // array object? + if ([(NSArray *)value count] > 0) { + id firstObj = [value objectAtIndex:0]; + if ([firstObj isKindOfClass:[NSDictionary class]]) { + // An array of objects + NSString *contentsStr = [self fieldsDescriptionForJSON:firstObj]; + NSString *encapsulated = [NSString stringWithFormat:@"%@(%@)", + key, contentsStr]; + [resultFields addObject:encapsulated]; + } else { + // An array of some basic type, or of arrays + [resultFields addObject:key]; + } + } + } else { + GTL_ASSERT(0, @"GTLObject unknown field element for %@ (%@)", + key, NSStringFromClass([value class])); + } + } + return resultFields; +} + +#pragma mark Partial - Patch + +- (id)patchObjectFromOriginal:(GTLObject *)original { + id resultObj; + NSMutableDictionary *resultJSON = [GTLObject patchDictionaryForJSON:self.JSON + fromOriginalJSON:original.JSON]; + if ([resultJSON count] > 0) { + resultObj = [[self class] objectWithJSON:resultJSON]; + } else { + // Client apps should not attempt to patch with an object containing + // empty JSON + resultObj = nil; + } + return resultObj; +} + ++ (NSMutableDictionary *)patchDictionaryForJSON:(NSDictionary *)newJSON + fromOriginalJSON:(NSDictionary *)originalJSON { + // Internal recursive routine to create an object suitable for + // our patch semantics + NSMutableDictionary *resultJSON = [NSMutableDictionary dictionary]; + + // Iterate through keys present in the old object + NSArray *originalKeys = [originalJSON allKeys]; + for (NSString *key in originalKeys) { + id originalValue = [originalJSON objectForKey:key]; + id newValue = [newJSON valueForKey:key]; + if (newValue == nil) { + // There is no new value for this key, so set the value to NSNull + [resultJSON setValue:[NSNull null] forKey:key]; + } else if (!GTL_AreEqualOrBothNil(originalValue, newValue)) { + // The values for this key differ + if ([originalValue isKindOfClass:[NSDictionary class]] + && [newValue isKindOfClass:[NSDictionary class]]) { + // Both are objects; recurse + NSMutableDictionary *subDict = [self patchDictionaryForJSON:newValue + fromOriginalJSON:originalValue]; + [resultJSON setValue:subDict forKey:key]; + } else { + // They are non-object values; the new replaces the old. Per the + // documentation for patch, this replaces entire arrays. + [resultJSON setValue:newValue forKey:key]; + } + } else { + // The values are the same; omit this key-value pair + } + } + + // Iterate through keys present only in the new object, and add them to the + // result + NSMutableArray *newKeys = [NSMutableArray arrayWithArray:[newJSON allKeys]]; + [newKeys removeObjectsInArray:originalKeys]; + + for (NSString *key in newKeys) { + id value = [newJSON objectForKey:key]; + [resultJSON setValue:value forKey:key]; + } + return resultJSON; +} + ++ (id)nullValue { + return [NSNull null]; +} + +#pragma mark Additional Properties + +- (id)additionalPropertyForName:(NSString *)name { + // Return the cached object, if any, before creating one. + id result = [self cacheChildForKey:name]; + if (result != nil) { + return result; + } + + Class defaultClass = [[self class] classForAdditionalProperties]; + id jsonObj = [self JSONValueForKey:name]; + BOOL shouldCache = NO; + if (jsonObj != nil) { + NSDictionary *surrogates = self.surrogates; + result = [GTLRuntimeCommon objectFromJSON:jsonObj + defaultClass:defaultClass + surrogates:surrogates + isCacheable:&shouldCache]; + } + + [self setCacheChild:(shouldCache ? result : nil) + forKey:name]; + return result; +} + +- (void)setAdditionalProperty:(id)obj forName:(NSString *)name { + BOOL shouldCache = NO; + Class defaultClass = [[self class] classForAdditionalProperties]; + id json = [GTLRuntimeCommon jsonFromAPIObject:obj + expectedClass:defaultClass + isCacheable:&shouldCache]; + [self setJSONValue:json forKey:name]; + [self setCacheChild:(shouldCache ? obj : nil) + forKey:name]; +} + +- (NSDictionary *)additionalProperties { + NSMutableDictionary *result = [NSMutableDictionary dictionary]; + + NSArray *propertyNames = [self additionalJSONKeys]; + for (NSString *name in propertyNames) { + id obj = [self additionalPropertyForName:name]; + [result setObject:obj forKey:name]; + } + + return result; +} + +#pragma mark Child Cache methods + +// There is no property for childCache_ as there shouldn't be KVC/KVO +// support for it, it's an implementation detail. + +- (void)setCacheChild:(id)obj forKey:(NSString *)key { + if (childCache_ == nil && obj != nil) { + childCache_ = [[NSMutableDictionary alloc] initWithObjectsAndKeys: + obj, key, nil]; + } else { + [childCache_ setValue:obj forKey:key]; + } +} + +- (id)cacheChildForKey:(NSString *)key { + id obj = [childCache_ objectForKey:key]; + return obj; +} + +#pragma mark userData and user properties + +- (void)setUserData:(id)userData { + [self setProperty:userData forKey:kUserDataPropertyKey]; +} + +- (id)userData { + // be sure the returned pointer has the life of the autorelease pool, + // in case self is released immediately + return [[[self propertyForKey:kUserDataPropertyKey] retain] autorelease]; +} + +- (void)setProperty:(id)obj forKey:(NSString *)key { + if (obj == nil) { + // user passed in nil, so delete the property + [userProperties_ removeObjectForKey:key]; + } else { + // be sure the property dictionary exists + if (userProperties_ == nil) { + self.userProperties = [NSMutableDictionary dictionary]; + } + [userProperties_ setObject:obj forKey:key]; + } +} + +- (id)propertyForKey:(NSString *)key { + id obj = [userProperties_ objectForKey:key]; + + // be sure the returned pointer has the life of the autorelease pool, + // in case self is released immediately + return [[obj retain] autorelease]; +} + +#pragma mark Support methods + ++ (NSMutableArray *)allDeclaredProperties { + NSMutableArray *array = [NSMutableArray array]; + + // walk from this class up the hierarchy to GTLObject + Class topClass = class_getSuperclass([GTLObject class]); + for (Class currClass = self; + currClass != topClass; + currClass = class_getSuperclass(currClass)) { + // step through this class's properties, and add the property names to the + // array + objc_property_t *properties = class_copyPropertyList(currClass, NULL); + if (properties) { + for (objc_property_t *prop = properties; + *prop != NULL; + ++prop) { + const char *propName = property_getName(*prop); + // We only want dynamic properties; their attributes contain ",D". + const char *attr = property_getAttributes(*prop); + const char *dynamicMarker = strstr(attr, ",D"); + if (dynamicMarker && + (dynamicMarker[2] == 0 || dynamicMarker[2] == ',' )) { + [array addObject:[NSString stringWithUTF8String:propName]]; + } + } + free(properties); + } + } + return array; +} + ++ (NSArray *)allKnownKeys { + NSArray *allProps = [self allDeclaredProperties]; + NSMutableArray *knownKeys = [NSMutableArray arrayWithArray:allProps]; + + NSDictionary *propMap = [GTLObject propertyToJSONKeyMapForClass:[self class]]; + + NSUInteger idx = 0; + for (NSString *propName in allProps) { + NSString *jsonKey = [propMap objectForKey:propName]; + if (jsonKey) { + [knownKeys replaceObjectAtIndex:idx + withObject:jsonKey]; + } + ++idx; + } + return knownKeys; +} + +- (NSString *)description { + // find the list of declared and otherwise known JSON keys for this class + NSArray *knownKeys = [[self class] allKnownKeys]; + + NSMutableString *descStr = [NSMutableString string]; + + NSString *spacer = @""; + for (NSString *key in json_) { + NSString *value = nil; + // show question mark for JSON keys not supported by a declared property: + // foo?:"Hi mom." + NSString *qmark = [knownKeys containsObject:key] ? @"" : @"?"; + + // determine property value to dislay + id rawValue = [json_ valueForKey:key]; + if ([rawValue isKindOfClass:[NSDictionary class]]) { + // for dictionaries, show the list of keys: + // {key1,key2,key3} + NSString *subkeyList = [[rawValue allKeys] componentsJoinedByString:@","]; + value = [NSString stringWithFormat:@"{%@}", subkeyList]; + } else if ([rawValue isKindOfClass:[NSArray class]]) { + // for arrays, show the number of items in the array: + // [3] + value = [NSString stringWithFormat:@"[%lu]", (unsigned long)[(NSArray *)rawValue count]]; + } else if ([rawValue isKindOfClass:[NSString class]]) { + // for strings, show the string in quotes: + // "Hi mom." + value = [NSString stringWithFormat:@"\"%@\"", rawValue]; + } else { + // for numbers, show just the number + value = [rawValue description]; + } + [descStr appendFormat:@"%@%@%@:%@", spacer, key, qmark, value]; + spacer = @" "; + } + + NSString *str = [NSString stringWithFormat:@"%@ %p: {%@}", + [self class], self, descStr]; + return str; +} + +#pragma mark Class Registration + +static NSMutableDictionary *gKindMap = nil; + ++ (Class)registeredObjectClassForKind:(NSString *)kind { + Class resultClass = [gKindMap objectForKey:kind]; + return resultClass; +} + ++ (void)registerObjectClassForKind:(NSString *)kind { + // there's no autorelease pool in place at +load time, so we'll create our own + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + if (gKindMap == nil) { + gKindMap = [GTLUtilities newStaticDictionary]; + } + + Class selfClass = [self class]; + +#if DEBUG + // ensure this is a unique registration + if ([gKindMap objectForKey:kind] != nil ) { + GTL_DEBUG_LOG(@"%@ (%@) registration conflicts with %@", + selfClass, kind, [gKindMap objectForKey:kind]); + } + if ([[gKindMap allKeysForObject:selfClass] count] != 0) { + GTL_DEBUG_LOG(@"%@ (%@) registration conflicts with %@", + selfClass, kind, [gKindMap allKeysForObject:selfClass]); + } +#endif + + [gKindMap setValue:selfClass forKey:kind]; + + // we drain here to keep the clang static analyzer quiet + [pool drain]; +} + +#pragma mark Object Instantiation + ++ (GTLObject *)objectForJSON:(NSMutableDictionary *)json + defaultClass:(Class)defaultClass + surrogates:(NSDictionary *)surrogates + batchClassMap:(NSDictionary *)batchClassMap { + if ([json count] == 0 || [json isEqual:[NSNull null]]) { + // no actual result, such as the response from a delete + return nil; + } + + // Determine the class to instantiate, based on the original fetch + // request or by looking up "kind" string from the registration at + // +load time of GTLObject subclasses + // + // We're letting the dynamic kind override the default class so + // feeds of heterogenous entries can use the defaultClass as a + // fallback + Class classToCreate = defaultClass; + NSString *kind = nil; + if ([json isKindOfClass:[NSDictionary class]]) { + kind = [json valueForKey:@"kind"]; + if ([kind isKindOfClass:[NSString class]] && [kind length] > 0) { + Class dynamicClass = [GTLObject registeredObjectClassForKind:kind]; + if (dynamicClass) { + classToCreate = dynamicClass; + } + } + } + + // Warn the developer that no specific class of GTLObject + // was requested with the fetch call, and no class is found + // compiled in to match the "kind" attribute of the JSON + // returned by the server + GTL_ASSERT(classToCreate != nil, + @"Could not find registered GTLObject subclass to " + "match JSON with kind \"%@\"", kind); + + if (classToCreate == nil) { + classToCreate = [self class]; + } + + // See if the top-level class for the JSON is listed in the surrogates; + // if so, instantiate the surrogate class instead + Class baseSurrogate = [surrogates objectForKey:classToCreate]; + if (baseSurrogate) { + classToCreate = baseSurrogate; + } + + // now instantiate the GTLObject + GTLObject *parsedObject = [classToCreate object]; + + parsedObject.surrogates = surrogates; + parsedObject.JSON = json; + + // it's time to instantiate inner items + if ([parsedObject conformsToProtocol:@protocol(GTLBatchItemCreationProtocol)]) { + id batch = + (id ) parsedObject; + [batch createItemsWithClassMap:batchClassMap]; + } + + return parsedObject; +} + +#pragma mark Runtime Utilities + +static NSMutableDictionary *gJSONKeyMapCache = nil; +static NSMutableDictionary *gArrayPropertyToClassMapCache = nil; + ++ (void)initialize { + // Note that initialize is guaranteed by the runtime to be called in a + // thread-safe manner + if (gJSONKeyMapCache == nil) { + gJSONKeyMapCache = [GTLUtilities newStaticDictionary]; + } + if (gArrayPropertyToClassMapCache == nil) { + gArrayPropertyToClassMapCache = [GTLUtilities newStaticDictionary]; + } +} + ++ (NSDictionary *)propertyToJSONKeyMapForClass:(Class)aClass { + NSDictionary *resultMap = + [GTLUtilities mergedClassDictionaryForSelector:@selector(propertyToJSONKeyMap) + startClass:aClass + ancestorClass:[GTLObject class] + cache:gJSONKeyMapCache]; + return resultMap; +} + ++ (NSDictionary *)arrayPropertyToClassMapForClass:(Class)aClass { + NSDictionary *resultMap = + [GTLUtilities mergedClassDictionaryForSelector:@selector(arrayPropertyToClassMap) + startClass:aClass + ancestorClass:[GTLObject class] + cache:gArrayPropertyToClassMapCache]; + return resultMap; +} + +#pragma mark Runtime Support + ++ (Class)ancestorClass { + return [GTLObject class]; +} + ++ (BOOL)resolveInstanceMethod:(SEL)sel { + BOOL resolved = [GTLRuntimeCommon resolveInstanceMethod:sel onClass:self]; + if (resolved) + return YES; + + return [super resolveInstanceMethod:sel]; +} + +@end + +@implementation GTLCollectionObject +// Subclasses must implement the items method dynamically. + +- (void)dealloc { + [identifierMap_ release]; + [super dealloc]; +} + +- (id)itemAtIndex:(NSUInteger)idx { + NSArray *items = [self performSelector:@selector(items)]; + if (idx < [items count]) { + return [items objectAtIndex:idx]; + } + return nil; +} + +- (id)objectAtIndexedSubscript:(NSInteger)idx { + if (idx >= 0) { + return [self itemAtIndex:(NSUInteger)idx]; + } + return nil; +} + +- (id)itemForIdentifier:(NSString *)key { + if (identifierMap_ == nil) { + NSArray *items = [self performSelector:@selector(items)]; + NSMutableDictionary *dict = + [NSMutableDictionary dictionaryWithCapacity:[items count]]; + for (id item in items) { + id identifier = [item valueForKey:@"identifier"]; + if (identifier != nil && identifier != [NSNull null]) { + if ([dict objectForKey:identifier] == nil) { + [dict setObject:item forKey:identifier]; + } + } + } + identifierMap_ = [dict copy]; + } + return [identifierMap_ objectForKey:key]; +} + +- (void)resetIdentifierMap { + [identifierMap_ release]; + identifierMap_ = nil; +} + +// NSFastEnumeration protocol +- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state + objects:(id *)stackbuf + count:(NSUInteger)len { + NSArray *items = [self performSelector:@selector(items)]; + NSUInteger result = [items countByEnumeratingWithState:state + objects:stackbuf + count:len]; + return result; +} + +@end + +@implementation GTLResultArray + +- (NSArray *)itemsWithItemClass:(Class)itemClass { + // Return the cached array before creating on demand. + NSString *cacheKey = @"result_array_items"; + NSMutableArray *cachedArray = [self cacheChildForKey:cacheKey]; + if (cachedArray != nil) { + return cachedArray; + } + NSArray *result = nil; + NSArray *array = (NSArray *)[self JSON]; + if (array != nil) { + if ([array isKindOfClass:[NSArray class]]) { + NSDictionary *surrogates = self.surrogates; + result = [GTLRuntimeCommon objectFromJSON:array + defaultClass:itemClass + surrogates:surrogates + isCacheable:NULL]; + } else { +#if DEBUG + if (![array isKindOfClass:[NSNull class]]) { + GTL_DEBUG_LOG(@"GTLObject: unexpected JSON: %@ should be an array, actually is a %@:\n%@", + NSStringFromClass([self class]), + NSStringFromClass([array class]), + array); + } +#endif + result = array; + } + } + + [self setCacheChild:result forKey:cacheKey]; + return result; +} + +@end diff --git a/GTL/Source/Objects/GTLQuery.h b/GTL/Source/Objects/GTLQuery.h new file mode 100644 index 0000000..7b9f813 --- /dev/null +++ b/GTL/Source/Objects/GTLQuery.h @@ -0,0 +1,135 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQuery.h +// + +// Query documentation: +// https://code.google.com/p/google-api-objectivec-client/wiki/Introduction#Query_Operations + +#import "GTLObject.h" +#import "GTLUploadParameters.h" + +@protocol GTLQueryProtocol +- (BOOL)isBatchQuery; +- (BOOL)shouldSkipAuthorization; +- (void)executionDidStop; +- (NSDictionary *)additionalHTTPHeaders; +- (GTLUploadParameters *)uploadParameters; +@end + +@protocol GTLQueryCollectionProtocol +@optional +@property (retain) NSString *pageToken; +@property (retain) NSNumber *startIndex; +@end + +@class GTLServiceTicket; + +@interface GTLQuery : NSObject { + @private + NSString *methodName_; + NSMutableDictionary *json_; + GTLObject *bodyObject_; + NSMutableDictionary *childCache_; + NSString *requestID_; + GTLUploadParameters *uploadParameters_; + NSDictionary *urlQueryParameters_; + NSDictionary *additionalHTTPHeaders_; + Class expectedObjectClass_; + BOOL skipAuthorization_; +#if NS_BLOCKS_AVAILABLE + void (^completionBlock_)(GTLServiceTicket *ticket, id object, NSError *error); +#elif !__LP64__ + // Placeholders: for 32-bit builds, keep the size of the object's ivar section + // the same with and without blocks + id completionPlaceholder_; +#endif +} + +// The rpc method name. +@property (readonly) NSString *methodName; + +// The JSON dictionary of all the parameters set on this query. +@property (retain) NSMutableDictionary *JSON; + +// The object set to be uploaded with the query. +@property (retain) GTLObject *bodyObject; + +// Each query must have a request ID string. The user may replace the +// default assigned request ID with a custom string, provided that if +// used in a batch query, all request IDs in the batch must be unique. +@property (copy) NSString *requestID; + +// For queries which support file upload, the MIME type and file handle +// or data must be provided. +@property (copy) GTLUploadParameters *uploadParameters; + +// Any url query parameters to add to the query (useful for debugging with some +// services). +@property (copy) NSDictionary *urlQueryParameters; + +// Any additional HTTP headers for this query. Not valid when this query +// is added to a batch. +// +// These headers override the same keys from the service object's +// additionalHTTPHeaders. +@property (copy) NSDictionary *additionalHTTPHeaders; + +// The GTLObject subclass expected for results (used if the result doesn't +// include a kind attribute). +@property (assign) Class expectedObjectClass; + +// Clients may set this to YES to disallow authorization. Defaults to NO. +@property (assign) BOOL shouldSkipAuthorization; + +#if NS_BLOCKS_AVAILABLE +// Clients may provide an optional callback block to be called immediately +// before the executeQuery: callback. +// +// The completionBlock property is particularly useful for queries executed +// in a batch. +// +// Errors passed to the completionBlock will have an "underlying" GTLErrorObject +// when the server returned an error for this specific query: +// +// GTLErrorObject *errorObj = [GTLErrorObject underlyingObjectForError:error]; +// if (errorObj) { +// // the server returned this error for this specific query +// } else { +// // the batch execution failed +// } +@property (copy) void (^completionBlock)(GTLServiceTicket *ticket, id object, NSError *error); +#endif + +// methodName is the RPC method name to use. ++ (id)queryWithMethodName:(NSString *)methodName; + +// methodName is the RPC method name to use. +- (id)initWithMethodName:(NSString *)method; + +// If you need to set a parameter that is not listed as a property for a +// query class, you can do so via this api. If you need to clear it after +// setting, pass nil for obj. +- (void)setCustomParameter:(id)obj forKey:(NSString *)key; + +// Auto-generated request IDs ++ (NSString *)nextRequestID; + +// Methods for subclasses to override. ++ (NSDictionary *)parameterNameMap; ++ (NSDictionary *)arrayPropertyToClassMap; +@end diff --git a/GTL/Source/Objects/GTLQuery.m b/GTL/Source/Objects/GTLQuery.m new file mode 100644 index 0000000..55f9822 --- /dev/null +++ b/GTL/Source/Objects/GTLQuery.m @@ -0,0 +1,267 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQuery.m +// + +#include + +#import "GTLQuery.h" +#import "GTLRuntimeCommon.h" +#import "GTLUtilities.h" + +@interface GTLQuery () +@end + +@implementation GTLQuery + +// Implementation Note: bodyObject could be done as a dynamic property and map +// it to the key "resource". But we expose the object on the ServiceTicket +// for developers, and so sending it through the plumbing already in the +// parameters and outside of that gets into a grey area. For requests sent +// via this class, we don't need to touch the JSON, but for developers that +// have to use the lower level apis for something we'd need to know to add +// it to the JSON. + +@synthesize methodName = methodName_, + JSON = json_, + bodyObject = bodyObject_, + requestID = requestID_, + uploadParameters = uploadParameters_, + urlQueryParameters = urlQueryParameters_, + additionalHTTPHeaders = additionalHTTPHeaders_, + expectedObjectClass = expectedObjectClass_, + shouldSkipAuthorization = skipAuthorization_; + +#if NS_BLOCKS_AVAILABLE +@synthesize completionBlock = completionBlock_; +#endif + ++ (id)queryWithMethodName:(NSString *)methodName { + return [[[self alloc] initWithMethodName:methodName] autorelease]; +} + +- (id)initWithMethodName:(NSString *)methodName { + self = [super init]; + if (self) { + requestID_ = [[[self class] nextRequestID] retain]; + + methodName_ = [methodName copy]; + if ([methodName_ length] == 0) { + [self release]; + self = nil; + } + } + return self; +} + +- (void)dealloc { + [methodName_ release]; + [json_ release]; + [bodyObject_ release]; + [childCache_ release]; + [requestID_ release]; + [uploadParameters_ release]; + [urlQueryParameters_ release]; + [additionalHTTPHeaders_ release]; +#if NS_BLOCKS_AVAILABLE + [completionBlock_ release]; +#endif + + [super dealloc]; +} + + +- (id)copyWithZone:(NSZone *)zone { + GTLQuery *query = + [[[self class] allocWithZone:zone] initWithMethodName:self.methodName]; + + if ([json_ count] > 0) { + // Deep copy the parameters + CFPropertyListRef ref = CFPropertyListCreateDeepCopy(kCFAllocatorDefault, + json_, kCFPropertyListMutableContainers); + query.JSON = [NSMakeCollectable(ref) autorelease]; + } + query.bodyObject = self.bodyObject; + query.requestID = self.requestID; + query.uploadParameters = self.uploadParameters; + query.urlQueryParameters = self.urlQueryParameters; + query.additionalHTTPHeaders = self.additionalHTTPHeaders; + query.expectedObjectClass = self.expectedObjectClass; + query.shouldSkipAuthorization = self.shouldSkipAuthorization; +#if NS_BLOCKS_AVAILABLE + query.completionBlock = self.completionBlock; +#endif + return query; +} + +- (NSString *)description { + NSArray *keys = [self.JSON allKeys]; + NSArray *params = [keys sortedArrayUsingSelector:@selector(compare:)]; + NSString *paramsSummary = @""; + if ([params count] > 0) { + paramsSummary = [NSString stringWithFormat:@" params:(%@)", + [params componentsJoinedByString:@","]]; + } + + keys = [self.urlQueryParameters allKeys]; + NSArray *urlQParams = [keys sortedArrayUsingSelector:@selector(compare:)]; + NSString *urlQParamsSummary = @""; + if ([urlQParams count] > 0) { + urlQParamsSummary = [NSString stringWithFormat:@" urlQParams:(%@)", + [urlQParams componentsJoinedByString:@","]]; + } + + GTLObject *bodyObj = self.bodyObject; + NSString *bodyObjSummary = @""; + if (bodyObj != nil) { + bodyObjSummary = [NSString stringWithFormat:@" bodyObject:%@", [bodyObj class]]; + } + + NSString *uploadStr = @""; + GTLUploadParameters *uploadParams = self.uploadParameters; + if (uploadParams) { + uploadStr = [NSString stringWithFormat:@" %@", uploadParams]; + } + + return [NSString stringWithFormat:@"%@ %p: {method:%@%@%@%@%@}", + [self class], self, self.methodName, + paramsSummary, urlQParamsSummary, bodyObjSummary, uploadStr]; +} + +- (void)setCustomParameter:(id)obj forKey:(NSString *)key { + [self setJSONValue:obj forKey:key]; +} + +- (BOOL)isBatchQuery { + return NO; +} + +- (void)executionDidStop { +#if NS_BLOCKS_AVAILABLE + self.completionBlock = nil; +#endif +} + ++ (NSString *)nextRequestID { + static unsigned long lastRequestID = 0; + NSString *result; + + @synchronized([GTLQuery class]) { + ++lastRequestID; + result = [NSString stringWithFormat:@"gtl_%lu", + (unsigned long) lastRequestID]; + } + return result; +} + +#pragma mark GTLRuntimeCommon Support + +- (void)setJSONValue:(id)obj forKey:(NSString *)key { + NSMutableDictionary *dict = self.JSON; + if (dict == nil && obj != nil) { + dict = [NSMutableDictionary dictionaryWithCapacity:1]; + self.JSON = dict; + } + [dict setValue:obj forKey:key]; +} + +- (id)JSONValueForKey:(NSString *)key { + id obj = [self.JSON objectForKey:key]; + return obj; +} + +// There is no property for childCache_ as there shouldn't be KVC/KVO +// support for it, it's an implementation detail. + +- (void)setCacheChild:(id)obj forKey:(NSString *)key { + if (childCache_ == nil && obj != nil) { + childCache_ = + [[NSMutableDictionary alloc] initWithObjectsAndKeys:obj, key, nil]; + } else { + [childCache_ setValue:obj forKey:key]; + } +} + +- (id)cacheChildForKey:(NSString *)key { + id obj = [childCache_ objectForKey:key]; + return obj; +} + +#pragma mark Methods for Subclasses to Override + ++ (NSDictionary *)parameterNameMap { + return nil; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + return nil; +} + +#pragma mark Runtime Utilities + +static NSMutableDictionary *gParameterNameMapCache = nil; +static NSMutableDictionary *gArrayPropertyToClassMapCache = nil; + ++ (void)initialize { + // note that initialize is guaranteed by the runtime to be called in a + // thread-safe manner + if (gParameterNameMapCache == nil) { + gParameterNameMapCache = [GTLUtilities newStaticDictionary]; + } + if (gArrayPropertyToClassMapCache == nil) { + gArrayPropertyToClassMapCache = [GTLUtilities newStaticDictionary]; + } +} + ++ (NSDictionary *)propertyToJSONKeyMapForClass:(Class)aClass { + NSDictionary *resultMap = + [GTLUtilities mergedClassDictionaryForSelector:@selector(parameterNameMap) + startClass:aClass + ancestorClass:[GTLQuery class] + cache:gParameterNameMapCache]; + return resultMap; +} + ++ (NSDictionary *)arrayPropertyToClassMapForClass:(Class)aClass { + NSDictionary *resultMap = + [GTLUtilities mergedClassDictionaryForSelector:@selector(arrayPropertyToClassMap) + startClass:aClass + ancestorClass:[GTLQuery class] + cache:gArrayPropertyToClassMapCache]; + return resultMap; +} + +#pragma mark Runtime Support + +- (NSDictionary *)surrogates { + // Stub method just needed for RumtimeCommon, query doesn't use surrogates. + return nil; +} + ++ (Class)ancestorClass { + return [GTLQuery class]; +} + ++ (BOOL)resolveInstanceMethod:(SEL)sel { + BOOL resolved = [GTLRuntimeCommon resolveInstanceMethod:sel onClass:self]; + if (resolved) + return YES; + + return [super resolveInstanceMethod:sel]; +} + +@end diff --git a/GTL/Source/Objects/GTLRuntimeCommon.h b/GTL/Source/Objects/GTLRuntimeCommon.h new file mode 100644 index 0000000..28822b5 --- /dev/null +++ b/GTL/Source/Objects/GTLRuntimeCommon.h @@ -0,0 +1,57 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLRuntimeCommon.h +// + + +#import + +#import "GTLDefines.h" + +// This protocol and support class are an internal implementation detail so +// GTLObject and GTLQuery can share some code. + +@protocol GTLRuntimeCommon +@required +// Get/Set properties +- (void)setJSONValue:(id)obj forKey:(NSString *)key; +- (id)JSONValueForKey:(NSString *)key; +// Child cache +- (void)setCacheChild:(id)obj forKey:(NSString *)key; +- (id)cacheChildForKey:(NSString *)key; +// Surrogate class mappings. +- (NSDictionary *)surrogates; +// Key map ++ (NSDictionary *)propertyToJSONKeyMapForClass:(Class)aClass; +// Array item types ++ (NSDictionary *)arrayPropertyToClassMapForClass:(Class)aClass; +// The parent class for dynamic support ++ (Class)ancestorClass; +@end + +@interface GTLRuntimeCommon : NSObject +// Wire things up. ++ (BOOL)resolveInstanceMethod:(SEL)sel onClass:(Class)onClass; +// Helpers ++ (id)objectFromJSON:(id)json + defaultClass:(Class)defaultClass + surrogates:(NSDictionary *)surrogates + isCacheable:(BOOL*)isCacheable; ++ (id)jsonFromAPIObject:(id)obj + expectedClass:(Class)expectedClass + isCacheable:(BOOL*)isCacheable; +@end diff --git a/GTL/Source/Objects/GTLRuntimeCommon.m b/GTL/Source/Objects/GTLRuntimeCommon.m new file mode 100644 index 0000000..5f6613d --- /dev/null +++ b/GTL/Source/Objects/GTLRuntimeCommon.m @@ -0,0 +1,1141 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLRuntimeCommon.m +// + +#include + +#import "GTLRuntimeCommon.h" + +#import "GTLDateTime.h" +#import "GTLObject.h" +#import "GTLUtilities.h" + +static NSString *const kReturnClassKey = @"returnClass"; +static NSString *const kContainedClassKey = @"containedClass"; +static NSString *const kJSONKey = @"jsonKey"; + +// Note: NSObject's class is used as a marker for the expected/default class +// when Discovery says it can be any type of object. + +@implementation GTLRuntimeCommon + +// Helper to generically convert JSON to an api object type. ++ (id)objectFromJSON:(id)json + defaultClass:(Class)defaultClass + surrogates:(NSDictionary *)surrogates + isCacheable:(BOOL*)isCacheable { + id result = nil; + BOOL canBeCached = YES; + + // TODO(TVL): use defaultClass to validate things like expectedClass is + // done in jsonFromAPIObject:expectedClass:isCacheable:? + + if ([json isKindOfClass:[NSDictionary class]]) { + // If no default, or the default was any object, then default to base + // object here (and hope there is a kind to get the right thing). + if ((defaultClass == Nil) || [defaultClass isEqual:[NSObject class]]) { + defaultClass = [GTLObject class]; + } + result = [GTLObject objectForJSON:json + defaultClass:defaultClass + surrogates:surrogates + batchClassMap:nil]; + } else if ([json isKindOfClass:[NSArray class]]) { + NSArray *jsonArray = json; + // make an object for each JSON dictionary in the array + NSMutableArray *resultArray = [NSMutableArray arrayWithCapacity:[jsonArray count]]; + for (id jsonItem in jsonArray) { + id item = [self objectFromJSON:jsonItem + defaultClass:defaultClass + surrogates:surrogates + isCacheable:NULL]; + [resultArray addObject:item]; + } + result = resultArray; + } else if ([json isKindOfClass:[NSString class]]) { + // DateTimes live in JSON as strings, so convert + if ([defaultClass isEqual:[GTLDateTime class]]) { + result = [GTLDateTime dateTimeWithRFC3339String:json]; + } else { + result = json; + canBeCached = NO; + } + } else if ([json isKindOfClass:[NSNumber class]] || + [json isKindOfClass:[NSNull class]]) { + result = json; + canBeCached = NO; + } else { + GTL_DEBUG_LOG(@"GTLRuntimeCommon: unsupported class '%s' in objectFromJSON", + class_getName([json class])); + } + + if (isCacheable) { + *isCacheable = canBeCached; + } + return result; +} + +// Helper to generically convert an api object type to JSON. +// |expectedClass| is the type that was expected for |obj|. ++ (id)jsonFromAPIObject:(id)obj + expectedClass:(Class)expectedClass + isCacheable:(BOOL*)isCacheable { + id result = nil; + BOOL canBeCached = YES; + BOOL checkExpected = (expectedClass != Nil); + + if ([obj isKindOfClass:[NSString class]]) { + result = [[obj copy] autorelease]; + canBeCached = NO; + } else if ([obj isKindOfClass:[NSNumber class]] || + [obj isKindOfClass:[NSNull class]]) { + result = obj; + canBeCached = NO; + } else if ([obj isKindOfClass:[GTLObject class]]) { + result = [obj JSON]; + if (result == nil) { + // adding an empty object; it should have a JSON dictionary so it can + // hold future assignments + [obj setJSON:[NSMutableDictionary dictionary]]; + result = [obj JSON]; + } + } else if ([obj isKindOfClass:[NSArray class]]) { + checkExpected = NO; + NSArray *array = obj; + // get the JSON for each thing in the array + NSMutableArray *resultArray = [NSMutableArray arrayWithCapacity:[array count]]; + for (id item in array) { + id itemJSON = [self jsonFromAPIObject:item + expectedClass:expectedClass + isCacheable:NULL]; + [resultArray addObject:itemJSON]; + } + result = resultArray; + } else if ([obj isKindOfClass:[GTLDateTime class]]) { + // DateTimes live in JSON as strings, so convert. + GTLDateTime *dateTime = obj; + result = [dateTime stringValue]; + } else { + checkExpected = NO; + GTL_DEBUG_LOG(@"GTLRuntimeCommon: unsupported class '%s' in jsonFromAPIObject", + class_getName([obj class])); + } + + if (checkExpected) { + // If the default was any object, then clear it to skip validation checks. + if ([expectedClass isEqual:[NSObject class]] || + [obj isKindOfClass:[NSNull class]]) { + expectedClass = nil; + } + if (expectedClass && ![obj isKindOfClass:expectedClass]) { + GTL_DEBUG_LOG(@"GTLRuntimeCommon: jsonFromAPIObject expected class '%s' instead got '%s'", + class_getName(expectedClass), class_getName([obj class])); + } + } + + if (isCacheable) { + *isCacheable = canBeCached; + } + return result; +} + +#pragma mark JSON/Object Utilities + +static NSMutableDictionary *gDispatchCache = nil; + +static CFStringRef SelectorKeyCopyDescriptionCallBack(const void *key) { + // Make a CFString from the key + NSString *name = NSStringFromSelector((SEL) key); + CFStringRef str = CFStringCreateCopy(kCFAllocatorDefault, (CFStringRef) name); + return str; +} + +// Save the dispatch details for the specified class and selector ++ (void)setStoredDispatchForClass:(Class)dispatchClass + selector:(SEL)sel + returnClass:(Class)returnClass + containedClass:(Class)containedClass + jsonKey:(NSString *)jsonKey { + // cache structure: + // class -> + // selector -> + // returnClass + // containedClass + // jsonKey + @synchronized([GTLRuntimeCommon class]) { + if (gDispatchCache == nil) { + gDispatchCache = [GTLUtilities newStaticDictionary]; + } + + CFMutableDictionaryRef classDict = + (CFMutableDictionaryRef) [gDispatchCache objectForKey:dispatchClass]; + if (classDict == nil) { + // We create a CFDictionary since the keys are raw selectors rather than + // NSStrings + const CFDictionaryKeyCallBacks keyCallBacks = { + .version = 0, + .retain = NULL, + .release = NULL, + .copyDescription = SelectorKeyCopyDescriptionCallBack, + .equal = NULL, // defaults to pointer comparison + .hash = NULL // defaults to the pointer value + }; + const CFIndex capacity = 0; // no limit + classDict = CFDictionaryCreateMutable(kCFAllocatorDefault, capacity, + &keyCallBacks, + &kCFTypeDictionaryValueCallBacks); + [gDispatchCache setObject:(id)classDict + forKey:(id)dispatchClass]; + CFRelease(classDict); + } + + NSDictionary *selDict = (NSDictionary *)CFDictionaryGetValue(classDict, sel); + if (selDict == nil) { + selDict = [NSDictionary dictionaryWithObjectsAndKeys: + jsonKey, kJSONKey, + returnClass, kReturnClassKey, // can be nil (primitive types) + containedClass, kContainedClassKey, // may be nil + nil]; + CFDictionarySetValue(classDict, sel, selDict); + } else { + // we already have a dictionary for this selector on this class, which is + // surprising + GTL_DEBUG_LOG(@"Storing duplicate dispatch for %@ selector %@", + dispatchClass, NSStringFromSelector(sel)); + } + } +} + ++ (BOOL)getStoredDispatchForClass:(Class)dispatchClass + selector:(SEL)sel + returnClass:(Class *)outReturnClass + containedClass:(Class *)outContainedClass + jsonKey:(NSString **)outJsonKey { + @synchronized([GTLRuntimeCommon class]) { + // walk from this class up the hierarchy to the ancestor class + Class topClass = class_getSuperclass([dispatchClass ancestorClass]); + for (Class currClass = dispatchClass; + currClass != topClass; + currClass = class_getSuperclass(currClass)) { + + CFMutableDictionaryRef classDict = + (CFMutableDictionaryRef) [gDispatchCache objectForKey:currClass]; + if (classDict) { + NSMutableDictionary *selDict = + (NSMutableDictionary *) CFDictionaryGetValue(classDict, sel); + if (selDict) { + if (outReturnClass) { + *outReturnClass = [selDict objectForKey:kReturnClassKey]; + } + if (outContainedClass) { + *outContainedClass = [selDict objectForKey:kContainedClassKey]; + } + if (outJsonKey) { + *outJsonKey = [selDict objectForKey:kJSONKey]; + } + return YES; + } + } + } + } + GTL_DEBUG_LOG(@"Failed to find stored dispatch info for %@ %s", + dispatchClass, sel_getName(sel)); + return NO; +} + +#pragma mark IMPs - getters and setters for specific object types + +#if !__LP64__ + +// NSInteger on 32bit +static NSInteger DynamicInteger32Getter(id self, SEL sel) { + // get an NSInteger (NSNumber) from the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [self JSONValueForKey:jsonKey]; + num = GTL_EnsureNSNumber(num); + NSInteger result = [num integerValue]; + return result; + } + return 0; +} + +static void DynamicInteger32Setter(id self, SEL sel, NSInteger val) { + // save an NSInteger (NSNumber) into the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [NSNumber numberWithInteger:val]; + [self setJSONValue:num forKey:jsonKey]; + } +} + +// NSUInteger on 32bit +static NSUInteger DynamicUInteger32Getter(id self, SEL sel) { + // get an NSUInteger (NSNumber) from the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [self JSONValueForKey:jsonKey]; + num = GTL_EnsureNSNumber(num); + NSUInteger result = [num unsignedIntegerValue]; + return result; + } + return 0; +} + +static void DynamicUInteger32Setter(id self, SEL sel, NSUInteger val) { + // save an NSUInteger (NSNumber) into the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [NSNumber numberWithUnsignedInteger:val]; + [self setJSONValue:num forKey:jsonKey]; + } +} + +#endif // !__LP64__ + +// NSInteger on 64bit, long long on 32bit and 64bit +static long long DynamicLongLongGetter(id self, SEL sel) { + // get a long long (NSNumber) from the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [self JSONValueForKey:jsonKey]; + num = GTL_EnsureNSNumber(num); + long long result = [num longLongValue]; + return result; + } + return 0; +} + +static void DynamicLongLongSetter(id self, SEL sel, long long val) { + // save a long long (NSNumber) into the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [NSNumber numberWithLongLong:val]; + [self setJSONValue:num forKey:jsonKey]; + } +} + +// NSUInteger on 64bit, unsiged long long on 32bit and 64bit +static unsigned long long DynamicULongLongGetter(id self, SEL sel) { + // get an unsigned long long (NSNumber) from the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [self JSONValueForKey:jsonKey]; + num = GTL_EnsureNSNumber(num); + unsigned long long result = [num unsignedLongLongValue]; + return result; + } + return 0; +} + +static void DynamicULongLongSetter(id self, SEL sel, unsigned long long val) { + // save an unsigned long long (NSNumber) into the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [NSNumber numberWithUnsignedLongLong:val]; + [self setJSONValue:num forKey:jsonKey]; + } +} + +// float +static float DynamicFloatGetter(id self, SEL sel) { + // get a float (NSNumber) from the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [self JSONValueForKey:jsonKey]; + num = GTL_EnsureNSNumber(num); + float result = [num floatValue]; + return result; + } + return 0.0f; +} + +static void DynamicFloatSetter(id self, SEL sel, float val) { + // save a float (NSNumber) into the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [NSNumber numberWithFloat:val]; + [self setJSONValue:num forKey:jsonKey]; + } +} + +// double +static double DynamicDoubleGetter(id self, SEL sel) { + // get a double (NSNumber) from the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [self JSONValueForKey:jsonKey]; + num = GTL_EnsureNSNumber(num); + double result = [num doubleValue]; + return result; + } + return 0.0; +} + +static void DynamicDoubleSetter(id self, SEL sel, double val) { + // save a double (NSNumber) into the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [NSNumber numberWithDouble:val]; + [self setJSONValue:num forKey:jsonKey]; + } +} + +// BOOL +static BOOL DynamicBooleanGetter(id self, SEL sel) { + // get a BOOL (NSNumber) from the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [self JSONValueForKey:jsonKey]; + BOOL flag = [num boolValue]; + return flag; + } + return NO; +} + +static void DynamicBooleanSetter(id self, SEL sel, BOOL val) { + // save a BOOL (NSNumber) into the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSNumber *num = [NSNumber numberWithBool:val]; + [self setJSONValue:num forKey:jsonKey]; + } +} + +// NSString +static NSString *DynamicStringGetter(id self, SEL sel) { + // get an NSString from the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + + NSString *str = [self JSONValueForKey:jsonKey]; + return str; + } + return nil; +} + +static void DynamicStringSetter(id self, SEL sel, + NSString *str) { + // save an NSString into the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + NSString *copiedStr = [str copy]; + [self setJSONValue:copiedStr forKey:jsonKey]; + [copiedStr release]; + } +} + +// GTLDateTime +static GTLDateTime *DynamicDateTimeGetter(id self, SEL sel) { + // get a GTLDateTime from the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + + // Return the cached object before creating on demand. + GTLDateTime *cachedDateTime = [self cacheChildForKey:jsonKey]; + if (cachedDateTime != nil) { + return cachedDateTime; + } + NSString *str = [self JSONValueForKey:jsonKey]; + id cacheValue, resultValue; + if (![str isKindOfClass:[NSNull class]]) { + GTLDateTime *dateTime = [GTLDateTime dateTimeWithRFC3339String:str]; + + cacheValue = dateTime; + resultValue = dateTime; + } else { + cacheValue = nil; + resultValue = [NSNull null]; + } + [self setCacheChild:cacheValue forKey:jsonKey]; + return resultValue; + } + return nil; +} + +static void DynamicDateTimeSetter(id self, SEL sel, + GTLDateTime *dateTime) { + // save an GTLDateTime into the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + id cacheValue, jsonValue; + if (![dateTime isKindOfClass:[NSNull class]]) { + jsonValue = [dateTime stringValue]; + cacheValue = dateTime; + } else { + jsonValue = [NSNull null]; + cacheValue = nil; + } + + [self setJSONValue:jsonValue forKey:jsonKey]; + [self setCacheChild:cacheValue forKey:jsonKey]; + } +} + +// NSNumber +static NSNumber *DynamicNumberGetter(id self, SEL sel) { + // get an NSNumber from the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + + NSNumber *num = [self JSONValueForKey:jsonKey]; + num = GTL_EnsureNSNumber(num); + return num; + } + return nil; +} + +static void DynamicNumberSetter(id self, SEL sel, + NSNumber *num) { + // save an NSNumber into the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + [self setJSONValue:num forKey:jsonKey]; + } +} + +// GTLObject +static GTLObject *DynamicObjectGetter(id self, SEL sel) { + // get a GTLObject from the JSON dictionary + NSString *jsonKey = nil; + Class returnClass = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:&returnClass + containedClass:NULL + jsonKey:&jsonKey]) { + + // Return the cached object before creating on demand. + GTLObject *cachedObj = [self cacheChildForKey:jsonKey]; + if (cachedObj != nil) { + return cachedObj; + } + NSMutableDictionary *dict = [self JSONValueForKey:jsonKey]; + if ([dict isKindOfClass:[NSMutableDictionary class]]) { + // get the class of the object being returned, and instantiate it + if (returnClass == Nil) { + returnClass = [GTLObject class]; + } + + NSDictionary *surrogates = self.surrogates; + GTLObject *obj = [GTLObject objectForJSON:dict + defaultClass:returnClass + surrogates:surrogates + batchClassMap:nil]; + [self setCacheChild:obj forKey:jsonKey]; + return obj; + } else if ([dict isKindOfClass:[NSNull class]]) { + [self setCacheChild:nil forKey:jsonKey]; + return (id) [NSNull null]; + } else if (dict != nil) { + // unexpected; probably got a string -- let the caller figure it out + GTL_DEBUG_LOG(@"GTLObject: unexpected JSON: %@.%@ should be a dictionary, actually is a %@:\n%@", + NSStringFromClass(selfClass), NSStringFromSelector(sel), + NSStringFromClass([dict class]), dict); + return (GTLObject *)dict; + } + } + return nil; +} + +static void DynamicObjectSetter(id self, SEL sel, + GTLObject *obj) { + // save a GTLObject into the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + id cacheValue, jsonValue; + if (![obj isKindOfClass:[NSNull class]]) { + NSMutableDictionary *dict = [obj JSON]; + if (dict == nil && obj != nil) { + // adding an empty object; it should have a JSON dictionary so it can + // hold future assignments + obj.JSON = [NSMutableDictionary dictionary]; + jsonValue = obj.JSON; + } else { + jsonValue = dict; + } + cacheValue = obj; + } else { + jsonValue = [NSNull null]; + cacheValue = nil; + } + [self setJSONValue:jsonValue forKey:jsonKey]; + [self setCacheChild:cacheValue forKey:jsonKey]; + } +} + +// get an NSArray of GTLObjects, NSStrings, or NSNumbers from the +// JSON dictionary for this object +static NSMutableArray *DynamicArrayGetter(id self, SEL sel) { + NSString *jsonKey = nil; + Class containedClass = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:&containedClass + jsonKey:&jsonKey]) { + + // Return the cached array before creating on demand. + NSMutableArray *cachedArray = [self cacheChildForKey:jsonKey]; + if (cachedArray != nil) { + return cachedArray; + } + NSMutableArray *result = nil; + NSArray *array = [self JSONValueForKey:jsonKey]; + if (array != nil) { + if ([array isKindOfClass:[NSArray class]]) { + NSDictionary *surrogates = self.surrogates; + result = [GTLRuntimeCommon objectFromJSON:array + defaultClass:containedClass + surrogates:surrogates + isCacheable:NULL]; + } else { +#if DEBUG + if (![array isKindOfClass:[NSNull class]]) { + GTL_DEBUG_LOG(@"GTLObject: unexpected JSON: %@.%@ should be an array, actually is a %@:\n%@", + NSStringFromClass(selfClass), NSStringFromSelector(sel), + NSStringFromClass([array class]), array); + } +#endif + result = (NSMutableArray *)array; + } + } + + [self setCacheChild:result forKey:jsonKey]; + return result; + } + return nil; +} + +static void DynamicArraySetter(id self, SEL sel, + NSMutableArray *array) { + // save an array of GTLObjects objects into the JSON dictionary + NSString *jsonKey = nil; + Class selfClass = [self class]; + Class containedClass = nil; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:&containedClass + jsonKey:&jsonKey]) { + id json = [GTLRuntimeCommon jsonFromAPIObject:array + expectedClass:containedClass + isCacheable:NULL]; + [self setJSONValue:json forKey:jsonKey]; + [self setCacheChild:array forKey:jsonKey]; + } +} + +// type 'id' +static id DynamicNSObjectGetter(id self, SEL sel) { + NSString *jsonKey = nil; + Class returnClass = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:&returnClass + containedClass:NULL + jsonKey:&jsonKey]) { + + // Return the cached object before creating on demand. + id cachedObj = [self cacheChildForKey:jsonKey]; + if (cachedObj != nil) { + return cachedObj; + } + + id jsonObj = [self JSONValueForKey:jsonKey]; + if (jsonObj != nil) { + BOOL shouldCache = NO; + NSDictionary *surrogates = self.surrogates; + id result = [GTLRuntimeCommon objectFromJSON:jsonObj + defaultClass:nil + surrogates:surrogates + isCacheable:&shouldCache]; + + [self setCacheChild:(shouldCache ? result : nil) + forKey:jsonKey]; + return result; + } + } + return nil; +} + +static void DynamicNSObjectSetter(id self, SEL sel, id obj) { + NSString *jsonKey = nil; + Class selfClass = [self class]; + if ([GTLRuntimeCommon getStoredDispatchForClass:selfClass + selector:sel + returnClass:NULL + containedClass:NULL + jsonKey:&jsonKey]) { + BOOL shouldCache = NO; + id json = [GTLRuntimeCommon jsonFromAPIObject:obj + expectedClass:Nil + isCacheable:&shouldCache]; + [self setJSONValue:json forKey:jsonKey]; + [self setCacheChild:(shouldCache ? obj : nil) + forKey:jsonKey]; + } +} + +#pragma mark Runtime lookup support + +static objc_property_t PropertyForSel(Class startClass, + SEL sel, BOOL isSetter, + Class *outFoundClass) { + const char *baseName = sel_getName(sel); + size_t baseNameLen = strlen(baseName); + if (isSetter) { + baseName += 3; // skip "set" + baseNameLen -= 4; // subtract "set" and the final colon + } + + // walk from this class up the hierarchy to the ancestor class + Class topClass = class_getSuperclass([startClass ancestorClass]); + for (Class currClass = startClass; + currClass != topClass; + currClass = class_getSuperclass(currClass)) { + // step through this class's properties + objc_property_t foundProp = NULL; + objc_property_t *properties = class_copyPropertyList(currClass, NULL); + if (properties) { + for (objc_property_t *prop = properties; *prop != NULL; ++prop) { + const char *propName = property_getName(*prop); + size_t propNameLen = strlen(propName); + + // search for an exact-name match (a getter), but case-insensitive on the + // first character (in case baseName comes from a setter) + if (baseNameLen == propNameLen + && strncasecmp(baseName, propName, 1) == 0 + && (baseNameLen <= 1 + || strncmp(baseName + 1, propName + 1, baseNameLen - 1) == 0)) { + // return the actual property name + foundProp = *prop; + + // if requested, return the class containing the property + if (outFoundClass) *outFoundClass = currClass; + break; + } + } + free(properties); + } + if (foundProp) return foundProp; + } + + // not found; this occasionally happens when the system looks for a method + // like "getFoo" or "descriptionWithLocale:indent:" + return NULL; +} + +typedef struct { + const char *attributePrefix; + + const char *setterEncoding; + IMP setterFunction; + const char *getterEncoding; + IMP getterFunction; + + // These are the "fixed" return classes, but some properties will require + // looking up the return class instead (because it is a subclass of + // GTLObject). + const char *returnClassName; + Class returnClass; + BOOL extractReturnClass; + +} GTLDynamicImpInfo; + +static const GTLDynamicImpInfo *DynamicImpInfoForProperty(objc_property_t prop, + Class *outReturnClass) { + + if (outReturnClass) *outReturnClass = nil; + + // dynamic method resolution: + // http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtDynamicResolution.html + // + // property runtimes: + // http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtPropertyIntrospection.html + + // Get and parse the property attributes, which look something like + // T@"NSString",&,D,P + // Ti,D -- NSInteger on 32bit + // Tq,D -- NSInteger on 64bit, long long on 32bit & 64bit + // Tc,D -- BOOL comes as char + // T@"NSString",D + // T@"GTLLink",D + // T@"NSArray",D + + + static GTLDynamicImpInfo kImplInfo[] = { +#if !__LP64__ + { // NSInteger on 32bit + "Ti", + "v@:i", (IMP)DynamicInteger32Setter, + "i@:", (IMP)DynamicInteger32Getter, + nil, nil, + NO + }, + { // NSUInteger on 32bit + "TI", + "v@:I", (IMP)DynamicUInteger32Setter, + "I@:", (IMP)DynamicUInteger32Getter, + nil, nil, + NO + }, +#endif + { // NSInteger on 64bit, long long on 32bit and 64bit. + "Tq", + "v@:q", (IMP)DynamicLongLongSetter, + "q@:", (IMP)DynamicLongLongGetter, + nil, nil, + NO + }, + { // NSUInteger on 64bit, long long on 32bit and 64bit. + "TQ", + "v@:Q", (IMP)DynamicULongLongSetter, + "Q@:", (IMP)DynamicULongLongGetter, + nil, nil, + NO + }, + { // float + "Tf", + "v@:f", (IMP)DynamicFloatSetter, + "f@:", (IMP)DynamicFloatGetter, + nil, nil, + NO + }, + { // double + "Td", + "v@:d", (IMP)DynamicDoubleSetter, + "d@:", (IMP)DynamicDoubleGetter, + nil, nil, + NO + }, + { // BOOL + "Tc", + "v@:c", (IMP)DynamicBooleanSetter, + "c@:", (IMP)DynamicBooleanGetter, + nil, nil, + NO + }, + { // NSString + "T@\"NSString\"", + "v@:@", (IMP)DynamicStringSetter, + "@@:", (IMP)DynamicStringGetter, + "NSString", nil, + NO + }, + { // NSNumber + "T@\"NSNumber\"", + "v@:@", (IMP)DynamicNumberSetter, + "@@:", (IMP)DynamicNumberGetter, + "NSNumber", nil, + NO + }, + { // GTLDateTime +#if !defined(GTL_TARGET_NAMESPACE) + "T@\"GTLDateTime\"", + "v@:@", (IMP)DynamicDateTimeSetter, + "@@:", (IMP)DynamicDateTimeGetter, + "GTLDateTime", nil, + NO +#else + "T@\"" GTL_TARGET_NAMESPACE_STRING "_" "GTLDateTime\"", + "v@:@", (IMP)DynamicDateTimeSetter, + "@@:", (IMP)DynamicDateTimeGetter, + GTL_TARGET_NAMESPACE_STRING "_" "GTLDateTime", nil, + NO +#endif + }, + { // NSArray with type + "T@\"NSArray\"", + "v@:@", (IMP)DynamicArraySetter, + "@@:", (IMP)DynamicArrayGetter, + "NSArray", nil, + NO + }, + { // id (any of the objects above) + "T@,", + "v@:@", (IMP)DynamicNSObjectSetter, + "@@:", (IMP)DynamicNSObjectGetter, + "NSObject", nil, + NO + }, + { // GTLObject - Last, cause it's a special case and prefix is general + "T@\"", + "v@:@", (IMP)DynamicObjectSetter, + "@@:", (IMP)DynamicObjectGetter, + nil, nil, + YES + }, + }; + + static BOOL hasLookedUpClasses = NO; + if (!hasLookedUpClasses) { + // Unfortunately, you can't put [NSString class] into the static structure, + // so this lookup has to be done at runtime. + hasLookedUpClasses = YES; + for (uint32_t idx = 0; idx < sizeof(kImplInfo)/sizeof(kImplInfo[0]); ++idx) { + if (kImplInfo[idx].returnClassName) { + kImplInfo[idx].returnClass = objc_getClass(kImplInfo[idx].returnClassName); + NSCAssert1(kImplInfo[idx].returnClass != nil, + @"GTLRuntimeCommon: class lookup failed: %s", kImplInfo[idx].returnClassName); + } + } + } + + const char *attr = property_getAttributes(prop); + + const char *dynamicMarker = strstr(attr, ",D"); + if (!dynamicMarker || + (dynamicMarker[2] != 0 && dynamicMarker[2] != ',' )) { + GTL_DEBUG_LOG(@"GTLRuntimeCommon: property %s isn't dynamic, attributes %s", + property_getName(prop), attr ? attr : "(nil)"); + return NULL; + } + + const GTLDynamicImpInfo *result = NULL; + + // Cycle over the list + + for (uint32_t idx = 0; idx < sizeof(kImplInfo)/sizeof(kImplInfo[0]); ++idx) { + const char *attributePrefix = kImplInfo[idx].attributePrefix; + if (strncmp(attr, attributePrefix, strlen(attributePrefix)) == 0) { + result = &kImplInfo[idx]; + if (outReturnClass) *outReturnClass = result->returnClass; + break; + } + } + + if (result == NULL) { + GTL_DEBUG_LOG(@"GTLRuntimeCommon: unexpected attributes %s for property %s", + attr ? attr : "(nil)", property_getName(prop)); + return NULL; + } + + if (result->extractReturnClass && outReturnClass) { + + // add a null at the next quotation mark + char *attrCopy = strdup(attr); + char *classNameStart = attrCopy + 3; + char *classNameEnd = strstr(classNameStart, "\""); + if (classNameEnd) { + *classNameEnd = '\0'; + + // Lookup the return class + *outReturnClass = objc_getClass(classNameStart); + if (*outReturnClass == nil) { + GTL_DEBUG_LOG(@"GTLRuntimeCommon: did not find class with name \"%s\" " + "for property \"%s\" with attributes \"%s\"", + classNameStart, property_getName(prop), attr); + } + } else { + GTL_DEBUG_LOG(@"GTLRuntimeCommon: Failed to find end of class name for " + "property \"%s\" with attributes \"%s\"", + property_getName(prop), attr); + } + free(attrCopy); + } + + return result; +} + +#pragma mark Runtime - wiring point + ++ (BOOL)resolveInstanceMethod:(SEL)sel onClass:(Class)onClass { + // dynamic method resolution: + // http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtDynamicResolution.html + // + // property runtimes: + // http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtPropertyIntrospection.html + + const char *selName = sel_getName(sel); + size_t selNameLen = strlen(selName); + char lastChar = selName[selNameLen - 1]; + BOOL isSetter = (lastChar == ':'); + + // look for a declared property matching this selector name exactly + Class foundClass = nil; + + objc_property_t prop = PropertyForSel(onClass, sel, isSetter, &foundClass); + if (prop != NULL && foundClass != nil) { + + Class returnClass = nil; + const GTLDynamicImpInfo *implInfo = DynamicImpInfoForProperty(prop, + &returnClass); + if (implInfo == NULL) { + GTL_DEBUG_LOG(@"GTLRuntimeCommon: unexpected return type class %s for " + "property \"%s\" of class \"%s\"", + returnClass ? class_getName(returnClass) : "", + property_getName(prop), + class_getName(onClass)); + } + + if (implInfo != NULL) { + IMP imp = ( isSetter ? implInfo->setterFunction : implInfo->getterFunction ); + const char *encoding = ( isSetter ? implInfo->setterEncoding : implInfo->getterEncoding ); + + class_addMethod(foundClass, sel, imp, encoding); + + const char *propName = property_getName(prop); + NSString *propStr = [NSString stringWithUTF8String:propName]; + + // replace the property name with the proper JSON key if it's + // special-cased with a map in the found class; otherwise, the property + // name is the JSON key + NSDictionary *keyMap = + [[foundClass ancestorClass] propertyToJSONKeyMapForClass:foundClass]; + NSString *jsonKey = [keyMap objectForKey:propStr]; + if (jsonKey == nil) { + jsonKey = propStr; + } + + Class containedClass = nil; + + // For arrays we need to look up what the contained class is. + if (imp == (IMP)DynamicArraySetter || imp == (IMP)DynamicArrayGetter) { + NSDictionary *classMap = + [[foundClass ancestorClass] arrayPropertyToClassMapForClass:foundClass]; + containedClass = [classMap objectForKey:jsonKey]; + if (containedClass == Nil) { + GTL_DEBUG_LOG(@"GTLRuntimeCommon: expected array item class for " + "property \"%s\" of class \"%s\"", + property_getName(prop), class_getName(foundClass)); + } + } + + // save the dispatch info to the cache + [GTLRuntimeCommon setStoredDispatchForClass:foundClass + selector:sel + returnClass:returnClass + containedClass:containedClass + jsonKey:jsonKey]; + return YES; + } + } + + return NO; +} + +@end diff --git a/GTL/Source/Objects/GTLService.h b/GTL/Source/Objects/GTLService.h new file mode 100644 index 0000000..c2b8b99 --- /dev/null +++ b/GTL/Source/Objects/GTLService.h @@ -0,0 +1,607 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLService.h +// + +// Service object documentation: +// https://code.google.com/p/google-api-objectivec-client/wiki/Introduction#Services_and_Tickets + +#import + +#import "GTLDefines.h" +#import "GTMHTTPFetcherService.h" +#import "GTLBatchQuery.h" +#import "GTLBatchResult.h" +#import "GTLDateTime.h" +#import "GTLErrorObject.h" +#import "GTLFramework.h" +#import "GTLJSONParser.h" +#import "GTLObject.h" +#import "GTLQuery.h" +#import "GTLUtilities.h" + +#undef _EXTERN +#undef _INITIALIZE_AS +#ifdef GTLSERVICE_DEFINE_GLOBALS +#define _EXTERN +#define _INITIALIZE_AS(x) =x +#else +#define _EXTERN extern +#define _INITIALIZE_AS(x) +#endif + +// Error domains +_EXTERN NSString* const kGTLServiceErrorDomain _INITIALIZE_AS(@"com.google.GTLServiceDomain"); +enum { + kGTLErrorQueryResultMissing = -3000, + kGTLErrorWaitTimedOut = -3001 +}; + +_EXTERN NSString* const kGTLJSONRPCErrorDomain _INITIALIZE_AS(@"com.google.GTLJSONRPCErrorDomain"); + +// We'll consistently store the server error string in the userInfo under +// this key +_EXTERN NSString* const kGTLServerErrorStringKey _INITIALIZE_AS(@"error"); + +_EXTERN Class const kGTLUseRegisteredClass _INITIALIZE_AS(nil); + +_EXTERN NSUInteger const kGTLStandardUploadChunkSize _INITIALIZE_AS(NSUIntegerMax); + +// When servers return us structured JSON errors, the NSError will +// contain a GTLErrorObject in the userInfo dictionary under the key +// kGTLStructuredErrorsKey +_EXTERN NSString* const kGTLStructuredErrorKey _INITIALIZE_AS(@"GTLStructuredError"); + +// When specifying an ETag for updating or deleting a single entry, use +// kGTLETagWildcard to tell the server to replace the current value +// unconditionally. Do not use this in entries in a batch feed. +_EXTERN NSString* const kGTLETagWildcard _INITIALIZE_AS(@"*"); + +// Notifications when parsing of a fetcher feed or entry begins or ends +_EXTERN NSString* const kGTLServiceTicketParsingStartedNotification _INITIALIZE_AS(@"kGTLServiceTicketParsingStartedNotification"); +_EXTERN NSString* const kGTLServiceTicketParsingStoppedNotification _INITIALIZE_AS(@"kGTLServiceTicketParsingStoppedNotification"); + +@class GTLServiceTicket; + +// Block types used for fetch callbacks +// +// These typedefs are not used in the header file method declarations +// since it's more useful when code sense expansions show the argument +// types rather than the typedefs + +#if NS_BLOCKS_AVAILABLE +typedef void (^GTLServiceCompletionHandler)(GTLServiceTicket *ticket, id object, NSError *error); + +typedef void (^GTLServiceUploadProgressBlock)(GTLServiceTicket *ticket, unsigned long long numberOfBytesRead, unsigned long long dataLength); +#else +typedef void *GTLServiceCompletionHandler; + +typedef void *GTLServiceUploadProgressBlock; +#endif // NS_BLOCKS_AVAILABLE + +#pragma mark - + +// +// Service base class +// + +@interface GTLService : NSObject { + @private + NSOperationQueue *parseQueue_; + NSString *userAgent_; + GTMHTTPFetcherService *fetcherService_; + NSString *userAgentAddition_; + + NSMutableDictionary *serviceProperties_; // initial values for properties in future tickets + + NSDictionary *surrogates_; // initial value for surrogates in future tickets + + SEL uploadProgressSelector_; // optional + +#if NS_BLOCKS_AVAILABLE + BOOL (^retryBlock_)(GTLServiceTicket *, BOOL, NSError *); + void (^uploadProgressBlock_)(GTLServiceTicket *ticket, + unsigned long long numberOfBytesRead, + unsigned long long dataLength); +#elif !__LP64__ + // Placeholders: for 32-bit builds, keep the size of the object's ivar section + // the same with and without blocks + id retryPlaceholder_; + id uploadProgressPlaceholder_; +#endif + + NSUInteger uploadChunkSize_; // zero when uploading via multi-part MIME http body + + BOOL isRetryEnabled_; // user allows auto-retries + SEL retrySelector_; // optional; set with setServiceRetrySelector + NSTimeInterval maxRetryInterval_; // default to 600. seconds + + BOOL shouldFetchNextPages_; + + NSString *apiKey_; + BOOL isRESTDataWrapperRequired_; + NSString *apiVersion_; + NSURL *rpcURL_; + NSURL *rpcUploadURL_; + NSDictionary *urlQueryParameters_; + NSDictionary *additionalHTTPHeaders_; +} + +#pragma mark Query Execution + +// The finishedSelector has a signature matching: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(GTLObject *)object +// error:(NSError *)error +// +// If an error occurs, the error parameter will be non-nil. Otherwise, +// the object parameter will point to a GTLObject, if any was returned by +// the fetch. (Delete fetches return no object, so the second parameter will +// be nil.) +// +// If the query object is a GTLBatchQuery, the object passed to the callback +// will be a GTLBatchResult; see the batch query documentation: +// https://code.google.com/p/google-api-objectivec-client/wiki/Introduction#Batch_Operations + +- (GTLServiceTicket *)executeQuery:(id)query + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector; + +#if NS_BLOCKS_AVAILABLE +- (GTLServiceTicket *)executeQuery:(id)query + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler; +#endif + +// Automatic page fetches +// +// Tickets can optionally do a sequence of fetches for queries where +// repeated requests with nextPageToken or nextStartIndex values is required to +// retrieve items of all pages of the response collection. The client's +// callback is invoked only when all items have been retrieved, or an error has +// occurred. During the fetch, the items accumulated so far are available from +// the ticket. +// +// Note that the final object may be a combination of multiple page responses +// so it may not be the same as if all results had been returned in a single +// page. Some fields of the response such as total item counts may reflect only +// the final page's values. +// +// Automatic page fetches will return an error if more than 25 page fetches are +// required. For debug builds, this will log a warning to the console when more +// than 2 page fetches occur, as a reminder that the query's maxResults +// parameter should probably be increased to specify more items returned per +// page. +// +// Default value is NO. +@property (nonatomic, assign) BOOL shouldFetchNextPages; + +// Retrying; see comments on retry support at the top of GTMHTTPFetcher. +// +// Default value is NO. +@property (nonatomic, assign, getter=isRetryEnabled) BOOL retryEnabled; + +// Some services require a developer key for quotas and limits. Setting this +// will include it on all request sent to this service via a GTLQuery class. +@property (nonatomic, copy) NSString *APIKey; + +// An authorizer adds user authentication headers to the request as needed. +@property (nonatomic, retain) id authorizer; + +// Retry selector is optional for retries. +// +// If present, it should have the signature: +// -(BOOL)ticket:(GTLServiceTicket *)ticket willRetry:(BOOL)suggestedWillRetry forError:(NSError *)error +// and return YES to cause a retry. Note that unlike the GTMHTTPFetcher retry +// selector, this selector's first argument is a ticket, not a fetcher. + +@property (nonatomic, assign) SEL retrySelector; +#if NS_BLOCKS_AVAILABLE +@property (copy) BOOL (^retryBlock)(GTLServiceTicket *ticket, BOOL suggestedWillRetry, NSError *error); +#endif + +@property (nonatomic, assign) NSTimeInterval maxRetryInterval; + +// +// Fetches may be done using RPC or REST APIs, without creating +// a GTLQuery object +// + +#pragma mark RPC Fetch Methods + +// +// These methods may be used for RPC fetches without creating a GTLQuery object +// + +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + parameters:(NSDictionary *)parameters + objectClass:(Class)objectClass + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector; + +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + insertingObject:(GTLObject *)bodyObject + objectClass:(Class)objectClass + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector; + +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + parameters:(NSDictionary *)parameters + insertingObject:(GTLObject *)bodyObject + objectClass:(Class)objectClass + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector; + +#if NS_BLOCKS_AVAILABLE +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + parameters:(NSDictionary *)parameters + objectClass:(Class)objectClass + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler; + +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + insertingObject:(GTLObject *)bodyObject + objectClass:(Class)objectClass + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler; + +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + parameters:(NSDictionary *)parameters + insertingObject:(GTLObject *)bodyObject + objectClass:(Class)objectClass + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler; +#endif + +#pragma mark REST Fetch Methods + +- (GTLServiceTicket *)fetchObjectWithURL:(NSURL *)objectURL + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector; + +- (GTLServiceTicket *)fetchObjectWithURL:(NSURL *)objectURL + objectClass:(Class)objectClass + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector; + +- (GTLServiceTicket *)fetchPublicObjectWithURL:(NSURL *)objectURL + objectClass:(Class)objectClass + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector; + +- (GTLServiceTicket *)fetchObjectByInsertingObject:(GTLObject *)bodyToPut + forURL:(NSURL *)destinationURL + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector; + +- (GTLServiceTicket *)fetchObjectByUpdatingObject:(GTLObject *)bodyToPut + forURL:(NSURL *)destinationURL + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector; + +- (GTLServiceTicket *)deleteResourceURL:(NSURL *)destinationURL + ETag:(NSString *)etagOrNil + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector; + +#if NS_BLOCKS_AVAILABLE +- (GTLServiceTicket *)fetchObjectWithURL:(NSURL *)objectURL + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler; + +- (GTLServiceTicket *)fetchObjectByInsertingObject:(GTLObject *)bodyToPut + forURL:(NSURL *)destinationURL + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler; + +- (GTLServiceTicket *)fetchObjectByUpdatingObject:(GTLObject *)bodyToPut + forURL:(NSURL *)destinationURL + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler; + +- (GTLServiceTicket *)deleteResourceURL:(NSURL *)destinationURL + ETag:(NSString *)etagOrNil + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler; +#endif + +#pragma mark User Properties + +// Properties and userData are supported for client convenience. +// +// Property keys beginning with _ are reserved by the library. +// +// The service properties dictionary is copied to become the initial property +// dictionary for each ticket. +- (void)setServiceProperty:(id)obj forKey:(NSString *)key; // pass nil obj to remove property +- (id)servicePropertyForKey:(NSString *)key; + +@property (nonatomic, copy) NSDictionary *serviceProperties; + +// The service userData becomes the initial value for each future ticket's +// userData. +@property (nonatomic, retain) id serviceUserData; + +#pragma mark Request Settings + +// Set the surrogates to be used for future tickets. Surrogates are subclasses +// to be used instead of standard classes when creating objects from the JSON. +// For example, this code will make the framework generate objects +// using MyCalendarItemSubclass instead of GTLItemCalendar and +// MyCalendarEventSubclass instead of GTLItemCalendarEvent. +// +// NSDictionary *surrogates = [NSDictionary dictionaryWithObjectsAndKeys: +// [MyCalendarEntrySubclass class], [GTLItemCalendar class], +// [MyCalendarEventSubclass class], [GTLItemCalendarEvent class], +// nil]; +// [calendarService setServiceSurrogates:surrogates]; +// +@property (nonatomic, retain) NSDictionary *surrogates; + +// On iOS 4 and later, the fetch may optionally continue in the background +// until finished or stopped by OS expiration. +// +// The default value is NO. +// +// For Mac OS X, background fetches are always supported, and this property +// is ignored. +@property (nonatomic, assign) BOOL shouldFetchInBackground; + +// Callbacks can be invoked on an operation queue rather than via the run loop +// starting on 10.7 and iOS 6. Do not specify both run loop modes and an +// operation queue. Specifying a delegate queue typically looks like this: +// +// service.delegateQueue = [[[NSOperationQueue alloc] init] autorelease]; +// +// Since the callbacks will be on a thread of the operation queue, the client +// may re-dispatch from the callbacks to a known dispatch queue or to the +// main queue. +@property (nonatomic, retain) NSOperationQueue *delegateQueue; + +// Run loop modes are used for scheduling NSURLConnections. +// +// The default value, nil, schedules connections using the current run +// loop mode. To use the service during a modal dialog, be sure to specify +// NSModalPanelRunLoopMode as one of the modes. +@property (nonatomic, retain) NSArray *runLoopModes; + +// Applications needing an additional identifier in the server logs may specify +// one. +@property (nonatomic, copy) NSString *userAgentAddition; + +// Applications have a default user-agent based on the application signature +// in the Info.plist settings. Most applications should not explicitly set +// this property. +@property (nonatomic, copy) NSString *userAgent; + +// The request user agent includes the library and OS version appended to the +// base userAgent, along with the optional addition string. +@property (nonatomic, readonly) NSString *requestUserAgent; + +// Applications may call requestForURL:httpMethod to get a request with the +// proper user-agent and ETag headers +// +// For http method, pass nil (for default GET method), POST, PUT, or DELETE +- (NSMutableURLRequest *)requestForURL:(NSURL *)url + ETag:(NSString *)etagOrNil + httpMethod:(NSString *)httpMethodOrNil; + +// objectRequestForURL returns an NSMutableURLRequest for a JSON GTL object +// +// The object is the object being sent to the server, or nil; +// the http method may be nil for GET, or POST, PUT, DELETE +- (NSMutableURLRequest *)objectRequestForURL:(NSURL *)url + object:(GTLObject *)object + ETag:(NSString *)etag + httpMethod:(NSString *)httpMethod + isREST:(BOOL)isREST + additionalHeaders:(NSDictionary *)additionalHeaders + ticket:(GTLServiceTicket *)ticket; + +// The queue used for parsing JSON responses (previously this property +// was called operationQueue) +@property (nonatomic, retain) NSOperationQueue *parseQueue; + +// The fetcher service object issues the GTMHTTPFetcher instances +// for this API service +@property (nonatomic, retain) GTMHTTPFetcherService *fetcherService; + +// Default storage for cookies is in the service object's fetchHistory. +// +// Apps that want to share cookies between all standalone fetchers and the +// service object may specify static application-wide cookie storage, +// kGTMHTTPFetcherCookieStorageMethodStatic. +@property (nonatomic, assign) NSInteger cookieStorageMethod; + +// When sending REST style queries, should the payload be wrapped in a "data" +// element, and will the reply be wrapped in an "data" element. +@property (nonatomic, assign) BOOL isRESTDataWrapperRequired; + +// Any url query parameters to add to urls (useful for debugging with some +// services). +@property (copy) NSDictionary *urlQueryParameters; + +// Any extra http headers to set on requests for GTLObjects. +@property (copy) NSDictionary *additionalHTTPHeaders; + +// The service API version. +@property (nonatomic, copy) NSString *apiVersion; + +// The URL for sending RPC requests for this service. +@property (nonatomic, retain) NSURL *rpcURL; + +// The URL for sending RPC requests which initiate file upload. +@property (nonatomic, retain) NSURL *rpcUploadURL; + +// Set a non-zero value to enable uploading via chunked fetches +// (resumable uploads); typically this defaults to kGTLStandardUploadChunkSize +// for service subclasses that support chunked uploads +@property (nonatomic, assign) NSUInteger serviceUploadChunkSize; + +// Service subclasses may specify their own default chunk size ++ (NSUInteger)defaultServiceUploadChunkSize; + +// The service uploadProgressSelector becomes the initial value for each future +// ticket's uploadProgressSelector. +// +// The optional uploadProgressSelector will be called in the delegate as bytes +// are uploaded to the server. It should have a signature matching +// +// - (void)ticket:(GTLServiceTicket *)ticket +// hasDeliveredByteCount:(unsigned long long)numberOfBytesRead +// ofTotalByteCount:(unsigned long long)dataLength; +@property (nonatomic, assign) SEL uploadProgressSelector; + +#if NS_BLOCKS_AVAILABLE +@property (copy) void (^uploadProgressBlock)(GTLServiceTicket *ticket, unsigned long long numberOfBytesRead, unsigned long long dataLength); +#endif + +// Wait synchronously for fetch to complete (strongly discouraged) +// +// This just runs the current event loop until the fetch completes +// or the timout limit is reached. This may discard unexpected events +// that occur while spinning, so it's really not appropriate for use +// in serious applications. +// +// Returns true if an object was successfully fetched. If the wait +// timed out, returns false and the returned error is nil. +// +// The returned object or error, if any, will be already autoreleased +// +// This routine will likely be removed in some future releases of the library. +- (BOOL)waitForTicket:(GTLServiceTicket *)ticket + timeout:(NSTimeInterval)timeoutInSeconds + fetchedObject:(GTLObject **)outObjectOrNil + error:(NSError **)outErrorOrNil; +@end + +#pragma mark - + +// +// Ticket base class +// +@interface GTLServiceTicket : NSObject { + GTLService *service_; + + NSMutableDictionary *ticketProperties_; + NSDictionary *surrogates_; + + GTMHTTPFetcher *objectFetcher_; + SEL uploadProgressSelector_; + BOOL shouldFetchNextPages_; + BOOL isRetryEnabled_; + SEL retrySelector_; + NSTimeInterval maxRetryInterval_; + +#if NS_BLOCKS_AVAILABLE + BOOL (^retryBlock_)(GTLServiceTicket *, BOOL, NSError *); + void (^uploadProgressBlock_)(GTLServiceTicket *ticket, + unsigned long long numberOfBytesRead, + unsigned long long dataLength); +#elif !__LP64__ + // Placeholders: for 32-bit builds, keep the size of the object's ivar section + // the same with and without blocks + id retryPlaceholder_; + id uploadProgressPlaceholder_; +#endif + + GTLObject *postedObject_; + GTLObject *fetchedObject_; + id executingQuery_; + id originalQuery_; + NSError *fetchError_; + BOOL hasCalledCallback_; + NSUInteger pagesFetchedCounter_; + + NSString *apiKey_; + BOOL isREST_; + + NSOperation *parseOperation_; +} + ++ (id)ticketForService:(GTLService *)service; + +- (id)initWithService:(GTLService *)service; + +- (id)service; + +#pragma mark Execution Control +// if cancelTicket is called, the fetch is stopped if it is in progress, +// the callbacks will not be called, and the ticket will no longer be useful +// (though the client must still release the ticket if it retained the ticket) +- (void)cancelTicket; + +// chunked upload tickets may be paused +- (void)pauseUpload; +- (void)resumeUpload; +- (BOOL)isUploadPaused; + +@property (nonatomic, retain) GTMHTTPFetcher *objectFetcher; +@property (nonatomic, assign) SEL uploadProgressSelector; + +// Services which do not require an user authorization may require a developer +// API key for quota management +@property (nonatomic, copy) NSString *APIKey; + +#pragma mark User Properties + +// Properties and userData are supported for client convenience. +// +// Property keys beginning with _ are reserved by the library. +- (void)setProperty:(id)obj forKey:(NSString *)key; // pass nil obj to remove property +- (id)propertyForKey:(NSString *)key; + +@property (nonatomic, copy) NSDictionary *properties; +@property (nonatomic, retain) id userData; + +#pragma mark Payload + +@property (nonatomic, retain) GTLObject *postedObject; +@property (nonatomic, retain) GTLObject *fetchedObject; +@property (nonatomic, retain) id executingQuery; // Query currently being fetched by this ticket +@property (nonatomic, retain) id originalQuery; // Query used to create this ticket +- (GTLQuery *)queryForRequestID:(NSString *)requestID; // Returns the query from within the batch with the given id. + +@property (nonatomic, retain) NSDictionary *surrogates; + +#pragma mark Retry + +@property (nonatomic, assign, getter=isRetryEnabled) BOOL retryEnabled; +@property (nonatomic, assign) SEL retrySelector; +#if NS_BLOCKS_AVAILABLE +@property (copy) BOOL (^retryBlock)(GTLServiceTicket *ticket, BOOL suggestedWillRetry, NSError *error); +#endif +@property (nonatomic, assign) NSTimeInterval maxRetryInterval; + +#pragma mark Status + +@property (nonatomic, readonly) NSInteger statusCode; // server status from object fetch +@property (nonatomic, retain) NSError *fetchError; +@property (nonatomic, assign) BOOL hasCalledCallback; + +#pragma mark Pagination + +@property (nonatomic, assign) BOOL shouldFetchNextPages; +@property (nonatomic, assign) NSUInteger pagesFetchedCounter; + +#pragma mark Upload + +#if NS_BLOCKS_AVAILABLE +@property (copy) void (^uploadProgressBlock)(GTLServiceTicket *ticket, unsigned long long numberOfBytesRead, unsigned long long dataLength); +#endif + +@end + + +// Category to provide opaque access to tickets stored in fetcher properties +@interface GTMHTTPFetcher (GTLServiceTicketAdditions) +- (id)ticket; +@end + diff --git a/GTL/Source/Objects/GTLService.m b/GTL/Source/Objects/GTLService.m new file mode 100644 index 0000000..78dbd27 --- /dev/null +++ b/GTL/Source/Objects/GTLService.m @@ -0,0 +1,2404 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLService.m +// + +#import +#if TARGET_OS_MAC +#include +#endif + +#if TARGET_OS_IPHONE +#import +#endif + +#define GTLSERVICE_DEFINE_GLOBALS 1 +#import "GTLService.h" + +static NSString *const kUserDataPropertyKey = @"_userData"; + +static NSString* const kFetcherDelegateKey = @"_delegate"; +static NSString* const kFetcherObjectClassKey = @"_objectClass"; +static NSString* const kFetcherFinishedSelectorKey = @"_finishedSelector"; +static NSString* const kFetcherCompletionHandlerKey = @"_completionHandler"; +static NSString* const kFetcherTicketKey = @"_ticket"; +static NSString* const kFetcherFetchErrorKey = @"_fetchError"; +static NSString* const kFetcherParsingNotificationKey = @"_parseNotification"; +static NSString* const kFetcherParsedObjectKey = @"_parsedObject"; +static NSString* const kFetcherBatchClassMapKey = @"_batchClassMap"; +static NSString* const kFetcherCallbackThreadKey = @"_callbackThread"; +static NSString* const kFetcherCallbackRunLoopModesKey = @"_runLoopModes"; + +static const NSUInteger kMaxNumberOfNextPagesFetched = 25; + +// we'll enforce 50K chunks minimum just to avoid the server getting hit +// with too many small upload chunks +static const NSUInteger kMinimumUploadChunkSize = 50000; +static const NSUInteger kStandardUploadChunkSize = NSUIntegerMax; + +// Helper to get the ETag if it is defined on an object. +static NSString *ETagIfPresent(GTLObject *obj) { + NSString *result = [obj.JSON objectForKey:@"etag"]; + return result; +} + +@interface GTLServiceTicket () +@property (retain) NSOperation *parseOperation; +@property (assign) BOOL isREST; +@end + +// category to provide opaque access to tickets stored in fetcher properties +@implementation GTMHTTPFetcher (GTLServiceTicketAdditions) +- (id)ticket { + return [self propertyForKey:kFetcherTicketKey]; +} +@end + +// If GTMHTTPUploadFetcher is available, it can be used for chunked uploads +// +// We locally declare some methods of GTMHTTPUploadFetcher so we +// do not need to import the header, as some projects may not have it available +@interface GTMHTTPUploadFetcher : GTMHTTPFetcher ++ (GTMHTTPUploadFetcher *)uploadFetcherWithRequest:(NSURLRequest *)request + uploadData:(NSData *)data + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(NSUInteger)chunkSize + fetcherService:(GTMHTTPFetcherService *)fetcherService; ++ (GTMHTTPUploadFetcher *)uploadFetcherWithRequest:(NSURLRequest *)request + uploadFileHandle:(NSFileHandle *)uploadFileHandle + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(NSUInteger)chunkSize + fetcherService:(GTMHTTPFetcherService *)fetcherService; ++ (GTMHTTPUploadFetcher *)uploadFetcherWithLocation:(NSURL *)location + uploadFileHandle:(NSFileHandle *)fileHandle + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(NSUInteger)chunkSize + fetcherService:(GTMHTTPFetcherService *)fetcherService; +- (void)pauseFetching; +- (void)resumeFetching; +- (BOOL)isPaused; +@end + + +@interface GTLService () +- (void)prepareToParseObjectForFetcher:(GTMHTTPFetcher *)fetcher; +- (void)handleParsedObjectForFetcher:(GTMHTTPFetcher *)fetcher; +- (BOOL)fetchNextPageWithQuery:(GTLQuery *)query + delegate:(id)delegate + didFinishedSelector:(SEL)finishedSelector + completionHandler:(GTLServiceCompletionHandler)completionHandler + ticket:(GTLServiceTicket *)ticket; +- (id )nextPageQueryForQuery:(GTLQuery *)query + result:(GTLObject *)object + ticket:(GTLServiceTicket *)ticket; +- (GTLObject *)mergedNewResultObject:(GTLObject *)newResult + oldResultObject:(GTLObject *)oldResult + forQuery:(GTLQuery *)query; +- (GTMHTTPUploadFetcher *)uploadFetcherWithRequest:(NSURLRequest *)request + fetcherService:(GTMHTTPFetcherService *)fetcherService + params:(GTLUploadParameters *)uploadParams; ++ (void)invokeCallback:(SEL)callbackSel + target:(id)target + ticket:(id)ticket + object:(id)object + error:(id)error; +- (BOOL)invokeRetrySelector:(SEL)retrySelector + delegate:(id)delegate + ticket:(GTLServiceTicket *)ticket + willRetry:(BOOL)willRetry + error:(NSError *)error; +- (BOOL)objectFetcher:(GTMHTTPFetcher *)fetcher + willRetry:(BOOL)willRetry + forError:(NSError *)error; +- (void)objectFetcher:(GTMHTTPFetcher *)fetcher + finishedWithData:(NSData *)data + error:(NSError *)error; +- (void)parseObjectFromDataOfFetcher:(GTMHTTPFetcher *)fetcher; +@end + +@interface GTLObject (StandardProperties) +@property (retain) NSString *ETag; +@property (retain) NSString *nextPageToken; +@property (retain) NSNumber *nextStartIndex; +@end + +@implementation GTLService + +@synthesize userAgentAddition = userAgentAddition_, + fetcherService = fetcherService_, + parseQueue = parseQueue_, + shouldFetchNextPages = shouldFetchNextPages_, + surrogates = surrogates_, + uploadProgressSelector = uploadProgressSelector_, + retryEnabled = isRetryEnabled_, + retrySelector = retrySelector_, + maxRetryInterval = maxRetryInterval_, + APIKey = apiKey_, + isRESTDataWrapperRequired = isRESTDataWrapperRequired_, + urlQueryParameters = urlQueryParameters_, + additionalHTTPHeaders = additionalHTTPHeaders_, + apiVersion = apiVersion_, + rpcURL = rpcURL_, + rpcUploadURL = rpcUploadURL_; + +#if NS_BLOCKS_AVAILABLE +@synthesize retryBlock = retryBlock_, + uploadProgressBlock = uploadProgressBlock_; +#endif + ++ (Class)ticketClass { + return [GTLServiceTicket class]; +} + +- (id)init { + self = [super init]; + if (self) { + +#if GTL_IPHONE || (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_5) + // For 10.6 and up, always use an operation queue + parseQueue_ = [[NSOperationQueue alloc] init]; +#elif !GTL_SKIP_PARSE_THREADING + // Avoid NSOperationQueue prior to 10.5.6, per + // http://www.mikeash.com/?page=pyblog/use-nsoperationqueue.html + SInt32 bcdSystemVersion = 0; + (void) Gestalt(gestaltSystemVersion, &bcdSystemVersion); + + if (bcdSystemVersion >= 0x1057) { + parseQueue_ = [[NSOperationQueue alloc] init]; + } +#else + // parseQueue_ defaults to nil, so parsing will be done immediately + // on the current thread +#endif + + fetcherService_ = [[GTMHTTPFetcherService alloc] init]; + + NSUInteger chunkSize = [[self class] defaultServiceUploadChunkSize]; + self.serviceUploadChunkSize = chunkSize; + } + return self; +} + +- (void)dealloc { + [parseQueue_ release]; + [userAgent_ release]; + [fetcherService_ release]; + [userAgentAddition_ release]; + [serviceProperties_ release]; + [surrogates_ release]; +#if NS_BLOCKS_AVAILABLE + [uploadProgressBlock_ release]; + [retryBlock_ release]; +#endif + [apiKey_ release]; + [apiVersion_ release]; + [rpcURL_ release]; + [rpcUploadURL_ release]; + [urlQueryParameters_ release]; + [additionalHTTPHeaders_ release]; + + [super dealloc]; +} + +- (NSString *)requestUserAgent { + NSString *userAgent = self.userAgent; + if ([userAgent length] == 0) { + // the service instance is missing an explicit user-agent; use the bundle ID + // or process name + NSBundle *owningBundle = [NSBundle bundleForClass:[self class]]; + if (owningBundle == nil + || [[owningBundle bundleIdentifier] isEqual:@"com.google.GTLFramework"]) { + + owningBundle = [NSBundle mainBundle]; + } + + userAgent = GTMApplicationIdentifier(owningBundle); + } + + NSString *requestUserAgent = userAgent; + + // if the user agent already specifies the library version, we'll + // use it verbatim in the request + NSString *libraryString = @"google-api-objc-client"; + NSRange libRange = [userAgent rangeOfString:libraryString + options:NSCaseInsensitiveSearch]; + if (libRange.location == NSNotFound) { + // the user agent doesn't specify the client library, so append that + // information, and the system version + NSString *libVersionString = GTLFrameworkVersionString(); + + NSString *systemString = GTMSystemVersionString(); + + // We don't clean this with GTMCleanedUserAgentString so spaces are + // preserved + NSString *userAgentAddition = self.userAgentAddition; + NSString *customString = userAgentAddition ? + [@" " stringByAppendingString:userAgentAddition] : @""; + + // Google servers look for gzip in the user agent before sending gzip- + // encoded responses. See Service.java + requestUserAgent = [NSString stringWithFormat:@"%@ %@/%@ %@%@ (gzip)", + userAgent, libraryString, libVersionString, systemString, customString]; + } + return requestUserAgent; +} + +- (NSMutableURLRequest *)requestForURL:(NSURL *)url + ETag:(NSString *)etag + httpMethod:(NSString *)httpMethod + ticket:(GTLServiceTicket *)ticket { + + // subclasses may add headers to this + NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] initWithURL:url + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:60] autorelease]; + NSString *requestUserAgent = self.requestUserAgent; + [request setValue:requestUserAgent forHTTPHeaderField:@"User-Agent"]; + + if ([httpMethod length] > 0) { + [request setHTTPMethod:httpMethod]; + } + + if ([etag length] > 0) { + + // it's rather unexpected for an etagged object to be provided for a GET, + // but we'll check for an etag anyway, similar to HttpGDataRequest.java, + // and if present use it to request only an unchanged resource + + BOOL isDoingHTTPGet = (httpMethod == nil + || [httpMethod caseInsensitiveCompare:@"GET"] == NSOrderedSame); + + if (isDoingHTTPGet) { + + // set the etag header, even if weak, indicating we don't want + // another copy of the resource if it's the same as the object + [request setValue:etag forHTTPHeaderField:@"If-None-Match"]; + + } else { + + // if we're doing PUT or DELETE, set the etag header indicating + // we only want to update the resource if our copy matches the current + // one (unless the etag is weak and so shouldn't be a constraint at all) + BOOL isWeakETag = [etag hasPrefix:@"W/"]; + + BOOL isModifying = + [httpMethod caseInsensitiveCompare:@"PUT"] == NSOrderedSame + || [httpMethod caseInsensitiveCompare:@"DELETE"] == NSOrderedSame + || [httpMethod caseInsensitiveCompare:@"PATCH"] == NSOrderedSame; + + if (isModifying && !isWeakETag) { + [request setValue:etag forHTTPHeaderField:@"If-Match"]; + } + } + } + + return request; +} + +- (NSMutableURLRequest *)requestForURL:(NSURL *)url + ETag:(NSString *)etag + httpMethod:(NSString *)httpMethod { + // this public entry point authenticates from the service object but + // not from the auth token in the ticket + return [self requestForURL:url ETag:etag httpMethod:httpMethod ticket:nil]; +} + +// objectRequestForURL returns an NSMutableURLRequest for a GTLObject +// +// the object is the object being sent to the server, or nil; +// the http method may be nil for get, or POST, PUT, DELETE + +- (NSMutableURLRequest *)objectRequestForURL:(NSURL *)url + object:(GTLObject *)object + ETag:(NSString *)etag + httpMethod:(NSString *)httpMethod + isREST:(BOOL)isREST + additionalHeaders:(NSDictionary *)additionalHeaders + ticket:(GTLServiceTicket *)ticket { + if (object) { + // if the object being sent has an etag, add it to the request header to + // avoid retrieving a duplicate or to avoid writing over an updated + // version of the resource on the server + // + // Typically, delete requests will provide an explicit ETag parameter, and + // other requests will have the ETag carried inside the object being updated + if (etag == nil) { + SEL selEtag = @selector(ETag); + if ([object respondsToSelector:selEtag]) { + etag = [object performSelector:selEtag]; + } + } + } + + NSMutableURLRequest *request = [self requestForURL:url + ETag:etag + httpMethod:httpMethod + ticket:ticket]; + NSString *acceptValue; + NSString *contentTypeValue; + if (isREST) { + acceptValue = @"application/json"; + contentTypeValue = @"application/json; charset=utf-8"; + } else { + acceptValue = @"application/json-rpc"; + contentTypeValue = @"application/json-rpc; charset=utf-8"; + } + [request setValue:acceptValue forHTTPHeaderField:@"Accept"]; + [request setValue:contentTypeValue forHTTPHeaderField:@"Content-Type"]; + + [request setValue:@"no-cache" forHTTPHeaderField:@"Cache-Control"]; + + // Add the additional http headers from the service, and then from the query + NSDictionary *headers = self.additionalHTTPHeaders; + for (NSString *key in headers) { + NSString *value = [headers valueForKey:key]; + [request setValue:value forHTTPHeaderField:key]; + } + + headers = additionalHeaders; + for (NSString *key in headers) { + NSString *value = [headers valueForKey:key]; + [request setValue:value forHTTPHeaderField:key]; + } + + return request; +} + +#pragma mark - + +// common fetch starting method + +- (GTLServiceTicket *)fetchObjectWithURL:(NSURL *)targetURL + objectClass:(Class)objectClass + bodyObject:(GTLObject *)bodyObject + dataToPost:(NSData *)dataToPost + ETag:(NSString *)etag + httpMethod:(NSString *)httpMethod + mayAuthorize:(BOOL)mayAuthorize + isREST:(BOOL)isREST + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector + completionHandler:(id)completionHandler // GTLServiceCompletionHandler + executingQuery:(id)query + ticket:(GTLServiceTicket *)ticket { + + GTMAssertSelectorNilOrImplementedWithArgs(delegate, finishedSelector, @encode(GTLServiceTicket *), @encode(GTLObject *), @encode(NSError *), 0); + + // The completionHandler argument is declared as an id, not as a block + // pointer, so this can be built with the 10.6 SDK and still run on 10.5. + // If the argument were declared as a block pointer, the invocation for + // fetchObjectWithURL: created in GTLService would cause an exception + // since 10.5's NSInvocation cannot deal with encoding of block pointers. + + GTL_DEBUG_ASSERT(targetURL != nil, @"no url?"); + if (targetURL == nil) return nil; + + // we need to create a ticket unless one was created earlier (like during + // authentication) + if (!ticket) { + ticket = [[[self class] ticketClass] ticketForService:self]; + } + + ticket.isREST = isREST; + + // Add any service specific query parameters. + NSDictionary *urlQueryParameters = self.urlQueryParameters; + if ([urlQueryParameters count] > 0) { + targetURL = [GTLUtilities URLWithString:[targetURL absoluteString] + queryParameters:urlQueryParameters]; + } + + // If this is REST and there is a developer key, add it onto the url. RPC + // adds the key into the payload, not on the url. + NSString *apiKey = self.APIKey; + if (isREST && [apiKey length] > 0) { + NSString *const kDeveloperAPIQueryParamKey = @"key"; + NSDictionary *queryParameters; + queryParameters = [NSDictionary dictionaryWithObject:apiKey + forKey:kDeveloperAPIQueryParamKey]; + targetURL = [GTLUtilities URLWithString:[targetURL absoluteString] + queryParameters:queryParameters]; + } + + NSDictionary *additionalHeaders = query.additionalHTTPHeaders; + + NSMutableURLRequest *request = [self objectRequestForURL:targetURL + object:bodyObject + ETag:etag + httpMethod:httpMethod + isREST:isREST + additionalHeaders:additionalHeaders + ticket:ticket]; + + GTMAssertSelectorNilOrImplementedWithArgs(delegate, ticket.uploadProgressSelector, + @encode(GTLServiceTicket *), @encode(unsigned long long), + @encode(unsigned long long), 0); + GTMAssertSelectorNilOrImplementedWithArgs(delegate, ticket.retrySelector, + @encode(GTLServiceTicket *), @encode(BOOL), @encode(NSError *), 0); + + SEL finishedSel = @selector(objectFetcher:finishedWithData:error:); + + ticket.postedObject = bodyObject; + + ticket.executingQuery = query; + if (ticket.originalQuery == nil) { + ticket.originalQuery = query; + } + + GTMHTTPFetcherService *fetcherService = self.fetcherService; + GTMHTTPFetcher *fetcher; + + GTLUploadParameters *uploadParams = query.uploadParameters; + if (uploadParams == nil) { + // Not uploading a file with this request + fetcher = [fetcherService fetcherWithRequest:request]; + } else { + fetcher = [self uploadFetcherWithRequest:request + fetcherService:fetcherService + params:uploadParams]; + } + + if (finishedSelector) { + // if we don't have a method name, default to the finished selector as + // a useful fetcher log comment + fetcher.comment = NSStringFromSelector(finishedSelector); + } + + // allow the user to specify static app-wide cookies for fetching + NSInteger cookieStorageMethod = [self cookieStorageMethod]; + if (cookieStorageMethod >= 0) { + fetcher.cookieStorageMethod = cookieStorageMethod; + } + + if (!mayAuthorize) { + fetcher.authorizer = nil; + } + + // copy the ticket's retry settings into the fetcher + fetcher.retryEnabled = ticket.retryEnabled; + fetcher.maxRetryInterval = ticket.maxRetryInterval; + + BOOL shouldExamineRetries; +#if NS_BLOCKS_AVAILABLE + shouldExamineRetries = (ticket.retrySelector != nil + || ticket.retryBlock != nil); +#else + shouldExamineRetries = (ticket.retrySelector != nil); +#endif + if (shouldExamineRetries) { + [fetcher setRetrySelector:@selector(objectFetcher:willRetry:forError:)]; + } + + // remember the object fetcher in the ticket + ticket.objectFetcher = fetcher; + + // add parameters used by the callbacks + + [fetcher setProperty:objectClass forKey:kFetcherObjectClassKey]; + + [fetcher setProperty:delegate forKey:kFetcherDelegateKey]; + + [fetcher setProperty:NSStringFromSelector(finishedSelector) + forKey:kFetcherFinishedSelectorKey]; + + [fetcher setProperty:ticket + forKey:kFetcherTicketKey]; + +#if NS_BLOCKS_AVAILABLE + // copy the completion handler block to the heap; this does nothing if the + // block is already on the heap + completionHandler = [[completionHandler copy] autorelease]; + [fetcher setProperty:completionHandler + forKey:kFetcherCompletionHandlerKey]; +#endif + + // set the upload data + fetcher.postData = dataToPost; + + // failed fetches call the failure selector, which will delete the ticket + BOOL didFetch = [fetcher beginFetchWithDelegate:self + didFinishSelector:finishedSel]; + + // If something weird happens and the networking callbacks have been called + // already synchronously, we don't want to return the ticket since the caller + // will never know when to stop retaining it, so we'll make sure the + // success/failure callbacks have not yet been called by checking the + // ticket + if (!didFetch || ticket.hasCalledCallback) { + fetcher.properties = nil; + return nil; + } + + return ticket; +} + +- (GTMHTTPUploadFetcher *)uploadFetcherWithRequest:(NSURLRequest *)request + fetcherService:(GTMHTTPFetcherService *)fetcherService + params:(GTLUploadParameters *)uploadParams { + // Hang on to the user's requested chunk size, and ensure it's not tiny + NSUInteger uploadChunkSize = [self serviceUploadChunkSize]; + if (uploadChunkSize < kMinimumUploadChunkSize) { + uploadChunkSize = kMinimumUploadChunkSize; + } + +#ifdef GTL_TARGET_NAMESPACE + // Prepend the class name prefix + Class uploadClass = NSClassFromString(@GTL_TARGET_NAMESPACE_STRING + "_GTMHTTPUploadFetcher"); +#else + Class uploadClass = NSClassFromString(@"GTMHTTPUploadFetcher"); +#endif + GTL_ASSERT(uploadClass != nil, @"GTMHTTPUploadFetcher needed"); + + NSString *uploadMIMEType = uploadParams.MIMEType; + NSData *uploadData = uploadParams.data; + NSFileHandle *uploadFileHandle = uploadParams.fileHandle; + NSURL *uploadLocationURL = uploadParams.uploadLocationURL; + + GTMHTTPUploadFetcher *fetcher; + if (uploadData) { + fetcher = [uploadClass uploadFetcherWithRequest:request + uploadData:uploadData + uploadMIMEType:uploadMIMEType + chunkSize:uploadChunkSize + fetcherService:fetcherService]; + } else if (uploadLocationURL) { + GTL_DEBUG_ASSERT(uploadFileHandle != nil, + @"Resume requires a file handle"); + fetcher = [uploadClass uploadFetcherWithLocation:uploadLocationURL + uploadFileHandle:uploadFileHandle + uploadMIMEType:uploadMIMEType + chunkSize:uploadChunkSize + fetcherService:fetcherService]; + } else { + fetcher = [uploadClass uploadFetcherWithRequest:request + uploadFileHandle:uploadFileHandle + uploadMIMEType:uploadMIMEType + chunkSize:uploadChunkSize + fetcherService:fetcherService]; + } + + NSString *slug = [uploadParams slug]; + if ([slug length] > 0) { + [[fetcher mutableRequest] setValue:slug forHTTPHeaderField:@"Slug"]; + } + return fetcher; +} + +#pragma mark - + +// RPC fetch methods + +- (NSDictionary *)rpcPayloadForMethodNamed:(NSString *)methodName + parameters:(NSDictionary *)parameters + bodyObject:(GTLObject *)bodyObject + requestID:(NSString *)requestID { + GTL_DEBUG_ASSERT([requestID length] > 0, @"Got an empty request id"); + + // First, merge the developer key and bodyObject into the parameters. + + NSString *apiKey = self.APIKey; + NSUInteger apiKeyLen = [apiKey length]; + + NSString *const kDeveloperAPIParamKey = @"key"; + NSString *const kBodyObjectParamKey = @"resource"; + + NSDictionary *finalParams; + if ((apiKeyLen == 0) && (bodyObject == nil)) { + // Nothing needs to be added, just send the dict along. + finalParams = parameters; + } else { + NSMutableDictionary *worker = [NSMutableDictionary dictionary]; + if ([parameters count] > 0) { + [worker addEntriesFromDictionary:parameters]; + } + if ((apiKeyLen > 0) + && ([worker objectForKey:kDeveloperAPIParamKey] == nil)) { + [worker setObject:apiKey forKey:kDeveloperAPIParamKey]; + } + if (bodyObject != nil) { + GTL_DEBUG_ASSERT([parameters objectForKey:kBodyObjectParamKey] == nil, + @"There was already something under the 'data' key?!"); + [worker setObject:[bodyObject JSON] forKey:kBodyObjectParamKey]; + } + finalParams = worker; + } + + // Now, build up the full dictionary for the JSON-RPC (this is the body of + // the HTTP PUT). + + // Spec calls for the jsonrpc entry. Google doesn't require it, but include + // it so the code can work with other servers. + NSMutableDictionary *rpcPayload = [NSMutableDictionary dictionaryWithObjectsAndKeys: + @"2.0", @"jsonrpc", + methodName, @"method", + requestID, @"id", + nil]; + + // Google extension, provide the version of the api. + NSString *apiVersion = self.apiVersion; + if ([apiVersion length] > 0) { + [rpcPayload setObject:apiVersion forKey:@"apiVersion"]; + } + + if ([finalParams count] > 0) { + [rpcPayload setObject:finalParams forKey:@"params"]; + } + + return rpcPayload; +} + +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + objectClass:(Class)objectClass + parameters:(NSDictionary *)parameters + bodyObject:(GTLObject *)bodyObject + requestID:(NSString *)requestID + urlQueryParameters:(NSDictionary *)urlQueryParameters + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector + completionHandler:(id)completionHandler // GTLServiceCompletionHandler + executingQuery:(id)executingQuery + ticket:(GTLServiceTicket *)ticket { + GTL_DEBUG_ASSERT([methodName length] > 0, @"Got an empty method name"); + if ([methodName length] == 0) return nil; + + // If we didn't get a requestID, assign one (call came from one of the public + // calls that doesn't take a GTLQuery object). + if (requestID == nil) { + requestID = [GTLQuery nextRequestID]; + } + + NSData *dataToPost = nil; + GTLUploadParameters *uploadParameters = executingQuery.uploadParameters; + BOOL shouldSendBody = !uploadParameters.shouldSendUploadOnly; + if (shouldSendBody) { + NSDictionary *rpcPayload = [self rpcPayloadForMethodNamed:methodName + parameters:parameters + bodyObject:bodyObject + requestID:requestID]; + + NSError *error = nil; + dataToPost = [GTLJSONParser dataWithObject:rpcPayload + humanReadable:NO + error:&error]; + if (dataToPost == nil) { + // There is the chance something went into parameters that wasn't valid. + GTL_DEBUG_LOG(@"JSON generation error: %@", error); + return nil; + } + } + + BOOL isUploading = (uploadParameters != nil); + NSURL *rpcURL = (isUploading ? self.rpcUploadURL : self.rpcURL); + + if ([urlQueryParameters count] > 0) { + rpcURL = [GTLUtilities URLWithString:[rpcURL absoluteString] + queryParameters:urlQueryParameters]; + } + + BOOL mayAuthorize = (executingQuery ? + !executingQuery.shouldSkipAuthorization : YES); + + GTLServiceTicket *resultTicket = [self fetchObjectWithURL:rpcURL + objectClass:objectClass + bodyObject:bodyObject + dataToPost:dataToPost + ETag:nil + httpMethod:@"POST" + mayAuthorize:mayAuthorize + isREST:NO + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:completionHandler + executingQuery:executingQuery + ticket:ticket]; + + // Set the fetcher log comment to default to the method name + NSUInteger pageNumber = resultTicket.pagesFetchedCounter; + if (pageNumber == 0) { + resultTicket.objectFetcher.comment = methodName; + } else { + // Also put the page number in the log comment + [resultTicket.objectFetcher setCommentWithFormat:@"%@ (page %lu)", + methodName, (unsigned long) (pageNumber + 1)]; + } + + return resultTicket; +} + +- (GTLServiceTicket *)executeBatchQuery:(GTLBatchQuery *)batch + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector + completionHandler:(id)completionHandler // GTLServiceCompletionHandler + ticket:(GTLServiceTicket *)ticket { + GTLBatchQuery *batchCopy = [[batch copy] autorelease]; + NSArray *queries = batchCopy.queries; + NSUInteger numberOfQueries = [queries count]; + if (numberOfQueries == 0) return nil; + + // Build up the array of RPC calls. + NSMutableArray *rpcPayloads = [NSMutableArray arrayWithCapacity:numberOfQueries]; + NSMutableArray *requestIDs = [NSMutableSet setWithCapacity:numberOfQueries]; + for (GTLQuery *query in queries) { + NSString *methodName = query.methodName; + NSDictionary *parameters = query.JSON; + GTLObject *bodyObject = query.bodyObject; + NSString *requestID = query.requestID; + + if ([methodName length] == 0 || [requestID length] == 0) { + GTL_DEBUG_ASSERT(0, @"Invalid query - id:%@ method:%@", + requestID, methodName); + return nil; + } + + GTL_DEBUG_ASSERT(query.additionalHTTPHeaders == nil, + @"additionalHTTPHeaders 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); + + NSDictionary *rpcPayload = [self rpcPayloadForMethodNamed:methodName + parameters:parameters + bodyObject:bodyObject + requestID:requestID]; + [rpcPayloads addObject:rpcPayload]; + + if ([requestIDs containsObject:requestID]) { + GTL_DEBUG_LOG(@"Duplicate request id in batch: %@", requestID); + return nil; + } + [requestIDs addObject:requestID]; + } + + NSError *error = nil; + NSData *dataToPost = nil; + dataToPost = [GTLJSONParser dataWithObject:rpcPayloads + humanReadable:NO + error:&error]; + if (dataToPost == nil) { + // There is the chance something went into parameters that wasn't valid. + GTL_DEBUG_LOG(@"JSON generation error: %@", error); + return nil; + } + + 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; + GTLServiceTicket *resultTicket = [self fetchObjectWithURL:rpcURL + objectClass:[GTLBatchResult class] + bodyObject:nil + dataToPost:dataToPost + ETag:nil + httpMethod:@"POST" + mayAuthorize:mayAuthorize + isREST:NO + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:completionHandler + executingQuery:batch + ticket:ticket]; + +#if !STRIP_GTM_FETCH_LOGGING + // Set the fetcher log comment + // + // Because this has expensive set operations, it's conditionally + // compiled in + NSArray *methodNames = [queries valueForKey:@"methodName"]; + methodNames = [[NSSet setWithArray:methodNames] allObjects]; // de-dupe + NSString *methodsStr = [methodNames componentsJoinedByString:@", "]; + + NSUInteger pageNumber = ticket.pagesFetchedCounter; + NSString *pageStr = @""; + if (pageNumber > 0) { + pageStr = [NSString stringWithFormat:@"page %lu, ", + (unsigned long) pageNumber + 1]; + } + [resultTicket.objectFetcher setCommentWithFormat:@"batch: %@ (%@%lu queries)", + methodsStr, pageStr, (unsigned long) numberOfQueries]; +#endif + + return resultTicket; +} + + +#pragma mark - + +// REST fetch methods + +- (GTLServiceTicket *)fetchObjectWithURL:(NSURL *)targetURL + objectClass:(Class)objectClass + bodyObject:(GTLObject *)bodyObject + ETag:(NSString *)etag + httpMethod:(NSString *)httpMethod + mayAuthorize:(BOOL)mayAuthorize + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector + completionHandler:(id)completionHandler // GTLServiceCompletionHandler + ticket:(GTLServiceTicket *)ticket { + // if no URL was supplied, treat this as if the fetch failed (below) + // and immediately return a nil ticket, skipping the callbacks + // + // this might be considered normal (say, updating a read-only entry + // that lacks an edit link) though higher-level calls may assert or + // return errors depending on the specific usage + if (targetURL == nil) return nil; + + NSData *dataToPost = nil; + if (bodyObject != nil) { + NSError *error = nil; + + NSDictionary *whatToSend; + NSDictionary *json = bodyObject.JSON; + if (isRESTDataWrapperRequired_) { + // create the top-level "data" object + NSDictionary *dataDict = [NSDictionary dictionaryWithObject:json + forKey:@"data"]; + whatToSend = dataDict; + } else { + whatToSend = json; + } + dataToPost = [GTLJSONParser dataWithObject:whatToSend + humanReadable:NO + error:&error]; + if (dataToPost == nil) { + GTL_DEBUG_LOG(@"JSON generation error: %@", error); + } + } + + return [self fetchObjectWithURL:targetURL + objectClass:objectClass + bodyObject:bodyObject + dataToPost:dataToPost + ETag:etag + httpMethod:httpMethod + mayAuthorize:mayAuthorize + isREST:YES + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:completionHandler + executingQuery:nil + ticket:ticket]; +} + +- (void)invokeProgressCallbackForTicket:(GTLServiceTicket *)ticket + deliveredBytes:(unsigned long long)numReadSoFar + totalBytes:(unsigned long long)total { + + SEL progressSelector = [ticket uploadProgressSelector]; + if (progressSelector) { + + GTMHTTPFetcher *fetcher = ticket.objectFetcher; + id delegate = [fetcher propertyForKey:kFetcherDelegateKey]; + + NSMethodSignature *signature = [delegate methodSignatureForSelector:progressSelector]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; + + [invocation setSelector:progressSelector]; + [invocation setTarget:delegate]; + [invocation setArgument:&ticket atIndex:2]; + [invocation setArgument:&numReadSoFar atIndex:3]; + [invocation setArgument:&total atIndex:4]; + [invocation invoke]; + } + +#if NS_BLOCKS_AVAILABLE + GTLServiceUploadProgressBlock block = ticket.uploadProgressBlock; + if (block) { + block(ticket, numReadSoFar, total); + } +#endif +} + +// sentData callback from fetcher +- (void)objectFetcher:(GTMHTTPFetcher *)fetcher + didSendBytes:(NSInteger)bytesSent + totalBytesSent:(NSInteger)totalBytesSent +totalBytesExpectedToSend:(NSInteger)totalBytesExpected { + + GTLServiceTicket *ticket = [fetcher propertyForKey:kFetcherTicketKey]; + + [self invokeProgressCallbackForTicket:ticket + deliveredBytes:(unsigned long long)totalBytesSent + totalBytes:(unsigned long long)totalBytesExpected]; +} + +- (void)objectFetcher:(GTMHTTPFetcher *)fetcher finishedWithData:(NSData *)data error:(NSError *)error { + // we now have the JSON data for an object, or an error + if (error == nil) { + if ([data length] > 0) { + [self prepareToParseObjectForFetcher:fetcher]; + } else { + // no data (such as when deleting) + [self handleParsedObjectForFetcher:fetcher]; + } + } else { + // There was an error from the fetch + NSInteger status = [error code]; + if (status >= 300) { + // Return the HTTP error status code along with a more descriptive error + // from within the HTTP response payload. + NSData *responseData = fetcher.downloadedData; + if ([responseData length] > 0) { + NSDictionary *responseHeaders = fetcher.responseHeaders; + NSString *contentType = [responseHeaders objectForKey:@"Content-Type"]; + + if ([data length] > 0) { + if ([contentType hasPrefix:@"application/json"]) { + NSError *parseError = nil; + NSMutableDictionary *jsonWrapper = [GTLJSONParser objectWithData:data + error:&parseError]; + if (parseError) { + // We could not parse the JSON payload + error = parseError; + } else { + // Convert the JSON error payload into a structured error + NSMutableDictionary *errorJSON = [jsonWrapper valueForKey:@"error"]; + GTLErrorObject *errorObject = [GTLErrorObject objectWithJSON:errorJSON]; + error = [errorObject foundationError]; + } + } else { + // No structured JSON error was available; make a plaintext server + // error response visible in the error object. + NSString *reasonStr = [[[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding] autorelease]; + NSDictionary *userInfo = [NSDictionary dictionaryWithObject:reasonStr + forKey:NSLocalizedFailureReasonErrorKey]; + error = [NSError errorWithDomain:kGTMHTTPFetcherStatusDomain + code:status + userInfo:userInfo]; + } + } else { + // Response data length is zero; we'll settle for returning the + // fetcher's error. + } + } + } + + // store the error, call the callbacks, and bail + [fetcher setProperty:error + forKey:kFetcherFetchErrorKey]; + + [self handleParsedObjectForFetcher:fetcher]; + } +} + +// Three methods handle parsing of the fetched JSON data: +// - prepareToParse posts a start notification and then spawns off parsing +// on the operation queue (if there's an operation queue) +// - parseObject does the parsing of the JSON string +// - handleParsedObject posts the stop notification and calls the callback +// with the parsed object or an error +// +// The middle method may run on a separate thread. + +- (void)prepareToParseObjectForFetcher:(GTMHTTPFetcher *)fetcher { + // save the current thread into the fetcher, since we'll handle additional + // fetches and callbacks on this thread + [fetcher setProperty:[NSThread currentThread] + forKey:kFetcherCallbackThreadKey]; + + // copy the run loop modes, if any, so we don't need to access them + // from the parsing thread + [fetcher setProperty:[[[self runLoopModes] copy] autorelease] + forKey:kFetcherCallbackRunLoopModesKey]; + + // we post parsing notifications now to ensure they're on caller's + // original thread + GTLServiceTicket *ticket = [fetcher propertyForKey:kFetcherTicketKey]; + NSNotificationCenter *defaultNC = [NSNotificationCenter defaultCenter]; + [defaultNC postNotificationName:kGTLServiceTicketParsingStartedNotification + object:ticket]; + [fetcher setProperty:@"1" + forKey:kFetcherParsingNotificationKey]; + + id executingQuery = ticket.executingQuery; + if ([executingQuery isBatchQuery]) { + // build a dictionary of expected classes for the batch responses + GTLBatchQuery *batchQuery = executingQuery; + NSArray *queries = batchQuery.queries; + NSDictionary *batchClassMap = [NSMutableDictionary dictionaryWithCapacity:[queries count]]; + for (GTLQuery *query in queries) { + [batchClassMap setValue:query.expectedObjectClass + forKey:query.requestID]; + } + [fetcher setProperty:batchClassMap + forKey:kFetcherBatchClassMapKey]; + } + + // if there's an operation queue, then use that to schedule parsing on another + // thread + SEL parseSel = @selector(parseObjectFromDataOfFetcher:); + NSOperationQueue *queue = self.parseQueue; + if (queue) { + NSInvocationOperation *op; + op = [[[NSInvocationOperation alloc] initWithTarget:self + selector:parseSel + object:fetcher] autorelease]; + ticket.parseOperation = op; + [queue addOperation:op]; + // the fetcher now belongs to the parsing thread + } else { + // parse on the current thread, on Mac OS X 10.4 through 10.5.7 + // or when the project defines GTL_SKIP_PARSE_THREADING + [self performSelector:parseSel + withObject:fetcher]; + } +} + +- (void)parseObjectFromDataOfFetcher:(GTMHTTPFetcher *)fetcher { + // This method runs in a separate thread + + // Generally protect the fetcher properties, since canceling a ticket would + // release the fetcher properties dictionary + NSMutableDictionary *properties = [[fetcher.properties retain] autorelease]; + + // The callback thread is retaining the fetcher, so the fetcher shouldn't keep + // retaining the callback thread + NSThread *callbackThread = [properties valueForKey:kFetcherCallbackThreadKey]; + [[callbackThread retain] autorelease]; + [properties removeObjectForKey:kFetcherCallbackThreadKey]; + + GTLServiceTicket *ticket = [properties valueForKey:kFetcherTicketKey]; + [[ticket retain] autorelease]; + + NSDictionary *responseHeaders = fetcher.responseHeaders; + NSString *contentType = [responseHeaders objectForKey:@"Content-Type"]; + NSData *data = fetcher.downloadedData; + + NSOperation *parseOperation = ticket.parseOperation; + + GTL_DEBUG_ASSERT([contentType hasPrefix:@"application/json"], + @"Got unexpected content type '%@'", contentType); + if ([contentType hasPrefix:@"application/json"] && [data length] > 0) { +#if GTL_LOG_PERFORMANCE + NSTimeInterval secs1, secs2; + secs1 = [NSDate timeIntervalSinceReferenceDate]; +#endif + + NSError *parseError = nil; + NSMutableDictionary *jsonWrapper = [GTLJSONParser objectWithData:data + error:&parseError]; + if ([parseOperation isCancelled]) return; + + if (parseError != nil) { + [properties setValue:parseError forKey:kFetcherFetchErrorKey]; + } else { + NSMutableDictionary *json; + NSDictionary *batchClassMap = nil; + + // In theory, just checking for "application/json-rpc" vs + // "application/json" would work. But the JSON-RPC spec allows for + // "application/json" also so we have to carry a flag all the way in + // saying which type of result to expect and process as. + BOOL isREST = ticket.isREST; + if (isREST) { + if (isRESTDataWrapperRequired_) { + json = [jsonWrapper valueForKey:@"data"]; + } else { + json = jsonWrapper; + } + } else { + batchClassMap = [properties valueForKey:kFetcherBatchClassMapKey]; + if (batchClassMap) { + // A batch gets the whole array as it's json. + json = jsonWrapper; + } else { + json = [jsonWrapper valueForKey:@"result"]; + } + } + + if (json != nil) { + Class defaultClass = [properties valueForKey:kFetcherObjectClassKey]; + NSDictionary *surrogates = ticket.surrogates; + + GTLObject *parsedObject = [GTLObject objectForJSON:json + defaultClass:defaultClass + surrogates:surrogates + batchClassMap:batchClassMap]; + + [properties setValue:parsedObject forKey:kFetcherParsedObjectKey]; + } else if (!isREST) { + NSMutableDictionary *errorJSON = [jsonWrapper valueForKey:@"error"]; + GTL_DEBUG_ASSERT(errorJSON != nil, @"no result or error in response:\n%@", + jsonWrapper); + GTLErrorObject *errorObject = [GTLErrorObject objectWithJSON:errorJSON]; + NSError *error = [errorObject foundationError]; + + // Store the error and let it go to the callback + [properties setValue:error + forKey:kFetcherFetchErrorKey]; + } + } + +#if GTL_LOG_PERFORMANCE + secs2 = [NSDate timeIntervalSinceReferenceDate]; + NSLog(@"allocation of %@ took %f seconds", objectClass, secs2 - secs1); +#endif + } + + if ([parseOperation isCancelled]) return; + + SEL parseDoneSel = @selector(handleParsedObjectForFetcher:); + NSArray *runLoopModes = [properties valueForKey:kFetcherCallbackRunLoopModesKey]; + // If this callback was enqueued, then the fetcher has already released + // its delegateQueue. We'll use our own delegateQueue to determine how to + // invoke the callbacks. + NSOperationQueue *delegateQueue = self.delegateQueue; + if (delegateQueue) { + NSInvocationOperation *op; + op = [[[NSInvocationOperation alloc] initWithTarget:self + selector:parseDoneSel + object:fetcher] autorelease]; + [delegateQueue addOperation:op]; + } else if (runLoopModes) { + [self performSelector:parseDoneSel + onThread:callbackThread + withObject:fetcher + waitUntilDone:NO + modes:runLoopModes]; + } else { + // Defaults to common modes + [self performSelector:parseDoneSel + onThread:callbackThread + withObject:fetcher + waitUntilDone:NO]; + } + // the fetcher now belongs to the callback thread +} + +- (void)handleParsedObjectForFetcher:(GTMHTTPFetcher *)fetcher { + // After parsing is complete, this is invoked on the thread that the + // fetch was performed on + // + // There may not be an object due to a fetch or parsing error + + GTLServiceTicket *ticket = [fetcher propertyForKey:kFetcherTicketKey]; + ticket.parseOperation = nil; + + // unpack the callback parameters + id delegate = [fetcher propertyForKey:kFetcherDelegateKey]; + NSString *selString = [fetcher propertyForKey:kFetcherFinishedSelectorKey]; + SEL finishedSelector = NSSelectorFromString(selString); + +#if NS_BLOCKS_AVAILABLE + GTLServiceCompletionHandler completionHandler; + completionHandler = [fetcher propertyForKey:kFetcherCompletionHandlerKey]; +#else + id completionHandler = nil; +#endif + + GTLObject *object = [fetcher propertyForKey:kFetcherParsedObjectKey]; + NSError *error = [fetcher propertyForKey:kFetcherFetchErrorKey]; + + GTLQuery *executingQuery = (GTLQuery *)ticket.executingQuery; + + BOOL shouldFetchNextPages = ticket.shouldFetchNextPages; + GTLObject *previousObject = ticket.fetchedObject; + + if (shouldFetchNextPages + && (previousObject != nil) + && (object != nil)) { + // Accumulate new results + object = [self mergedNewResultObject:object + oldResultObject:previousObject + forQuery:executingQuery]; + } + + ticket.fetchedObject = object; + ticket.fetchError = error; + + if ([fetcher propertyForKey:kFetcherParsingNotificationKey] != nil) { + // we want to always balance the start and stop notifications + NSNotificationCenter *defaultNC = [NSNotificationCenter defaultCenter]; + [defaultNC postNotificationName:kGTLServiceTicketParsingStoppedNotification + object:ticket]; + } + + BOOL shouldCallCallbacks = YES; + + // Use the nextPageToken to fetch any later pages for non-batch queries + // + // This assumes a pagination model where objects have entries in an "items" + // field and a "nextPageToken" field, and queries support a "pageToken" + // parameter. + if (ticket.shouldFetchNextPages) { + // Determine if we should fetch more pages of results + + GTLQuery *nextPageQuery = [self nextPageQueryForQuery:executingQuery + result:object + ticket:ticket]; + if (nextPageQuery) { + BOOL isFetchingMore = [self fetchNextPageWithQuery:nextPageQuery + delegate:delegate + didFinishedSelector:finishedSelector + completionHandler:completionHandler + ticket:ticket]; + if (isFetchingMore) { + shouldCallCallbacks = NO; + } + } else { + // No more page tokens are present +#if DEBUG && !GTL_SKIP_PAGES_WARNING + // Each next page followed to accumulate all pages of a feed takes up to + // a few seconds. When multiple pages are being fetched, that + // usually indicates that a larger page size (that is, more items per + // feed fetched) should be requested. + // + // To avoid fetching many pages, set query.maxResults so the feed + // requested is large enough to rarely need to follow next links. + NSUInteger pageCount = ticket.pagesFetchedCounter; + if (pageCount > 2) { + NSString *queryLabel = [executingQuery isBatchQuery] ? + @"batch query" : executingQuery.methodName; + NSLog(@"Executing %@ required fetching %u pages; use a query with a" + @" larger maxResults for faster results", + queryLabel, (unsigned int) pageCount); + } +#endif + } + } + + // We no longer care about the queries for page 2 or later, so for the client + // inspecting the ticket in the callback, the executing query should be + // the original one + ticket.executingQuery = ticket.originalQuery; + + if (shouldCallCallbacks) { + // First, call query-specific callback blocks. We do this before the + // fetch callback to let applications do any final clean-up (or update + // their UI) in the fetch callback. + GTLQuery *originalQuery = (GTLQuery *)ticket.originalQuery; +#if NS_BLOCKS_AVAILABLE + if (![originalQuery isBatchQuery]) { + // Single query + GTLServiceCompletionHandler completionBlock = originalQuery.completionBlock; + if (completionBlock) { + completionBlock(ticket, object, error); + } + } else { + // Batch query + // + // We'll step through the queries of the original batch, not of the + // batch result + GTLBatchQuery *batchQuery = (GTLBatchQuery *)originalQuery; + GTLBatchResult *batchResult = (GTLBatchResult *)object; + NSDictionary *successes = batchResult.successes; + NSDictionary *failures = batchResult.failures; + + for (GTLQuery *oneQuery in batchQuery.queries) { + GTLServiceCompletionHandler completionBlock = oneQuery.completionBlock; + if (completionBlock) { + // If there was no networking error, look for a query-specific + // error or result + GTLObject *oneResult = nil; + NSError *oneError = error; + if (oneError == nil) { + NSString *requestID = [oneQuery requestID]; + GTLErrorObject *gtlError = [failures objectForKey:requestID]; + if (gtlError) { + oneError = [gtlError foundationError]; + } else { + oneResult = [successes objectForKey:requestID]; + if (oneResult == nil) { + // We found neither a success nor a failure for this + // query, unexpectedly + GTL_DEBUG_LOG(@"GTLService: Batch result missing for request %@", + requestID); + oneError = [NSError errorWithDomain:kGTLServiceErrorDomain + code:kGTLErrorQueryResultMissing + userInfo:nil]; + } + } + } + completionBlock(ticket, oneResult, oneError); + } + } + } +#endif + // Release query callback blocks + [originalQuery executionDidStop]; + + if (finishedSelector) { + [[self class] invokeCallback:finishedSelector + target:delegate + ticket:ticket + object:object + error:error]; + } + +#if NS_BLOCKS_AVAILABLE + if (completionHandler) { + completionHandler(ticket, object, error); + } +#endif + ticket.hasCalledCallback = YES; + } + fetcher.properties = nil; + +#if NS_BLOCKS_AVAILABLE + // Tickets don't know when the fetch has completed, so the service will + // release their blocks here to avoid unintended retain loops + ticket.retryBlock = nil; + ticket.uploadProgressBlock = nil; +#endif +} + +#pragma mark - + ++ (void)invokeCallback:(SEL)callbackSel + target:(id)target + ticket:(id)ticket + object:(id)object + error:(id)error { + + // GTL fetch callbacks have no return value + NSMethodSignature *signature = [target methodSignatureForSelector:callbackSel]; + NSInvocation *retryInvocation = [NSInvocation invocationWithMethodSignature:signature]; + [retryInvocation setSelector:callbackSel]; + [retryInvocation setTarget:target]; + [retryInvocation setArgument:&ticket atIndex:2]; + [retryInvocation setArgument:&object atIndex:3]; + [retryInvocation setArgument:&error atIndex:4]; + [retryInvocation invoke]; +} + +// The object fetcher may call into this retry method; this one invokes the +// selector provided by the user. +- (BOOL)objectFetcher:(GTMHTTPFetcher *)fetcher willRetry:(BOOL)willRetry forError:(NSError *)error { + + GTLServiceTicket *ticket = [fetcher propertyForKey:kFetcherTicketKey]; + SEL retrySelector = ticket.retrySelector; + if (retrySelector) { + id delegate = [fetcher propertyForKey:kFetcherDelegateKey]; + + willRetry = [self invokeRetrySelector:retrySelector + delegate:delegate + ticket:ticket + willRetry:willRetry + error:error]; + } + +#if NS_BLOCKS_AVAILABLE + BOOL (^retryBlock)(GTLServiceTicket *, BOOL, NSError *) = ticket.retryBlock; + if (retryBlock) { + willRetry = retryBlock(ticket, willRetry, error); + } +#endif + + return willRetry; +} + +- (BOOL)invokeRetrySelector:(SEL)retrySelector + delegate:(id)delegate + ticket:(GTLServiceTicket *)ticket + willRetry:(BOOL)willRetry + error:(NSError *)error { + + if ([delegate respondsToSelector:retrySelector]) { + // Unlike the retry selector invocation in GTMHTTPFetcher, this invocation + // passes the ticket rather than the fetcher as argument 2 + NSMethodSignature *signature = [delegate methodSignatureForSelector:retrySelector]; + NSInvocation *retryInvocation = [NSInvocation invocationWithMethodSignature:signature]; + [retryInvocation setSelector:retrySelector]; + [retryInvocation setTarget:delegate]; + [retryInvocation setArgument:&ticket atIndex:2]; // ticket passed + [retryInvocation setArgument:&willRetry atIndex:3]; + [retryInvocation setArgument:&error atIndex:4]; + [retryInvocation invoke]; + + [retryInvocation getReturnValue:&willRetry]; + } + return willRetry; +} + +- (BOOL)waitForTicket:(GTLServiceTicket *)ticket + timeout:(NSTimeInterval)timeoutInSeconds + fetchedObject:(GTLObject **)outObjectOrNil + error:(NSError **)outErrorOrNil { + + NSDate* giveUpDate = [NSDate dateWithTimeIntervalSinceNow:timeoutInSeconds]; + + // loop until the fetch completes with an object or an error, + // or until the timeout has expired + while (![ticket hasCalledCallback] + && [giveUpDate timeIntervalSinceNow] > 0) { + + // run the current run loop 1/1000 of a second to give the networking + // code a chance to work + NSDate *stopDate = [NSDate dateWithTimeIntervalSinceNow:0.001]; + [[NSRunLoop currentRunLoop] runUntilDate:stopDate]; + } + + NSError *fetchError = ticket.fetchError; + + if (![ticket hasCalledCallback] && fetchError == nil) { + fetchError = [NSError errorWithDomain:kGTLServiceErrorDomain + code:kGTLErrorWaitTimedOut + userInfo:nil]; + } + + if (outObjectOrNil) *outObjectOrNil = ticket.fetchedObject; + if (outErrorOrNil) *outErrorOrNil = fetchError; + + return (fetchError == nil); +} + +#pragma mark - + +// Given a single or batch query and its result, make a new query +// for the next pages, if any. Returns nil if there's no additional +// query to make. +// +// This method calls itself recursively to make the individual next page +// queries for a batch query. +- (id )nextPageQueryForQuery:(GTLQuery *)query + result:(GTLObject *)object + ticket:(GTLServiceTicket *)ticket { + if (!query.isBatchQuery) { + // This is a single query + + // Determine if we should fetch more pages of results + GTLQuery *nextPageQuery = nil; + NSString *nextPageToken = nil; + NSNumber *nextStartIndex = nil; + + if ([object respondsToSelector:@selector(nextPageToken)] + && [query respondsToSelector:@selector(pageToken)]) { + nextPageToken = [object performSelector:@selector(nextPageToken)]; + } + + if ([object respondsToSelector:@selector(nextStartIndex)] + && [query respondsToSelector:@selector(startIndex)]) { + nextStartIndex = [object performSelector:@selector(nextStartIndex)]; + } + + if (nextPageToken || nextStartIndex) { + // Make a query for the next page, preserving the request ID + nextPageQuery = [[query copy] autorelease]; + nextPageQuery.requestID = query.requestID; + + if (nextPageToken) { + [nextPageQuery performSelector:@selector(setPageToken:) + withObject:nextPageToken]; + } else { + // Use KVC to unwrap the scalar type instead of converting the + // NSNumber to an integer and using NSInvocation + [nextPageQuery setValue:nextStartIndex + forKey:@"startIndex"]; + } + } + return nextPageQuery; + } else { + // This is a batch query + // + // Check if there's a next page to fetch for any of the success + // results by invoking this method recursively on each of those results + GTLBatchResult *batchResult = (GTLBatchResult *)object; + GTLBatchQuery *nextPageBatchQuery = nil; + NSDictionary *successes = batchResult.successes; + + for (NSString *requestID in successes) { + GTLObject *singleObject = [successes objectForKey:requestID]; + GTLQuery *singleQuery = [ticket queryForRequestID:requestID]; + + GTLQuery *newQuery = [self nextPageQueryForQuery:singleQuery + result:singleObject + ticket:ticket]; + if (newQuery) { + // There is another query to fetch + if (nextPageBatchQuery == nil) { + nextPageBatchQuery = [GTLBatchQuery batchQuery]; + } + [nextPageBatchQuery addQuery:newQuery]; + } + } + return nextPageBatchQuery; + } +} + +// When a ticket is set to fetch more pages for feeds, this routine +// initiates the fetch for each additional feed page +- (BOOL)fetchNextPageWithQuery:(GTLQuery *)query + delegate:(id)delegate + didFinishedSelector:(SEL)finishedSelector + completionHandler:(GTLServiceCompletionHandler)completionHandler + ticket:(GTLServiceTicket *)ticket { + // Sanity check the number of pages fetched already + NSUInteger oldPagesFetchedCounter = ticket.pagesFetchedCounter; + + if (oldPagesFetchedCounter > kMaxNumberOfNextPagesFetched) { + // Sanity check failed: way too many pages were fetched + // + // The client should be querying with a higher max results per page + // to avoid this + GTL_DEBUG_ASSERT(0, @"Fetched too many next pages for %@", + query.methodName); + return NO; + } + + ticket.pagesFetchedCounter = 1 + oldPagesFetchedCounter; + + GTLServiceTicket *newTicket; + if (query.isBatchQuery) { + newTicket = [self executeBatchQuery:(GTLBatchQuery *)query + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:completionHandler + ticket:ticket]; + } else { + newTicket = [self fetchObjectWithMethodNamed:query.methodName + objectClass:query.expectedObjectClass + parameters:query.JSON + bodyObject:query.bodyObject + requestID:query.requestID + urlQueryParameters:query.urlQueryParameters + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:completionHandler + executingQuery:query + ticket:ticket]; + } + + // In the bizarre case that the fetch didn't begin, newTicket will be + // nil. So long as the new ticket is the same as the ticket we're + // continuing, then we're happy. + return (newTicket == ticket); +} + +// Given a new single or batch result (meaning additional pages for a previous +// query result), merge it into the old result. +- (GTLObject *)mergedNewResultObject:(GTLObject *)newResult + oldResultObject:(GTLObject *)oldResult + forQuery:(GTLQuery *)query { + if (query.isBatchQuery) { + // Batch query result + // + // The new batch results are a subset of the old result's queries, since + // not all queries in the batch necessarily have additional pages. + // + // New success objects replace old success objects, with the old items + // prepended; new failure objects replace old success objects. + // We will update the old batch results with accumulated items, using the + // new objects, and return the old batch. + // + // We reuse the old batch results object because it may include some earlier + // results which did not have additional pages. + GTLBatchResult *newBatchResult = (GTLBatchResult *)newResult; + GTLBatchResult *oldBatchResult = (GTLBatchResult *)oldResult; + + NSMutableDictionary *newSuccesses = newBatchResult.successes; + NSMutableDictionary *newFailures = newBatchResult.failures; + NSMutableDictionary *oldSuccesses = oldBatchResult.successes; + NSMutableDictionary *oldFailures = oldBatchResult.failures; + + for (NSString *requestID in newSuccesses) { + // Prepend the old items to the new response's items + // + // We can assume the objects are collections since they're present in + // additional pages. + GTLCollectionObject *newObj = [newSuccesses objectForKey:requestID]; + GTLCollectionObject *oldObj = [oldSuccesses objectForKey:requestID]; + + NSMutableArray *items = [NSMutableArray arrayWithArray:oldObj.items]; + [items addObjectsFromArray:newObj.items]; + [newObj performSelector:@selector(setItems:) withObject:items]; + + // Replace the old object with the new one + [oldSuccesses setObject:newObj forKey:requestID]; + } + + for (NSString *requestID in newFailures) { + // Replace old successes or failures with the new failure + GTLErrorObject *newError = [newFailures objectForKey:requestID]; + [oldFailures setObject:newError forKey:requestID]; + [oldSuccesses removeObjectForKey:requestID]; + } + return oldBatchResult; + } else { + // Single query result + // + // Merge the items into the new object, and return that. + // + // We can assume the objects are collections since they're present in + // additional pages. + GTLCollectionObject *newObj = (GTLCollectionObject *)newResult; + GTLCollectionObject *oldObj = (GTLCollectionObject *)oldResult; + + NSMutableArray *items = [NSMutableArray arrayWithArray:oldObj.items]; + [items addObjectsFromArray:newObj.items]; + [newObj performSelector:@selector(setItems:) withObject:items]; + + return newObj; + } +} + +#pragma mark - + +// GTLQuery methods. + +- (GTLServiceTicket *)executeQuery:(id)queryObj + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector { + if ([queryObj isBatchQuery]) { + return [self executeBatchQuery:queryObj + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:NULL + ticket:nil]; + } + + GTLQuery *query = [[(GTLQuery *)queryObj copy] autorelease]; + NSString *methodName = query.methodName; + NSDictionary *params = query.JSON; + GTLObject *bodyObject = query.bodyObject; + + return [self fetchObjectWithMethodNamed:methodName + objectClass:query.expectedObjectClass + parameters:params + bodyObject:bodyObject + requestID:query.requestID + urlQueryParameters:query.urlQueryParameters + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:nil + executingQuery:query + ticket:nil]; +} + +#if NS_BLOCKS_AVAILABLE +- (GTLServiceTicket *)executeQuery:(id)queryObj + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler { + if ([queryObj isBatchQuery]) { + return [self executeBatchQuery:queryObj + delegate:nil + didFinishSelector:NULL + completionHandler:handler + ticket:nil]; + } + + GTLQuery *query = [[(GTLQuery *)queryObj copy] autorelease]; + NSString *methodName = query.methodName; + NSDictionary *params = query.JSON; + GTLObject *bodyObject = query.bodyObject; + + return [self fetchObjectWithMethodNamed:methodName + objectClass:query.expectedObjectClass + parameters:params + bodyObject:bodyObject + requestID:query.requestID + urlQueryParameters:query.urlQueryParameters + delegate:nil + didFinishSelector:NULL + completionHandler:handler + executingQuery:query + ticket:nil]; +} +#endif + +#pragma mark - + +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + parameters:(NSDictionary *)parameters + objectClass:(Class)objectClass + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector { + return [self fetchObjectWithMethodNamed:methodName + objectClass:objectClass + parameters:parameters + bodyObject:nil + requestID:nil + urlQueryParameters:nil + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:nil + executingQuery:nil + ticket:nil]; +} + +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + insertingObject:(GTLObject *)bodyObject + objectClass:(Class)objectClass + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector { + return [self fetchObjectWithMethodNamed:methodName + objectClass:objectClass + parameters:nil + bodyObject:bodyObject + requestID:nil + urlQueryParameters:nil + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:nil + executingQuery:nil + ticket:nil]; +} + +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + parameters:(NSDictionary *)parameters + insertingObject:(GTLObject *)bodyObject + objectClass:(Class)objectClass + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector { + return [self fetchObjectWithMethodNamed:methodName + objectClass:objectClass + parameters:parameters + bodyObject:bodyObject + requestID:nil + urlQueryParameters:nil + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:nil + executingQuery:nil + ticket:nil]; +} + +#if NS_BLOCKS_AVAILABLE +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + parameters:(NSDictionary *)parameters + objectClass:(Class)objectClass + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler { + return [self fetchObjectWithMethodNamed:methodName + objectClass:objectClass + parameters:parameters + bodyObject:nil + requestID:nil + urlQueryParameters:nil + delegate:nil + didFinishSelector:NULL + completionHandler:handler + executingQuery:nil + ticket:nil]; +} + +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + insertingObject:(GTLObject *)bodyObject + objectClass:(Class)objectClass + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler { + return [self fetchObjectWithMethodNamed:methodName + objectClass:objectClass + parameters:nil + bodyObject:bodyObject + requestID:nil + urlQueryParameters:nil + delegate:nil + didFinishSelector:NULL + completionHandler:handler + executingQuery:nil + ticket:nil]; +} + +- (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName + parameters:(NSDictionary *)parameters + insertingObject:(GTLObject *)bodyObject + objectClass:(Class)objectClass + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler { + return [self fetchObjectWithMethodNamed:methodName + objectClass:objectClass + parameters:parameters + bodyObject:bodyObject + requestID:nil + urlQueryParameters:nil + delegate:nil + didFinishSelector:NULL + completionHandler:handler + executingQuery:nil + ticket:nil]; +} +#endif + +#pragma mark - + +// These external entry points doing a REST style fetch. + +- (GTLServiceTicket *)fetchObjectWithURL:(NSURL *)feedURL + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector { + // no object class specified; use registered class + return [self fetchObjectWithURL:feedURL + objectClass:nil + bodyObject:nil + ETag:nil + httpMethod:nil + mayAuthorize:YES + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:nil + ticket:nil]; +} + +- (GTLServiceTicket *)fetchPublicObjectWithURL:(NSURL *)feedURL + objectClass:(Class)objectClass + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector { + return [self fetchObjectWithURL:feedURL + objectClass:objectClass + bodyObject:nil + ETag:nil + httpMethod:nil + mayAuthorize:NO + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:nil + ticket:nil]; +} + +- (GTLServiceTicket *)fetchObjectWithURL:(NSURL *)feedURL + objectClass:(Class)objectClass + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector { + return [self fetchObjectWithURL:feedURL + objectClass:objectClass + bodyObject:nil + ETag:nil + httpMethod:nil + mayAuthorize:YES + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:nil + ticket:nil]; +} + + +- (GTLServiceTicket *)fetchObjectByInsertingObject:(GTLObject *)bodyToPost + forURL:(NSURL *)destinationURL + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector { + Class objClass = [bodyToPost class]; + NSString *etag = ETagIfPresent(bodyToPost); + + return [self fetchObjectWithURL:destinationURL + objectClass:objClass + bodyObject:bodyToPost + ETag:etag + httpMethod:@"POST" + mayAuthorize:YES + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:nil + ticket:nil]; +} + +- (GTLServiceTicket *)fetchObjectByUpdatingObject:(GTLObject *)bodyToPut + forURL:(NSURL *)destinationURL + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector { + Class objClass = [bodyToPut class]; + NSString *etag = ETagIfPresent(bodyToPut); + + return [self fetchObjectWithURL:destinationURL + objectClass:objClass + bodyObject:bodyToPut + ETag:etag + httpMethod:@"PUT" + mayAuthorize:YES + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:nil + ticket:nil]; +} + + +- (GTLServiceTicket *)deleteResourceURL:(NSURL *)destinationURL + ETag:(NSString *)etagOrNil + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector { + return [self fetchObjectWithURL:destinationURL + objectClass:nil + bodyObject:nil + ETag:etagOrNil + httpMethod:@"DELETE" + mayAuthorize:YES + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:nil + ticket:nil]; +} + + +#if NS_BLOCKS_AVAILABLE +- (GTLServiceTicket *)fetchObjectWithURL:(NSURL *)objectURL + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler { + return [self fetchObjectWithURL:objectURL + objectClass:nil + bodyObject:nil + ETag:nil + httpMethod:nil + mayAuthorize:YES + delegate:nil + didFinishSelector:NULL + completionHandler:handler + ticket:nil]; +} + +- (GTLServiceTicket *)fetchObjectByInsertingObject:(GTLObject *)bodyToPost + forURL:(NSURL *)destinationURL + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler { + Class objClass = [bodyToPost class]; + NSString *etag = ETagIfPresent(bodyToPost); + + return [self fetchObjectWithURL:destinationURL + objectClass:objClass + bodyObject:bodyToPost + ETag:etag + httpMethod:@"POST" + mayAuthorize:YES + delegate:nil + didFinishSelector:NULL + completionHandler:handler + ticket:nil]; +} + +- (GTLServiceTicket *)fetchObjectByUpdatingObject:(GTLObject *)bodyToPut + forURL:(NSURL *)destinationURL + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler { + Class objClass = [bodyToPut class]; + NSString *etag = ETagIfPresent(bodyToPut); + + return [self fetchObjectWithURL:destinationURL + objectClass:objClass + bodyObject:bodyToPut + ETag:etag + httpMethod:@"PUT" + mayAuthorize:YES + delegate:nil + didFinishSelector:NULL + completionHandler:handler + ticket:nil]; +} + +- (GTLServiceTicket *)deleteResourceURL:(NSURL *)destinationURL + ETag:(NSString *)etagOrNil + completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler { + return [self fetchObjectWithURL:destinationURL + objectClass:nil + bodyObject:nil + ETag:etagOrNil + httpMethod:@"DELETE" + mayAuthorize:YES + delegate:nil + didFinishSelector:NULL + completionHandler:handler + ticket:nil]; +} + +#endif // NS_BLOCKS_AVAILABLE + +#pragma mark - + +- (NSString *)userAgent { + return userAgent_; +} + +- (void)setExactUserAgent:(NSString *)userAgent { + // internal use only + [userAgent_ release]; + userAgent_ = [userAgent copy]; +} + +- (void)setUserAgent:(NSString *)userAgent { + // remove whitespace and unfriendly characters + NSString *str = GTMCleanedUserAgentString(userAgent); + [self setExactUserAgent:str]; +} + +// +// The following methods pass through to the fetcher service object +// + +- (void)setCookieStorageMethod:(NSInteger)method { + self.fetcherService.cookieStorageMethod = method; +} + +- (NSInteger)cookieStorageMethod { + return self.fetcherService.cookieStorageMethod; +} + +- (void)setShouldFetchInBackground:(BOOL)flag { + self.fetcherService.shouldFetchInBackground = flag; +} + +- (BOOL)shouldFetchInBackground { + return self.fetcherService.shouldFetchInBackground; +} + +- (void)setDelegateQueue:(NSOperationQueue *)delegateQueue { + self.fetcherService.delegateQueue = delegateQueue; +} + +- (NSOperationQueue *)delegateQueue { + return self.fetcherService.delegateQueue; +} + +- (void)setRunLoopModes:(NSArray *)array { + self.fetcherService.runLoopModes = array; +} + +- (NSArray *)runLoopModes { + return self.fetcherService.runLoopModes; +} + +#pragma mark - + +// The service properties becomes the initial value for each future ticket's +// properties +- (void)setServiceProperties:(NSDictionary *)dict { + [serviceProperties_ autorelease]; + serviceProperties_ = [dict mutableCopy]; +} + +- (NSDictionary *)serviceProperties { + // be sure the returned pointer has the life of the autorelease pool, + // in case self is released immediately + return [[serviceProperties_ retain] autorelease]; +} + +- (void)setServiceProperty:(id)obj forKey:(NSString *)key { + + if (obj == nil) { + // user passed in nil, so delete the property + [serviceProperties_ removeObjectForKey:key]; + } else { + // be sure the property dictionary exists + if (serviceProperties_ == nil) { + [self setServiceProperties:[NSDictionary dictionary]]; + } + [serviceProperties_ setObject:obj forKey:key]; + } +} + +- (id)servicePropertyForKey:(NSString *)key { + id obj = [serviceProperties_ objectForKey:key]; + + // be sure the returned pointer has the life of the autorelease pool, + // in case self is released immediately + return [[obj retain] autorelease]; +} + +- (void)setServiceUserData:(id)userData { + [self setServiceProperty:userData forKey:kUserDataPropertyKey]; +} + +- (id)serviceUserData { + return [[[self servicePropertyForKey:kUserDataPropertyKey] retain] autorelease]; +} + +- (void)setAuthorizer:(id )authorizer { + self.fetcherService.authorizer = authorizer; +} + +- (id )authorizer { + return self.fetcherService.authorizer; +} + ++ (NSUInteger)defaultServiceUploadChunkSize { + // subclasses may override + return kStandardUploadChunkSize; +} + +- (NSUInteger)serviceUploadChunkSize { + return uploadChunkSize_; +} + +- (void)setServiceUploadChunkSize:(NSUInteger)val { + + if (val == kGTLStandardUploadChunkSize) { + // determine an appropriate upload chunk size for the system + + if (![GTMHTTPFetcher doesSupportSentDataCallback]) { + // for 10.4 and iPhone 2, we need a small upload chunk size so there + // are frequent intrachunk callbacks for progress monitoring + val = 75000; + } else { +#if GTL_IPHONE + val = 1000000; +#else + if (NSFoundationVersionNumber >= 751.00) { + // Mac OS X 10.6 + // + // we'll pick a huge upload chunk size, which minimizes http overhead + // and server effort, and we'll hope that NSURLConnection can finally + // handle big uploads reliably + val = 25000000; + } else { + // Mac OS X 10.5 + // + // NSURLConnection is more reliable on POSTs in 10.5 than it was in + // 10.4, but it still fails mysteriously on big uploads on some + // systems, so we'll limit the chunks to a megabyte + val = 1000000; + } +#endif + } + } + uploadChunkSize_ = val; +} + +@end + +@implementation GTLServiceTicket + +@synthesize shouldFetchNextPages = shouldFetchNextPages_, + surrogates = surrogates_, + uploadProgressSelector = uploadProgressSelector_, + retryEnabled = isRetryEnabled_, + hasCalledCallback = hasCalledCallback_, + retrySelector = retrySelector_, + maxRetryInterval = maxRetryInterval_, + objectFetcher = objectFetcher_, + postedObject = postedObject_, + fetchedObject = fetchedObject_, + executingQuery = executingQuery_, + originalQuery = originalQuery_, + fetchError = fetchError_, + pagesFetchedCounter = pagesFetchedCounter_, + APIKey = apiKey_, + parseOperation = parseOperation_, + isREST = isREST_; + +#if NS_BLOCKS_AVAILABLE +@synthesize retryBlock = retryBlock_; +#endif + ++ (id)ticketForService:(GTLService *)service { + return [[[self alloc] initWithService:service] autorelease]; +} + +- (id)initWithService:(GTLService *)service { + self = [super init]; + if (self) { + service_ = [service retain]; + + ticketProperties_ = [service.serviceProperties mutableCopy]; + surrogates_ = [service.surrogates retain]; + uploadProgressSelector_ = service.uploadProgressSelector; + isRetryEnabled_ = service.retryEnabled; + retrySelector_ = service.retrySelector; + maxRetryInterval_ = service.maxRetryInterval; + shouldFetchNextPages_ = service.shouldFetchNextPages; + apiKey_ = [service.APIKey copy]; + +#if NS_BLOCKS_AVAILABLE + uploadProgressBlock_ = [service.uploadProgressBlock copy]; + retryBlock_ = [service.retryBlock copy]; +#endif + } + return self; +} + +- (void)dealloc { + [service_ release]; + [ticketProperties_ release]; + [surrogates_ release]; + [objectFetcher_ release]; +#if NS_BLOCKS_AVAILABLE + [uploadProgressBlock_ release]; + [retryBlock_ release]; +#endif + [postedObject_ release]; + [fetchedObject_ release]; + [executingQuery_ release]; + [originalQuery_ release]; + [fetchError_ release]; + [apiKey_ release]; + [parseOperation_ release]; + + [super dealloc]; +} + +- (NSString *)description { + NSString *devKeyInfo = @""; + if (apiKey_ != nil) { + devKeyInfo = [NSString stringWithFormat:@" devKey:%@", apiKey_]; + } + + NSString *authorizerInfo = @""; + id authorizer = self.objectFetcher.authorizer; + if (authorizer != nil) { + authorizerInfo = [NSString stringWithFormat:@" authorizer:%@", authorizer]; + } + + return [NSString stringWithFormat:@"%@ %p: {service:%@%@%@ fetcher:%@ }", + [self class], self, service_, devKeyInfo, authorizerInfo, objectFetcher_]; +} + +- (void)pauseUpload { + BOOL canPause = [objectFetcher_ respondsToSelector:@selector(pauseFetching)]; + GTL_DEBUG_ASSERT(canPause, @"unpauseable ticket"); + + if (canPause) { + [(GTMHTTPUploadFetcher *)objectFetcher_ pauseFetching]; + } +} + +- (void)resumeUpload { + BOOL canResume = [objectFetcher_ respondsToSelector:@selector(resumeFetching)]; + GTL_DEBUG_ASSERT(canResume, @"unresumable ticket"); + + if (canResume) { + [(GTMHTTPUploadFetcher *)objectFetcher_ resumeFetching]; + } +} + +- (BOOL)isUploadPaused { + BOOL isPausable = [objectFetcher_ respondsToSelector:@selector(isPaused)]; + GTL_DEBUG_ASSERT(isPausable, @"unpauseable ticket"); + + if (isPausable) { + return [(GTMHTTPUploadFetcher *)objectFetcher_ isPaused]; + } + return NO; +} + +- (void)cancelTicket { + NSOperation *parseOperation = self.parseOperation; + [parseOperation cancel]; + self.parseOperation = nil; + + [objectFetcher_ stopFetching]; + objectFetcher_.properties = nil; + + self.objectFetcher = nil; + self.properties = nil; + self.uploadProgressSelector = nil; + +#if NS_BLOCKS_AVAILABLE + self.uploadProgressBlock = nil; + self.retryBlock = nil; +#endif + [self.executingQuery executionDidStop]; + self.executingQuery = self.originalQuery; + + [service_ autorelease]; + service_ = nil; +} + +- (id)service { + return service_; +} + +- (void)setUserData:(id)userData { + [self setProperty:userData forKey:kUserDataPropertyKey]; +} + +- (id)userData { + // be sure the returned pointer has the life of the autorelease pool, + // in case self is released immediately + return [[[self propertyForKey:kUserDataPropertyKey] retain] autorelease]; +} + +- (void)setProperties:(NSDictionary *)dict { + [ticketProperties_ autorelease]; + ticketProperties_ = [dict mutableCopy]; +} + +- (NSDictionary *)properties { + // be sure the returned pointer has the life of the autorelease pool, + // in case self is released immediately + return [[ticketProperties_ retain] autorelease]; +} + +- (void)setProperty:(id)obj forKey:(NSString *)key { + if (obj == nil) { + // user passed in nil, so delete the property + [ticketProperties_ removeObjectForKey:key]; + } else { + // be sure the property dictionary exists + if (ticketProperties_ == nil) { + // call setProperties so observers are notified + [self setProperties:[NSDictionary dictionary]]; + } + [ticketProperties_ setObject:obj forKey:key]; + } +} + +- (id)propertyForKey:(NSString *)key { + id obj = [ticketProperties_ objectForKey:key]; + + // be sure the returned pointer has the life of the autorelease pool, + // in case self is released immediately + return [[obj retain] autorelease]; +} + +- (NSDictionary *)surrogates { + return surrogates_; +} + +- (void)setSurrogates:(NSDictionary *)dict { + [surrogates_ autorelease]; + surrogates_ = [dict retain]; +} + +- (SEL)uploadProgressSelector { + return uploadProgressSelector_; +} + +- (void)setUploadProgressSelector:(SEL)progressSelector { + uploadProgressSelector_ = progressSelector; + + // if the user is turning on the progress selector in the ticket after the + // ticket's fetcher has been created, we need to give the fetcher our sentData + // callback. + // + // The progress monitor must be set in the service prior to creation of the + // ticket on 10.4 and iPhone 2.0, since on those systems the upload data must + // be wrapped with a ProgressMonitorInputStream prior to the creation of the + // fetcher. + if (progressSelector != NULL) { + SEL sentDataSel = @selector(objectFetcher:didSendBytes:totalBytesSent:totalBytesExpectedToSend:); + [[self objectFetcher] setSentDataSelector:sentDataSel]; + } +} + +#if NS_BLOCKS_AVAILABLE +- (void)setUploadProgressBlock:(GTLServiceUploadProgressBlock)block { + [uploadProgressBlock_ autorelease]; + uploadProgressBlock_ = [block copy]; + + if (uploadProgressBlock_) { + // As above, we need the fetcher to call us back when bytes are sent. + SEL sentDataSel = @selector(objectFetcher:didSendBytes:totalBytesSent:totalBytesExpectedToSend:); + [[self objectFetcher] setSentDataSelector:sentDataSel]; + } +} + +- (GTLServiceUploadProgressBlock)uploadProgressBlock { + return uploadProgressBlock_; +} +#endif + +- (NSInteger)statusCode { + return [objectFetcher_ statusCode]; +} + +- (GTLQuery *)queryForRequestID:(NSString *)requestID { + id queryObj = self.executingQuery; + if ([queryObj isBatchQuery]) { + GTLBatchQuery *batch = (GTLBatchQuery *)queryObj; + GTLQuery *result = [batch queryForRequestID:requestID]; + return result; + } else { + GTL_DEBUG_ASSERT(0, @"just use ticket.executingQuery"); + return nil; + } +} + +@end diff --git a/GTL/Source/Objects/GTLUploadParameters.h b/GTL/Source/Objects/GTLUploadParameters.h new file mode 100644 index 0000000..9abd275 --- /dev/null +++ b/GTL/Source/Objects/GTLUploadParameters.h @@ -0,0 +1,60 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUploadParameters.h +// + +// Uploading documentation: +// https://code.google.com/p/google-api-objectivec-client/wiki/Introduction#Uploading_Files + +#import + +#import "GTLDefines.h" + +@interface GTLUploadParameters : NSObject { + @private + NSString *MIMEType_; + NSData *data_; + NSFileHandle *fileHandle_; + NSURL *uploadLocationURL_; + NSString *slug_; + BOOL shouldSendUploadOnly_; +} + +// Uploading requires MIME type and one of +// - data to be uploaded +// - file handle for uploading +@property (copy) NSString *MIMEType; +@property (retain) NSData *data; +@property (retain) NSFileHandle *fileHandle; + +// Resuming an in-progress upload is done with the upload location URL, +// and requires a file handle for uploading +@property (retain) NSURL *uploadLocationURL; + +// Some services need a slug (filename) header +@property (copy) NSString *slug; + +// Uploads may be done without a JSON body in the initial request +@property (assign) BOOL shouldSendUploadOnly; + ++ (GTLUploadParameters *)uploadParametersWithData:(NSData *)data + MIMEType:(NSString *)mimeType; + ++ (GTLUploadParameters *)uploadParametersWithFileHandle:(NSFileHandle *)fileHandle + MIMEType:(NSString *)mimeType; + +@end diff --git a/GTL/Source/Objects/GTLUploadParameters.m b/GTL/Source/Objects/GTLUploadParameters.m new file mode 100644 index 0000000..1a668a9 --- /dev/null +++ b/GTL/Source/Objects/GTLUploadParameters.m @@ -0,0 +1,107 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLObject.m +// + +#include + +#import "GTLUploadParameters.h" + +@implementation GTLUploadParameters + +@synthesize MIMEType = MIMEType_, + data = data_, + fileHandle = fileHandle_, + uploadLocationURL = uploadLocationURL_, + slug = slug_, + shouldSendUploadOnly = shouldSendUploadOnly_; + ++ (GTLUploadParameters *)uploadParametersWithData:(NSData *)data + MIMEType:(NSString *)mimeType { + GTLUploadParameters *params = [[[GTLUploadParameters alloc] init] autorelease]; + params.data = data; + params.MIMEType = mimeType; + return params; +} + ++ (GTLUploadParameters *)uploadParametersWithFileHandle:(NSFileHandle *)fileHandle + MIMEType:(NSString *)mimeType { + GTLUploadParameters *params = [[[GTLUploadParameters alloc] init] autorelease]; + params.fileHandle = fileHandle; + params.MIMEType = mimeType; + return params; +} + +- (id)copyWithZone:(NSZone *)zone { + GTLUploadParameters *newParams = [[[self class] allocWithZone:zone] init]; + newParams.MIMEType = self.MIMEType; + newParams.data = self.data; + newParams.fileHandle = self.fileHandle; + newParams.uploadLocationURL = self.uploadLocationURL; + newParams.slug = self.slug; + newParams.shouldSendUploadOnly = self.shouldSendUploadOnly; + return newParams; +} + +- (void)dealloc { + [MIMEType_ release]; + [data_ release]; + [fileHandle_ release]; + [uploadLocationURL_ release]; + [slug_ release]; + + [super dealloc]; +} + +- (NSString *)description { + NSMutableArray *array = [NSMutableArray array]; + NSString *str = [NSString stringWithFormat:@"MIMEType:%@", MIMEType_]; + [array addObject:str]; + + if (data_) { + str = [NSString stringWithFormat:@"data:%llu bytes", + (unsigned long long)[data_ length]]; + [array addObject:str]; + } + + if (fileHandle_) { + str = [NSString stringWithFormat:@"fileHandle:%@", fileHandle_]; + [array addObject:str]; + } + + if (uploadLocationURL_) { + str = [NSString stringWithFormat:@"uploadLocation:%@", + [uploadLocationURL_ absoluteString]]; + [array addObject:str]; + } + + if (slug_) { + str = [NSString stringWithFormat:@"slug:%@", slug_]; + [array addObject:str]; + } + + if (shouldSendUploadOnly_) { + [array addObject:@"shouldSendUploadOnly"]; + } + + NSString *descStr = [array componentsJoinedByString:@", "]; + str = [NSString stringWithFormat:@"%@ %p: {%@}", + [self class], self, descStr]; + return str; +} + +@end diff --git a/GTL/Source/ReleaseNotes.txt b/GTL/Source/ReleaseNotes.txt new file mode 100644 index 0000000..28b3272 --- /dev/null +++ b/GTL/Source/ReleaseNotes.txt @@ -0,0 +1,92 @@ +Google APIs Client Library for Objective-C +Release Notes + +Project site: http://code.google.com/p/google-api-objectivec-client/ +Discussion group: http://groups.google.com/group/google-api-objectivec-client + +6-Dec-2012 + +Added support for additional compiler warnings (thanks noloader). + +Worked around limitations in NSDecimalNumber's handling of 64-bit integers. + +Removed SBJSON from the GTL project. Individual apps my choose to include the +SBJSON files for compatibility with older operating systems that do not have +NSJSONSerialization. + + +6-Aug-2012 + +GTLObject now supports indexed subscript access to items as a synonym for itemAtIndex: + +GTLDateTime is now an immutable class, to avoid accidental changes to instances +that have been added to an object tree. + + +30-May-2012 + +Calendar API now properly exposes GTLDateTimes for max/min times. + + +15-March-2012 + +Moved base64 encoding and decoding support to GTLBase64 file. + + +22-December-2011 + +Fixed waitForTicket's return value on delete fetches. + + +12-December-2011 + +String properties in objects are now copied rather than retained. + + +1-December-2011 + +Fixed handling of nil date-time fields in server responses. + + +17-November-2011 + +Added interfaces for Calendar. + + +17-October-2011 + +Added chunked (resumable) upload support and additional http headers to +query class. + + +20-September-2011 + +Added per-query callback blocks, especially useful for queries executes in +a batch. + +Added shouldFetchNextPages support for collections fetched in batch queries + +Added interfaces for orkut + + +15-September-2011 + +Added interfaces for Google Plus. + + +13-September-2011 + +Added interfaces for Blogger. + + +7-September-2011 + +Added generated interfaces for Google Analytics. + + +Release 2.0.0 +29-August-2011 + +Initial public release of the JSON-based API library. Includes standard object, +service, and query classes, and unit tests. Includes classes for Books, +Latitude, Shopping, Tasks and URL Shortener. diff --git a/GTL/Source/Resources/.svn/all-wcprops b/GTL/Source/Resources/.svn/all-wcprops new file mode 100644 index 0000000..f701dcd --- /dev/null +++ b/GTL/Source/Resources/.svn/all-wcprops @@ -0,0 +1,23 @@ +K 25 +svn:wc:ra_dav:version-url +V 39 +/svn/!svn/ver/14/trunk/Source/Resources +END +DevTestTool-Info.plist +K 25 +svn:wc:ra_dav:version-url +V 62 +/svn/!svn/ver/14/trunk/Source/Resources/DevTestTool-Info.plist +END +GTLFramework-Info.plist +K 25 +svn:wc:ra_dav:version-url +V 63 +/svn/!svn/ver/14/trunk/Source/Resources/GTLFramework-Info.plist +END +GTLUnitTests-Info.plist +K 25 +svn:wc:ra_dav:version-url +V 63 +/svn/!svn/ver/14/trunk/Source/Resources/GTLUnitTests-Info.plist +END diff --git a/GTL/Source/Resources/.svn/entries b/GTL/Source/Resources/.svn/entries new file mode 100644 index 0000000..d44c403 --- /dev/null +++ b/GTL/Source/Resources/.svn/entries @@ -0,0 +1,130 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Resources +http://google-api-objectivec-client.googlecode.com/svn + + + +2011-06-24T20:24:16.908736Z +14 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +DevTestTool-Info.plist +file + + + + +2012-12-09T08:42:33.000000Z +9debb0310a0108604f9967230ff43b43 +2011-06-24T20:24:16.908736Z +14 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +757 + +GTLFramework-Info.plist +file + + + + +2012-12-09T08:42:33.000000Z +6a0c8951e1b3781e5502cd6679fcbbe0 +2011-06-24T20:24:16.908736Z +14 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +615 + +GTLUnitTests-Info.plist +file + + + + +2012-12-09T08:42:33.000000Z +d72861bf9c3beaa473f8cca2ea28a0dd +2011-06-24T20:24:16.908736Z +14 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +615 + diff --git a/GTL/Source/Resources/.svn/text-base/DevTestTool-Info.plist.svn-base b/GTL/Source/Resources/.svn/text-base/DevTestTool-Info.plist.svn-base new file mode 100644 index 0000000..9bd0edd --- /dev/null +++ b/GTL/Source/Resources/.svn/text-base/DevTestTool-Info.plist.svn-base @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.yourcompany.DevelopmentTestApplication + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.1 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/GTL/Source/Resources/.svn/text-base/GTLFramework-Info.plist.svn-base b/GTL/Source/Resources/.svn/text-base/GTLFramework-Info.plist.svn-base new file mode 100644 index 0000000..04d8a69 --- /dev/null +++ b/GTL/Source/Resources/.svn/text-base/GTLFramework-Info.plist.svn-base @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.google.GTLFramework + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + FMWK + CFBundleSignature + ???? + CFBundleVersion + 2.0 + + diff --git a/GTL/Source/Resources/.svn/text-base/GTLUnitTests-Info.plist.svn-base b/GTL/Source/Resources/.svn/text-base/GTLUnitTests-Info.plist.svn-base new file mode 100644 index 0000000..42849b3 --- /dev/null +++ b/GTL/Source/Resources/.svn/text-base/GTLUnitTests-Info.plist.svn-base @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.google.GTLUnitTests + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleSignature + ???? + CFBundleVersion + 2.0 + + diff --git a/GTL/Source/Resources/DevTestTool-Info.plist b/GTL/Source/Resources/DevTestTool-Info.plist new file mode 100644 index 0000000..9bd0edd --- /dev/null +++ b/GTL/Source/Resources/DevTestTool-Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.yourcompany.DevelopmentTestApplication + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.1 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/GTL/Source/Resources/GTLFramework-Info.plist b/GTL/Source/Resources/GTLFramework-Info.plist new file mode 100644 index 0000000..04d8a69 --- /dev/null +++ b/GTL/Source/Resources/GTLFramework-Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.google.GTLFramework + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + FMWK + CFBundleSignature + ???? + CFBundleVersion + 2.0 + + diff --git a/GTL/Source/Resources/GTLUnitTests-Info.plist b/GTL/Source/Resources/GTLUnitTests-Info.plist new file mode 100644 index 0000000..42849b3 --- /dev/null +++ b/GTL/Source/Resources/GTLUnitTests-Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.google.GTLUnitTests + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleSignature + ???? + CFBundleVersion + 2.0 + + diff --git a/GTL/Source/Services/.svn/all-wcprops b/GTL/Source/Services/.svn/all-wcprops new file mode 100644 index 0000000..d6e964a --- /dev/null +++ b/GTL/Source/Services/.svn/all-wcprops @@ -0,0 +1,5 @@ +K 25 +svn:wc:ra_dav:version-url +V 39 +/svn/!svn/ver/248/trunk/Source/Services +END diff --git a/GTL/Source/Services/.svn/entries b/GTL/Source/Services/.svn/entries new file mode 100644 index 0000000..9c56e65 --- /dev/null +++ b/GTL/Source/Services/.svn/entries @@ -0,0 +1,85 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-12-06T21:11:28.758294Z +248 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +Blogger +dir + +AdSense +dir + +Plus +dir + +Tasks +dir + +Analytics +dir + +Shopping +dir + +Urlshortener +dir + +YouTube +dir + +Groupssettings +dir + +Orkut +dir + +Storage +dir + +Discovery +dir + +Calendar +dir + +CivicInfo +dir + +Drive +dir + +Latitude +dir + +Licensing +dir + +Compute +dir + +Books +dir + diff --git a/GTL/Source/Services/AdSense/.svn/all-wcprops b/GTL/Source/Services/AdSense/.svn/all-wcprops new file mode 100644 index 0000000..25f4803 --- /dev/null +++ b/GTL/Source/Services/AdSense/.svn/all-wcprops @@ -0,0 +1,5 @@ +K 25 +svn:wc:ra_dav:version-url +V 47 +/svn/!svn/ver/235/trunk/Source/Services/AdSense +END diff --git a/GTL/Source/Services/AdSense/.svn/entries b/GTL/Source/Services/AdSense/.svn/entries new file mode 100644 index 0000000..933a99d --- /dev/null +++ b/GTL/Source/Services/AdSense/.svn/entries @@ -0,0 +1,31 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/AdSense +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +Generated +dir + diff --git a/GTL/Source/Services/AdSense/Generated/.svn/all-wcprops b/GTL/Source/Services/AdSense/Generated/.svn/all-wcprops new file mode 100644 index 0000000..20d1901 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/all-wcprops @@ -0,0 +1,245 @@ +K 25 +svn:wc:ra_dav:version-url +V 57 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated +END +GTLAdSense.h +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSense.h +END +GTLAdSenseSavedReports.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseSavedReports.h +END +GTLAdSenseSavedReports.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseSavedReports.m +END +GTLAdSenseCustomChannels.h +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseCustomChannels.h +END +GTLAdSenseSavedAdStyle.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseSavedAdStyle.h +END +GTLAdSenseAdsenseReportsGenerateResponse.h +K 25 +svn:wc:ra_dav:version-url +V 100 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseAdsenseReportsGenerateResponse.h +END +GTLAdSenseCustomChannels.m +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseCustomChannels.m +END +GTLAdSenseAccount.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseAccount.h +END +GTLAdSenseSavedAdStyle.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseSavedAdStyle.m +END +GTLAdSenseAdsenseReportsGenerateResponse.m +K 25 +svn:wc:ra_dav:version-url +V 100 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseAdsenseReportsGenerateResponse.m +END +GTLServiceAdSense.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLServiceAdSense.h +END +GTLAdSenseAccount.m +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseAccount.m +END +GTLAdSenseCustomChannel.h +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseCustomChannel.h +END +GTLQueryAdSense.h +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLQueryAdSense.h +END +GTLServiceAdSense.m +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLServiceAdSense.m +END +GTLAdSenseAdClients.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseAdClients.h +END +GTLAdSenseCustomChannel.m +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseCustomChannel.m +END +GTLQueryAdSense.m +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLQueryAdSense.m +END +GTLAdSenseAdClients.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseAdClients.m +END +GTLAdSenseSavedAdStyles.h +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseSavedAdStyles.h +END +GTLAdSenseConstants.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseConstants.h +END +GTLAdSenseUrlChannels.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseUrlChannels.h +END +GTLAdSenseAccounts.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseAccounts.h +END +GTLAdSenseSavedAdStyles.m +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseSavedAdStyles.m +END +GTLAdSenseConstants.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseConstants.m +END +GTLAdSenseAdClient.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseAdClient.h +END +GTLAdSenseUrlChannels.m +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseUrlChannels.m +END +GTLAdSenseAccounts.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseAccounts.m +END +GTLAdSenseAdUnit.h +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseAdUnit.h +END +GTLAdSense_Sources.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSense_Sources.m +END +GTLAdSenseAdClient.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseAdClient.m +END +GTLAdSenseAdUnit.m +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseAdUnit.m +END +GTLAdSenseUrlChannel.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseUrlChannel.h +END +GTLAdSenseSavedReport.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseSavedReport.h +END +GTLAdSenseUrlChannel.m +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseUrlChannel.m +END +GTLAdSenseSavedReport.m +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseSavedReport.m +END +GTLAdSenseAdStyle.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseAdStyle.h +END +GTLAdSenseAdUnits.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseAdUnits.h +END +GTLAdSenseAdStyle.m +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseAdStyle.m +END +GTLAdSenseAdUnits.m +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/235/trunk/Source/Services/AdSense/Generated/GTLAdSenseAdUnits.m +END diff --git a/GTL/Source/Services/AdSense/Generated/.svn/entries b/GTL/Source/Services/AdSense/Generated/.svn/entries new file mode 100644 index 0000000..03ee3ce --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/entries @@ -0,0 +1,1388 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/AdSense/Generated +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +GTLAdSense.h +file + + + + +2012-12-09T08:42:30.000000Z +18c77a0a6e44c3db8bb0dce911f8a3c2 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1649 + +GTLAdSenseSavedReports.h +file + + + + +2012-12-09T08:42:30.000000Z +5bac3eea4c6bcddebf0e20b34948ab83 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2043 + +GTLAdSenseSavedReports.m +file + + + + +2012-12-09T08:42:30.000000Z +5900d109b879c8a318e520bc03c8c35c +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1840 + +GTLAdSenseCustomChannels.h +file + + + + +2012-12-09T08:42:30.000000Z +c6e5674ee5e15a479b1e4714a77423a1 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2061 + +GTLAdSenseSavedAdStyle.h +file + + + + +2012-12-09T08:42:30.000000Z +78c95f97a86ef3ffddb99fb1c0fb0b06 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1919 + +GTLAdSenseAdsenseReportsGenerateResponse.h +file + + + + +2012-12-09T08:42:30.000000Z +bc831734af9c037d7580bd443725f58e +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3554 + +GTLAdSenseCustomChannels.m +file + + + + +2012-12-09T08:42:30.000000Z +fa61e7227b4c2ecf99bfe7589aac35f6 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1856 + +GTLAdSenseAccount.h +file + + + + +2012-12-09T08:42:30.000000Z +43fe00eea24faf0ad33f7c21f6c93c5e +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1874 + +GTLAdSenseSavedAdStyle.m +file + + + + +2012-12-09T08:42:30.000000Z +faa1cb48059455b1e509521ea8417f17 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1637 + +GTLAdSenseAdsenseReportsGenerateResponse.m +file + + + + +2012-12-09T08:42:30.000000Z +d7e9dff421688997c67ad6124fa03cca +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2261 + +GTLServiceAdSense.h +file + + + + +2012-12-09T08:42:30.000000Z +4b9ebae894c4ee6da97bf20fdf225456 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2156 + +GTLAdSenseAccount.m +file + + + + +2012-12-09T08:42:30.000000Z +8bb5e95218182187498ec06b6b79b8d4 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1793 + +GTLAdSenseCustomChannel.h +file + + + + +2012-12-09T08:42:30.000000Z +e1bb658f6e1e5621cb068e6d4e63e091 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3146 + +GTLQueryAdSense.h +file + + + + +2012-12-09T08:42:30.000000Z +e3ebbc1861d5f56226e151b2c0c634bc +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +25634 + +GTLServiceAdSense.m +file + + + + +2012-12-09T08:42:30.000000Z +e19f0aa6afd5b9e4b00b62de91c2eee6 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2735 + +GTLAdSenseAdClients.h +file + + + + +2012-12-09T08:42:30.000000Z +0bcbf934544e114ca8d7c6e6d73b4fcb +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2016 + +GTLAdSenseCustomChannel.m +file + + + + +2012-12-09T08:42:30.000000Z +c32449ddc1c18fb3d6634da91a1ff3de +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2167 + +GTLQueryAdSense.m +file + + + + +2012-12-09T08:42:30.000000Z +b22a38efd982ed74b2cbfe1d21ac45b3 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +14715 + +GTLAdSenseAdClients.m +file + + + + +2012-12-09T08:42:30.000000Z +a169932d0165fe1eff381cad3938d3a6 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1816 + +GTLAdSenseSavedAdStyles.h +file + + + + +2012-12-09T08:42:30.000000Z +ac0ed56ca8697dcfcca5f42287decc10 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2047 + +GTLAdSenseConstants.h +file + + + + +2012-12-09T08:42:30.000000Z +1f0134932c7010ccb6b1f6425f9466d3 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1453 + +GTLAdSenseUrlChannels.h +file + + + + +2012-12-09T08:42:30.000000Z +76ecba7c3195d3ce722ee51df813e75b +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2034 + +GTLAdSenseAccounts.h +file + + + + +2012-12-09T08:42:30.000000Z +d95576bc0bbb893615c9e683e9e0e38b +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2005 + +GTLAdSenseSavedAdStyles.m +file + + + + +2012-12-09T08:42:30.000000Z +0647b78c5461865504485eda0e82caf6 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1848 + +GTLAdSenseConstants.m +file + + + + +2012-12-09T08:42:30.000000Z +1cf96a42213eb1a2a8e411697ed3344e +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1269 + +GTLAdSenseAdClient.h +file + + + + +2012-12-09T08:42:30.000000Z +7d0564491397687365e370061431a47f +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1953 + +GTLAdSenseUrlChannels.m +file + + + + +2012-12-09T08:42:30.000000Z +4801b8b1fd3a9e3e51467cabb05091c3 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1832 + +GTLAdSenseAccounts.m +file + + + + +2012-12-09T08:42:30.000000Z +fe3714edb3c073d37633f45ed8322abd +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1808 + +GTLAdSenseAdUnit.h +file + + + + +2012-12-09T08:42:30.000000Z +0ab14a23c2ff0e951af2b80064a1664b +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +5559 + +GTLAdSense_Sources.m +file + + + + +2012-12-09T08:42:30.000000Z +1c9299533049925d757965d6cda71729 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1768 + +GTLAdSenseAdClient.m +file + + + + +2012-12-09T08:42:30.000000Z +d045738e86e445cfdefe79841e7634e7 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1609 + +GTLAdSenseAdUnit.m +file + + + + +2012-12-09T08:42:30.000000Z +317c6ffaba21e0062de3b29fc7a752a4 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3009 + +GTLAdSenseUrlChannel.h +file + + + + +2012-12-09T08:42:30.000000Z +c3291d43af3cf4fc04f556a057d1133b +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1877 + +GTLAdSenseSavedReport.h +file + + + + +2012-12-09T08:42:30.000000Z +5fc972eebc74fdcd46eb200542b4cae3 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1683 + +GTLAdSenseUrlChannel.m +file + + + + +2012-12-09T08:42:30.000000Z +9178e93fe81f008a94522d58b619e098 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1591 + +GTLAdSenseSavedReport.m +file + + + + +2012-12-09T08:42:30.000000Z +86bb278a39b9492b325e534de684450c +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1591 + +GTLAdSenseAdStyle.h +file + + + + +2012-12-09T08:42:30.000000Z +1a2da79990d128358a4d1cdb85373af4 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2819 + +GTLAdSenseAdUnits.h +file + + + + +2012-12-09T08:42:30.000000Z +b99fc960f58f522f5db02d5c6ce136a8 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1998 + +GTLAdSenseAdStyle.m +file + + + + +2012-12-09T08:42:30.000000Z +523eee024df5dd73c760282b875d1907 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1932 + +GTLAdSenseAdUnits.m +file + + + + +2012-12-09T08:42:30.000000Z +ed07810049a4adc95225c4a52504d999 +2012-10-23T20:19:29.533219Z +235 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1800 + diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSense.h.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSense.h.svn-base new file mode 100644 index 0000000..9a1eb73 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSense.h.svn-base @@ -0,0 +1,50 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSense.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ + +#import "GTLAdSenseConstants.h" + +#import "GTLAdSenseAccount.h" +#import "GTLAdSenseAccounts.h" +#import "GTLAdSenseAdClient.h" +#import "GTLAdSenseAdClients.h" +#import "GTLAdSenseAdsenseReportsGenerateResponse.h" +#import "GTLAdSenseAdStyle.h" +#import "GTLAdSenseAdUnit.h" +#import "GTLAdSenseAdUnits.h" +#import "GTLAdSenseCustomChannel.h" +#import "GTLAdSenseCustomChannels.h" +#import "GTLAdSenseSavedAdStyle.h" +#import "GTLAdSenseSavedAdStyles.h" +#import "GTLAdSenseSavedReport.h" +#import "GTLAdSenseSavedReports.h" +#import "GTLAdSenseUrlChannel.h" +#import "GTLAdSenseUrlChannels.h" + +#import "GTLQueryAdSense.h" +#import "GTLServiceAdSense.h" diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAccount.h.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAccount.h.svn-base new file mode 100644 index 0000000..f6263f2 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAccount.h.svn-base @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAccount.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAccount (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseAccount; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAccount +// + +@interface GTLAdSenseAccount : GTLObject + +// Unique identifier of this account. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Kind of resource this is, in this case adsense#account. +@property (copy) NSString *kind; + +// Name of this account. +@property (copy) NSString *name; + +// Whether this account is premium. +@property (retain) NSNumber *premium; // boolValue + +// Sub accounts of the this account. +@property (retain) NSArray *subAccounts; // of GTLAdSenseAccount + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAccount.m.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAccount.m.svn-base new file mode 100644 index 0000000..ae3eac9 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAccount.m.svn-base @@ -0,0 +1,60 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAccount.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAccount (0 custom class methods, 5 custom properties) + +#import "GTLAdSenseAccount.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAccount +// + +@implementation GTLAdSenseAccount +@dynamic identifier, kind, name, premium, subAccounts; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAdSenseAccount class] + forKey:@"subAccounts"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#account"]; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAccounts.h.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAccounts.h.svn-base new file mode 100644 index 0000000..f3be08c --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAccounts.h.svn-base @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAccounts.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAccounts (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseAccount; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAccounts +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAdSenseAccounts : GTLCollectionObject + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// The accounts returned in this list response. +@property (retain) NSArray *items; // of GTLAdSenseAccount + +// Kind of list this is, in this case adsense#accounts. +@property (copy) NSString *kind; + +// Continuation token used to page through accounts. To retrieve the next page +// of results, set the next request's "pageToken" value to this. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAccounts.m.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAccounts.m.svn-base new file mode 100644 index 0000000..1d1c86e --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAccounts.m.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAccounts.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAccounts (0 custom class methods, 4 custom properties) + +#import "GTLAdSenseAccounts.h" + +#import "GTLAdSenseAccount.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAccounts +// + +@implementation GTLAdSenseAccounts +@dynamic ETag, items, kind, nextPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAdSenseAccount class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#accounts"]; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdClient.h.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdClient.h.svn-base new file mode 100644 index 0000000..de2aaaf --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdClient.h.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAdClient.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAdClient (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdClient +// + +@interface GTLAdSenseAdClient : GTLObject + +// Whether this ad client is opted in to ARC. +@property (retain) NSNumber *arcOptIn; // boolValue + +// Unique identifier of this ad client. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Kind of resource this is, in this case adsense#adClient. +@property (copy) NSString *kind; + +// This ad client's product code, which corresponds to the PRODUCT_CODE report +// dimension. +@property (copy) NSString *productCode; + +// Whether this ad client supports being reported on. +@property (retain) NSNumber *supportsReporting; // boolValue + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdClient.m.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdClient.m.svn-base new file mode 100644 index 0000000..0219976 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdClient.m.svn-base @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAdClient.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAdClient (0 custom class methods, 5 custom properties) + +#import "GTLAdSenseAdClient.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdClient +// + +@implementation GTLAdSenseAdClient +@dynamic arcOptIn, identifier, kind, productCode, supportsReporting; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#adClient"]; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdClients.h.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdClients.h.svn-base new file mode 100644 index 0000000..3686bd1 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdClients.h.svn-base @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAdClients.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAdClients (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseAdClient; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdClients +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAdSenseAdClients : GTLCollectionObject + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// The ad clients returned in this list response. +@property (retain) NSArray *items; // of GTLAdSenseAdClient + +// Kind of list this is, in this case adsense#adClients. +@property (copy) NSString *kind; + +// Continuation token used to page through ad clients. To retrieve the next page +// of results, set the next request's "pageToken" value to this. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdClients.m.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdClients.m.svn-base new file mode 100644 index 0000000..6bd2da8 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdClients.m.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAdClients.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAdClients (0 custom class methods, 4 custom properties) + +#import "GTLAdSenseAdClients.h" + +#import "GTLAdSenseAdClient.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdClients +// + +@implementation GTLAdSenseAdClients +@dynamic ETag, items, kind, nextPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAdSenseAdClient class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#adClients"]; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdStyle.h.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdStyle.h.svn-base new file mode 100644 index 0000000..4501342 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdStyle.h.svn-base @@ -0,0 +1,105 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAdStyle.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAdStyle (0 custom class methods, 4 custom properties) +// GTLAdSenseAdStyleColors (0 custom class methods, 5 custom properties) +// GTLAdSenseAdStyleFont (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseAdStyleColors; +@class GTLAdSenseAdStyleFont; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdStyle +// + +@interface GTLAdSenseAdStyle : GTLObject + +// The colors which are included in the style. These are represented as six +// hexadecimal characters, similar to HTML color codes, but without the leading +// hash. +@property (retain) GTLAdSenseAdStyleColors *colors; + +// The style of the corners in the ad. +@property (copy) NSString *corners; + +// The font which is included in the style. +@property (retain) GTLAdSenseAdStyleFont *font; + +// Kind this is, in this case adsense#adStyle. +@property (copy) NSString *kind; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdStyleColors +// + +@interface GTLAdSenseAdStyleColors : GTLObject + +// The color of the ad background. +@property (copy) NSString *background; + +// The color of the ad border. +@property (copy) NSString *border; + +// The color of the ad text. +@property (copy) NSString *text; + +// The color of the ad title. +@property (copy) NSString *title; + +// The color of the ad url. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdStyleFont +// + +@interface GTLAdSenseAdStyleFont : GTLObject + +// The family of the font. +@property (copy) NSString *family; + +// The size of the font. +@property (copy) NSString *size; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdStyle.m.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdStyle.m.svn-base new file mode 100644 index 0000000..5665a8c --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdStyle.m.svn-base @@ -0,0 +1,68 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAdStyle.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAdStyle (0 custom class methods, 4 custom properties) +// GTLAdSenseAdStyleColors (0 custom class methods, 5 custom properties) +// GTLAdSenseAdStyleFont (0 custom class methods, 2 custom properties) + +#import "GTLAdSenseAdStyle.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdStyle +// + +@implementation GTLAdSenseAdStyle +@dynamic colors, corners, font, kind; + ++ (void)load { + [self registerObjectClassForKind:@"adsense#adStyle"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdStyleColors +// + +@implementation GTLAdSenseAdStyleColors +@dynamic background, border, text, title, url; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdStyleFont +// + +@implementation GTLAdSenseAdStyleFont +@dynamic family, size; +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdUnit.h.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdUnit.h.svn-base new file mode 100644 index 0000000..1f84be5 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdUnit.h.svn-base @@ -0,0 +1,175 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAdUnit.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAdUnit (0 custom class methods, 10 custom properties) +// GTLAdSenseAdUnitContentAdsSettings (0 custom class methods, 3 custom properties) +// GTLAdSenseAdUnitFeedAdsSettings (0 custom class methods, 4 custom properties) +// GTLAdSenseAdUnitMobileContentAdsSettings (0 custom class methods, 4 custom properties) +// GTLAdSenseAdUnitContentAdsSettingsBackupOption (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseAdStyle; +@class GTLAdSenseAdUnitContentAdsSettings; +@class GTLAdSenseAdUnitContentAdsSettingsBackupOption; +@class GTLAdSenseAdUnitFeedAdsSettings; +@class GTLAdSenseAdUnitMobileContentAdsSettings; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdUnit +// + +@interface GTLAdSenseAdUnit : GTLObject + +// Identity code of this ad unit, not necessarily unique across ad clients. +@property (copy) NSString *code; + +// Settings specific to content ads (AFC) and highend mobile content ads (AFMC). +@property (retain) GTLAdSenseAdUnitContentAdsSettings *contentAdsSettings; + +// Custom style information specific to this ad unit. +@property (retain) GTLAdSenseAdStyle *customStyle; + +// Settings specific to feed ads (AFF). +@property (retain) GTLAdSenseAdUnitFeedAdsSettings *feedAdsSettings; + +// Unique identifier of this ad unit. This should be considered an opaque +// identifier; it is not safe to rely on it being in any particular format. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Kind of resource this is, in this case adsense#adUnit. +@property (copy) NSString *kind; + +// Settings specific to WAP mobile content ads (AFMC). +@property (retain) GTLAdSenseAdUnitMobileContentAdsSettings *mobileContentAdsSettings; + +// Name of this ad unit. +@property (copy) NSString *name; + +// ID of the saved ad style which holds this ad unit's style information. +@property (copy) NSString *savedStyleId; + +// Status of this ad unit. Possible values are: +// NEW: Indicates that the ad unit was created within the last seven days and +// does not yet have any activity associated with it. +// ACTIVE: Indicates that there has been activity on this ad unit in the last +// seven days. +// INACTIVE: Indicates that there has been no activity on this ad unit in the +// last seven days. +@property (copy) NSString *status; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdUnitContentAdsSettings +// + +@interface GTLAdSenseAdUnitContentAdsSettings : GTLObject + +// The backup option to be used in instances where no ad is available. +@property (retain) GTLAdSenseAdUnitContentAdsSettingsBackupOption *backupOption; + +// Size of this ad unit. +@property (copy) NSString *size; + +// Type of this ad unit. +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdUnitFeedAdsSettings +// + +@interface GTLAdSenseAdUnitFeedAdsSettings : GTLObject + +// The position of the ads relative to the feed entries. +@property (copy) NSString *adPosition; + +// The frequency at which ads should appear in the feed (i.e. every N entries). +@property (retain) NSNumber *frequency; // intValue + +// The minimum length an entry should be in order to have attached ads. +@property (retain) NSNumber *minimumWordCount; // intValue + +// The type of ads which should appear. +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdUnitMobileContentAdsSettings +// + +@interface GTLAdSenseAdUnitMobileContentAdsSettings : GTLObject + +// The markup language to use for this ad unit. +@property (copy) NSString *markupLanguage; + +// The scripting language to use for this ad unit. +@property (copy) NSString *scriptingLanguage; + +// Size of this ad unit. +@property (copy) NSString *size; + +// Type of this ad unit. +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdUnitContentAdsSettingsBackupOption +// + +@interface GTLAdSenseAdUnitContentAdsSettingsBackupOption : GTLObject + +// Color to use when type is set to COLOR. +@property (copy) NSString *color; + +// Type of the backup option. Possible values are BLANK, COLOR and URL. +@property (copy) NSString *type; + +// URL to use when type is set to URL. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdUnit.m.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdUnit.m.svn-base new file mode 100644 index 0000000..bb0a1f1 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdUnit.m.svn-base @@ -0,0 +1,100 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAdUnit.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAdUnit (0 custom class methods, 10 custom properties) +// GTLAdSenseAdUnitContentAdsSettings (0 custom class methods, 3 custom properties) +// GTLAdSenseAdUnitFeedAdsSettings (0 custom class methods, 4 custom properties) +// GTLAdSenseAdUnitMobileContentAdsSettings (0 custom class methods, 4 custom properties) +// GTLAdSenseAdUnitContentAdsSettingsBackupOption (0 custom class methods, 3 custom properties) + +#import "GTLAdSenseAdUnit.h" + +#import "GTLAdSenseAdStyle.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdUnit +// + +@implementation GTLAdSenseAdUnit +@dynamic code, contentAdsSettings, customStyle, feedAdsSettings, identifier, + kind, mobileContentAdsSettings, name, savedStyleId, status; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#adUnit"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdUnitContentAdsSettings +// + +@implementation GTLAdSenseAdUnitContentAdsSettings +@dynamic backupOption, size, type; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdUnitFeedAdsSettings +// + +@implementation GTLAdSenseAdUnitFeedAdsSettings +@dynamic adPosition, frequency, minimumWordCount, type; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdUnitMobileContentAdsSettings +// + +@implementation GTLAdSenseAdUnitMobileContentAdsSettings +@dynamic markupLanguage, scriptingLanguage, size, type; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdUnitContentAdsSettingsBackupOption +// + +@implementation GTLAdSenseAdUnitContentAdsSettingsBackupOption +@dynamic color, type, url; +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdUnits.h.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdUnits.h.svn-base new file mode 100644 index 0000000..9a55195 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdUnits.h.svn-base @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAdUnits.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAdUnits (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseAdUnit; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdUnits +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAdSenseAdUnits : GTLCollectionObject + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// The ad units returned in this list response. +@property (retain) NSArray *items; // of GTLAdSenseAdUnit + +// Kind of list this is, in this case adsense#adUnits. +@property (copy) NSString *kind; + +// Continuation token used to page through ad units. To retrieve the next page +// of results, set the next request's "pageToken" value to this. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdUnits.m.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdUnits.m.svn-base new file mode 100644 index 0000000..576c25d --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdUnits.m.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAdUnits.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAdUnits (0 custom class methods, 4 custom properties) + +#import "GTLAdSenseAdUnits.h" + +#import "GTLAdSenseAdUnit.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdUnits +// + +@implementation GTLAdSenseAdUnits +@dynamic ETag, items, kind, nextPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAdSenseAdUnit class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#adUnits"]; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdsenseReportsGenerateResponse.h.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdsenseReportsGenerateResponse.h.svn-base new file mode 100644 index 0000000..dcef9c7 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdsenseReportsGenerateResponse.h.svn-base @@ -0,0 +1,98 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAdsenseReportsGenerateResponse.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAdsenseReportsGenerateResponse (0 custom class methods, 7 custom properties) +// GTLAdSenseAdsenseReportsGenerateResponseHeadersItem (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseAdsenseReportsGenerateResponseHeadersItem; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdsenseReportsGenerateResponse +// + +@interface GTLAdSenseAdsenseReportsGenerateResponse : GTLObject + +// The averages of the report. This is the same length as any other row in the +// report; cells corresponding to dimension columns are empty. +@property (retain) NSArray *averages; // of NSString + +// The header information of the columns requested in the report. This is a list +// of headers; one for each dimension in the request, followed by one for each +// metric in the request. +@property (retain) NSArray *headers; // of GTLAdSenseAdsenseReportsGenerateResponseHeadersItem + +// Kind this is, in this case adsense#report. +@property (copy) NSString *kind; + +// The output rows of the report. Each row is a list of cells; one for each +// dimension in the request, followed by one for each metric in the request. The +// dimension cells contain strings, and the metric cells contain numbers. +@property (retain) NSArray *rows; // of NSArray of NSString + +// The total number of rows matched by the report request. Fewer rows may be +// returned in the response due to being limited by the row count requested or +// the report row limit. +@property (retain) NSNumber *totalMatchedRows; // longLongValue + +// The totals of the report. This is the same length as any other row in the +// report; cells corresponding to dimension columns are empty. +@property (retain) NSArray *totals; // of NSString + +// Any warnings associated with generation of the report. +@property (retain) NSArray *warnings; // of NSString + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdsenseReportsGenerateResponseHeadersItem +// + +@interface GTLAdSenseAdsenseReportsGenerateResponseHeadersItem : GTLObject + +// The currency of this column. Only present if the header type is +// METRIC_CURRENCY. +@property (copy) NSString *currency; + +// The name of the header. +@property (copy) NSString *name; + +// The type of the header; one of DIMENSION, METRIC_TALLY, METRIC_RATIO, or +// METRIC_CURRENCY. +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdsenseReportsGenerateResponse.m.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdsenseReportsGenerateResponse.m.svn-base new file mode 100644 index 0000000..523372a --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseAdsenseReportsGenerateResponse.m.svn-base @@ -0,0 +1,69 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAdsenseReportsGenerateResponse.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAdsenseReportsGenerateResponse (0 custom class methods, 7 custom properties) +// GTLAdSenseAdsenseReportsGenerateResponseHeadersItem (0 custom class methods, 3 custom properties) + +#import "GTLAdSenseAdsenseReportsGenerateResponse.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdsenseReportsGenerateResponse +// + +@implementation GTLAdSenseAdsenseReportsGenerateResponse +@dynamic averages, headers, kind, rows, totalMatchedRows, totals, warnings; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"averages", + [GTLAdSenseAdsenseReportsGenerateResponseHeadersItem class], @"headers", + [NSString class], @"rows", + [NSString class], @"totals", + [NSString class], @"warnings", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#report"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdsenseReportsGenerateResponseHeadersItem +// + +@implementation GTLAdSenseAdsenseReportsGenerateResponseHeadersItem +@dynamic currency, name, type; +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseConstants.h.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseConstants.h.svn-base new file mode 100644 index 0000000..f7af3df --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseConstants.h.svn-base @@ -0,0 +1,42 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// View and manage your AdSense data +GTL_EXTERN NSString * const kGTLAuthScopeAdSense; // "https://www.googleapis.com/auth/adsense" +// View your AdSense data +GTL_EXTERN NSString * const kGTLAuthScopeAdSenseReadonly; // "https://www.googleapis.com/auth/adsense.readonly" diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseConstants.m.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseConstants.m.svn-base new file mode 100644 index 0000000..f86d020 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseConstants.m.svn-base @@ -0,0 +1,34 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ + +#import "GTLAdSenseConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeAdSense = @"https://www.googleapis.com/auth/adsense"; +NSString * const kGTLAuthScopeAdSenseReadonly = @"https://www.googleapis.com/auth/adsense.readonly"; diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseCustomChannel.h.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseCustomChannel.h.svn-base new file mode 100644 index 0000000..ce0732a --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseCustomChannel.h.svn-base @@ -0,0 +1,92 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseCustomChannel.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseCustomChannel (0 custom class methods, 5 custom properties) +// GTLAdSenseCustomChannelTargetingInfo (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseCustomChannelTargetingInfo; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseCustomChannel +// + +@interface GTLAdSenseCustomChannel : GTLObject + +// Code of this custom channel, not necessarily unique across ad clients. +@property (copy) NSString *code; + +// Unique identifier of this custom channel. This should be considered an opaque +// identifier; it is not safe to rely on it being in any particular format. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Kind of resource this is, in this case adsense#customChannel. +@property (copy) NSString *kind; + +// Name of this custom channel. +@property (copy) NSString *name; + +// The targeting information of this custom channel, if activated. +@property (retain) GTLAdSenseCustomChannelTargetingInfo *targetingInfo; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseCustomChannelTargetingInfo +// + +@interface GTLAdSenseCustomChannelTargetingInfo : GTLObject + +// The name used to describe this channel externally. +@property (copy) NSString *adsAppearOn; + +// The external description of the channel. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The locations in which ads appear. (Only valid for content and mobile content +// ads). Acceptable values for content ads are: TOP_LEFT, TOP_CENTER, TOP_RIGHT, +// MIDDLE_LEFT, MIDDLE_CENTER, MIDDLE_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, +// BOTTOM_RIGHT, MULTIPLE_LOCATIONS. Acceptable values for mobile content ads +// are: TOP, MIDDLE, BOTTOM, MULTIPLE_LOCATIONS. +@property (copy) NSString *location; + +// The language of the sites ads will be displayed on. +@property (copy) NSString *siteLanguage; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseCustomChannel.m.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseCustomChannel.m.svn-base new file mode 100644 index 0000000..542f089 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseCustomChannel.m.svn-base @@ -0,0 +1,72 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseCustomChannel.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseCustomChannel (0 custom class methods, 5 custom properties) +// GTLAdSenseCustomChannelTargetingInfo (0 custom class methods, 4 custom properties) + +#import "GTLAdSenseCustomChannel.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseCustomChannel +// + +@implementation GTLAdSenseCustomChannel +@dynamic code, identifier, kind, name, targetingInfo; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#customChannel"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseCustomChannelTargetingInfo +// + +@implementation GTLAdSenseCustomChannelTargetingInfo +@dynamic adsAppearOn, descriptionProperty, location, siteLanguage; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseCustomChannels.h.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseCustomChannels.h.svn-base new file mode 100644 index 0000000..c324c27 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseCustomChannels.h.svn-base @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseCustomChannels.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseCustomChannels (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseCustomChannel; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseCustomChannels +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAdSenseCustomChannels : GTLCollectionObject + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// The custom channels returned in this list response. +@property (retain) NSArray *items; // of GTLAdSenseCustomChannel + +// Kind of list this is, in this case adsense#customChannels. +@property (copy) NSString *kind; + +// Continuation token used to page through custom channels. To retrieve the next +// page of results, set the next request's "pageToken" value to this. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseCustomChannels.m.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseCustomChannels.m.svn-base new file mode 100644 index 0000000..710a3e6 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseCustomChannels.m.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseCustomChannels.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseCustomChannels (0 custom class methods, 4 custom properties) + +#import "GTLAdSenseCustomChannels.h" + +#import "GTLAdSenseCustomChannel.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseCustomChannels +// + +@implementation GTLAdSenseCustomChannels +@dynamic ETag, items, kind, nextPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAdSenseCustomChannel class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#customChannels"]; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseSavedAdStyle.h.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseSavedAdStyle.h.svn-base new file mode 100644 index 0000000..f19054a --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseSavedAdStyle.h.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseSavedAdStyle.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseSavedAdStyle (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseAdStyle; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseSavedAdStyle +// + +@interface GTLAdSenseSavedAdStyle : GTLObject + +// The AdStyle itself. +@property (retain) GTLAdSenseAdStyle *adStyle; + +// Unique identifier of this saved ad style. This should be considered an opaque +// identifier; it is not safe to rely on it being in any particular format. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Kind of resource this is, in this case adsense#savedAdStyle. +@property (copy) NSString *kind; + +// The user selected name of this SavedAdStyle. +@property (copy) NSString *name; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseSavedAdStyle.m.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseSavedAdStyle.m.svn-base new file mode 100644 index 0000000..d8ed5a7 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseSavedAdStyle.m.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseSavedAdStyle.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseSavedAdStyle (0 custom class methods, 4 custom properties) + +#import "GTLAdSenseSavedAdStyle.h" + +#import "GTLAdSenseAdStyle.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseSavedAdStyle +// + +@implementation GTLAdSenseSavedAdStyle +@dynamic adStyle, identifier, kind, name; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#savedAdStyle"]; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseSavedAdStyles.h.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseSavedAdStyles.h.svn-base new file mode 100644 index 0000000..85248c6 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseSavedAdStyles.h.svn-base @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseSavedAdStyles.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseSavedAdStyles (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseSavedAdStyle; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseSavedAdStyles +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAdSenseSavedAdStyles : GTLCollectionObject + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// The saved ad styles returned in this list response. +@property (retain) NSArray *items; // of GTLAdSenseSavedAdStyle + +// Kind of list this is, in this case adsense#savedAdStyles. +@property (copy) NSString *kind; + +// Continuation token used to page through ad units. To retrieve the next page +// of results, set the next request's "pageToken" value to this. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseSavedAdStyles.m.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseSavedAdStyles.m.svn-base new file mode 100644 index 0000000..81a0d5c --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseSavedAdStyles.m.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseSavedAdStyles.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseSavedAdStyles (0 custom class methods, 4 custom properties) + +#import "GTLAdSenseSavedAdStyles.h" + +#import "GTLAdSenseSavedAdStyle.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseSavedAdStyles +// + +@implementation GTLAdSenseSavedAdStyles +@dynamic ETag, items, kind, nextPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAdSenseSavedAdStyle class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#savedAdStyles"]; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseSavedReport.h.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseSavedReport.h.svn-base new file mode 100644 index 0000000..1d85935 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseSavedReport.h.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseSavedReport.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseSavedReport (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseSavedReport +// + +@interface GTLAdSenseSavedReport : GTLObject + +// Unique identifier of this saved report. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Kind of resource this is, in this case adsense#savedReport. +@property (copy) NSString *kind; + +// This saved report's name. +@property (copy) NSString *name; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseSavedReport.m.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseSavedReport.m.svn-base new file mode 100644 index 0000000..0dae25a --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseSavedReport.m.svn-base @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseSavedReport.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseSavedReport (0 custom class methods, 3 custom properties) + +#import "GTLAdSenseSavedReport.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseSavedReport +// + +@implementation GTLAdSenseSavedReport +@dynamic identifier, kind, name; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#savedReport"]; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseSavedReports.h.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseSavedReports.h.svn-base new file mode 100644 index 0000000..02c1afa --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseSavedReports.h.svn-base @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseSavedReports.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseSavedReports (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseSavedReport; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseSavedReports +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAdSenseSavedReports : GTLCollectionObject + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// The saved reports returned in this list response. +@property (retain) NSArray *items; // of GTLAdSenseSavedReport + +// Kind of list this is, in this case adsense#savedReports. +@property (copy) NSString *kind; + +// Continuation token used to page through saved reports. To retrieve the next +// page of results, set the next request's "pageToken" value to this. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseSavedReports.m.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseSavedReports.m.svn-base new file mode 100644 index 0000000..0418e4e --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseSavedReports.m.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseSavedReports.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseSavedReports (0 custom class methods, 4 custom properties) + +#import "GTLAdSenseSavedReports.h" + +#import "GTLAdSenseSavedReport.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseSavedReports +// + +@implementation GTLAdSenseSavedReports +@dynamic ETag, items, kind, nextPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAdSenseSavedReport class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#savedReports"]; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseUrlChannel.h.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseUrlChannel.h.svn-base new file mode 100644 index 0000000..b2a411a --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseUrlChannel.h.svn-base @@ -0,0 +1,57 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseUrlChannel.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseUrlChannel (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseUrlChannel +// + +@interface GTLAdSenseUrlChannel : GTLObject + +// Unique identifier of this URL channel. This should be considered an opaque +// identifier; it is not safe to rely on it being in any particular format. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Kind of resource this is, in this case adsense#urlChannel. +@property (copy) NSString *kind; + +// URL Pattern of this URL channel. Does not include "http://" or "https://". +// Example: www.example.com/home +@property (copy) NSString *urlPattern; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseUrlChannel.m.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseUrlChannel.m.svn-base new file mode 100644 index 0000000..7eb5a88 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseUrlChannel.m.svn-base @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseUrlChannel.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseUrlChannel (0 custom class methods, 3 custom properties) + +#import "GTLAdSenseUrlChannel.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseUrlChannel +// + +@implementation GTLAdSenseUrlChannel +@dynamic identifier, kind, urlPattern; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#urlChannel"]; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseUrlChannels.h.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseUrlChannels.h.svn-base new file mode 100644 index 0000000..9f02040 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseUrlChannels.h.svn-base @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseUrlChannels.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseUrlChannels (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseUrlChannel; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseUrlChannels +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAdSenseUrlChannels : GTLCollectionObject + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// The URL channels returned in this list response. +@property (retain) NSArray *items; // of GTLAdSenseUrlChannel + +// Kind of list this is, in this case adsense#urlChannels. +@property (copy) NSString *kind; + +// Continuation token used to page through URL channels. To retrieve the next +// page of results, set the next request's "pageToken" value to this. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseUrlChannels.m.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseUrlChannels.m.svn-base new file mode 100644 index 0000000..094ea38 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSenseUrlChannels.m.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseUrlChannels.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseUrlChannels (0 custom class methods, 4 custom properties) + +#import "GTLAdSenseUrlChannels.h" + +#import "GTLAdSenseUrlChannel.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseUrlChannels +// + +@implementation GTLAdSenseUrlChannels +@dynamic ETag, items, kind, nextPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAdSenseUrlChannel class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#urlChannels"]; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSense_Sources.m.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSense_Sources.m.svn-base new file mode 100644 index 0000000..423ff46 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLAdSense_Sources.m.svn-base @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSense_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ + +#import "GTLAdSenseConstants.m" + +#import "GTLAdSenseAccount.m" +#import "GTLAdSenseAccounts.m" +#import "GTLAdSenseAdClient.m" +#import "GTLAdSenseAdClients.m" +#import "GTLAdSenseAdsenseReportsGenerateResponse.m" +#import "GTLAdSenseAdStyle.m" +#import "GTLAdSenseAdUnit.m" +#import "GTLAdSenseAdUnits.m" +#import "GTLAdSenseCustomChannel.m" +#import "GTLAdSenseCustomChannels.m" +#import "GTLAdSenseSavedAdStyle.m" +#import "GTLAdSenseSavedAdStyles.m" +#import "GTLAdSenseSavedReport.m" +#import "GTLAdSenseSavedReports.m" +#import "GTLAdSenseUrlChannel.m" +#import "GTLAdSenseUrlChannels.m" + +#import "GTLQueryAdSense.m" +#import "GTLServiceAdSense.m" diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLQueryAdSense.h.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLQueryAdSense.h.svn-base new file mode 100644 index 0000000..370357f --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLQueryAdSense.h.svn-base @@ -0,0 +1,619 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryAdSense.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLQueryAdSense (28 custom class methods, 20 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@interface GTLQueryAdSense : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +// "accountId" has different types for some query methods; see the documentation +// for the right type for each query method. +@property (retain) id accountId; +@property (copy) NSString *adClientId; +@property (copy) NSString *adUnitId; +@property (copy) NSString *currency; +@property (copy) NSString *customChannelId; +@property (retain) NSArray *dimension; // of NSString +@property (copy) NSString *endDate; +@property (retain) NSArray *filter; // of NSString +@property (assign) BOOL includeInactive; +@property (copy) NSString *locale; +@property (assign) NSInteger maxResults; +@property (retain) NSArray *metric; // of NSString +@property (copy) NSString *pageToken; +@property (copy) NSString *savedAdStyleId; +@property (copy) NSString *savedReportId; +@property (retain) NSArray *sort; // of NSString +@property (copy) NSString *startDate; +@property (assign) NSInteger startIndex; +@property (assign) BOOL tree; + +#pragma mark - +#pragma mark "accounts.adclients" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.accounts.adclients.list +// List all ad clients in the specified account. +// Required: +// accountId: Account for which to list ad clients. +// Optional: +// maxResults: The maximum number of ad clients to include in the response, +// used for paging. (0..10000) +// pageToken: A continuation token, used to page through ad clients. To +// retrieve the next page, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAdClients. ++ (id)queryForAccountsAdclientsListWithAccountId:(NSString *)accountId; + +#pragma mark - +#pragma mark "accounts.adunits.customchannels" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.accounts.adunits.customchannels.list +// List all custom channels which the specified ad unit belongs to. +// Required: +// accountId: Account to which the ad client belongs. +// adClientId: Ad client which contains the ad unit. +// adUnitId: Ad unit for which to list custom channels. +// Optional: +// maxResults: The maximum number of custom channels to include in the +// response, used for paging. (0..10000) +// pageToken: A continuation token, used to page through custom channels. To +// retrieve the next page, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseCustomChannels. ++ (id)queryForAccountsAdunitsCustomchannelsListWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId + adUnitId:(NSString *)adUnitId; + +#pragma mark - +#pragma mark "accounts.adunits" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.accounts.adunits.get +// Gets the specified ad unit in the specified ad client for the specified +// account. +// Required: +// accountId: Account to which the ad client belongs. +// adClientId: Ad client for which to get the ad unit. +// adUnitId: Ad unit to retrieve. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAdUnit. ++ (id)queryForAccountsAdunitsGetWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId + adUnitId:(NSString *)adUnitId; + +// Method: adsense.accounts.adunits.list +// List all ad units in the specified ad client for the specified account. +// Required: +// accountId: Account to which the ad client belongs. +// adClientId: Ad client for which to list ad units. +// Optional: +// includeInactive: Whether to include inactive ad units. Default: true. +// maxResults: The maximum number of ad units to include in the response, used +// for paging. (0..10000) +// pageToken: A continuation token, used to page through ad units. To retrieve +// the next page, set this parameter to the value of "nextPageToken" from +// the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAdUnits. ++ (id)queryForAccountsAdunitsListWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId; + +#pragma mark - +#pragma mark "accounts.customchannels.adunits" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.accounts.customchannels.adunits.list +// List all ad units in the specified custom channel. +// Required: +// accountId: Account to which the ad client belongs. +// adClientId: Ad client which contains the custom channel. +// customChannelId: Custom channel for which to list ad units. +// Optional: +// includeInactive: Whether to include inactive ad units. Default: true. +// maxResults: The maximum number of ad units to include in the response, used +// for paging. (0..10000) +// pageToken: A continuation token, used to page through ad units. To retrieve +// the next page, set this parameter to the value of "nextPageToken" from +// the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAdUnits. ++ (id)queryForAccountsCustomchannelsAdunitsListWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId + customChannelId:(NSString *)customChannelId; + +#pragma mark - +#pragma mark "accounts.customchannels" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.accounts.customchannels.get +// Get the specified custom channel from the specified ad client for the +// specified account. +// Required: +// accountId: Account to which the ad client belongs. +// adClientId: Ad client which contains the custom channel. +// customChannelId: Custom channel to retrieve. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseCustomChannel. ++ (id)queryForAccountsCustomchannelsGetWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId + customChannelId:(NSString *)customChannelId; + +// Method: adsense.accounts.customchannels.list +// List all custom channels in the specified ad client for the specified +// account. +// Required: +// accountId: Account to which the ad client belongs. +// adClientId: Ad client for which to list custom channels. +// Optional: +// maxResults: The maximum number of custom channels to include in the +// response, used for paging. (0..10000) +// pageToken: A continuation token, used to page through custom channels. To +// retrieve the next page, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseCustomChannels. ++ (id)queryForAccountsCustomchannelsListWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId; + +#pragma mark - +#pragma mark "accounts" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.accounts.get +// Get information about the selected AdSense account. +// Required: +// accountId: Account to get information about. +// Optional: +// tree: Whether the tree of sub accounts should be returned. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAccount. ++ (id)queryForAccountsGetWithAccountId:(NSString *)accountId; + +// Method: adsense.accounts.list +// List all accounts available to this AdSense account. +// Optional: +// maxResults: The maximum number of accounts to include in the response, used +// for paging. (0..10000) +// pageToken: A continuation token, used to page through accounts. To retrieve +// the next page, set this parameter to the value of "nextPageToken" from +// the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAccounts. ++ (id)queryForAccountsList; + +#pragma mark - +#pragma mark "accounts.reports" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.accounts.reports.generate +// Generate an AdSense report based on the report request sent in the query +// parameters. Returns the result as JSON; to retrieve output in CSV format +// specify "alt=csv" as a query parameter. +// Required: +// accountId: Account upon which to report. +// startDate: Start of the date range to report on in "YYYY-MM-DD" format, +// inclusive. +// endDate: End of the date range to report on in "YYYY-MM-DD" format, +// inclusive. +// Optional: +// currency: Optional currency to use when reporting on monetary metrics. +// Defaults to the account's currency if not set. +// dimension: Dimensions to base the report on. +// filter: Filters to be run on the report. +// locale: Optional locale to use for translating report output to a local +// language. Defaults to "en_US" if not specified. +// maxResults: The maximum number of rows of report data to return. (0..50000) +// metric: Numeric columns to include in the report. +// sort: The name of a dimension or metric to sort the resulting report on, +// optionally prefixed with "+" to sort ascending or "-" to sort descending. +// If no prefix is specified, the column is sorted ascending. +// startIndex: Index of the first row of report data to return. (0..5000) +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAdsenseReportsGenerateResponse. ++ (id)queryForAccountsReportsGenerateWithAccountId:(NSString *)accountId + startDate:(NSString *)startDate + endDate:(NSString *)endDate; + +#pragma mark - +#pragma mark "accounts.reports.saved" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.accounts.reports.saved.generate +// Generate an AdSense report based on the saved report ID sent in the query +// parameters. +// Required: +// accountId: Account to which the saved reports belong. +// savedReportId: The saved report to retrieve. +// Optional: +// locale: Optional locale to use for translating report output to a local +// language. Defaults to "en_US" if not specified. +// maxResults: The maximum number of rows of report data to return. (0..50000) +// startIndex: Index of the first row of report data to return. (0..5000) +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAdsenseReportsGenerateResponse. ++ (id)queryForAccountsReportsSavedGenerateWithAccountId:(NSString *)accountId + savedReportId:(NSString *)savedReportId; + +// Method: adsense.accounts.reports.saved.list +// List all saved reports in the specified AdSense account. +// Required: +// accountId: Account to which the saved reports belong. +// Optional: +// maxResults: The maximum number of saved reports to include in the response, +// used for paging. (0..100) +// pageToken: A continuation token, used to page through saved reports. To +// retrieve the next page, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseSavedReports. ++ (id)queryForAccountsReportsSavedListWithAccountId:(NSString *)accountId; + +#pragma mark - +#pragma mark "accounts.savedadstyles" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.accounts.savedadstyles.get +// List a specific saved ad style for the specified account. +// Required: +// accountId: Account for which to get the saved ad style. +// savedAdStyleId: Saved ad style to retrieve. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseSavedAdStyle. ++ (id)queryForAccountsSavedadstylesGetWithAccountId:(NSString *)accountId + savedAdStyleId:(NSString *)savedAdStyleId; + +// Method: adsense.accounts.savedadstyles.list +// List all saved ad styles in the specified account. +// Required: +// accountId: Account for which to list saved ad styles. +// Optional: +// maxResults: The maximum number of saved ad styles to include in the +// response, used for paging. (0..10000) +// pageToken: A continuation token, used to page through saved ad styles. To +// retrieve the next page, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseSavedAdStyles. ++ (id)queryForAccountsSavedadstylesListWithAccountId:(NSString *)accountId; + +#pragma mark - +#pragma mark "accounts.urlchannels" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.accounts.urlchannels.list +// List all URL channels in the specified ad client for the specified account. +// Required: +// accountId: Account to which the ad client belongs. +// adClientId: Ad client for which to list URL channels. +// Optional: +// maxResults: The maximum number of URL channels to include in the response, +// used for paging. (0..10000) +// pageToken: A continuation token, used to page through URL channels. To +// retrieve the next page, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseUrlChannels. ++ (id)queryForAccountsUrlchannelsListWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId; + +#pragma mark - +#pragma mark "adclients" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.adclients.list +// List all ad clients in this AdSense account. +// Optional: +// maxResults: The maximum number of ad clients to include in the response, +// used for paging. (0..10000) +// pageToken: A continuation token, used to page through ad clients. To +// retrieve the next page, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAdClients. ++ (id)queryForAdclientsList; + +#pragma mark - +#pragma mark "adunits.customchannels" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.adunits.customchannels.list +// List all custom channels which the specified ad unit belongs to. +// Required: +// adClientId: Ad client which contains the ad unit. +// adUnitId: Ad unit for which to list custom channels. +// Optional: +// maxResults: The maximum number of custom channels to include in the +// response, used for paging. (0..10000) +// pageToken: A continuation token, used to page through custom channels. To +// retrieve the next page, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseCustomChannels. ++ (id)queryForAdunitsCustomchannelsListWithAdClientId:(NSString *)adClientId + adUnitId:(NSString *)adUnitId; + +#pragma mark - +#pragma mark "adunits" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.adunits.get +// Gets the specified ad unit in the specified ad client. +// Required: +// adClientId: Ad client for which to get the ad unit. +// adUnitId: Ad unit to retrieve. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAdUnit. ++ (id)queryForAdunitsGetWithAdClientId:(NSString *)adClientId + adUnitId:(NSString *)adUnitId; + +// Method: adsense.adunits.list +// List all ad units in the specified ad client for this AdSense account. +// Required: +// adClientId: Ad client for which to list ad units. +// Optional: +// includeInactive: Whether to include inactive ad units. Default: true. +// maxResults: The maximum number of ad units to include in the response, used +// for paging. (0..10000) +// pageToken: A continuation token, used to page through ad units. To retrieve +// the next page, set this parameter to the value of "nextPageToken" from +// the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAdUnits. ++ (id)queryForAdunitsListWithAdClientId:(NSString *)adClientId; + +#pragma mark - +#pragma mark "customchannels.adunits" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.customchannels.adunits.list +// List all ad units in the specified custom channel. +// Required: +// adClientId: Ad client which contains the custom channel. +// customChannelId: Custom channel for which to list ad units. +// Optional: +// includeInactive: Whether to include inactive ad units. Default: true. +// maxResults: The maximum number of ad units to include in the response, used +// for paging. (0..10000) +// pageToken: A continuation token, used to page through ad units. To retrieve +// the next page, set this parameter to the value of "nextPageToken" from +// the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAdUnits. ++ (id)queryForCustomchannelsAdunitsListWithAdClientId:(NSString *)adClientId + customChannelId:(NSString *)customChannelId; + +#pragma mark - +#pragma mark "customchannels" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.customchannels.get +// Get the specified custom channel from the specified ad client. +// Required: +// adClientId: Ad client which contains the custom channel. +// customChannelId: Custom channel to retrieve. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseCustomChannel. ++ (id)queryForCustomchannelsGetWithAdClientId:(NSString *)adClientId + customChannelId:(NSString *)customChannelId; + +// Method: adsense.customchannels.list +// List all custom channels in the specified ad client for this AdSense account. +// Required: +// adClientId: Ad client for which to list custom channels. +// Optional: +// maxResults: The maximum number of custom channels to include in the +// response, used for paging. (0..10000) +// pageToken: A continuation token, used to page through custom channels. To +// retrieve the next page, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseCustomChannels. ++ (id)queryForCustomchannelsListWithAdClientId:(NSString *)adClientId; + +#pragma mark - +#pragma mark "reports" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.reports.generate +// Generate an AdSense report based on the report request sent in the query +// parameters. Returns the result as JSON; to retrieve output in CSV format +// specify "alt=csv" as a query parameter. +// Required: +// startDate: Start of the date range to report on in "YYYY-MM-DD" format, +// inclusive. +// endDate: End of the date range to report on in "YYYY-MM-DD" format, +// inclusive. +// Optional: +// accountId: Accounts upon which to report. +// Note: For this method, "accountId" should be of type NSArray. +// currency: Optional currency to use when reporting on monetary metrics. +// Defaults to the account's currency if not set. +// dimension: Dimensions to base the report on. +// filter: Filters to be run on the report. +// locale: Optional locale to use for translating report output to a local +// language. Defaults to "en_US" if not specified. +// maxResults: The maximum number of rows of report data to return. (0..50000) +// metric: Numeric columns to include in the report. +// sort: The name of a dimension or metric to sort the resulting report on, +// optionally prefixed with "+" to sort ascending or "-" to sort descending. +// If no prefix is specified, the column is sorted ascending. +// startIndex: Index of the first row of report data to return. (0..5000) +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAdsenseReportsGenerateResponse. ++ (id)queryForReportsGenerateWithStartDate:(NSString *)startDate + endDate:(NSString *)endDate; + +#pragma mark - +#pragma mark "reports.saved" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.reports.saved.generate +// Generate an AdSense report based on the saved report ID sent in the query +// parameters. +// Required: +// savedReportId: The saved report to retrieve. +// Optional: +// locale: Optional locale to use for translating report output to a local +// language. Defaults to "en_US" if not specified. +// maxResults: The maximum number of rows of report data to return. (0..50000) +// startIndex: Index of the first row of report data to return. (0..5000) +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAdsenseReportsGenerateResponse. ++ (id)queryForReportsSavedGenerateWithSavedReportId:(NSString *)savedReportId; + +// Method: adsense.reports.saved.list +// List all saved reports in this AdSense account. +// Optional: +// maxResults: The maximum number of saved reports to include in the response, +// used for paging. (0..100) +// pageToken: A continuation token, used to page through saved reports. To +// retrieve the next page, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseSavedReports. ++ (id)queryForReportsSavedList; + +#pragma mark - +#pragma mark "savedadstyles" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.savedadstyles.get +// Get a specific saved ad style from the user's account. +// Required: +// savedAdStyleId: Saved ad style to retrieve. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseSavedAdStyle. ++ (id)queryForSavedadstylesGetWithSavedAdStyleId:(NSString *)savedAdStyleId; + +// Method: adsense.savedadstyles.list +// List all saved ad styles in the user's account. +// Optional: +// maxResults: The maximum number of saved ad styles to include in the +// response, used for paging. (0..10000) +// pageToken: A continuation token, used to page through saved ad styles. To +// retrieve the next page, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseSavedAdStyles. ++ (id)queryForSavedadstylesList; + +#pragma mark - +#pragma mark "urlchannels" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.urlchannels.list +// List all URL channels in the specified ad client for this AdSense account. +// Required: +// adClientId: Ad client for which to list URL channels. +// Optional: +// maxResults: The maximum number of URL channels to include in the response, +// used for paging. (0..10000) +// pageToken: A continuation token, used to page through URL channels. To +// retrieve the next page, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseUrlChannels. ++ (id)queryForUrlchannelsListWithAdClientId:(NSString *)adClientId; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLQueryAdSense.m.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLQueryAdSense.m.svn-base new file mode 100644 index 0000000..ed4ff0f --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLQueryAdSense.m.svn-base @@ -0,0 +1,401 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryAdSense.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLQueryAdSense (28 custom class methods, 20 custom properties) + +#import "GTLQueryAdSense.h" + +#import "GTLAdSenseAccount.h" +#import "GTLAdSenseAccounts.h" +#import "GTLAdSenseAdClients.h" +#import "GTLAdSenseAdsenseReportsGenerateResponse.h" +#import "GTLAdSenseAdUnit.h" +#import "GTLAdSenseAdUnits.h" +#import "GTLAdSenseCustomChannel.h" +#import "GTLAdSenseCustomChannels.h" +#import "GTLAdSenseSavedAdStyle.h" +#import "GTLAdSenseSavedAdStyles.h" +#import "GTLAdSenseSavedReports.h" +#import "GTLAdSenseUrlChannels.h" + +@implementation GTLQueryAdSense + +@dynamic accountId, adClientId, adUnitId, currency, customChannelId, dimension, + endDate, fields, filter, includeInactive, locale, maxResults, metric, + pageToken, savedAdStyleId, savedReportId, sort, startDate, startIndex, + tree; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"dimension", + [NSString class], @"filter", + [NSString class], @"metric", + [NSString class], @"sort", + nil]; + return map; +} + +#pragma mark - +#pragma mark "accounts.adclients" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAccountsAdclientsListWithAccountId:(NSString *)accountId { + NSString *methodName = @"adsense.accounts.adclients.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.expectedObjectClass = [GTLAdSenseAdClients class]; + return query; +} + +#pragma mark - +#pragma mark "accounts.adunits.customchannels" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAccountsAdunitsCustomchannelsListWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId + adUnitId:(NSString *)adUnitId { + NSString *methodName = @"adsense.accounts.adunits.customchannels.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.adClientId = adClientId; + query.adUnitId = adUnitId; + query.expectedObjectClass = [GTLAdSenseCustomChannels class]; + return query; +} + +#pragma mark - +#pragma mark "accounts.adunits" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAccountsAdunitsGetWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId + adUnitId:(NSString *)adUnitId { + NSString *methodName = @"adsense.accounts.adunits.get"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.adClientId = adClientId; + query.adUnitId = adUnitId; + query.expectedObjectClass = [GTLAdSenseAdUnit class]; + return query; +} + ++ (id)queryForAccountsAdunitsListWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId { + NSString *methodName = @"adsense.accounts.adunits.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.adClientId = adClientId; + query.expectedObjectClass = [GTLAdSenseAdUnits class]; + return query; +} + +#pragma mark - +#pragma mark "accounts.customchannels.adunits" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAccountsCustomchannelsAdunitsListWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId + customChannelId:(NSString *)customChannelId { + NSString *methodName = @"adsense.accounts.customchannels.adunits.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.adClientId = adClientId; + query.customChannelId = customChannelId; + query.expectedObjectClass = [GTLAdSenseAdUnits class]; + return query; +} + +#pragma mark - +#pragma mark "accounts.customchannels" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAccountsCustomchannelsGetWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId + customChannelId:(NSString *)customChannelId { + NSString *methodName = @"adsense.accounts.customchannels.get"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.adClientId = adClientId; + query.customChannelId = customChannelId; + query.expectedObjectClass = [GTLAdSenseCustomChannel class]; + return query; +} + ++ (id)queryForAccountsCustomchannelsListWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId { + NSString *methodName = @"adsense.accounts.customchannels.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.adClientId = adClientId; + query.expectedObjectClass = [GTLAdSenseCustomChannels class]; + return query; +} + +#pragma mark - +#pragma mark "accounts" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAccountsGetWithAccountId:(NSString *)accountId { + NSString *methodName = @"adsense.accounts.get"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.expectedObjectClass = [GTLAdSenseAccount class]; + return query; +} + ++ (id)queryForAccountsList { + NSString *methodName = @"adsense.accounts.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLAdSenseAccounts class]; + return query; +} + +#pragma mark - +#pragma mark "accounts.reports" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAccountsReportsGenerateWithAccountId:(NSString *)accountId + startDate:(NSString *)startDate + endDate:(NSString *)endDate { + NSString *methodName = @"adsense.accounts.reports.generate"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.startDate = startDate; + query.endDate = endDate; + query.expectedObjectClass = [GTLAdSenseAdsenseReportsGenerateResponse class]; + return query; +} + +#pragma mark - +#pragma mark "accounts.reports.saved" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAccountsReportsSavedGenerateWithAccountId:(NSString *)accountId + savedReportId:(NSString *)savedReportId { + NSString *methodName = @"adsense.accounts.reports.saved.generate"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.savedReportId = savedReportId; + query.expectedObjectClass = [GTLAdSenseAdsenseReportsGenerateResponse class]; + return query; +} + ++ (id)queryForAccountsReportsSavedListWithAccountId:(NSString *)accountId { + NSString *methodName = @"adsense.accounts.reports.saved.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.expectedObjectClass = [GTLAdSenseSavedReports class]; + return query; +} + +#pragma mark - +#pragma mark "accounts.savedadstyles" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAccountsSavedadstylesGetWithAccountId:(NSString *)accountId + savedAdStyleId:(NSString *)savedAdStyleId { + NSString *methodName = @"adsense.accounts.savedadstyles.get"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.savedAdStyleId = savedAdStyleId; + query.expectedObjectClass = [GTLAdSenseSavedAdStyle class]; + return query; +} + ++ (id)queryForAccountsSavedadstylesListWithAccountId:(NSString *)accountId { + NSString *methodName = @"adsense.accounts.savedadstyles.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.expectedObjectClass = [GTLAdSenseSavedAdStyles class]; + return query; +} + +#pragma mark - +#pragma mark "accounts.urlchannels" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAccountsUrlchannelsListWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId { + NSString *methodName = @"adsense.accounts.urlchannels.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.adClientId = adClientId; + query.expectedObjectClass = [GTLAdSenseUrlChannels class]; + return query; +} + +#pragma mark - +#pragma mark "adclients" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAdclientsList { + NSString *methodName = @"adsense.adclients.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLAdSenseAdClients class]; + return query; +} + +#pragma mark - +#pragma mark "adunits.customchannels" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAdunitsCustomchannelsListWithAdClientId:(NSString *)adClientId + adUnitId:(NSString *)adUnitId { + NSString *methodName = @"adsense.adunits.customchannels.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.adClientId = adClientId; + query.adUnitId = adUnitId; + query.expectedObjectClass = [GTLAdSenseCustomChannels class]; + return query; +} + +#pragma mark - +#pragma mark "adunits" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAdunitsGetWithAdClientId:(NSString *)adClientId + adUnitId:(NSString *)adUnitId { + NSString *methodName = @"adsense.adunits.get"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.adClientId = adClientId; + query.adUnitId = adUnitId; + query.expectedObjectClass = [GTLAdSenseAdUnit class]; + return query; +} + ++ (id)queryForAdunitsListWithAdClientId:(NSString *)adClientId { + NSString *methodName = @"adsense.adunits.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.adClientId = adClientId; + query.expectedObjectClass = [GTLAdSenseAdUnits class]; + return query; +} + +#pragma mark - +#pragma mark "customchannels.adunits" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForCustomchannelsAdunitsListWithAdClientId:(NSString *)adClientId + customChannelId:(NSString *)customChannelId { + NSString *methodName = @"adsense.customchannels.adunits.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.adClientId = adClientId; + query.customChannelId = customChannelId; + query.expectedObjectClass = [GTLAdSenseAdUnits class]; + return query; +} + +#pragma mark - +#pragma mark "customchannels" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForCustomchannelsGetWithAdClientId:(NSString *)adClientId + customChannelId:(NSString *)customChannelId { + NSString *methodName = @"adsense.customchannels.get"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.adClientId = adClientId; + query.customChannelId = customChannelId; + query.expectedObjectClass = [GTLAdSenseCustomChannel class]; + return query; +} + ++ (id)queryForCustomchannelsListWithAdClientId:(NSString *)adClientId { + NSString *methodName = @"adsense.customchannels.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.adClientId = adClientId; + query.expectedObjectClass = [GTLAdSenseCustomChannels class]; + return query; +} + +#pragma mark - +#pragma mark "reports" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForReportsGenerateWithStartDate:(NSString *)startDate + endDate:(NSString *)endDate { + NSString *methodName = @"adsense.reports.generate"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.startDate = startDate; + query.endDate = endDate; + query.expectedObjectClass = [GTLAdSenseAdsenseReportsGenerateResponse class]; + return query; +} + +#pragma mark - +#pragma mark "reports.saved" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForReportsSavedGenerateWithSavedReportId:(NSString *)savedReportId { + NSString *methodName = @"adsense.reports.saved.generate"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.savedReportId = savedReportId; + query.expectedObjectClass = [GTLAdSenseAdsenseReportsGenerateResponse class]; + return query; +} + ++ (id)queryForReportsSavedList { + NSString *methodName = @"adsense.reports.saved.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLAdSenseSavedReports class]; + return query; +} + +#pragma mark - +#pragma mark "savedadstyles" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForSavedadstylesGetWithSavedAdStyleId:(NSString *)savedAdStyleId { + NSString *methodName = @"adsense.savedadstyles.get"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.savedAdStyleId = savedAdStyleId; + query.expectedObjectClass = [GTLAdSenseSavedAdStyle class]; + return query; +} + ++ (id)queryForSavedadstylesList { + NSString *methodName = @"adsense.savedadstyles.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLAdSenseSavedAdStyles class]; + return query; +} + +#pragma mark - +#pragma mark "urlchannels" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForUrlchannelsListWithAdClientId:(NSString *)adClientId { + NSString *methodName = @"adsense.urlchannels.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.adClientId = adClientId; + query.expectedObjectClass = [GTLAdSenseUrlChannels class]; + return query; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLServiceAdSense.h.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLServiceAdSense.h.svn-base new file mode 100644 index 0000000..eb6b748 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLServiceAdSense.h.svn-base @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceAdSense.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLServiceAdSense (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceAdSense : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryAdSense.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLServiceAdSense.m.svn-base b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLServiceAdSense.m.svn-base new file mode 100644 index 0000000..0374e9e --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/.svn/text-base/GTLServiceAdSense.m.svn-base @@ -0,0 +1,77 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceAdSense.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLServiceAdSense (0 custom class methods, 0 custom properties) + +#import "GTLAdSense.h" + +@implementation GTLServiceAdSense + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryAdSense class], + [GTLAdSenseAccount class], + [GTLAdSenseAccounts class], + [GTLAdSenseAdClient class], + [GTLAdSenseAdClients class], + [GTLAdSenseAdsenseReportsGenerateResponse class], + [GTLAdSenseAdStyle class], + [GTLAdSenseAdUnit class], + [GTLAdSenseAdUnits class], + [GTLAdSenseCustomChannel class], + [GTLAdSenseCustomChannels class], + [GTLAdSenseSavedAdStyle class], + [GTLAdSenseSavedAdStyles class], + [GTLAdSenseSavedReport class], + [GTLAdSenseSavedReports class], + [GTLAdSenseUrlChannel class], + [GTLAdSenseUrlChannels class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v1.2"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSense.h b/GTL/Source/Services/AdSense/Generated/GTLAdSense.h new file mode 100644 index 0000000..9a1eb73 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSense.h @@ -0,0 +1,50 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSense.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ + +#import "GTLAdSenseConstants.h" + +#import "GTLAdSenseAccount.h" +#import "GTLAdSenseAccounts.h" +#import "GTLAdSenseAdClient.h" +#import "GTLAdSenseAdClients.h" +#import "GTLAdSenseAdsenseReportsGenerateResponse.h" +#import "GTLAdSenseAdStyle.h" +#import "GTLAdSenseAdUnit.h" +#import "GTLAdSenseAdUnits.h" +#import "GTLAdSenseCustomChannel.h" +#import "GTLAdSenseCustomChannels.h" +#import "GTLAdSenseSavedAdStyle.h" +#import "GTLAdSenseSavedAdStyles.h" +#import "GTLAdSenseSavedReport.h" +#import "GTLAdSenseSavedReports.h" +#import "GTLAdSenseUrlChannel.h" +#import "GTLAdSenseUrlChannels.h" + +#import "GTLQueryAdSense.h" +#import "GTLServiceAdSense.h" diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseAccount.h b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAccount.h new file mode 100644 index 0000000..f6263f2 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAccount.h @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAccount.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAccount (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseAccount; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAccount +// + +@interface GTLAdSenseAccount : GTLObject + +// Unique identifier of this account. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Kind of resource this is, in this case adsense#account. +@property (copy) NSString *kind; + +// Name of this account. +@property (copy) NSString *name; + +// Whether this account is premium. +@property (retain) NSNumber *premium; // boolValue + +// Sub accounts of the this account. +@property (retain) NSArray *subAccounts; // of GTLAdSenseAccount + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseAccount.m b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAccount.m new file mode 100644 index 0000000..ae3eac9 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAccount.m @@ -0,0 +1,60 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAccount.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAccount (0 custom class methods, 5 custom properties) + +#import "GTLAdSenseAccount.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAccount +// + +@implementation GTLAdSenseAccount +@dynamic identifier, kind, name, premium, subAccounts; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAdSenseAccount class] + forKey:@"subAccounts"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#account"]; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseAccounts.h b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAccounts.h new file mode 100644 index 0000000..f3be08c --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAccounts.h @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAccounts.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAccounts (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseAccount; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAccounts +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAdSenseAccounts : GTLCollectionObject + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// The accounts returned in this list response. +@property (retain) NSArray *items; // of GTLAdSenseAccount + +// Kind of list this is, in this case adsense#accounts. +@property (copy) NSString *kind; + +// Continuation token used to page through accounts. To retrieve the next page +// of results, set the next request's "pageToken" value to this. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseAccounts.m b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAccounts.m new file mode 100644 index 0000000..1d1c86e --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAccounts.m @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAccounts.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAccounts (0 custom class methods, 4 custom properties) + +#import "GTLAdSenseAccounts.h" + +#import "GTLAdSenseAccount.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAccounts +// + +@implementation GTLAdSenseAccounts +@dynamic ETag, items, kind, nextPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAdSenseAccount class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#accounts"]; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdClient.h b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdClient.h new file mode 100644 index 0000000..de2aaaf --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdClient.h @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAdClient.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAdClient (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdClient +// + +@interface GTLAdSenseAdClient : GTLObject + +// Whether this ad client is opted in to ARC. +@property (retain) NSNumber *arcOptIn; // boolValue + +// Unique identifier of this ad client. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Kind of resource this is, in this case adsense#adClient. +@property (copy) NSString *kind; + +// This ad client's product code, which corresponds to the PRODUCT_CODE report +// dimension. +@property (copy) NSString *productCode; + +// Whether this ad client supports being reported on. +@property (retain) NSNumber *supportsReporting; // boolValue + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdClient.m b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdClient.m new file mode 100644 index 0000000..0219976 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdClient.m @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAdClient.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAdClient (0 custom class methods, 5 custom properties) + +#import "GTLAdSenseAdClient.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdClient +// + +@implementation GTLAdSenseAdClient +@dynamic arcOptIn, identifier, kind, productCode, supportsReporting; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#adClient"]; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdClients.h b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdClients.h new file mode 100644 index 0000000..3686bd1 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdClients.h @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAdClients.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAdClients (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseAdClient; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdClients +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAdSenseAdClients : GTLCollectionObject + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// The ad clients returned in this list response. +@property (retain) NSArray *items; // of GTLAdSenseAdClient + +// Kind of list this is, in this case adsense#adClients. +@property (copy) NSString *kind; + +// Continuation token used to page through ad clients. To retrieve the next page +// of results, set the next request's "pageToken" value to this. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdClients.m b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdClients.m new file mode 100644 index 0000000..6bd2da8 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdClients.m @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAdClients.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAdClients (0 custom class methods, 4 custom properties) + +#import "GTLAdSenseAdClients.h" + +#import "GTLAdSenseAdClient.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdClients +// + +@implementation GTLAdSenseAdClients +@dynamic ETag, items, kind, nextPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAdSenseAdClient class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#adClients"]; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdStyle.h b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdStyle.h new file mode 100644 index 0000000..4501342 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdStyle.h @@ -0,0 +1,105 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAdStyle.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAdStyle (0 custom class methods, 4 custom properties) +// GTLAdSenseAdStyleColors (0 custom class methods, 5 custom properties) +// GTLAdSenseAdStyleFont (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseAdStyleColors; +@class GTLAdSenseAdStyleFont; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdStyle +// + +@interface GTLAdSenseAdStyle : GTLObject + +// The colors which are included in the style. These are represented as six +// hexadecimal characters, similar to HTML color codes, but without the leading +// hash. +@property (retain) GTLAdSenseAdStyleColors *colors; + +// The style of the corners in the ad. +@property (copy) NSString *corners; + +// The font which is included in the style. +@property (retain) GTLAdSenseAdStyleFont *font; + +// Kind this is, in this case adsense#adStyle. +@property (copy) NSString *kind; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdStyleColors +// + +@interface GTLAdSenseAdStyleColors : GTLObject + +// The color of the ad background. +@property (copy) NSString *background; + +// The color of the ad border. +@property (copy) NSString *border; + +// The color of the ad text. +@property (copy) NSString *text; + +// The color of the ad title. +@property (copy) NSString *title; + +// The color of the ad url. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdStyleFont +// + +@interface GTLAdSenseAdStyleFont : GTLObject + +// The family of the font. +@property (copy) NSString *family; + +// The size of the font. +@property (copy) NSString *size; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdStyle.m b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdStyle.m new file mode 100644 index 0000000..5665a8c --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdStyle.m @@ -0,0 +1,68 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAdStyle.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAdStyle (0 custom class methods, 4 custom properties) +// GTLAdSenseAdStyleColors (0 custom class methods, 5 custom properties) +// GTLAdSenseAdStyleFont (0 custom class methods, 2 custom properties) + +#import "GTLAdSenseAdStyle.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdStyle +// + +@implementation GTLAdSenseAdStyle +@dynamic colors, corners, font, kind; + ++ (void)load { + [self registerObjectClassForKind:@"adsense#adStyle"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdStyleColors +// + +@implementation GTLAdSenseAdStyleColors +@dynamic background, border, text, title, url; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdStyleFont +// + +@implementation GTLAdSenseAdStyleFont +@dynamic family, size; +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdUnit.h b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdUnit.h new file mode 100644 index 0000000..1f84be5 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdUnit.h @@ -0,0 +1,175 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAdUnit.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAdUnit (0 custom class methods, 10 custom properties) +// GTLAdSenseAdUnitContentAdsSettings (0 custom class methods, 3 custom properties) +// GTLAdSenseAdUnitFeedAdsSettings (0 custom class methods, 4 custom properties) +// GTLAdSenseAdUnitMobileContentAdsSettings (0 custom class methods, 4 custom properties) +// GTLAdSenseAdUnitContentAdsSettingsBackupOption (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseAdStyle; +@class GTLAdSenseAdUnitContentAdsSettings; +@class GTLAdSenseAdUnitContentAdsSettingsBackupOption; +@class GTLAdSenseAdUnitFeedAdsSettings; +@class GTLAdSenseAdUnitMobileContentAdsSettings; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdUnit +// + +@interface GTLAdSenseAdUnit : GTLObject + +// Identity code of this ad unit, not necessarily unique across ad clients. +@property (copy) NSString *code; + +// Settings specific to content ads (AFC) and highend mobile content ads (AFMC). +@property (retain) GTLAdSenseAdUnitContentAdsSettings *contentAdsSettings; + +// Custom style information specific to this ad unit. +@property (retain) GTLAdSenseAdStyle *customStyle; + +// Settings specific to feed ads (AFF). +@property (retain) GTLAdSenseAdUnitFeedAdsSettings *feedAdsSettings; + +// Unique identifier of this ad unit. This should be considered an opaque +// identifier; it is not safe to rely on it being in any particular format. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Kind of resource this is, in this case adsense#adUnit. +@property (copy) NSString *kind; + +// Settings specific to WAP mobile content ads (AFMC). +@property (retain) GTLAdSenseAdUnitMobileContentAdsSettings *mobileContentAdsSettings; + +// Name of this ad unit. +@property (copy) NSString *name; + +// ID of the saved ad style which holds this ad unit's style information. +@property (copy) NSString *savedStyleId; + +// Status of this ad unit. Possible values are: +// NEW: Indicates that the ad unit was created within the last seven days and +// does not yet have any activity associated with it. +// ACTIVE: Indicates that there has been activity on this ad unit in the last +// seven days. +// INACTIVE: Indicates that there has been no activity on this ad unit in the +// last seven days. +@property (copy) NSString *status; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdUnitContentAdsSettings +// + +@interface GTLAdSenseAdUnitContentAdsSettings : GTLObject + +// The backup option to be used in instances where no ad is available. +@property (retain) GTLAdSenseAdUnitContentAdsSettingsBackupOption *backupOption; + +// Size of this ad unit. +@property (copy) NSString *size; + +// Type of this ad unit. +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdUnitFeedAdsSettings +// + +@interface GTLAdSenseAdUnitFeedAdsSettings : GTLObject + +// The position of the ads relative to the feed entries. +@property (copy) NSString *adPosition; + +// The frequency at which ads should appear in the feed (i.e. every N entries). +@property (retain) NSNumber *frequency; // intValue + +// The minimum length an entry should be in order to have attached ads. +@property (retain) NSNumber *minimumWordCount; // intValue + +// The type of ads which should appear. +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdUnitMobileContentAdsSettings +// + +@interface GTLAdSenseAdUnitMobileContentAdsSettings : GTLObject + +// The markup language to use for this ad unit. +@property (copy) NSString *markupLanguage; + +// The scripting language to use for this ad unit. +@property (copy) NSString *scriptingLanguage; + +// Size of this ad unit. +@property (copy) NSString *size; + +// Type of this ad unit. +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdUnitContentAdsSettingsBackupOption +// + +@interface GTLAdSenseAdUnitContentAdsSettingsBackupOption : GTLObject + +// Color to use when type is set to COLOR. +@property (copy) NSString *color; + +// Type of the backup option. Possible values are BLANK, COLOR and URL. +@property (copy) NSString *type; + +// URL to use when type is set to URL. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdUnit.m b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdUnit.m new file mode 100644 index 0000000..bb0a1f1 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdUnit.m @@ -0,0 +1,100 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAdUnit.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAdUnit (0 custom class methods, 10 custom properties) +// GTLAdSenseAdUnitContentAdsSettings (0 custom class methods, 3 custom properties) +// GTLAdSenseAdUnitFeedAdsSettings (0 custom class methods, 4 custom properties) +// GTLAdSenseAdUnitMobileContentAdsSettings (0 custom class methods, 4 custom properties) +// GTLAdSenseAdUnitContentAdsSettingsBackupOption (0 custom class methods, 3 custom properties) + +#import "GTLAdSenseAdUnit.h" + +#import "GTLAdSenseAdStyle.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdUnit +// + +@implementation GTLAdSenseAdUnit +@dynamic code, contentAdsSettings, customStyle, feedAdsSettings, identifier, + kind, mobileContentAdsSettings, name, savedStyleId, status; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#adUnit"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdUnitContentAdsSettings +// + +@implementation GTLAdSenseAdUnitContentAdsSettings +@dynamic backupOption, size, type; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdUnitFeedAdsSettings +// + +@implementation GTLAdSenseAdUnitFeedAdsSettings +@dynamic adPosition, frequency, minimumWordCount, type; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdUnitMobileContentAdsSettings +// + +@implementation GTLAdSenseAdUnitMobileContentAdsSettings +@dynamic markupLanguage, scriptingLanguage, size, type; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdUnitContentAdsSettingsBackupOption +// + +@implementation GTLAdSenseAdUnitContentAdsSettingsBackupOption +@dynamic color, type, url; +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdUnits.h b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdUnits.h new file mode 100644 index 0000000..9a55195 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdUnits.h @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAdUnits.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAdUnits (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseAdUnit; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdUnits +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAdSenseAdUnits : GTLCollectionObject + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// The ad units returned in this list response. +@property (retain) NSArray *items; // of GTLAdSenseAdUnit + +// Kind of list this is, in this case adsense#adUnits. +@property (copy) NSString *kind; + +// Continuation token used to page through ad units. To retrieve the next page +// of results, set the next request's "pageToken" value to this. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdUnits.m b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdUnits.m new file mode 100644 index 0000000..576c25d --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdUnits.m @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAdUnits.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAdUnits (0 custom class methods, 4 custom properties) + +#import "GTLAdSenseAdUnits.h" + +#import "GTLAdSenseAdUnit.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdUnits +// + +@implementation GTLAdSenseAdUnits +@dynamic ETag, items, kind, nextPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAdSenseAdUnit class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#adUnits"]; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdsenseReportsGenerateResponse.h b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdsenseReportsGenerateResponse.h new file mode 100644 index 0000000..dcef9c7 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdsenseReportsGenerateResponse.h @@ -0,0 +1,98 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAdsenseReportsGenerateResponse.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAdsenseReportsGenerateResponse (0 custom class methods, 7 custom properties) +// GTLAdSenseAdsenseReportsGenerateResponseHeadersItem (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseAdsenseReportsGenerateResponseHeadersItem; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdsenseReportsGenerateResponse +// + +@interface GTLAdSenseAdsenseReportsGenerateResponse : GTLObject + +// The averages of the report. This is the same length as any other row in the +// report; cells corresponding to dimension columns are empty. +@property (retain) NSArray *averages; // of NSString + +// The header information of the columns requested in the report. This is a list +// of headers; one for each dimension in the request, followed by one for each +// metric in the request. +@property (retain) NSArray *headers; // of GTLAdSenseAdsenseReportsGenerateResponseHeadersItem + +// Kind this is, in this case adsense#report. +@property (copy) NSString *kind; + +// The output rows of the report. Each row is a list of cells; one for each +// dimension in the request, followed by one for each metric in the request. The +// dimension cells contain strings, and the metric cells contain numbers. +@property (retain) NSArray *rows; // of NSArray of NSString + +// The total number of rows matched by the report request. Fewer rows may be +// returned in the response due to being limited by the row count requested or +// the report row limit. +@property (retain) NSNumber *totalMatchedRows; // longLongValue + +// The totals of the report. This is the same length as any other row in the +// report; cells corresponding to dimension columns are empty. +@property (retain) NSArray *totals; // of NSString + +// Any warnings associated with generation of the report. +@property (retain) NSArray *warnings; // of NSString + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdsenseReportsGenerateResponseHeadersItem +// + +@interface GTLAdSenseAdsenseReportsGenerateResponseHeadersItem : GTLObject + +// The currency of this column. Only present if the header type is +// METRIC_CURRENCY. +@property (copy) NSString *currency; + +// The name of the header. +@property (copy) NSString *name; + +// The type of the header; one of DIMENSION, METRIC_TALLY, METRIC_RATIO, or +// METRIC_CURRENCY. +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdsenseReportsGenerateResponse.m b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdsenseReportsGenerateResponse.m new file mode 100644 index 0000000..523372a --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseAdsenseReportsGenerateResponse.m @@ -0,0 +1,69 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseAdsenseReportsGenerateResponse.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseAdsenseReportsGenerateResponse (0 custom class methods, 7 custom properties) +// GTLAdSenseAdsenseReportsGenerateResponseHeadersItem (0 custom class methods, 3 custom properties) + +#import "GTLAdSenseAdsenseReportsGenerateResponse.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdsenseReportsGenerateResponse +// + +@implementation GTLAdSenseAdsenseReportsGenerateResponse +@dynamic averages, headers, kind, rows, totalMatchedRows, totals, warnings; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"averages", + [GTLAdSenseAdsenseReportsGenerateResponseHeadersItem class], @"headers", + [NSString class], @"rows", + [NSString class], @"totals", + [NSString class], @"warnings", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#report"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseAdsenseReportsGenerateResponseHeadersItem +// + +@implementation GTLAdSenseAdsenseReportsGenerateResponseHeadersItem +@dynamic currency, name, type; +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseConstants.h b/GTL/Source/Services/AdSense/Generated/GTLAdSenseConstants.h new file mode 100644 index 0000000..f7af3df --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseConstants.h @@ -0,0 +1,42 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// View and manage your AdSense data +GTL_EXTERN NSString * const kGTLAuthScopeAdSense; // "https://www.googleapis.com/auth/adsense" +// View your AdSense data +GTL_EXTERN NSString * const kGTLAuthScopeAdSenseReadonly; // "https://www.googleapis.com/auth/adsense.readonly" diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseConstants.m b/GTL/Source/Services/AdSense/Generated/GTLAdSenseConstants.m new file mode 100644 index 0000000..f86d020 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseConstants.m @@ -0,0 +1,34 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ + +#import "GTLAdSenseConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeAdSense = @"https://www.googleapis.com/auth/adsense"; +NSString * const kGTLAuthScopeAdSenseReadonly = @"https://www.googleapis.com/auth/adsense.readonly"; diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseCustomChannel.h b/GTL/Source/Services/AdSense/Generated/GTLAdSenseCustomChannel.h new file mode 100644 index 0000000..ce0732a --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseCustomChannel.h @@ -0,0 +1,92 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseCustomChannel.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseCustomChannel (0 custom class methods, 5 custom properties) +// GTLAdSenseCustomChannelTargetingInfo (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseCustomChannelTargetingInfo; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseCustomChannel +// + +@interface GTLAdSenseCustomChannel : GTLObject + +// Code of this custom channel, not necessarily unique across ad clients. +@property (copy) NSString *code; + +// Unique identifier of this custom channel. This should be considered an opaque +// identifier; it is not safe to rely on it being in any particular format. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Kind of resource this is, in this case adsense#customChannel. +@property (copy) NSString *kind; + +// Name of this custom channel. +@property (copy) NSString *name; + +// The targeting information of this custom channel, if activated. +@property (retain) GTLAdSenseCustomChannelTargetingInfo *targetingInfo; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseCustomChannelTargetingInfo +// + +@interface GTLAdSenseCustomChannelTargetingInfo : GTLObject + +// The name used to describe this channel externally. +@property (copy) NSString *adsAppearOn; + +// The external description of the channel. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The locations in which ads appear. (Only valid for content and mobile content +// ads). Acceptable values for content ads are: TOP_LEFT, TOP_CENTER, TOP_RIGHT, +// MIDDLE_LEFT, MIDDLE_CENTER, MIDDLE_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, +// BOTTOM_RIGHT, MULTIPLE_LOCATIONS. Acceptable values for mobile content ads +// are: TOP, MIDDLE, BOTTOM, MULTIPLE_LOCATIONS. +@property (copy) NSString *location; + +// The language of the sites ads will be displayed on. +@property (copy) NSString *siteLanguage; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseCustomChannel.m b/GTL/Source/Services/AdSense/Generated/GTLAdSenseCustomChannel.m new file mode 100644 index 0000000..542f089 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseCustomChannel.m @@ -0,0 +1,72 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseCustomChannel.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseCustomChannel (0 custom class methods, 5 custom properties) +// GTLAdSenseCustomChannelTargetingInfo (0 custom class methods, 4 custom properties) + +#import "GTLAdSenseCustomChannel.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseCustomChannel +// + +@implementation GTLAdSenseCustomChannel +@dynamic code, identifier, kind, name, targetingInfo; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#customChannel"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseCustomChannelTargetingInfo +// + +@implementation GTLAdSenseCustomChannelTargetingInfo +@dynamic adsAppearOn, descriptionProperty, location, siteLanguage; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseCustomChannels.h b/GTL/Source/Services/AdSense/Generated/GTLAdSenseCustomChannels.h new file mode 100644 index 0000000..c324c27 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseCustomChannels.h @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseCustomChannels.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseCustomChannels (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseCustomChannel; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseCustomChannels +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAdSenseCustomChannels : GTLCollectionObject + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// The custom channels returned in this list response. +@property (retain) NSArray *items; // of GTLAdSenseCustomChannel + +// Kind of list this is, in this case adsense#customChannels. +@property (copy) NSString *kind; + +// Continuation token used to page through custom channels. To retrieve the next +// page of results, set the next request's "pageToken" value to this. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseCustomChannels.m b/GTL/Source/Services/AdSense/Generated/GTLAdSenseCustomChannels.m new file mode 100644 index 0000000..710a3e6 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseCustomChannels.m @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseCustomChannels.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseCustomChannels (0 custom class methods, 4 custom properties) + +#import "GTLAdSenseCustomChannels.h" + +#import "GTLAdSenseCustomChannel.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseCustomChannels +// + +@implementation GTLAdSenseCustomChannels +@dynamic ETag, items, kind, nextPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAdSenseCustomChannel class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#customChannels"]; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseSavedAdStyle.h b/GTL/Source/Services/AdSense/Generated/GTLAdSenseSavedAdStyle.h new file mode 100644 index 0000000..f19054a --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseSavedAdStyle.h @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseSavedAdStyle.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseSavedAdStyle (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseAdStyle; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseSavedAdStyle +// + +@interface GTLAdSenseSavedAdStyle : GTLObject + +// The AdStyle itself. +@property (retain) GTLAdSenseAdStyle *adStyle; + +// Unique identifier of this saved ad style. This should be considered an opaque +// identifier; it is not safe to rely on it being in any particular format. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Kind of resource this is, in this case adsense#savedAdStyle. +@property (copy) NSString *kind; + +// The user selected name of this SavedAdStyle. +@property (copy) NSString *name; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseSavedAdStyle.m b/GTL/Source/Services/AdSense/Generated/GTLAdSenseSavedAdStyle.m new file mode 100644 index 0000000..d8ed5a7 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseSavedAdStyle.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseSavedAdStyle.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseSavedAdStyle (0 custom class methods, 4 custom properties) + +#import "GTLAdSenseSavedAdStyle.h" + +#import "GTLAdSenseAdStyle.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseSavedAdStyle +// + +@implementation GTLAdSenseSavedAdStyle +@dynamic adStyle, identifier, kind, name; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#savedAdStyle"]; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseSavedAdStyles.h b/GTL/Source/Services/AdSense/Generated/GTLAdSenseSavedAdStyles.h new file mode 100644 index 0000000..85248c6 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseSavedAdStyles.h @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseSavedAdStyles.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseSavedAdStyles (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseSavedAdStyle; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseSavedAdStyles +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAdSenseSavedAdStyles : GTLCollectionObject + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// The saved ad styles returned in this list response. +@property (retain) NSArray *items; // of GTLAdSenseSavedAdStyle + +// Kind of list this is, in this case adsense#savedAdStyles. +@property (copy) NSString *kind; + +// Continuation token used to page through ad units. To retrieve the next page +// of results, set the next request's "pageToken" value to this. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseSavedAdStyles.m b/GTL/Source/Services/AdSense/Generated/GTLAdSenseSavedAdStyles.m new file mode 100644 index 0000000..81a0d5c --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseSavedAdStyles.m @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseSavedAdStyles.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseSavedAdStyles (0 custom class methods, 4 custom properties) + +#import "GTLAdSenseSavedAdStyles.h" + +#import "GTLAdSenseSavedAdStyle.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseSavedAdStyles +// + +@implementation GTLAdSenseSavedAdStyles +@dynamic ETag, items, kind, nextPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAdSenseSavedAdStyle class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#savedAdStyles"]; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseSavedReport.h b/GTL/Source/Services/AdSense/Generated/GTLAdSenseSavedReport.h new file mode 100644 index 0000000..1d85935 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseSavedReport.h @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseSavedReport.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseSavedReport (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseSavedReport +// + +@interface GTLAdSenseSavedReport : GTLObject + +// Unique identifier of this saved report. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Kind of resource this is, in this case adsense#savedReport. +@property (copy) NSString *kind; + +// This saved report's name. +@property (copy) NSString *name; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseSavedReport.m b/GTL/Source/Services/AdSense/Generated/GTLAdSenseSavedReport.m new file mode 100644 index 0000000..0dae25a --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseSavedReport.m @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseSavedReport.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseSavedReport (0 custom class methods, 3 custom properties) + +#import "GTLAdSenseSavedReport.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseSavedReport +// + +@implementation GTLAdSenseSavedReport +@dynamic identifier, kind, name; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#savedReport"]; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseSavedReports.h b/GTL/Source/Services/AdSense/Generated/GTLAdSenseSavedReports.h new file mode 100644 index 0000000..02c1afa --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseSavedReports.h @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseSavedReports.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseSavedReports (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseSavedReport; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseSavedReports +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAdSenseSavedReports : GTLCollectionObject + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// The saved reports returned in this list response. +@property (retain) NSArray *items; // of GTLAdSenseSavedReport + +// Kind of list this is, in this case adsense#savedReports. +@property (copy) NSString *kind; + +// Continuation token used to page through saved reports. To retrieve the next +// page of results, set the next request's "pageToken" value to this. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseSavedReports.m b/GTL/Source/Services/AdSense/Generated/GTLAdSenseSavedReports.m new file mode 100644 index 0000000..0418e4e --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseSavedReports.m @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseSavedReports.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseSavedReports (0 custom class methods, 4 custom properties) + +#import "GTLAdSenseSavedReports.h" + +#import "GTLAdSenseSavedReport.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseSavedReports +// + +@implementation GTLAdSenseSavedReports +@dynamic ETag, items, kind, nextPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAdSenseSavedReport class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#savedReports"]; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseUrlChannel.h b/GTL/Source/Services/AdSense/Generated/GTLAdSenseUrlChannel.h new file mode 100644 index 0000000..b2a411a --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseUrlChannel.h @@ -0,0 +1,57 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseUrlChannel.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseUrlChannel (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseUrlChannel +// + +@interface GTLAdSenseUrlChannel : GTLObject + +// Unique identifier of this URL channel. This should be considered an opaque +// identifier; it is not safe to rely on it being in any particular format. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Kind of resource this is, in this case adsense#urlChannel. +@property (copy) NSString *kind; + +// URL Pattern of this URL channel. Does not include "http://" or "https://". +// Example: www.example.com/home +@property (copy) NSString *urlPattern; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseUrlChannel.m b/GTL/Source/Services/AdSense/Generated/GTLAdSenseUrlChannel.m new file mode 100644 index 0000000..7eb5a88 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseUrlChannel.m @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseUrlChannel.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseUrlChannel (0 custom class methods, 3 custom properties) + +#import "GTLAdSenseUrlChannel.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseUrlChannel +// + +@implementation GTLAdSenseUrlChannel +@dynamic identifier, kind, urlPattern; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#urlChannel"]; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseUrlChannels.h b/GTL/Source/Services/AdSense/Generated/GTLAdSenseUrlChannels.h new file mode 100644 index 0000000..9f02040 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseUrlChannels.h @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseUrlChannels.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseUrlChannels (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAdSenseUrlChannel; + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseUrlChannels +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAdSenseUrlChannels : GTLCollectionObject + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// The URL channels returned in this list response. +@property (retain) NSArray *items; // of GTLAdSenseUrlChannel + +// Kind of list this is, in this case adsense#urlChannels. +@property (copy) NSString *kind; + +// Continuation token used to page through URL channels. To retrieve the next +// page of results, set the next request's "pageToken" value to this. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSenseUrlChannels.m b/GTL/Source/Services/AdSense/Generated/GTLAdSenseUrlChannels.m new file mode 100644 index 0000000..094ea38 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSenseUrlChannels.m @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSenseUrlChannels.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLAdSenseUrlChannels (0 custom class methods, 4 custom properties) + +#import "GTLAdSenseUrlChannels.h" + +#import "GTLAdSenseUrlChannel.h" + +// ---------------------------------------------------------------------------- +// +// GTLAdSenseUrlChannels +// + +@implementation GTLAdSenseUrlChannels +@dynamic ETag, items, kind, nextPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAdSenseUrlChannel class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"adsense#urlChannels"]; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLAdSense_Sources.m b/GTL/Source/Services/AdSense/Generated/GTLAdSense_Sources.m new file mode 100644 index 0000000..423ff46 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLAdSense_Sources.m @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAdSense_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ + +#import "GTLAdSenseConstants.m" + +#import "GTLAdSenseAccount.m" +#import "GTLAdSenseAccounts.m" +#import "GTLAdSenseAdClient.m" +#import "GTLAdSenseAdClients.m" +#import "GTLAdSenseAdsenseReportsGenerateResponse.m" +#import "GTLAdSenseAdStyle.m" +#import "GTLAdSenseAdUnit.m" +#import "GTLAdSenseAdUnits.m" +#import "GTLAdSenseCustomChannel.m" +#import "GTLAdSenseCustomChannels.m" +#import "GTLAdSenseSavedAdStyle.m" +#import "GTLAdSenseSavedAdStyles.m" +#import "GTLAdSenseSavedReport.m" +#import "GTLAdSenseSavedReports.m" +#import "GTLAdSenseUrlChannel.m" +#import "GTLAdSenseUrlChannels.m" + +#import "GTLQueryAdSense.m" +#import "GTLServiceAdSense.m" diff --git a/GTL/Source/Services/AdSense/Generated/GTLQueryAdSense.h b/GTL/Source/Services/AdSense/Generated/GTLQueryAdSense.h new file mode 100644 index 0000000..370357f --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLQueryAdSense.h @@ -0,0 +1,619 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryAdSense.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLQueryAdSense (28 custom class methods, 20 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@interface GTLQueryAdSense : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +// "accountId" has different types for some query methods; see the documentation +// for the right type for each query method. +@property (retain) id accountId; +@property (copy) NSString *adClientId; +@property (copy) NSString *adUnitId; +@property (copy) NSString *currency; +@property (copy) NSString *customChannelId; +@property (retain) NSArray *dimension; // of NSString +@property (copy) NSString *endDate; +@property (retain) NSArray *filter; // of NSString +@property (assign) BOOL includeInactive; +@property (copy) NSString *locale; +@property (assign) NSInteger maxResults; +@property (retain) NSArray *metric; // of NSString +@property (copy) NSString *pageToken; +@property (copy) NSString *savedAdStyleId; +@property (copy) NSString *savedReportId; +@property (retain) NSArray *sort; // of NSString +@property (copy) NSString *startDate; +@property (assign) NSInteger startIndex; +@property (assign) BOOL tree; + +#pragma mark - +#pragma mark "accounts.adclients" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.accounts.adclients.list +// List all ad clients in the specified account. +// Required: +// accountId: Account for which to list ad clients. +// Optional: +// maxResults: The maximum number of ad clients to include in the response, +// used for paging. (0..10000) +// pageToken: A continuation token, used to page through ad clients. To +// retrieve the next page, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAdClients. ++ (id)queryForAccountsAdclientsListWithAccountId:(NSString *)accountId; + +#pragma mark - +#pragma mark "accounts.adunits.customchannels" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.accounts.adunits.customchannels.list +// List all custom channels which the specified ad unit belongs to. +// Required: +// accountId: Account to which the ad client belongs. +// adClientId: Ad client which contains the ad unit. +// adUnitId: Ad unit for which to list custom channels. +// Optional: +// maxResults: The maximum number of custom channels to include in the +// response, used for paging. (0..10000) +// pageToken: A continuation token, used to page through custom channels. To +// retrieve the next page, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseCustomChannels. ++ (id)queryForAccountsAdunitsCustomchannelsListWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId + adUnitId:(NSString *)adUnitId; + +#pragma mark - +#pragma mark "accounts.adunits" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.accounts.adunits.get +// Gets the specified ad unit in the specified ad client for the specified +// account. +// Required: +// accountId: Account to which the ad client belongs. +// adClientId: Ad client for which to get the ad unit. +// adUnitId: Ad unit to retrieve. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAdUnit. ++ (id)queryForAccountsAdunitsGetWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId + adUnitId:(NSString *)adUnitId; + +// Method: adsense.accounts.adunits.list +// List all ad units in the specified ad client for the specified account. +// Required: +// accountId: Account to which the ad client belongs. +// adClientId: Ad client for which to list ad units. +// Optional: +// includeInactive: Whether to include inactive ad units. Default: true. +// maxResults: The maximum number of ad units to include in the response, used +// for paging. (0..10000) +// pageToken: A continuation token, used to page through ad units. To retrieve +// the next page, set this parameter to the value of "nextPageToken" from +// the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAdUnits. ++ (id)queryForAccountsAdunitsListWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId; + +#pragma mark - +#pragma mark "accounts.customchannels.adunits" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.accounts.customchannels.adunits.list +// List all ad units in the specified custom channel. +// Required: +// accountId: Account to which the ad client belongs. +// adClientId: Ad client which contains the custom channel. +// customChannelId: Custom channel for which to list ad units. +// Optional: +// includeInactive: Whether to include inactive ad units. Default: true. +// maxResults: The maximum number of ad units to include in the response, used +// for paging. (0..10000) +// pageToken: A continuation token, used to page through ad units. To retrieve +// the next page, set this parameter to the value of "nextPageToken" from +// the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAdUnits. ++ (id)queryForAccountsCustomchannelsAdunitsListWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId + customChannelId:(NSString *)customChannelId; + +#pragma mark - +#pragma mark "accounts.customchannels" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.accounts.customchannels.get +// Get the specified custom channel from the specified ad client for the +// specified account. +// Required: +// accountId: Account to which the ad client belongs. +// adClientId: Ad client which contains the custom channel. +// customChannelId: Custom channel to retrieve. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseCustomChannel. ++ (id)queryForAccountsCustomchannelsGetWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId + customChannelId:(NSString *)customChannelId; + +// Method: adsense.accounts.customchannels.list +// List all custom channels in the specified ad client for the specified +// account. +// Required: +// accountId: Account to which the ad client belongs. +// adClientId: Ad client for which to list custom channels. +// Optional: +// maxResults: The maximum number of custom channels to include in the +// response, used for paging. (0..10000) +// pageToken: A continuation token, used to page through custom channels. To +// retrieve the next page, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseCustomChannels. ++ (id)queryForAccountsCustomchannelsListWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId; + +#pragma mark - +#pragma mark "accounts" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.accounts.get +// Get information about the selected AdSense account. +// Required: +// accountId: Account to get information about. +// Optional: +// tree: Whether the tree of sub accounts should be returned. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAccount. ++ (id)queryForAccountsGetWithAccountId:(NSString *)accountId; + +// Method: adsense.accounts.list +// List all accounts available to this AdSense account. +// Optional: +// maxResults: The maximum number of accounts to include in the response, used +// for paging. (0..10000) +// pageToken: A continuation token, used to page through accounts. To retrieve +// the next page, set this parameter to the value of "nextPageToken" from +// the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAccounts. ++ (id)queryForAccountsList; + +#pragma mark - +#pragma mark "accounts.reports" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.accounts.reports.generate +// Generate an AdSense report based on the report request sent in the query +// parameters. Returns the result as JSON; to retrieve output in CSV format +// specify "alt=csv" as a query parameter. +// Required: +// accountId: Account upon which to report. +// startDate: Start of the date range to report on in "YYYY-MM-DD" format, +// inclusive. +// endDate: End of the date range to report on in "YYYY-MM-DD" format, +// inclusive. +// Optional: +// currency: Optional currency to use when reporting on monetary metrics. +// Defaults to the account's currency if not set. +// dimension: Dimensions to base the report on. +// filter: Filters to be run on the report. +// locale: Optional locale to use for translating report output to a local +// language. Defaults to "en_US" if not specified. +// maxResults: The maximum number of rows of report data to return. (0..50000) +// metric: Numeric columns to include in the report. +// sort: The name of a dimension or metric to sort the resulting report on, +// optionally prefixed with "+" to sort ascending or "-" to sort descending. +// If no prefix is specified, the column is sorted ascending. +// startIndex: Index of the first row of report data to return. (0..5000) +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAdsenseReportsGenerateResponse. ++ (id)queryForAccountsReportsGenerateWithAccountId:(NSString *)accountId + startDate:(NSString *)startDate + endDate:(NSString *)endDate; + +#pragma mark - +#pragma mark "accounts.reports.saved" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.accounts.reports.saved.generate +// Generate an AdSense report based on the saved report ID sent in the query +// parameters. +// Required: +// accountId: Account to which the saved reports belong. +// savedReportId: The saved report to retrieve. +// Optional: +// locale: Optional locale to use for translating report output to a local +// language. Defaults to "en_US" if not specified. +// maxResults: The maximum number of rows of report data to return. (0..50000) +// startIndex: Index of the first row of report data to return. (0..5000) +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAdsenseReportsGenerateResponse. ++ (id)queryForAccountsReportsSavedGenerateWithAccountId:(NSString *)accountId + savedReportId:(NSString *)savedReportId; + +// Method: adsense.accounts.reports.saved.list +// List all saved reports in the specified AdSense account. +// Required: +// accountId: Account to which the saved reports belong. +// Optional: +// maxResults: The maximum number of saved reports to include in the response, +// used for paging. (0..100) +// pageToken: A continuation token, used to page through saved reports. To +// retrieve the next page, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseSavedReports. ++ (id)queryForAccountsReportsSavedListWithAccountId:(NSString *)accountId; + +#pragma mark - +#pragma mark "accounts.savedadstyles" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.accounts.savedadstyles.get +// List a specific saved ad style for the specified account. +// Required: +// accountId: Account for which to get the saved ad style. +// savedAdStyleId: Saved ad style to retrieve. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseSavedAdStyle. ++ (id)queryForAccountsSavedadstylesGetWithAccountId:(NSString *)accountId + savedAdStyleId:(NSString *)savedAdStyleId; + +// Method: adsense.accounts.savedadstyles.list +// List all saved ad styles in the specified account. +// Required: +// accountId: Account for which to list saved ad styles. +// Optional: +// maxResults: The maximum number of saved ad styles to include in the +// response, used for paging. (0..10000) +// pageToken: A continuation token, used to page through saved ad styles. To +// retrieve the next page, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseSavedAdStyles. ++ (id)queryForAccountsSavedadstylesListWithAccountId:(NSString *)accountId; + +#pragma mark - +#pragma mark "accounts.urlchannels" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.accounts.urlchannels.list +// List all URL channels in the specified ad client for the specified account. +// Required: +// accountId: Account to which the ad client belongs. +// adClientId: Ad client for which to list URL channels. +// Optional: +// maxResults: The maximum number of URL channels to include in the response, +// used for paging. (0..10000) +// pageToken: A continuation token, used to page through URL channels. To +// retrieve the next page, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseUrlChannels. ++ (id)queryForAccountsUrlchannelsListWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId; + +#pragma mark - +#pragma mark "adclients" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.adclients.list +// List all ad clients in this AdSense account. +// Optional: +// maxResults: The maximum number of ad clients to include in the response, +// used for paging. (0..10000) +// pageToken: A continuation token, used to page through ad clients. To +// retrieve the next page, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAdClients. ++ (id)queryForAdclientsList; + +#pragma mark - +#pragma mark "adunits.customchannels" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.adunits.customchannels.list +// List all custom channels which the specified ad unit belongs to. +// Required: +// adClientId: Ad client which contains the ad unit. +// adUnitId: Ad unit for which to list custom channels. +// Optional: +// maxResults: The maximum number of custom channels to include in the +// response, used for paging. (0..10000) +// pageToken: A continuation token, used to page through custom channels. To +// retrieve the next page, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseCustomChannels. ++ (id)queryForAdunitsCustomchannelsListWithAdClientId:(NSString *)adClientId + adUnitId:(NSString *)adUnitId; + +#pragma mark - +#pragma mark "adunits" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.adunits.get +// Gets the specified ad unit in the specified ad client. +// Required: +// adClientId: Ad client for which to get the ad unit. +// adUnitId: Ad unit to retrieve. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAdUnit. ++ (id)queryForAdunitsGetWithAdClientId:(NSString *)adClientId + adUnitId:(NSString *)adUnitId; + +// Method: adsense.adunits.list +// List all ad units in the specified ad client for this AdSense account. +// Required: +// adClientId: Ad client for which to list ad units. +// Optional: +// includeInactive: Whether to include inactive ad units. Default: true. +// maxResults: The maximum number of ad units to include in the response, used +// for paging. (0..10000) +// pageToken: A continuation token, used to page through ad units. To retrieve +// the next page, set this parameter to the value of "nextPageToken" from +// the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAdUnits. ++ (id)queryForAdunitsListWithAdClientId:(NSString *)adClientId; + +#pragma mark - +#pragma mark "customchannels.adunits" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.customchannels.adunits.list +// List all ad units in the specified custom channel. +// Required: +// adClientId: Ad client which contains the custom channel. +// customChannelId: Custom channel for which to list ad units. +// Optional: +// includeInactive: Whether to include inactive ad units. Default: true. +// maxResults: The maximum number of ad units to include in the response, used +// for paging. (0..10000) +// pageToken: A continuation token, used to page through ad units. To retrieve +// the next page, set this parameter to the value of "nextPageToken" from +// the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAdUnits. ++ (id)queryForCustomchannelsAdunitsListWithAdClientId:(NSString *)adClientId + customChannelId:(NSString *)customChannelId; + +#pragma mark - +#pragma mark "customchannels" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.customchannels.get +// Get the specified custom channel from the specified ad client. +// Required: +// adClientId: Ad client which contains the custom channel. +// customChannelId: Custom channel to retrieve. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseCustomChannel. ++ (id)queryForCustomchannelsGetWithAdClientId:(NSString *)adClientId + customChannelId:(NSString *)customChannelId; + +// Method: adsense.customchannels.list +// List all custom channels in the specified ad client for this AdSense account. +// Required: +// adClientId: Ad client for which to list custom channels. +// Optional: +// maxResults: The maximum number of custom channels to include in the +// response, used for paging. (0..10000) +// pageToken: A continuation token, used to page through custom channels. To +// retrieve the next page, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseCustomChannels. ++ (id)queryForCustomchannelsListWithAdClientId:(NSString *)adClientId; + +#pragma mark - +#pragma mark "reports" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.reports.generate +// Generate an AdSense report based on the report request sent in the query +// parameters. Returns the result as JSON; to retrieve output in CSV format +// specify "alt=csv" as a query parameter. +// Required: +// startDate: Start of the date range to report on in "YYYY-MM-DD" format, +// inclusive. +// endDate: End of the date range to report on in "YYYY-MM-DD" format, +// inclusive. +// Optional: +// accountId: Accounts upon which to report. +// Note: For this method, "accountId" should be of type NSArray. +// currency: Optional currency to use when reporting on monetary metrics. +// Defaults to the account's currency if not set. +// dimension: Dimensions to base the report on. +// filter: Filters to be run on the report. +// locale: Optional locale to use for translating report output to a local +// language. Defaults to "en_US" if not specified. +// maxResults: The maximum number of rows of report data to return. (0..50000) +// metric: Numeric columns to include in the report. +// sort: The name of a dimension or metric to sort the resulting report on, +// optionally prefixed with "+" to sort ascending or "-" to sort descending. +// If no prefix is specified, the column is sorted ascending. +// startIndex: Index of the first row of report data to return. (0..5000) +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAdsenseReportsGenerateResponse. ++ (id)queryForReportsGenerateWithStartDate:(NSString *)startDate + endDate:(NSString *)endDate; + +#pragma mark - +#pragma mark "reports.saved" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.reports.saved.generate +// Generate an AdSense report based on the saved report ID sent in the query +// parameters. +// Required: +// savedReportId: The saved report to retrieve. +// Optional: +// locale: Optional locale to use for translating report output to a local +// language. Defaults to "en_US" if not specified. +// maxResults: The maximum number of rows of report data to return. (0..50000) +// startIndex: Index of the first row of report data to return. (0..5000) +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseAdsenseReportsGenerateResponse. ++ (id)queryForReportsSavedGenerateWithSavedReportId:(NSString *)savedReportId; + +// Method: adsense.reports.saved.list +// List all saved reports in this AdSense account. +// Optional: +// maxResults: The maximum number of saved reports to include in the response, +// used for paging. (0..100) +// pageToken: A continuation token, used to page through saved reports. To +// retrieve the next page, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseSavedReports. ++ (id)queryForReportsSavedList; + +#pragma mark - +#pragma mark "savedadstyles" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.savedadstyles.get +// Get a specific saved ad style from the user's account. +// Required: +// savedAdStyleId: Saved ad style to retrieve. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseSavedAdStyle. ++ (id)queryForSavedadstylesGetWithSavedAdStyleId:(NSString *)savedAdStyleId; + +// Method: adsense.savedadstyles.list +// List all saved ad styles in the user's account. +// Optional: +// maxResults: The maximum number of saved ad styles to include in the +// response, used for paging. (0..10000) +// pageToken: A continuation token, used to page through saved ad styles. To +// retrieve the next page, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseSavedAdStyles. ++ (id)queryForSavedadstylesList; + +#pragma mark - +#pragma mark "urlchannels" methods +// These create a GTLQueryAdSense object. + +// Method: adsense.urlchannels.list +// List all URL channels in the specified ad client for this AdSense account. +// Required: +// adClientId: Ad client for which to list URL channels. +// Optional: +// maxResults: The maximum number of URL channels to include in the response, +// used for paging. (0..10000) +// pageToken: A continuation token, used to page through URL channels. To +// retrieve the next page, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeAdSense +// kGTLAuthScopeAdSenseReadonly +// Fetches a GTLAdSenseUrlChannels. ++ (id)queryForUrlchannelsListWithAdClientId:(NSString *)adClientId; + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLQueryAdSense.m b/GTL/Source/Services/AdSense/Generated/GTLQueryAdSense.m new file mode 100644 index 0000000..ed4ff0f --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLQueryAdSense.m @@ -0,0 +1,401 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryAdSense.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLQueryAdSense (28 custom class methods, 20 custom properties) + +#import "GTLQueryAdSense.h" + +#import "GTLAdSenseAccount.h" +#import "GTLAdSenseAccounts.h" +#import "GTLAdSenseAdClients.h" +#import "GTLAdSenseAdsenseReportsGenerateResponse.h" +#import "GTLAdSenseAdUnit.h" +#import "GTLAdSenseAdUnits.h" +#import "GTLAdSenseCustomChannel.h" +#import "GTLAdSenseCustomChannels.h" +#import "GTLAdSenseSavedAdStyle.h" +#import "GTLAdSenseSavedAdStyles.h" +#import "GTLAdSenseSavedReports.h" +#import "GTLAdSenseUrlChannels.h" + +@implementation GTLQueryAdSense + +@dynamic accountId, adClientId, adUnitId, currency, customChannelId, dimension, + endDate, fields, filter, includeInactive, locale, maxResults, metric, + pageToken, savedAdStyleId, savedReportId, sort, startDate, startIndex, + tree; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"dimension", + [NSString class], @"filter", + [NSString class], @"metric", + [NSString class], @"sort", + nil]; + return map; +} + +#pragma mark - +#pragma mark "accounts.adclients" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAccountsAdclientsListWithAccountId:(NSString *)accountId { + NSString *methodName = @"adsense.accounts.adclients.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.expectedObjectClass = [GTLAdSenseAdClients class]; + return query; +} + +#pragma mark - +#pragma mark "accounts.adunits.customchannels" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAccountsAdunitsCustomchannelsListWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId + adUnitId:(NSString *)adUnitId { + NSString *methodName = @"adsense.accounts.adunits.customchannels.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.adClientId = adClientId; + query.adUnitId = adUnitId; + query.expectedObjectClass = [GTLAdSenseCustomChannels class]; + return query; +} + +#pragma mark - +#pragma mark "accounts.adunits" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAccountsAdunitsGetWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId + adUnitId:(NSString *)adUnitId { + NSString *methodName = @"adsense.accounts.adunits.get"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.adClientId = adClientId; + query.adUnitId = adUnitId; + query.expectedObjectClass = [GTLAdSenseAdUnit class]; + return query; +} + ++ (id)queryForAccountsAdunitsListWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId { + NSString *methodName = @"adsense.accounts.adunits.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.adClientId = adClientId; + query.expectedObjectClass = [GTLAdSenseAdUnits class]; + return query; +} + +#pragma mark - +#pragma mark "accounts.customchannels.adunits" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAccountsCustomchannelsAdunitsListWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId + customChannelId:(NSString *)customChannelId { + NSString *methodName = @"adsense.accounts.customchannels.adunits.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.adClientId = adClientId; + query.customChannelId = customChannelId; + query.expectedObjectClass = [GTLAdSenseAdUnits class]; + return query; +} + +#pragma mark - +#pragma mark "accounts.customchannels" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAccountsCustomchannelsGetWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId + customChannelId:(NSString *)customChannelId { + NSString *methodName = @"adsense.accounts.customchannels.get"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.adClientId = adClientId; + query.customChannelId = customChannelId; + query.expectedObjectClass = [GTLAdSenseCustomChannel class]; + return query; +} + ++ (id)queryForAccountsCustomchannelsListWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId { + NSString *methodName = @"adsense.accounts.customchannels.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.adClientId = adClientId; + query.expectedObjectClass = [GTLAdSenseCustomChannels class]; + return query; +} + +#pragma mark - +#pragma mark "accounts" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAccountsGetWithAccountId:(NSString *)accountId { + NSString *methodName = @"adsense.accounts.get"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.expectedObjectClass = [GTLAdSenseAccount class]; + return query; +} + ++ (id)queryForAccountsList { + NSString *methodName = @"adsense.accounts.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLAdSenseAccounts class]; + return query; +} + +#pragma mark - +#pragma mark "accounts.reports" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAccountsReportsGenerateWithAccountId:(NSString *)accountId + startDate:(NSString *)startDate + endDate:(NSString *)endDate { + NSString *methodName = @"adsense.accounts.reports.generate"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.startDate = startDate; + query.endDate = endDate; + query.expectedObjectClass = [GTLAdSenseAdsenseReportsGenerateResponse class]; + return query; +} + +#pragma mark - +#pragma mark "accounts.reports.saved" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAccountsReportsSavedGenerateWithAccountId:(NSString *)accountId + savedReportId:(NSString *)savedReportId { + NSString *methodName = @"adsense.accounts.reports.saved.generate"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.savedReportId = savedReportId; + query.expectedObjectClass = [GTLAdSenseAdsenseReportsGenerateResponse class]; + return query; +} + ++ (id)queryForAccountsReportsSavedListWithAccountId:(NSString *)accountId { + NSString *methodName = @"adsense.accounts.reports.saved.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.expectedObjectClass = [GTLAdSenseSavedReports class]; + return query; +} + +#pragma mark - +#pragma mark "accounts.savedadstyles" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAccountsSavedadstylesGetWithAccountId:(NSString *)accountId + savedAdStyleId:(NSString *)savedAdStyleId { + NSString *methodName = @"adsense.accounts.savedadstyles.get"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.savedAdStyleId = savedAdStyleId; + query.expectedObjectClass = [GTLAdSenseSavedAdStyle class]; + return query; +} + ++ (id)queryForAccountsSavedadstylesListWithAccountId:(NSString *)accountId { + NSString *methodName = @"adsense.accounts.savedadstyles.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.expectedObjectClass = [GTLAdSenseSavedAdStyles class]; + return query; +} + +#pragma mark - +#pragma mark "accounts.urlchannels" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAccountsUrlchannelsListWithAccountId:(NSString *)accountId + adClientId:(NSString *)adClientId { + NSString *methodName = @"adsense.accounts.urlchannels.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.adClientId = adClientId; + query.expectedObjectClass = [GTLAdSenseUrlChannels class]; + return query; +} + +#pragma mark - +#pragma mark "adclients" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAdclientsList { + NSString *methodName = @"adsense.adclients.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLAdSenseAdClients class]; + return query; +} + +#pragma mark - +#pragma mark "adunits.customchannels" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAdunitsCustomchannelsListWithAdClientId:(NSString *)adClientId + adUnitId:(NSString *)adUnitId { + NSString *methodName = @"adsense.adunits.customchannels.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.adClientId = adClientId; + query.adUnitId = adUnitId; + query.expectedObjectClass = [GTLAdSenseCustomChannels class]; + return query; +} + +#pragma mark - +#pragma mark "adunits" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForAdunitsGetWithAdClientId:(NSString *)adClientId + adUnitId:(NSString *)adUnitId { + NSString *methodName = @"adsense.adunits.get"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.adClientId = adClientId; + query.adUnitId = adUnitId; + query.expectedObjectClass = [GTLAdSenseAdUnit class]; + return query; +} + ++ (id)queryForAdunitsListWithAdClientId:(NSString *)adClientId { + NSString *methodName = @"adsense.adunits.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.adClientId = adClientId; + query.expectedObjectClass = [GTLAdSenseAdUnits class]; + return query; +} + +#pragma mark - +#pragma mark "customchannels.adunits" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForCustomchannelsAdunitsListWithAdClientId:(NSString *)adClientId + customChannelId:(NSString *)customChannelId { + NSString *methodName = @"adsense.customchannels.adunits.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.adClientId = adClientId; + query.customChannelId = customChannelId; + query.expectedObjectClass = [GTLAdSenseAdUnits class]; + return query; +} + +#pragma mark - +#pragma mark "customchannels" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForCustomchannelsGetWithAdClientId:(NSString *)adClientId + customChannelId:(NSString *)customChannelId { + NSString *methodName = @"adsense.customchannels.get"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.adClientId = adClientId; + query.customChannelId = customChannelId; + query.expectedObjectClass = [GTLAdSenseCustomChannel class]; + return query; +} + ++ (id)queryForCustomchannelsListWithAdClientId:(NSString *)adClientId { + NSString *methodName = @"adsense.customchannels.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.adClientId = adClientId; + query.expectedObjectClass = [GTLAdSenseCustomChannels class]; + return query; +} + +#pragma mark - +#pragma mark "reports" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForReportsGenerateWithStartDate:(NSString *)startDate + endDate:(NSString *)endDate { + NSString *methodName = @"adsense.reports.generate"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.startDate = startDate; + query.endDate = endDate; + query.expectedObjectClass = [GTLAdSenseAdsenseReportsGenerateResponse class]; + return query; +} + +#pragma mark - +#pragma mark "reports.saved" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForReportsSavedGenerateWithSavedReportId:(NSString *)savedReportId { + NSString *methodName = @"adsense.reports.saved.generate"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.savedReportId = savedReportId; + query.expectedObjectClass = [GTLAdSenseAdsenseReportsGenerateResponse class]; + return query; +} + ++ (id)queryForReportsSavedList { + NSString *methodName = @"adsense.reports.saved.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLAdSenseSavedReports class]; + return query; +} + +#pragma mark - +#pragma mark "savedadstyles" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForSavedadstylesGetWithSavedAdStyleId:(NSString *)savedAdStyleId { + NSString *methodName = @"adsense.savedadstyles.get"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.savedAdStyleId = savedAdStyleId; + query.expectedObjectClass = [GTLAdSenseSavedAdStyle class]; + return query; +} + ++ (id)queryForSavedadstylesList { + NSString *methodName = @"adsense.savedadstyles.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLAdSenseSavedAdStyles class]; + return query; +} + +#pragma mark - +#pragma mark "urlchannels" methods +// These create a GTLQueryAdSense object. + ++ (id)queryForUrlchannelsListWithAdClientId:(NSString *)adClientId { + NSString *methodName = @"adsense.urlchannels.list"; + GTLQueryAdSense *query = [self queryWithMethodName:methodName]; + query.adClientId = adClientId; + query.expectedObjectClass = [GTLAdSenseUrlChannels class]; + return query; +} + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLServiceAdSense.h b/GTL/Source/Services/AdSense/Generated/GTLServiceAdSense.h new file mode 100644 index 0000000..eb6b748 --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLServiceAdSense.h @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceAdSense.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLServiceAdSense (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceAdSense : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryAdSense.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/AdSense/Generated/GTLServiceAdSense.m b/GTL/Source/Services/AdSense/Generated/GTLServiceAdSense.m new file mode 100644 index 0000000..0374e9e --- /dev/null +++ b/GTL/Source/Services/AdSense/Generated/GTLServiceAdSense.m @@ -0,0 +1,77 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceAdSense.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// AdSense Management API (adsense/v1.2) +// Description: +// Gives AdSense publishers access to their inventory and the ability to +// generate reports +// Documentation: +// https://developers.google.com/adsense/management/ +// Classes: +// GTLServiceAdSense (0 custom class methods, 0 custom properties) + +#import "GTLAdSense.h" + +@implementation GTLServiceAdSense + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryAdSense class], + [GTLAdSenseAccount class], + [GTLAdSenseAccounts class], + [GTLAdSenseAdClient class], + [GTLAdSenseAdClients class], + [GTLAdSenseAdsenseReportsGenerateResponse class], + [GTLAdSenseAdStyle class], + [GTLAdSenseAdUnit class], + [GTLAdSenseAdUnits class], + [GTLAdSenseCustomChannel class], + [GTLAdSenseCustomChannels class], + [GTLAdSenseSavedAdStyle class], + [GTLAdSenseSavedAdStyles class], + [GTLAdSenseSavedReport class], + [GTLAdSenseSavedReports class], + [GTLAdSenseUrlChannel class], + [GTLAdSenseUrlChannels class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v1.2"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Analytics/.svn/all-wcprops b/GTL/Source/Services/Analytics/.svn/all-wcprops new file mode 100644 index 0000000..e0acd11 --- /dev/null +++ b/GTL/Source/Services/Analytics/.svn/all-wcprops @@ -0,0 +1,5 @@ +K 25 +svn:wc:ra_dav:version-url +V 49 +/svn/!svn/ver/246/trunk/Source/Services/Analytics +END diff --git a/GTL/Source/Services/Analytics/.svn/entries b/GTL/Source/Services/Analytics/.svn/entries new file mode 100644 index 0000000..e2a128d --- /dev/null +++ b/GTL/Source/Services/Analytics/.svn/entries @@ -0,0 +1,31 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Analytics +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-11-30T19:06:28.039519Z +246 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +Generated +dir + diff --git a/GTL/Source/Services/Analytics/Generated/.svn/all-wcprops b/GTL/Source/Services/Analytics/Generated/.svn/all-wcprops new file mode 100644 index 0000000..9668540 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/all-wcprops @@ -0,0 +1,257 @@ +K 25 +svn:wc:ra_dav:version-url +V 59 +/svn/!svn/ver/246/trunk/Source/Services/Analytics/Generated +END +GTLQueryAnalytics.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/239/trunk/Source/Services/Analytics/Generated/GTLQueryAnalytics.m +END +GTLAnalyticsDailyUpload.m +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/!svn/ver/239/trunk/Source/Services/Analytics/Generated/GTLAnalyticsDailyUpload.m +END +GTLAnalyticsAccounts.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/214/trunk/Source/Services/Analytics/Generated/GTLAnalyticsAccounts.h +END +GTLAnalyticsWebproperty.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/!svn/ver/214/trunk/Source/Services/Analytics/Generated/GTLAnalyticsWebproperty.h +END +GTLAnalyticsProfiles.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/214/trunk/Source/Services/Analytics/Generated/GTLAnalyticsProfiles.h +END +GTLAnalyticsAccounts.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/214/trunk/Source/Services/Analytics/Generated/GTLAnalyticsAccounts.m +END +GTLAnalyticsSegments.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/214/trunk/Source/Services/Analytics/Generated/GTLAnalyticsSegments.h +END +GTLAnalyticsCustomDataSource.h +K 25 +svn:wc:ra_dav:version-url +V 90 +/svn/!svn/ver/239/trunk/Source/Services/Analytics/Generated/GTLAnalyticsCustomDataSource.h +END +GTLAnalyticsWebproperty.m +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/!svn/ver/214/trunk/Source/Services/Analytics/Generated/GTLAnalyticsWebproperty.m +END +GTLAnalytics_Sources.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/239/trunk/Source/Services/Analytics/Generated/GTLAnalytics_Sources.m +END +GTLAnalyticsProfiles.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/214/trunk/Source/Services/Analytics/Generated/GTLAnalyticsProfiles.m +END +GTLAnalyticsCustomDataSource.m +K 25 +svn:wc:ra_dav:version-url +V 90 +/svn/!svn/ver/239/trunk/Source/Services/Analytics/Generated/GTLAnalyticsCustomDataSource.m +END +GTLAnalyticsDailyUploads.h +K 25 +svn:wc:ra_dav:version-url +V 86 +/svn/!svn/ver/239/trunk/Source/Services/Analytics/Generated/GTLAnalyticsDailyUploads.h +END +GTLAnalyticsSegments.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/214/trunk/Source/Services/Analytics/Generated/GTLAnalyticsSegments.m +END +GTLAnalyticsAccount.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/214/trunk/Source/Services/Analytics/Generated/GTLAnalyticsAccount.h +END +GTLAnalyticsDailyUploads.m +K 25 +svn:wc:ra_dav:version-url +V 86 +/svn/!svn/ver/239/trunk/Source/Services/Analytics/Generated/GTLAnalyticsDailyUploads.m +END +GTLAnalyticsProfile.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/246/trunk/Source/Services/Analytics/Generated/GTLAnalyticsProfile.h +END +GTLAnalyticsAccount.m +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/214/trunk/Source/Services/Analytics/Generated/GTLAnalyticsAccount.m +END +GTLAnalyticsSegment.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/214/trunk/Source/Services/Analytics/Generated/GTLAnalyticsSegment.h +END +GTLAnalyticsProfile.m +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/246/trunk/Source/Services/Analytics/Generated/GTLAnalyticsProfile.m +END +GTLAnalyticsGoals.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/214/trunk/Source/Services/Analytics/Generated/GTLAnalyticsGoals.h +END +GTLAnalyticsSegment.m +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/214/trunk/Source/Services/Analytics/Generated/GTLAnalyticsSegment.m +END +GTLAnalyticsCustomDataSources.h +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/239/trunk/Source/Services/Analytics/Generated/GTLAnalyticsCustomDataSources.h +END +GTLAnalyticsGoals.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/214/trunk/Source/Services/Analytics/Generated/GTLAnalyticsGoals.m +END +GTLAnalyticsConstants.h +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/239/trunk/Source/Services/Analytics/Generated/GTLAnalyticsConstants.h +END +GTLAnalyticsCustomDataSources.m +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/239/trunk/Source/Services/Analytics/Generated/GTLAnalyticsCustomDataSources.m +END +GTLAnalytics.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/239/trunk/Source/Services/Analytics/Generated/GTLAnalytics.h +END +GTLAnalyticsGaData.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/214/trunk/Source/Services/Analytics/Generated/GTLAnalyticsGaData.h +END +GTLAnalyticsConstants.m +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/239/trunk/Source/Services/Analytics/Generated/GTLAnalyticsConstants.m +END +GTLAnalyticsGoal.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/214/trunk/Source/Services/Analytics/Generated/GTLAnalyticsGoal.h +END +GTLAnalyticsGaData.m +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/214/trunk/Source/Services/Analytics/Generated/GTLAnalyticsGaData.m +END +GTLAnalyticsGoal.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/214/trunk/Source/Services/Analytics/Generated/GTLAnalyticsGoal.m +END +GTLAnalyticsWebproperties.h +K 25 +svn:wc:ra_dav:version-url +V 87 +/svn/!svn/ver/214/trunk/Source/Services/Analytics/Generated/GTLAnalyticsWebproperties.h +END +GTLAnalyticsDailyUploadAppend.h +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/239/trunk/Source/Services/Analytics/Generated/GTLAnalyticsDailyUploadAppend.h +END +GTLAnalyticsMcfData.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/232/trunk/Source/Services/Analytics/Generated/GTLAnalyticsMcfData.h +END +GTLAnalyticsWebproperties.m +K 25 +svn:wc:ra_dav:version-url +V 87 +/svn/!svn/ver/214/trunk/Source/Services/Analytics/Generated/GTLAnalyticsWebproperties.m +END +GTLServiceAnalytics.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/214/trunk/Source/Services/Analytics/Generated/GTLServiceAnalytics.h +END +GTLAnalyticsDailyUploadAppend.m +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/239/trunk/Source/Services/Analytics/Generated/GTLAnalyticsDailyUploadAppend.m +END +GTLAnalyticsMcfData.m +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/214/trunk/Source/Services/Analytics/Generated/GTLAnalyticsMcfData.m +END +GTLQueryAnalytics.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/239/trunk/Source/Services/Analytics/Generated/GTLQueryAnalytics.h +END +GTLServiceAnalytics.m +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/239/trunk/Source/Services/Analytics/Generated/GTLServiceAnalytics.m +END +GTLAnalyticsDailyUpload.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/!svn/ver/239/trunk/Source/Services/Analytics/Generated/GTLAnalyticsDailyUpload.h +END diff --git a/GTL/Source/Services/Analytics/Generated/.svn/entries b/GTL/Source/Services/Analytics/Generated/.svn/entries new file mode 100644 index 0000000..bb84894 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/entries @@ -0,0 +1,1456 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Analytics/Generated +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-11-30T19:06:28.039519Z +246 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +GTLQueryAnalytics.m +file + + + + +2012-12-09T08:42:31.000000Z +e791b84a9734fee27673d2aeb9961e58 +2012-10-25T21:35:48.356453Z +239 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +8693 + +GTLAnalyticsDailyUpload.m +file + + + + +2012-12-09T08:42:31.000000Z +6ac1133a9c69e7a7a53d2a0c5c8fe7ca +2012-10-25T21:35:48.356453Z +239 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2314 + +GTLAnalyticsAccounts.h +file + + + + +2012-12-09T08:42:31.000000Z +05fe295438181771782741e4abdcae64 +2012-09-18T19:13:25.981292Z +214 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2759 + +GTLAnalyticsWebproperty.h +file + + + + +2012-12-09T08:42:31.000000Z +71f1f63fc7d1b6076e6e75719b2207f5 +2012-09-18T19:13:25.981292Z +214 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3477 + +GTLAnalyticsProfiles.h +file + + + + +2012-12-09T08:42:31.000000Z +98bc608d16982e68b20fa46709f1d9e2 +2012-09-18T19:13:25.981292Z +214 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2690 + +GTLAnalyticsAccounts.m +file + + + + +2012-12-09T08:42:31.000000Z +97f84532fabc654a1be2b537c4df8b13 +2012-09-18T19:13:25.981292Z +214 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1650 + +GTLAnalyticsSegments.h +file + + + + +2012-12-09T08:42:31.000000Z +c5e93375276f29e69b27bce6825049af +2012-09-18T19:13:25.981292Z +214 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2769 + +GTLAnalyticsCustomDataSource.h +file + + + + +2012-12-09T08:42:31.000000Z +0fe41d36ea255dfd7621a012aa1b8325 +2012-10-25T21:35:48.356453Z +239 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3785 + +GTLAnalyticsWebproperty.m +file + + + + +2012-12-09T08:42:31.000000Z +34f07f873d50db4e4a33c743371ddfe0 +2012-09-18T19:13:25.981292Z +214 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2225 + +GTLAnalytics_Sources.m +file + + + + +2012-12-09T08:42:31.000000Z +ce453d339c5185872cdcb084f0e1728e +2012-10-25T21:35:48.356453Z +239 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1759 + +GTLAnalyticsProfiles.m +file + + + + +2012-12-09T08:42:31.000000Z +540f2733ba46736ec69f7322551757d7 +2012-09-18T19:13:25.981292Z +214 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1650 + +GTLAnalyticsCustomDataSource.m +file + + + + +2012-12-09T08:42:31.000000Z +d17146491a6a093e5f343b1857e7a1de +2012-10-25T21:35:48.356453Z +239 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2534 + +GTLAnalyticsDailyUploads.h +file + + + + +2012-12-09T08:42:31.000000Z +e1da4ba71ddbe5134e7d0fe6839ea706 +2012-10-25T21:35:48.356453Z +239 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2786 + +GTLAnalyticsSegments.m +file + + + + +2012-12-09T08:42:31.000000Z +bb9cb501d0b2e276a57efac126778f6d +2012-09-18T19:13:25.981292Z +214 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1650 + +GTLAnalyticsAccount.h +file + + + + +2012-12-09T08:42:31.000000Z +8a00fc7c8a9a49feabbd2349d35a7fb7 +2012-09-18T19:13:25.981292Z +214 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2464 + +GTLAnalyticsDailyUploads.m +file + + + + +2012-12-09T08:42:31.000000Z +9e0df52c5517dd33996513db4a9bb1d6 +2012-10-25T21:35:48.356453Z +239 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1682 + +GTLAnalyticsProfile.h +file + + + + +2012-12-09T08:42:31.000000Z +eec087fcc9ba7a6202cefc312069b055 +2012-11-30T19:06:28.039519Z +246 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4212 + +GTLAnalyticsAccount.m +file + + + + +2012-12-09T08:42:31.000000Z +f3baa69ab933e8c259bb6a650735c928 +2012-09-18T19:13:25.981292Z +214 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1832 + +GTLAnalyticsSegment.h +file + + + + +2012-12-09T08:42:31.000000Z +8f961319a7a0f84e488a2e872780ce6d +2012-09-18T19:13:25.981292Z +214 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2060 + +GTLAnalyticsProfile.m +file + + + + +2012-12-09T08:42:31.000000Z +d009e9a6cfb5c8a1e6319a541605c753 +2012-11-30T19:06:28.039519Z +246 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2358 + +GTLAnalyticsGoals.h +file + + + + +2012-12-09T08:42:31.000000Z +59015245d06f5fa777eed8ecab866b04 +2012-09-18T19:13:25.981292Z +214 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2700 + +GTLAnalyticsSegment.m +file + + + + +2012-12-09T08:42:31.000000Z +b57de0a2f893054b28ad92e417da4219 +2012-09-18T19:13:25.981292Z +214 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1579 + +GTLAnalyticsCustomDataSources.h +file + + + + +2012-12-09T08:42:31.000000Z +546920f11762ccbc535a3e9098ba7670 +2012-10-25T21:35:48.356453Z +239 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2785 + +GTLAnalyticsGoals.m +file + + + + +2012-12-09T08:42:31.000000Z +fb0e4438742f8e7df306ab8ed6a6978e +2012-09-18T19:13:25.981292Z +214 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1626 + +GTLAnalyticsConstants.h +file + + + + +2012-12-09T08:42:31.000000Z +723693d091bf50faac88d1ae69414357 +2012-10-25T21:35:48.356453Z +239 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1492 + +GTLAnalyticsCustomDataSources.m +file + + + + +2012-12-09T08:42:31.000000Z +7210bc96edd8be78534b396a9bc8a164 +2012-10-25T21:35:48.356453Z +239 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1722 + +GTLAnalytics.h +file + + + + +2012-12-09T08:42:31.000000Z +74ab799e83ae6f8a4fc8f027c7eca395 +2012-10-25T21:35:48.356453Z +239 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1640 + +GTLAnalyticsGaData.h +file + + + + +2012-12-09T08:42:31.000000Z +f45751d178c6c564eb4f2c198d757e3d +2012-09-18T19:13:25.981292Z +214 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +6406 + +GTLAnalyticsConstants.m +file + + + + +2012-12-09T08:42:31.000000Z +dbf045ced68e4d45ea0a767701f6c434 +2012-10-25T21:35:48.356453Z +239 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1280 + +GTLAnalyticsGoal.h +file + + + + +2012-12-09T08:42:31.000000Z +ff1b66a23c5dd0679ff880f08aba91ef +2012-09-18T19:13:25.981292Z +214 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +7650 + +GTLAnalyticsGaData.m +file + + + + +2012-12-09T08:42:31.000000Z +1702d609552fd22961c530aa11b15932 +2012-09-18T19:13:25.981292Z +214 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3778 + +GTLAnalyticsGoal.m +file + + + + +2012-12-09T08:42:31.000000Z +fd2badb1b7101f3647c2b58df2c1804f +2012-09-18T19:13:25.981292Z +214 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4468 + +GTLAnalyticsWebproperties.h +file + + + + +2012-12-09T08:42:31.000000Z +111bdeba93ae29c6252137f5e59d7eac +2012-09-18T19:13:25.981292Z +214 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2753 + +GTLAnalyticsDailyUploadAppend.h +file + + + + +2012-12-09T08:42:31.000000Z +e1016b42dbfcd4d6fd7c2f04ec3197e1 +2012-10-25T21:35:48.356453Z +239 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2022 + +GTLAnalyticsMcfData.h +file + + + + +2012-12-09T08:42:31.000000Z +cf960d3b8bf5e98ab1a5c74244ddf183 +2012-10-10T23:54:01.384347Z +232 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +7633 + +GTLAnalyticsWebproperties.m +file + + + + +2012-12-09T08:42:31.000000Z +90890589db1efc53522012d5ea1fdfcd +2012-09-18T19:13:25.981292Z +214 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1688 + +GTLServiceAnalytics.h +file + + + + +2012-12-09T08:42:31.000000Z +3a70ed16151055f79f08da2c3dbb012d +2012-09-18T19:13:25.981292Z +214 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2104 + +GTLAnalyticsDailyUploadAppend.m +file + + + + +2012-12-09T08:42:31.000000Z +8b20ec3599096e5e88f18d8abe1a9505 +2012-10-25T21:35:48.356453Z +239 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1472 + +GTLAnalyticsMcfData.m +file + + + + +2012-12-09T08:42:31.000000Z +ed76558e862c9d2cfe1f73b986a184e8 +2012-09-18T19:13:25.981292Z +214 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4714 + +GTLQueryAnalytics.h +file + + + + +2012-12-09T08:42:31.000000Z +b2c482e5a5845f21c68f1427a63ad4de +2012-10-25T21:35:48.356453Z +239 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +14790 + +GTLServiceAnalytics.m +file + + + + +2012-12-09T08:42:31.000000Z +604199bd13e850df41d2979f43e3d31b +2012-10-25T21:35:48.356453Z +239 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2872 + +GTLAnalyticsDailyUpload.h +file + + + + +2012-12-09T08:42:31.000000Z +f583337233bd7d98feacd65aeaaf9b61 +2012-10-25T21:35:48.356453Z +239 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3402 + diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalytics.h.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalytics.h.svn-base new file mode 100644 index 0000000..04bc89f --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalytics.h.svn-base @@ -0,0 +1,50 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalytics.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ + +#import "GTLAnalyticsConstants.h" + +#import "GTLAnalyticsAccount.h" +#import "GTLAnalyticsAccounts.h" +#import "GTLAnalyticsCustomDataSource.h" +#import "GTLAnalyticsCustomDataSources.h" +#import "GTLAnalyticsDailyUpload.h" +#import "GTLAnalyticsDailyUploadAppend.h" +#import "GTLAnalyticsDailyUploads.h" +#import "GTLAnalyticsGaData.h" +#import "GTLAnalyticsGoal.h" +#import "GTLAnalyticsGoals.h" +#import "GTLAnalyticsMcfData.h" +#import "GTLAnalyticsProfile.h" +#import "GTLAnalyticsProfiles.h" +#import "GTLAnalyticsSegment.h" +#import "GTLAnalyticsSegments.h" +#import "GTLAnalyticsWebproperties.h" +#import "GTLAnalyticsWebproperty.h" + +#import "GTLQueryAnalytics.h" +#import "GTLServiceAnalytics.h" diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsAccount.h.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsAccount.h.svn-base new file mode 100644 index 0000000..e448bb5 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsAccount.h.svn-base @@ -0,0 +1,88 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsAccount.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsAccount (0 custom class methods, 7 custom properties) +// GTLAnalyticsAccountChildLink (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsAccountChildLink; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsAccount +// + +// JSON template for Analytics account entry. + +@interface GTLAnalyticsAccount : GTLObject + +// Child link for an account entry. Points to the list of web properties for +// this account. +@property (retain) GTLAnalyticsAccountChildLink *childLink; + +// Time the account was created. +@property (retain) GTLDateTime *created; + +// Account ID. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Resource type for Analytics account. +@property (copy) NSString *kind; + +// Account name. +@property (copy) NSString *name; + +// Link for this account. +@property (copy) NSString *selfLink; + +// Time the account was last modified. +@property (retain) GTLDateTime *updated; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsAccountChildLink +// + +@interface GTLAnalyticsAccountChildLink : GTLObject + +// Link to the list of web properties for this account. +@property (copy) NSString *href; + +// Type of the child link. Its value is "analytics#webproperties". +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsAccount.m.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsAccount.m.svn-base new file mode 100644 index 0000000..83f4140 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsAccount.m.svn-base @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsAccount.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsAccount (0 custom class methods, 7 custom properties) +// GTLAnalyticsAccountChildLink (0 custom class methods, 2 custom properties) + +#import "GTLAnalyticsAccount.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsAccount +// + +@implementation GTLAnalyticsAccount +@dynamic childLink, created, identifier, kind, name, selfLink, updated; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#account"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsAccountChildLink +// + +@implementation GTLAnalyticsAccountChildLink +@dynamic href, type; +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsAccounts.h.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsAccounts.h.svn-base new file mode 100644 index 0000000..21e33c9 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsAccounts.h.svn-base @@ -0,0 +1,83 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsAccounts.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsAccounts (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsAccount; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsAccounts +// + +// An account collection provides a list of Analytics accounts to which a user +// has access. The account collection is the entry point to all management +// information. Each resource in the collection corresponds to a single +// Analytics account. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAnalyticsAccounts : GTLCollectionObject + +// A list of accounts. +@property (retain) NSArray *items; // of GTLAnalyticsAccount + +// The maximum number of entries the response can contain, regardless of the +// actual number of entries returned. Its value ranges from 1 to 1000 with a +// value of 1000 by default, or otherwise specified by the max-results query +// parameter. +@property (retain) NSNumber *itemsPerPage; // intValue + +// Collection type. +@property (copy) NSString *kind; + +// Next link for this account collection. +@property (copy) NSString *nextLink; + +// Previous link for this account collection. +@property (copy) NSString *previousLink; + +// The starting index of the entries, which is 1 by default or otherwise +// specified by the start-index query parameter. +@property (retain) NSNumber *startIndex; // intValue + +// The total number of results for the query, regardless of the number of +// results in the response. +@property (retain) NSNumber *totalResults; // intValue + +// Email ID of the authenticated user +@property (copy) NSString *username; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsAccounts.m.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsAccounts.m.svn-base new file mode 100644 index 0000000..8e499dc --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsAccounts.m.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsAccounts.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsAccounts (0 custom class methods, 8 custom properties) + +#import "GTLAnalyticsAccounts.h" + +#import "GTLAnalyticsAccount.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsAccounts +// + +@implementation GTLAnalyticsAccounts +@dynamic items, itemsPerPage, kind, nextLink, previousLink, startIndex, + totalResults, username; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAnalyticsAccount class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#accounts"]; +} + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsConstants.h.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsConstants.h.svn-base new file mode 100644 index 0000000..31ca5e4 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsConstants.h.svn-base @@ -0,0 +1,44 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// View and manage your Google Analytics data +GTL_EXTERN NSString * const kGTLAuthScopeAnalytics; // "https://www.googleapis.com/auth/analytics" +// View your Google Analytics data +GTL_EXTERN NSString * const kGTLAuthScopeAnalyticsReadonly; // "https://www.googleapis.com/auth/analytics.readonly" + +// Type +GTL_EXTERN NSString * const kGTLAnalyticsTypeCost; // "cost" diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsConstants.m.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsConstants.m.svn-base new file mode 100644 index 0000000..8eae14c --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsConstants.m.svn-base @@ -0,0 +1,36 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ + +#import "GTLAnalyticsConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeAnalytics = @"https://www.googleapis.com/auth/analytics"; +NSString * const kGTLAuthScopeAnalyticsReadonly = @"https://www.googleapis.com/auth/analytics.readonly"; + +// Type +NSString * const kGTLAnalyticsTypeCost = @"cost"; diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsCustomDataSource.h.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsCustomDataSource.h.svn-base new file mode 100644 index 0000000..42c2e43 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsCustomDataSource.h.svn-base @@ -0,0 +1,123 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsCustomDataSource.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsCustomDataSource (0 custom class methods, 12 custom properties) +// GTLAnalyticsCustomDataSourceChildLink (0 custom class methods, 2 custom properties) +// GTLAnalyticsCustomDataSourceParentLink (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsCustomDataSourceChildLink; +@class GTLAnalyticsCustomDataSourceParentLink; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsCustomDataSource +// + +// JSON template for an Analytics custom data source. + +@interface GTLAnalyticsCustomDataSource : GTLObject + +// Account ID to which this custom data source belongs. +@property (copy) NSString *accountId; + +// Child link for this custom data source. Points to the list of daily uploads +// for this custom data source. +@property (retain) GTLAnalyticsCustomDataSourceChildLink *childLink; + +// Time this custom data source was created. +@property (retain) GTLDateTime *created; + +// Description of custom data source. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Custom data source ID. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Resource type for Analytics custom data source. +@property (copy) NSString *kind; + +// Name of this custom data source. +@property (copy) NSString *name; + +// Parent link for this custom data source. Points to the web property to which +// this custom data source belongs. +@property (retain) GTLAnalyticsCustomDataSourceParentLink *parentLink; + +@property (retain) NSArray *profilesLinked; // of NSString + +// Link for this Analytics custom data source. +@property (copy) NSString *selfLink; + +// Time this custom data source was last modified. +@property (retain) GTLDateTime *updated; + +// Web property ID of the form UA-XXXXX-YY to which this custom data source +// belongs. +@property (copy) NSString *webPropertyId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsCustomDataSourceChildLink +// + +@interface GTLAnalyticsCustomDataSourceChildLink : GTLObject + +// Link to the list of daily uploads for this custom data source. +@property (copy) NSString *href; + +// Value is "analytics#dailyUploads". +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsCustomDataSourceParentLink +// + +@interface GTLAnalyticsCustomDataSourceParentLink : GTLObject + +// Link to the web property to which this custom data source belongs. +@property (copy) NSString *href; + +// Value is "analytics#webproperty". +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsCustomDataSource.m.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsCustomDataSource.m.svn-base new file mode 100644 index 0000000..584ec6f --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsCustomDataSource.m.svn-base @@ -0,0 +1,84 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsCustomDataSource.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsCustomDataSource (0 custom class methods, 12 custom properties) +// GTLAnalyticsCustomDataSourceChildLink (0 custom class methods, 2 custom properties) +// GTLAnalyticsCustomDataSourceParentLink (0 custom class methods, 2 custom properties) + +#import "GTLAnalyticsCustomDataSource.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsCustomDataSource +// + +@implementation GTLAnalyticsCustomDataSource +@dynamic accountId, childLink, created, descriptionProperty, identifier, kind, + name, parentLink, profilesLinked, selfLink, updated, webPropertyId; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"profilesLinked"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#customDataSource"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsCustomDataSourceChildLink +// + +@implementation GTLAnalyticsCustomDataSourceChildLink +@dynamic href, type; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsCustomDataSourceParentLink +// + +@implementation GTLAnalyticsCustomDataSourceParentLink +@dynamic href, type; +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsCustomDataSources.h.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsCustomDataSources.h.svn-base new file mode 100644 index 0000000..099184a --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsCustomDataSources.h.svn-base @@ -0,0 +1,82 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsCustomDataSources.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsCustomDataSources (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsCustomDataSource; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsCustomDataSources +// + +// Lists Analytics custom data sources to which the user has access. Each +// resource in the collection corresponds to a single Analytics custom data +// source. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAnalyticsCustomDataSources : GTLCollectionObject + +// Collection of custom data sources. +@property (retain) NSArray *items; // of GTLAnalyticsCustomDataSource + +// The maximum number of resources the response can contain, regardless of the +// actual number of resources returned. Its value ranges from 1 to 1000 with a +// value of 1000 by default, or otherwise specified by the max-results query +// parameter. +@property (retain) NSNumber *itemsPerPage; // intValue + +// Collection type. +@property (copy) NSString *kind; + +// Link to next page for this custom data source collection. +@property (copy) NSString *nextLink; + +// Link to previous page for this custom data source collection. +@property (copy) NSString *previousLink; + +// The starting index of the resources, which is 1 by default or otherwise +// specified by the start-index query parameter. +@property (retain) NSNumber *startIndex; // intValue + +// The total number of results for the query, regardless of the number of +// results in the response. +@property (retain) NSNumber *totalResults; // intValue + +// Email ID of the authenticated user +@property (copy) NSString *username; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsCustomDataSources.m.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsCustomDataSources.m.svn-base new file mode 100644 index 0000000..6e2f7b4 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsCustomDataSources.m.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsCustomDataSources.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsCustomDataSources (0 custom class methods, 8 custom properties) + +#import "GTLAnalyticsCustomDataSources.h" + +#import "GTLAnalyticsCustomDataSource.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsCustomDataSources +// + +@implementation GTLAnalyticsCustomDataSources +@dynamic items, itemsPerPage, kind, nextLink, previousLink, startIndex, + totalResults, username; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAnalyticsCustomDataSource class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#customDataSources"]; +} + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsDailyUpload.h.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsDailyUpload.h.svn-base new file mode 100644 index 0000000..275fa4c --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsDailyUpload.h.svn-base @@ -0,0 +1,112 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsDailyUpload.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsDailyUpload (0 custom class methods, 11 custom properties) +// GTLAnalyticsDailyUploadParentLink (0 custom class methods, 2 custom properties) +// GTLAnalyticsDailyUploadRecentChangesItem (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsDailyUploadParentLink; +@class GTLAnalyticsDailyUploadRecentChangesItem; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsDailyUpload +// + +// Metadata for daily upload entity. + +@interface GTLAnalyticsDailyUpload : GTLObject + +// Account ID to which this daily upload belongs. +@property (copy) NSString *accountId; + +// Number of appends for this date. +@property (retain) NSNumber *appendCount; // intValue + +// Time this daily upload was created. +@property (retain) GTLDateTime *createdTime; + +// Custom data source ID to which this daily upload belongs. +@property (copy) NSString *customDataSourceId; + +// Date associated with daily upload. +@property (copy) NSString *date; + +// Resource type for Analytics daily upload. +@property (copy) NSString *kind; + +// Time this daily upload was last modified. +@property (retain) GTLDateTime *modifiedTime; + +// Parent link for a daily upload. Points to the custom data source to which +// this daily upload belongs. +@property (retain) GTLAnalyticsDailyUploadParentLink *parentLink; + +// Change log for last 10 changes in chronological order. +@property (retain) NSArray *recentChanges; // of GTLAnalyticsDailyUploadRecentChangesItem + +// Link for this daily upload. +@property (copy) NSString *selfLink; + +// Web property ID of the form UA-XXXXX-YY to which this daily upload belongs. +@property (copy) NSString *webPropertyId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsDailyUploadParentLink +// + +@interface GTLAnalyticsDailyUploadParentLink : GTLObject + +// Link to the custom data source to which this daily upload belongs. +@property (copy) NSString *href; + +// Value is "analytics#customDataSource". +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsDailyUploadRecentChangesItem +// + +@interface GTLAnalyticsDailyUploadRecentChangesItem : GTLObject +@property (copy) NSString *change; +@property (retain) GTLDateTime *time; +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsDailyUpload.m.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsDailyUpload.m.svn-base new file mode 100644 index 0000000..433b03e --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsDailyUpload.m.svn-base @@ -0,0 +1,75 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsDailyUpload.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsDailyUpload (0 custom class methods, 11 custom properties) +// GTLAnalyticsDailyUploadParentLink (0 custom class methods, 2 custom properties) +// GTLAnalyticsDailyUploadRecentChangesItem (0 custom class methods, 2 custom properties) + +#import "GTLAnalyticsDailyUpload.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsDailyUpload +// + +@implementation GTLAnalyticsDailyUpload +@dynamic accountId, appendCount, createdTime, customDataSourceId, date, kind, + modifiedTime, parentLink, recentChanges, selfLink, webPropertyId; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAnalyticsDailyUploadRecentChangesItem class] + forKey:@"recentChanges"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#dailyUpload"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsDailyUploadParentLink +// + +@implementation GTLAnalyticsDailyUploadParentLink +@dynamic href, type; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsDailyUploadRecentChangesItem +// + +@implementation GTLAnalyticsDailyUploadRecentChangesItem +@dynamic change, time; +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsDailyUploadAppend.h.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsDailyUploadAppend.h.svn-base new file mode 100644 index 0000000..3cebe61 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsDailyUploadAppend.h.svn-base @@ -0,0 +1,67 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsDailyUploadAppend.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsDailyUploadAppend (0 custom class methods, 7 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsDailyUploadAppend +// + +// Metadata returned for a successful append operation. + +@interface GTLAnalyticsDailyUploadAppend : GTLObject + +// Account Id to which this daily upload append belongs. +@property (copy) NSString *accountId; + +// Append number. +@property (retain) NSNumber *appendNumber; // intValue + +// Custom data source Id to which this daily upload append belongs. +@property (copy) NSString *customDataSourceId; + +// Date associated with daily upload append. +@property (copy) NSString *date; + +// Resource type for Analytics daily upload append. +@property (copy) NSString *kind; + +@property (copy) NSString *nextAppendLink; + +// Web property Id of the form UA-XXXXX-YY to which this daily upload append +// belongs. +@property (copy) NSString *webPropertyId; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsDailyUploadAppend.m.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsDailyUploadAppend.m.svn-base new file mode 100644 index 0000000..0f41310 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsDailyUploadAppend.m.svn-base @@ -0,0 +1,46 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsDailyUploadAppend.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsDailyUploadAppend (0 custom class methods, 7 custom properties) + +#import "GTLAnalyticsDailyUploadAppend.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsDailyUploadAppend +// + +@implementation GTLAnalyticsDailyUploadAppend +@dynamic accountId, appendNumber, customDataSourceId, date, kind, + nextAppendLink, webPropertyId; + ++ (void)load { + [self registerObjectClassForKind:@"analytics#dailyUploadAppend"]; +} + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsDailyUploads.h.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsDailyUploads.h.svn-base new file mode 100644 index 0000000..0c54b5a --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsDailyUploads.h.svn-base @@ -0,0 +1,82 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsDailyUploads.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsDailyUploads (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsDailyUpload; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsDailyUploads +// + +// A daily upload collection lists Analytics daily uploads to which the user has +// access. Each resource in the collection corresponds to a single Analytics +// daily upload. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAnalyticsDailyUploads : GTLCollectionObject + +// A collection of daily uploads. +@property (retain) NSArray *items; // of GTLAnalyticsDailyUpload + +// The maximum number of resources the response can contain, regardless of the +// actual number of resources returned. Its value ranges from 1 to 1000 with a +// value of 1000 by default, or otherwise specified by the max-results query +// parameter. +@property (retain) NSNumber *itemsPerPage; // intValue + +// Collection type. Value is analytics#dailyUploads. +@property (copy) NSString *kind; + +// Link to next page for this daily upload collection. +@property (copy) NSString *nextLink; + +// Link to previous page for this daily upload collection. +@property (copy) NSString *previousLink; + +// The starting index of the resources, which is 1 by default or otherwise +// specified by the start-index query parameter. +@property (retain) NSNumber *startIndex; // intValue + +// The total number of results for the query, regardless of the number of +// results in the response. +@property (retain) NSNumber *totalResults; // intValue + +// Email ID of the authenticated user +@property (copy) NSString *username; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsDailyUploads.m.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsDailyUploads.m.svn-base new file mode 100644 index 0000000..84ce5b7 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsDailyUploads.m.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsDailyUploads.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsDailyUploads (0 custom class methods, 8 custom properties) + +#import "GTLAnalyticsDailyUploads.h" + +#import "GTLAnalyticsDailyUpload.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsDailyUploads +// + +@implementation GTLAnalyticsDailyUploads +@dynamic items, itemsPerPage, kind, nextLink, previousLink, startIndex, + totalResults, username; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAnalyticsDailyUpload class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#dailyUploads"]; +} + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsGaData.h.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsGaData.h.svn-base new file mode 100644 index 0000000..65b0490 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsGaData.h.svn-base @@ -0,0 +1,205 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsGaData.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsGaData (0 custom class methods, 13 custom properties) +// GTLAnalyticsGaDataColumnHeadersItem (0 custom class methods, 3 custom properties) +// GTLAnalyticsGaDataProfileInfo (0 custom class methods, 6 custom properties) +// GTLAnalyticsGaDataQuery (0 custom class methods, 10 custom properties) +// GTLAnalyticsGaDataTotalsForAllResults (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsGaDataColumnHeadersItem; +@class GTLAnalyticsGaDataProfileInfo; +@class GTLAnalyticsGaDataQuery; +@class GTLAnalyticsGaDataTotalsForAllResults; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGaData +// + +// Analytics data for a given profile. + +@interface GTLAnalyticsGaData : GTLObject + +// Column headers that list dimension names followed by the metric names. The +// order of dimensions and metrics is same as specified in the request. +@property (retain) NSArray *columnHeaders; // of GTLAnalyticsGaDataColumnHeadersItem + +// Determines if Analytics data contains samples. +@property (retain) NSNumber *containsSampledData; // boolValue + +// Unique ID for this data response. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The maximum number of rows the response can contain, regardless of the actual +// number of rows returned. Its value ranges from 1 to 10,000 with a value of +// 1000 by default, or otherwise specified by the max-results query parameter. +@property (retain) NSNumber *itemsPerPage; // intValue + +// Resource type. +@property (copy) NSString *kind; + +// Link to next page for this Analytics data query. +@property (copy) NSString *nextLink; + +// Link to previous page for this Analytics data query. +@property (copy) NSString *previousLink; + +// Information for the profile, for which the Analytics data was requested. +@property (retain) GTLAnalyticsGaDataProfileInfo *profileInfo; + +// Analytics data request query parameters. +@property (retain) GTLAnalyticsGaDataQuery *query; + +// Analytics data rows, where each row contains a list of dimension values +// followed by the metric values. The order of dimensions and metrics is same as +// specified in the request. +@property (retain) NSArray *rows; // of NSArray of NSString + +// Link to this page. +@property (copy) NSString *selfLink; + +// The total number of rows for the query, regardless of the number of rows in +// the response. +@property (retain) NSNumber *totalResults; // intValue + +// Total values for the requested metrics over all the results, not just the +// results returned in this response. The order of the metric totals is same as +// the metric order specified in the request. +@property (retain) GTLAnalyticsGaDataTotalsForAllResults *totalsForAllResults; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGaDataColumnHeadersItem +// + +@interface GTLAnalyticsGaDataColumnHeadersItem : GTLObject + +// Column Type. Either DIMENSION or METRIC. +@property (copy) NSString *columnType; + +// Data type. Dimension column headers have only STRING as the data type. Metric +// column headers have data types for metric values such as INTEGER, DOUBLE, +// CURRENCY etc. +@property (copy) NSString *dataType; + +// Column name. +@property (copy) NSString *name; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGaDataProfileInfo +// + +@interface GTLAnalyticsGaDataProfileInfo : GTLObject + +// Account ID to which this profile belongs. +@property (copy) NSString *accountId; + +// Internal ID for the web property to which this profile belongs. +@property (copy) NSString *internalWebPropertyId; + +// Profile ID. +@property (copy) NSString *profileId; + +// Profile name. +@property (copy) NSString *profileName; + +// Table ID for profile. +@property (copy) NSString *tableId; + +// Web Property ID to which this profile belongs. +@property (copy) NSString *webPropertyId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGaDataQuery +// + +@interface GTLAnalyticsGaDataQuery : GTLObject + +// List of analytics dimensions. +@property (copy) NSString *dimensions; + +// End date. +@property (copy) NSString *endDate; + +// Comma-separated list of dimension or metric filters. +@property (copy) NSString *filters; + +// Unique table ID. +@property (copy) NSString *ids; + +// Maximum results per page. +@property (retain) NSNumber *maxResults; // intValue + +// List of analytics metrics. +@property (retain) NSArray *metrics; // of NSString + +// Analytics advanced segment. +@property (copy) NSString *segment; + +// List of dimensions or metrics based on which Analytics data is sorted. +@property (retain) NSArray *sort; // of NSString + +// Start date. +@property (copy) NSString *startDate; + +// Start index. +@property (retain) NSNumber *startIndex; // intValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGaDataTotalsForAllResults +// + +@interface GTLAnalyticsGaDataTotalsForAllResults : GTLObject +// This object is documented as having more properties that are NSString. Use +// -additionalJSONKeys and -additionalPropertyForName: to get the list of +// properties and then fetch them; or -additionalProperties to fetch them all at +// once. +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsGaData.m.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsGaData.m.svn-base new file mode 100644 index 0000000..c674db0 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsGaData.m.svn-base @@ -0,0 +1,134 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsGaData.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsGaData (0 custom class methods, 13 custom properties) +// GTLAnalyticsGaDataColumnHeadersItem (0 custom class methods, 3 custom properties) +// GTLAnalyticsGaDataProfileInfo (0 custom class methods, 6 custom properties) +// GTLAnalyticsGaDataQuery (0 custom class methods, 10 custom properties) +// GTLAnalyticsGaDataTotalsForAllResults (0 custom class methods, 0 custom properties) + +#import "GTLAnalyticsGaData.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGaData +// + +@implementation GTLAnalyticsGaData +@dynamic columnHeaders, containsSampledData, identifier, itemsPerPage, kind, + nextLink, previousLink, profileInfo, query, rows, selfLink, + totalResults, totalsForAllResults; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLAnalyticsGaDataColumnHeadersItem class], @"columnHeaders", + [NSString class], @"rows", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#gaData"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGaDataColumnHeadersItem +// + +@implementation GTLAnalyticsGaDataColumnHeadersItem +@dynamic columnType, dataType, name; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGaDataProfileInfo +// + +@implementation GTLAnalyticsGaDataProfileInfo +@dynamic accountId, internalWebPropertyId, profileId, profileName, tableId, + webPropertyId; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGaDataQuery +// + +@implementation GTLAnalyticsGaDataQuery +@dynamic dimensions, endDate, filters, ids, maxResults, metrics, segment, sort, + startDate, startIndex; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"end-date", @"endDate", + @"max-results", @"maxResults", + @"start-date", @"startDate", + @"start-index", @"startIndex", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"metrics", + [NSString class], @"sort", + nil]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGaDataTotalsForAllResults +// + +@implementation GTLAnalyticsGaDataTotalsForAllResults + ++ (Class)classForAdditionalProperties { + return [NSString class]; +} + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsGoal.h.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsGoal.h.svn-base new file mode 100644 index 0000000..f197092 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsGoal.h.svn-base @@ -0,0 +1,254 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsGoal.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsGoal (0 custom class methods, 18 custom properties) +// GTLAnalyticsGoalEventDetails (0 custom class methods, 2 custom properties) +// GTLAnalyticsGoalParentLink (0 custom class methods, 2 custom properties) +// GTLAnalyticsGoalUrlDestinationDetails (0 custom class methods, 5 custom properties) +// GTLAnalyticsGoalVisitNumPagesDetails (0 custom class methods, 2 custom properties) +// GTLAnalyticsGoalVisitTimeOnSiteDetails (0 custom class methods, 2 custom properties) +// GTLAnalyticsGoalEventDetailsEventConditionsItem (0 custom class methods, 5 custom properties) +// GTLAnalyticsGoalUrlDestinationDetailsStepsItem (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsGoalEventDetails; +@class GTLAnalyticsGoalEventDetailsEventConditionsItem; +@class GTLAnalyticsGoalParentLink; +@class GTLAnalyticsGoalUrlDestinationDetails; +@class GTLAnalyticsGoalUrlDestinationDetailsStepsItem; +@class GTLAnalyticsGoalVisitNumPagesDetails; +@class GTLAnalyticsGoalVisitTimeOnSiteDetails; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoal +// + +// JSON template for Analytics goal resource. + +@interface GTLAnalyticsGoal : GTLObject + +// Account ID to which this goal belongs. +@property (copy) NSString *accountId; + +// Determines whether this goal is active. +@property (retain) NSNumber *active; // boolValue + +// Time this goal was created. +@property (retain) GTLDateTime *created; + +// Details for the goal of the type EVENT. +@property (retain) GTLAnalyticsGoalEventDetails *eventDetails; + +// Goal ID. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Internal ID for the web property to which this goal belongs. +@property (copy) NSString *internalWebPropertyId; + +// Resource type for an Analytics goal. +@property (copy) NSString *kind; + +// Goal name. +@property (copy) NSString *name; + +// Parent link for a goal. Points to the profile to which this goal belongs. +@property (retain) GTLAnalyticsGoalParentLink *parentLink; + +// Profile ID to which this goal belongs. +@property (copy) NSString *profileId; + +// Link for this goal. +@property (copy) NSString *selfLink; + +// Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, +// VISIT_NUM_PAGES, AND EVENT. +@property (copy) NSString *type; + +// Time this goal was last modified. +@property (retain) GTLDateTime *updated; + +// Details for the goal of the type URL_DESTINATION. +@property (retain) GTLAnalyticsGoalUrlDestinationDetails *urlDestinationDetails; + +// Goal value. +@property (retain) NSNumber *value; // floatValue + +// Details for the goal of the type VISIT_NUM_PAGES. +@property (retain) GTLAnalyticsGoalVisitNumPagesDetails *visitNumPagesDetails; + +// Details for the goal of the type VISIT_TIME_ON_SITE. +@property (retain) GTLAnalyticsGoalVisitTimeOnSiteDetails *visitTimeOnSiteDetails; + +// Web property ID to which this goal belongs. The web property ID is of the +// form UA-XXXXX-YY. +@property (copy) NSString *webPropertyId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalEventDetails +// + +@interface GTLAnalyticsGoalEventDetails : GTLObject + +// List of event conditions. +@property (retain) NSArray *eventConditions; // of GTLAnalyticsGoalEventDetailsEventConditionsItem + +// Determines if the event value should be used as the value for this goal. +@property (retain) NSNumber *useEventValue; // boolValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalParentLink +// + +@interface GTLAnalyticsGoalParentLink : GTLObject + +// Link to the profile to which this goal belongs. +@property (copy) NSString *href; + +// Value is "analytics#profile". +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalUrlDestinationDetails +// + +@interface GTLAnalyticsGoalUrlDestinationDetails : GTLObject + +// Determines if the goal URL must exactly match the capitalization of visited +// URLs. +@property (retain) NSNumber *caseSensitive; // boolValue + +// Determines if the first step in this goal is required. +@property (retain) NSNumber *firstStepRequired; // boolValue + +// Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX. +@property (copy) NSString *matchType; + +// List of steps configured for this goal funnel. +@property (retain) NSArray *steps; // of GTLAnalyticsGoalUrlDestinationDetailsStepsItem + +// URL for this goal. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalVisitNumPagesDetails +// + +@interface GTLAnalyticsGoalVisitNumPagesDetails : GTLObject + +// Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL. +@property (copy) NSString *comparisonType; + +// Value used for this comparison. +@property (retain) NSNumber *comparisonValue; // longLongValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalVisitTimeOnSiteDetails +// + +@interface GTLAnalyticsGoalVisitTimeOnSiteDetails : GTLObject + +// Type of comparison. Possible values are LESS_THAN or GREATER_THAN. +@property (copy) NSString *comparisonType; + +// Value used for this comparison. +@property (retain) NSNumber *comparisonValue; // longLongValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalEventDetailsEventConditionsItem +// + +@interface GTLAnalyticsGoalEventDetailsEventConditionsItem : GTLObject + +// Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL. +@property (copy) NSString *comparisonType; + +// Value used for this comparison. +@property (retain) NSNumber *comparisonValue; // longLongValue + +// Expression used for this match. +@property (copy) NSString *expression; + +// Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, +// or EXACT. +@property (copy) NSString *matchType; + +// Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or +// VALUE. +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalUrlDestinationDetailsStepsItem +// + +@interface GTLAnalyticsGoalUrlDestinationDetailsStepsItem : GTLObject + +// Step name. +@property (copy) NSString *name; + +// Step number. +@property (retain) NSNumber *number; // intValue + +// URL for this step. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsGoal.m.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsGoal.m.svn-base new file mode 100644 index 0000000..adecff4 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsGoal.m.svn-base @@ -0,0 +1,148 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsGoal.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsGoal (0 custom class methods, 18 custom properties) +// GTLAnalyticsGoalEventDetails (0 custom class methods, 2 custom properties) +// GTLAnalyticsGoalParentLink (0 custom class methods, 2 custom properties) +// GTLAnalyticsGoalUrlDestinationDetails (0 custom class methods, 5 custom properties) +// GTLAnalyticsGoalVisitNumPagesDetails (0 custom class methods, 2 custom properties) +// GTLAnalyticsGoalVisitTimeOnSiteDetails (0 custom class methods, 2 custom properties) +// GTLAnalyticsGoalEventDetailsEventConditionsItem (0 custom class methods, 5 custom properties) +// GTLAnalyticsGoalUrlDestinationDetailsStepsItem (0 custom class methods, 3 custom properties) + +#import "GTLAnalyticsGoal.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoal +// + +@implementation GTLAnalyticsGoal +@dynamic accountId, active, created, eventDetails, identifier, + internalWebPropertyId, kind, name, parentLink, profileId, selfLink, + type, updated, urlDestinationDetails, value, visitNumPagesDetails, + visitTimeOnSiteDetails, webPropertyId; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#goal"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalEventDetails +// + +@implementation GTLAnalyticsGoalEventDetails +@dynamic eventConditions, useEventValue; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAnalyticsGoalEventDetailsEventConditionsItem class] + forKey:@"eventConditions"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalParentLink +// + +@implementation GTLAnalyticsGoalParentLink +@dynamic href, type; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalUrlDestinationDetails +// + +@implementation GTLAnalyticsGoalUrlDestinationDetails +@dynamic caseSensitive, firstStepRequired, matchType, steps, url; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAnalyticsGoalUrlDestinationDetailsStepsItem class] + forKey:@"steps"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalVisitNumPagesDetails +// + +@implementation GTLAnalyticsGoalVisitNumPagesDetails +@dynamic comparisonType, comparisonValue; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalVisitTimeOnSiteDetails +// + +@implementation GTLAnalyticsGoalVisitTimeOnSiteDetails +@dynamic comparisonType, comparisonValue; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalEventDetailsEventConditionsItem +// + +@implementation GTLAnalyticsGoalEventDetailsEventConditionsItem +@dynamic comparisonType, comparisonValue, expression, matchType, type; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalUrlDestinationDetailsStepsItem +// + +@implementation GTLAnalyticsGoalUrlDestinationDetailsStepsItem +@dynamic name, number, url; +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsGoals.h.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsGoals.h.svn-base new file mode 100644 index 0000000..d2a8073 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsGoals.h.svn-base @@ -0,0 +1,82 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsGoals.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsGoals (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsGoal; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoals +// + +// A goal collection lists Analytics goals to which the user has access. Each +// profile can have a set of goals. Each resource in the Goal collection +// corresponds to a single Analytics goal. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAnalyticsGoals : GTLCollectionObject + +// A list of goals. +@property (retain) NSArray *items; // of GTLAnalyticsGoal + +// The maximum number of resources the response can contain, regardless of the +// actual number of resources returned. Its value ranges from 1 to 1000 with a +// value of 1000 by default, or otherwise specified by the max-results query +// parameter. +@property (retain) NSNumber *itemsPerPage; // intValue + +// Collection type. +@property (copy) NSString *kind; + +// Link to next page for this goal collection. +@property (copy) NSString *nextLink; + +// Link to previous page for this goal collection. +@property (copy) NSString *previousLink; + +// The starting index of the resources, which is 1 by default or otherwise +// specified by the start-index query parameter. +@property (retain) NSNumber *startIndex; // intValue + +// The total number of results for the query, regardless of the number of +// resources in the result. +@property (retain) NSNumber *totalResults; // intValue + +// Email ID of the authenticated user +@property (copy) NSString *username; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsGoals.m.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsGoals.m.svn-base new file mode 100644 index 0000000..fd89420 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsGoals.m.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsGoals.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsGoals (0 custom class methods, 8 custom properties) + +#import "GTLAnalyticsGoals.h" + +#import "GTLAnalyticsGoal.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoals +// + +@implementation GTLAnalyticsGoals +@dynamic items, itemsPerPage, kind, nextLink, previousLink, startIndex, + totalResults, username; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAnalyticsGoal class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#goals"]; +} + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsMcfData.h.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsMcfData.h.svn-base new file mode 100644 index 0000000..9bdd961 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsMcfData.h.svn-base @@ -0,0 +1,241 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsMcfData.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsMcfData (0 custom class methods, 13 custom properties) +// GTLAnalyticsMcfDataColumnHeadersItem (0 custom class methods, 3 custom properties) +// GTLAnalyticsMcfDataProfileInfo (0 custom class methods, 6 custom properties) +// GTLAnalyticsMcfDataQuery (0 custom class methods, 10 custom properties) +// GTLAnalyticsMcfDataRowsItem (0 custom class methods, 2 custom properties) +// GTLAnalyticsMcfDataTotalsForAllResults (0 custom class methods, 0 custom properties) +// GTLAnalyticsMcfDataRowsItemConversionPathValueItem (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsMcfDataColumnHeadersItem; +@class GTLAnalyticsMcfDataProfileInfo; +@class GTLAnalyticsMcfDataQuery; +@class GTLAnalyticsMcfDataRowsItem; +@class GTLAnalyticsMcfDataRowsItemConversionPathValueItem; +@class GTLAnalyticsMcfDataTotalsForAllResults; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfData +// + +// Multi-Channel Funnels data for a given profile. + +@interface GTLAnalyticsMcfData : GTLObject + +// Column headers that list dimension names followed by the metric names. The +// order of dimensions and metrics is same as specified in the request. +@property (retain) NSArray *columnHeaders; // of GTLAnalyticsMcfDataColumnHeadersItem + +// Determines if the Analytics data contains sampled data. +@property (retain) NSNumber *containsSampledData; // boolValue + +// Unique ID for this data response. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The maximum number of rows the response can contain, regardless of the actual +// number of rows returned. Its value ranges from 1 to 10,000 with a value of +// 1000 by default, or otherwise specified by the max-results query parameter. +@property (retain) NSNumber *itemsPerPage; // intValue + +// Resource type. +@property (copy) NSString *kind; + +// Link to next page for this Analytics data query. +@property (copy) NSString *nextLink; + +// Link to previous page for this Analytics data query. +@property (copy) NSString *previousLink; + +// Information for the profile, for which the Analytics data was requested. +@property (retain) GTLAnalyticsMcfDataProfileInfo *profileInfo; + +// Analytics data request query parameters. +@property (retain) GTLAnalyticsMcfDataQuery *query; + +// Analytics data rows, where each row contains a list of dimension values +// followed by the metric values. The order of dimensions and metrics is same as +// specified in the request. +@property (retain) NSArray *rows; // of NSArray of GTLAnalyticsMcfDataRowsItem + +// Link to this page. +@property (copy) NSString *selfLink; + +// The total number of rows for the query, regardless of the number of rows in +// the response. +@property (retain) NSNumber *totalResults; // intValue + +// Total values for the requested metrics over all the results, not just the +// results returned in this response. The order of the metric totals is same as +// the metric order specified in the request. +@property (retain) GTLAnalyticsMcfDataTotalsForAllResults *totalsForAllResults; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfDataColumnHeadersItem +// + +@interface GTLAnalyticsMcfDataColumnHeadersItem : GTLObject + +// Column Type. Either DIMENSION or METRIC. +@property (copy) NSString *columnType; + +// Data type. Dimension and metric values data types such as INTEGER, DOUBLE, +// CURRENCY, MCF_SEQUENCE etc. +@property (copy) NSString *dataType; + +// Column name. +@property (copy) NSString *name; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfDataProfileInfo +// + +@interface GTLAnalyticsMcfDataProfileInfo : GTLObject + +// Account ID to which this profile belongs. +@property (copy) NSString *accountId; + +// Internal ID for the web property to which this profile belongs. +@property (copy) NSString *internalWebPropertyId; + +// Profile ID. +@property (copy) NSString *profileId; + +// Profile name. +@property (copy) NSString *profileName; + +// Table ID for profile. +@property (copy) NSString *tableId; + +// Web Property ID to which this profile belongs. +@property (copy) NSString *webPropertyId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfDataQuery +// + +@interface GTLAnalyticsMcfDataQuery : GTLObject + +// List of analytics dimensions. +@property (copy) NSString *dimensions; + +// End date. +@property (copy) NSString *endDate; + +// Comma-separated list of dimension or metric filters. +@property (copy) NSString *filters; + +// Unique table ID. +@property (copy) NSString *ids; + +// Maximum results per page. +@property (retain) NSNumber *maxResults; // intValue + +// List of analytics metrics. +@property (retain) NSArray *metrics; // of NSString + +// Analytics advanced segment. +@property (copy) NSString *segment; + +// List of dimensions or metrics based on which Analytics data is sorted. +@property (retain) NSArray *sort; // of NSString + +// Start date. +@property (copy) NSString *startDate; + +// Start index. +@property (retain) NSNumber *startIndex; // intValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfDataRowsItem +// + +@interface GTLAnalyticsMcfDataRowsItem : GTLObject + +// A conversion path dimension value, containing a list of interactions with +// their attributes. +@property (retain) NSArray *conversionPathValue; // of GTLAnalyticsMcfDataRowsItemConversionPathValueItem + +// A primitive dimension value. A primitive metric value. +@property (copy) NSString *primitiveValue; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfDataTotalsForAllResults +// + +@interface GTLAnalyticsMcfDataTotalsForAllResults : GTLObject +// This object is documented as having more properties that are NSString. Use +// -additionalJSONKeys and -additionalPropertyForName: to get the list of +// properties and then fetch them; or -additionalProperties to fetch them all at +// once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfDataRowsItemConversionPathValueItem +// + +@interface GTLAnalyticsMcfDataRowsItemConversionPathValueItem : GTLObject + +// Type of an interaction on conversion path. Such as CLICK, IMPRESSION etc. +@property (copy) NSString *interactionType; + +// Node value of an interaction on conversion path. Such as source, medium etc. +@property (copy) NSString *nodeValue; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsMcfData.m.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsMcfData.m.svn-base new file mode 100644 index 0000000..3f966a7 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsMcfData.m.svn-base @@ -0,0 +1,164 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsMcfData.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsMcfData (0 custom class methods, 13 custom properties) +// GTLAnalyticsMcfDataColumnHeadersItem (0 custom class methods, 3 custom properties) +// GTLAnalyticsMcfDataProfileInfo (0 custom class methods, 6 custom properties) +// GTLAnalyticsMcfDataQuery (0 custom class methods, 10 custom properties) +// GTLAnalyticsMcfDataRowsItem (0 custom class methods, 2 custom properties) +// GTLAnalyticsMcfDataTotalsForAllResults (0 custom class methods, 0 custom properties) +// GTLAnalyticsMcfDataRowsItemConversionPathValueItem (0 custom class methods, 2 custom properties) + +#import "GTLAnalyticsMcfData.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfData +// + +@implementation GTLAnalyticsMcfData +@dynamic columnHeaders, containsSampledData, identifier, itemsPerPage, kind, + nextLink, previousLink, profileInfo, query, rows, selfLink, + totalResults, totalsForAllResults; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLAnalyticsMcfDataColumnHeadersItem class], @"columnHeaders", + [GTLAnalyticsMcfDataRowsItem class], @"rows", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#mcfData"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfDataColumnHeadersItem +// + +@implementation GTLAnalyticsMcfDataColumnHeadersItem +@dynamic columnType, dataType, name; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfDataProfileInfo +// + +@implementation GTLAnalyticsMcfDataProfileInfo +@dynamic accountId, internalWebPropertyId, profileId, profileName, tableId, + webPropertyId; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfDataQuery +// + +@implementation GTLAnalyticsMcfDataQuery +@dynamic dimensions, endDate, filters, ids, maxResults, metrics, segment, sort, + startDate, startIndex; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"end-date", @"endDate", + @"max-results", @"maxResults", + @"start-date", @"startDate", + @"start-index", @"startIndex", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"metrics", + [NSString class], @"sort", + nil]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfDataRowsItem +// + +@implementation GTLAnalyticsMcfDataRowsItem +@dynamic conversionPathValue, primitiveValue; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAnalyticsMcfDataRowsItemConversionPathValueItem class] + forKey:@"conversionPathValue"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfDataTotalsForAllResults +// + +@implementation GTLAnalyticsMcfDataTotalsForAllResults + ++ (Class)classForAdditionalProperties { + return [NSString class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfDataRowsItemConversionPathValueItem +// + +@implementation GTLAnalyticsMcfDataRowsItemConversionPathValueItem +@dynamic interactionType, nodeValue; +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsProfile.h.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsProfile.h.svn-base new file mode 100644 index 0000000..fd031b3 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsProfile.h.svn-base @@ -0,0 +1,145 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsProfile.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsProfile (0 custom class methods, 20 custom properties) +// GTLAnalyticsProfileChildLink (0 custom class methods, 2 custom properties) +// GTLAnalyticsProfileParentLink (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsProfileChildLink; +@class GTLAnalyticsProfileParentLink; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsProfile +// + +// JSON template for an Analytics profile. + +@interface GTLAnalyticsProfile : GTLObject + +// Account ID to which this profile belongs. +@property (copy) NSString *accountId; + +// Child link for this profile. Points to the list of goals for this profile. +@property (retain) GTLAnalyticsProfileChildLink *childLink; + +// Time this profile was created. +@property (retain) GTLDateTime *created; + +// The currency type associated with this profile. +@property (copy) NSString *currency; + +// Default page for this profile. +@property (copy) NSString *defaultPage; + +// E-commerce tracking parameter for this profile. +@property (retain) NSNumber *eCommerceTracking; // boolValue + +// The query parameters that are excluded from this profile. +@property (copy) NSString *excludeQueryParameters; + +// Profile ID. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Internal ID for the web property to which this profile belongs. +@property (copy) NSString *internalWebPropertyId; + +// Resource type for Analytics profile. +@property (copy) NSString *kind; + +// Name of this profile. +@property (copy) NSString *name; + +// Parent link for this profile. Points to the web property to which this +// profile belongs. +@property (retain) GTLAnalyticsProfileParentLink *parentLink; + +// Link for this profile. +@property (copy) NSString *selfLink; + +// Site search category parameters for this profile. +@property (copy) NSString *siteSearchCategoryParameters; + +// The site search query parameters for this profile. +@property (copy) NSString *siteSearchQueryParameters; + +// Time zone for which this profile has been configured. +@property (copy) NSString *timezone; + +// Profile type. Supported types: WEB or APP. +@property (copy) NSString *type; + +// Time this profile was last modified. +@property (retain) GTLDateTime *updated; + +// Web property ID of the form UA-XXXXX-YY to which this profile belongs. +@property (copy) NSString *webPropertyId; + +// Website URL for this profile. +@property (copy) NSString *websiteUrl; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsProfileChildLink +// + +@interface GTLAnalyticsProfileChildLink : GTLObject + +// Link to the list of goals for this profile. +@property (copy) NSString *href; + +// Value is "analytics#goals". +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsProfileParentLink +// + +@interface GTLAnalyticsProfileParentLink : GTLObject + +// Link to the web property to which this profile belongs. +@property (copy) NSString *href; + +// Value is "analytics#webproperty". +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsProfile.m.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsProfile.m.svn-base new file mode 100644 index 0000000..5c45568 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsProfile.m.svn-base @@ -0,0 +1,78 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsProfile.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsProfile (0 custom class methods, 20 custom properties) +// GTLAnalyticsProfileChildLink (0 custom class methods, 2 custom properties) +// GTLAnalyticsProfileParentLink (0 custom class methods, 2 custom properties) + +#import "GTLAnalyticsProfile.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsProfile +// + +@implementation GTLAnalyticsProfile +@dynamic accountId, childLink, created, currency, defaultPage, + eCommerceTracking, excludeQueryParameters, identifier, + internalWebPropertyId, kind, name, parentLink, selfLink, + siteSearchCategoryParameters, siteSearchQueryParameters, timezone, + type, updated, webPropertyId, websiteUrl; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#profile"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsProfileChildLink +// + +@implementation GTLAnalyticsProfileChildLink +@dynamic href, type; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsProfileParentLink +// + +@implementation GTLAnalyticsProfileParentLink +@dynamic href, type; +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsProfiles.h.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsProfiles.h.svn-base new file mode 100644 index 0000000..0957de8 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsProfiles.h.svn-base @@ -0,0 +1,81 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsProfiles.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsProfiles (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsProfile; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsProfiles +// + +// A profile collection lists Analytics profiles to which the user has access. +// Each resource in the collection corresponds to a single Analytics profile. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAnalyticsProfiles : GTLCollectionObject + +// A list of profiles. +@property (retain) NSArray *items; // of GTLAnalyticsProfile + +// The maximum number of resources the response can contain, regardless of the +// actual number of resources returned. Its value ranges from 1 to 1000 with a +// value of 1000 by default, or otherwise specified by the max-results query +// parameter. +@property (retain) NSNumber *itemsPerPage; // intValue + +// Collection type. +@property (copy) NSString *kind; + +// Link to next page for this profile collection. +@property (copy) NSString *nextLink; + +// Link to previous page for this profile collection. +@property (copy) NSString *previousLink; + +// The starting index of the resources, which is 1 by default or otherwise +// specified by the start-index query parameter. +@property (retain) NSNumber *startIndex; // intValue + +// The total number of results for the query, regardless of the number of +// results in the response. +@property (retain) NSNumber *totalResults; // intValue + +// Email ID of the authenticated user +@property (copy) NSString *username; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsProfiles.m.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsProfiles.m.svn-base new file mode 100644 index 0000000..930f6a0 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsProfiles.m.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsProfiles.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsProfiles (0 custom class methods, 8 custom properties) + +#import "GTLAnalyticsProfiles.h" + +#import "GTLAnalyticsProfile.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsProfiles +// + +@implementation GTLAnalyticsProfiles +@dynamic items, itemsPerPage, kind, nextLink, previousLink, startIndex, + totalResults, username; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAnalyticsProfile class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#profiles"]; +} + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsSegment.h.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsSegment.h.svn-base new file mode 100644 index 0000000..c0d56ea --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsSegment.h.svn-base @@ -0,0 +1,71 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsSegment.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsSegment (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsSegment +// + +// JSON template for an Analytics advanced segment. + +@interface GTLAnalyticsSegment : GTLObject + +// Time the advanced segment was created. +@property (retain) GTLDateTime *created; + +// Advanced segment definition. +@property (copy) NSString *definition; + +// Advanced segment ID. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Resource type for Analytics advanced segment. +@property (copy) NSString *kind; + +// Advanced segment name. +@property (copy) NSString *name; + +// Segment ID. Can be used with the 'segment' parameter in Data Feed. +@property (copy) NSString *segmentId; + +// Link for this advanced segment. +@property (copy) NSString *selfLink; + +// Time the advanced segment was last modified. +@property (retain) GTLDateTime *updated; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsSegment.m.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsSegment.m.svn-base new file mode 100644 index 0000000..c03a772 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsSegment.m.svn-base @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsSegment.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsSegment (0 custom class methods, 8 custom properties) + +#import "GTLAnalyticsSegment.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsSegment +// + +@implementation GTLAnalyticsSegment +@dynamic created, definition, identifier, kind, name, segmentId, selfLink, + updated; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#segment"]; +} + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsSegments.h.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsSegments.h.svn-base new file mode 100644 index 0000000..a70956c --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsSegments.h.svn-base @@ -0,0 +1,82 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsSegments.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsSegments (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsSegment; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsSegments +// + +// An advanced segment collection lists Analytics advanced segments that the +// user has access to. Each resource in the collection corresponds to a single +// Analytics advanced segment. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAnalyticsSegments : GTLCollectionObject + +// A list of advanced segments. +@property (retain) NSArray *items; // of GTLAnalyticsSegment + +// The maximum number of resources the response can contain, regardless of the +// actual number of resources returned. Its value ranges from 1 to 1000 with a +// value of 1000 by default, or otherwise specified by the max-results query +// parameter. +@property (retain) NSNumber *itemsPerPage; // intValue + +// Collection type for advanced segments. +@property (copy) NSString *kind; + +// Link to next page for this advanced segment collection. +@property (copy) NSString *nextLink; + +// Link to previous page for this advanced segment collection. +@property (copy) NSString *previousLink; + +// The starting index of the resources, which is 1 by default or otherwise +// specified by the start-index query parameter. +@property (retain) NSNumber *startIndex; // intValue + +// The total number of results for the query, regardless of the number of +// results in the response. +@property (retain) NSNumber *totalResults; // intValue + +// Email ID of the authenticated user +@property (copy) NSString *username; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsSegments.m.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsSegments.m.svn-base new file mode 100644 index 0000000..c87b817 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsSegments.m.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsSegments.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsSegments (0 custom class methods, 8 custom properties) + +#import "GTLAnalyticsSegments.h" + +#import "GTLAnalyticsSegment.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsSegments +// + +@implementation GTLAnalyticsSegments +@dynamic items, itemsPerPage, kind, nextLink, previousLink, startIndex, + totalResults, username; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAnalyticsSegment class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#segments"]; +} + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsWebproperties.h.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsWebproperties.h.svn-base new file mode 100644 index 0000000..06116fe --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsWebproperties.h.svn-base @@ -0,0 +1,82 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsWebproperties.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsWebproperties (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsWebproperty; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsWebproperties +// + +// A web property collection lists Analytics web properties to which the user +// has access. Each resource in the collection corresponds to a single Analytics +// web property. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAnalyticsWebproperties : GTLCollectionObject + +// A list of web properties. +@property (retain) NSArray *items; // of GTLAnalyticsWebproperty + +// The maximum number of resources the response can contain, regardless of the +// actual number of resources returned. Its value ranges from 1 to 1000 with a +// value of 1000 by default, or otherwise specified by the max-results query +// parameter. +@property (retain) NSNumber *itemsPerPage; // intValue + +// Collection type. +@property (copy) NSString *kind; + +// Link to next page for this web property collection. +@property (copy) NSString *nextLink; + +// Link to previous page for this web property collection. +@property (copy) NSString *previousLink; + +// The starting index of the resources, which is 1 by default or otherwise +// specified by the start-index query parameter. +@property (retain) NSNumber *startIndex; // intValue + +// The total number of results for the query, regardless of the number of +// results in the response. +@property (retain) NSNumber *totalResults; // intValue + +// Email ID of the authenticated user +@property (copy) NSString *username; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsWebproperties.m.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsWebproperties.m.svn-base new file mode 100644 index 0000000..a07a478 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsWebproperties.m.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsWebproperties.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsWebproperties (0 custom class methods, 8 custom properties) + +#import "GTLAnalyticsWebproperties.h" + +#import "GTLAnalyticsWebproperty.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsWebproperties +// + +@implementation GTLAnalyticsWebproperties +@dynamic items, itemsPerPage, kind, nextLink, previousLink, startIndex, + totalResults, username; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAnalyticsWebproperty class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#webproperties"]; +} + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsWebproperty.h.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsWebproperty.h.svn-base new file mode 100644 index 0000000..5817f4a --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsWebproperty.h.svn-base @@ -0,0 +1,119 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsWebproperty.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsWebproperty (0 custom class methods, 11 custom properties) +// GTLAnalyticsWebpropertyChildLink (0 custom class methods, 2 custom properties) +// GTLAnalyticsWebpropertyParentLink (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsWebpropertyChildLink; +@class GTLAnalyticsWebpropertyParentLink; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsWebproperty +// + +// JSON template for an Analytics web property. + +@interface GTLAnalyticsWebproperty : GTLObject + +// Account ID to which this web property belongs. +@property (copy) NSString *accountId; + +// Child link for this web property. Points to the list of profiles for this web +// property. +@property (retain) GTLAnalyticsWebpropertyChildLink *childLink; + +// Time this web property was created. +@property (retain) GTLDateTime *created; + +// Web property ID of the form UA-XXXXX-YY. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Internal ID for this web property. +@property (copy) NSString *internalWebPropertyId; + +// Resource type for Analytics WebProperty. +@property (copy) NSString *kind; + +// Name of this web property. +@property (copy) NSString *name; + +// Parent link for this web property. Points to the account to which this web +// property belongs. +@property (retain) GTLAnalyticsWebpropertyParentLink *parentLink; + +// Link for this web property. +@property (copy) NSString *selfLink; + +// Time this web property was last modified. +@property (retain) GTLDateTime *updated; + +// Website url for this web property. +@property (copy) NSString *websiteUrl; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsWebpropertyChildLink +// + +@interface GTLAnalyticsWebpropertyChildLink : GTLObject + +// Link to the list of profiles for this web property. +@property (copy) NSString *href; + +// Type of the parent link. Its value is "analytics#profiles". +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsWebpropertyParentLink +// + +@interface GTLAnalyticsWebpropertyParentLink : GTLObject + +// Link to the account for this web property. +@property (copy) NSString *href; + +// Type of the parent link. Its value is "analytics#account". +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsWebproperty.m.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsWebproperty.m.svn-base new file mode 100644 index 0000000..9b1f21c --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalyticsWebproperty.m.svn-base @@ -0,0 +1,75 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsWebproperty.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsWebproperty (0 custom class methods, 11 custom properties) +// GTLAnalyticsWebpropertyChildLink (0 custom class methods, 2 custom properties) +// GTLAnalyticsWebpropertyParentLink (0 custom class methods, 2 custom properties) + +#import "GTLAnalyticsWebproperty.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsWebproperty +// + +@implementation GTLAnalyticsWebproperty +@dynamic accountId, childLink, created, identifier, internalWebPropertyId, kind, + name, parentLink, selfLink, updated, websiteUrl; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#webproperty"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsWebpropertyChildLink +// + +@implementation GTLAnalyticsWebpropertyChildLink +@dynamic href, type; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsWebpropertyParentLink +// + +@implementation GTLAnalyticsWebpropertyParentLink +@dynamic href, type; +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalytics_Sources.m.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalytics_Sources.m.svn-base new file mode 100644 index 0000000..3ee5483 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLAnalytics_Sources.m.svn-base @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalytics_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ + +#import "GTLAnalyticsConstants.m" + +#import "GTLAnalyticsAccount.m" +#import "GTLAnalyticsAccounts.m" +#import "GTLAnalyticsCustomDataSource.m" +#import "GTLAnalyticsCustomDataSources.m" +#import "GTLAnalyticsDailyUpload.m" +#import "GTLAnalyticsDailyUploadAppend.m" +#import "GTLAnalyticsDailyUploads.m" +#import "GTLAnalyticsGaData.m" +#import "GTLAnalyticsGoal.m" +#import "GTLAnalyticsGoals.m" +#import "GTLAnalyticsMcfData.m" +#import "GTLAnalyticsProfile.m" +#import "GTLAnalyticsProfiles.m" +#import "GTLAnalyticsSegment.m" +#import "GTLAnalyticsSegments.m" +#import "GTLAnalyticsWebproperties.m" +#import "GTLAnalyticsWebproperty.m" + +#import "GTLQueryAnalytics.m" +#import "GTLServiceAnalytics.m" diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLQueryAnalytics.h.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLQueryAnalytics.h.svn-base new file mode 100644 index 0000000..c159744 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLQueryAnalytics.h.svn-base @@ -0,0 +1,341 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryAnalytics.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLQueryAnalytics (11 custom class methods, 19 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@interface GTLQueryAnalytics : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *accountId; +@property (assign) NSInteger appendNumber; +@property (copy) NSString *customDataSourceId; +@property (copy) NSString *date; +@property (copy) NSString *dimensions; +@property (copy) NSString *endDate; +@property (copy) NSString *filters; +@property (copy) NSString *ids; +@property (assign) NSInteger maxResults; +@property (copy) NSString *metrics; +@property (copy) NSString *profileId; +@property (assign) BOOL reset; +@property (copy) NSString *segment; +@property (copy) NSString *sort; +@property (copy) NSString *startDate; +@property (assign) NSInteger startIndex; +@property (copy) NSString *type; +@property (copy) NSString *webPropertyId; + +#pragma mark - +#pragma mark "data.ga" methods +// These create a GTLQueryAnalytics object. + +// Method: analytics.data.ga.get +// Returns Analytics data for a profile. +// Required: +// ids: Unique table ID for retrieving Analytics data. Table ID is of the form +// ga:XXXX, where XXXX is the Analytics profile ID. +// startDate: Start date for fetching Analytics data. All requests should +// specify a start date formatted as YYYY-MM-DD. +// endDate: End date for fetching Analytics data. All requests should specify +// an end date formatted as YYYY-MM-DD. +// metrics: A comma-separated list of Analytics metrics. E.g., +// 'ga:visits,ga:pageviews'. At least one metric must be specified. +// Optional: +// dimensions: A comma-separated list of Analytics dimensions. E.g., +// 'ga:browser,ga:city'. +// filters: A comma-separated list of dimension or metric filters to be +// applied to Analytics data. +// maxResults: The maximum number of entries to include in this feed. +// segment: An Analytics advanced segment to be applied to data. +// sort: A comma-separated list of dimensions or metrics that determine the +// sort order for Analytics data. +// startIndex: An index of the first entity to retrieve. Use this parameter as +// a pagination mechanism along with the max-results parameter. +// Authorization scope(s): +// kGTLAuthScopeAnalytics +// kGTLAuthScopeAnalyticsReadonly +// Fetches a GTLAnalyticsGaData. ++ (id)queryForDataGaGetWithIds:(NSString *)ids + startDate:(NSString *)startDate + endDate:(NSString *)endDate + metrics:(NSString *)metrics; + +#pragma mark - +#pragma mark "data.mcf" methods +// These create a GTLQueryAnalytics object. + +// Method: analytics.data.mcf.get +// Returns Analytics Multi-Channel Funnels data for a profile. +// Required: +// ids: Unique table ID for retrieving Analytics data. Table ID is of the form +// ga:XXXX, where XXXX is the Analytics profile ID. +// startDate: Start date for fetching Analytics data. All requests should +// specify a start date formatted as YYYY-MM-DD. +// endDate: End date for fetching Analytics data. All requests should specify +// an end date formatted as YYYY-MM-DD. +// metrics: A comma-separated list of Multi-Channel Funnels metrics. E.g., +// 'mcf:totalConversions,mcf:totalConversionValue'. At least one metric must +// be specified. +// Optional: +// dimensions: A comma-separated list of Multi-Channel Funnels dimensions. +// E.g., 'mcf:source,mcf:medium'. +// filters: A comma-separated list of dimension or metric filters to be +// applied to the Analytics data. +// maxResults: The maximum number of entries to include in this feed. +// sort: A comma-separated list of dimensions or metrics that determine the +// sort order for the Analytics data. +// startIndex: An index of the first entity to retrieve. Use this parameter as +// a pagination mechanism along with the max-results parameter. +// Authorization scope(s): +// kGTLAuthScopeAnalytics +// kGTLAuthScopeAnalyticsReadonly +// Fetches a GTLAnalyticsMcfData. ++ (id)queryForDataMcfGetWithIds:(NSString *)ids + startDate:(NSString *)startDate + endDate:(NSString *)endDate + metrics:(NSString *)metrics; + +#pragma mark - +#pragma mark "management.accounts" methods +// These create a GTLQueryAnalytics object. + +// Method: analytics.management.accounts.list +// Lists all accounts to which the user has access. +// Optional: +// maxResults: The maximum number of accounts to include in this response. +// startIndex: An index of the first account to retrieve. Use this parameter +// as a pagination mechanism along with the max-results parameter. +// Authorization scope(s): +// kGTLAuthScopeAnalytics +// kGTLAuthScopeAnalyticsReadonly +// Fetches a GTLAnalyticsAccounts. ++ (id)queryForManagementAccountsList; + +#pragma mark - +#pragma mark "management.customDataSources" methods +// These create a GTLQueryAnalytics object. + +// Method: analytics.management.customDataSources.list +// List custom data sources to which the user has access. +// Required: +// accountId: Account Id for the custom data sources to retrieve. +// webPropertyId: Web property Id for the custom data sources to retrieve. +// Optional: +// maxResults: The maximum number of custom data sources to include in this +// response. +// startIndex: A 1-based index of the first custom data source to retrieve. +// Use this parameter as a pagination mechanism along with the max-results +// parameter. +// Authorization scope(s): +// kGTLAuthScopeAnalytics +// kGTLAuthScopeAnalyticsReadonly +// Fetches a GTLAnalyticsCustomDataSources. ++ (id)queryForManagementCustomDataSourcesListWithAccountId:(NSString *)accountId + webPropertyId:(NSString *)webPropertyId; + +#pragma mark - +#pragma mark "management.dailyUploads" methods +// These create a GTLQueryAnalytics object. + +// Method: analytics.management.dailyUploads.delete +// Delete uploaded data for the given date. +// Required: +// accountId: Account Id associated with daily upload delete. +// webPropertyId: Web property Id associated with daily upload delete. +// customDataSourceId: Custom data source Id associated with daily upload +// delete. +// date: Date for which data is to be deleted. Date should be formatted as +// YYYY-MM-DD. +// type: Type of data for this delete. +// kGTLAnalyticsTypeCost: Value for specifying cost data upload. +// Authorization scope(s): +// kGTLAuthScopeAnalytics ++ (id)queryForManagementDailyUploadsDeleteWithAccountId:(NSString *)accountId + webPropertyId:(NSString *)webPropertyId + customDataSourceId:(NSString *)customDataSourceId + date:(NSString *)date + type:(NSString *)type; + +// Method: analytics.management.dailyUploads.list +// List daily uploads to which the user has access. +// Required: +// accountId: Account Id for the daily uploads to retrieve. +// webPropertyId: Web property Id for the daily uploads to retrieve. +// customDataSourceId: Custom data source Id for daily uploads to retrieve. +// startDate: Start date of the form YYYY-MM-DD. +// endDate: End date of the form YYYY-MM-DD. +// Optional: +// maxResults: The maximum number of custom data sources to include in this +// response. +// startIndex: A 1-based index of the first daily upload to retrieve. Use this +// parameter as a pagination mechanism along with the max-results parameter. +// Authorization scope(s): +// kGTLAuthScopeAnalytics +// kGTLAuthScopeAnalyticsReadonly +// Fetches a GTLAnalyticsDailyUploads. ++ (id)queryForManagementDailyUploadsListWithAccountId:(NSString *)accountId + webPropertyId:(NSString *)webPropertyId + customDataSourceId:(NSString *)customDataSourceId + startDate:(NSString *)startDate + endDate:(NSString *)endDate; + +// Method: analytics.management.dailyUploads.upload +// Update/Overwrite data for a custom data source. +// Required: +// accountId: Account Id associated with daily upload. +// webPropertyId: Web property Id associated with daily upload. +// customDataSourceId: Custom data source Id to which the data being uploaded +// belongs. +// date: Date for which data is uploaded. Date should be formatted as +// YYYY-MM-DD. +// appendNumber: Append number for this upload indexed from 1. (1..20) +// type: Type of data for this upload. +// kGTLAnalyticsTypeCost: Value for specifying cost data upload. +// Optional: +// reset: Reset/Overwrite all previous appends for this date and start over +// with this file as the first upload. (Default false) +// Upload Parameters: +// Maximum size: 5MB +// Accepted MIME type(s): application/octet-stream +// Authorization scope(s): +// kGTLAuthScopeAnalytics +// Fetches a GTLAnalyticsDailyUploadAppend. ++ (id)queryForManagementDailyUploadsUploadWithAccountId:(NSString *)accountId + webPropertyId:(NSString *)webPropertyId + customDataSourceId:(NSString *)customDataSourceId + date:(NSString *)date + appendNumber:(NSInteger)appendNumber + type:(NSString *)type + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil; + +#pragma mark - +#pragma mark "management.goals" methods +// These create a GTLQueryAnalytics object. + +// Method: analytics.management.goals.list +// Lists goals to which the user has access. +// Required: +// accountId: Account ID to retrieve goals for. Can either be a specific +// account ID or '~all', which refers to all the accounts that user has +// access to. +// webPropertyId: Web property ID to retrieve goals for. Can either be a +// specific web property ID or '~all', which refers to all the web +// properties that user has access to. +// profileId: Profile ID to retrieve goals for. Can either be a specific +// profile ID or '~all', which refers to all the profiles that user has +// access to. +// Optional: +// maxResults: The maximum number of goals to include in this response. +// startIndex: An index of the first goal to retrieve. Use this parameter as a +// pagination mechanism along with the max-results parameter. +// Authorization scope(s): +// kGTLAuthScopeAnalytics +// kGTLAuthScopeAnalyticsReadonly +// Fetches a GTLAnalyticsGoals. ++ (id)queryForManagementGoalsListWithAccountId:(NSString *)accountId + webPropertyId:(NSString *)webPropertyId + profileId:(NSString *)profileId; + +#pragma mark - +#pragma mark "management.profiles" methods +// These create a GTLQueryAnalytics object. + +// Method: analytics.management.profiles.list +// Lists profiles to which the user has access. +// Required: +// accountId: Account ID for the profiles to retrieve. Can either be a +// specific account ID or '~all', which refers to all the accounts to which +// the user has access. +// webPropertyId: Web property ID for the profiles to retrieve. Can either be +// a specific web property ID or '~all', which refers to all the web +// properties to which the user has access. +// Optional: +// maxResults: The maximum number of profiles to include in this response. +// startIndex: An index of the first entity to retrieve. Use this parameter as +// a pagination mechanism along with the max-results parameter. +// Authorization scope(s): +// kGTLAuthScopeAnalytics +// kGTLAuthScopeAnalyticsReadonly +// Fetches a GTLAnalyticsProfiles. ++ (id)queryForManagementProfilesListWithAccountId:(NSString *)accountId + webPropertyId:(NSString *)webPropertyId; + +#pragma mark - +#pragma mark "management.segments" methods +// These create a GTLQueryAnalytics object. + +// Method: analytics.management.segments.list +// Lists advanced segments to which the user has access. +// Optional: +// maxResults: The maximum number of advanced segments to include in this +// response. +// startIndex: An index of the first advanced segment to retrieve. Use this +// parameter as a pagination mechanism along with the max-results parameter. +// Authorization scope(s): +// kGTLAuthScopeAnalytics +// kGTLAuthScopeAnalyticsReadonly +// Fetches a GTLAnalyticsSegments. ++ (id)queryForManagementSegmentsList; + +#pragma mark - +#pragma mark "management.webproperties" methods +// These create a GTLQueryAnalytics object. + +// Method: analytics.management.webproperties.list +// Lists web properties to which the user has access. +// Required: +// accountId: Account ID to retrieve web properties for. Can either be a +// specific account ID or '~all', which refers to all the accounts that user +// has access to. +// Optional: +// maxResults: The maximum number of web properties to include in this +// response. +// startIndex: An index of the first entity to retrieve. Use this parameter as +// a pagination mechanism along with the max-results parameter. +// Authorization scope(s): +// kGTLAuthScopeAnalytics +// kGTLAuthScopeAnalyticsReadonly +// Fetches a GTLAnalyticsWebproperties. ++ (id)queryForManagementWebpropertiesListWithAccountId:(NSString *)accountId; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLQueryAnalytics.m.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLQueryAnalytics.m.svn-base new file mode 100644 index 0000000..1d45ecc --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLQueryAnalytics.m.svn-base @@ -0,0 +1,230 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryAnalytics.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLQueryAnalytics (11 custom class methods, 19 custom properties) + +#import "GTLQueryAnalytics.h" + +#import "GTLAnalyticsAccounts.h" +#import "GTLAnalyticsCustomDataSources.h" +#import "GTLAnalyticsDailyUploadAppend.h" +#import "GTLAnalyticsDailyUploads.h" +#import "GTLAnalyticsGaData.h" +#import "GTLAnalyticsGoals.h" +#import "GTLAnalyticsMcfData.h" +#import "GTLAnalyticsProfiles.h" +#import "GTLAnalyticsSegments.h" +#import "GTLAnalyticsWebproperties.h" + +@implementation GTLQueryAnalytics + +@dynamic accountId, appendNumber, customDataSourceId, date, dimensions, endDate, + fields, filters, ids, maxResults, metrics, profileId, reset, segment, + sort, startDate, startIndex, type, webPropertyId; + ++ (NSDictionary *)parameterNameMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"end-date", @"endDate", + @"max-results", @"maxResults", + @"start-date", @"startDate", + @"start-index", @"startIndex", + nil]; + return map; +} + +#pragma mark - +#pragma mark "data.ga" methods +// These create a GTLQueryAnalytics object. + ++ (id)queryForDataGaGetWithIds:(NSString *)ids + startDate:(NSString *)startDate + endDate:(NSString *)endDate + metrics:(NSString *)metrics { + NSString *methodName = @"analytics.data.ga.get"; + GTLQueryAnalytics *query = [self queryWithMethodName:methodName]; + query.ids = ids; + query.startDate = startDate; + query.endDate = endDate; + query.metrics = metrics; + query.expectedObjectClass = [GTLAnalyticsGaData class]; + return query; +} + +#pragma mark - +#pragma mark "data.mcf" methods +// These create a GTLQueryAnalytics object. + ++ (id)queryForDataMcfGetWithIds:(NSString *)ids + startDate:(NSString *)startDate + endDate:(NSString *)endDate + metrics:(NSString *)metrics { + NSString *methodName = @"analytics.data.mcf.get"; + GTLQueryAnalytics *query = [self queryWithMethodName:methodName]; + query.ids = ids; + query.startDate = startDate; + query.endDate = endDate; + query.metrics = metrics; + query.expectedObjectClass = [GTLAnalyticsMcfData class]; + return query; +} + +#pragma mark - +#pragma mark "management.accounts" methods +// These create a GTLQueryAnalytics object. + ++ (id)queryForManagementAccountsList { + NSString *methodName = @"analytics.management.accounts.list"; + GTLQueryAnalytics *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLAnalyticsAccounts class]; + return query; +} + +#pragma mark - +#pragma mark "management.customDataSources" methods +// These create a GTLQueryAnalytics object. + ++ (id)queryForManagementCustomDataSourcesListWithAccountId:(NSString *)accountId + webPropertyId:(NSString *)webPropertyId { + NSString *methodName = @"analytics.management.customDataSources.list"; + GTLQueryAnalytics *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.webPropertyId = webPropertyId; + query.expectedObjectClass = [GTLAnalyticsCustomDataSources class]; + return query; +} + +#pragma mark - +#pragma mark "management.dailyUploads" methods +// These create a GTLQueryAnalytics object. + ++ (id)queryForManagementDailyUploadsDeleteWithAccountId:(NSString *)accountId + webPropertyId:(NSString *)webPropertyId + customDataSourceId:(NSString *)customDataSourceId + date:(NSString *)date + type:(NSString *)type { + NSString *methodName = @"analytics.management.dailyUploads.delete"; + GTLQueryAnalytics *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.webPropertyId = webPropertyId; + query.customDataSourceId = customDataSourceId; + query.date = date; + query.type = type; + return query; +} + ++ (id)queryForManagementDailyUploadsListWithAccountId:(NSString *)accountId + webPropertyId:(NSString *)webPropertyId + customDataSourceId:(NSString *)customDataSourceId + startDate:(NSString *)startDate + endDate:(NSString *)endDate { + NSString *methodName = @"analytics.management.dailyUploads.list"; + GTLQueryAnalytics *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.webPropertyId = webPropertyId; + query.customDataSourceId = customDataSourceId; + query.startDate = startDate; + query.endDate = endDate; + query.expectedObjectClass = [GTLAnalyticsDailyUploads class]; + return query; +} + ++ (id)queryForManagementDailyUploadsUploadWithAccountId:(NSString *)accountId + webPropertyId:(NSString *)webPropertyId + customDataSourceId:(NSString *)customDataSourceId + date:(NSString *)date + appendNumber:(NSInteger)appendNumber + type:(NSString *)type + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil { + NSString *methodName = @"analytics.management.dailyUploads.upload"; + GTLQueryAnalytics *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.webPropertyId = webPropertyId; + query.customDataSourceId = customDataSourceId; + query.date = date; + query.appendNumber = appendNumber; + query.type = type; + query.uploadParameters = uploadParametersOrNil; + query.expectedObjectClass = [GTLAnalyticsDailyUploadAppend class]; + return query; +} + +#pragma mark - +#pragma mark "management.goals" methods +// These create a GTLQueryAnalytics object. + ++ (id)queryForManagementGoalsListWithAccountId:(NSString *)accountId + webPropertyId:(NSString *)webPropertyId + profileId:(NSString *)profileId { + NSString *methodName = @"analytics.management.goals.list"; + GTLQueryAnalytics *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.webPropertyId = webPropertyId; + query.profileId = profileId; + query.expectedObjectClass = [GTLAnalyticsGoals class]; + return query; +} + +#pragma mark - +#pragma mark "management.profiles" methods +// These create a GTLQueryAnalytics object. + ++ (id)queryForManagementProfilesListWithAccountId:(NSString *)accountId + webPropertyId:(NSString *)webPropertyId { + NSString *methodName = @"analytics.management.profiles.list"; + GTLQueryAnalytics *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.webPropertyId = webPropertyId; + query.expectedObjectClass = [GTLAnalyticsProfiles class]; + return query; +} + +#pragma mark - +#pragma mark "management.segments" methods +// These create a GTLQueryAnalytics object. + ++ (id)queryForManagementSegmentsList { + NSString *methodName = @"analytics.management.segments.list"; + GTLQueryAnalytics *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLAnalyticsSegments class]; + return query; +} + +#pragma mark - +#pragma mark "management.webproperties" methods +// These create a GTLQueryAnalytics object. + ++ (id)queryForManagementWebpropertiesListWithAccountId:(NSString *)accountId { + NSString *methodName = @"analytics.management.webproperties.list"; + GTLQueryAnalytics *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.expectedObjectClass = [GTLAnalyticsWebproperties class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLServiceAnalytics.h.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLServiceAnalytics.h.svn-base new file mode 100644 index 0000000..e908d9a --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLServiceAnalytics.h.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceAnalytics.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLServiceAnalytics (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceAnalytics : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryAnalytics.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLServiceAnalytics.m.svn-base b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLServiceAnalytics.m.svn-base new file mode 100644 index 0000000..0dc3114 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/.svn/text-base/GTLServiceAnalytics.m.svn-base @@ -0,0 +1,78 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceAnalytics.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLServiceAnalytics (0 custom class methods, 0 custom properties) + +#import "GTLAnalytics.h" + +@implementation GTLServiceAnalytics + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryAnalytics class], + [GTLAnalyticsAccount class], + [GTLAnalyticsAccounts class], + [GTLAnalyticsCustomDataSource class], + [GTLAnalyticsCustomDataSources class], + [GTLAnalyticsDailyUpload class], + [GTLAnalyticsDailyUploadAppend class], + [GTLAnalyticsDailyUploads class], + [GTLAnalyticsGaData class], + [GTLAnalyticsGoal class], + [GTLAnalyticsGoals class], + [GTLAnalyticsMcfData class], + [GTLAnalyticsProfile class], + [GTLAnalyticsProfiles class], + [GTLAnalyticsSegment class], + [GTLAnalyticsSegments class], + [GTLAnalyticsWebproperties class], + [GTLAnalyticsWebproperty class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v3"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + self.rpcUploadURL = [NSURL URLWithString:@"https://www.googleapis.com/upload/rpc?uploadType=resumable&prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalytics.h b/GTL/Source/Services/Analytics/Generated/GTLAnalytics.h new file mode 100644 index 0000000..04bc89f --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalytics.h @@ -0,0 +1,50 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalytics.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ + +#import "GTLAnalyticsConstants.h" + +#import "GTLAnalyticsAccount.h" +#import "GTLAnalyticsAccounts.h" +#import "GTLAnalyticsCustomDataSource.h" +#import "GTLAnalyticsCustomDataSources.h" +#import "GTLAnalyticsDailyUpload.h" +#import "GTLAnalyticsDailyUploadAppend.h" +#import "GTLAnalyticsDailyUploads.h" +#import "GTLAnalyticsGaData.h" +#import "GTLAnalyticsGoal.h" +#import "GTLAnalyticsGoals.h" +#import "GTLAnalyticsMcfData.h" +#import "GTLAnalyticsProfile.h" +#import "GTLAnalyticsProfiles.h" +#import "GTLAnalyticsSegment.h" +#import "GTLAnalyticsSegments.h" +#import "GTLAnalyticsWebproperties.h" +#import "GTLAnalyticsWebproperty.h" + +#import "GTLQueryAnalytics.h" +#import "GTLServiceAnalytics.h" diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsAccount.h b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsAccount.h new file mode 100644 index 0000000..e448bb5 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsAccount.h @@ -0,0 +1,88 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsAccount.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsAccount (0 custom class methods, 7 custom properties) +// GTLAnalyticsAccountChildLink (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsAccountChildLink; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsAccount +// + +// JSON template for Analytics account entry. + +@interface GTLAnalyticsAccount : GTLObject + +// Child link for an account entry. Points to the list of web properties for +// this account. +@property (retain) GTLAnalyticsAccountChildLink *childLink; + +// Time the account was created. +@property (retain) GTLDateTime *created; + +// Account ID. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Resource type for Analytics account. +@property (copy) NSString *kind; + +// Account name. +@property (copy) NSString *name; + +// Link for this account. +@property (copy) NSString *selfLink; + +// Time the account was last modified. +@property (retain) GTLDateTime *updated; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsAccountChildLink +// + +@interface GTLAnalyticsAccountChildLink : GTLObject + +// Link to the list of web properties for this account. +@property (copy) NSString *href; + +// Type of the child link. Its value is "analytics#webproperties". +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsAccount.m b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsAccount.m new file mode 100644 index 0000000..83f4140 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsAccount.m @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsAccount.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsAccount (0 custom class methods, 7 custom properties) +// GTLAnalyticsAccountChildLink (0 custom class methods, 2 custom properties) + +#import "GTLAnalyticsAccount.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsAccount +// + +@implementation GTLAnalyticsAccount +@dynamic childLink, created, identifier, kind, name, selfLink, updated; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#account"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsAccountChildLink +// + +@implementation GTLAnalyticsAccountChildLink +@dynamic href, type; +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsAccounts.h b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsAccounts.h new file mode 100644 index 0000000..21e33c9 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsAccounts.h @@ -0,0 +1,83 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsAccounts.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsAccounts (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsAccount; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsAccounts +// + +// An account collection provides a list of Analytics accounts to which a user +// has access. The account collection is the entry point to all management +// information. Each resource in the collection corresponds to a single +// Analytics account. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAnalyticsAccounts : GTLCollectionObject + +// A list of accounts. +@property (retain) NSArray *items; // of GTLAnalyticsAccount + +// The maximum number of entries the response can contain, regardless of the +// actual number of entries returned. Its value ranges from 1 to 1000 with a +// value of 1000 by default, or otherwise specified by the max-results query +// parameter. +@property (retain) NSNumber *itemsPerPage; // intValue + +// Collection type. +@property (copy) NSString *kind; + +// Next link for this account collection. +@property (copy) NSString *nextLink; + +// Previous link for this account collection. +@property (copy) NSString *previousLink; + +// The starting index of the entries, which is 1 by default or otherwise +// specified by the start-index query parameter. +@property (retain) NSNumber *startIndex; // intValue + +// The total number of results for the query, regardless of the number of +// results in the response. +@property (retain) NSNumber *totalResults; // intValue + +// Email ID of the authenticated user +@property (copy) NSString *username; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsAccounts.m b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsAccounts.m new file mode 100644 index 0000000..8e499dc --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsAccounts.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsAccounts.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsAccounts (0 custom class methods, 8 custom properties) + +#import "GTLAnalyticsAccounts.h" + +#import "GTLAnalyticsAccount.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsAccounts +// + +@implementation GTLAnalyticsAccounts +@dynamic items, itemsPerPage, kind, nextLink, previousLink, startIndex, + totalResults, username; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAnalyticsAccount class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#accounts"]; +} + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsConstants.h b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsConstants.h new file mode 100644 index 0000000..31ca5e4 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsConstants.h @@ -0,0 +1,44 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// View and manage your Google Analytics data +GTL_EXTERN NSString * const kGTLAuthScopeAnalytics; // "https://www.googleapis.com/auth/analytics" +// View your Google Analytics data +GTL_EXTERN NSString * const kGTLAuthScopeAnalyticsReadonly; // "https://www.googleapis.com/auth/analytics.readonly" + +// Type +GTL_EXTERN NSString * const kGTLAnalyticsTypeCost; // "cost" diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsConstants.m b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsConstants.m new file mode 100644 index 0000000..8eae14c --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsConstants.m @@ -0,0 +1,36 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ + +#import "GTLAnalyticsConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeAnalytics = @"https://www.googleapis.com/auth/analytics"; +NSString * const kGTLAuthScopeAnalyticsReadonly = @"https://www.googleapis.com/auth/analytics.readonly"; + +// Type +NSString * const kGTLAnalyticsTypeCost = @"cost"; diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsCustomDataSource.h b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsCustomDataSource.h new file mode 100644 index 0000000..42c2e43 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsCustomDataSource.h @@ -0,0 +1,123 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsCustomDataSource.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsCustomDataSource (0 custom class methods, 12 custom properties) +// GTLAnalyticsCustomDataSourceChildLink (0 custom class methods, 2 custom properties) +// GTLAnalyticsCustomDataSourceParentLink (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsCustomDataSourceChildLink; +@class GTLAnalyticsCustomDataSourceParentLink; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsCustomDataSource +// + +// JSON template for an Analytics custom data source. + +@interface GTLAnalyticsCustomDataSource : GTLObject + +// Account ID to which this custom data source belongs. +@property (copy) NSString *accountId; + +// Child link for this custom data source. Points to the list of daily uploads +// for this custom data source. +@property (retain) GTLAnalyticsCustomDataSourceChildLink *childLink; + +// Time this custom data source was created. +@property (retain) GTLDateTime *created; + +// Description of custom data source. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Custom data source ID. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Resource type for Analytics custom data source. +@property (copy) NSString *kind; + +// Name of this custom data source. +@property (copy) NSString *name; + +// Parent link for this custom data source. Points to the web property to which +// this custom data source belongs. +@property (retain) GTLAnalyticsCustomDataSourceParentLink *parentLink; + +@property (retain) NSArray *profilesLinked; // of NSString + +// Link for this Analytics custom data source. +@property (copy) NSString *selfLink; + +// Time this custom data source was last modified. +@property (retain) GTLDateTime *updated; + +// Web property ID of the form UA-XXXXX-YY to which this custom data source +// belongs. +@property (copy) NSString *webPropertyId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsCustomDataSourceChildLink +// + +@interface GTLAnalyticsCustomDataSourceChildLink : GTLObject + +// Link to the list of daily uploads for this custom data source. +@property (copy) NSString *href; + +// Value is "analytics#dailyUploads". +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsCustomDataSourceParentLink +// + +@interface GTLAnalyticsCustomDataSourceParentLink : GTLObject + +// Link to the web property to which this custom data source belongs. +@property (copy) NSString *href; + +// Value is "analytics#webproperty". +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsCustomDataSource.m b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsCustomDataSource.m new file mode 100644 index 0000000..584ec6f --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsCustomDataSource.m @@ -0,0 +1,84 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsCustomDataSource.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsCustomDataSource (0 custom class methods, 12 custom properties) +// GTLAnalyticsCustomDataSourceChildLink (0 custom class methods, 2 custom properties) +// GTLAnalyticsCustomDataSourceParentLink (0 custom class methods, 2 custom properties) + +#import "GTLAnalyticsCustomDataSource.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsCustomDataSource +// + +@implementation GTLAnalyticsCustomDataSource +@dynamic accountId, childLink, created, descriptionProperty, identifier, kind, + name, parentLink, profilesLinked, selfLink, updated, webPropertyId; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"profilesLinked"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#customDataSource"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsCustomDataSourceChildLink +// + +@implementation GTLAnalyticsCustomDataSourceChildLink +@dynamic href, type; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsCustomDataSourceParentLink +// + +@implementation GTLAnalyticsCustomDataSourceParentLink +@dynamic href, type; +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsCustomDataSources.h b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsCustomDataSources.h new file mode 100644 index 0000000..099184a --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsCustomDataSources.h @@ -0,0 +1,82 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsCustomDataSources.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsCustomDataSources (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsCustomDataSource; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsCustomDataSources +// + +// Lists Analytics custom data sources to which the user has access. Each +// resource in the collection corresponds to a single Analytics custom data +// source. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAnalyticsCustomDataSources : GTLCollectionObject + +// Collection of custom data sources. +@property (retain) NSArray *items; // of GTLAnalyticsCustomDataSource + +// The maximum number of resources the response can contain, regardless of the +// actual number of resources returned. Its value ranges from 1 to 1000 with a +// value of 1000 by default, or otherwise specified by the max-results query +// parameter. +@property (retain) NSNumber *itemsPerPage; // intValue + +// Collection type. +@property (copy) NSString *kind; + +// Link to next page for this custom data source collection. +@property (copy) NSString *nextLink; + +// Link to previous page for this custom data source collection. +@property (copy) NSString *previousLink; + +// The starting index of the resources, which is 1 by default or otherwise +// specified by the start-index query parameter. +@property (retain) NSNumber *startIndex; // intValue + +// The total number of results for the query, regardless of the number of +// results in the response. +@property (retain) NSNumber *totalResults; // intValue + +// Email ID of the authenticated user +@property (copy) NSString *username; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsCustomDataSources.m b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsCustomDataSources.m new file mode 100644 index 0000000..6e2f7b4 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsCustomDataSources.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsCustomDataSources.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsCustomDataSources (0 custom class methods, 8 custom properties) + +#import "GTLAnalyticsCustomDataSources.h" + +#import "GTLAnalyticsCustomDataSource.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsCustomDataSources +// + +@implementation GTLAnalyticsCustomDataSources +@dynamic items, itemsPerPage, kind, nextLink, previousLink, startIndex, + totalResults, username; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAnalyticsCustomDataSource class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#customDataSources"]; +} + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsDailyUpload.h b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsDailyUpload.h new file mode 100644 index 0000000..275fa4c --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsDailyUpload.h @@ -0,0 +1,112 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsDailyUpload.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsDailyUpload (0 custom class methods, 11 custom properties) +// GTLAnalyticsDailyUploadParentLink (0 custom class methods, 2 custom properties) +// GTLAnalyticsDailyUploadRecentChangesItem (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsDailyUploadParentLink; +@class GTLAnalyticsDailyUploadRecentChangesItem; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsDailyUpload +// + +// Metadata for daily upload entity. + +@interface GTLAnalyticsDailyUpload : GTLObject + +// Account ID to which this daily upload belongs. +@property (copy) NSString *accountId; + +// Number of appends for this date. +@property (retain) NSNumber *appendCount; // intValue + +// Time this daily upload was created. +@property (retain) GTLDateTime *createdTime; + +// Custom data source ID to which this daily upload belongs. +@property (copy) NSString *customDataSourceId; + +// Date associated with daily upload. +@property (copy) NSString *date; + +// Resource type for Analytics daily upload. +@property (copy) NSString *kind; + +// Time this daily upload was last modified. +@property (retain) GTLDateTime *modifiedTime; + +// Parent link for a daily upload. Points to the custom data source to which +// this daily upload belongs. +@property (retain) GTLAnalyticsDailyUploadParentLink *parentLink; + +// Change log for last 10 changes in chronological order. +@property (retain) NSArray *recentChanges; // of GTLAnalyticsDailyUploadRecentChangesItem + +// Link for this daily upload. +@property (copy) NSString *selfLink; + +// Web property ID of the form UA-XXXXX-YY to which this daily upload belongs. +@property (copy) NSString *webPropertyId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsDailyUploadParentLink +// + +@interface GTLAnalyticsDailyUploadParentLink : GTLObject + +// Link to the custom data source to which this daily upload belongs. +@property (copy) NSString *href; + +// Value is "analytics#customDataSource". +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsDailyUploadRecentChangesItem +// + +@interface GTLAnalyticsDailyUploadRecentChangesItem : GTLObject +@property (copy) NSString *change; +@property (retain) GTLDateTime *time; +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsDailyUpload.m b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsDailyUpload.m new file mode 100644 index 0000000..433b03e --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsDailyUpload.m @@ -0,0 +1,75 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsDailyUpload.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsDailyUpload (0 custom class methods, 11 custom properties) +// GTLAnalyticsDailyUploadParentLink (0 custom class methods, 2 custom properties) +// GTLAnalyticsDailyUploadRecentChangesItem (0 custom class methods, 2 custom properties) + +#import "GTLAnalyticsDailyUpload.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsDailyUpload +// + +@implementation GTLAnalyticsDailyUpload +@dynamic accountId, appendCount, createdTime, customDataSourceId, date, kind, + modifiedTime, parentLink, recentChanges, selfLink, webPropertyId; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAnalyticsDailyUploadRecentChangesItem class] + forKey:@"recentChanges"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#dailyUpload"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsDailyUploadParentLink +// + +@implementation GTLAnalyticsDailyUploadParentLink +@dynamic href, type; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsDailyUploadRecentChangesItem +// + +@implementation GTLAnalyticsDailyUploadRecentChangesItem +@dynamic change, time; +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsDailyUploadAppend.h b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsDailyUploadAppend.h new file mode 100644 index 0000000..3cebe61 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsDailyUploadAppend.h @@ -0,0 +1,67 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsDailyUploadAppend.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsDailyUploadAppend (0 custom class methods, 7 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsDailyUploadAppend +// + +// Metadata returned for a successful append operation. + +@interface GTLAnalyticsDailyUploadAppend : GTLObject + +// Account Id to which this daily upload append belongs. +@property (copy) NSString *accountId; + +// Append number. +@property (retain) NSNumber *appendNumber; // intValue + +// Custom data source Id to which this daily upload append belongs. +@property (copy) NSString *customDataSourceId; + +// Date associated with daily upload append. +@property (copy) NSString *date; + +// Resource type for Analytics daily upload append. +@property (copy) NSString *kind; + +@property (copy) NSString *nextAppendLink; + +// Web property Id of the form UA-XXXXX-YY to which this daily upload append +// belongs. +@property (copy) NSString *webPropertyId; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsDailyUploadAppend.m b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsDailyUploadAppend.m new file mode 100644 index 0000000..0f41310 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsDailyUploadAppend.m @@ -0,0 +1,46 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsDailyUploadAppend.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsDailyUploadAppend (0 custom class methods, 7 custom properties) + +#import "GTLAnalyticsDailyUploadAppend.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsDailyUploadAppend +// + +@implementation GTLAnalyticsDailyUploadAppend +@dynamic accountId, appendNumber, customDataSourceId, date, kind, + nextAppendLink, webPropertyId; + ++ (void)load { + [self registerObjectClassForKind:@"analytics#dailyUploadAppend"]; +} + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsDailyUploads.h b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsDailyUploads.h new file mode 100644 index 0000000..0c54b5a --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsDailyUploads.h @@ -0,0 +1,82 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsDailyUploads.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsDailyUploads (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsDailyUpload; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsDailyUploads +// + +// A daily upload collection lists Analytics daily uploads to which the user has +// access. Each resource in the collection corresponds to a single Analytics +// daily upload. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAnalyticsDailyUploads : GTLCollectionObject + +// A collection of daily uploads. +@property (retain) NSArray *items; // of GTLAnalyticsDailyUpload + +// The maximum number of resources the response can contain, regardless of the +// actual number of resources returned. Its value ranges from 1 to 1000 with a +// value of 1000 by default, or otherwise specified by the max-results query +// parameter. +@property (retain) NSNumber *itemsPerPage; // intValue + +// Collection type. Value is analytics#dailyUploads. +@property (copy) NSString *kind; + +// Link to next page for this daily upload collection. +@property (copy) NSString *nextLink; + +// Link to previous page for this daily upload collection. +@property (copy) NSString *previousLink; + +// The starting index of the resources, which is 1 by default or otherwise +// specified by the start-index query parameter. +@property (retain) NSNumber *startIndex; // intValue + +// The total number of results for the query, regardless of the number of +// results in the response. +@property (retain) NSNumber *totalResults; // intValue + +// Email ID of the authenticated user +@property (copy) NSString *username; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsDailyUploads.m b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsDailyUploads.m new file mode 100644 index 0000000..84ce5b7 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsDailyUploads.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsDailyUploads.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsDailyUploads (0 custom class methods, 8 custom properties) + +#import "GTLAnalyticsDailyUploads.h" + +#import "GTLAnalyticsDailyUpload.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsDailyUploads +// + +@implementation GTLAnalyticsDailyUploads +@dynamic items, itemsPerPage, kind, nextLink, previousLink, startIndex, + totalResults, username; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAnalyticsDailyUpload class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#dailyUploads"]; +} + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsGaData.h b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsGaData.h new file mode 100644 index 0000000..65b0490 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsGaData.h @@ -0,0 +1,205 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsGaData.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsGaData (0 custom class methods, 13 custom properties) +// GTLAnalyticsGaDataColumnHeadersItem (0 custom class methods, 3 custom properties) +// GTLAnalyticsGaDataProfileInfo (0 custom class methods, 6 custom properties) +// GTLAnalyticsGaDataQuery (0 custom class methods, 10 custom properties) +// GTLAnalyticsGaDataTotalsForAllResults (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsGaDataColumnHeadersItem; +@class GTLAnalyticsGaDataProfileInfo; +@class GTLAnalyticsGaDataQuery; +@class GTLAnalyticsGaDataTotalsForAllResults; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGaData +// + +// Analytics data for a given profile. + +@interface GTLAnalyticsGaData : GTLObject + +// Column headers that list dimension names followed by the metric names. The +// order of dimensions and metrics is same as specified in the request. +@property (retain) NSArray *columnHeaders; // of GTLAnalyticsGaDataColumnHeadersItem + +// Determines if Analytics data contains samples. +@property (retain) NSNumber *containsSampledData; // boolValue + +// Unique ID for this data response. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The maximum number of rows the response can contain, regardless of the actual +// number of rows returned. Its value ranges from 1 to 10,000 with a value of +// 1000 by default, or otherwise specified by the max-results query parameter. +@property (retain) NSNumber *itemsPerPage; // intValue + +// Resource type. +@property (copy) NSString *kind; + +// Link to next page for this Analytics data query. +@property (copy) NSString *nextLink; + +// Link to previous page for this Analytics data query. +@property (copy) NSString *previousLink; + +// Information for the profile, for which the Analytics data was requested. +@property (retain) GTLAnalyticsGaDataProfileInfo *profileInfo; + +// Analytics data request query parameters. +@property (retain) GTLAnalyticsGaDataQuery *query; + +// Analytics data rows, where each row contains a list of dimension values +// followed by the metric values. The order of dimensions and metrics is same as +// specified in the request. +@property (retain) NSArray *rows; // of NSArray of NSString + +// Link to this page. +@property (copy) NSString *selfLink; + +// The total number of rows for the query, regardless of the number of rows in +// the response. +@property (retain) NSNumber *totalResults; // intValue + +// Total values for the requested metrics over all the results, not just the +// results returned in this response. The order of the metric totals is same as +// the metric order specified in the request. +@property (retain) GTLAnalyticsGaDataTotalsForAllResults *totalsForAllResults; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGaDataColumnHeadersItem +// + +@interface GTLAnalyticsGaDataColumnHeadersItem : GTLObject + +// Column Type. Either DIMENSION or METRIC. +@property (copy) NSString *columnType; + +// Data type. Dimension column headers have only STRING as the data type. Metric +// column headers have data types for metric values such as INTEGER, DOUBLE, +// CURRENCY etc. +@property (copy) NSString *dataType; + +// Column name. +@property (copy) NSString *name; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGaDataProfileInfo +// + +@interface GTLAnalyticsGaDataProfileInfo : GTLObject + +// Account ID to which this profile belongs. +@property (copy) NSString *accountId; + +// Internal ID for the web property to which this profile belongs. +@property (copy) NSString *internalWebPropertyId; + +// Profile ID. +@property (copy) NSString *profileId; + +// Profile name. +@property (copy) NSString *profileName; + +// Table ID for profile. +@property (copy) NSString *tableId; + +// Web Property ID to which this profile belongs. +@property (copy) NSString *webPropertyId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGaDataQuery +// + +@interface GTLAnalyticsGaDataQuery : GTLObject + +// List of analytics dimensions. +@property (copy) NSString *dimensions; + +// End date. +@property (copy) NSString *endDate; + +// Comma-separated list of dimension or metric filters. +@property (copy) NSString *filters; + +// Unique table ID. +@property (copy) NSString *ids; + +// Maximum results per page. +@property (retain) NSNumber *maxResults; // intValue + +// List of analytics metrics. +@property (retain) NSArray *metrics; // of NSString + +// Analytics advanced segment. +@property (copy) NSString *segment; + +// List of dimensions or metrics based on which Analytics data is sorted. +@property (retain) NSArray *sort; // of NSString + +// Start date. +@property (copy) NSString *startDate; + +// Start index. +@property (retain) NSNumber *startIndex; // intValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGaDataTotalsForAllResults +// + +@interface GTLAnalyticsGaDataTotalsForAllResults : GTLObject +// This object is documented as having more properties that are NSString. Use +// -additionalJSONKeys and -additionalPropertyForName: to get the list of +// properties and then fetch them; or -additionalProperties to fetch them all at +// once. +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsGaData.m b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsGaData.m new file mode 100644 index 0000000..c674db0 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsGaData.m @@ -0,0 +1,134 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsGaData.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsGaData (0 custom class methods, 13 custom properties) +// GTLAnalyticsGaDataColumnHeadersItem (0 custom class methods, 3 custom properties) +// GTLAnalyticsGaDataProfileInfo (0 custom class methods, 6 custom properties) +// GTLAnalyticsGaDataQuery (0 custom class methods, 10 custom properties) +// GTLAnalyticsGaDataTotalsForAllResults (0 custom class methods, 0 custom properties) + +#import "GTLAnalyticsGaData.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGaData +// + +@implementation GTLAnalyticsGaData +@dynamic columnHeaders, containsSampledData, identifier, itemsPerPage, kind, + nextLink, previousLink, profileInfo, query, rows, selfLink, + totalResults, totalsForAllResults; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLAnalyticsGaDataColumnHeadersItem class], @"columnHeaders", + [NSString class], @"rows", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#gaData"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGaDataColumnHeadersItem +// + +@implementation GTLAnalyticsGaDataColumnHeadersItem +@dynamic columnType, dataType, name; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGaDataProfileInfo +// + +@implementation GTLAnalyticsGaDataProfileInfo +@dynamic accountId, internalWebPropertyId, profileId, profileName, tableId, + webPropertyId; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGaDataQuery +// + +@implementation GTLAnalyticsGaDataQuery +@dynamic dimensions, endDate, filters, ids, maxResults, metrics, segment, sort, + startDate, startIndex; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"end-date", @"endDate", + @"max-results", @"maxResults", + @"start-date", @"startDate", + @"start-index", @"startIndex", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"metrics", + [NSString class], @"sort", + nil]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGaDataTotalsForAllResults +// + +@implementation GTLAnalyticsGaDataTotalsForAllResults + ++ (Class)classForAdditionalProperties { + return [NSString class]; +} + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsGoal.h b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsGoal.h new file mode 100644 index 0000000..f197092 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsGoal.h @@ -0,0 +1,254 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsGoal.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsGoal (0 custom class methods, 18 custom properties) +// GTLAnalyticsGoalEventDetails (0 custom class methods, 2 custom properties) +// GTLAnalyticsGoalParentLink (0 custom class methods, 2 custom properties) +// GTLAnalyticsGoalUrlDestinationDetails (0 custom class methods, 5 custom properties) +// GTLAnalyticsGoalVisitNumPagesDetails (0 custom class methods, 2 custom properties) +// GTLAnalyticsGoalVisitTimeOnSiteDetails (0 custom class methods, 2 custom properties) +// GTLAnalyticsGoalEventDetailsEventConditionsItem (0 custom class methods, 5 custom properties) +// GTLAnalyticsGoalUrlDestinationDetailsStepsItem (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsGoalEventDetails; +@class GTLAnalyticsGoalEventDetailsEventConditionsItem; +@class GTLAnalyticsGoalParentLink; +@class GTLAnalyticsGoalUrlDestinationDetails; +@class GTLAnalyticsGoalUrlDestinationDetailsStepsItem; +@class GTLAnalyticsGoalVisitNumPagesDetails; +@class GTLAnalyticsGoalVisitTimeOnSiteDetails; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoal +// + +// JSON template for Analytics goal resource. + +@interface GTLAnalyticsGoal : GTLObject + +// Account ID to which this goal belongs. +@property (copy) NSString *accountId; + +// Determines whether this goal is active. +@property (retain) NSNumber *active; // boolValue + +// Time this goal was created. +@property (retain) GTLDateTime *created; + +// Details for the goal of the type EVENT. +@property (retain) GTLAnalyticsGoalEventDetails *eventDetails; + +// Goal ID. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Internal ID for the web property to which this goal belongs. +@property (copy) NSString *internalWebPropertyId; + +// Resource type for an Analytics goal. +@property (copy) NSString *kind; + +// Goal name. +@property (copy) NSString *name; + +// Parent link for a goal. Points to the profile to which this goal belongs. +@property (retain) GTLAnalyticsGoalParentLink *parentLink; + +// Profile ID to which this goal belongs. +@property (copy) NSString *profileId; + +// Link for this goal. +@property (copy) NSString *selfLink; + +// Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, +// VISIT_NUM_PAGES, AND EVENT. +@property (copy) NSString *type; + +// Time this goal was last modified. +@property (retain) GTLDateTime *updated; + +// Details for the goal of the type URL_DESTINATION. +@property (retain) GTLAnalyticsGoalUrlDestinationDetails *urlDestinationDetails; + +// Goal value. +@property (retain) NSNumber *value; // floatValue + +// Details for the goal of the type VISIT_NUM_PAGES. +@property (retain) GTLAnalyticsGoalVisitNumPagesDetails *visitNumPagesDetails; + +// Details for the goal of the type VISIT_TIME_ON_SITE. +@property (retain) GTLAnalyticsGoalVisitTimeOnSiteDetails *visitTimeOnSiteDetails; + +// Web property ID to which this goal belongs. The web property ID is of the +// form UA-XXXXX-YY. +@property (copy) NSString *webPropertyId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalEventDetails +// + +@interface GTLAnalyticsGoalEventDetails : GTLObject + +// List of event conditions. +@property (retain) NSArray *eventConditions; // of GTLAnalyticsGoalEventDetailsEventConditionsItem + +// Determines if the event value should be used as the value for this goal. +@property (retain) NSNumber *useEventValue; // boolValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalParentLink +// + +@interface GTLAnalyticsGoalParentLink : GTLObject + +// Link to the profile to which this goal belongs. +@property (copy) NSString *href; + +// Value is "analytics#profile". +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalUrlDestinationDetails +// + +@interface GTLAnalyticsGoalUrlDestinationDetails : GTLObject + +// Determines if the goal URL must exactly match the capitalization of visited +// URLs. +@property (retain) NSNumber *caseSensitive; // boolValue + +// Determines if the first step in this goal is required. +@property (retain) NSNumber *firstStepRequired; // boolValue + +// Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX. +@property (copy) NSString *matchType; + +// List of steps configured for this goal funnel. +@property (retain) NSArray *steps; // of GTLAnalyticsGoalUrlDestinationDetailsStepsItem + +// URL for this goal. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalVisitNumPagesDetails +// + +@interface GTLAnalyticsGoalVisitNumPagesDetails : GTLObject + +// Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL. +@property (copy) NSString *comparisonType; + +// Value used for this comparison. +@property (retain) NSNumber *comparisonValue; // longLongValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalVisitTimeOnSiteDetails +// + +@interface GTLAnalyticsGoalVisitTimeOnSiteDetails : GTLObject + +// Type of comparison. Possible values are LESS_THAN or GREATER_THAN. +@property (copy) NSString *comparisonType; + +// Value used for this comparison. +@property (retain) NSNumber *comparisonValue; // longLongValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalEventDetailsEventConditionsItem +// + +@interface GTLAnalyticsGoalEventDetailsEventConditionsItem : GTLObject + +// Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL. +@property (copy) NSString *comparisonType; + +// Value used for this comparison. +@property (retain) NSNumber *comparisonValue; // longLongValue + +// Expression used for this match. +@property (copy) NSString *expression; + +// Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, +// or EXACT. +@property (copy) NSString *matchType; + +// Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or +// VALUE. +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalUrlDestinationDetailsStepsItem +// + +@interface GTLAnalyticsGoalUrlDestinationDetailsStepsItem : GTLObject + +// Step name. +@property (copy) NSString *name; + +// Step number. +@property (retain) NSNumber *number; // intValue + +// URL for this step. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsGoal.m b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsGoal.m new file mode 100644 index 0000000..adecff4 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsGoal.m @@ -0,0 +1,148 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsGoal.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsGoal (0 custom class methods, 18 custom properties) +// GTLAnalyticsGoalEventDetails (0 custom class methods, 2 custom properties) +// GTLAnalyticsGoalParentLink (0 custom class methods, 2 custom properties) +// GTLAnalyticsGoalUrlDestinationDetails (0 custom class methods, 5 custom properties) +// GTLAnalyticsGoalVisitNumPagesDetails (0 custom class methods, 2 custom properties) +// GTLAnalyticsGoalVisitTimeOnSiteDetails (0 custom class methods, 2 custom properties) +// GTLAnalyticsGoalEventDetailsEventConditionsItem (0 custom class methods, 5 custom properties) +// GTLAnalyticsGoalUrlDestinationDetailsStepsItem (0 custom class methods, 3 custom properties) + +#import "GTLAnalyticsGoal.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoal +// + +@implementation GTLAnalyticsGoal +@dynamic accountId, active, created, eventDetails, identifier, + internalWebPropertyId, kind, name, parentLink, profileId, selfLink, + type, updated, urlDestinationDetails, value, visitNumPagesDetails, + visitTimeOnSiteDetails, webPropertyId; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#goal"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalEventDetails +// + +@implementation GTLAnalyticsGoalEventDetails +@dynamic eventConditions, useEventValue; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAnalyticsGoalEventDetailsEventConditionsItem class] + forKey:@"eventConditions"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalParentLink +// + +@implementation GTLAnalyticsGoalParentLink +@dynamic href, type; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalUrlDestinationDetails +// + +@implementation GTLAnalyticsGoalUrlDestinationDetails +@dynamic caseSensitive, firstStepRequired, matchType, steps, url; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAnalyticsGoalUrlDestinationDetailsStepsItem class] + forKey:@"steps"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalVisitNumPagesDetails +// + +@implementation GTLAnalyticsGoalVisitNumPagesDetails +@dynamic comparisonType, comparisonValue; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalVisitTimeOnSiteDetails +// + +@implementation GTLAnalyticsGoalVisitTimeOnSiteDetails +@dynamic comparisonType, comparisonValue; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalEventDetailsEventConditionsItem +// + +@implementation GTLAnalyticsGoalEventDetailsEventConditionsItem +@dynamic comparisonType, comparisonValue, expression, matchType, type; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoalUrlDestinationDetailsStepsItem +// + +@implementation GTLAnalyticsGoalUrlDestinationDetailsStepsItem +@dynamic name, number, url; +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsGoals.h b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsGoals.h new file mode 100644 index 0000000..d2a8073 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsGoals.h @@ -0,0 +1,82 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsGoals.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsGoals (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsGoal; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoals +// + +// A goal collection lists Analytics goals to which the user has access. Each +// profile can have a set of goals. Each resource in the Goal collection +// corresponds to a single Analytics goal. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAnalyticsGoals : GTLCollectionObject + +// A list of goals. +@property (retain) NSArray *items; // of GTLAnalyticsGoal + +// The maximum number of resources the response can contain, regardless of the +// actual number of resources returned. Its value ranges from 1 to 1000 with a +// value of 1000 by default, or otherwise specified by the max-results query +// parameter. +@property (retain) NSNumber *itemsPerPage; // intValue + +// Collection type. +@property (copy) NSString *kind; + +// Link to next page for this goal collection. +@property (copy) NSString *nextLink; + +// Link to previous page for this goal collection. +@property (copy) NSString *previousLink; + +// The starting index of the resources, which is 1 by default or otherwise +// specified by the start-index query parameter. +@property (retain) NSNumber *startIndex; // intValue + +// The total number of results for the query, regardless of the number of +// resources in the result. +@property (retain) NSNumber *totalResults; // intValue + +// Email ID of the authenticated user +@property (copy) NSString *username; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsGoals.m b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsGoals.m new file mode 100644 index 0000000..fd89420 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsGoals.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsGoals.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsGoals (0 custom class methods, 8 custom properties) + +#import "GTLAnalyticsGoals.h" + +#import "GTLAnalyticsGoal.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsGoals +// + +@implementation GTLAnalyticsGoals +@dynamic items, itemsPerPage, kind, nextLink, previousLink, startIndex, + totalResults, username; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAnalyticsGoal class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#goals"]; +} + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsMcfData.h b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsMcfData.h new file mode 100644 index 0000000..9bdd961 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsMcfData.h @@ -0,0 +1,241 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsMcfData.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsMcfData (0 custom class methods, 13 custom properties) +// GTLAnalyticsMcfDataColumnHeadersItem (0 custom class methods, 3 custom properties) +// GTLAnalyticsMcfDataProfileInfo (0 custom class methods, 6 custom properties) +// GTLAnalyticsMcfDataQuery (0 custom class methods, 10 custom properties) +// GTLAnalyticsMcfDataRowsItem (0 custom class methods, 2 custom properties) +// GTLAnalyticsMcfDataTotalsForAllResults (0 custom class methods, 0 custom properties) +// GTLAnalyticsMcfDataRowsItemConversionPathValueItem (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsMcfDataColumnHeadersItem; +@class GTLAnalyticsMcfDataProfileInfo; +@class GTLAnalyticsMcfDataQuery; +@class GTLAnalyticsMcfDataRowsItem; +@class GTLAnalyticsMcfDataRowsItemConversionPathValueItem; +@class GTLAnalyticsMcfDataTotalsForAllResults; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfData +// + +// Multi-Channel Funnels data for a given profile. + +@interface GTLAnalyticsMcfData : GTLObject + +// Column headers that list dimension names followed by the metric names. The +// order of dimensions and metrics is same as specified in the request. +@property (retain) NSArray *columnHeaders; // of GTLAnalyticsMcfDataColumnHeadersItem + +// Determines if the Analytics data contains sampled data. +@property (retain) NSNumber *containsSampledData; // boolValue + +// Unique ID for this data response. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The maximum number of rows the response can contain, regardless of the actual +// number of rows returned. Its value ranges from 1 to 10,000 with a value of +// 1000 by default, or otherwise specified by the max-results query parameter. +@property (retain) NSNumber *itemsPerPage; // intValue + +// Resource type. +@property (copy) NSString *kind; + +// Link to next page for this Analytics data query. +@property (copy) NSString *nextLink; + +// Link to previous page for this Analytics data query. +@property (copy) NSString *previousLink; + +// Information for the profile, for which the Analytics data was requested. +@property (retain) GTLAnalyticsMcfDataProfileInfo *profileInfo; + +// Analytics data request query parameters. +@property (retain) GTLAnalyticsMcfDataQuery *query; + +// Analytics data rows, where each row contains a list of dimension values +// followed by the metric values. The order of dimensions and metrics is same as +// specified in the request. +@property (retain) NSArray *rows; // of NSArray of GTLAnalyticsMcfDataRowsItem + +// Link to this page. +@property (copy) NSString *selfLink; + +// The total number of rows for the query, regardless of the number of rows in +// the response. +@property (retain) NSNumber *totalResults; // intValue + +// Total values for the requested metrics over all the results, not just the +// results returned in this response. The order of the metric totals is same as +// the metric order specified in the request. +@property (retain) GTLAnalyticsMcfDataTotalsForAllResults *totalsForAllResults; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfDataColumnHeadersItem +// + +@interface GTLAnalyticsMcfDataColumnHeadersItem : GTLObject + +// Column Type. Either DIMENSION or METRIC. +@property (copy) NSString *columnType; + +// Data type. Dimension and metric values data types such as INTEGER, DOUBLE, +// CURRENCY, MCF_SEQUENCE etc. +@property (copy) NSString *dataType; + +// Column name. +@property (copy) NSString *name; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfDataProfileInfo +// + +@interface GTLAnalyticsMcfDataProfileInfo : GTLObject + +// Account ID to which this profile belongs. +@property (copy) NSString *accountId; + +// Internal ID for the web property to which this profile belongs. +@property (copy) NSString *internalWebPropertyId; + +// Profile ID. +@property (copy) NSString *profileId; + +// Profile name. +@property (copy) NSString *profileName; + +// Table ID for profile. +@property (copy) NSString *tableId; + +// Web Property ID to which this profile belongs. +@property (copy) NSString *webPropertyId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfDataQuery +// + +@interface GTLAnalyticsMcfDataQuery : GTLObject + +// List of analytics dimensions. +@property (copy) NSString *dimensions; + +// End date. +@property (copy) NSString *endDate; + +// Comma-separated list of dimension or metric filters. +@property (copy) NSString *filters; + +// Unique table ID. +@property (copy) NSString *ids; + +// Maximum results per page. +@property (retain) NSNumber *maxResults; // intValue + +// List of analytics metrics. +@property (retain) NSArray *metrics; // of NSString + +// Analytics advanced segment. +@property (copy) NSString *segment; + +// List of dimensions or metrics based on which Analytics data is sorted. +@property (retain) NSArray *sort; // of NSString + +// Start date. +@property (copy) NSString *startDate; + +// Start index. +@property (retain) NSNumber *startIndex; // intValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfDataRowsItem +// + +@interface GTLAnalyticsMcfDataRowsItem : GTLObject + +// A conversion path dimension value, containing a list of interactions with +// their attributes. +@property (retain) NSArray *conversionPathValue; // of GTLAnalyticsMcfDataRowsItemConversionPathValueItem + +// A primitive dimension value. A primitive metric value. +@property (copy) NSString *primitiveValue; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfDataTotalsForAllResults +// + +@interface GTLAnalyticsMcfDataTotalsForAllResults : GTLObject +// This object is documented as having more properties that are NSString. Use +// -additionalJSONKeys and -additionalPropertyForName: to get the list of +// properties and then fetch them; or -additionalProperties to fetch them all at +// once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfDataRowsItemConversionPathValueItem +// + +@interface GTLAnalyticsMcfDataRowsItemConversionPathValueItem : GTLObject + +// Type of an interaction on conversion path. Such as CLICK, IMPRESSION etc. +@property (copy) NSString *interactionType; + +// Node value of an interaction on conversion path. Such as source, medium etc. +@property (copy) NSString *nodeValue; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsMcfData.m b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsMcfData.m new file mode 100644 index 0000000..3f966a7 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsMcfData.m @@ -0,0 +1,164 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsMcfData.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsMcfData (0 custom class methods, 13 custom properties) +// GTLAnalyticsMcfDataColumnHeadersItem (0 custom class methods, 3 custom properties) +// GTLAnalyticsMcfDataProfileInfo (0 custom class methods, 6 custom properties) +// GTLAnalyticsMcfDataQuery (0 custom class methods, 10 custom properties) +// GTLAnalyticsMcfDataRowsItem (0 custom class methods, 2 custom properties) +// GTLAnalyticsMcfDataTotalsForAllResults (0 custom class methods, 0 custom properties) +// GTLAnalyticsMcfDataRowsItemConversionPathValueItem (0 custom class methods, 2 custom properties) + +#import "GTLAnalyticsMcfData.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfData +// + +@implementation GTLAnalyticsMcfData +@dynamic columnHeaders, containsSampledData, identifier, itemsPerPage, kind, + nextLink, previousLink, profileInfo, query, rows, selfLink, + totalResults, totalsForAllResults; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLAnalyticsMcfDataColumnHeadersItem class], @"columnHeaders", + [GTLAnalyticsMcfDataRowsItem class], @"rows", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#mcfData"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfDataColumnHeadersItem +// + +@implementation GTLAnalyticsMcfDataColumnHeadersItem +@dynamic columnType, dataType, name; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfDataProfileInfo +// + +@implementation GTLAnalyticsMcfDataProfileInfo +@dynamic accountId, internalWebPropertyId, profileId, profileName, tableId, + webPropertyId; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfDataQuery +// + +@implementation GTLAnalyticsMcfDataQuery +@dynamic dimensions, endDate, filters, ids, maxResults, metrics, segment, sort, + startDate, startIndex; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"end-date", @"endDate", + @"max-results", @"maxResults", + @"start-date", @"startDate", + @"start-index", @"startIndex", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"metrics", + [NSString class], @"sort", + nil]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfDataRowsItem +// + +@implementation GTLAnalyticsMcfDataRowsItem +@dynamic conversionPathValue, primitiveValue; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAnalyticsMcfDataRowsItemConversionPathValueItem class] + forKey:@"conversionPathValue"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfDataTotalsForAllResults +// + +@implementation GTLAnalyticsMcfDataTotalsForAllResults + ++ (Class)classForAdditionalProperties { + return [NSString class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsMcfDataRowsItemConversionPathValueItem +// + +@implementation GTLAnalyticsMcfDataRowsItemConversionPathValueItem +@dynamic interactionType, nodeValue; +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsProfile.h b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsProfile.h new file mode 100644 index 0000000..fd031b3 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsProfile.h @@ -0,0 +1,145 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsProfile.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsProfile (0 custom class methods, 20 custom properties) +// GTLAnalyticsProfileChildLink (0 custom class methods, 2 custom properties) +// GTLAnalyticsProfileParentLink (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsProfileChildLink; +@class GTLAnalyticsProfileParentLink; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsProfile +// + +// JSON template for an Analytics profile. + +@interface GTLAnalyticsProfile : GTLObject + +// Account ID to which this profile belongs. +@property (copy) NSString *accountId; + +// Child link for this profile. Points to the list of goals for this profile. +@property (retain) GTLAnalyticsProfileChildLink *childLink; + +// Time this profile was created. +@property (retain) GTLDateTime *created; + +// The currency type associated with this profile. +@property (copy) NSString *currency; + +// Default page for this profile. +@property (copy) NSString *defaultPage; + +// E-commerce tracking parameter for this profile. +@property (retain) NSNumber *eCommerceTracking; // boolValue + +// The query parameters that are excluded from this profile. +@property (copy) NSString *excludeQueryParameters; + +// Profile ID. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Internal ID for the web property to which this profile belongs. +@property (copy) NSString *internalWebPropertyId; + +// Resource type for Analytics profile. +@property (copy) NSString *kind; + +// Name of this profile. +@property (copy) NSString *name; + +// Parent link for this profile. Points to the web property to which this +// profile belongs. +@property (retain) GTLAnalyticsProfileParentLink *parentLink; + +// Link for this profile. +@property (copy) NSString *selfLink; + +// Site search category parameters for this profile. +@property (copy) NSString *siteSearchCategoryParameters; + +// The site search query parameters for this profile. +@property (copy) NSString *siteSearchQueryParameters; + +// Time zone for which this profile has been configured. +@property (copy) NSString *timezone; + +// Profile type. Supported types: WEB or APP. +@property (copy) NSString *type; + +// Time this profile was last modified. +@property (retain) GTLDateTime *updated; + +// Web property ID of the form UA-XXXXX-YY to which this profile belongs. +@property (copy) NSString *webPropertyId; + +// Website URL for this profile. +@property (copy) NSString *websiteUrl; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsProfileChildLink +// + +@interface GTLAnalyticsProfileChildLink : GTLObject + +// Link to the list of goals for this profile. +@property (copy) NSString *href; + +// Value is "analytics#goals". +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsProfileParentLink +// + +@interface GTLAnalyticsProfileParentLink : GTLObject + +// Link to the web property to which this profile belongs. +@property (copy) NSString *href; + +// Value is "analytics#webproperty". +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsProfile.m b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsProfile.m new file mode 100644 index 0000000..5c45568 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsProfile.m @@ -0,0 +1,78 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsProfile.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsProfile (0 custom class methods, 20 custom properties) +// GTLAnalyticsProfileChildLink (0 custom class methods, 2 custom properties) +// GTLAnalyticsProfileParentLink (0 custom class methods, 2 custom properties) + +#import "GTLAnalyticsProfile.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsProfile +// + +@implementation GTLAnalyticsProfile +@dynamic accountId, childLink, created, currency, defaultPage, + eCommerceTracking, excludeQueryParameters, identifier, + internalWebPropertyId, kind, name, parentLink, selfLink, + siteSearchCategoryParameters, siteSearchQueryParameters, timezone, + type, updated, webPropertyId, websiteUrl; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#profile"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsProfileChildLink +// + +@implementation GTLAnalyticsProfileChildLink +@dynamic href, type; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsProfileParentLink +// + +@implementation GTLAnalyticsProfileParentLink +@dynamic href, type; +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsProfiles.h b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsProfiles.h new file mode 100644 index 0000000..0957de8 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsProfiles.h @@ -0,0 +1,81 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsProfiles.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsProfiles (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsProfile; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsProfiles +// + +// A profile collection lists Analytics profiles to which the user has access. +// Each resource in the collection corresponds to a single Analytics profile. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAnalyticsProfiles : GTLCollectionObject + +// A list of profiles. +@property (retain) NSArray *items; // of GTLAnalyticsProfile + +// The maximum number of resources the response can contain, regardless of the +// actual number of resources returned. Its value ranges from 1 to 1000 with a +// value of 1000 by default, or otherwise specified by the max-results query +// parameter. +@property (retain) NSNumber *itemsPerPage; // intValue + +// Collection type. +@property (copy) NSString *kind; + +// Link to next page for this profile collection. +@property (copy) NSString *nextLink; + +// Link to previous page for this profile collection. +@property (copy) NSString *previousLink; + +// The starting index of the resources, which is 1 by default or otherwise +// specified by the start-index query parameter. +@property (retain) NSNumber *startIndex; // intValue + +// The total number of results for the query, regardless of the number of +// results in the response. +@property (retain) NSNumber *totalResults; // intValue + +// Email ID of the authenticated user +@property (copy) NSString *username; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsProfiles.m b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsProfiles.m new file mode 100644 index 0000000..930f6a0 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsProfiles.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsProfiles.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsProfiles (0 custom class methods, 8 custom properties) + +#import "GTLAnalyticsProfiles.h" + +#import "GTLAnalyticsProfile.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsProfiles +// + +@implementation GTLAnalyticsProfiles +@dynamic items, itemsPerPage, kind, nextLink, previousLink, startIndex, + totalResults, username; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAnalyticsProfile class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#profiles"]; +} + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsSegment.h b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsSegment.h new file mode 100644 index 0000000..c0d56ea --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsSegment.h @@ -0,0 +1,71 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsSegment.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsSegment (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsSegment +// + +// JSON template for an Analytics advanced segment. + +@interface GTLAnalyticsSegment : GTLObject + +// Time the advanced segment was created. +@property (retain) GTLDateTime *created; + +// Advanced segment definition. +@property (copy) NSString *definition; + +// Advanced segment ID. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Resource type for Analytics advanced segment. +@property (copy) NSString *kind; + +// Advanced segment name. +@property (copy) NSString *name; + +// Segment ID. Can be used with the 'segment' parameter in Data Feed. +@property (copy) NSString *segmentId; + +// Link for this advanced segment. +@property (copy) NSString *selfLink; + +// Time the advanced segment was last modified. +@property (retain) GTLDateTime *updated; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsSegment.m b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsSegment.m new file mode 100644 index 0000000..c03a772 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsSegment.m @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsSegment.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsSegment (0 custom class methods, 8 custom properties) + +#import "GTLAnalyticsSegment.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsSegment +// + +@implementation GTLAnalyticsSegment +@dynamic created, definition, identifier, kind, name, segmentId, selfLink, + updated; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#segment"]; +} + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsSegments.h b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsSegments.h new file mode 100644 index 0000000..a70956c --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsSegments.h @@ -0,0 +1,82 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsSegments.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsSegments (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsSegment; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsSegments +// + +// An advanced segment collection lists Analytics advanced segments that the +// user has access to. Each resource in the collection corresponds to a single +// Analytics advanced segment. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAnalyticsSegments : GTLCollectionObject + +// A list of advanced segments. +@property (retain) NSArray *items; // of GTLAnalyticsSegment + +// The maximum number of resources the response can contain, regardless of the +// actual number of resources returned. Its value ranges from 1 to 1000 with a +// value of 1000 by default, or otherwise specified by the max-results query +// parameter. +@property (retain) NSNumber *itemsPerPage; // intValue + +// Collection type for advanced segments. +@property (copy) NSString *kind; + +// Link to next page for this advanced segment collection. +@property (copy) NSString *nextLink; + +// Link to previous page for this advanced segment collection. +@property (copy) NSString *previousLink; + +// The starting index of the resources, which is 1 by default or otherwise +// specified by the start-index query parameter. +@property (retain) NSNumber *startIndex; // intValue + +// The total number of results for the query, regardless of the number of +// results in the response. +@property (retain) NSNumber *totalResults; // intValue + +// Email ID of the authenticated user +@property (copy) NSString *username; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsSegments.m b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsSegments.m new file mode 100644 index 0000000..c87b817 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsSegments.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsSegments.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsSegments (0 custom class methods, 8 custom properties) + +#import "GTLAnalyticsSegments.h" + +#import "GTLAnalyticsSegment.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsSegments +// + +@implementation GTLAnalyticsSegments +@dynamic items, itemsPerPage, kind, nextLink, previousLink, startIndex, + totalResults, username; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAnalyticsSegment class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#segments"]; +} + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsWebproperties.h b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsWebproperties.h new file mode 100644 index 0000000..06116fe --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsWebproperties.h @@ -0,0 +1,82 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsWebproperties.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsWebproperties (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsWebproperty; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsWebproperties +// + +// A web property collection lists Analytics web properties to which the user +// has access. Each resource in the collection corresponds to a single Analytics +// web property. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLAnalyticsWebproperties : GTLCollectionObject + +// A list of web properties. +@property (retain) NSArray *items; // of GTLAnalyticsWebproperty + +// The maximum number of resources the response can contain, regardless of the +// actual number of resources returned. Its value ranges from 1 to 1000 with a +// value of 1000 by default, or otherwise specified by the max-results query +// parameter. +@property (retain) NSNumber *itemsPerPage; // intValue + +// Collection type. +@property (copy) NSString *kind; + +// Link to next page for this web property collection. +@property (copy) NSString *nextLink; + +// Link to previous page for this web property collection. +@property (copy) NSString *previousLink; + +// The starting index of the resources, which is 1 by default or otherwise +// specified by the start-index query parameter. +@property (retain) NSNumber *startIndex; // intValue + +// The total number of results for the query, regardless of the number of +// results in the response. +@property (retain) NSNumber *totalResults; // intValue + +// Email ID of the authenticated user +@property (copy) NSString *username; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsWebproperties.m b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsWebproperties.m new file mode 100644 index 0000000..a07a478 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsWebproperties.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsWebproperties.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsWebproperties (0 custom class methods, 8 custom properties) + +#import "GTLAnalyticsWebproperties.h" + +#import "GTLAnalyticsWebproperty.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsWebproperties +// + +@implementation GTLAnalyticsWebproperties +@dynamic items, itemsPerPage, kind, nextLink, previousLink, startIndex, + totalResults, username; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLAnalyticsWebproperty class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#webproperties"]; +} + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsWebproperty.h b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsWebproperty.h new file mode 100644 index 0000000..5817f4a --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsWebproperty.h @@ -0,0 +1,119 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsWebproperty.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsWebproperty (0 custom class methods, 11 custom properties) +// GTLAnalyticsWebpropertyChildLink (0 custom class methods, 2 custom properties) +// GTLAnalyticsWebpropertyParentLink (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLAnalyticsWebpropertyChildLink; +@class GTLAnalyticsWebpropertyParentLink; + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsWebproperty +// + +// JSON template for an Analytics web property. + +@interface GTLAnalyticsWebproperty : GTLObject + +// Account ID to which this web property belongs. +@property (copy) NSString *accountId; + +// Child link for this web property. Points to the list of profiles for this web +// property. +@property (retain) GTLAnalyticsWebpropertyChildLink *childLink; + +// Time this web property was created. +@property (retain) GTLDateTime *created; + +// Web property ID of the form UA-XXXXX-YY. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Internal ID for this web property. +@property (copy) NSString *internalWebPropertyId; + +// Resource type for Analytics WebProperty. +@property (copy) NSString *kind; + +// Name of this web property. +@property (copy) NSString *name; + +// Parent link for this web property. Points to the account to which this web +// property belongs. +@property (retain) GTLAnalyticsWebpropertyParentLink *parentLink; + +// Link for this web property. +@property (copy) NSString *selfLink; + +// Time this web property was last modified. +@property (retain) GTLDateTime *updated; + +// Website url for this web property. +@property (copy) NSString *websiteUrl; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsWebpropertyChildLink +// + +@interface GTLAnalyticsWebpropertyChildLink : GTLObject + +// Link to the list of profiles for this web property. +@property (copy) NSString *href; + +// Type of the parent link. Its value is "analytics#profiles". +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsWebpropertyParentLink +// + +@interface GTLAnalyticsWebpropertyParentLink : GTLObject + +// Link to the account for this web property. +@property (copy) NSString *href; + +// Type of the parent link. Its value is "analytics#account". +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalyticsWebproperty.m b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsWebproperty.m new file mode 100644 index 0000000..9b1f21c --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalyticsWebproperty.m @@ -0,0 +1,75 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalyticsWebproperty.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLAnalyticsWebproperty (0 custom class methods, 11 custom properties) +// GTLAnalyticsWebpropertyChildLink (0 custom class methods, 2 custom properties) +// GTLAnalyticsWebpropertyParentLink (0 custom class methods, 2 custom properties) + +#import "GTLAnalyticsWebproperty.h" + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsWebproperty +// + +@implementation GTLAnalyticsWebproperty +@dynamic accountId, childLink, created, identifier, internalWebPropertyId, kind, + name, parentLink, selfLink, updated, websiteUrl; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"analytics#webproperty"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsWebpropertyChildLink +// + +@implementation GTLAnalyticsWebpropertyChildLink +@dynamic href, type; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLAnalyticsWebpropertyParentLink +// + +@implementation GTLAnalyticsWebpropertyParentLink +@dynamic href, type; +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLAnalytics_Sources.m b/GTL/Source/Services/Analytics/Generated/GTLAnalytics_Sources.m new file mode 100644 index 0000000..3ee5483 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLAnalytics_Sources.m @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLAnalytics_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ + +#import "GTLAnalyticsConstants.m" + +#import "GTLAnalyticsAccount.m" +#import "GTLAnalyticsAccounts.m" +#import "GTLAnalyticsCustomDataSource.m" +#import "GTLAnalyticsCustomDataSources.m" +#import "GTLAnalyticsDailyUpload.m" +#import "GTLAnalyticsDailyUploadAppend.m" +#import "GTLAnalyticsDailyUploads.m" +#import "GTLAnalyticsGaData.m" +#import "GTLAnalyticsGoal.m" +#import "GTLAnalyticsGoals.m" +#import "GTLAnalyticsMcfData.m" +#import "GTLAnalyticsProfile.m" +#import "GTLAnalyticsProfiles.m" +#import "GTLAnalyticsSegment.m" +#import "GTLAnalyticsSegments.m" +#import "GTLAnalyticsWebproperties.m" +#import "GTLAnalyticsWebproperty.m" + +#import "GTLQueryAnalytics.m" +#import "GTLServiceAnalytics.m" diff --git a/GTL/Source/Services/Analytics/Generated/GTLQueryAnalytics.h b/GTL/Source/Services/Analytics/Generated/GTLQueryAnalytics.h new file mode 100644 index 0000000..c159744 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLQueryAnalytics.h @@ -0,0 +1,341 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryAnalytics.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLQueryAnalytics (11 custom class methods, 19 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@interface GTLQueryAnalytics : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *accountId; +@property (assign) NSInteger appendNumber; +@property (copy) NSString *customDataSourceId; +@property (copy) NSString *date; +@property (copy) NSString *dimensions; +@property (copy) NSString *endDate; +@property (copy) NSString *filters; +@property (copy) NSString *ids; +@property (assign) NSInteger maxResults; +@property (copy) NSString *metrics; +@property (copy) NSString *profileId; +@property (assign) BOOL reset; +@property (copy) NSString *segment; +@property (copy) NSString *sort; +@property (copy) NSString *startDate; +@property (assign) NSInteger startIndex; +@property (copy) NSString *type; +@property (copy) NSString *webPropertyId; + +#pragma mark - +#pragma mark "data.ga" methods +// These create a GTLQueryAnalytics object. + +// Method: analytics.data.ga.get +// Returns Analytics data for a profile. +// Required: +// ids: Unique table ID for retrieving Analytics data. Table ID is of the form +// ga:XXXX, where XXXX is the Analytics profile ID. +// startDate: Start date for fetching Analytics data. All requests should +// specify a start date formatted as YYYY-MM-DD. +// endDate: End date for fetching Analytics data. All requests should specify +// an end date formatted as YYYY-MM-DD. +// metrics: A comma-separated list of Analytics metrics. E.g., +// 'ga:visits,ga:pageviews'. At least one metric must be specified. +// Optional: +// dimensions: A comma-separated list of Analytics dimensions. E.g., +// 'ga:browser,ga:city'. +// filters: A comma-separated list of dimension or metric filters to be +// applied to Analytics data. +// maxResults: The maximum number of entries to include in this feed. +// segment: An Analytics advanced segment to be applied to data. +// sort: A comma-separated list of dimensions or metrics that determine the +// sort order for Analytics data. +// startIndex: An index of the first entity to retrieve. Use this parameter as +// a pagination mechanism along with the max-results parameter. +// Authorization scope(s): +// kGTLAuthScopeAnalytics +// kGTLAuthScopeAnalyticsReadonly +// Fetches a GTLAnalyticsGaData. ++ (id)queryForDataGaGetWithIds:(NSString *)ids + startDate:(NSString *)startDate + endDate:(NSString *)endDate + metrics:(NSString *)metrics; + +#pragma mark - +#pragma mark "data.mcf" methods +// These create a GTLQueryAnalytics object. + +// Method: analytics.data.mcf.get +// Returns Analytics Multi-Channel Funnels data for a profile. +// Required: +// ids: Unique table ID for retrieving Analytics data. Table ID is of the form +// ga:XXXX, where XXXX is the Analytics profile ID. +// startDate: Start date for fetching Analytics data. All requests should +// specify a start date formatted as YYYY-MM-DD. +// endDate: End date for fetching Analytics data. All requests should specify +// an end date formatted as YYYY-MM-DD. +// metrics: A comma-separated list of Multi-Channel Funnels metrics. E.g., +// 'mcf:totalConversions,mcf:totalConversionValue'. At least one metric must +// be specified. +// Optional: +// dimensions: A comma-separated list of Multi-Channel Funnels dimensions. +// E.g., 'mcf:source,mcf:medium'. +// filters: A comma-separated list of dimension or metric filters to be +// applied to the Analytics data. +// maxResults: The maximum number of entries to include in this feed. +// sort: A comma-separated list of dimensions or metrics that determine the +// sort order for the Analytics data. +// startIndex: An index of the first entity to retrieve. Use this parameter as +// a pagination mechanism along with the max-results parameter. +// Authorization scope(s): +// kGTLAuthScopeAnalytics +// kGTLAuthScopeAnalyticsReadonly +// Fetches a GTLAnalyticsMcfData. ++ (id)queryForDataMcfGetWithIds:(NSString *)ids + startDate:(NSString *)startDate + endDate:(NSString *)endDate + metrics:(NSString *)metrics; + +#pragma mark - +#pragma mark "management.accounts" methods +// These create a GTLQueryAnalytics object. + +// Method: analytics.management.accounts.list +// Lists all accounts to which the user has access. +// Optional: +// maxResults: The maximum number of accounts to include in this response. +// startIndex: An index of the first account to retrieve. Use this parameter +// as a pagination mechanism along with the max-results parameter. +// Authorization scope(s): +// kGTLAuthScopeAnalytics +// kGTLAuthScopeAnalyticsReadonly +// Fetches a GTLAnalyticsAccounts. ++ (id)queryForManagementAccountsList; + +#pragma mark - +#pragma mark "management.customDataSources" methods +// These create a GTLQueryAnalytics object. + +// Method: analytics.management.customDataSources.list +// List custom data sources to which the user has access. +// Required: +// accountId: Account Id for the custom data sources to retrieve. +// webPropertyId: Web property Id for the custom data sources to retrieve. +// Optional: +// maxResults: The maximum number of custom data sources to include in this +// response. +// startIndex: A 1-based index of the first custom data source to retrieve. +// Use this parameter as a pagination mechanism along with the max-results +// parameter. +// Authorization scope(s): +// kGTLAuthScopeAnalytics +// kGTLAuthScopeAnalyticsReadonly +// Fetches a GTLAnalyticsCustomDataSources. ++ (id)queryForManagementCustomDataSourcesListWithAccountId:(NSString *)accountId + webPropertyId:(NSString *)webPropertyId; + +#pragma mark - +#pragma mark "management.dailyUploads" methods +// These create a GTLQueryAnalytics object. + +// Method: analytics.management.dailyUploads.delete +// Delete uploaded data for the given date. +// Required: +// accountId: Account Id associated with daily upload delete. +// webPropertyId: Web property Id associated with daily upload delete. +// customDataSourceId: Custom data source Id associated with daily upload +// delete. +// date: Date for which data is to be deleted. Date should be formatted as +// YYYY-MM-DD. +// type: Type of data for this delete. +// kGTLAnalyticsTypeCost: Value for specifying cost data upload. +// Authorization scope(s): +// kGTLAuthScopeAnalytics ++ (id)queryForManagementDailyUploadsDeleteWithAccountId:(NSString *)accountId + webPropertyId:(NSString *)webPropertyId + customDataSourceId:(NSString *)customDataSourceId + date:(NSString *)date + type:(NSString *)type; + +// Method: analytics.management.dailyUploads.list +// List daily uploads to which the user has access. +// Required: +// accountId: Account Id for the daily uploads to retrieve. +// webPropertyId: Web property Id for the daily uploads to retrieve. +// customDataSourceId: Custom data source Id for daily uploads to retrieve. +// startDate: Start date of the form YYYY-MM-DD. +// endDate: End date of the form YYYY-MM-DD. +// Optional: +// maxResults: The maximum number of custom data sources to include in this +// response. +// startIndex: A 1-based index of the first daily upload to retrieve. Use this +// parameter as a pagination mechanism along with the max-results parameter. +// Authorization scope(s): +// kGTLAuthScopeAnalytics +// kGTLAuthScopeAnalyticsReadonly +// Fetches a GTLAnalyticsDailyUploads. ++ (id)queryForManagementDailyUploadsListWithAccountId:(NSString *)accountId + webPropertyId:(NSString *)webPropertyId + customDataSourceId:(NSString *)customDataSourceId + startDate:(NSString *)startDate + endDate:(NSString *)endDate; + +// Method: analytics.management.dailyUploads.upload +// Update/Overwrite data for a custom data source. +// Required: +// accountId: Account Id associated with daily upload. +// webPropertyId: Web property Id associated with daily upload. +// customDataSourceId: Custom data source Id to which the data being uploaded +// belongs. +// date: Date for which data is uploaded. Date should be formatted as +// YYYY-MM-DD. +// appendNumber: Append number for this upload indexed from 1. (1..20) +// type: Type of data for this upload. +// kGTLAnalyticsTypeCost: Value for specifying cost data upload. +// Optional: +// reset: Reset/Overwrite all previous appends for this date and start over +// with this file as the first upload. (Default false) +// Upload Parameters: +// Maximum size: 5MB +// Accepted MIME type(s): application/octet-stream +// Authorization scope(s): +// kGTLAuthScopeAnalytics +// Fetches a GTLAnalyticsDailyUploadAppend. ++ (id)queryForManagementDailyUploadsUploadWithAccountId:(NSString *)accountId + webPropertyId:(NSString *)webPropertyId + customDataSourceId:(NSString *)customDataSourceId + date:(NSString *)date + appendNumber:(NSInteger)appendNumber + type:(NSString *)type + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil; + +#pragma mark - +#pragma mark "management.goals" methods +// These create a GTLQueryAnalytics object. + +// Method: analytics.management.goals.list +// Lists goals to which the user has access. +// Required: +// accountId: Account ID to retrieve goals for. Can either be a specific +// account ID or '~all', which refers to all the accounts that user has +// access to. +// webPropertyId: Web property ID to retrieve goals for. Can either be a +// specific web property ID or '~all', which refers to all the web +// properties that user has access to. +// profileId: Profile ID to retrieve goals for. Can either be a specific +// profile ID or '~all', which refers to all the profiles that user has +// access to. +// Optional: +// maxResults: The maximum number of goals to include in this response. +// startIndex: An index of the first goal to retrieve. Use this parameter as a +// pagination mechanism along with the max-results parameter. +// Authorization scope(s): +// kGTLAuthScopeAnalytics +// kGTLAuthScopeAnalyticsReadonly +// Fetches a GTLAnalyticsGoals. ++ (id)queryForManagementGoalsListWithAccountId:(NSString *)accountId + webPropertyId:(NSString *)webPropertyId + profileId:(NSString *)profileId; + +#pragma mark - +#pragma mark "management.profiles" methods +// These create a GTLQueryAnalytics object. + +// Method: analytics.management.profiles.list +// Lists profiles to which the user has access. +// Required: +// accountId: Account ID for the profiles to retrieve. Can either be a +// specific account ID or '~all', which refers to all the accounts to which +// the user has access. +// webPropertyId: Web property ID for the profiles to retrieve. Can either be +// a specific web property ID or '~all', which refers to all the web +// properties to which the user has access. +// Optional: +// maxResults: The maximum number of profiles to include in this response. +// startIndex: An index of the first entity to retrieve. Use this parameter as +// a pagination mechanism along with the max-results parameter. +// Authorization scope(s): +// kGTLAuthScopeAnalytics +// kGTLAuthScopeAnalyticsReadonly +// Fetches a GTLAnalyticsProfiles. ++ (id)queryForManagementProfilesListWithAccountId:(NSString *)accountId + webPropertyId:(NSString *)webPropertyId; + +#pragma mark - +#pragma mark "management.segments" methods +// These create a GTLQueryAnalytics object. + +// Method: analytics.management.segments.list +// Lists advanced segments to which the user has access. +// Optional: +// maxResults: The maximum number of advanced segments to include in this +// response. +// startIndex: An index of the first advanced segment to retrieve. Use this +// parameter as a pagination mechanism along with the max-results parameter. +// Authorization scope(s): +// kGTLAuthScopeAnalytics +// kGTLAuthScopeAnalyticsReadonly +// Fetches a GTLAnalyticsSegments. ++ (id)queryForManagementSegmentsList; + +#pragma mark - +#pragma mark "management.webproperties" methods +// These create a GTLQueryAnalytics object. + +// Method: analytics.management.webproperties.list +// Lists web properties to which the user has access. +// Required: +// accountId: Account ID to retrieve web properties for. Can either be a +// specific account ID or '~all', which refers to all the accounts that user +// has access to. +// Optional: +// maxResults: The maximum number of web properties to include in this +// response. +// startIndex: An index of the first entity to retrieve. Use this parameter as +// a pagination mechanism along with the max-results parameter. +// Authorization scope(s): +// kGTLAuthScopeAnalytics +// kGTLAuthScopeAnalyticsReadonly +// Fetches a GTLAnalyticsWebproperties. ++ (id)queryForManagementWebpropertiesListWithAccountId:(NSString *)accountId; + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLQueryAnalytics.m b/GTL/Source/Services/Analytics/Generated/GTLQueryAnalytics.m new file mode 100644 index 0000000..1d45ecc --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLQueryAnalytics.m @@ -0,0 +1,230 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryAnalytics.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLQueryAnalytics (11 custom class methods, 19 custom properties) + +#import "GTLQueryAnalytics.h" + +#import "GTLAnalyticsAccounts.h" +#import "GTLAnalyticsCustomDataSources.h" +#import "GTLAnalyticsDailyUploadAppend.h" +#import "GTLAnalyticsDailyUploads.h" +#import "GTLAnalyticsGaData.h" +#import "GTLAnalyticsGoals.h" +#import "GTLAnalyticsMcfData.h" +#import "GTLAnalyticsProfiles.h" +#import "GTLAnalyticsSegments.h" +#import "GTLAnalyticsWebproperties.h" + +@implementation GTLQueryAnalytics + +@dynamic accountId, appendNumber, customDataSourceId, date, dimensions, endDate, + fields, filters, ids, maxResults, metrics, profileId, reset, segment, + sort, startDate, startIndex, type, webPropertyId; + ++ (NSDictionary *)parameterNameMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"end-date", @"endDate", + @"max-results", @"maxResults", + @"start-date", @"startDate", + @"start-index", @"startIndex", + nil]; + return map; +} + +#pragma mark - +#pragma mark "data.ga" methods +// These create a GTLQueryAnalytics object. + ++ (id)queryForDataGaGetWithIds:(NSString *)ids + startDate:(NSString *)startDate + endDate:(NSString *)endDate + metrics:(NSString *)metrics { + NSString *methodName = @"analytics.data.ga.get"; + GTLQueryAnalytics *query = [self queryWithMethodName:methodName]; + query.ids = ids; + query.startDate = startDate; + query.endDate = endDate; + query.metrics = metrics; + query.expectedObjectClass = [GTLAnalyticsGaData class]; + return query; +} + +#pragma mark - +#pragma mark "data.mcf" methods +// These create a GTLQueryAnalytics object. + ++ (id)queryForDataMcfGetWithIds:(NSString *)ids + startDate:(NSString *)startDate + endDate:(NSString *)endDate + metrics:(NSString *)metrics { + NSString *methodName = @"analytics.data.mcf.get"; + GTLQueryAnalytics *query = [self queryWithMethodName:methodName]; + query.ids = ids; + query.startDate = startDate; + query.endDate = endDate; + query.metrics = metrics; + query.expectedObjectClass = [GTLAnalyticsMcfData class]; + return query; +} + +#pragma mark - +#pragma mark "management.accounts" methods +// These create a GTLQueryAnalytics object. + ++ (id)queryForManagementAccountsList { + NSString *methodName = @"analytics.management.accounts.list"; + GTLQueryAnalytics *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLAnalyticsAccounts class]; + return query; +} + +#pragma mark - +#pragma mark "management.customDataSources" methods +// These create a GTLQueryAnalytics object. + ++ (id)queryForManagementCustomDataSourcesListWithAccountId:(NSString *)accountId + webPropertyId:(NSString *)webPropertyId { + NSString *methodName = @"analytics.management.customDataSources.list"; + GTLQueryAnalytics *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.webPropertyId = webPropertyId; + query.expectedObjectClass = [GTLAnalyticsCustomDataSources class]; + return query; +} + +#pragma mark - +#pragma mark "management.dailyUploads" methods +// These create a GTLQueryAnalytics object. + ++ (id)queryForManagementDailyUploadsDeleteWithAccountId:(NSString *)accountId + webPropertyId:(NSString *)webPropertyId + customDataSourceId:(NSString *)customDataSourceId + date:(NSString *)date + type:(NSString *)type { + NSString *methodName = @"analytics.management.dailyUploads.delete"; + GTLQueryAnalytics *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.webPropertyId = webPropertyId; + query.customDataSourceId = customDataSourceId; + query.date = date; + query.type = type; + return query; +} + ++ (id)queryForManagementDailyUploadsListWithAccountId:(NSString *)accountId + webPropertyId:(NSString *)webPropertyId + customDataSourceId:(NSString *)customDataSourceId + startDate:(NSString *)startDate + endDate:(NSString *)endDate { + NSString *methodName = @"analytics.management.dailyUploads.list"; + GTLQueryAnalytics *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.webPropertyId = webPropertyId; + query.customDataSourceId = customDataSourceId; + query.startDate = startDate; + query.endDate = endDate; + query.expectedObjectClass = [GTLAnalyticsDailyUploads class]; + return query; +} + ++ (id)queryForManagementDailyUploadsUploadWithAccountId:(NSString *)accountId + webPropertyId:(NSString *)webPropertyId + customDataSourceId:(NSString *)customDataSourceId + date:(NSString *)date + appendNumber:(NSInteger)appendNumber + type:(NSString *)type + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil { + NSString *methodName = @"analytics.management.dailyUploads.upload"; + GTLQueryAnalytics *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.webPropertyId = webPropertyId; + query.customDataSourceId = customDataSourceId; + query.date = date; + query.appendNumber = appendNumber; + query.type = type; + query.uploadParameters = uploadParametersOrNil; + query.expectedObjectClass = [GTLAnalyticsDailyUploadAppend class]; + return query; +} + +#pragma mark - +#pragma mark "management.goals" methods +// These create a GTLQueryAnalytics object. + ++ (id)queryForManagementGoalsListWithAccountId:(NSString *)accountId + webPropertyId:(NSString *)webPropertyId + profileId:(NSString *)profileId { + NSString *methodName = @"analytics.management.goals.list"; + GTLQueryAnalytics *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.webPropertyId = webPropertyId; + query.profileId = profileId; + query.expectedObjectClass = [GTLAnalyticsGoals class]; + return query; +} + +#pragma mark - +#pragma mark "management.profiles" methods +// These create a GTLQueryAnalytics object. + ++ (id)queryForManagementProfilesListWithAccountId:(NSString *)accountId + webPropertyId:(NSString *)webPropertyId { + NSString *methodName = @"analytics.management.profiles.list"; + GTLQueryAnalytics *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.webPropertyId = webPropertyId; + query.expectedObjectClass = [GTLAnalyticsProfiles class]; + return query; +} + +#pragma mark - +#pragma mark "management.segments" methods +// These create a GTLQueryAnalytics object. + ++ (id)queryForManagementSegmentsList { + NSString *methodName = @"analytics.management.segments.list"; + GTLQueryAnalytics *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLAnalyticsSegments class]; + return query; +} + +#pragma mark - +#pragma mark "management.webproperties" methods +// These create a GTLQueryAnalytics object. + ++ (id)queryForManagementWebpropertiesListWithAccountId:(NSString *)accountId { + NSString *methodName = @"analytics.management.webproperties.list"; + GTLQueryAnalytics *query = [self queryWithMethodName:methodName]; + query.accountId = accountId; + query.expectedObjectClass = [GTLAnalyticsWebproperties class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLServiceAnalytics.h b/GTL/Source/Services/Analytics/Generated/GTLServiceAnalytics.h new file mode 100644 index 0000000..e908d9a --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLServiceAnalytics.h @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceAnalytics.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLServiceAnalytics (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceAnalytics : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryAnalytics.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Analytics/Generated/GTLServiceAnalytics.m b/GTL/Source/Services/Analytics/Generated/GTLServiceAnalytics.m new file mode 100644 index 0000000..0dc3114 --- /dev/null +++ b/GTL/Source/Services/Analytics/Generated/GTLServiceAnalytics.m @@ -0,0 +1,78 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceAnalytics.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Analytics API (analytics/v3) +// Description: +// View and manage your Google Analytics data +// Documentation: +// https://developers.google.com/analytics/ +// Classes: +// GTLServiceAnalytics (0 custom class methods, 0 custom properties) + +#import "GTLAnalytics.h" + +@implementation GTLServiceAnalytics + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryAnalytics class], + [GTLAnalyticsAccount class], + [GTLAnalyticsAccounts class], + [GTLAnalyticsCustomDataSource class], + [GTLAnalyticsCustomDataSources class], + [GTLAnalyticsDailyUpload class], + [GTLAnalyticsDailyUploadAppend class], + [GTLAnalyticsDailyUploads class], + [GTLAnalyticsGaData class], + [GTLAnalyticsGoal class], + [GTLAnalyticsGoals class], + [GTLAnalyticsMcfData class], + [GTLAnalyticsProfile class], + [GTLAnalyticsProfiles class], + [GTLAnalyticsSegment class], + [GTLAnalyticsSegments class], + [GTLAnalyticsWebproperties class], + [GTLAnalyticsWebproperty class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v3"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + self.rpcUploadURL = [NSURL URLWithString:@"https://www.googleapis.com/upload/rpc?uploadType=resumable&prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Blogger/.svn/all-wcprops b/GTL/Source/Services/Blogger/.svn/all-wcprops new file mode 100644 index 0000000..b2b9602 --- /dev/null +++ b/GTL/Source/Services/Blogger/.svn/all-wcprops @@ -0,0 +1,5 @@ +K 25 +svn:wc:ra_dav:version-url +V 47 +/svn/!svn/ver/225/trunk/Source/Services/Blogger +END diff --git a/GTL/Source/Services/Blogger/.svn/entries b/GTL/Source/Services/Blogger/.svn/entries new file mode 100644 index 0000000..9086761 --- /dev/null +++ b/GTL/Source/Services/Blogger/.svn/entries @@ -0,0 +1,31 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Blogger +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +Generated +dir + diff --git a/GTL/Source/Services/Blogger/Generated/.svn/all-wcprops b/GTL/Source/Services/Blogger/Generated/.svn/all-wcprops new file mode 100644 index 0000000..628bc0e --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/all-wcprops @@ -0,0 +1,161 @@ +K 25 +svn:wc:ra_dav:version-url +V 57 +/svn/!svn/ver/225/trunk/Source/Services/Blogger/Generated +END +GTLBloggerConstants.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLBloggerConstants.m +END +GTLBloggerPostList.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLBloggerPostList.h +END +GTLBloggerPage.m +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLBloggerPage.m +END +GTLBloggerBlog.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLBloggerBlog.h +END +GTLBloggerUser.m +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLBloggerUser.m +END +GTLBloggerBlogList.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLBloggerBlogList.m +END +GTLBloggerPost.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLBloggerPost.h +END +GTLBloggerPostList.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLBloggerPostList.m +END +GTLBlogger_Sources.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/225/trunk/Source/Services/Blogger/Generated/GTLBlogger_Sources.m +END +GTLBloggerBlog.m +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLBloggerBlog.m +END +GTLBloggerPost.m +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLBloggerPost.m +END +GTLBloggerCommentList.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLBloggerCommentList.h +END +GTLServiceBlogger.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLServiceBlogger.h +END +GTLBloggerComment.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLBloggerComment.h +END +GTLBloggerCommentList.m +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLBloggerCommentList.m +END +GTLQueryBlogger.h +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLQueryBlogger.h +END +GTLServiceBlogger.m +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLServiceBlogger.m +END +GTLBloggerComment.m +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLBloggerComment.m +END +GTLBloggerPageList.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLBloggerPageList.h +END +GTLQueryBlogger.m +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLQueryBlogger.m +END +GTLBloggerPage.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLBloggerPage.h +END +GTLBloggerConstants.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLBloggerConstants.h +END +GTLBloggerPageList.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLBloggerPageList.m +END +GTLBloggerUser.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLBloggerUser.h +END +GTLBloggerBlogList.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLBloggerBlogList.h +END +GTLBlogger.h +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/172/trunk/Source/Services/Blogger/Generated/GTLBlogger.h +END diff --git a/GTL/Source/Services/Blogger/Generated/.svn/entries b/GTL/Source/Services/Blogger/Generated/.svn/entries new file mode 100644 index 0000000..4895a24 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/entries @@ -0,0 +1,912 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Blogger/Generated +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +GTLBloggerConstants.m +file + + + + +2012-12-09T08:42:30.000000Z +579c6d0450b226e7634cf456003ed9ad +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1220 + +GTLBloggerPostList.h +file + + + + +2012-12-09T08:42:30.000000Z +27871146381e2d027ee10489ec4466af +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1874 + +GTLBloggerPage.m +file + + + + +2012-12-09T08:42:30.000000Z +f25edcb0bb85dc595d6d18d4a22de610 +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2708 + +GTLBloggerBlog.h +file + + + + +2012-12-09T08:42:30.000000Z +d3f56c81accfc1d37f730672032b3f12 +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4206 + +GTLBloggerUser.m +file + + + + +2012-12-09T08:42:30.000000Z +549d15e37faafe1f54f58af76fd2479d +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2073 + +GTLBloggerBlogList.m +file + + + + +2012-12-09T08:42:30.000000Z +ce9f9d99d1379308599e43a1c85bd4e6 +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1556 + +GTLBloggerPost.h +file + + + + +2012-12-09T08:42:30.000000Z +a70b89a2edcaff830b21e22cb203dcb4 +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +5340 + +GTLBloggerPostList.m +file + + + + +2012-12-09T08:42:30.000000Z +469c4d2454ca3c55153c822b41322bfe +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1586 + +GTLBlogger_Sources.m +file + + + + +2012-12-09T08:42:30.000000Z +a66674d8c0b3a8f4d94fe3938c6f7ca0 +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1438 + +GTLBloggerBlog.m +file + + + + +2012-12-09T08:42:30.000000Z +9c1eb241e9614b2065db95a33f22721e +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2649 + +GTLBloggerPost.m +file + + + + +2012-12-09T08:42:30.000000Z +74f77f92240936e5b3fe5b7d4d4689db +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3707 + +GTLBloggerCommentList.h +file + + + + +2012-12-09T08:42:30.000000Z +1cd65dbac92fcf95ac4e27510706b54e +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1894 + +GTLServiceBlogger.h +file + + + + +2012-12-09T08:42:30.000000Z +c3346a9f2abb77a205709fb171864134 +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2107 + +GTLBloggerComment.h +file + + + + +2012-12-09T08:42:30.000000Z +3de39a5b27207f8d077bd31960bf5559 +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4760 + +GTLBloggerCommentList.m +file + + + + +2012-12-09T08:42:30.000000Z +e6331909ae800660220ed39704d5309a +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1610 + +GTLQueryBlogger.h +file + + + + +2012-12-09T08:42:30.000000Z +f09ec74d247f3a1e472198823041933b +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +9336 + +GTLServiceBlogger.m +file + + + + +2012-12-09T08:42:30.000000Z +56da121ecde98d0ed75228c541e3736c +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2270 + +GTLBloggerComment.m +file + + + + +2012-12-09T08:42:30.000000Z +0b53557120abde9aab5815b20ae2682e +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3641 + +GTLBloggerPageList.h +file + + + + +2012-12-09T08:42:30.000000Z +5c11fb60dcabb4bcf8ab7f2d0a6c29af +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1663 + +GTLQueryBlogger.m +file + + + + +2012-12-09T08:42:30.000000Z +abdb3218db015f9858f3fd9056b318ab +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +7547 + +GTLBloggerPage.h +file + + + + +2012-12-09T08:42:30.000000Z +8b9661185e9fbc9c8b5a6112594af789 +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3714 + +GTLBloggerConstants.h +file + + + + +2012-12-09T08:42:30.000000Z +b50195f5805abc183513bd43afcd6a2a +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1401 + +GTLBloggerPageList.m +file + + + + +2012-12-09T08:42:30.000000Z +b82b1b3fbdaae5d7962d078e22e7a8f8 +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1556 + +GTLBloggerUser.h +file + + + + +2012-12-09T08:42:30.000000Z +bb8defd1cd4018c13675c301e270645b +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2894 + +GTLBloggerBlogList.h +file + + + + +2012-12-09T08:42:30.000000Z +4fc5a870f818225207fb7b12c057bd72 +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1698 + +GTLBlogger.h +file + + + + +2012-12-09T08:42:30.000000Z +303ae0e44a93f38ddf0b202f402d8b6f +2012-06-22T22:11:18.367228Z +172 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1319 + diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBlogger.h.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBlogger.h.svn-base new file mode 100644 index 0000000..959bb61 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBlogger.h.svn-base @@ -0,0 +1,42 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBlogger.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started + +#import "GTLBloggerConstants.h" + +#import "GTLBloggerBlog.h" +#import "GTLBloggerBlogList.h" +#import "GTLBloggerComment.h" +#import "GTLBloggerCommentList.h" +#import "GTLBloggerPage.h" +#import "GTLBloggerPageList.h" +#import "GTLBloggerPost.h" +#import "GTLBloggerPostList.h" +#import "GTLBloggerUser.h" + +#import "GTLQueryBlogger.h" +#import "GTLServiceBlogger.h" diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerBlog.h.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerBlog.h.svn-base new file mode 100644 index 0000000..1b7b413 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerBlog.h.svn-base @@ -0,0 +1,147 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerBlog.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerBlog (0 custom class methods, 12 custom properties) +// GTLBloggerBlogLocale (0 custom class methods, 3 custom properties) +// GTLBloggerBlogPages (0 custom class methods, 2 custom properties) +// GTLBloggerBlogPosts (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBloggerBlogLocale; +@class GTLBloggerBlogPages; +@class GTLBloggerBlogPosts; +@class GTLBloggerPost; + +// ---------------------------------------------------------------------------- +// +// GTLBloggerBlog +// + +@interface GTLBloggerBlog : GTLObject + +// The JSON custom meta-data for the Blog +@property (copy) NSString *customMetaData; + +// The description of this blog. This is displayed underneath the title. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The identifier for this resource. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +// The kind of this entry. Always blogger#blog +@property (copy) NSString *kind; + +// The locale this Blog is set to. +@property (retain) GTLBloggerBlogLocale *locale; + +// The name of this blog. This is displayed as the title. +@property (copy) NSString *name; + +// The container of pages in this blog. +@property (retain) GTLBloggerBlogPages *pages; + +// The container of posts in this blog. +@property (retain) GTLBloggerBlogPosts *posts; + +// RFC 3339 date-time when this blog was published. +@property (retain) GTLDateTime *published; + +// The API REST URL to fetch this resource from. +@property (copy) NSString *selfLink; + +// RFC 3339 date-time when this blog was last updated. +@property (retain) GTLDateTime *updated; + +// The URL where this blog is published. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerBlogLocale +// + +@interface GTLBloggerBlogLocale : GTLObject + +// The country this blog's locale is set to. +@property (copy) NSString *country; + +// The language this blog is authored in. +@property (copy) NSString *language; + +// The language variant this blog is authored in. +@property (copy) NSString *variant; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerBlogPages +// + +@interface GTLBloggerBlogPages : GTLObject + +// The URL of the container for pages in this blog. +@property (copy) NSString *selfLink; + +// The count of pages in this blog. +@property (retain) NSNumber *totalItems; // intValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerBlogPosts +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLBloggerBlogPosts : GTLCollectionObject + +// The List of Posts for this Blog. +@property (retain) NSArray *items; // of GTLBloggerPost + +// The URL of the container for posts in this blog. +@property (copy) NSString *selfLink; + +// The count of posts in this blog. +@property (retain) NSNumber *totalItems; // intValue + +@end diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerBlog.m.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerBlog.m.svn-base new file mode 100644 index 0000000..60734f4 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerBlog.m.svn-base @@ -0,0 +1,98 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerBlog.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerBlog (0 custom class methods, 12 custom properties) +// GTLBloggerBlogLocale (0 custom class methods, 3 custom properties) +// GTLBloggerBlogPages (0 custom class methods, 2 custom properties) +// GTLBloggerBlogPosts (0 custom class methods, 3 custom properties) + +#import "GTLBloggerBlog.h" + +#import "GTLBloggerPost.h" + +// ---------------------------------------------------------------------------- +// +// GTLBloggerBlog +// + +@implementation GTLBloggerBlog +@dynamic customMetaData, descriptionProperty, identifier, kind, locale, name, + pages, posts, published, selfLink, updated, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"blogger#blog"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerBlogLocale +// + +@implementation GTLBloggerBlogLocale +@dynamic country, language, variant; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerBlogPages +// + +@implementation GTLBloggerBlogPages +@dynamic selfLink, totalItems; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerBlogPosts +// + +@implementation GTLBloggerBlogPosts +@dynamic items, selfLink, totalItems; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBloggerPost class] + forKey:@"items"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerBlogList.h.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerBlogList.h.svn-base new file mode 100644 index 0000000..7791d95 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerBlogList.h.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerBlogList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerBlogList (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBloggerBlog; + +// ---------------------------------------------------------------------------- +// +// GTLBloggerBlogList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLBloggerBlogList : GTLCollectionObject + +// The list of Blogs this user has Authorship or Admin rights over. +@property (retain) NSArray *items; // of GTLBloggerBlog + +// The kind of this entity. Always blogger#blogList +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerBlogList.m.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerBlogList.m.svn-base new file mode 100644 index 0000000..7967181 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerBlogList.m.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerBlogList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerBlogList (0 custom class methods, 2 custom properties) + +#import "GTLBloggerBlogList.h" + +#import "GTLBloggerBlog.h" + +// ---------------------------------------------------------------------------- +// +// GTLBloggerBlogList +// + +@implementation GTLBloggerBlogList +@dynamic items, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBloggerBlog class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"blogger#blogList"]; +} + +@end diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerComment.h.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerComment.h.svn-base new file mode 100644 index 0000000..564445f --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerComment.h.svn-base @@ -0,0 +1,164 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerComment.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerComment (0 custom class methods, 10 custom properties) +// GTLBloggerCommentAuthor (0 custom class methods, 4 custom properties) +// GTLBloggerCommentBlog (0 custom class methods, 1 custom properties) +// GTLBloggerCommentInReplyTo (0 custom class methods, 1 custom properties) +// GTLBloggerCommentPost (0 custom class methods, 1 custom properties) +// GTLBloggerCommentAuthorImage (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBloggerCommentAuthor; +@class GTLBloggerCommentAuthorImage; +@class GTLBloggerCommentBlog; +@class GTLBloggerCommentInReplyTo; +@class GTLBloggerCommentPost; + +// ---------------------------------------------------------------------------- +// +// GTLBloggerComment +// + +@interface GTLBloggerComment : GTLObject + +// The author of this Comment. +@property (retain) GTLBloggerCommentAuthor *author; + +// Data about the blog containing this comment. +@property (retain) GTLBloggerCommentBlog *blog; + +// The actual content of the comment. May include HTML markup. +@property (copy) NSString *content; + +// The identifier for this resource. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +// Data about the comment this is in reply to. +@property (retain) GTLBloggerCommentInReplyTo *inReplyTo; + +// The kind of this entry. Always blogger#comment +@property (copy) NSString *kind; + +// Data about the post containing this comment. +@property (retain) GTLBloggerCommentPost *post; + +// RFC 3339 date-time when this comment was published. +@property (retain) GTLDateTime *published; + +// The API REST URL to fetch this resource from. +@property (copy) NSString *selfLink; + +// RFC 3339 date-time when this comment was last updated. +@property (retain) GTLDateTime *updated; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerCommentAuthor +// + +@interface GTLBloggerCommentAuthor : GTLObject + +// The display name. +@property (copy) NSString *displayName; + +// The identifier of the Comment creator. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The comment creator's avatar. +@property (retain) GTLBloggerCommentAuthorImage *image; + +// The URL of the Comment creator's Profile page. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerCommentBlog +// + +@interface GTLBloggerCommentBlog : GTLObject + +// The identifier of the blog containing this comment. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerCommentInReplyTo +// + +@interface GTLBloggerCommentInReplyTo : GTLObject + +// The identified of the parent of this comment. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerCommentPost +// + +@interface GTLBloggerCommentPost : GTLObject + +// The identifier of the post containing this comment. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerCommentAuthorImage +// + +@interface GTLBloggerCommentAuthorImage : GTLObject + +// The comment creator's avatar URL. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerComment.m.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerComment.m.svn-base new file mode 100644 index 0000000..8348b40 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerComment.m.svn-base @@ -0,0 +1,140 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerComment.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerComment (0 custom class methods, 10 custom properties) +// GTLBloggerCommentAuthor (0 custom class methods, 4 custom properties) +// GTLBloggerCommentBlog (0 custom class methods, 1 custom properties) +// GTLBloggerCommentInReplyTo (0 custom class methods, 1 custom properties) +// GTLBloggerCommentPost (0 custom class methods, 1 custom properties) +// GTLBloggerCommentAuthorImage (0 custom class methods, 1 custom properties) + +#import "GTLBloggerComment.h" + +// ---------------------------------------------------------------------------- +// +// GTLBloggerComment +// + +@implementation GTLBloggerComment +@dynamic author, blog, content, identifier, inReplyTo, kind, post, published, + selfLink, updated; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"blogger#comment"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerCommentAuthor +// + +@implementation GTLBloggerCommentAuthor +@dynamic displayName, identifier, image, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerCommentBlog +// + +@implementation GTLBloggerCommentBlog +@dynamic identifier; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerCommentInReplyTo +// + +@implementation GTLBloggerCommentInReplyTo +@dynamic identifier; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerCommentPost +// + +@implementation GTLBloggerCommentPost +@dynamic identifier; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerCommentAuthorImage +// + +@implementation GTLBloggerCommentAuthorImage +@dynamic url; +@end diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerCommentList.h.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerCommentList.h.svn-base new file mode 100644 index 0000000..1c17a35 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerCommentList.h.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerCommentList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerCommentList (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBloggerComment; + +// ---------------------------------------------------------------------------- +// +// GTLBloggerCommentList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLBloggerCommentList : GTLCollectionObject + +// The List of Comments for a Post. +@property (retain) NSArray *items; // of GTLBloggerComment + +// The kind of this entry. Always blogger#commentList +@property (copy) NSString *kind; + +// Pagination token to fetch the next page, if one exists. +@property (copy) NSString *nextPageToken; + +// Pagination token to fetch the previous page, if one exists. +@property (copy) NSString *prevPageToken; + +@end diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerCommentList.m.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerCommentList.m.svn-base new file mode 100644 index 0000000..b4e3713 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerCommentList.m.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerCommentList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerCommentList (0 custom class methods, 4 custom properties) + +#import "GTLBloggerCommentList.h" + +#import "GTLBloggerComment.h" + +// ---------------------------------------------------------------------------- +// +// GTLBloggerCommentList +// + +@implementation GTLBloggerCommentList +@dynamic items, kind, nextPageToken, prevPageToken; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBloggerComment class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"blogger#commentList"]; +} + +@end diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerConstants.h.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerConstants.h.svn-base new file mode 100644 index 0000000..843547d --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerConstants.h.svn-base @@ -0,0 +1,41 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// Manage your Blogger account +GTL_EXTERN NSString * const kGTLAuthScopeBlogger; // "https://www.googleapis.com/auth/blogger" +// View your Blogger account +GTL_EXTERN NSString * const kGTLAuthScopeBloggerReadonly; // "https://www.googleapis.com/auth/blogger.readonly" diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerConstants.m.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerConstants.m.svn-base new file mode 100644 index 0000000..e583906 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerConstants.m.svn-base @@ -0,0 +1,33 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started + +#import "GTLBloggerConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeBlogger = @"https://www.googleapis.com/auth/blogger"; +NSString * const kGTLAuthScopeBloggerReadonly = @"https://www.googleapis.com/auth/blogger.readonly"; diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerPage.h.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerPage.h.svn-base new file mode 100644 index 0000000..0879c27 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerPage.h.svn-base @@ -0,0 +1,133 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerPage.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerPage (0 custom class methods, 10 custom properties) +// GTLBloggerPageAuthor (0 custom class methods, 4 custom properties) +// GTLBloggerPageBlog (0 custom class methods, 1 custom properties) +// GTLBloggerPageAuthorImage (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBloggerPageAuthor; +@class GTLBloggerPageAuthorImage; +@class GTLBloggerPageBlog; + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPage +// + +@interface GTLBloggerPage : GTLObject + +// The author of this Page. +@property (retain) GTLBloggerPageAuthor *author; + +// Data about the blog containing this Page. +@property (retain) GTLBloggerPageBlog *blog; + +// The body content of this Page, in HTML. +@property (copy) NSString *content; + +// The identifier for this resource. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +// The kind of this entity. Always blogger#page +@property (copy) NSString *kind; + +// RFC 3339 date-time when this Page was published. +@property (retain) GTLDateTime *published; + +// The API REST URL to fetch this resource from. +@property (copy) NSString *selfLink; + +// The title of this entity. This is the name displayed in the Admin user +// interface. +@property (copy) NSString *title; + +// RFC 3339 date-time when this Page was last updated. +@property (retain) GTLDateTime *updated; + +// The URL that this Page is displayed at. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPageAuthor +// + +@interface GTLBloggerPageAuthor : GTLObject + +// The display name. +@property (copy) NSString *displayName; + +// The identifier of the Page creator. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The page author's avatar. +@property (retain) GTLBloggerPageAuthorImage *image; + +// The URL of the Page creator's Profile page. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPageBlog +// + +@interface GTLBloggerPageBlog : GTLObject + +// The identifier of the blog containing this page. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPageAuthorImage +// + +@interface GTLBloggerPageAuthorImage : GTLObject + +// The page author's avatar URL. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerPage.m.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerPage.m.svn-base new file mode 100644 index 0000000..129cbfa --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerPage.m.svn-base @@ -0,0 +1,102 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerPage.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerPage (0 custom class methods, 10 custom properties) +// GTLBloggerPageAuthor (0 custom class methods, 4 custom properties) +// GTLBloggerPageBlog (0 custom class methods, 1 custom properties) +// GTLBloggerPageAuthorImage (0 custom class methods, 1 custom properties) + +#import "GTLBloggerPage.h" + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPage +// + +@implementation GTLBloggerPage +@dynamic author, blog, content, identifier, kind, published, selfLink, title, + updated, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"blogger#page"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPageAuthor +// + +@implementation GTLBloggerPageAuthor +@dynamic displayName, identifier, image, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPageBlog +// + +@implementation GTLBloggerPageBlog +@dynamic identifier; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPageAuthorImage +// + +@implementation GTLBloggerPageAuthorImage +@dynamic url; +@end diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerPageList.h.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerPageList.h.svn-base new file mode 100644 index 0000000..c158bbd --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerPageList.h.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerPageList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerPageList (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBloggerPage; + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPageList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLBloggerPageList : GTLCollectionObject + +// The list of Pages for a Blog. +@property (retain) NSArray *items; // of GTLBloggerPage + +// The kind of this entity. Always blogger#pageList +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerPageList.m.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerPageList.m.svn-base new file mode 100644 index 0000000..4403dee --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerPageList.m.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerPageList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerPageList (0 custom class methods, 2 custom properties) + +#import "GTLBloggerPageList.h" + +#import "GTLBloggerPage.h" + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPageList +// + +@implementation GTLBloggerPageList +@dynamic items, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBloggerPage class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"blogger#pageList"]; +} + +@end diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerPost.h.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerPost.h.svn-base new file mode 100644 index 0000000..0e2ebc9 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerPost.h.svn-base @@ -0,0 +1,193 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerPost.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerPost (0 custom class methods, 14 custom properties) +// GTLBloggerPostAuthor (0 custom class methods, 4 custom properties) +// GTLBloggerPostBlog (0 custom class methods, 1 custom properties) +// GTLBloggerPostLocation (0 custom class methods, 4 custom properties) +// GTLBloggerPostReplies (0 custom class methods, 3 custom properties) +// GTLBloggerPostAuthorImage (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBloggerComment; +@class GTLBloggerPostAuthor; +@class GTLBloggerPostAuthorImage; +@class GTLBloggerPostBlog; +@class GTLBloggerPostLocation; +@class GTLBloggerPostReplies; + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPost +// + +@interface GTLBloggerPost : GTLObject + +// The author of this Post. +@property (retain) GTLBloggerPostAuthor *author; + +// Data about the blog containing this Post. +@property (retain) GTLBloggerPostBlog *blog; + +// The content of the Post. May contain HTML markup. +@property (copy) NSString *content; + +// The JSON meta-data for the Post. +@property (copy) NSString *customMetaData; + +// The identifier of this Post. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +// The kind of this entity. Always blogger#post +@property (copy) NSString *kind; + +// The list of labels this Post was tagged with. +@property (retain) NSArray *labels; // of NSString + +// The location for geotagged posts. +@property (retain) GTLBloggerPostLocation *location; + +// RFC 3339 date-time when this Post was published. +@property (retain) GTLDateTime *published; + +// The container of comments on this Post. +@property (retain) GTLBloggerPostReplies *replies; + +// The API REST URL to fetch this resource from. +@property (copy) NSString *selfLink; + +// The title of the Post. +@property (copy) NSString *title; + +// RFC 3339 date-time when this Post was last updated. +@property (retain) GTLDateTime *updated; + +// The URL where this Post is displayed. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPostAuthor +// + +@interface GTLBloggerPostAuthor : GTLObject + +// The display name. +@property (copy) NSString *displayName; + +// The identifier of the Post creator. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The Post author's avatar. +@property (retain) GTLBloggerPostAuthorImage *image; + +// The URL of the Post creator's Profile page. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPostBlog +// + +@interface GTLBloggerPostBlog : GTLObject + +// The identifier of the Blog that contains this Post. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPostLocation +// + +@interface GTLBloggerPostLocation : GTLObject + +// Location's latitude. +@property (retain) NSNumber *lat; // doubleValue + +// Location's longitude. +@property (retain) NSNumber *lng; // doubleValue + +// Location name. +@property (copy) NSString *name; + +// Location's viewport span. Can be used when rendering a map preview. +@property (copy) NSString *span; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPostReplies +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLBloggerPostReplies : GTLCollectionObject + +// The List of Comments for this Post. +@property (retain) NSArray *items; // of GTLBloggerComment + +// The URL of the comments on this post. +@property (copy) NSString *selfLink; + +// The count of comments on this post. +@property (retain) NSNumber *totalItems; // longLongValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPostAuthorImage +// + +@interface GTLBloggerPostAuthorImage : GTLObject + +// The Post author's avatar URL. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerPost.m.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerPost.m.svn-base new file mode 100644 index 0000000..4216090 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerPost.m.svn-base @@ -0,0 +1,141 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerPost.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerPost (0 custom class methods, 14 custom properties) +// GTLBloggerPostAuthor (0 custom class methods, 4 custom properties) +// GTLBloggerPostBlog (0 custom class methods, 1 custom properties) +// GTLBloggerPostLocation (0 custom class methods, 4 custom properties) +// GTLBloggerPostReplies (0 custom class methods, 3 custom properties) +// GTLBloggerPostAuthorImage (0 custom class methods, 1 custom properties) + +#import "GTLBloggerPost.h" + +#import "GTLBloggerComment.h" + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPost +// + +@implementation GTLBloggerPost +@dynamic author, blog, content, customMetaData, identifier, kind, labels, + location, published, replies, selfLink, title, updated, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"labels"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"blogger#post"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPostAuthor +// + +@implementation GTLBloggerPostAuthor +@dynamic displayName, identifier, image, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPostBlog +// + +@implementation GTLBloggerPostBlog +@dynamic identifier; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPostLocation +// + +@implementation GTLBloggerPostLocation +@dynamic lat, lng, name, span; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPostReplies +// + +@implementation GTLBloggerPostReplies +@dynamic items, selfLink, totalItems; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBloggerComment class] + forKey:@"items"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPostAuthorImage +// + +@implementation GTLBloggerPostAuthorImage +@dynamic url; +@end diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerPostList.h.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerPostList.h.svn-base new file mode 100644 index 0000000..d5f15dd --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerPostList.h.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerPostList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerPostList (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBloggerPost; + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPostList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLBloggerPostList : GTLCollectionObject + +// The list of Posts for this Blog. +@property (retain) NSArray *items; // of GTLBloggerPost + +// The kind of this entity. Always blogger#postList +@property (copy) NSString *kind; + +// Pagination token to fetch the next page, if one exists. +@property (copy) NSString *nextPageToken; + +// Pagination token to fetch the previous page, if one exists. +@property (copy) NSString *prevPageToken; + +@end diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerPostList.m.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerPostList.m.svn-base new file mode 100644 index 0000000..14aaee0 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerPostList.m.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerPostList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerPostList (0 custom class methods, 4 custom properties) + +#import "GTLBloggerPostList.h" + +#import "GTLBloggerPost.h" + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPostList +// + +@implementation GTLBloggerPostList +@dynamic items, kind, nextPageToken, prevPageToken; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBloggerPost class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"blogger#postList"]; +} + +@end diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerUser.h.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerUser.h.svn-base new file mode 100644 index 0000000..e899eb3 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerUser.h.svn-base @@ -0,0 +1,109 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerUser.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerUser (0 custom class methods, 9 custom properties) +// GTLBloggerUserBlogs (0 custom class methods, 1 custom properties) +// GTLBloggerUserLocale (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBloggerUserBlogs; +@class GTLBloggerUserLocale; + +// ---------------------------------------------------------------------------- +// +// GTLBloggerUser +// + +@interface GTLBloggerUser : GTLObject + +// Profile summary information. +@property (copy) NSString *about; + +// The container of blogs for this user. +@property (retain) GTLBloggerUserBlogs *blogs; + +// The timestamp of when this profile was created, in seconds since epoch. +@property (retain) GTLDateTime *created; + +// The display name. +@property (copy) NSString *displayName; + +// The identifier for this User. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The kind of this entity. Always blogger#user +@property (copy) NSString *kind; + +// This user's locale +@property (retain) GTLBloggerUserLocale *locale; + +// The API REST URL to fetch this resource from. +@property (copy) NSString *selfLink; + +// The user's profile page. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerUserBlogs +// + +@interface GTLBloggerUserBlogs : GTLObject + +// The URL of the Blogs for this user. +@property (copy) NSString *selfLink; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerUserLocale +// + +@interface GTLBloggerUserLocale : GTLObject + +// The user's country setting. +@property (copy) NSString *country; + +// The user's language setting. +@property (copy) NSString *language; + +// The user's language variant setting. +@property (copy) NSString *variant; + +@end diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerUser.m.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerUser.m.svn-base new file mode 100644 index 0000000..792431c --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBloggerUser.m.svn-base @@ -0,0 +1,75 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerUser.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerUser (0 custom class methods, 9 custom properties) +// GTLBloggerUserBlogs (0 custom class methods, 1 custom properties) +// GTLBloggerUserLocale (0 custom class methods, 3 custom properties) + +#import "GTLBloggerUser.h" + +// ---------------------------------------------------------------------------- +// +// GTLBloggerUser +// + +@implementation GTLBloggerUser +@dynamic about, blogs, created, displayName, identifier, kind, locale, selfLink, + url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"blogger#user"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerUserBlogs +// + +@implementation GTLBloggerUserBlogs +@dynamic selfLink; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerUserLocale +// + +@implementation GTLBloggerUserLocale +@dynamic country, language, variant; +@end diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBlogger_Sources.m.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBlogger_Sources.m.svn-base new file mode 100644 index 0000000..710cd39 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLBlogger_Sources.m.svn-base @@ -0,0 +1,45 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBlogger_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started + +#import "GTLBloggerConstants.m" + +#import "GTLBloggerBlog.m" +#import "GTLBloggerBlogList.m" +#import "GTLBloggerComment.m" +#import "GTLBloggerCommentList.m" +#import "GTLBloggerPage.m" +#import "GTLBloggerPageList.m" +#import "GTLBloggerPost.m" +#import "GTLBloggerPostList.m" +#import "GTLBloggerUser.m" + +#import "GTLQueryBlogger.m" +#import "GTLServiceBlogger.m" diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLQueryBlogger.h.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLQueryBlogger.h.svn-base new file mode 100644 index 0000000..104c6aa --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLQueryBlogger.h.svn-base @@ -0,0 +1,290 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryBlogger.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLQueryBlogger (16 custom class methods, 17 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLBloggerPost; + +@interface GTLQueryBlogger : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *blogId; +@property (copy) NSString *commentId; +@property (retain) GTLDateTime *endDate; +@property (assign) BOOL fetchBodies; +@property (copy) NSString *labels; +@property (assign) NSUInteger maxComments; +@property (assign) NSUInteger maxPosts; +@property (assign) NSUInteger maxResults; +@property (copy) NSString *pageId; +@property (copy) NSString *pageToken; +@property (copy) NSString *path; +@property (copy) NSString *postId; +@property (copy) NSString *q; +@property (retain) GTLDateTime *startDate; +@property (copy) NSString *url; +@property (copy) NSString *userId; + +#pragma mark - +#pragma mark "blogs" methods +// These create a GTLQueryBlogger object. + +// Method: blogger.blogs.get +// Gets one blog by id. +// Required: +// blogId: The ID of the blog to get. +// Optional: +// maxPosts: Maximum number of posts to pull back with the blog. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// kGTLAuthScopeBloggerReadonly +// Fetches a GTLBloggerBlog. ++ (id)queryForBlogsGetWithBlogId:(NSString *)blogId; + +// Method: blogger.blogs.getByUrl +// Retrieve a Blog by URL. +// Optional: +// url: The URL of the blog to retrieve. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// kGTLAuthScopeBloggerReadonly +// Fetches a GTLBloggerBlog. ++ (id)queryForBlogsGetByUrl; + +// Method: blogger.blogs.listByUser +// Retrieves a list of blogs, possibly filtered. +// Required: +// userId: ID of the user whose blogs are to be fetched. Either the word +// 'self' (sans quote marks) or the user's profile identifier. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// kGTLAuthScopeBloggerReadonly +// Fetches a GTLBloggerBlogList. ++ (id)queryForBlogsListByUserWithUserId:(NSString *)userId; + +#pragma mark - +#pragma mark "comments" methods +// These create a GTLQueryBlogger object. + +// Method: blogger.comments.get +// Gets one comment by id. +// Required: +// blogId: ID of the blog to containing the comment. +// postId: ID of the post to fetch posts from. +// commentId: The ID of the comment to get. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// kGTLAuthScopeBloggerReadonly +// Fetches a GTLBloggerComment. ++ (id)queryForCommentsGetWithBlogId:(NSString *)blogId + postId:(NSString *)postId + commentId:(NSString *)commentId; + +// Method: blogger.comments.list +// Retrieves the comments for a blog, possibly filtered. +// Required: +// blogId: ID of the blog to fetch comments from. +// postId: ID of the post to fetch posts from. +// Optional: +// endDate: Latest date of comment to fetch, a date-time with RFC 3339 +// formatting. +// fetchBodies: Whether the body content of the comments is included. +// maxResults: Maximum number of comments to include in the result. +// pageToken: Continuation token if request is paged. +// startDate: Earliest date of comment to fetch, a date-time with RFC 3339 +// formatting. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// kGTLAuthScopeBloggerReadonly +// Fetches a GTLBloggerCommentList. ++ (id)queryForCommentsListWithBlogId:(NSString *)blogId + postId:(NSString *)postId; + +#pragma mark - +#pragma mark "pages" methods +// These create a GTLQueryBlogger object. + +// Method: blogger.pages.get +// Gets one blog page by id. +// Required: +// blogId: ID of the blog containing the page. +// pageId: The ID of the page to get. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// kGTLAuthScopeBloggerReadonly +// Fetches a GTLBloggerPage. ++ (id)queryForPagesGetWithBlogId:(NSString *)blogId + pageId:(NSString *)pageId; + +// Method: blogger.pages.list +// Retrieves pages for a blog, possibly filtered. +// Required: +// blogId: ID of the blog to fetch pages from. +// Optional: +// fetchBodies: Whether to retrieve the Page bodies. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// kGTLAuthScopeBloggerReadonly +// Fetches a GTLBloggerPageList. ++ (id)queryForPagesListWithBlogId:(NSString *)blogId; + +#pragma mark - +#pragma mark "posts" methods +// These create a GTLQueryBlogger object. + +// Method: blogger.posts.delete +// Delete a post by id. +// Required: +// blogId: The Id of the Blog. +// postId: The ID of the Post. +// Authorization scope(s): +// kGTLAuthScopeBlogger ++ (id)queryForPostsDeleteWithBlogId:(NSString *)blogId + postId:(NSString *)postId; + +// Method: blogger.posts.get +// Get a post by id. +// Required: +// blogId: ID of the blog to fetch the post from. +// postId: The ID of the post +// Optional: +// maxComments: Maximum number of comments to pull back on a post. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// kGTLAuthScopeBloggerReadonly +// Fetches a GTLBloggerPost. ++ (id)queryForPostsGetWithBlogId:(NSString *)blogId + postId:(NSString *)postId; + +// Method: blogger.posts.getByPath +// Retrieve a Post by Path. +// Required: +// blogId: ID of the blog to fetch the post from. +// Optional: +// maxComments: Maximum number of comments to pull back on a post. +// path: Path of the Post to retrieve. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// kGTLAuthScopeBloggerReadonly +// Fetches a GTLBloggerPost. ++ (id)queryForPostsGetByPathWithBlogId:(NSString *)blogId; + +// Method: blogger.posts.insert +// Add a post. +// Required: +// blogId: ID of the blog to fetch the post from. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// Fetches a GTLBloggerPost. ++ (id)queryForPostsInsertWithObject:(GTLBloggerPost *)object + blogId:(NSString *)blogId; + +// Method: blogger.posts.list +// Retrieves a list of posts, possibly filtered. +// Required: +// blogId: ID of the blog to fetch posts from. +// Optional: +// endDate: Latest post date to fetch, a date-time with RFC 3339 formatting. +// fetchBodies: Whether the body content of posts is included. +// labels: Comma-separated list of labels to search for. +// maxResults: Maximum number of posts to fetch. +// pageToken: Continuation token if the request is paged. +// startDate: Earliest post date to fetch, a date-time with RFC 3339 +// formatting. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// kGTLAuthScopeBloggerReadonly +// Fetches a GTLBloggerPostList. ++ (id)queryForPostsListWithBlogId:(NSString *)blogId; + +// Method: blogger.posts.patch +// Update a post. This method supports patch semantics. +// Required: +// blogId: The ID of the Blog. +// postId: The ID of the Post. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// Fetches a GTLBloggerPost. ++ (id)queryForPostsPatchWithObject:(GTLBloggerPost *)object + blogId:(NSString *)blogId + postId:(NSString *)postId; + +// Method: blogger.posts.search +// Search for a post. +// Required: +// blogId: ID of the blog to fetch the post from. +// Optional: +// q: Query terms to search this blog for matching posts. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// kGTLAuthScopeBloggerReadonly +// Fetches a GTLBloggerPostList. ++ (id)queryForPostsSearchWithBlogId:(NSString *)blogId; + +// Method: blogger.posts.update +// Update a post. +// Required: +// blogId: The ID of the Blog. +// postId: The ID of the Post. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// Fetches a GTLBloggerPost. ++ (id)queryForPostsUpdateWithObject:(GTLBloggerPost *)object + blogId:(NSString *)blogId + postId:(NSString *)postId; + +#pragma mark - +#pragma mark "users" methods +// These create a GTLQueryBlogger object. + +// Method: blogger.users.get +// Gets one user by id. +// Required: +// userId: The ID of the user to get. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// kGTLAuthScopeBloggerReadonly +// Fetches a GTLBloggerUser. ++ (id)queryForUsersGetWithUserId:(NSString *)userId; + +@end diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLQueryBlogger.m.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLQueryBlogger.m.svn-base new file mode 100644 index 0000000..9d80911 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLQueryBlogger.m.svn-base @@ -0,0 +1,229 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryBlogger.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLQueryBlogger (16 custom class methods, 17 custom properties) + +#import "GTLQueryBlogger.h" + +#import "GTLBloggerBlog.h" +#import "GTLBloggerBlogList.h" +#import "GTLBloggerComment.h" +#import "GTLBloggerCommentList.h" +#import "GTLBloggerPage.h" +#import "GTLBloggerPageList.h" +#import "GTLBloggerPost.h" +#import "GTLBloggerPostList.h" +#import "GTLBloggerUser.h" + +@implementation GTLQueryBlogger + +@dynamic blogId, commentId, endDate, fetchBodies, fields, labels, maxComments, + maxPosts, maxResults, pageId, pageToken, path, postId, q, startDate, + url, userId; + +#pragma mark - +#pragma mark "blogs" methods +// These create a GTLQueryBlogger object. + ++ (id)queryForBlogsGetWithBlogId:(NSString *)blogId { + NSString *methodName = @"blogger.blogs.get"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.blogId = blogId; + query.expectedObjectClass = [GTLBloggerBlog class]; + return query; +} + ++ (id)queryForBlogsGetByUrl { + NSString *methodName = @"blogger.blogs.getByUrl"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLBloggerBlog class]; + return query; +} + ++ (id)queryForBlogsListByUserWithUserId:(NSString *)userId { + NSString *methodName = @"blogger.blogs.listByUser"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.userId = userId; + query.expectedObjectClass = [GTLBloggerBlogList class]; + return query; +} + +#pragma mark - +#pragma mark "comments" methods +// These create a GTLQueryBlogger object. + ++ (id)queryForCommentsGetWithBlogId:(NSString *)blogId + postId:(NSString *)postId + commentId:(NSString *)commentId { + NSString *methodName = @"blogger.comments.get"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.blogId = blogId; + query.postId = postId; + query.commentId = commentId; + query.expectedObjectClass = [GTLBloggerComment class]; + return query; +} + ++ (id)queryForCommentsListWithBlogId:(NSString *)blogId + postId:(NSString *)postId { + NSString *methodName = @"blogger.comments.list"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.blogId = blogId; + query.postId = postId; + query.expectedObjectClass = [GTLBloggerCommentList class]; + return query; +} + +#pragma mark - +#pragma mark "pages" methods +// These create a GTLQueryBlogger object. + ++ (id)queryForPagesGetWithBlogId:(NSString *)blogId + pageId:(NSString *)pageId { + NSString *methodName = @"blogger.pages.get"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.blogId = blogId; + query.pageId = pageId; + query.expectedObjectClass = [GTLBloggerPage class]; + return query; +} + ++ (id)queryForPagesListWithBlogId:(NSString *)blogId { + NSString *methodName = @"blogger.pages.list"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.blogId = blogId; + query.expectedObjectClass = [GTLBloggerPageList class]; + return query; +} + +#pragma mark - +#pragma mark "posts" methods +// These create a GTLQueryBlogger object. + ++ (id)queryForPostsDeleteWithBlogId:(NSString *)blogId + postId:(NSString *)postId { + NSString *methodName = @"blogger.posts.delete"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.blogId = blogId; + query.postId = postId; + return query; +} + ++ (id)queryForPostsGetWithBlogId:(NSString *)blogId + postId:(NSString *)postId { + NSString *methodName = @"blogger.posts.get"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.blogId = blogId; + query.postId = postId; + query.expectedObjectClass = [GTLBloggerPost class]; + return query; +} + ++ (id)queryForPostsGetByPathWithBlogId:(NSString *)blogId { + NSString *methodName = @"blogger.posts.getByPath"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.blogId = blogId; + query.expectedObjectClass = [GTLBloggerPost class]; + return query; +} + ++ (id)queryForPostsInsertWithObject:(GTLBloggerPost *)object + blogId:(NSString *)blogId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"blogger.posts.insert"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.blogId = blogId; + query.expectedObjectClass = [GTLBloggerPost class]; + return query; +} + ++ (id)queryForPostsListWithBlogId:(NSString *)blogId { + NSString *methodName = @"blogger.posts.list"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.blogId = blogId; + query.expectedObjectClass = [GTLBloggerPostList class]; + return query; +} + ++ (id)queryForPostsPatchWithObject:(GTLBloggerPost *)object + blogId:(NSString *)blogId + postId:(NSString *)postId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"blogger.posts.patch"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.blogId = blogId; + query.postId = postId; + query.expectedObjectClass = [GTLBloggerPost class]; + return query; +} + ++ (id)queryForPostsSearchWithBlogId:(NSString *)blogId { + NSString *methodName = @"blogger.posts.search"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.blogId = blogId; + query.expectedObjectClass = [GTLBloggerPostList class]; + return query; +} + ++ (id)queryForPostsUpdateWithObject:(GTLBloggerPost *)object + blogId:(NSString *)blogId + postId:(NSString *)postId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"blogger.posts.update"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.blogId = blogId; + query.postId = postId; + query.expectedObjectClass = [GTLBloggerPost class]; + return query; +} + +#pragma mark - +#pragma mark "users" methods +// These create a GTLQueryBlogger object. + ++ (id)queryForUsersGetWithUserId:(NSString *)userId { + NSString *methodName = @"blogger.users.get"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.userId = userId; + query.expectedObjectClass = [GTLBloggerUser class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLServiceBlogger.h.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLServiceBlogger.h.svn-base new file mode 100644 index 0000000..7c4baa4 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLServiceBlogger.h.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceBlogger.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLServiceBlogger (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceBlogger : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryBlogger.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLServiceBlogger.m.svn-base b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLServiceBlogger.m.svn-base new file mode 100644 index 0000000..1fda9a7 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/.svn/text-base/GTLServiceBlogger.m.svn-base @@ -0,0 +1,69 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceBlogger.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLServiceBlogger (0 custom class methods, 0 custom properties) + +#import "GTLBlogger.h" + +@implementation GTLServiceBlogger + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryBlogger class], + [GTLBloggerBlog class], + [GTLBloggerBlogList class], + [GTLBloggerComment class], + [GTLBloggerCommentList class], + [GTLBloggerPage class], + [GTLBloggerPageList class], + [GTLBloggerPost class], + [GTLBloggerPostList class], + [GTLBloggerUser class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v3"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Blogger/Generated/GTLBlogger.h b/GTL/Source/Services/Blogger/Generated/GTLBlogger.h new file mode 100644 index 0000000..959bb61 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLBlogger.h @@ -0,0 +1,42 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBlogger.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started + +#import "GTLBloggerConstants.h" + +#import "GTLBloggerBlog.h" +#import "GTLBloggerBlogList.h" +#import "GTLBloggerComment.h" +#import "GTLBloggerCommentList.h" +#import "GTLBloggerPage.h" +#import "GTLBloggerPageList.h" +#import "GTLBloggerPost.h" +#import "GTLBloggerPostList.h" +#import "GTLBloggerUser.h" + +#import "GTLQueryBlogger.h" +#import "GTLServiceBlogger.h" diff --git a/GTL/Source/Services/Blogger/Generated/GTLBloggerBlog.h b/GTL/Source/Services/Blogger/Generated/GTLBloggerBlog.h new file mode 100644 index 0000000..1b7b413 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLBloggerBlog.h @@ -0,0 +1,147 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerBlog.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerBlog (0 custom class methods, 12 custom properties) +// GTLBloggerBlogLocale (0 custom class methods, 3 custom properties) +// GTLBloggerBlogPages (0 custom class methods, 2 custom properties) +// GTLBloggerBlogPosts (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBloggerBlogLocale; +@class GTLBloggerBlogPages; +@class GTLBloggerBlogPosts; +@class GTLBloggerPost; + +// ---------------------------------------------------------------------------- +// +// GTLBloggerBlog +// + +@interface GTLBloggerBlog : GTLObject + +// The JSON custom meta-data for the Blog +@property (copy) NSString *customMetaData; + +// The description of this blog. This is displayed underneath the title. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The identifier for this resource. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +// The kind of this entry. Always blogger#blog +@property (copy) NSString *kind; + +// The locale this Blog is set to. +@property (retain) GTLBloggerBlogLocale *locale; + +// The name of this blog. This is displayed as the title. +@property (copy) NSString *name; + +// The container of pages in this blog. +@property (retain) GTLBloggerBlogPages *pages; + +// The container of posts in this blog. +@property (retain) GTLBloggerBlogPosts *posts; + +// RFC 3339 date-time when this blog was published. +@property (retain) GTLDateTime *published; + +// The API REST URL to fetch this resource from. +@property (copy) NSString *selfLink; + +// RFC 3339 date-time when this blog was last updated. +@property (retain) GTLDateTime *updated; + +// The URL where this blog is published. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerBlogLocale +// + +@interface GTLBloggerBlogLocale : GTLObject + +// The country this blog's locale is set to. +@property (copy) NSString *country; + +// The language this blog is authored in. +@property (copy) NSString *language; + +// The language variant this blog is authored in. +@property (copy) NSString *variant; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerBlogPages +// + +@interface GTLBloggerBlogPages : GTLObject + +// The URL of the container for pages in this blog. +@property (copy) NSString *selfLink; + +// The count of pages in this blog. +@property (retain) NSNumber *totalItems; // intValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerBlogPosts +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLBloggerBlogPosts : GTLCollectionObject + +// The List of Posts for this Blog. +@property (retain) NSArray *items; // of GTLBloggerPost + +// The URL of the container for posts in this blog. +@property (copy) NSString *selfLink; + +// The count of posts in this blog. +@property (retain) NSNumber *totalItems; // intValue + +@end diff --git a/GTL/Source/Services/Blogger/Generated/GTLBloggerBlog.m b/GTL/Source/Services/Blogger/Generated/GTLBloggerBlog.m new file mode 100644 index 0000000..60734f4 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLBloggerBlog.m @@ -0,0 +1,98 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerBlog.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerBlog (0 custom class methods, 12 custom properties) +// GTLBloggerBlogLocale (0 custom class methods, 3 custom properties) +// GTLBloggerBlogPages (0 custom class methods, 2 custom properties) +// GTLBloggerBlogPosts (0 custom class methods, 3 custom properties) + +#import "GTLBloggerBlog.h" + +#import "GTLBloggerPost.h" + +// ---------------------------------------------------------------------------- +// +// GTLBloggerBlog +// + +@implementation GTLBloggerBlog +@dynamic customMetaData, descriptionProperty, identifier, kind, locale, name, + pages, posts, published, selfLink, updated, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"blogger#blog"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerBlogLocale +// + +@implementation GTLBloggerBlogLocale +@dynamic country, language, variant; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerBlogPages +// + +@implementation GTLBloggerBlogPages +@dynamic selfLink, totalItems; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerBlogPosts +// + +@implementation GTLBloggerBlogPosts +@dynamic items, selfLink, totalItems; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBloggerPost class] + forKey:@"items"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Blogger/Generated/GTLBloggerBlogList.h b/GTL/Source/Services/Blogger/Generated/GTLBloggerBlogList.h new file mode 100644 index 0000000..7791d95 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLBloggerBlogList.h @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerBlogList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerBlogList (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBloggerBlog; + +// ---------------------------------------------------------------------------- +// +// GTLBloggerBlogList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLBloggerBlogList : GTLCollectionObject + +// The list of Blogs this user has Authorship or Admin rights over. +@property (retain) NSArray *items; // of GTLBloggerBlog + +// The kind of this entity. Always blogger#blogList +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Blogger/Generated/GTLBloggerBlogList.m b/GTL/Source/Services/Blogger/Generated/GTLBloggerBlogList.m new file mode 100644 index 0000000..7967181 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLBloggerBlogList.m @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerBlogList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerBlogList (0 custom class methods, 2 custom properties) + +#import "GTLBloggerBlogList.h" + +#import "GTLBloggerBlog.h" + +// ---------------------------------------------------------------------------- +// +// GTLBloggerBlogList +// + +@implementation GTLBloggerBlogList +@dynamic items, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBloggerBlog class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"blogger#blogList"]; +} + +@end diff --git a/GTL/Source/Services/Blogger/Generated/GTLBloggerComment.h b/GTL/Source/Services/Blogger/Generated/GTLBloggerComment.h new file mode 100644 index 0000000..564445f --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLBloggerComment.h @@ -0,0 +1,164 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerComment.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerComment (0 custom class methods, 10 custom properties) +// GTLBloggerCommentAuthor (0 custom class methods, 4 custom properties) +// GTLBloggerCommentBlog (0 custom class methods, 1 custom properties) +// GTLBloggerCommentInReplyTo (0 custom class methods, 1 custom properties) +// GTLBloggerCommentPost (0 custom class methods, 1 custom properties) +// GTLBloggerCommentAuthorImage (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBloggerCommentAuthor; +@class GTLBloggerCommentAuthorImage; +@class GTLBloggerCommentBlog; +@class GTLBloggerCommentInReplyTo; +@class GTLBloggerCommentPost; + +// ---------------------------------------------------------------------------- +// +// GTLBloggerComment +// + +@interface GTLBloggerComment : GTLObject + +// The author of this Comment. +@property (retain) GTLBloggerCommentAuthor *author; + +// Data about the blog containing this comment. +@property (retain) GTLBloggerCommentBlog *blog; + +// The actual content of the comment. May include HTML markup. +@property (copy) NSString *content; + +// The identifier for this resource. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +// Data about the comment this is in reply to. +@property (retain) GTLBloggerCommentInReplyTo *inReplyTo; + +// The kind of this entry. Always blogger#comment +@property (copy) NSString *kind; + +// Data about the post containing this comment. +@property (retain) GTLBloggerCommentPost *post; + +// RFC 3339 date-time when this comment was published. +@property (retain) GTLDateTime *published; + +// The API REST URL to fetch this resource from. +@property (copy) NSString *selfLink; + +// RFC 3339 date-time when this comment was last updated. +@property (retain) GTLDateTime *updated; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerCommentAuthor +// + +@interface GTLBloggerCommentAuthor : GTLObject + +// The display name. +@property (copy) NSString *displayName; + +// The identifier of the Comment creator. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The comment creator's avatar. +@property (retain) GTLBloggerCommentAuthorImage *image; + +// The URL of the Comment creator's Profile page. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerCommentBlog +// + +@interface GTLBloggerCommentBlog : GTLObject + +// The identifier of the blog containing this comment. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerCommentInReplyTo +// + +@interface GTLBloggerCommentInReplyTo : GTLObject + +// The identified of the parent of this comment. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerCommentPost +// + +@interface GTLBloggerCommentPost : GTLObject + +// The identifier of the post containing this comment. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerCommentAuthorImage +// + +@interface GTLBloggerCommentAuthorImage : GTLObject + +// The comment creator's avatar URL. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/Blogger/Generated/GTLBloggerComment.m b/GTL/Source/Services/Blogger/Generated/GTLBloggerComment.m new file mode 100644 index 0000000..8348b40 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLBloggerComment.m @@ -0,0 +1,140 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerComment.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerComment (0 custom class methods, 10 custom properties) +// GTLBloggerCommentAuthor (0 custom class methods, 4 custom properties) +// GTLBloggerCommentBlog (0 custom class methods, 1 custom properties) +// GTLBloggerCommentInReplyTo (0 custom class methods, 1 custom properties) +// GTLBloggerCommentPost (0 custom class methods, 1 custom properties) +// GTLBloggerCommentAuthorImage (0 custom class methods, 1 custom properties) + +#import "GTLBloggerComment.h" + +// ---------------------------------------------------------------------------- +// +// GTLBloggerComment +// + +@implementation GTLBloggerComment +@dynamic author, blog, content, identifier, inReplyTo, kind, post, published, + selfLink, updated; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"blogger#comment"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerCommentAuthor +// + +@implementation GTLBloggerCommentAuthor +@dynamic displayName, identifier, image, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerCommentBlog +// + +@implementation GTLBloggerCommentBlog +@dynamic identifier; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerCommentInReplyTo +// + +@implementation GTLBloggerCommentInReplyTo +@dynamic identifier; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerCommentPost +// + +@implementation GTLBloggerCommentPost +@dynamic identifier; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerCommentAuthorImage +// + +@implementation GTLBloggerCommentAuthorImage +@dynamic url; +@end diff --git a/GTL/Source/Services/Blogger/Generated/GTLBloggerCommentList.h b/GTL/Source/Services/Blogger/Generated/GTLBloggerCommentList.h new file mode 100644 index 0000000..1c17a35 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLBloggerCommentList.h @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerCommentList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerCommentList (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBloggerComment; + +// ---------------------------------------------------------------------------- +// +// GTLBloggerCommentList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLBloggerCommentList : GTLCollectionObject + +// The List of Comments for a Post. +@property (retain) NSArray *items; // of GTLBloggerComment + +// The kind of this entry. Always blogger#commentList +@property (copy) NSString *kind; + +// Pagination token to fetch the next page, if one exists. +@property (copy) NSString *nextPageToken; + +// Pagination token to fetch the previous page, if one exists. +@property (copy) NSString *prevPageToken; + +@end diff --git a/GTL/Source/Services/Blogger/Generated/GTLBloggerCommentList.m b/GTL/Source/Services/Blogger/Generated/GTLBloggerCommentList.m new file mode 100644 index 0000000..b4e3713 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLBloggerCommentList.m @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerCommentList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerCommentList (0 custom class methods, 4 custom properties) + +#import "GTLBloggerCommentList.h" + +#import "GTLBloggerComment.h" + +// ---------------------------------------------------------------------------- +// +// GTLBloggerCommentList +// + +@implementation GTLBloggerCommentList +@dynamic items, kind, nextPageToken, prevPageToken; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBloggerComment class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"blogger#commentList"]; +} + +@end diff --git a/GTL/Source/Services/Blogger/Generated/GTLBloggerConstants.h b/GTL/Source/Services/Blogger/Generated/GTLBloggerConstants.h new file mode 100644 index 0000000..843547d --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLBloggerConstants.h @@ -0,0 +1,41 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// Manage your Blogger account +GTL_EXTERN NSString * const kGTLAuthScopeBlogger; // "https://www.googleapis.com/auth/blogger" +// View your Blogger account +GTL_EXTERN NSString * const kGTLAuthScopeBloggerReadonly; // "https://www.googleapis.com/auth/blogger.readonly" diff --git a/GTL/Source/Services/Blogger/Generated/GTLBloggerConstants.m b/GTL/Source/Services/Blogger/Generated/GTLBloggerConstants.m new file mode 100644 index 0000000..e583906 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLBloggerConstants.m @@ -0,0 +1,33 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started + +#import "GTLBloggerConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeBlogger = @"https://www.googleapis.com/auth/blogger"; +NSString * const kGTLAuthScopeBloggerReadonly = @"https://www.googleapis.com/auth/blogger.readonly"; diff --git a/GTL/Source/Services/Blogger/Generated/GTLBloggerPage.h b/GTL/Source/Services/Blogger/Generated/GTLBloggerPage.h new file mode 100644 index 0000000..0879c27 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLBloggerPage.h @@ -0,0 +1,133 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerPage.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerPage (0 custom class methods, 10 custom properties) +// GTLBloggerPageAuthor (0 custom class methods, 4 custom properties) +// GTLBloggerPageBlog (0 custom class methods, 1 custom properties) +// GTLBloggerPageAuthorImage (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBloggerPageAuthor; +@class GTLBloggerPageAuthorImage; +@class GTLBloggerPageBlog; + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPage +// + +@interface GTLBloggerPage : GTLObject + +// The author of this Page. +@property (retain) GTLBloggerPageAuthor *author; + +// Data about the blog containing this Page. +@property (retain) GTLBloggerPageBlog *blog; + +// The body content of this Page, in HTML. +@property (copy) NSString *content; + +// The identifier for this resource. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +// The kind of this entity. Always blogger#page +@property (copy) NSString *kind; + +// RFC 3339 date-time when this Page was published. +@property (retain) GTLDateTime *published; + +// The API REST URL to fetch this resource from. +@property (copy) NSString *selfLink; + +// The title of this entity. This is the name displayed in the Admin user +// interface. +@property (copy) NSString *title; + +// RFC 3339 date-time when this Page was last updated. +@property (retain) GTLDateTime *updated; + +// The URL that this Page is displayed at. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPageAuthor +// + +@interface GTLBloggerPageAuthor : GTLObject + +// The display name. +@property (copy) NSString *displayName; + +// The identifier of the Page creator. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The page author's avatar. +@property (retain) GTLBloggerPageAuthorImage *image; + +// The URL of the Page creator's Profile page. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPageBlog +// + +@interface GTLBloggerPageBlog : GTLObject + +// The identifier of the blog containing this page. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPageAuthorImage +// + +@interface GTLBloggerPageAuthorImage : GTLObject + +// The page author's avatar URL. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/Blogger/Generated/GTLBloggerPage.m b/GTL/Source/Services/Blogger/Generated/GTLBloggerPage.m new file mode 100644 index 0000000..129cbfa --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLBloggerPage.m @@ -0,0 +1,102 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerPage.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerPage (0 custom class methods, 10 custom properties) +// GTLBloggerPageAuthor (0 custom class methods, 4 custom properties) +// GTLBloggerPageBlog (0 custom class methods, 1 custom properties) +// GTLBloggerPageAuthorImage (0 custom class methods, 1 custom properties) + +#import "GTLBloggerPage.h" + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPage +// + +@implementation GTLBloggerPage +@dynamic author, blog, content, identifier, kind, published, selfLink, title, + updated, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"blogger#page"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPageAuthor +// + +@implementation GTLBloggerPageAuthor +@dynamic displayName, identifier, image, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPageBlog +// + +@implementation GTLBloggerPageBlog +@dynamic identifier; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPageAuthorImage +// + +@implementation GTLBloggerPageAuthorImage +@dynamic url; +@end diff --git a/GTL/Source/Services/Blogger/Generated/GTLBloggerPageList.h b/GTL/Source/Services/Blogger/Generated/GTLBloggerPageList.h new file mode 100644 index 0000000..c158bbd --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLBloggerPageList.h @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerPageList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerPageList (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBloggerPage; + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPageList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLBloggerPageList : GTLCollectionObject + +// The list of Pages for a Blog. +@property (retain) NSArray *items; // of GTLBloggerPage + +// The kind of this entity. Always blogger#pageList +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Blogger/Generated/GTLBloggerPageList.m b/GTL/Source/Services/Blogger/Generated/GTLBloggerPageList.m new file mode 100644 index 0000000..4403dee --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLBloggerPageList.m @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerPageList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerPageList (0 custom class methods, 2 custom properties) + +#import "GTLBloggerPageList.h" + +#import "GTLBloggerPage.h" + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPageList +// + +@implementation GTLBloggerPageList +@dynamic items, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBloggerPage class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"blogger#pageList"]; +} + +@end diff --git a/GTL/Source/Services/Blogger/Generated/GTLBloggerPost.h b/GTL/Source/Services/Blogger/Generated/GTLBloggerPost.h new file mode 100644 index 0000000..0e2ebc9 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLBloggerPost.h @@ -0,0 +1,193 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerPost.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerPost (0 custom class methods, 14 custom properties) +// GTLBloggerPostAuthor (0 custom class methods, 4 custom properties) +// GTLBloggerPostBlog (0 custom class methods, 1 custom properties) +// GTLBloggerPostLocation (0 custom class methods, 4 custom properties) +// GTLBloggerPostReplies (0 custom class methods, 3 custom properties) +// GTLBloggerPostAuthorImage (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBloggerComment; +@class GTLBloggerPostAuthor; +@class GTLBloggerPostAuthorImage; +@class GTLBloggerPostBlog; +@class GTLBloggerPostLocation; +@class GTLBloggerPostReplies; + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPost +// + +@interface GTLBloggerPost : GTLObject + +// The author of this Post. +@property (retain) GTLBloggerPostAuthor *author; + +// Data about the blog containing this Post. +@property (retain) GTLBloggerPostBlog *blog; + +// The content of the Post. May contain HTML markup. +@property (copy) NSString *content; + +// The JSON meta-data for the Post. +@property (copy) NSString *customMetaData; + +// The identifier of this Post. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +// The kind of this entity. Always blogger#post +@property (copy) NSString *kind; + +// The list of labels this Post was tagged with. +@property (retain) NSArray *labels; // of NSString + +// The location for geotagged posts. +@property (retain) GTLBloggerPostLocation *location; + +// RFC 3339 date-time when this Post was published. +@property (retain) GTLDateTime *published; + +// The container of comments on this Post. +@property (retain) GTLBloggerPostReplies *replies; + +// The API REST URL to fetch this resource from. +@property (copy) NSString *selfLink; + +// The title of the Post. +@property (copy) NSString *title; + +// RFC 3339 date-time when this Post was last updated. +@property (retain) GTLDateTime *updated; + +// The URL where this Post is displayed. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPostAuthor +// + +@interface GTLBloggerPostAuthor : GTLObject + +// The display name. +@property (copy) NSString *displayName; + +// The identifier of the Post creator. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The Post author's avatar. +@property (retain) GTLBloggerPostAuthorImage *image; + +// The URL of the Post creator's Profile page. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPostBlog +// + +@interface GTLBloggerPostBlog : GTLObject + +// The identifier of the Blog that contains this Post. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPostLocation +// + +@interface GTLBloggerPostLocation : GTLObject + +// Location's latitude. +@property (retain) NSNumber *lat; // doubleValue + +// Location's longitude. +@property (retain) NSNumber *lng; // doubleValue + +// Location name. +@property (copy) NSString *name; + +// Location's viewport span. Can be used when rendering a map preview. +@property (copy) NSString *span; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPostReplies +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLBloggerPostReplies : GTLCollectionObject + +// The List of Comments for this Post. +@property (retain) NSArray *items; // of GTLBloggerComment + +// The URL of the comments on this post. +@property (copy) NSString *selfLink; + +// The count of comments on this post. +@property (retain) NSNumber *totalItems; // longLongValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPostAuthorImage +// + +@interface GTLBloggerPostAuthorImage : GTLObject + +// The Post author's avatar URL. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/Blogger/Generated/GTLBloggerPost.m b/GTL/Source/Services/Blogger/Generated/GTLBloggerPost.m new file mode 100644 index 0000000..4216090 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLBloggerPost.m @@ -0,0 +1,141 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerPost.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerPost (0 custom class methods, 14 custom properties) +// GTLBloggerPostAuthor (0 custom class methods, 4 custom properties) +// GTLBloggerPostBlog (0 custom class methods, 1 custom properties) +// GTLBloggerPostLocation (0 custom class methods, 4 custom properties) +// GTLBloggerPostReplies (0 custom class methods, 3 custom properties) +// GTLBloggerPostAuthorImage (0 custom class methods, 1 custom properties) + +#import "GTLBloggerPost.h" + +#import "GTLBloggerComment.h" + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPost +// + +@implementation GTLBloggerPost +@dynamic author, blog, content, customMetaData, identifier, kind, labels, + location, published, replies, selfLink, title, updated, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"labels"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"blogger#post"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPostAuthor +// + +@implementation GTLBloggerPostAuthor +@dynamic displayName, identifier, image, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPostBlog +// + +@implementation GTLBloggerPostBlog +@dynamic identifier; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPostLocation +// + +@implementation GTLBloggerPostLocation +@dynamic lat, lng, name, span; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPostReplies +// + +@implementation GTLBloggerPostReplies +@dynamic items, selfLink, totalItems; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBloggerComment class] + forKey:@"items"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPostAuthorImage +// + +@implementation GTLBloggerPostAuthorImage +@dynamic url; +@end diff --git a/GTL/Source/Services/Blogger/Generated/GTLBloggerPostList.h b/GTL/Source/Services/Blogger/Generated/GTLBloggerPostList.h new file mode 100644 index 0000000..d5f15dd --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLBloggerPostList.h @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerPostList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerPostList (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBloggerPost; + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPostList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLBloggerPostList : GTLCollectionObject + +// The list of Posts for this Blog. +@property (retain) NSArray *items; // of GTLBloggerPost + +// The kind of this entity. Always blogger#postList +@property (copy) NSString *kind; + +// Pagination token to fetch the next page, if one exists. +@property (copy) NSString *nextPageToken; + +// Pagination token to fetch the previous page, if one exists. +@property (copy) NSString *prevPageToken; + +@end diff --git a/GTL/Source/Services/Blogger/Generated/GTLBloggerPostList.m b/GTL/Source/Services/Blogger/Generated/GTLBloggerPostList.m new file mode 100644 index 0000000..14aaee0 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLBloggerPostList.m @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerPostList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerPostList (0 custom class methods, 4 custom properties) + +#import "GTLBloggerPostList.h" + +#import "GTLBloggerPost.h" + +// ---------------------------------------------------------------------------- +// +// GTLBloggerPostList +// + +@implementation GTLBloggerPostList +@dynamic items, kind, nextPageToken, prevPageToken; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBloggerPost class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"blogger#postList"]; +} + +@end diff --git a/GTL/Source/Services/Blogger/Generated/GTLBloggerUser.h b/GTL/Source/Services/Blogger/Generated/GTLBloggerUser.h new file mode 100644 index 0000000..e899eb3 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLBloggerUser.h @@ -0,0 +1,109 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerUser.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerUser (0 custom class methods, 9 custom properties) +// GTLBloggerUserBlogs (0 custom class methods, 1 custom properties) +// GTLBloggerUserLocale (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBloggerUserBlogs; +@class GTLBloggerUserLocale; + +// ---------------------------------------------------------------------------- +// +// GTLBloggerUser +// + +@interface GTLBloggerUser : GTLObject + +// Profile summary information. +@property (copy) NSString *about; + +// The container of blogs for this user. +@property (retain) GTLBloggerUserBlogs *blogs; + +// The timestamp of when this profile was created, in seconds since epoch. +@property (retain) GTLDateTime *created; + +// The display name. +@property (copy) NSString *displayName; + +// The identifier for this User. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The kind of this entity. Always blogger#user +@property (copy) NSString *kind; + +// This user's locale +@property (retain) GTLBloggerUserLocale *locale; + +// The API REST URL to fetch this resource from. +@property (copy) NSString *selfLink; + +// The user's profile page. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerUserBlogs +// + +@interface GTLBloggerUserBlogs : GTLObject + +// The URL of the Blogs for this user. +@property (copy) NSString *selfLink; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerUserLocale +// + +@interface GTLBloggerUserLocale : GTLObject + +// The user's country setting. +@property (copy) NSString *country; + +// The user's language setting. +@property (copy) NSString *language; + +// The user's language variant setting. +@property (copy) NSString *variant; + +@end diff --git a/GTL/Source/Services/Blogger/Generated/GTLBloggerUser.m b/GTL/Source/Services/Blogger/Generated/GTLBloggerUser.m new file mode 100644 index 0000000..792431c --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLBloggerUser.m @@ -0,0 +1,75 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBloggerUser.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLBloggerUser (0 custom class methods, 9 custom properties) +// GTLBloggerUserBlogs (0 custom class methods, 1 custom properties) +// GTLBloggerUserLocale (0 custom class methods, 3 custom properties) + +#import "GTLBloggerUser.h" + +// ---------------------------------------------------------------------------- +// +// GTLBloggerUser +// + +@implementation GTLBloggerUser +@dynamic about, blogs, created, displayName, identifier, kind, locale, selfLink, + url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"blogger#user"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerUserBlogs +// + +@implementation GTLBloggerUserBlogs +@dynamic selfLink; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBloggerUserLocale +// + +@implementation GTLBloggerUserLocale +@dynamic country, language, variant; +@end diff --git a/GTL/Source/Services/Blogger/Generated/GTLBlogger_Sources.m b/GTL/Source/Services/Blogger/Generated/GTLBlogger_Sources.m new file mode 100644 index 0000000..710cd39 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLBlogger_Sources.m @@ -0,0 +1,45 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBlogger_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started + +#import "GTLBloggerConstants.m" + +#import "GTLBloggerBlog.m" +#import "GTLBloggerBlogList.m" +#import "GTLBloggerComment.m" +#import "GTLBloggerCommentList.m" +#import "GTLBloggerPage.m" +#import "GTLBloggerPageList.m" +#import "GTLBloggerPost.m" +#import "GTLBloggerPostList.m" +#import "GTLBloggerUser.m" + +#import "GTLQueryBlogger.m" +#import "GTLServiceBlogger.m" diff --git a/GTL/Source/Services/Blogger/Generated/GTLQueryBlogger.h b/GTL/Source/Services/Blogger/Generated/GTLQueryBlogger.h new file mode 100644 index 0000000..104c6aa --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLQueryBlogger.h @@ -0,0 +1,290 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryBlogger.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLQueryBlogger (16 custom class methods, 17 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLBloggerPost; + +@interface GTLQueryBlogger : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *blogId; +@property (copy) NSString *commentId; +@property (retain) GTLDateTime *endDate; +@property (assign) BOOL fetchBodies; +@property (copy) NSString *labels; +@property (assign) NSUInteger maxComments; +@property (assign) NSUInteger maxPosts; +@property (assign) NSUInteger maxResults; +@property (copy) NSString *pageId; +@property (copy) NSString *pageToken; +@property (copy) NSString *path; +@property (copy) NSString *postId; +@property (copy) NSString *q; +@property (retain) GTLDateTime *startDate; +@property (copy) NSString *url; +@property (copy) NSString *userId; + +#pragma mark - +#pragma mark "blogs" methods +// These create a GTLQueryBlogger object. + +// Method: blogger.blogs.get +// Gets one blog by id. +// Required: +// blogId: The ID of the blog to get. +// Optional: +// maxPosts: Maximum number of posts to pull back with the blog. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// kGTLAuthScopeBloggerReadonly +// Fetches a GTLBloggerBlog. ++ (id)queryForBlogsGetWithBlogId:(NSString *)blogId; + +// Method: blogger.blogs.getByUrl +// Retrieve a Blog by URL. +// Optional: +// url: The URL of the blog to retrieve. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// kGTLAuthScopeBloggerReadonly +// Fetches a GTLBloggerBlog. ++ (id)queryForBlogsGetByUrl; + +// Method: blogger.blogs.listByUser +// Retrieves a list of blogs, possibly filtered. +// Required: +// userId: ID of the user whose blogs are to be fetched. Either the word +// 'self' (sans quote marks) or the user's profile identifier. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// kGTLAuthScopeBloggerReadonly +// Fetches a GTLBloggerBlogList. ++ (id)queryForBlogsListByUserWithUserId:(NSString *)userId; + +#pragma mark - +#pragma mark "comments" methods +// These create a GTLQueryBlogger object. + +// Method: blogger.comments.get +// Gets one comment by id. +// Required: +// blogId: ID of the blog to containing the comment. +// postId: ID of the post to fetch posts from. +// commentId: The ID of the comment to get. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// kGTLAuthScopeBloggerReadonly +// Fetches a GTLBloggerComment. ++ (id)queryForCommentsGetWithBlogId:(NSString *)blogId + postId:(NSString *)postId + commentId:(NSString *)commentId; + +// Method: blogger.comments.list +// Retrieves the comments for a blog, possibly filtered. +// Required: +// blogId: ID of the blog to fetch comments from. +// postId: ID of the post to fetch posts from. +// Optional: +// endDate: Latest date of comment to fetch, a date-time with RFC 3339 +// formatting. +// fetchBodies: Whether the body content of the comments is included. +// maxResults: Maximum number of comments to include in the result. +// pageToken: Continuation token if request is paged. +// startDate: Earliest date of comment to fetch, a date-time with RFC 3339 +// formatting. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// kGTLAuthScopeBloggerReadonly +// Fetches a GTLBloggerCommentList. ++ (id)queryForCommentsListWithBlogId:(NSString *)blogId + postId:(NSString *)postId; + +#pragma mark - +#pragma mark "pages" methods +// These create a GTLQueryBlogger object. + +// Method: blogger.pages.get +// Gets one blog page by id. +// Required: +// blogId: ID of the blog containing the page. +// pageId: The ID of the page to get. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// kGTLAuthScopeBloggerReadonly +// Fetches a GTLBloggerPage. ++ (id)queryForPagesGetWithBlogId:(NSString *)blogId + pageId:(NSString *)pageId; + +// Method: blogger.pages.list +// Retrieves pages for a blog, possibly filtered. +// Required: +// blogId: ID of the blog to fetch pages from. +// Optional: +// fetchBodies: Whether to retrieve the Page bodies. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// kGTLAuthScopeBloggerReadonly +// Fetches a GTLBloggerPageList. ++ (id)queryForPagesListWithBlogId:(NSString *)blogId; + +#pragma mark - +#pragma mark "posts" methods +// These create a GTLQueryBlogger object. + +// Method: blogger.posts.delete +// Delete a post by id. +// Required: +// blogId: The Id of the Blog. +// postId: The ID of the Post. +// Authorization scope(s): +// kGTLAuthScopeBlogger ++ (id)queryForPostsDeleteWithBlogId:(NSString *)blogId + postId:(NSString *)postId; + +// Method: blogger.posts.get +// Get a post by id. +// Required: +// blogId: ID of the blog to fetch the post from. +// postId: The ID of the post +// Optional: +// maxComments: Maximum number of comments to pull back on a post. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// kGTLAuthScopeBloggerReadonly +// Fetches a GTLBloggerPost. ++ (id)queryForPostsGetWithBlogId:(NSString *)blogId + postId:(NSString *)postId; + +// Method: blogger.posts.getByPath +// Retrieve a Post by Path. +// Required: +// blogId: ID of the blog to fetch the post from. +// Optional: +// maxComments: Maximum number of comments to pull back on a post. +// path: Path of the Post to retrieve. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// kGTLAuthScopeBloggerReadonly +// Fetches a GTLBloggerPost. ++ (id)queryForPostsGetByPathWithBlogId:(NSString *)blogId; + +// Method: blogger.posts.insert +// Add a post. +// Required: +// blogId: ID of the blog to fetch the post from. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// Fetches a GTLBloggerPost. ++ (id)queryForPostsInsertWithObject:(GTLBloggerPost *)object + blogId:(NSString *)blogId; + +// Method: blogger.posts.list +// Retrieves a list of posts, possibly filtered. +// Required: +// blogId: ID of the blog to fetch posts from. +// Optional: +// endDate: Latest post date to fetch, a date-time with RFC 3339 formatting. +// fetchBodies: Whether the body content of posts is included. +// labels: Comma-separated list of labels to search for. +// maxResults: Maximum number of posts to fetch. +// pageToken: Continuation token if the request is paged. +// startDate: Earliest post date to fetch, a date-time with RFC 3339 +// formatting. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// kGTLAuthScopeBloggerReadonly +// Fetches a GTLBloggerPostList. ++ (id)queryForPostsListWithBlogId:(NSString *)blogId; + +// Method: blogger.posts.patch +// Update a post. This method supports patch semantics. +// Required: +// blogId: The ID of the Blog. +// postId: The ID of the Post. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// Fetches a GTLBloggerPost. ++ (id)queryForPostsPatchWithObject:(GTLBloggerPost *)object + blogId:(NSString *)blogId + postId:(NSString *)postId; + +// Method: blogger.posts.search +// Search for a post. +// Required: +// blogId: ID of the blog to fetch the post from. +// Optional: +// q: Query terms to search this blog for matching posts. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// kGTLAuthScopeBloggerReadonly +// Fetches a GTLBloggerPostList. ++ (id)queryForPostsSearchWithBlogId:(NSString *)blogId; + +// Method: blogger.posts.update +// Update a post. +// Required: +// blogId: The ID of the Blog. +// postId: The ID of the Post. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// Fetches a GTLBloggerPost. ++ (id)queryForPostsUpdateWithObject:(GTLBloggerPost *)object + blogId:(NSString *)blogId + postId:(NSString *)postId; + +#pragma mark - +#pragma mark "users" methods +// These create a GTLQueryBlogger object. + +// Method: blogger.users.get +// Gets one user by id. +// Required: +// userId: The ID of the user to get. +// Authorization scope(s): +// kGTLAuthScopeBlogger +// kGTLAuthScopeBloggerReadonly +// Fetches a GTLBloggerUser. ++ (id)queryForUsersGetWithUserId:(NSString *)userId; + +@end diff --git a/GTL/Source/Services/Blogger/Generated/GTLQueryBlogger.m b/GTL/Source/Services/Blogger/Generated/GTLQueryBlogger.m new file mode 100644 index 0000000..9d80911 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLQueryBlogger.m @@ -0,0 +1,229 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryBlogger.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLQueryBlogger (16 custom class methods, 17 custom properties) + +#import "GTLQueryBlogger.h" + +#import "GTLBloggerBlog.h" +#import "GTLBloggerBlogList.h" +#import "GTLBloggerComment.h" +#import "GTLBloggerCommentList.h" +#import "GTLBloggerPage.h" +#import "GTLBloggerPageList.h" +#import "GTLBloggerPost.h" +#import "GTLBloggerPostList.h" +#import "GTLBloggerUser.h" + +@implementation GTLQueryBlogger + +@dynamic blogId, commentId, endDate, fetchBodies, fields, labels, maxComments, + maxPosts, maxResults, pageId, pageToken, path, postId, q, startDate, + url, userId; + +#pragma mark - +#pragma mark "blogs" methods +// These create a GTLQueryBlogger object. + ++ (id)queryForBlogsGetWithBlogId:(NSString *)blogId { + NSString *methodName = @"blogger.blogs.get"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.blogId = blogId; + query.expectedObjectClass = [GTLBloggerBlog class]; + return query; +} + ++ (id)queryForBlogsGetByUrl { + NSString *methodName = @"blogger.blogs.getByUrl"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLBloggerBlog class]; + return query; +} + ++ (id)queryForBlogsListByUserWithUserId:(NSString *)userId { + NSString *methodName = @"blogger.blogs.listByUser"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.userId = userId; + query.expectedObjectClass = [GTLBloggerBlogList class]; + return query; +} + +#pragma mark - +#pragma mark "comments" methods +// These create a GTLQueryBlogger object. + ++ (id)queryForCommentsGetWithBlogId:(NSString *)blogId + postId:(NSString *)postId + commentId:(NSString *)commentId { + NSString *methodName = @"blogger.comments.get"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.blogId = blogId; + query.postId = postId; + query.commentId = commentId; + query.expectedObjectClass = [GTLBloggerComment class]; + return query; +} + ++ (id)queryForCommentsListWithBlogId:(NSString *)blogId + postId:(NSString *)postId { + NSString *methodName = @"blogger.comments.list"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.blogId = blogId; + query.postId = postId; + query.expectedObjectClass = [GTLBloggerCommentList class]; + return query; +} + +#pragma mark - +#pragma mark "pages" methods +// These create a GTLQueryBlogger object. + ++ (id)queryForPagesGetWithBlogId:(NSString *)blogId + pageId:(NSString *)pageId { + NSString *methodName = @"blogger.pages.get"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.blogId = blogId; + query.pageId = pageId; + query.expectedObjectClass = [GTLBloggerPage class]; + return query; +} + ++ (id)queryForPagesListWithBlogId:(NSString *)blogId { + NSString *methodName = @"blogger.pages.list"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.blogId = blogId; + query.expectedObjectClass = [GTLBloggerPageList class]; + return query; +} + +#pragma mark - +#pragma mark "posts" methods +// These create a GTLQueryBlogger object. + ++ (id)queryForPostsDeleteWithBlogId:(NSString *)blogId + postId:(NSString *)postId { + NSString *methodName = @"blogger.posts.delete"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.blogId = blogId; + query.postId = postId; + return query; +} + ++ (id)queryForPostsGetWithBlogId:(NSString *)blogId + postId:(NSString *)postId { + NSString *methodName = @"blogger.posts.get"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.blogId = blogId; + query.postId = postId; + query.expectedObjectClass = [GTLBloggerPost class]; + return query; +} + ++ (id)queryForPostsGetByPathWithBlogId:(NSString *)blogId { + NSString *methodName = @"blogger.posts.getByPath"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.blogId = blogId; + query.expectedObjectClass = [GTLBloggerPost class]; + return query; +} + ++ (id)queryForPostsInsertWithObject:(GTLBloggerPost *)object + blogId:(NSString *)blogId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"blogger.posts.insert"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.blogId = blogId; + query.expectedObjectClass = [GTLBloggerPost class]; + return query; +} + ++ (id)queryForPostsListWithBlogId:(NSString *)blogId { + NSString *methodName = @"blogger.posts.list"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.blogId = blogId; + query.expectedObjectClass = [GTLBloggerPostList class]; + return query; +} + ++ (id)queryForPostsPatchWithObject:(GTLBloggerPost *)object + blogId:(NSString *)blogId + postId:(NSString *)postId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"blogger.posts.patch"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.blogId = blogId; + query.postId = postId; + query.expectedObjectClass = [GTLBloggerPost class]; + return query; +} + ++ (id)queryForPostsSearchWithBlogId:(NSString *)blogId { + NSString *methodName = @"blogger.posts.search"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.blogId = blogId; + query.expectedObjectClass = [GTLBloggerPostList class]; + return query; +} + ++ (id)queryForPostsUpdateWithObject:(GTLBloggerPost *)object + blogId:(NSString *)blogId + postId:(NSString *)postId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"blogger.posts.update"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.blogId = blogId; + query.postId = postId; + query.expectedObjectClass = [GTLBloggerPost class]; + return query; +} + +#pragma mark - +#pragma mark "users" methods +// These create a GTLQueryBlogger object. + ++ (id)queryForUsersGetWithUserId:(NSString *)userId { + NSString *methodName = @"blogger.users.get"; + GTLQueryBlogger *query = [self queryWithMethodName:methodName]; + query.userId = userId; + query.expectedObjectClass = [GTLBloggerUser class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Blogger/Generated/GTLServiceBlogger.h b/GTL/Source/Services/Blogger/Generated/GTLServiceBlogger.h new file mode 100644 index 0000000..7c4baa4 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLServiceBlogger.h @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceBlogger.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLServiceBlogger (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceBlogger : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryBlogger.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Blogger/Generated/GTLServiceBlogger.m b/GTL/Source/Services/Blogger/Generated/GTLServiceBlogger.m new file mode 100644 index 0000000..1fda9a7 --- /dev/null +++ b/GTL/Source/Services/Blogger/Generated/GTLServiceBlogger.m @@ -0,0 +1,69 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceBlogger.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Blogger API (blogger/v3) +// Description: +// API for access to the data within Blogger. +// Documentation: +// https://developers.google.com/blogger/docs/3.0/getting_started +// Classes: +// GTLServiceBlogger (0 custom class methods, 0 custom properties) + +#import "GTLBlogger.h" + +@implementation GTLServiceBlogger + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryBlogger class], + [GTLBloggerBlog class], + [GTLBloggerBlogList class], + [GTLBloggerComment class], + [GTLBloggerCommentList class], + [GTLBloggerPage class], + [GTLBloggerPageList class], + [GTLBloggerPost class], + [GTLBloggerPostList class], + [GTLBloggerUser class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v3"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Books/.svn/all-wcprops b/GTL/Source/Services/Books/.svn/all-wcprops new file mode 100644 index 0000000..3a6ee15 --- /dev/null +++ b/GTL/Source/Services/Books/.svn/all-wcprops @@ -0,0 +1,5 @@ +K 25 +svn:wc:ra_dav:version-url +V 45 +/svn/!svn/ver/248/trunk/Source/Services/Books +END diff --git a/GTL/Source/Services/Books/.svn/entries b/GTL/Source/Services/Books/.svn/entries new file mode 100644 index 0000000..97f200a --- /dev/null +++ b/GTL/Source/Services/Books/.svn/entries @@ -0,0 +1,31 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Books +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-12-06T21:11:28.758294Z +248 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +Generated +dir + diff --git a/GTL/Source/Services/Books/Generated/.svn/all-wcprops b/GTL/Source/Services/Books/Generated/.svn/all-wcprops new file mode 100644 index 0000000..f8e8c82 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/all-wcprops @@ -0,0 +1,281 @@ +K 25 +svn:wc:ra_dav:version-url +V 55 +/svn/!svn/ver/248/trunk/Source/Services/Books/Generated +END +GTLBooksDownloadAccesses.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksDownloadAccesses.m +END +GTLBooks_Sources.m +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/225/trunk/Source/Services/Books/Generated/GTLBooks_Sources.m +END +GTLBooksAnnotationsdata.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksAnnotationsdata.h +END +GTLBooksLayersummary.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksLayersummary.h +END +GTLBooksVolumes.h +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksVolumes.h +END +GTLBooksAnnotationsdata.m +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksAnnotationsdata.m +END +GTLBooksLayersummary.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksLayersummary.m +END +GTLBooksVolumes.m +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksVolumes.m +END +GTLBooksAnnotationdata.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksAnnotationdata.h +END +GTLBooksAnnotationdata.m +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksAnnotationdata.m +END +GTLBooksConstants.h +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksConstants.h +END +GTLBooksBookshelf.h +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksBookshelf.h +END +GTLBooks.h +K 25 +svn:wc:ra_dav:version-url +V 66 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooks.h +END +GTLBooksDownloadAccessRestriction.h +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksDownloadAccessRestriction.h +END +GTLBooksBookshelf.m +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksBookshelf.m +END +GTLBooksConstants.m +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksConstants.m +END +GTLBooksDownloadAccessRestriction.m +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksDownloadAccessRestriction.m +END +GTLBooksBookshelves.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksBookshelves.h +END +GTLBooksVolumeannotations.h +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksVolumeannotations.h +END +GTLBooksBookshelves.m +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksBookshelves.m +END +GTLBooksConcurrentAccessRestriction.h +K 25 +svn:wc:ra_dav:version-url +V 93 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksConcurrentAccessRestriction.h +END +GTLBooksVolumeannotations.m +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksVolumeannotations.m +END +GTLBooksAnnotations.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksAnnotations.h +END +GTLBooksReadingPosition.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksReadingPosition.h +END +GTLBooksConcurrentAccessRestriction.m +K 25 +svn:wc:ra_dav:version-url +V 93 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksConcurrentAccessRestriction.m +END +GTLServiceBooks.h +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLServiceBooks.h +END +GTLBooksReview.h +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksReview.h +END +GTLBooksLayersummaries.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksLayersummaries.h +END +GTLBooksAnnotations.m +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksAnnotations.m +END +GTLBooksVolumeannotation.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksVolumeannotation.h +END +GTLBooksReadingPosition.m +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksReadingPosition.m +END +GTLServiceBooks.m +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLServiceBooks.m +END +GTLQueryBooks.h +K 25 +svn:wc:ra_dav:version-url +V 71 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLQueryBooks.h +END +GTLBooksReview.m +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksReview.m +END +GTLBooksLayersummaries.m +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksLayersummaries.m +END +GTLBooksVolumeannotation.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksVolumeannotation.m +END +GTLBooksVolume.h +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/248/trunk/Source/Services/Books/Generated/GTLBooksVolume.h +END +GTLBooksAnnotationsRange.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksAnnotationsRange.h +END +GTLQueryBooks.m +K 25 +svn:wc:ra_dav:version-url +V 71 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLQueryBooks.m +END +GTLBooksRequestAccess.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksRequestAccess.h +END +GTLBooksAnnotation.h +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksAnnotation.h +END +GTLBooksVolume.m +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/248/trunk/Source/Services/Books/Generated/GTLBooksVolume.m +END +GTLBooksAnnotationsRange.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksAnnotationsRange.m +END +GTLBooksAnnotation.m +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksAnnotation.m +END +GTLBooksRequestAccess.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksRequestAccess.m +END +GTLBooksDownloadAccesses.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/213/trunk/Source/Services/Books/Generated/GTLBooksDownloadAccesses.h +END diff --git a/GTL/Source/Services/Books/Generated/.svn/entries b/GTL/Source/Services/Books/Generated/.svn/entries new file mode 100644 index 0000000..79e5a57 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/entries @@ -0,0 +1,1592 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Books/Generated +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-12-06T21:11:28.758294Z +248 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +GTLBooksDownloadAccesses.m +file + + + + +2012-12-09T08:42:33.000000Z +3a96e0d16c1e3d38bf01680fb93fd643 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1670 + +GTLBooks_Sources.m +file + + + + +2012-12-09T08:42:33.000000Z +04a94acde8ecfbb68c06325e469664fe +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1838 + +GTLBooksAnnotationsdata.h +file + + + + +2012-12-09T08:42:33.000000Z +284bc4ad9991a429e2aba96062c322a6 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1948 + +GTLBooksLayersummary.h +file + + + + +2012-12-09T08:42:33.000000Z +f395190dc350f75b3662b545588125d6 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2482 + +GTLBooksVolumes.h +file + + + + +2012-12-09T08:42:33.000000Z +f26d3907b49d467643b25fa921f5b897 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1819 + +GTLBooksAnnotationsdata.m +file + + + + +2012-12-09T08:42:33.000000Z +62f41cfb854c3cde5c27de4dc25b5c2d +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1643 + +GTLBooksLayersummary.m +file + + + + +2012-12-09T08:42:33.000000Z +2b42dae089520a506261f423a394a872 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1899 + +GTLBooksVolumes.m +file + + + + +2012-12-09T08:42:33.000000Z +ee4c76976e2dcea9216ed093ea75dd27 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1564 + +GTLBooksAnnotationdata.h +file + + + + +2012-12-09T08:42:33.000000Z +ab01c0f2f07f558ceca115acf54da9c7 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2145 + +GTLBooksAnnotationdata.m +file + + + + +2012-12-09T08:42:33.000000Z +d002c62e73049a8fe751a3c490a53326 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1665 + +GTLBooksConstants.h +file + + + + +2012-12-09T08:42:33.000000Z +eb656df2e4f1012c05d5333bb8d82f7c +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2977 + +GTLBooksBookshelf.h +file + + + + +2012-12-09T08:42:33.000000Z +45468caddac109ab93f3d41fda941eb8 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2476 + +GTLBooks.h +file + + + + +2012-12-09T08:42:33.000000Z +cd124ff3b7006f08de432d60aa9c4ebb +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1719 + +GTLBooksDownloadAccessRestriction.h +file + + + + +2012-12-09T08:42:33.000000Z +84b2b1adf3413720ed6846211f92fdd6 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2822 + +GTLBooksConstants.m +file + + + + +2012-12-09T08:42:33.000000Z +7b19f50bc53e0331526d1498205497c7 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2570 + +GTLBooksBookshelf.m +file + + + + +2012-12-09T08:42:33.000000Z +803e062c74dd6ddbfa7dab9e2d26b80a +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1667 + +GTLBooksDownloadAccessRestriction.m +file + + + + +2012-12-09T08:42:33.000000Z +d9cb2857aeca856414cb1acc00941bd6 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1586 + +GTLBooksBookshelves.h +file + + + + +2012-12-09T08:42:33.000000Z +3aba2825be825103e8e58ca32da07c1d +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1646 + +GTLBooksVolumeannotations.h +file + + + + +2012-12-09T08:42:33.000000Z +fb57830ece754d299b975975ea07a48b +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1963 + +GTLBooksBookshelves.m +file + + + + +2012-12-09T08:42:33.000000Z +d4ec7c8b0bc0591540ea99f4033ac82d +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1582 + +GTLBooksConcurrentAccessRestriction.h +file + + + + +2012-12-09T08:42:33.000000Z +4ac4424ede07c62b52107a5c4dbdaa29 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2450 + +GTLBooksVolumeannotations.m +file + + + + +2012-12-09T08:42:33.000000Z +572a15589f62833acb2fa5b3238247fd +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1659 + +GTLBooksAnnotations.h +file + + + + +2012-12-09T08:42:33.000000Z +7eedb58efe135df7027f84b3e244bd5e +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2016 + +GTLBooksReadingPosition.h +file + + + + +2012-12-09T08:42:33.000000Z +7158977073041b2eaf208eb7fb6e8e7b +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1992 + +GTLBooksConcurrentAccessRestriction.m +file + + + + +2012-12-09T08:42:33.000000Z +d8b14fa8f6f4f026657dfbd9082ca8f6 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1577 + +GTLServiceBooks.h +file + + + + +2012-12-09T08:42:33.000000Z +f7741cae3d30d605b9d7aa97cd8a24be +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2110 + +GTLBooksReview.h +file + + + + +2012-12-09T08:42:33.000000Z +fd324dc87a8cd9182b5ae1fc20ae1767 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3113 + +GTLBooksLayersummaries.h +file + + + + +2012-12-09T08:42:33.000000Z +db8c2db7d5a370f520c965a62f98bc22 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1773 + +GTLBooksAnnotations.m +file + + + + +2012-12-09T08:42:33.000000Z +4ccd368c85aa8bc69447086cd7460d3e +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1611 + +GTLBooksVolumeannotation.h +file + + + + +2012-12-09T08:42:33.000000Z +adae07f3b2960994e55ddfaf0720ddb1 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3441 + +GTLBooksReadingPosition.m +file + + + + +2012-12-09T08:42:33.000000Z +6e146964fe9dfcde7144d79bc522ab06 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1461 + +GTLServiceBooks.m +file + + + + +2012-12-09T08:42:33.000000Z +0da12fdf71991f5ae692b6291fceb399 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2858 + +GTLQueryBooks.h +file + + + + +2012-12-09T08:42:33.000000Z +149c9f723c3b53e9046612b7af03ccf3 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +26091 + +GTLBooksReview.m +file + + + + +2012-12-09T08:42:33.000000Z +573b8480907b3d32dd437cd635246929 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2133 + +GTLBooksLayersummaries.m +file + + + + +2012-12-09T08:42:33.000000Z +d2218713c96b8b4324867d36ded09528 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1618 + +GTLBooksVolumeannotation.m +file + + + + +2012-12-09T08:42:33.000000Z +11ddb1b2ff4e516eb378c33e10f72672 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2303 + +GTLBooksVolume.h +file + + + + +2012-12-09T08:42:33.000000Z +8a4c7450102c2086e82e8ca7a1d69a29 +2012-12-06T21:11:28.758294Z +248 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +15947 + +GTLBooksAnnotationsRange.h +file + + + + +2012-12-09T08:42:33.000000Z +b23090eae4eb208736a26f2e4f924b5e +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1666 + +GTLQueryBooks.m +file + + + + +2012-12-09T08:42:33.000000Z +ba8b5ecc1ccbdffb9df1437997ba03ca +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +14690 + +GTLBooksRequestAccess.h +file + + + + +2012-12-09T08:42:33.000000Z +068bd07f1021859ac7b1dbdee00692fa +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1679 + +GTLBooksAnnotation.h +file + + + + +2012-12-09T08:42:33.000000Z +f42bb0e55e5aa60e0055ca4e2e3bbdd5 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4408 + +GTLBooksVolume.m +file + + + + +2012-12-09T08:42:33.000000Z +bd1538b9f87a3e5d5cf9d0d4e1aa232b +2012-12-06T21:11:28.758294Z +248 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +6781 + +GTLBooksAnnotationsRange.m +file + + + + +2012-12-09T08:42:33.000000Z +88e496b916c20365c0ceff031fe3cf1a +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1340 + +GTLBooksAnnotation.m +file + + + + +2012-12-09T08:42:33.000000Z +14a7e359334da72fd9cc6bcfcea24f75 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2650 + +GTLBooksRequestAccess.m +file + + + + +2012-12-09T08:42:33.000000Z +3d2fbad85d288d696cca1da9e98e6348 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1487 + +GTLBooksDownloadAccesses.h +file + + + + +2012-12-09T08:42:33.000000Z +93ddee205c3cb3edcf2f807e0ff5e1f5 +2012-09-18T19:09:54.390806Z +213 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1567 + diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooks.h.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooks.h.svn-base new file mode 100644 index 0000000..f7d689c --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooks.h.svn-base @@ -0,0 +1,52 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooks.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started + +#import "GTLBooksConstants.h" + +#import "GTLBooksAnnotation.h" +#import "GTLBooksAnnotationdata.h" +#import "GTLBooksAnnotations.h" +#import "GTLBooksAnnotationsdata.h" +#import "GTLBooksAnnotationsRange.h" +#import "GTLBooksBookshelf.h" +#import "GTLBooksBookshelves.h" +#import "GTLBooksConcurrentAccessRestriction.h" +#import "GTLBooksDownloadAccesses.h" +#import "GTLBooksDownloadAccessRestriction.h" +#import "GTLBooksLayersummaries.h" +#import "GTLBooksLayersummary.h" +#import "GTLBooksReadingPosition.h" +#import "GTLBooksRequestAccess.h" +#import "GTLBooksReview.h" +#import "GTLBooksVolume.h" +#import "GTLBooksVolumeannotation.h" +#import "GTLBooksVolumeannotations.h" +#import "GTLBooksVolumes.h" + +#import "GTLQueryBooks.h" +#import "GTLServiceBooks.h" diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotation.h.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotation.h.svn-base new file mode 100644 index 0000000..7bc5b58 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotation.h.svn-base @@ -0,0 +1,143 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksAnnotation.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksAnnotation (0 custom class methods, 16 custom properties) +// GTLBooksAnnotationClientVersionRanges (0 custom class methods, 4 custom properties) +// GTLBooksAnnotationCurrentVersionRanges (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBooksAnnotationClientVersionRanges; +@class GTLBooksAnnotationCurrentVersionRanges; +@class GTLBooksAnnotationsRange; + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotation +// + +@interface GTLBooksAnnotation : GTLObject + +// Anchor text after excerpt. +@property (copy) NSString *afterSelectedText; + +// Anchor text before excerpt. +@property (copy) NSString *beforeSelectedText; + +// Selection ranges sent from the client. +@property (retain) GTLBooksAnnotationClientVersionRanges *clientVersionRanges; + +// Timestamp for the created time of this annotation. +@property (retain) GTLDateTime *created; + +// Selection ranges for the most recent content version. +@property (retain) GTLBooksAnnotationCurrentVersionRanges *currentVersionRanges; + +// User-created data for this annotation. +@property (copy) NSString *data; + +// Indicates that this annotation is deleted. +@property (retain) NSNumber *deleted; // boolValue + +// The highlight style for this annotation. +@property (copy) NSString *highlightStyle; + +// Id of this annotation, in the form of a GUID. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Resource type. +@property (copy) NSString *kind; + +// The layer this annotation is for. +@property (copy) NSString *layerId; + +// Pages that this annotation spans. +@property (retain) NSArray *pageIds; // of NSString + +// Excerpt from the volume. +@property (copy) NSString *selectedText; + +// URL to this resource. +@property (copy) NSString *selfLink; + +// Timestamp for the last time this annotation was modified. +@property (retain) GTLDateTime *updated; + +// The volume that this annotation belongs to. +@property (copy) NSString *volumeId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotationClientVersionRanges +// + +@interface GTLBooksAnnotationClientVersionRanges : GTLObject + +// Range in CFI format for this annotation sent by client. +@property (retain) GTLBooksAnnotationsRange *cfiRange; + +// Content version the client sent in. +@property (copy) NSString *contentVersion; + +// Range in GB image format for this annotation sent by client. +@property (retain) GTLBooksAnnotationsRange *gbImageRange; + +// Range in GB text format for this annotation sent by client. +@property (retain) GTLBooksAnnotationsRange *gbTextRange; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotationCurrentVersionRanges +// + +@interface GTLBooksAnnotationCurrentVersionRanges : GTLObject + +// Range in CFI format for this annotation for version above. +@property (retain) GTLBooksAnnotationsRange *cfiRange; + +// Content version applicable to ranges below. +@property (copy) NSString *contentVersion; + +// Range in GB image format for this annotation for version above. +@property (retain) GTLBooksAnnotationsRange *gbImageRange; + +// Range in GB text format for this annotation for version above. +@property (retain) GTLBooksAnnotationsRange *gbTextRange; + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotation.m.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotation.m.svn-base new file mode 100644 index 0000000..49b7212 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotation.m.svn-base @@ -0,0 +1,85 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksAnnotation.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksAnnotation (0 custom class methods, 16 custom properties) +// GTLBooksAnnotationClientVersionRanges (0 custom class methods, 4 custom properties) +// GTLBooksAnnotationCurrentVersionRanges (0 custom class methods, 4 custom properties) + +#import "GTLBooksAnnotation.h" + +#import "GTLBooksAnnotationsRange.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotation +// + +@implementation GTLBooksAnnotation +@dynamic afterSelectedText, beforeSelectedText, clientVersionRanges, created, + currentVersionRanges, data, deleted, highlightStyle, identifier, kind, + layerId, pageIds, selectedText, selfLink, updated, volumeId; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"pageIds"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#annotation"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotationClientVersionRanges +// + +@implementation GTLBooksAnnotationClientVersionRanges +@dynamic cfiRange, contentVersion, gbImageRange, gbTextRange; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotationCurrentVersionRanges +// + +@implementation GTLBooksAnnotationCurrentVersionRanges +@dynamic cfiRange, contentVersion, gbImageRange, gbTextRange; +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotationdata.h.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotationdata.h.svn-base new file mode 100644 index 0000000..f656f9f --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotationdata.h.svn-base @@ -0,0 +1,72 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksAnnotationdata.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksAnnotationdata (0 custom class methods, 9 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotationdata +// + +@interface GTLBooksAnnotationdata : GTLObject + +// The type of annotation this data is for. +@property (copy) NSString *annotationType; + +@property (retain) id data; + +// Base64 encoded data for this annotation data. +@property (copy) NSString *encodedData; // GTLBase64 can encode/decode (probably web-safe format) + +// Unique id for this annotation data. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Resource Type +@property (copy) NSString *kind; + +// The Layer id for this data. * +@property (copy) NSString *layerId; + +// URL for this resource. * +@property (copy) NSString *selfLink; + +// Timestamp for the last time this data was updated. (RFC 3339 UTC date-time +// format). +@property (retain) GTLDateTime *updated; + +// The volume id for this data. * +@property (copy) NSString *volumeId; + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotationdata.m.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotationdata.m.svn-base new file mode 100644 index 0000000..6b843dd --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotationdata.m.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksAnnotationdata.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksAnnotationdata (0 custom class methods, 9 custom properties) + +#import "GTLBooksAnnotationdata.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotationdata +// + +@implementation GTLBooksAnnotationdata +@dynamic annotationType, data, encodedData, identifier, kind, layerId, selfLink, + updated, volumeId; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"encoded_data", @"encodedData", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#annotationdata"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotations.h.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotations.h.svn-base new file mode 100644 index 0000000..701de03 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotations.h.svn-base @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksAnnotations.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksAnnotations (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBooksAnnotation; + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotations +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLBooksAnnotations : GTLCollectionObject + +// A list of annotations. +@property (retain) NSArray *items; // of GTLBooksAnnotation + +// Resource type. +@property (copy) NSString *kind; + +// Token to pass in for pagination for the next page. This will not be present +// if this request does not have more results. +@property (copy) NSString *nextPageToken; + +// Total number of annotations found. This may be greater than the number of +// notes returned in this response if results have been paginated. +@property (retain) NSNumber *totalItems; // intValue + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotations.m.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotations.m.svn-base new file mode 100644 index 0000000..25ccc7f --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotations.m.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksAnnotations.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksAnnotations (0 custom class methods, 4 custom properties) + +#import "GTLBooksAnnotations.h" + +#import "GTLBooksAnnotation.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotations +// + +@implementation GTLBooksAnnotations +@dynamic items, kind, nextPageToken, totalItems; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBooksAnnotation class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#annotations"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotationsRange.h.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotationsRange.h.svn-base new file mode 100644 index 0000000..fb3e851 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotationsRange.h.svn-base @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksAnnotationsRange.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksAnnotationsRange (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotationsRange +// + +@interface GTLBooksAnnotationsRange : GTLObject + +// The offset from the ending position. +@property (copy) NSString *endOffset; + +// The ending position for the range. +@property (copy) NSString *endPosition; + +// The offset from the starting position. +@property (copy) NSString *startOffset; + +// The starting position for the range. +@property (copy) NSString *startPosition; + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotationsRange.m.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotationsRange.m.svn-base new file mode 100644 index 0000000..e6a4602 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotationsRange.m.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksAnnotationsRange.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksAnnotationsRange (0 custom class methods, 4 custom properties) + +#import "GTLBooksAnnotationsRange.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotationsRange +// + +@implementation GTLBooksAnnotationsRange +@dynamic endOffset, endPosition, startOffset, startPosition; +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotationsdata.h.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotationsdata.h.svn-base new file mode 100644 index 0000000..c9991fa --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotationsdata.h.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksAnnotationsdata.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksAnnotationsdata (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBooksAnnotationdata; + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotationsdata +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLBooksAnnotationsdata : GTLCollectionObject + +// A list of Annotation Data. +@property (retain) NSArray *items; // of GTLBooksAnnotationdata + +// Resource type +@property (copy) NSString *kind; + +// Token to pass in for pagination for the next page. This will not be present +// if this request does not have more results. +@property (copy) NSString *nextPageToken; + +// The total number of volume annotations found. +@property (retain) NSNumber *totalItems; // intValue + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotationsdata.m.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotationsdata.m.svn-base new file mode 100644 index 0000000..47ad982 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksAnnotationsdata.m.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksAnnotationsdata.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksAnnotationsdata (0 custom class methods, 4 custom properties) + +#import "GTLBooksAnnotationsdata.h" + +#import "GTLBooksAnnotationdata.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotationsdata +// + +@implementation GTLBooksAnnotationsdata +@dynamic items, kind, nextPageToken, totalItems; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBooksAnnotationdata class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#annotationsdata"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksBookshelf.h.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksBookshelf.h.svn-base new file mode 100644 index 0000000..4d3d345 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksBookshelf.h.svn-base @@ -0,0 +1,79 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksBookshelf.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksBookshelf (0 custom class methods, 10 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLBooksBookshelf +// + +@interface GTLBooksBookshelf : GTLObject + +// Whether this bookshelf is PUBLIC or PRIVATE. +@property (copy) NSString *access; + +// Created time for this bookshelf (formatted UTC timestamp with millisecond +// resolution). +@property (retain) GTLDateTime *created; + +// Description of this bookshelf. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Id of this bookshelf, only unique by user. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // intValue + +// Resource type for bookshelf metadata. +@property (copy) NSString *kind; + +// URL to this resource. +@property (copy) NSString *selfLink; + +// Title of this bookshelf. +@property (copy) NSString *title; + +// Last modified time of this bookshelf (formatted UTC timestamp with +// millisecond resolution). +@property (retain) GTLDateTime *updated; + +// Number of volumes in this bookshelf. +@property (retain) NSNumber *volumeCount; // intValue + +// Last time a volume was added or removed from this bookshelf (formatted UTC +// timestamp with millisecond resolution). +@property (retain) GTLDateTime *volumesLastUpdated; + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksBookshelf.m.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksBookshelf.m.svn-base new file mode 100644 index 0000000..0237fe6 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksBookshelf.m.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksBookshelf.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksBookshelf (0 custom class methods, 10 custom properties) + +#import "GTLBooksBookshelf.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksBookshelf +// + +@implementation GTLBooksBookshelf +@dynamic access, created, descriptionProperty, identifier, kind, selfLink, + title, updated, volumeCount, volumesLastUpdated; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#bookshelf"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksBookshelves.h.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksBookshelves.h.svn-base new file mode 100644 index 0000000..04c8aee --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksBookshelves.h.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksBookshelves.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksBookshelves (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBooksBookshelf; + +// ---------------------------------------------------------------------------- +// +// GTLBooksBookshelves +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLBooksBookshelves : GTLCollectionObject + +// A list of bookshelves. +@property (retain) NSArray *items; // of GTLBooksBookshelf + +// Resource type. +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksBookshelves.m.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksBookshelves.m.svn-base new file mode 100644 index 0000000..19414cf --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksBookshelves.m.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksBookshelves.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksBookshelves (0 custom class methods, 2 custom properties) + +#import "GTLBooksBookshelves.h" + +#import "GTLBooksBookshelf.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksBookshelves +// + +@implementation GTLBooksBookshelves +@dynamic items, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBooksBookshelf class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#bookshelves"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksConcurrentAccessRestriction.h.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksConcurrentAccessRestriction.h.svn-base new file mode 100644 index 0000000..0df5cdd --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksConcurrentAccessRestriction.h.svn-base @@ -0,0 +1,78 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksConcurrentAccessRestriction.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksConcurrentAccessRestriction (0 custom class methods, 11 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLBooksConcurrentAccessRestriction +// + +@interface GTLBooksConcurrentAccessRestriction : GTLObject + +// Whether access is granted for this (user, device, volume). +@property (retain) NSNumber *deviceAllowed; // boolValue + +// Resource type. +@property (copy) NSString *kind; + +// The maximum number of concurrent access licenses for this volume. +@property (retain) NSNumber *maxConcurrentDevices; // intValue + +// Error/warning message. +@property (copy) NSString *message; + +// Client nonce for verification. Download access and client-validation only. +@property (copy) NSString *nonce; + +// Error/warning reason code. +@property (copy) NSString *reasonCode; + +// Whether this volume has any concurrent access restrictions. +@property (retain) NSNumber *restricted; // boolValue + +// Response signature. +@property (copy) NSString *signature; + +// Client app identifier for verification. Download access and client-validation +// only. +@property (copy) NSString *source; + +// Time in seconds for license auto-expiration. +@property (retain) NSNumber *timeWindowSeconds; // intValue + +// Identifies the volume for which this entry applies. +@property (copy) NSString *volumeId; + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksConcurrentAccessRestriction.m.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksConcurrentAccessRestriction.m.svn-base new file mode 100644 index 0000000..d964d6a --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksConcurrentAccessRestriction.m.svn-base @@ -0,0 +1,46 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksConcurrentAccessRestriction.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksConcurrentAccessRestriction (0 custom class methods, 11 custom properties) + +#import "GTLBooksConcurrentAccessRestriction.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksConcurrentAccessRestriction +// + +@implementation GTLBooksConcurrentAccessRestriction +@dynamic deviceAllowed, kind, maxConcurrentDevices, message, nonce, reasonCode, + restricted, signature, source, timeWindowSeconds, volumeId; + ++ (void)load { + [self registerObjectClassForKind:@"books#concurrentAccessRestriction"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksConstants.h.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksConstants.h.svn-base new file mode 100644 index 0000000..3332f7c --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksConstants.h.svn-base @@ -0,0 +1,78 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// Manage your books +GTL_EXTERN NSString * const kGTLAuthScopeBooks; // "https://www.googleapis.com/auth/books" + +// Action +GTL_EXTERN NSString * const kGTLBooksActionBookmark; // "bookmark" +GTL_EXTERN NSString * const kGTLBooksActionChapter; // "chapter" +GTL_EXTERN NSString * const kGTLBooksActionNextPage; // "next-page" +GTL_EXTERN NSString * const kGTLBooksActionPrevPage; // "prev-page" +GTL_EXTERN NSString * const kGTLBooksActionScroll; // "scroll" +GTL_EXTERN NSString * const kGTLBooksActionSearch; // "search" + +// Association +GTL_EXTERN NSString * const kGTLBooksAssociationEndOfSample; // "end-of-sample" +GTL_EXTERN NSString * const kGTLBooksAssociationEndOfVolume; // "end-of-volume" + +// Download +GTL_EXTERN NSString * const kGTLBooksDownloadEpub; // "epub" + +// Filter +GTL_EXTERN NSString * const kGTLBooksFilterEbooks; // "ebooks" +GTL_EXTERN NSString * const kGTLBooksFilterFreeEbooks; // "free-ebooks" +GTL_EXTERN NSString * const kGTLBooksFilterFull; // "full" +GTL_EXTERN NSString * const kGTLBooksFilterPaidEbooks; // "paid-ebooks" +GTL_EXTERN NSString * const kGTLBooksFilterPartial; // "partial" + +// LibraryRestrict +GTL_EXTERN NSString * const kGTLBooksLibraryRestrictMyLibrary; // "my-library" +GTL_EXTERN NSString * const kGTLBooksLibraryRestrictNoRestrict; // "no-restrict" + +// OrderBy +GTL_EXTERN NSString * const kGTLBooksOrderByNewest; // "newest" +GTL_EXTERN NSString * const kGTLBooksOrderByRelevance; // "relevance" + +// PrintType +GTL_EXTERN NSString * const kGTLBooksPrintTypeAll; // "all" +GTL_EXTERN NSString * const kGTLBooksPrintTypeBooks; // "books" +GTL_EXTERN NSString * const kGTLBooksPrintTypeMagazines; // "magazines" + +// Projection +GTL_EXTERN NSString * const kGTLBooksProjectionFull; // "full" +GTL_EXTERN NSString * const kGTLBooksProjectionLite; // "lite" diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksConstants.m.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksConstants.m.svn-base new file mode 100644 index 0000000..48941f9 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksConstants.m.svn-base @@ -0,0 +1,71 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started + +#import "GTLBooksConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeBooks = @"https://www.googleapis.com/auth/books"; + +// Action +NSString * const kGTLBooksActionBookmark = @"bookmark"; +NSString * const kGTLBooksActionChapter = @"chapter"; +NSString * const kGTLBooksActionNextPage = @"next-page"; +NSString * const kGTLBooksActionPrevPage = @"prev-page"; +NSString * const kGTLBooksActionScroll = @"scroll"; +NSString * const kGTLBooksActionSearch = @"search"; + +// Association +NSString * const kGTLBooksAssociationEndOfSample = @"end-of-sample"; +NSString * const kGTLBooksAssociationEndOfVolume = @"end-of-volume"; + +// Download +NSString * const kGTLBooksDownloadEpub = @"epub"; + +// Filter +NSString * const kGTLBooksFilterEbooks = @"ebooks"; +NSString * const kGTLBooksFilterFreeEbooks = @"free-ebooks"; +NSString * const kGTLBooksFilterFull = @"full"; +NSString * const kGTLBooksFilterPaidEbooks = @"paid-ebooks"; +NSString * const kGTLBooksFilterPartial = @"partial"; + +// LibraryRestrict +NSString * const kGTLBooksLibraryRestrictMyLibrary = @"my-library"; +NSString * const kGTLBooksLibraryRestrictNoRestrict = @"no-restrict"; + +// OrderBy +NSString * const kGTLBooksOrderByNewest = @"newest"; +NSString * const kGTLBooksOrderByRelevance = @"relevance"; + +// PrintType +NSString * const kGTLBooksPrintTypeAll = @"all"; +NSString * const kGTLBooksPrintTypeBooks = @"books"; +NSString * const kGTLBooksPrintTypeMagazines = @"magazines"; + +// Projection +NSString * const kGTLBooksProjectionFull = @"full"; +NSString * const kGTLBooksProjectionLite = @"lite"; diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksDownloadAccessRestriction.h.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksDownloadAccessRestriction.h.svn-base new file mode 100644 index 0000000..29667a2 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksDownloadAccessRestriction.h.svn-base @@ -0,0 +1,85 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksDownloadAccessRestriction.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksDownloadAccessRestriction (0 custom class methods, 12 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLBooksDownloadAccessRestriction +// + +@interface GTLBooksDownloadAccessRestriction : GTLObject + +// If restricted, whether access is granted for this (user, device, volume). +@property (retain) NSNumber *deviceAllowed; // boolValue + +// If restricted, the number of content download licenses already acquired +// (including the requesting client, if licensed). +@property (retain) NSNumber *downloadsAcquired; // intValue + +// If deviceAllowed, whether access was just acquired with this request. +@property (retain) NSNumber *justAcquired; // boolValue + +// Resource type. +@property (copy) NSString *kind; + +// If restricted, the maximum number of content download licenses for this +// volume. +@property (retain) NSNumber *maxDownloadDevices; // intValue + +// Error/warning message. +@property (copy) NSString *message; + +// Client nonce for verification. Download access and client-validation only. +@property (copy) NSString *nonce; + +// Error/warning reason code. Additional codes may be added in the future. 0 OK +// 100 ACCESS_DENIED_PUBLISHER_LIMIT 101 ACCESS_DENIED_LIMIT 200 +// WARNING_USED_LAST_ACCESS +@property (copy) NSString *reasonCode; + +// Whether this volume has any download access restrictions. +@property (retain) NSNumber *restricted; // boolValue + +// Response signature. +@property (copy) NSString *signature; + +// Client app identifier for verification. Download access and client-validation +// only. +@property (copy) NSString *source; + +// Identifies the volume for which this entry applies. +@property (copy) NSString *volumeId; + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksDownloadAccessRestriction.m.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksDownloadAccessRestriction.m.svn-base new file mode 100644 index 0000000..6a86264 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksDownloadAccessRestriction.m.svn-base @@ -0,0 +1,47 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksDownloadAccessRestriction.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksDownloadAccessRestriction (0 custom class methods, 12 custom properties) + +#import "GTLBooksDownloadAccessRestriction.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksDownloadAccessRestriction +// + +@implementation GTLBooksDownloadAccessRestriction +@dynamic deviceAllowed, downloadsAcquired, justAcquired, kind, + maxDownloadDevices, message, nonce, reasonCode, restricted, signature, + source, volumeId; + ++ (void)load { + [self registerObjectClassForKind:@"books#downloadAccessRestriction"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksDownloadAccesses.h.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksDownloadAccesses.h.svn-base new file mode 100644 index 0000000..4c9a4b6 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksDownloadAccesses.h.svn-base @@ -0,0 +1,52 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksDownloadAccesses.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksDownloadAccesses (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBooksDownloadAccessRestriction; + +// ---------------------------------------------------------------------------- +// +// GTLBooksDownloadAccesses +// + +@interface GTLBooksDownloadAccesses : GTLObject + +// A list of download access responses. +@property (retain) NSArray *downloadAccessList; // of GTLBooksDownloadAccessRestriction + +// Resource type. +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksDownloadAccesses.m.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksDownloadAccesses.m.svn-base new file mode 100644 index 0000000..873730f --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksDownloadAccesses.m.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksDownloadAccesses.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksDownloadAccesses (0 custom class methods, 2 custom properties) + +#import "GTLBooksDownloadAccesses.h" + +#import "GTLBooksDownloadAccessRestriction.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksDownloadAccesses +// + +@implementation GTLBooksDownloadAccesses +@dynamic downloadAccessList, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBooksDownloadAccessRestriction class] + forKey:@"downloadAccessList"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#downloadAccesses"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksLayersummaries.h.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksLayersummaries.h.svn-base new file mode 100644 index 0000000..b0e6674 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksLayersummaries.h.svn-base @@ -0,0 +1,58 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksLayersummaries.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksLayersummaries (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBooksLayersummary; + +// ---------------------------------------------------------------------------- +// +// GTLBooksLayersummaries +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLBooksLayersummaries : GTLCollectionObject + +// A list of layer summary items. +@property (retain) NSArray *items; // of GTLBooksLayersummary + +// Resource type. +@property (copy) NSString *kind; + +// The total number of layer summaries found. +@property (retain) NSNumber *totalItems; // intValue + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksLayersummaries.m.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksLayersummaries.m.svn-base new file mode 100644 index 0000000..27e701f --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksLayersummaries.m.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksLayersummaries.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksLayersummaries (0 custom class methods, 3 custom properties) + +#import "GTLBooksLayersummaries.h" + +#import "GTLBooksLayersummary.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksLayersummaries +// + +@implementation GTLBooksLayersummaries +@dynamic items, kind, totalItems; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBooksLayersummary class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#layersummaries"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksLayersummary.h.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksLayersummary.h.svn-base new file mode 100644 index 0000000..b045cab --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksLayersummary.h.svn-base @@ -0,0 +1,82 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksLayersummary.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksLayersummary (0 custom class methods, 12 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLBooksLayersummary +// + +@interface GTLBooksLayersummary : GTLObject + +// The number of annotations for this layer. +@property (retain) NSNumber *annotationCount; // intValue + +// Link to get data for this annotation. +@property (copy) NSString *annotationsDataLink; + +// The link to get the annotations for this layer. +@property (copy) NSString *annotationsLink; + +// The list of annotation types contained for this layer. +@property (retain) NSArray *annotationTypes; // of NSString + +// The content version this resource is for. +@property (copy) NSString *contentVersion; + +// The number of data items for this layer. +@property (retain) NSNumber *dataCount; // intValue + +// Unique id of this layer summary. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Resource Type +@property (copy) NSString *kind; + +// The layer id for this summary. +@property (copy) NSString *layerId; + +// URL to this resource. +@property (copy) NSString *selfLink; + +// Timestamp for the last time an item in this layer was updated. (RFC 3339 UTC +// date-time format). +@property (retain) GTLDateTime *updated; + +// The volume id this resource is for. +@property (copy) NSString *volumeId; + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksLayersummary.m.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksLayersummary.m.svn-base new file mode 100644 index 0000000..85e7f86 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksLayersummary.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksLayersummary.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksLayersummary (0 custom class methods, 12 custom properties) + +#import "GTLBooksLayersummary.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksLayersummary +// + +@implementation GTLBooksLayersummary +@dynamic annotationCount, annotationsDataLink, annotationsLink, annotationTypes, + contentVersion, dataCount, identifier, kind, layerId, selfLink, + updated, volumeId; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"annotationTypes"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#layersummary"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksReadingPosition.h.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksReadingPosition.h.svn-base new file mode 100644 index 0000000..c2f444a --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksReadingPosition.h.svn-base @@ -0,0 +1,66 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksReadingPosition.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksReadingPosition (0 custom class methods, 7 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLBooksReadingPosition +// + +@interface GTLBooksReadingPosition : GTLObject + +// Position in an EPUB as a CFI. +@property (copy) NSString *epubCfiPosition; + +// Position in a volume for image-based content. +@property (copy) NSString *gbImagePosition; + +// Position in a volume for text-based content. +@property (copy) NSString *gbTextPosition; + +// Resource type for a reading position. +@property (copy) NSString *kind; + +// Position in a PDF file. +@property (copy) NSString *pdfPosition; + +// Timestamp when this reading position was last updated (formatted UTC +// timestamp with millisecond resolution). +@property (retain) GTLDateTime *updated; + +// Volume id associated with this reading position. +@property (copy) NSString *volumeId; + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksReadingPosition.m.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksReadingPosition.m.svn-base new file mode 100644 index 0000000..da66e70 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksReadingPosition.m.svn-base @@ -0,0 +1,46 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksReadingPosition.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksReadingPosition (0 custom class methods, 7 custom properties) + +#import "GTLBooksReadingPosition.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksReadingPosition +// + +@implementation GTLBooksReadingPosition +@dynamic epubCfiPosition, gbImagePosition, gbTextPosition, kind, pdfPosition, + updated, volumeId; + ++ (void)load { + [self registerObjectClassForKind:@"books#readingPosition"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksRequestAccess.h.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksRequestAccess.h.svn-base new file mode 100644 index 0000000..000f29c --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksRequestAccess.h.svn-base @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksRequestAccess.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksRequestAccess (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBooksConcurrentAccessRestriction; +@class GTLBooksDownloadAccessRestriction; + +// ---------------------------------------------------------------------------- +// +// GTLBooksRequestAccess +// + +@interface GTLBooksRequestAccess : GTLObject + +// A concurrent access response. +@property (retain) GTLBooksConcurrentAccessRestriction *concurrentAccess; + +// A download access response. +@property (retain) GTLBooksDownloadAccessRestriction *downloadAccess; + +// Resource type. +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksRequestAccess.m.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksRequestAccess.m.svn-base new file mode 100644 index 0000000..505e9da --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksRequestAccess.m.svn-base @@ -0,0 +1,48 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksRequestAccess.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksRequestAccess (0 custom class methods, 3 custom properties) + +#import "GTLBooksRequestAccess.h" + +#import "GTLBooksConcurrentAccessRestriction.h" +#import "GTLBooksDownloadAccessRestriction.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksRequestAccess +// + +@implementation GTLBooksRequestAccess +@dynamic concurrentAccess, downloadAccess, kind; + ++ (void)load { + [self registerObjectClassForKind:@"books#requestAccess"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksReview.h.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksReview.h.svn-base new file mode 100644 index 0000000..243ef94 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksReview.h.svn-base @@ -0,0 +1,115 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksReview.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksReview (0 custom class methods, 10 custom properties) +// GTLBooksReviewAuthor (0 custom class methods, 1 custom properties) +// GTLBooksReviewSource (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBooksReviewAuthor; +@class GTLBooksReviewSource; + +// ---------------------------------------------------------------------------- +// +// GTLBooksReview +// + +@interface GTLBooksReview : GTLObject + +// Author of this review. +@property (retain) GTLBooksReviewAuthor *author; + +// Review text. +@property (copy) NSString *content; + +// Date of this review. +@property (copy) NSString *date; + +// URL for the full review text, for reviews gathered from the web. +@property (copy) NSString *fullTextUrl; + +// Resource type for a review. +@property (copy) NSString *kind; + +// Star rating for this review. Possible values are ONE, TWO, THREE, FOUR, FIVE +// or NOT_RATED. +@property (copy) NSString *rating; + +// Information regarding the source of this review, when the review is not from +// a Google Books user. +@property (retain) GTLBooksReviewSource *source; + +// Title for this review. +@property (copy) NSString *title; + +// Source type for this review. Possible values are EDITORIAL, WEB_USER or +// GOOGLE_USER. +@property (copy) NSString *type; + +// Volume that this review is for. +@property (copy) NSString *volumeId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksReviewAuthor +// + +@interface GTLBooksReviewAuthor : GTLObject + +// Name of this person. +@property (copy) NSString *displayName; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksReviewSource +// + +@interface GTLBooksReviewSource : GTLObject + +// Name of the source. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Extra text about the source of the review. +@property (copy) NSString *extraDescription; + +// URL of the source of the review. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksReview.m.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksReview.m.svn-base new file mode 100644 index 0000000..f5f140b --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksReview.m.svn-base @@ -0,0 +1,76 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksReview.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksReview (0 custom class methods, 10 custom properties) +// GTLBooksReviewAuthor (0 custom class methods, 1 custom properties) +// GTLBooksReviewSource (0 custom class methods, 3 custom properties) + +#import "GTLBooksReview.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksReview +// + +@implementation GTLBooksReview +@dynamic author, content, date, fullTextUrl, kind, rating, source, title, type, + volumeId; + ++ (void)load { + [self registerObjectClassForKind:@"books#review"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksReviewAuthor +// + +@implementation GTLBooksReviewAuthor +@dynamic displayName; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksReviewSource +// + +@implementation GTLBooksReviewSource +@dynamic descriptionProperty, extraDescription, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksVolume.h.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksVolume.h.svn-base new file mode 100644 index 0000000..b8ba238 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksVolume.h.svn-base @@ -0,0 +1,476 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksVolume.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksVolume (0 custom class methods, 10 custom properties) +// GTLBooksVolumeAccessInfo (0 custom class methods, 11 custom properties) +// GTLBooksVolumeRecommendedInfo (0 custom class methods, 1 custom properties) +// GTLBooksVolumeSaleInfo (0 custom class methods, 7 custom properties) +// GTLBooksVolumeSearchInfo (0 custom class methods, 1 custom properties) +// GTLBooksVolumeUserInfo (0 custom class methods, 6 custom properties) +// GTLBooksVolumeVolumeInfo (0 custom class methods, 20 custom properties) +// GTLBooksVolumeAccessInfoEpub (0 custom class methods, 3 custom properties) +// GTLBooksVolumeAccessInfoPdf (0 custom class methods, 3 custom properties) +// GTLBooksVolumeSaleInfoListPrice (0 custom class methods, 2 custom properties) +// GTLBooksVolumeSaleInfoRetailPrice (0 custom class methods, 2 custom properties) +// GTLBooksVolumeVolumeInfoDimensions (0 custom class methods, 3 custom properties) +// GTLBooksVolumeVolumeInfoImageLinks (0 custom class methods, 6 custom properties) +// GTLBooksVolumeVolumeInfoIndustryIdentifiersItem (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBooksDownloadAccessRestriction; +@class GTLBooksReadingPosition; +@class GTLBooksReview; +@class GTLBooksVolumeAccessInfo; +@class GTLBooksVolumeAccessInfoEpub; +@class GTLBooksVolumeAccessInfoPdf; +@class GTLBooksVolumeRecommendedInfo; +@class GTLBooksVolumeSaleInfo; +@class GTLBooksVolumeSaleInfoListPrice; +@class GTLBooksVolumeSaleInfoRetailPrice; +@class GTLBooksVolumeSearchInfo; +@class GTLBooksVolumeUserInfo; +@class GTLBooksVolumeVolumeInfo; +@class GTLBooksVolumeVolumeInfoDimensions; +@class GTLBooksVolumeVolumeInfoImageLinks; +@class GTLBooksVolumeVolumeInfoIndustryIdentifiersItem; + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolume +// + +@interface GTLBooksVolume : GTLObject + +// Any information about a volume related to reading or obtaining that volume +// text. This information can depend on country (books may be public domain in +// one country but not in another, e.g.). +@property (retain) GTLBooksVolumeAccessInfo *accessInfo; + +// Opaque identifier for a specific version of a volume resource. (In LITE +// projection) +@property (copy) NSString *ETag; + +// Unique identifier for a volume. (In LITE projection.) +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Resource type for a volume. (In LITE projection.) +@property (copy) NSString *kind; + +// Recommendation related information for this volume. +@property (retain) GTLBooksVolumeRecommendedInfo *recommendedInfo; + +// Any information about a volume related to the eBookstore and/or +// purchaseability. This information can depend on the country where the request +// originates from (i.e. books may not be for sale in certain countries). +@property (retain) GTLBooksVolumeSaleInfo *saleInfo; + +// Search result information related to this volume. +@property (retain) GTLBooksVolumeSearchInfo *searchInfo; + +// URL to this resource. (In LITE projection.) +@property (copy) NSString *selfLink; + +// User specific information related to this volume. (e.g. page this user last +// read or whether they purchased this book) +@property (retain) GTLBooksVolumeUserInfo *userInfo; + +// General volume information. +@property (retain) GTLBooksVolumeVolumeInfo *volumeInfo; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeAccessInfo +// + +@interface GTLBooksVolumeAccessInfo : GTLObject + +// Combines the access and viewability of this volume into a single status field +// for this user. Values can be FULL_PURCHASED, FULL_PUBLIC_DOMAIN, SAMPLE or +// NONE. (In LITE projection.) +@property (copy) NSString *accessViewStatus; + +// The two-letter ISO_3166-1 country code for which this access information is +// valid. (In LITE projection.) +@property (copy) NSString *country; + +// Information about a volume's download license access restrictions. +@property (retain) GTLBooksDownloadAccessRestriction *downloadAccess; + +// Whether this volume can be embedded in a viewport using the Embedded Viewer +// API. +@property (retain) NSNumber *embeddable; // boolValue + +// Information about epub content. (In LITE projection.) +@property (retain) GTLBooksVolumeAccessInfoEpub *epub; + +// Information about pdf content. (In LITE projection.) +@property (retain) GTLBooksVolumeAccessInfoPdf *pdf; + +// Whether or not this book is public domain in the country listed above. +@property (retain) NSNumber *publicDomain; // boolValue + +// Whether text-to-speech is permitted for this volume. Values can be ALLOWED, +// ALLOWED_FOR_ACCESSIBILITY, or NOT_ALLOWED. +@property (copy) NSString *textToSpeechPermission; + +// The read access of a volume. Possible values are PARTIAL, ALL_PAGES, NO_PAGES +// or UNKNOWN. This value depends on the country listed above. A value of +// PARTIAL means that the publisher has allowed some portion of the volume to be +// viewed publicly, without purchase. This can apply to eBooks as well as +// non-eBooks. Public domain books will always have a value of ALL_PAGES. +@property (copy) NSString *viewability; + +// For ordered but not yet processed orders, we give a URL that can be used to +// go to the appropriate Google Wallet page. +@property (copy) NSString *viewOrderUrl; + +// URL to read this volume on the Google Books site. Link will not allow users +// to read non-viewable volumes. +@property (copy) NSString *webReaderLink; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeRecommendedInfo +// + +@interface GTLBooksVolumeRecommendedInfo : GTLObject + +// A text explaining why this volume is recommended. +@property (copy) NSString *explanation; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeSaleInfo +// + +@interface GTLBooksVolumeSaleInfo : GTLObject + +// URL to purchase this volume on the Google Books site. (In LITE projection) +@property (copy) NSString *buyLink; + +// The two-letter ISO_3166-1 country code for which this sale information is +// valid. (In LITE projection.) +@property (copy) NSString *country; + +// Whether or not this volume is an eBook (can be added to the My eBooks shelf). +@property (retain) NSNumber *isEbook; // boolValue + +// Suggested retail price. (In LITE projection.) +@property (retain) GTLBooksVolumeSaleInfoListPrice *listPrice; + +// The date on which this book is available for sale. +@property (retain) GTLDateTime *onSaleDate; + +// The actual selling price of the book. This is the same as the suggested +// retail or list price unless there are offers or discounts on this volume. (In +// LITE projection.) +@property (retain) GTLBooksVolumeSaleInfoRetailPrice *retailPrice; + +// Whether or not this book is available for sale or offered for free in the +// Google eBookstore for the country listed above. Possible values are FOR_SALE, +// FREE, NOT_FOR_SALE, or FOR_PREORDER. +@property (copy) NSString *saleability; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeSearchInfo +// + +@interface GTLBooksVolumeSearchInfo : GTLObject + +// A text snippet containing the search query. +@property (copy) NSString *textSnippet; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeUserInfo +// + +@interface GTLBooksVolumeUserInfo : GTLObject + +// Whether or not this volume is currently in "my books." +@property (retain) NSNumber *isInMyBooks; // boolValue + +// Whether or not this volume was pre-ordered by the authenticated user making +// the request. (In LITE projection.) +@property (retain) NSNumber *isPreordered; // boolValue + +// Whether or not this volume was purchased by the authenticated user making the +// request. (In LITE projection.) +@property (retain) NSNumber *isPurchased; // boolValue + +// The user's current reading position in the volume, if one is available. (In +// LITE projection.) +@property (retain) GTLBooksReadingPosition *readingPosition; + +// This user's review of this volume, if one exists. +@property (retain) GTLBooksReview *review; + +// Timestamp when this volume was last modified by a user action, such as a +// reading position update, volume purchase or writing a review. (RFC 3339 UTC +// date-time format). +@property (retain) GTLDateTime *updated; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeVolumeInfo +// + +@interface GTLBooksVolumeVolumeInfo : GTLObject + +// The names of the authors and/or editors for this volume. (In LITE projection) +@property (retain) NSArray *authors; // of NSString + +// The mean review rating for this volume. (min = 1.0, max = 5.0) +@property (retain) NSNumber *averageRating; // doubleValue + +// Canonical URL for a volume. (In LITE projection.) +@property (copy) NSString *canonicalVolumeLink; + +// A list of subject categories, such as "Fiction", "Suspense", etc. +@property (retain) NSArray *categories; // of NSString + +// An identifier for the version of the volume content (text & images). (In LITE +// projection) +@property (copy) NSString *contentVersion; + +// A synopsis of the volume. The text of the description is formatted in HTML +// and includes simple formatting elements, such as b, i, and br tags. (In LITE +// projection.) +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Physical dimensions of this volume. +@property (retain) GTLBooksVolumeVolumeInfoDimensions *dimensions; + +// A list of image links for all the sizes that are available. (In LITE +// projection.) +@property (retain) GTLBooksVolumeVolumeInfoImageLinks *imageLinks; + +// Industry standard identifiers for this volume. +@property (retain) NSArray *industryIdentifiers; // of GTLBooksVolumeVolumeInfoIndustryIdentifiersItem + +// URL to view information about this volume on the Google Books site. (In LITE +// projection) +@property (copy) NSString *infoLink; + +// Best language for this volume (based on content). It is the two-letter ISO +// 639-1 code such as 'fr', 'en', etc. +@property (copy) NSString *language; + +// The main category to which this volume belongs. It will be the category from +// the categories list returned below that has the highest weight. +@property (copy) NSString *mainCategory; + +// Total number of pages. +@property (retain) NSNumber *pageCount; // intValue + +// URL to preview this volume on the Google Books site. +@property (copy) NSString *previewLink; + +// Type of publication of this volume. Possible values are BOOK or MAGAZINE. +@property (copy) NSString *printType; + +// Date of publication. (In LITE projection.) +@property (copy) NSString *publishedDate; + +// Publisher of this volume. (In LITE projection.) +@property (copy) NSString *publisher; + +// The number of review ratings for this volume. +@property (retain) NSNumber *ratingsCount; // intValue + +// Volume subtitle. (In LITE projection.) +@property (copy) NSString *subtitle; + +// Volume title. (In LITE projection.) +@property (copy) NSString *title; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeAccessInfoEpub +// + +@interface GTLBooksVolumeAccessInfoEpub : GTLObject + +// URL to retrieve ACS token for epub download. (In LITE projection.) +@property (copy) NSString *acsTokenLink; + +// URL to download epub. (In LITE projection.) +@property (copy) NSString *downloadLink; + +// Is a flowing text epub available either as public domain or for purchase. (In +// LITE projection.) +@property (retain) NSNumber *isAvailable; // boolValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeAccessInfoPdf +// + +@interface GTLBooksVolumeAccessInfoPdf : GTLObject + +// URL to retrieve ACS token for pdf download. (In LITE projection.) +@property (copy) NSString *acsTokenLink; + +// URL to download pdf. (In LITE projection.) +@property (copy) NSString *downloadLink; + +// Is a scanned image pdf available either as public domain or for purchase. (In +// LITE projection.) +@property (retain) NSNumber *isAvailable; // boolValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeSaleInfoListPrice +// + +@interface GTLBooksVolumeSaleInfoListPrice : GTLObject + +// Amount in the currency listed below. (In LITE projection.) +@property (retain) NSNumber *amount; // doubleValue + +// An ISO 4217, three-letter currency code. (In LITE projection.) +@property (copy) NSString *currencyCode; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeSaleInfoRetailPrice +// + +@interface GTLBooksVolumeSaleInfoRetailPrice : GTLObject + +// Amount in the currency listed below. (In LITE projection.) +@property (retain) NSNumber *amount; // doubleValue + +// An ISO 4217, three-letter currency code. (In LITE projection.) +@property (copy) NSString *currencyCode; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeVolumeInfoDimensions +// + +@interface GTLBooksVolumeVolumeInfoDimensions : GTLObject + +// Height or length of this volume (in cm). +@property (copy) NSString *height; + +// Thickness of this volume (in cm). +@property (copy) NSString *thickness; + +// Width of this volume (in cm). +@property (copy) NSString *width; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeVolumeInfoImageLinks +// + +@interface GTLBooksVolumeVolumeInfoImageLinks : GTLObject + +// Image link for extra large size (width of ~1280 pixels). (In LITE projection) +@property (copy) NSString *extraLarge; + +// Image link for large size (width of ~800 pixels). (In LITE projection) +@property (copy) NSString *large; + +// Image link for medium size (width of ~575 pixels). (In LITE projection) +@property (copy) NSString *medium; + +// Image link for small size (width of ~300 pixels). (In LITE projection) +@property (copy) NSString *small; + +// Image link for small thumbnail size (width of ~80 pixels). (In LITE +// projection) +@property (copy) NSString *smallThumbnail; + +// Image link for thumbnail size (width of ~128 pixels). (In LITE projection) +@property (copy) NSString *thumbnail; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeVolumeInfoIndustryIdentifiersItem +// + +@interface GTLBooksVolumeVolumeInfoIndustryIdentifiersItem : GTLObject + +// Industry specific volume identifier. +// identifierProperty property maps to 'identifier' in the JSON ('identifier' is +// reserved for remapping 'id'). +@property (copy) NSString *identifierProperty; + +// Identifier type. Possible values are ISBN_10, ISBN_13, ISSN and OTHER. +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksVolume.m.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksVolume.m.svn-base new file mode 100644 index 0000000..e5b0bbb --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksVolume.m.svn-base @@ -0,0 +1,236 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksVolume.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksVolume (0 custom class methods, 10 custom properties) +// GTLBooksVolumeAccessInfo (0 custom class methods, 11 custom properties) +// GTLBooksVolumeRecommendedInfo (0 custom class methods, 1 custom properties) +// GTLBooksVolumeSaleInfo (0 custom class methods, 7 custom properties) +// GTLBooksVolumeSearchInfo (0 custom class methods, 1 custom properties) +// GTLBooksVolumeUserInfo (0 custom class methods, 6 custom properties) +// GTLBooksVolumeVolumeInfo (0 custom class methods, 20 custom properties) +// GTLBooksVolumeAccessInfoEpub (0 custom class methods, 3 custom properties) +// GTLBooksVolumeAccessInfoPdf (0 custom class methods, 3 custom properties) +// GTLBooksVolumeSaleInfoListPrice (0 custom class methods, 2 custom properties) +// GTLBooksVolumeSaleInfoRetailPrice (0 custom class methods, 2 custom properties) +// GTLBooksVolumeVolumeInfoDimensions (0 custom class methods, 3 custom properties) +// GTLBooksVolumeVolumeInfoImageLinks (0 custom class methods, 6 custom properties) +// GTLBooksVolumeVolumeInfoIndustryIdentifiersItem (0 custom class methods, 2 custom properties) + +#import "GTLBooksVolume.h" + +#import "GTLBooksDownloadAccessRestriction.h" +#import "GTLBooksReadingPosition.h" +#import "GTLBooksReview.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolume +// + +@implementation GTLBooksVolume +@dynamic accessInfo, ETag, identifier, kind, recommendedInfo, saleInfo, + searchInfo, selfLink, userInfo, volumeInfo; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#volume"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeAccessInfo +// + +@implementation GTLBooksVolumeAccessInfo +@dynamic accessViewStatus, country, downloadAccess, embeddable, epub, pdf, + publicDomain, textToSpeechPermission, viewability, viewOrderUrl, + webReaderLink; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeRecommendedInfo +// + +@implementation GTLBooksVolumeRecommendedInfo +@dynamic explanation; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeSaleInfo +// + +@implementation GTLBooksVolumeSaleInfo +@dynamic buyLink, country, isEbook, listPrice, onSaleDate, retailPrice, + saleability; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeSearchInfo +// + +@implementation GTLBooksVolumeSearchInfo +@dynamic textSnippet; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeUserInfo +// + +@implementation GTLBooksVolumeUserInfo +@dynamic isInMyBooks, isPreordered, isPurchased, readingPosition, review, + updated; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeVolumeInfo +// + +@implementation GTLBooksVolumeVolumeInfo +@dynamic authors, averageRating, canonicalVolumeLink, categories, + contentVersion, descriptionProperty, dimensions, imageLinks, + industryIdentifiers, infoLink, language, mainCategory, pageCount, + previewLink, printType, publishedDate, publisher, ratingsCount, + subtitle, title; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"authors", + [NSString class], @"categories", + [GTLBooksVolumeVolumeInfoIndustryIdentifiersItem class], @"industryIdentifiers", + nil]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeAccessInfoEpub +// + +@implementation GTLBooksVolumeAccessInfoEpub +@dynamic acsTokenLink, downloadLink, isAvailable; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeAccessInfoPdf +// + +@implementation GTLBooksVolumeAccessInfoPdf +@dynamic acsTokenLink, downloadLink, isAvailable; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeSaleInfoListPrice +// + +@implementation GTLBooksVolumeSaleInfoListPrice +@dynamic amount, currencyCode; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeSaleInfoRetailPrice +// + +@implementation GTLBooksVolumeSaleInfoRetailPrice +@dynamic amount, currencyCode; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeVolumeInfoDimensions +// + +@implementation GTLBooksVolumeVolumeInfoDimensions +@dynamic height, thickness, width; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeVolumeInfoImageLinks +// + +@implementation GTLBooksVolumeVolumeInfoImageLinks +@dynamic extraLarge, large, medium, small, smallThumbnail, thumbnail; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeVolumeInfoIndustryIdentifiersItem +// + +@implementation GTLBooksVolumeVolumeInfoIndustryIdentifiersItem +@dynamic identifierProperty, type; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"identifier" + forKey:@"identifierProperty"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksVolumeannotation.h.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksVolumeannotation.h.svn-base new file mode 100644 index 0000000..4e51952 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksVolumeannotation.h.svn-base @@ -0,0 +1,114 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksVolumeannotation.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksVolumeannotation (0 custom class methods, 14 custom properties) +// GTLBooksVolumeannotationContentRanges (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBooksAnnotationsRange; +@class GTLBooksVolumeannotationContentRanges; + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeannotation +// + +@interface GTLBooksVolumeannotation : GTLObject + +// The annotation data id for this volume annotation. +@property (copy) NSString *annotationDataId; + +// Link to get data for this annotation. +@property (copy) NSString *annotationDataLink; + +// The type of annotation this is. +@property (copy) NSString *annotationType; + +// The content ranges to identify the selected text. +@property (retain) GTLBooksVolumeannotationContentRanges *contentRanges; + +// Data for this annotation. +@property (copy) NSString *data; + +// Indicates that this annotation is deleted. +@property (retain) NSNumber *deleted; // boolValue + +// Unique id of this volume annotation. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Resource Type +@property (copy) NSString *kind; + +// The Layer this annotation is for. +@property (copy) NSString *layerId; + +// Pages the annotation spans. +@property (retain) NSArray *pageIds; // of NSString + +// Excerpt from the volume. +@property (copy) NSString *selectedText; + +// URL to this resource. +@property (copy) NSString *selfLink; + +// Timestamp for the last time this anntoation was updated. (RFC 3339 UTC +// date-time format). +@property (retain) GTLDateTime *updated; + +// The Volume this annotation is for. +@property (copy) NSString *volumeId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeannotationContentRanges +// + +@interface GTLBooksVolumeannotationContentRanges : GTLObject + +// Range in CFI format for this annotation for version above. +@property (retain) GTLBooksAnnotationsRange *cfiRange; + +// Content version applicable to ranges below. +@property (copy) NSString *contentVersion; + +// Range in GB image format for this annotation for version above. +@property (retain) GTLBooksAnnotationsRange *gbImageRange; + +// Range in GB text format for this annotation for version above. +@property (retain) GTLBooksAnnotationsRange *gbTextRange; + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksVolumeannotation.m.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksVolumeannotation.m.svn-base new file mode 100644 index 0000000..8d711d5 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksVolumeannotation.m.svn-base @@ -0,0 +1,74 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksVolumeannotation.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksVolumeannotation (0 custom class methods, 14 custom properties) +// GTLBooksVolumeannotationContentRanges (0 custom class methods, 4 custom properties) + +#import "GTLBooksVolumeannotation.h" + +#import "GTLBooksAnnotationsRange.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeannotation +// + +@implementation GTLBooksVolumeannotation +@dynamic annotationDataId, annotationDataLink, annotationType, contentRanges, + data, deleted, identifier, kind, layerId, pageIds, selectedText, + selfLink, updated, volumeId; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"pageIds"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#volumeannotation"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeannotationContentRanges +// + +@implementation GTLBooksVolumeannotationContentRanges +@dynamic cfiRange, contentVersion, gbImageRange, gbTextRange; +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksVolumeannotations.h.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksVolumeannotations.h.svn-base new file mode 100644 index 0000000..20495fa --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksVolumeannotations.h.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksVolumeannotations.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksVolumeannotations (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBooksVolumeannotation; + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeannotations +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLBooksVolumeannotations : GTLCollectionObject + +// A list of volume annotations. +@property (retain) NSArray *items; // of GTLBooksVolumeannotation + +// Resource type +@property (copy) NSString *kind; + +// Token to pass in for pagination for the next page. This will not be present +// if this request does not have more results. +@property (copy) NSString *nextPageToken; + +// The total number of volume annotations found. +@property (retain) NSNumber *totalItems; // intValue + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksVolumeannotations.m.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksVolumeannotations.m.svn-base new file mode 100644 index 0000000..30ad7cb --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksVolumeannotations.m.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksVolumeannotations.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksVolumeannotations (0 custom class methods, 4 custom properties) + +#import "GTLBooksVolumeannotations.h" + +#import "GTLBooksVolumeannotation.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeannotations +// + +@implementation GTLBooksVolumeannotations +@dynamic items, kind, nextPageToken, totalItems; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBooksVolumeannotation class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#volumeannotations"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksVolumes.h.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksVolumes.h.svn-base new file mode 100644 index 0000000..acacbcd --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksVolumes.h.svn-base @@ -0,0 +1,59 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksVolumes.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksVolumes (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBooksVolume; + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumes +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLBooksVolumes : GTLCollectionObject + +// A list of volumes. +@property (retain) NSArray *items; // of GTLBooksVolume + +// Resource type. +@property (copy) NSString *kind; + +// Total number of volumes found. This might be greater than the number of +// volumes returned in this response if results have been paginated. +@property (retain) NSNumber *totalItems; // intValue + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksVolumes.m.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksVolumes.m.svn-base new file mode 100644 index 0000000..298bf40 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooksVolumes.m.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksVolumes.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksVolumes (0 custom class methods, 3 custom properties) + +#import "GTLBooksVolumes.h" + +#import "GTLBooksVolume.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumes +// + +@implementation GTLBooksVolumes +@dynamic items, kind, totalItems; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBooksVolume class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#volumes"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooks_Sources.m.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooks_Sources.m.svn-base new file mode 100644 index 0000000..060b15e --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLBooks_Sources.m.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooks_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started + +#import "GTLBooksConstants.m" + +#import "GTLBooksAnnotation.m" +#import "GTLBooksAnnotationdata.m" +#import "GTLBooksAnnotations.m" +#import "GTLBooksAnnotationsdata.m" +#import "GTLBooksAnnotationsRange.m" +#import "GTLBooksBookshelf.m" +#import "GTLBooksBookshelves.m" +#import "GTLBooksConcurrentAccessRestriction.m" +#import "GTLBooksDownloadAccesses.m" +#import "GTLBooksDownloadAccessRestriction.m" +#import "GTLBooksLayersummaries.m" +#import "GTLBooksLayersummary.m" +#import "GTLBooksReadingPosition.m" +#import "GTLBooksRequestAccess.m" +#import "GTLBooksReview.m" +#import "GTLBooksVolume.m" +#import "GTLBooksVolumeannotation.m" +#import "GTLBooksVolumeannotations.m" +#import "GTLBooksVolumes.m" + +#import "GTLQueryBooks.m" +#import "GTLServiceBooks.m" diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLQueryBooks.h.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLQueryBooks.h.svn-base new file mode 100644 index 0000000..3a2e5bd --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLQueryBooks.h.svn-base @@ -0,0 +1,632 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryBooks.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLQueryBooks (29 custom class methods, 44 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLBooksAnnotation; + +@interface GTLQueryBooks : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *action; +// "annotationDataId" has different types for some query methods; see the +// documentation for the right type for each query method. +@property (retain) id annotationDataId; +@property (copy) NSString *annotationId; +@property (copy) NSString *association; +@property (copy) NSString *contentVersion; +@property (copy) NSString *country; +@property (copy) NSString *cpksver; +@property (copy) NSString *download; +@property (copy) NSString *endOffset; +@property (copy) NSString *endPosition; +@property (copy) NSString *filter; +@property (assign) NSInteger h; +@property (copy) NSString *langRestrict; +@property (copy) NSString *layerId; +@property (copy) NSString *libraryRestrict; +@property (copy) NSString *locale; +@property (assign) NSUInteger maxResults; +@property (copy) NSString *nonce; +@property (copy) NSString *orderBy; +@property (retain) NSArray *pageIds; // of NSString +@property (copy) NSString *pageToken; +@property (copy) NSString *partner; +@property (copy) NSString *position; +@property (copy) NSString *printType; +@property (copy) NSString *projection; +@property (copy) NSString *q; +@property (assign) NSInteger scale; +@property (copy) NSString *shelf; +@property (assign) BOOL showDeleted; +@property (assign) BOOL showPreorders; +@property (copy) NSString *source; +@property (assign) NSUInteger startIndex; +@property (copy) NSString *startOffset; +@property (copy) NSString *startPosition; +@property (copy) NSString *summaryId; +@property (copy) NSString *timestamp; +@property (copy) NSString *updatedMax; +@property (copy) NSString *updatedMin; +@property (copy) NSString *userId; +@property (copy) NSString *volumeId; +@property (retain) NSArray *volumeIds; // of NSString +@property (assign) NSInteger volumePosition; +@property (assign) NSInteger w; + +#pragma mark - +#pragma mark "bookshelves" methods +// These create a GTLQueryBooks object. + +// Method: books.bookshelves.get +// Retrieves metadata for a specific bookshelf for the specified user. +// Required: +// userId: ID of user for whom to retrieve bookshelves. +// shelf: ID of bookshelf to retrieve. +// Optional: +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksBookshelf. ++ (id)queryForBookshelvesGetWithUserId:(NSString *)userId + shelf:(NSString *)shelf; + +// Method: books.bookshelves.list +// Retrieves a list of public bookshelves for the specified user. +// Required: +// userId: ID of user for whom to retrieve bookshelves. +// Optional: +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksBookshelves. ++ (id)queryForBookshelvesListWithUserId:(NSString *)userId; + +#pragma mark - +#pragma mark "bookshelves.volumes" methods +// These create a GTLQueryBooks object. + +// Method: books.bookshelves.volumes.list +// Retrieves volumes in a specific bookshelf for the specified user. +// Required: +// userId: ID of user for whom to retrieve bookshelf volumes. +// shelf: ID of bookshelf to retrieve volumes. +// Optional: +// maxResults: Maximum number of results to return +// showPreorders: Set to true to show pre-ordered books. Defaults to false. +// source: String to identify the originator of this request. +// startIndex: Index of the first element to return (starts at 0) +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksVolumes. ++ (id)queryForBookshelvesVolumesListWithUserId:(NSString *)userId + shelf:(NSString *)shelf; + +#pragma mark - +#pragma mark "layers.annotationData" methods +// These create a GTLQueryBooks object. + +// Method: books.layers.annotationData.get +// Gets the annotation data. +// Required: +// volumeId: The volume to retrieve annotations for. +// layerId: The ID for the layer to get the annotations. +// annotationDataId: The ID of the annotation data to retrieve. +// contentVersion: The content version for the volume you are trying to +// retrieve. +// Optional: +// h: The requested pixel height for any images. If height is provided width +// must also be provided. +// locale: The locale information for the data. ISO-639-1 language and +// ISO-3166-1 country code. Ex: 'en_US'. +// scale: The requested scale for the image. +// source: String to identify the originator of this request. +// w: The requested pixel width for any images. If width is provided height +// must also be provided. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksAnnotationdata. ++ (id)queryForLayersAnnotationDataGetWithVolumeId:(NSString *)volumeId + layerId:(NSString *)layerId + annotationDataId:(NSString *)annotationDataId + contentVersion:(NSString *)contentVersion; + +// Method: books.layers.annotationData.list +// Gets the annotation data for a volume and layer. +// Required: +// volumeId: The volume to retrieve annotation data for. +// layerId: The ID for the layer to get the annotation data. +// contentVersion: The content version for the requested volume. +// Optional: +// annotationDataId: The list of Annotation Data Ids to retrieve. Pagination +// is ignored if this is set. +// Note: For this method, "annotationDataId" should be of type NSArray. +// h: The requested pixel height for any images. If height is provided width +// must also be provided. +// locale: The locale information for the data. ISO-639-1 language and +// ISO-3166-1 country code. Ex: 'en_US'. +// maxResults: Maximum number of results to return (0..200) +// pageToken: The value of the nextToken from the previous page. +// scale: The requested scale for the image. +// source: String to identify the originator of this request. +// updatedMax: RFC 3339 timestamp to restrict to items updated prior to this +// timestamp (exclusive). +// updatedMin: RFC 3339 timestamp to restrict to items updated since this +// timestamp (inclusive). +// w: The requested pixel width for any images. If width is provided height +// must also be provided. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksAnnotationsdata. ++ (id)queryForLayersAnnotationDataListWithVolumeId:(NSString *)volumeId + layerId:(NSString *)layerId + contentVersion:(NSString *)contentVersion; + +#pragma mark - +#pragma mark "layers" methods +// These create a GTLQueryBooks object. + +// Method: books.layers.get +// Gets the layer summary for a volume. +// Required: +// volumeId: The volume to retrieve layers for. +// summaryId: The ID for the layer to get the summary for. +// Optional: +// contentVersion: The content version for the requested volume. +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksLayersummary. ++ (id)queryForLayersGetWithVolumeId:(NSString *)volumeId + summaryId:(NSString *)summaryId; + +// Method: books.layers.list +// List the layer summaries for a volume. +// Required: +// volumeId: The volume to retrieve layers for. +// Optional: +// contentVersion: The content version for the requested volume. +// maxResults: Maximum number of results to return (0..200) +// pageToken: The value of the nextToken from the previous page. +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksLayersummaries. ++ (id)queryForLayersListWithVolumeId:(NSString *)volumeId; + +#pragma mark - +#pragma mark "layers.volumeAnnotations" methods +// These create a GTLQueryBooks object. + +// Method: books.layers.volumeAnnotations.get +// Gets the volume annotation. +// Required: +// volumeId: The volume to retrieve annotations for. +// layerId: The ID for the layer to get the annotations. +// annotationId: The ID of the volume annotation to retrieve. +// Optional: +// locale: The locale information for the data. ISO-639-1 language and +// ISO-3166-1 country code. Ex: 'en_US'. +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksVolumeannotation. ++ (id)queryForLayersVolumeAnnotationsGetWithVolumeId:(NSString *)volumeId + layerId:(NSString *)layerId + annotationId:(NSString *)annotationId; + +// Method: books.layers.volumeAnnotations.list +// Gets the volume annotations for a volume and layer. +// Required: +// volumeId: The volume to retrieve annotations for. +// layerId: The ID for the layer to get the annotations. +// contentVersion: The content version for the requested volume. +// Optional: +// endOffset: The end offset to end retrieving data from. +// endPosition: The end position to end retrieving data from. +// locale: The locale information for the data. ISO-639-1 language and +// ISO-3166-1 country code. Ex: 'en_US'. +// maxResults: Maximum number of results to return (0..200) +// pageToken: The value of the nextToken from the previous page. +// showDeleted: Set to true to return deleted annotations. updatedMin must be +// in the request to use this. Defaults to false. +// source: String to identify the originator of this request. +// startOffset: The start offset to start retrieving data from. +// startPosition: The start position to start retrieving data from. +// updatedMax: RFC 3339 timestamp to restrict to items updated prior to this +// timestamp (exclusive). +// updatedMin: RFC 3339 timestamp to restrict to items updated since this +// timestamp (inclusive). +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksVolumeannotations. ++ (id)queryForLayersVolumeAnnotationsListWithVolumeId:(NSString *)volumeId + layerId:(NSString *)layerId + contentVersion:(NSString *)contentVersion; + +#pragma mark - +#pragma mark "myconfig" methods +// These create a GTLQueryBooks object. + +// Method: books.myconfig.releaseDownloadAccess +// Release downloaded content access restriction. +// Required: +// volumeIds: The volume(s) to release restrictions for. +// cpksver: The device/version ID from which to release the restriction. +// Optional: +// locale: ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksDownloadAccesses. ++ (id)queryForMyconfigReleaseDownloadAccessWithVolumeIds:(NSArray *)volumeIds + cpksver:(NSString *)cpksver; + +// Method: books.myconfig.requestAccess +// Request concurrent and download access restrictions. +// Required: +// source: String to identify the originator of this request. +// volumeId: The volume to request concurrent/download restrictions for. +// nonce: The client nonce value. +// cpksver: The device/version ID from which to request the restrictions. +// Optional: +// locale: ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksRequestAccess. ++ (id)queryForMyconfigRequestAccessWithSource:(NSString *)source + volumeId:(NSString *)volumeId + nonce:(NSString *)nonce + cpksver:(NSString *)cpksver; + +// Method: books.myconfig.syncVolumeLicenses +// Request downloaded content access for specified volumes on the My eBooks +// shelf. +// Required: +// source: String to identify the originator of this request. +// nonce: The client nonce value. +// cpksver: The device/version ID from which to release the restriction. +// Optional: +// locale: ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. +// showPreorders: Set to true to show pre-ordered books. Defaults to false. +// volumeIds: The volume(s) to request download restrictions for. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksVolumes. ++ (id)queryForMyconfigSyncVolumeLicensesWithSource:(NSString *)source + nonce:(NSString *)nonce + cpksver:(NSString *)cpksver; + +#pragma mark - +#pragma mark "mylibrary.annotations" methods +// These create a GTLQueryBooks object. + +// Method: books.mylibrary.annotations.delete +// Deletes an annotation. +// Required: +// annotationId: The ID for the annotation to delete. +// Optional: +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks ++ (id)queryForMylibraryAnnotationsDeleteWithAnnotationId:(NSString *)annotationId; + +// Method: books.mylibrary.annotations.get +// Gets an annotation by its ID. +// Required: +// annotationId: The ID for the annotation to retrieve. +// Optional: +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksAnnotation. ++ (id)queryForMylibraryAnnotationsGetWithAnnotationId:(NSString *)annotationId; + +// Method: books.mylibrary.annotations.insert +// Inserts a new annotation. +// Optional: +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksAnnotation. ++ (id)queryForMylibraryAnnotationsInsertWithObject:(GTLBooksAnnotation *)object; + +// Method: books.mylibrary.annotations.list +// Retrieves a list of annotations, possibly filtered. +// Optional: +// contentVersion: The content version for the requested volume. +// layerId: The layer ID to limit annotation by. +// maxResults: Maximum number of results to return (0..40) +// pageIds: The page ID(s) for the volume that is being queried. +// pageToken: The value of the nextToken from the previous page. +// showDeleted: Set to true to return deleted annotations. updatedMin must be +// in the request to use this. Defaults to false. +// source: String to identify the originator of this request. +// updatedMax: RFC 3339 timestamp to restrict to items updated prior to this +// timestamp (exclusive). +// updatedMin: RFC 3339 timestamp to restrict to items updated since this +// timestamp (inclusive). +// volumeId: The volume to restrict annotations to. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksAnnotations. ++ (id)queryForMylibraryAnnotationsList; + +// Method: books.mylibrary.annotations.update +// Updates an existing annotation. +// Required: +// annotationId: The ID for the annotation to update. +// Optional: +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksAnnotation. ++ (id)queryForMylibraryAnnotationsUpdateWithObject:(GTLBooksAnnotation *)object + annotationId:(NSString *)annotationId; + +#pragma mark - +#pragma mark "mylibrary.bookshelves" methods +// These create a GTLQueryBooks object. + +// Method: books.mylibrary.bookshelves.addVolume +// Adds a volume to a bookshelf. +// Required: +// shelf: ID of bookshelf to which to add a volume. +// volumeId: ID of volume to add. +// Optional: +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks ++ (id)queryForMylibraryBookshelvesAddVolumeWithShelf:(NSString *)shelf + volumeId:(NSString *)volumeId; + +// Method: books.mylibrary.bookshelves.clearVolumes +// Clears all volumes from a bookshelf. +// Required: +// shelf: ID of bookshelf from which to remove a volume. +// Optional: +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks ++ (id)queryForMylibraryBookshelvesClearVolumesWithShelf:(NSString *)shelf; + +// Method: books.mylibrary.bookshelves.get +// Retrieves metadata for a specific bookshelf belonging to the authenticated +// user. +// Required: +// shelf: ID of bookshelf to retrieve. +// Optional: +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksBookshelf. ++ (id)queryForMylibraryBookshelvesGetWithShelf:(NSString *)shelf; + +// Method: books.mylibrary.bookshelves.list +// Retrieves a list of bookshelves belonging to the authenticated user. +// Optional: +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksBookshelves. ++ (id)queryForMylibraryBookshelvesList; + +// Method: books.mylibrary.bookshelves.moveVolume +// Moves a volume within a bookshelf. +// Required: +// shelf: ID of bookshelf with the volume. +// volumeId: ID of volume to move. +// volumePosition: Position on shelf to move the item (0 puts the item before +// the current first item, 1 puts it between the first and the second and so +// on.) +// Optional: +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks ++ (id)queryForMylibraryBookshelvesMoveVolumeWithShelf:(NSString *)shelf + volumeId:(NSString *)volumeId + volumePosition:(NSInteger)volumePosition; + +// Method: books.mylibrary.bookshelves.removeVolume +// Removes a volume from a bookshelf. +// Required: +// shelf: ID of bookshelf from which to remove a volume. +// volumeId: ID of volume to remove. +// Optional: +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks ++ (id)queryForMylibraryBookshelvesRemoveVolumeWithShelf:(NSString *)shelf + volumeId:(NSString *)volumeId; + +#pragma mark - +#pragma mark "mylibrary.bookshelves.volumes" methods +// These create a GTLQueryBooks object. + +// Method: books.mylibrary.bookshelves.volumes.list +// Gets volume information for volumes on a bookshelf. +// Required: +// shelf: The bookshelf ID or name retrieve volumes for. +// Optional: +// country: ISO-3166-1 code to override the IP-based location. +// maxResults: Maximum number of results to return +// projection: Restrict information returned to a set of selected fields. +// kGTLBooksProjectionFull: Includes all volume data. +// kGTLBooksProjectionLite: Includes a subset of fields in volumeInfo and +// accessInfo. +// q: Full-text search query string in this bookshelf. +// showPreorders: Set to true to show pre-ordered books. Defaults to false. +// source: String to identify the originator of this request. +// startIndex: Index of the first element to return (starts at 0) +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksVolumes. ++ (id)queryForMylibraryBookshelvesVolumesListWithShelf:(NSString *)shelf; + +#pragma mark - +#pragma mark "mylibrary.readingpositions" methods +// These create a GTLQueryBooks object. + +// Method: books.mylibrary.readingpositions.get +// Retrieves my reading position information for a volume. +// Required: +// volumeId: ID of volume for which to retrieve a reading position. +// Optional: +// contentVersion: Volume content version for which this reading position is +// requested. +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksReadingPosition. ++ (id)queryForMylibraryReadingpositionsGetWithVolumeId:(NSString *)volumeId; + +// Method: books.mylibrary.readingpositions.setPosition +// Sets my reading position information for a volume. +// Required: +// volumeId: ID of volume for which to update the reading position. +// timestamp: RFC 3339 UTC format timestamp associated with this reading +// position. +// position: Position string for the new volume reading position. +// Optional: +// action: Action that caused this reading position to be set. +// kGTLBooksActionBookmark: User chose bookmark within volume. +// kGTLBooksActionChapter: User selected chapter from list. +// kGTLBooksActionNextPage: Next page event. +// kGTLBooksActionPrevPage: Previous page event. +// kGTLBooksActionScroll: User navigated to page. +// kGTLBooksActionSearch: User chose search results within volume. +// contentVersion: Volume content version for which this reading position +// applies. +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks ++ (id)queryForMylibraryReadingpositionsSetPositionWithVolumeId:(NSString *)volumeId + timestamp:(NSString *)timestamp + position:(NSString *)position; + +#pragma mark - +#pragma mark "volumes.associated" methods +// These create a GTLQueryBooks object. + +// Method: books.volumes.associated.list +// Return a list of associated books. +// Required: +// volumeId: ID of the source volume. +// Optional: +// association: Association type. +// kGTLBooksAssociationEndOfSample: Recommendations for display +// end-of-sample. +// kGTLBooksAssociationEndOfVolume: Recommendations for display +// end-of-volume. +// locale: ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used +// for generating recommendations. +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksVolumes. ++ (id)queryForVolumesAssociatedListWithVolumeId:(NSString *)volumeId; + +#pragma mark - +#pragma mark "volumes" methods +// These create a GTLQueryBooks object. + +// Method: books.volumes.get +// Gets volume information for a single volume. +// Required: +// volumeId: ID of volume to retrieve. +// Optional: +// country: ISO-3166-1 code to override the IP-based location. +// partner: Brand results for partner ID. +// projection: Restrict information returned to a set of selected fields. +// kGTLBooksProjectionFull: Includes all volume data. +// kGTLBooksProjectionLite: Includes a subset of fields in volumeInfo and +// accessInfo. +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksVolume. ++ (id)queryForVolumesGetWithVolumeId:(NSString *)volumeId; + +// Method: books.volumes.list +// Performs a book search. +// Required: +// q: Full-text search query string. +// Optional: +// download: Restrict to volumes by download availability. +// kGTLBooksDownloadEpub: All volumes with epub. +// filter: Filter search results. +// kGTLBooksFilterEbooks: All Google eBooks. +// kGTLBooksFilterFreeEbooks: Google eBook with full volume text +// viewability. +// kGTLBooksFilterFull: Public can view entire volume text. +// kGTLBooksFilterPaidEbooks: Google eBook with a price. +// kGTLBooksFilterPartial: Public able to see parts of text. +// langRestrict: Restrict results to books with this language code. +// libraryRestrict: Restrict search to this user's library. +// kGTLBooksLibraryRestrictMyLibrary: Restrict to the user's library, any +// shelf. +// kGTLBooksLibraryRestrictNoRestrict: Do not restrict based on user's +// library. +// maxResults: Maximum number of results to return. (0..40) +// orderBy: Sort search results. +// kGTLBooksOrderByNewest: Most recently published. +// kGTLBooksOrderByRelevance: Relevance to search terms. +// partner: Restrict and brand results for partner ID. +// printType: Restrict to books or magazines. +// kGTLBooksPrintTypeAll: All volume content types. +// kGTLBooksPrintTypeBooks: Just books. +// kGTLBooksPrintTypeMagazines: Just magazines. +// projection: Restrict information returned to a set of selected fields. +// kGTLBooksProjectionFull: Includes all volume data. +// kGTLBooksProjectionLite: Includes a subset of fields in volumeInfo and +// accessInfo. +// showPreorders: Set to true to show books available for preorder. Defaults +// to false. +// source: String to identify the originator of this request. +// startIndex: Index of the first result to return (starts at 0) +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksVolumes. ++ (id)queryForVolumesListWithQ:(NSString *)q; + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLQueryBooks.m.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLQueryBooks.m.svn-base new file mode 100644 index 0000000..49729f8 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLQueryBooks.m.svn-base @@ -0,0 +1,398 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryBooks.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLQueryBooks (29 custom class methods, 44 custom properties) + +#import "GTLQueryBooks.h" + +#import "GTLBooksAnnotation.h" +#import "GTLBooksAnnotationdata.h" +#import "GTLBooksAnnotations.h" +#import "GTLBooksAnnotationsdata.h" +#import "GTLBooksBookshelf.h" +#import "GTLBooksBookshelves.h" +#import "GTLBooksDownloadAccesses.h" +#import "GTLBooksLayersummaries.h" +#import "GTLBooksLayersummary.h" +#import "GTLBooksReadingPosition.h" +#import "GTLBooksRequestAccess.h" +#import "GTLBooksVolume.h" +#import "GTLBooksVolumeannotation.h" +#import "GTLBooksVolumeannotations.h" +#import "GTLBooksVolumes.h" + +@implementation GTLQueryBooks + +@dynamic action, annotationDataId, annotationId, association, contentVersion, + country, cpksver, download, endOffset, endPosition, fields, filter, h, + langRestrict, layerId, libraryRestrict, locale, maxResults, nonce, + orderBy, pageIds, pageToken, partner, position, printType, projection, + q, scale, shelf, showDeleted, showPreorders, source, startIndex, + startOffset, startPosition, summaryId, timestamp, updatedMax, + updatedMin, userId, volumeId, volumeIds, volumePosition, w; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"pageIds", + [NSString class], @"volumeIds", + nil]; + return map; +} + +#pragma mark - +#pragma mark "bookshelves" methods +// These create a GTLQueryBooks object. + ++ (id)queryForBookshelvesGetWithUserId:(NSString *)userId + shelf:(NSString *)shelf { + NSString *methodName = @"books.bookshelves.get"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.userId = userId; + query.shelf = shelf; + query.expectedObjectClass = [GTLBooksBookshelf class]; + return query; +} + ++ (id)queryForBookshelvesListWithUserId:(NSString *)userId { + NSString *methodName = @"books.bookshelves.list"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.userId = userId; + query.expectedObjectClass = [GTLBooksBookshelves class]; + return query; +} + +#pragma mark - +#pragma mark "bookshelves.volumes" methods +// These create a GTLQueryBooks object. + ++ (id)queryForBookshelvesVolumesListWithUserId:(NSString *)userId + shelf:(NSString *)shelf { + NSString *methodName = @"books.bookshelves.volumes.list"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.userId = userId; + query.shelf = shelf; + query.expectedObjectClass = [GTLBooksVolumes class]; + return query; +} + +#pragma mark - +#pragma mark "layers.annotationData" methods +// These create a GTLQueryBooks object. + ++ (id)queryForLayersAnnotationDataGetWithVolumeId:(NSString *)volumeId + layerId:(NSString *)layerId + annotationDataId:(NSString *)annotationDataId + contentVersion:(NSString *)contentVersion { + NSString *methodName = @"books.layers.annotationData.get"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.volumeId = volumeId; + query.layerId = layerId; + query.annotationDataId = annotationDataId; + query.contentVersion = contentVersion; + query.expectedObjectClass = [GTLBooksAnnotationdata class]; + return query; +} + ++ (id)queryForLayersAnnotationDataListWithVolumeId:(NSString *)volumeId + layerId:(NSString *)layerId + contentVersion:(NSString *)contentVersion { + NSString *methodName = @"books.layers.annotationData.list"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.volumeId = volumeId; + query.layerId = layerId; + query.contentVersion = contentVersion; + query.expectedObjectClass = [GTLBooksAnnotationsdata class]; + return query; +} + +#pragma mark - +#pragma mark "layers" methods +// These create a GTLQueryBooks object. + ++ (id)queryForLayersGetWithVolumeId:(NSString *)volumeId + summaryId:(NSString *)summaryId { + NSString *methodName = @"books.layers.get"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.volumeId = volumeId; + query.summaryId = summaryId; + query.expectedObjectClass = [GTLBooksLayersummary class]; + return query; +} + ++ (id)queryForLayersListWithVolumeId:(NSString *)volumeId { + NSString *methodName = @"books.layers.list"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.volumeId = volumeId; + query.expectedObjectClass = [GTLBooksLayersummaries class]; + return query; +} + +#pragma mark - +#pragma mark "layers.volumeAnnotations" methods +// These create a GTLQueryBooks object. + ++ (id)queryForLayersVolumeAnnotationsGetWithVolumeId:(NSString *)volumeId + layerId:(NSString *)layerId + annotationId:(NSString *)annotationId { + NSString *methodName = @"books.layers.volumeAnnotations.get"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.volumeId = volumeId; + query.layerId = layerId; + query.annotationId = annotationId; + query.expectedObjectClass = [GTLBooksVolumeannotation class]; + return query; +} + ++ (id)queryForLayersVolumeAnnotationsListWithVolumeId:(NSString *)volumeId + layerId:(NSString *)layerId + contentVersion:(NSString *)contentVersion { + NSString *methodName = @"books.layers.volumeAnnotations.list"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.volumeId = volumeId; + query.layerId = layerId; + query.contentVersion = contentVersion; + query.expectedObjectClass = [GTLBooksVolumeannotations class]; + return query; +} + +#pragma mark - +#pragma mark "myconfig" methods +// These create a GTLQueryBooks object. + ++ (id)queryForMyconfigReleaseDownloadAccessWithVolumeIds:(NSArray *)volumeIds + cpksver:(NSString *)cpksver { + NSString *methodName = @"books.myconfig.releaseDownloadAccess"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.volumeIds = volumeIds; + query.cpksver = cpksver; + query.expectedObjectClass = [GTLBooksDownloadAccesses class]; + return query; +} + ++ (id)queryForMyconfigRequestAccessWithSource:(NSString *)source + volumeId:(NSString *)volumeId + nonce:(NSString *)nonce + cpksver:(NSString *)cpksver { + NSString *methodName = @"books.myconfig.requestAccess"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.source = source; + query.volumeId = volumeId; + query.nonce = nonce; + query.cpksver = cpksver; + query.expectedObjectClass = [GTLBooksRequestAccess class]; + return query; +} + ++ (id)queryForMyconfigSyncVolumeLicensesWithSource:(NSString *)source + nonce:(NSString *)nonce + cpksver:(NSString *)cpksver { + NSString *methodName = @"books.myconfig.syncVolumeLicenses"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.source = source; + query.nonce = nonce; + query.cpksver = cpksver; + query.expectedObjectClass = [GTLBooksVolumes class]; + return query; +} + +#pragma mark - +#pragma mark "mylibrary.annotations" methods +// These create a GTLQueryBooks object. + ++ (id)queryForMylibraryAnnotationsDeleteWithAnnotationId:(NSString *)annotationId { + NSString *methodName = @"books.mylibrary.annotations.delete"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.annotationId = annotationId; + return query; +} + ++ (id)queryForMylibraryAnnotationsGetWithAnnotationId:(NSString *)annotationId { + NSString *methodName = @"books.mylibrary.annotations.get"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.annotationId = annotationId; + query.expectedObjectClass = [GTLBooksAnnotation class]; + return query; +} + ++ (id)queryForMylibraryAnnotationsInsertWithObject:(GTLBooksAnnotation *)object { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"books.mylibrary.annotations.insert"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.expectedObjectClass = [GTLBooksAnnotation class]; + return query; +} + ++ (id)queryForMylibraryAnnotationsList { + NSString *methodName = @"books.mylibrary.annotations.list"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLBooksAnnotations class]; + return query; +} + ++ (id)queryForMylibraryAnnotationsUpdateWithObject:(GTLBooksAnnotation *)object + annotationId:(NSString *)annotationId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"books.mylibrary.annotations.update"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.annotationId = annotationId; + query.expectedObjectClass = [GTLBooksAnnotation class]; + return query; +} + +#pragma mark - +#pragma mark "mylibrary.bookshelves" methods +// These create a GTLQueryBooks object. + ++ (id)queryForMylibraryBookshelvesAddVolumeWithShelf:(NSString *)shelf + volumeId:(NSString *)volumeId { + NSString *methodName = @"books.mylibrary.bookshelves.addVolume"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.shelf = shelf; + query.volumeId = volumeId; + return query; +} + ++ (id)queryForMylibraryBookshelvesClearVolumesWithShelf:(NSString *)shelf { + NSString *methodName = @"books.mylibrary.bookshelves.clearVolumes"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.shelf = shelf; + return query; +} + ++ (id)queryForMylibraryBookshelvesGetWithShelf:(NSString *)shelf { + NSString *methodName = @"books.mylibrary.bookshelves.get"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.shelf = shelf; + query.expectedObjectClass = [GTLBooksBookshelf class]; + return query; +} + ++ (id)queryForMylibraryBookshelvesList { + NSString *methodName = @"books.mylibrary.bookshelves.list"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLBooksBookshelves class]; + return query; +} + ++ (id)queryForMylibraryBookshelvesMoveVolumeWithShelf:(NSString *)shelf + volumeId:(NSString *)volumeId + volumePosition:(NSInteger)volumePosition { + NSString *methodName = @"books.mylibrary.bookshelves.moveVolume"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.shelf = shelf; + query.volumeId = volumeId; + query.volumePosition = volumePosition; + return query; +} + ++ (id)queryForMylibraryBookshelvesRemoveVolumeWithShelf:(NSString *)shelf + volumeId:(NSString *)volumeId { + NSString *methodName = @"books.mylibrary.bookshelves.removeVolume"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.shelf = shelf; + query.volumeId = volumeId; + return query; +} + +#pragma mark - +#pragma mark "mylibrary.bookshelves.volumes" methods +// These create a GTLQueryBooks object. + ++ (id)queryForMylibraryBookshelvesVolumesListWithShelf:(NSString *)shelf { + NSString *methodName = @"books.mylibrary.bookshelves.volumes.list"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.shelf = shelf; + query.expectedObjectClass = [GTLBooksVolumes class]; + return query; +} + +#pragma mark - +#pragma mark "mylibrary.readingpositions" methods +// These create a GTLQueryBooks object. + ++ (id)queryForMylibraryReadingpositionsGetWithVolumeId:(NSString *)volumeId { + NSString *methodName = @"books.mylibrary.readingpositions.get"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.volumeId = volumeId; + query.expectedObjectClass = [GTLBooksReadingPosition class]; + return query; +} + ++ (id)queryForMylibraryReadingpositionsSetPositionWithVolumeId:(NSString *)volumeId + timestamp:(NSString *)timestamp + position:(NSString *)position { + NSString *methodName = @"books.mylibrary.readingpositions.setPosition"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.volumeId = volumeId; + query.timestamp = timestamp; + query.position = position; + return query; +} + +#pragma mark - +#pragma mark "volumes.associated" methods +// These create a GTLQueryBooks object. + ++ (id)queryForVolumesAssociatedListWithVolumeId:(NSString *)volumeId { + NSString *methodName = @"books.volumes.associated.list"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.volumeId = volumeId; + query.expectedObjectClass = [GTLBooksVolumes class]; + return query; +} + +#pragma mark - +#pragma mark "volumes" methods +// These create a GTLQueryBooks object. + ++ (id)queryForVolumesGetWithVolumeId:(NSString *)volumeId { + NSString *methodName = @"books.volumes.get"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.volumeId = volumeId; + query.expectedObjectClass = [GTLBooksVolume class]; + return query; +} + ++ (id)queryForVolumesListWithQ:(NSString *)q { + NSString *methodName = @"books.volumes.list"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.q = q; + query.expectedObjectClass = [GTLBooksVolumes class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLServiceBooks.h.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLServiceBooks.h.svn-base new file mode 100644 index 0000000..61b5d68 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLServiceBooks.h.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceBooks.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLServiceBooks (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceBooks : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryBooks.h. The query can the be sent with GTLService's execute methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Books/Generated/.svn/text-base/GTLServiceBooks.m.svn-base b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLServiceBooks.m.svn-base new file mode 100644 index 0000000..a50d7f4 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/.svn/text-base/GTLServiceBooks.m.svn-base @@ -0,0 +1,79 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceBooks.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLServiceBooks (0 custom class methods, 0 custom properties) + +#import "GTLBooks.h" + +@implementation GTLServiceBooks + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryBooks class], + [GTLBooksAnnotation class], + [GTLBooksAnnotationdata class], + [GTLBooksAnnotations class], + [GTLBooksAnnotationsdata class], + [GTLBooksAnnotationsRange class], + [GTLBooksBookshelf class], + [GTLBooksBookshelves class], + [GTLBooksConcurrentAccessRestriction class], + [GTLBooksDownloadAccesses class], + [GTLBooksDownloadAccessRestriction class], + [GTLBooksLayersummaries class], + [GTLBooksLayersummary class], + [GTLBooksReadingPosition class], + [GTLBooksRequestAccess class], + [GTLBooksReview class], + [GTLBooksVolume class], + [GTLBooksVolumeannotation class], + [GTLBooksVolumeannotations class], + [GTLBooksVolumes class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v1"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooks.h b/GTL/Source/Services/Books/Generated/GTLBooks.h new file mode 100644 index 0000000..f7d689c --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooks.h @@ -0,0 +1,52 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooks.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started + +#import "GTLBooksConstants.h" + +#import "GTLBooksAnnotation.h" +#import "GTLBooksAnnotationdata.h" +#import "GTLBooksAnnotations.h" +#import "GTLBooksAnnotationsdata.h" +#import "GTLBooksAnnotationsRange.h" +#import "GTLBooksBookshelf.h" +#import "GTLBooksBookshelves.h" +#import "GTLBooksConcurrentAccessRestriction.h" +#import "GTLBooksDownloadAccesses.h" +#import "GTLBooksDownloadAccessRestriction.h" +#import "GTLBooksLayersummaries.h" +#import "GTLBooksLayersummary.h" +#import "GTLBooksReadingPosition.h" +#import "GTLBooksRequestAccess.h" +#import "GTLBooksReview.h" +#import "GTLBooksVolume.h" +#import "GTLBooksVolumeannotation.h" +#import "GTLBooksVolumeannotations.h" +#import "GTLBooksVolumes.h" + +#import "GTLQueryBooks.h" +#import "GTLServiceBooks.h" diff --git a/GTL/Source/Services/Books/Generated/GTLBooksAnnotation.h b/GTL/Source/Services/Books/Generated/GTLBooksAnnotation.h new file mode 100644 index 0000000..7bc5b58 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksAnnotation.h @@ -0,0 +1,143 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksAnnotation.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksAnnotation (0 custom class methods, 16 custom properties) +// GTLBooksAnnotationClientVersionRanges (0 custom class methods, 4 custom properties) +// GTLBooksAnnotationCurrentVersionRanges (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBooksAnnotationClientVersionRanges; +@class GTLBooksAnnotationCurrentVersionRanges; +@class GTLBooksAnnotationsRange; + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotation +// + +@interface GTLBooksAnnotation : GTLObject + +// Anchor text after excerpt. +@property (copy) NSString *afterSelectedText; + +// Anchor text before excerpt. +@property (copy) NSString *beforeSelectedText; + +// Selection ranges sent from the client. +@property (retain) GTLBooksAnnotationClientVersionRanges *clientVersionRanges; + +// Timestamp for the created time of this annotation. +@property (retain) GTLDateTime *created; + +// Selection ranges for the most recent content version. +@property (retain) GTLBooksAnnotationCurrentVersionRanges *currentVersionRanges; + +// User-created data for this annotation. +@property (copy) NSString *data; + +// Indicates that this annotation is deleted. +@property (retain) NSNumber *deleted; // boolValue + +// The highlight style for this annotation. +@property (copy) NSString *highlightStyle; + +// Id of this annotation, in the form of a GUID. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Resource type. +@property (copy) NSString *kind; + +// The layer this annotation is for. +@property (copy) NSString *layerId; + +// Pages that this annotation spans. +@property (retain) NSArray *pageIds; // of NSString + +// Excerpt from the volume. +@property (copy) NSString *selectedText; + +// URL to this resource. +@property (copy) NSString *selfLink; + +// Timestamp for the last time this annotation was modified. +@property (retain) GTLDateTime *updated; + +// The volume that this annotation belongs to. +@property (copy) NSString *volumeId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotationClientVersionRanges +// + +@interface GTLBooksAnnotationClientVersionRanges : GTLObject + +// Range in CFI format for this annotation sent by client. +@property (retain) GTLBooksAnnotationsRange *cfiRange; + +// Content version the client sent in. +@property (copy) NSString *contentVersion; + +// Range in GB image format for this annotation sent by client. +@property (retain) GTLBooksAnnotationsRange *gbImageRange; + +// Range in GB text format for this annotation sent by client. +@property (retain) GTLBooksAnnotationsRange *gbTextRange; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotationCurrentVersionRanges +// + +@interface GTLBooksAnnotationCurrentVersionRanges : GTLObject + +// Range in CFI format for this annotation for version above. +@property (retain) GTLBooksAnnotationsRange *cfiRange; + +// Content version applicable to ranges below. +@property (copy) NSString *contentVersion; + +// Range in GB image format for this annotation for version above. +@property (retain) GTLBooksAnnotationsRange *gbImageRange; + +// Range in GB text format for this annotation for version above. +@property (retain) GTLBooksAnnotationsRange *gbTextRange; + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksAnnotation.m b/GTL/Source/Services/Books/Generated/GTLBooksAnnotation.m new file mode 100644 index 0000000..49b7212 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksAnnotation.m @@ -0,0 +1,85 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksAnnotation.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksAnnotation (0 custom class methods, 16 custom properties) +// GTLBooksAnnotationClientVersionRanges (0 custom class methods, 4 custom properties) +// GTLBooksAnnotationCurrentVersionRanges (0 custom class methods, 4 custom properties) + +#import "GTLBooksAnnotation.h" + +#import "GTLBooksAnnotationsRange.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotation +// + +@implementation GTLBooksAnnotation +@dynamic afterSelectedText, beforeSelectedText, clientVersionRanges, created, + currentVersionRanges, data, deleted, highlightStyle, identifier, kind, + layerId, pageIds, selectedText, selfLink, updated, volumeId; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"pageIds"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#annotation"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotationClientVersionRanges +// + +@implementation GTLBooksAnnotationClientVersionRanges +@dynamic cfiRange, contentVersion, gbImageRange, gbTextRange; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotationCurrentVersionRanges +// + +@implementation GTLBooksAnnotationCurrentVersionRanges +@dynamic cfiRange, contentVersion, gbImageRange, gbTextRange; +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksAnnotationdata.h b/GTL/Source/Services/Books/Generated/GTLBooksAnnotationdata.h new file mode 100644 index 0000000..f656f9f --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksAnnotationdata.h @@ -0,0 +1,72 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksAnnotationdata.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksAnnotationdata (0 custom class methods, 9 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotationdata +// + +@interface GTLBooksAnnotationdata : GTLObject + +// The type of annotation this data is for. +@property (copy) NSString *annotationType; + +@property (retain) id data; + +// Base64 encoded data for this annotation data. +@property (copy) NSString *encodedData; // GTLBase64 can encode/decode (probably web-safe format) + +// Unique id for this annotation data. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Resource Type +@property (copy) NSString *kind; + +// The Layer id for this data. * +@property (copy) NSString *layerId; + +// URL for this resource. * +@property (copy) NSString *selfLink; + +// Timestamp for the last time this data was updated. (RFC 3339 UTC date-time +// format). +@property (retain) GTLDateTime *updated; + +// The volume id for this data. * +@property (copy) NSString *volumeId; + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksAnnotationdata.m b/GTL/Source/Services/Books/Generated/GTLBooksAnnotationdata.m new file mode 100644 index 0000000..6b843dd --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksAnnotationdata.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksAnnotationdata.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksAnnotationdata (0 custom class methods, 9 custom properties) + +#import "GTLBooksAnnotationdata.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotationdata +// + +@implementation GTLBooksAnnotationdata +@dynamic annotationType, data, encodedData, identifier, kind, layerId, selfLink, + updated, volumeId; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"encoded_data", @"encodedData", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#annotationdata"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksAnnotations.h b/GTL/Source/Services/Books/Generated/GTLBooksAnnotations.h new file mode 100644 index 0000000..701de03 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksAnnotations.h @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksAnnotations.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksAnnotations (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBooksAnnotation; + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotations +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLBooksAnnotations : GTLCollectionObject + +// A list of annotations. +@property (retain) NSArray *items; // of GTLBooksAnnotation + +// Resource type. +@property (copy) NSString *kind; + +// Token to pass in for pagination for the next page. This will not be present +// if this request does not have more results. +@property (copy) NSString *nextPageToken; + +// Total number of annotations found. This may be greater than the number of +// notes returned in this response if results have been paginated. +@property (retain) NSNumber *totalItems; // intValue + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksAnnotations.m b/GTL/Source/Services/Books/Generated/GTLBooksAnnotations.m new file mode 100644 index 0000000..25ccc7f --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksAnnotations.m @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksAnnotations.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksAnnotations (0 custom class methods, 4 custom properties) + +#import "GTLBooksAnnotations.h" + +#import "GTLBooksAnnotation.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotations +// + +@implementation GTLBooksAnnotations +@dynamic items, kind, nextPageToken, totalItems; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBooksAnnotation class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#annotations"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksAnnotationsRange.h b/GTL/Source/Services/Books/Generated/GTLBooksAnnotationsRange.h new file mode 100644 index 0000000..fb3e851 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksAnnotationsRange.h @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksAnnotationsRange.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksAnnotationsRange (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotationsRange +// + +@interface GTLBooksAnnotationsRange : GTLObject + +// The offset from the ending position. +@property (copy) NSString *endOffset; + +// The ending position for the range. +@property (copy) NSString *endPosition; + +// The offset from the starting position. +@property (copy) NSString *startOffset; + +// The starting position for the range. +@property (copy) NSString *startPosition; + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksAnnotationsRange.m b/GTL/Source/Services/Books/Generated/GTLBooksAnnotationsRange.m new file mode 100644 index 0000000..e6a4602 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksAnnotationsRange.m @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksAnnotationsRange.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksAnnotationsRange (0 custom class methods, 4 custom properties) + +#import "GTLBooksAnnotationsRange.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotationsRange +// + +@implementation GTLBooksAnnotationsRange +@dynamic endOffset, endPosition, startOffset, startPosition; +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksAnnotationsdata.h b/GTL/Source/Services/Books/Generated/GTLBooksAnnotationsdata.h new file mode 100644 index 0000000..c9991fa --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksAnnotationsdata.h @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksAnnotationsdata.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksAnnotationsdata (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBooksAnnotationdata; + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotationsdata +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLBooksAnnotationsdata : GTLCollectionObject + +// A list of Annotation Data. +@property (retain) NSArray *items; // of GTLBooksAnnotationdata + +// Resource type +@property (copy) NSString *kind; + +// Token to pass in for pagination for the next page. This will not be present +// if this request does not have more results. +@property (copy) NSString *nextPageToken; + +// The total number of volume annotations found. +@property (retain) NSNumber *totalItems; // intValue + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksAnnotationsdata.m b/GTL/Source/Services/Books/Generated/GTLBooksAnnotationsdata.m new file mode 100644 index 0000000..47ad982 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksAnnotationsdata.m @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksAnnotationsdata.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksAnnotationsdata (0 custom class methods, 4 custom properties) + +#import "GTLBooksAnnotationsdata.h" + +#import "GTLBooksAnnotationdata.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksAnnotationsdata +// + +@implementation GTLBooksAnnotationsdata +@dynamic items, kind, nextPageToken, totalItems; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBooksAnnotationdata class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#annotationsdata"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksBookshelf.h b/GTL/Source/Services/Books/Generated/GTLBooksBookshelf.h new file mode 100644 index 0000000..4d3d345 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksBookshelf.h @@ -0,0 +1,79 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksBookshelf.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksBookshelf (0 custom class methods, 10 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLBooksBookshelf +// + +@interface GTLBooksBookshelf : GTLObject + +// Whether this bookshelf is PUBLIC or PRIVATE. +@property (copy) NSString *access; + +// Created time for this bookshelf (formatted UTC timestamp with millisecond +// resolution). +@property (retain) GTLDateTime *created; + +// Description of this bookshelf. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Id of this bookshelf, only unique by user. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // intValue + +// Resource type for bookshelf metadata. +@property (copy) NSString *kind; + +// URL to this resource. +@property (copy) NSString *selfLink; + +// Title of this bookshelf. +@property (copy) NSString *title; + +// Last modified time of this bookshelf (formatted UTC timestamp with +// millisecond resolution). +@property (retain) GTLDateTime *updated; + +// Number of volumes in this bookshelf. +@property (retain) NSNumber *volumeCount; // intValue + +// Last time a volume was added or removed from this bookshelf (formatted UTC +// timestamp with millisecond resolution). +@property (retain) GTLDateTime *volumesLastUpdated; + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksBookshelf.m b/GTL/Source/Services/Books/Generated/GTLBooksBookshelf.m new file mode 100644 index 0000000..0237fe6 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksBookshelf.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksBookshelf.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksBookshelf (0 custom class methods, 10 custom properties) + +#import "GTLBooksBookshelf.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksBookshelf +// + +@implementation GTLBooksBookshelf +@dynamic access, created, descriptionProperty, identifier, kind, selfLink, + title, updated, volumeCount, volumesLastUpdated; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#bookshelf"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksBookshelves.h b/GTL/Source/Services/Books/Generated/GTLBooksBookshelves.h new file mode 100644 index 0000000..04c8aee --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksBookshelves.h @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksBookshelves.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksBookshelves (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBooksBookshelf; + +// ---------------------------------------------------------------------------- +// +// GTLBooksBookshelves +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLBooksBookshelves : GTLCollectionObject + +// A list of bookshelves. +@property (retain) NSArray *items; // of GTLBooksBookshelf + +// Resource type. +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksBookshelves.m b/GTL/Source/Services/Books/Generated/GTLBooksBookshelves.m new file mode 100644 index 0000000..19414cf --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksBookshelves.m @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksBookshelves.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksBookshelves (0 custom class methods, 2 custom properties) + +#import "GTLBooksBookshelves.h" + +#import "GTLBooksBookshelf.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksBookshelves +// + +@implementation GTLBooksBookshelves +@dynamic items, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBooksBookshelf class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#bookshelves"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksConcurrentAccessRestriction.h b/GTL/Source/Services/Books/Generated/GTLBooksConcurrentAccessRestriction.h new file mode 100644 index 0000000..0df5cdd --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksConcurrentAccessRestriction.h @@ -0,0 +1,78 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksConcurrentAccessRestriction.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksConcurrentAccessRestriction (0 custom class methods, 11 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLBooksConcurrentAccessRestriction +// + +@interface GTLBooksConcurrentAccessRestriction : GTLObject + +// Whether access is granted for this (user, device, volume). +@property (retain) NSNumber *deviceAllowed; // boolValue + +// Resource type. +@property (copy) NSString *kind; + +// The maximum number of concurrent access licenses for this volume. +@property (retain) NSNumber *maxConcurrentDevices; // intValue + +// Error/warning message. +@property (copy) NSString *message; + +// Client nonce for verification. Download access and client-validation only. +@property (copy) NSString *nonce; + +// Error/warning reason code. +@property (copy) NSString *reasonCode; + +// Whether this volume has any concurrent access restrictions. +@property (retain) NSNumber *restricted; // boolValue + +// Response signature. +@property (copy) NSString *signature; + +// Client app identifier for verification. Download access and client-validation +// only. +@property (copy) NSString *source; + +// Time in seconds for license auto-expiration. +@property (retain) NSNumber *timeWindowSeconds; // intValue + +// Identifies the volume for which this entry applies. +@property (copy) NSString *volumeId; + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksConcurrentAccessRestriction.m b/GTL/Source/Services/Books/Generated/GTLBooksConcurrentAccessRestriction.m new file mode 100644 index 0000000..d964d6a --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksConcurrentAccessRestriction.m @@ -0,0 +1,46 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksConcurrentAccessRestriction.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksConcurrentAccessRestriction (0 custom class methods, 11 custom properties) + +#import "GTLBooksConcurrentAccessRestriction.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksConcurrentAccessRestriction +// + +@implementation GTLBooksConcurrentAccessRestriction +@dynamic deviceAllowed, kind, maxConcurrentDevices, message, nonce, reasonCode, + restricted, signature, source, timeWindowSeconds, volumeId; + ++ (void)load { + [self registerObjectClassForKind:@"books#concurrentAccessRestriction"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksConstants.h b/GTL/Source/Services/Books/Generated/GTLBooksConstants.h new file mode 100644 index 0000000..3332f7c --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksConstants.h @@ -0,0 +1,78 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// Manage your books +GTL_EXTERN NSString * const kGTLAuthScopeBooks; // "https://www.googleapis.com/auth/books" + +// Action +GTL_EXTERN NSString * const kGTLBooksActionBookmark; // "bookmark" +GTL_EXTERN NSString * const kGTLBooksActionChapter; // "chapter" +GTL_EXTERN NSString * const kGTLBooksActionNextPage; // "next-page" +GTL_EXTERN NSString * const kGTLBooksActionPrevPage; // "prev-page" +GTL_EXTERN NSString * const kGTLBooksActionScroll; // "scroll" +GTL_EXTERN NSString * const kGTLBooksActionSearch; // "search" + +// Association +GTL_EXTERN NSString * const kGTLBooksAssociationEndOfSample; // "end-of-sample" +GTL_EXTERN NSString * const kGTLBooksAssociationEndOfVolume; // "end-of-volume" + +// Download +GTL_EXTERN NSString * const kGTLBooksDownloadEpub; // "epub" + +// Filter +GTL_EXTERN NSString * const kGTLBooksFilterEbooks; // "ebooks" +GTL_EXTERN NSString * const kGTLBooksFilterFreeEbooks; // "free-ebooks" +GTL_EXTERN NSString * const kGTLBooksFilterFull; // "full" +GTL_EXTERN NSString * const kGTLBooksFilterPaidEbooks; // "paid-ebooks" +GTL_EXTERN NSString * const kGTLBooksFilterPartial; // "partial" + +// LibraryRestrict +GTL_EXTERN NSString * const kGTLBooksLibraryRestrictMyLibrary; // "my-library" +GTL_EXTERN NSString * const kGTLBooksLibraryRestrictNoRestrict; // "no-restrict" + +// OrderBy +GTL_EXTERN NSString * const kGTLBooksOrderByNewest; // "newest" +GTL_EXTERN NSString * const kGTLBooksOrderByRelevance; // "relevance" + +// PrintType +GTL_EXTERN NSString * const kGTLBooksPrintTypeAll; // "all" +GTL_EXTERN NSString * const kGTLBooksPrintTypeBooks; // "books" +GTL_EXTERN NSString * const kGTLBooksPrintTypeMagazines; // "magazines" + +// Projection +GTL_EXTERN NSString * const kGTLBooksProjectionFull; // "full" +GTL_EXTERN NSString * const kGTLBooksProjectionLite; // "lite" diff --git a/GTL/Source/Services/Books/Generated/GTLBooksConstants.m b/GTL/Source/Services/Books/Generated/GTLBooksConstants.m new file mode 100644 index 0000000..48941f9 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksConstants.m @@ -0,0 +1,71 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started + +#import "GTLBooksConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeBooks = @"https://www.googleapis.com/auth/books"; + +// Action +NSString * const kGTLBooksActionBookmark = @"bookmark"; +NSString * const kGTLBooksActionChapter = @"chapter"; +NSString * const kGTLBooksActionNextPage = @"next-page"; +NSString * const kGTLBooksActionPrevPage = @"prev-page"; +NSString * const kGTLBooksActionScroll = @"scroll"; +NSString * const kGTLBooksActionSearch = @"search"; + +// Association +NSString * const kGTLBooksAssociationEndOfSample = @"end-of-sample"; +NSString * const kGTLBooksAssociationEndOfVolume = @"end-of-volume"; + +// Download +NSString * const kGTLBooksDownloadEpub = @"epub"; + +// Filter +NSString * const kGTLBooksFilterEbooks = @"ebooks"; +NSString * const kGTLBooksFilterFreeEbooks = @"free-ebooks"; +NSString * const kGTLBooksFilterFull = @"full"; +NSString * const kGTLBooksFilterPaidEbooks = @"paid-ebooks"; +NSString * const kGTLBooksFilterPartial = @"partial"; + +// LibraryRestrict +NSString * const kGTLBooksLibraryRestrictMyLibrary = @"my-library"; +NSString * const kGTLBooksLibraryRestrictNoRestrict = @"no-restrict"; + +// OrderBy +NSString * const kGTLBooksOrderByNewest = @"newest"; +NSString * const kGTLBooksOrderByRelevance = @"relevance"; + +// PrintType +NSString * const kGTLBooksPrintTypeAll = @"all"; +NSString * const kGTLBooksPrintTypeBooks = @"books"; +NSString * const kGTLBooksPrintTypeMagazines = @"magazines"; + +// Projection +NSString * const kGTLBooksProjectionFull = @"full"; +NSString * const kGTLBooksProjectionLite = @"lite"; diff --git a/GTL/Source/Services/Books/Generated/GTLBooksDownloadAccessRestriction.h b/GTL/Source/Services/Books/Generated/GTLBooksDownloadAccessRestriction.h new file mode 100644 index 0000000..29667a2 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksDownloadAccessRestriction.h @@ -0,0 +1,85 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksDownloadAccessRestriction.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksDownloadAccessRestriction (0 custom class methods, 12 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLBooksDownloadAccessRestriction +// + +@interface GTLBooksDownloadAccessRestriction : GTLObject + +// If restricted, whether access is granted for this (user, device, volume). +@property (retain) NSNumber *deviceAllowed; // boolValue + +// If restricted, the number of content download licenses already acquired +// (including the requesting client, if licensed). +@property (retain) NSNumber *downloadsAcquired; // intValue + +// If deviceAllowed, whether access was just acquired with this request. +@property (retain) NSNumber *justAcquired; // boolValue + +// Resource type. +@property (copy) NSString *kind; + +// If restricted, the maximum number of content download licenses for this +// volume. +@property (retain) NSNumber *maxDownloadDevices; // intValue + +// Error/warning message. +@property (copy) NSString *message; + +// Client nonce for verification. Download access and client-validation only. +@property (copy) NSString *nonce; + +// Error/warning reason code. Additional codes may be added in the future. 0 OK +// 100 ACCESS_DENIED_PUBLISHER_LIMIT 101 ACCESS_DENIED_LIMIT 200 +// WARNING_USED_LAST_ACCESS +@property (copy) NSString *reasonCode; + +// Whether this volume has any download access restrictions. +@property (retain) NSNumber *restricted; // boolValue + +// Response signature. +@property (copy) NSString *signature; + +// Client app identifier for verification. Download access and client-validation +// only. +@property (copy) NSString *source; + +// Identifies the volume for which this entry applies. +@property (copy) NSString *volumeId; + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksDownloadAccessRestriction.m b/GTL/Source/Services/Books/Generated/GTLBooksDownloadAccessRestriction.m new file mode 100644 index 0000000..6a86264 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksDownloadAccessRestriction.m @@ -0,0 +1,47 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksDownloadAccessRestriction.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksDownloadAccessRestriction (0 custom class methods, 12 custom properties) + +#import "GTLBooksDownloadAccessRestriction.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksDownloadAccessRestriction +// + +@implementation GTLBooksDownloadAccessRestriction +@dynamic deviceAllowed, downloadsAcquired, justAcquired, kind, + maxDownloadDevices, message, nonce, reasonCode, restricted, signature, + source, volumeId; + ++ (void)load { + [self registerObjectClassForKind:@"books#downloadAccessRestriction"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksDownloadAccesses.h b/GTL/Source/Services/Books/Generated/GTLBooksDownloadAccesses.h new file mode 100644 index 0000000..4c9a4b6 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksDownloadAccesses.h @@ -0,0 +1,52 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksDownloadAccesses.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksDownloadAccesses (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBooksDownloadAccessRestriction; + +// ---------------------------------------------------------------------------- +// +// GTLBooksDownloadAccesses +// + +@interface GTLBooksDownloadAccesses : GTLObject + +// A list of download access responses. +@property (retain) NSArray *downloadAccessList; // of GTLBooksDownloadAccessRestriction + +// Resource type. +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksDownloadAccesses.m b/GTL/Source/Services/Books/Generated/GTLBooksDownloadAccesses.m new file mode 100644 index 0000000..873730f --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksDownloadAccesses.m @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksDownloadAccesses.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksDownloadAccesses (0 custom class methods, 2 custom properties) + +#import "GTLBooksDownloadAccesses.h" + +#import "GTLBooksDownloadAccessRestriction.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksDownloadAccesses +// + +@implementation GTLBooksDownloadAccesses +@dynamic downloadAccessList, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBooksDownloadAccessRestriction class] + forKey:@"downloadAccessList"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#downloadAccesses"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksLayersummaries.h b/GTL/Source/Services/Books/Generated/GTLBooksLayersummaries.h new file mode 100644 index 0000000..b0e6674 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksLayersummaries.h @@ -0,0 +1,58 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksLayersummaries.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksLayersummaries (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBooksLayersummary; + +// ---------------------------------------------------------------------------- +// +// GTLBooksLayersummaries +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLBooksLayersummaries : GTLCollectionObject + +// A list of layer summary items. +@property (retain) NSArray *items; // of GTLBooksLayersummary + +// Resource type. +@property (copy) NSString *kind; + +// The total number of layer summaries found. +@property (retain) NSNumber *totalItems; // intValue + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksLayersummaries.m b/GTL/Source/Services/Books/Generated/GTLBooksLayersummaries.m new file mode 100644 index 0000000..27e701f --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksLayersummaries.m @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksLayersummaries.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksLayersummaries (0 custom class methods, 3 custom properties) + +#import "GTLBooksLayersummaries.h" + +#import "GTLBooksLayersummary.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksLayersummaries +// + +@implementation GTLBooksLayersummaries +@dynamic items, kind, totalItems; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBooksLayersummary class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#layersummaries"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksLayersummary.h b/GTL/Source/Services/Books/Generated/GTLBooksLayersummary.h new file mode 100644 index 0000000..b045cab --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksLayersummary.h @@ -0,0 +1,82 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksLayersummary.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksLayersummary (0 custom class methods, 12 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLBooksLayersummary +// + +@interface GTLBooksLayersummary : GTLObject + +// The number of annotations for this layer. +@property (retain) NSNumber *annotationCount; // intValue + +// Link to get data for this annotation. +@property (copy) NSString *annotationsDataLink; + +// The link to get the annotations for this layer. +@property (copy) NSString *annotationsLink; + +// The list of annotation types contained for this layer. +@property (retain) NSArray *annotationTypes; // of NSString + +// The content version this resource is for. +@property (copy) NSString *contentVersion; + +// The number of data items for this layer. +@property (retain) NSNumber *dataCount; // intValue + +// Unique id of this layer summary. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Resource Type +@property (copy) NSString *kind; + +// The layer id for this summary. +@property (copy) NSString *layerId; + +// URL to this resource. +@property (copy) NSString *selfLink; + +// Timestamp for the last time an item in this layer was updated. (RFC 3339 UTC +// date-time format). +@property (retain) GTLDateTime *updated; + +// The volume id this resource is for. +@property (copy) NSString *volumeId; + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksLayersummary.m b/GTL/Source/Services/Books/Generated/GTLBooksLayersummary.m new file mode 100644 index 0000000..85e7f86 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksLayersummary.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksLayersummary.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksLayersummary (0 custom class methods, 12 custom properties) + +#import "GTLBooksLayersummary.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksLayersummary +// + +@implementation GTLBooksLayersummary +@dynamic annotationCount, annotationsDataLink, annotationsLink, annotationTypes, + contentVersion, dataCount, identifier, kind, layerId, selfLink, + updated, volumeId; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"annotationTypes"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#layersummary"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksReadingPosition.h b/GTL/Source/Services/Books/Generated/GTLBooksReadingPosition.h new file mode 100644 index 0000000..c2f444a --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksReadingPosition.h @@ -0,0 +1,66 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksReadingPosition.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksReadingPosition (0 custom class methods, 7 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLBooksReadingPosition +// + +@interface GTLBooksReadingPosition : GTLObject + +// Position in an EPUB as a CFI. +@property (copy) NSString *epubCfiPosition; + +// Position in a volume for image-based content. +@property (copy) NSString *gbImagePosition; + +// Position in a volume for text-based content. +@property (copy) NSString *gbTextPosition; + +// Resource type for a reading position. +@property (copy) NSString *kind; + +// Position in a PDF file. +@property (copy) NSString *pdfPosition; + +// Timestamp when this reading position was last updated (formatted UTC +// timestamp with millisecond resolution). +@property (retain) GTLDateTime *updated; + +// Volume id associated with this reading position. +@property (copy) NSString *volumeId; + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksReadingPosition.m b/GTL/Source/Services/Books/Generated/GTLBooksReadingPosition.m new file mode 100644 index 0000000..da66e70 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksReadingPosition.m @@ -0,0 +1,46 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksReadingPosition.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksReadingPosition (0 custom class methods, 7 custom properties) + +#import "GTLBooksReadingPosition.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksReadingPosition +// + +@implementation GTLBooksReadingPosition +@dynamic epubCfiPosition, gbImagePosition, gbTextPosition, kind, pdfPosition, + updated, volumeId; + ++ (void)load { + [self registerObjectClassForKind:@"books#readingPosition"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksRequestAccess.h b/GTL/Source/Services/Books/Generated/GTLBooksRequestAccess.h new file mode 100644 index 0000000..000f29c --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksRequestAccess.h @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksRequestAccess.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksRequestAccess (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBooksConcurrentAccessRestriction; +@class GTLBooksDownloadAccessRestriction; + +// ---------------------------------------------------------------------------- +// +// GTLBooksRequestAccess +// + +@interface GTLBooksRequestAccess : GTLObject + +// A concurrent access response. +@property (retain) GTLBooksConcurrentAccessRestriction *concurrentAccess; + +// A download access response. +@property (retain) GTLBooksDownloadAccessRestriction *downloadAccess; + +// Resource type. +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksRequestAccess.m b/GTL/Source/Services/Books/Generated/GTLBooksRequestAccess.m new file mode 100644 index 0000000..505e9da --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksRequestAccess.m @@ -0,0 +1,48 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksRequestAccess.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksRequestAccess (0 custom class methods, 3 custom properties) + +#import "GTLBooksRequestAccess.h" + +#import "GTLBooksConcurrentAccessRestriction.h" +#import "GTLBooksDownloadAccessRestriction.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksRequestAccess +// + +@implementation GTLBooksRequestAccess +@dynamic concurrentAccess, downloadAccess, kind; + ++ (void)load { + [self registerObjectClassForKind:@"books#requestAccess"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksReview.h b/GTL/Source/Services/Books/Generated/GTLBooksReview.h new file mode 100644 index 0000000..243ef94 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksReview.h @@ -0,0 +1,115 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksReview.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksReview (0 custom class methods, 10 custom properties) +// GTLBooksReviewAuthor (0 custom class methods, 1 custom properties) +// GTLBooksReviewSource (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBooksReviewAuthor; +@class GTLBooksReviewSource; + +// ---------------------------------------------------------------------------- +// +// GTLBooksReview +// + +@interface GTLBooksReview : GTLObject + +// Author of this review. +@property (retain) GTLBooksReviewAuthor *author; + +// Review text. +@property (copy) NSString *content; + +// Date of this review. +@property (copy) NSString *date; + +// URL for the full review text, for reviews gathered from the web. +@property (copy) NSString *fullTextUrl; + +// Resource type for a review. +@property (copy) NSString *kind; + +// Star rating for this review. Possible values are ONE, TWO, THREE, FOUR, FIVE +// or NOT_RATED. +@property (copy) NSString *rating; + +// Information regarding the source of this review, when the review is not from +// a Google Books user. +@property (retain) GTLBooksReviewSource *source; + +// Title for this review. +@property (copy) NSString *title; + +// Source type for this review. Possible values are EDITORIAL, WEB_USER or +// GOOGLE_USER. +@property (copy) NSString *type; + +// Volume that this review is for. +@property (copy) NSString *volumeId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksReviewAuthor +// + +@interface GTLBooksReviewAuthor : GTLObject + +// Name of this person. +@property (copy) NSString *displayName; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksReviewSource +// + +@interface GTLBooksReviewSource : GTLObject + +// Name of the source. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Extra text about the source of the review. +@property (copy) NSString *extraDescription; + +// URL of the source of the review. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksReview.m b/GTL/Source/Services/Books/Generated/GTLBooksReview.m new file mode 100644 index 0000000..f5f140b --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksReview.m @@ -0,0 +1,76 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksReview.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksReview (0 custom class methods, 10 custom properties) +// GTLBooksReviewAuthor (0 custom class methods, 1 custom properties) +// GTLBooksReviewSource (0 custom class methods, 3 custom properties) + +#import "GTLBooksReview.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksReview +// + +@implementation GTLBooksReview +@dynamic author, content, date, fullTextUrl, kind, rating, source, title, type, + volumeId; + ++ (void)load { + [self registerObjectClassForKind:@"books#review"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksReviewAuthor +// + +@implementation GTLBooksReviewAuthor +@dynamic displayName; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksReviewSource +// + +@implementation GTLBooksReviewSource +@dynamic descriptionProperty, extraDescription, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksVolume.h b/GTL/Source/Services/Books/Generated/GTLBooksVolume.h new file mode 100644 index 0000000..b8ba238 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksVolume.h @@ -0,0 +1,476 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksVolume.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksVolume (0 custom class methods, 10 custom properties) +// GTLBooksVolumeAccessInfo (0 custom class methods, 11 custom properties) +// GTLBooksVolumeRecommendedInfo (0 custom class methods, 1 custom properties) +// GTLBooksVolumeSaleInfo (0 custom class methods, 7 custom properties) +// GTLBooksVolumeSearchInfo (0 custom class methods, 1 custom properties) +// GTLBooksVolumeUserInfo (0 custom class methods, 6 custom properties) +// GTLBooksVolumeVolumeInfo (0 custom class methods, 20 custom properties) +// GTLBooksVolumeAccessInfoEpub (0 custom class methods, 3 custom properties) +// GTLBooksVolumeAccessInfoPdf (0 custom class methods, 3 custom properties) +// GTLBooksVolumeSaleInfoListPrice (0 custom class methods, 2 custom properties) +// GTLBooksVolumeSaleInfoRetailPrice (0 custom class methods, 2 custom properties) +// GTLBooksVolumeVolumeInfoDimensions (0 custom class methods, 3 custom properties) +// GTLBooksVolumeVolumeInfoImageLinks (0 custom class methods, 6 custom properties) +// GTLBooksVolumeVolumeInfoIndustryIdentifiersItem (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBooksDownloadAccessRestriction; +@class GTLBooksReadingPosition; +@class GTLBooksReview; +@class GTLBooksVolumeAccessInfo; +@class GTLBooksVolumeAccessInfoEpub; +@class GTLBooksVolumeAccessInfoPdf; +@class GTLBooksVolumeRecommendedInfo; +@class GTLBooksVolumeSaleInfo; +@class GTLBooksVolumeSaleInfoListPrice; +@class GTLBooksVolumeSaleInfoRetailPrice; +@class GTLBooksVolumeSearchInfo; +@class GTLBooksVolumeUserInfo; +@class GTLBooksVolumeVolumeInfo; +@class GTLBooksVolumeVolumeInfoDimensions; +@class GTLBooksVolumeVolumeInfoImageLinks; +@class GTLBooksVolumeVolumeInfoIndustryIdentifiersItem; + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolume +// + +@interface GTLBooksVolume : GTLObject + +// Any information about a volume related to reading or obtaining that volume +// text. This information can depend on country (books may be public domain in +// one country but not in another, e.g.). +@property (retain) GTLBooksVolumeAccessInfo *accessInfo; + +// Opaque identifier for a specific version of a volume resource. (In LITE +// projection) +@property (copy) NSString *ETag; + +// Unique identifier for a volume. (In LITE projection.) +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Resource type for a volume. (In LITE projection.) +@property (copy) NSString *kind; + +// Recommendation related information for this volume. +@property (retain) GTLBooksVolumeRecommendedInfo *recommendedInfo; + +// Any information about a volume related to the eBookstore and/or +// purchaseability. This information can depend on the country where the request +// originates from (i.e. books may not be for sale in certain countries). +@property (retain) GTLBooksVolumeSaleInfo *saleInfo; + +// Search result information related to this volume. +@property (retain) GTLBooksVolumeSearchInfo *searchInfo; + +// URL to this resource. (In LITE projection.) +@property (copy) NSString *selfLink; + +// User specific information related to this volume. (e.g. page this user last +// read or whether they purchased this book) +@property (retain) GTLBooksVolumeUserInfo *userInfo; + +// General volume information. +@property (retain) GTLBooksVolumeVolumeInfo *volumeInfo; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeAccessInfo +// + +@interface GTLBooksVolumeAccessInfo : GTLObject + +// Combines the access and viewability of this volume into a single status field +// for this user. Values can be FULL_PURCHASED, FULL_PUBLIC_DOMAIN, SAMPLE or +// NONE. (In LITE projection.) +@property (copy) NSString *accessViewStatus; + +// The two-letter ISO_3166-1 country code for which this access information is +// valid. (In LITE projection.) +@property (copy) NSString *country; + +// Information about a volume's download license access restrictions. +@property (retain) GTLBooksDownloadAccessRestriction *downloadAccess; + +// Whether this volume can be embedded in a viewport using the Embedded Viewer +// API. +@property (retain) NSNumber *embeddable; // boolValue + +// Information about epub content. (In LITE projection.) +@property (retain) GTLBooksVolumeAccessInfoEpub *epub; + +// Information about pdf content. (In LITE projection.) +@property (retain) GTLBooksVolumeAccessInfoPdf *pdf; + +// Whether or not this book is public domain in the country listed above. +@property (retain) NSNumber *publicDomain; // boolValue + +// Whether text-to-speech is permitted for this volume. Values can be ALLOWED, +// ALLOWED_FOR_ACCESSIBILITY, or NOT_ALLOWED. +@property (copy) NSString *textToSpeechPermission; + +// The read access of a volume. Possible values are PARTIAL, ALL_PAGES, NO_PAGES +// or UNKNOWN. This value depends on the country listed above. A value of +// PARTIAL means that the publisher has allowed some portion of the volume to be +// viewed publicly, without purchase. This can apply to eBooks as well as +// non-eBooks. Public domain books will always have a value of ALL_PAGES. +@property (copy) NSString *viewability; + +// For ordered but not yet processed orders, we give a URL that can be used to +// go to the appropriate Google Wallet page. +@property (copy) NSString *viewOrderUrl; + +// URL to read this volume on the Google Books site. Link will not allow users +// to read non-viewable volumes. +@property (copy) NSString *webReaderLink; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeRecommendedInfo +// + +@interface GTLBooksVolumeRecommendedInfo : GTLObject + +// A text explaining why this volume is recommended. +@property (copy) NSString *explanation; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeSaleInfo +// + +@interface GTLBooksVolumeSaleInfo : GTLObject + +// URL to purchase this volume on the Google Books site. (In LITE projection) +@property (copy) NSString *buyLink; + +// The two-letter ISO_3166-1 country code for which this sale information is +// valid. (In LITE projection.) +@property (copy) NSString *country; + +// Whether or not this volume is an eBook (can be added to the My eBooks shelf). +@property (retain) NSNumber *isEbook; // boolValue + +// Suggested retail price. (In LITE projection.) +@property (retain) GTLBooksVolumeSaleInfoListPrice *listPrice; + +// The date on which this book is available for sale. +@property (retain) GTLDateTime *onSaleDate; + +// The actual selling price of the book. This is the same as the suggested +// retail or list price unless there are offers or discounts on this volume. (In +// LITE projection.) +@property (retain) GTLBooksVolumeSaleInfoRetailPrice *retailPrice; + +// Whether or not this book is available for sale or offered for free in the +// Google eBookstore for the country listed above. Possible values are FOR_SALE, +// FREE, NOT_FOR_SALE, or FOR_PREORDER. +@property (copy) NSString *saleability; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeSearchInfo +// + +@interface GTLBooksVolumeSearchInfo : GTLObject + +// A text snippet containing the search query. +@property (copy) NSString *textSnippet; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeUserInfo +// + +@interface GTLBooksVolumeUserInfo : GTLObject + +// Whether or not this volume is currently in "my books." +@property (retain) NSNumber *isInMyBooks; // boolValue + +// Whether or not this volume was pre-ordered by the authenticated user making +// the request. (In LITE projection.) +@property (retain) NSNumber *isPreordered; // boolValue + +// Whether or not this volume was purchased by the authenticated user making the +// request. (In LITE projection.) +@property (retain) NSNumber *isPurchased; // boolValue + +// The user's current reading position in the volume, if one is available. (In +// LITE projection.) +@property (retain) GTLBooksReadingPosition *readingPosition; + +// This user's review of this volume, if one exists. +@property (retain) GTLBooksReview *review; + +// Timestamp when this volume was last modified by a user action, such as a +// reading position update, volume purchase or writing a review. (RFC 3339 UTC +// date-time format). +@property (retain) GTLDateTime *updated; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeVolumeInfo +// + +@interface GTLBooksVolumeVolumeInfo : GTLObject + +// The names of the authors and/or editors for this volume. (In LITE projection) +@property (retain) NSArray *authors; // of NSString + +// The mean review rating for this volume. (min = 1.0, max = 5.0) +@property (retain) NSNumber *averageRating; // doubleValue + +// Canonical URL for a volume. (In LITE projection.) +@property (copy) NSString *canonicalVolumeLink; + +// A list of subject categories, such as "Fiction", "Suspense", etc. +@property (retain) NSArray *categories; // of NSString + +// An identifier for the version of the volume content (text & images). (In LITE +// projection) +@property (copy) NSString *contentVersion; + +// A synopsis of the volume. The text of the description is formatted in HTML +// and includes simple formatting elements, such as b, i, and br tags. (In LITE +// projection.) +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Physical dimensions of this volume. +@property (retain) GTLBooksVolumeVolumeInfoDimensions *dimensions; + +// A list of image links for all the sizes that are available. (In LITE +// projection.) +@property (retain) GTLBooksVolumeVolumeInfoImageLinks *imageLinks; + +// Industry standard identifiers for this volume. +@property (retain) NSArray *industryIdentifiers; // of GTLBooksVolumeVolumeInfoIndustryIdentifiersItem + +// URL to view information about this volume on the Google Books site. (In LITE +// projection) +@property (copy) NSString *infoLink; + +// Best language for this volume (based on content). It is the two-letter ISO +// 639-1 code such as 'fr', 'en', etc. +@property (copy) NSString *language; + +// The main category to which this volume belongs. It will be the category from +// the categories list returned below that has the highest weight. +@property (copy) NSString *mainCategory; + +// Total number of pages. +@property (retain) NSNumber *pageCount; // intValue + +// URL to preview this volume on the Google Books site. +@property (copy) NSString *previewLink; + +// Type of publication of this volume. Possible values are BOOK or MAGAZINE. +@property (copy) NSString *printType; + +// Date of publication. (In LITE projection.) +@property (copy) NSString *publishedDate; + +// Publisher of this volume. (In LITE projection.) +@property (copy) NSString *publisher; + +// The number of review ratings for this volume. +@property (retain) NSNumber *ratingsCount; // intValue + +// Volume subtitle. (In LITE projection.) +@property (copy) NSString *subtitle; + +// Volume title. (In LITE projection.) +@property (copy) NSString *title; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeAccessInfoEpub +// + +@interface GTLBooksVolumeAccessInfoEpub : GTLObject + +// URL to retrieve ACS token for epub download. (In LITE projection.) +@property (copy) NSString *acsTokenLink; + +// URL to download epub. (In LITE projection.) +@property (copy) NSString *downloadLink; + +// Is a flowing text epub available either as public domain or for purchase. (In +// LITE projection.) +@property (retain) NSNumber *isAvailable; // boolValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeAccessInfoPdf +// + +@interface GTLBooksVolumeAccessInfoPdf : GTLObject + +// URL to retrieve ACS token for pdf download. (In LITE projection.) +@property (copy) NSString *acsTokenLink; + +// URL to download pdf. (In LITE projection.) +@property (copy) NSString *downloadLink; + +// Is a scanned image pdf available either as public domain or for purchase. (In +// LITE projection.) +@property (retain) NSNumber *isAvailable; // boolValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeSaleInfoListPrice +// + +@interface GTLBooksVolumeSaleInfoListPrice : GTLObject + +// Amount in the currency listed below. (In LITE projection.) +@property (retain) NSNumber *amount; // doubleValue + +// An ISO 4217, three-letter currency code. (In LITE projection.) +@property (copy) NSString *currencyCode; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeSaleInfoRetailPrice +// + +@interface GTLBooksVolumeSaleInfoRetailPrice : GTLObject + +// Amount in the currency listed below. (In LITE projection.) +@property (retain) NSNumber *amount; // doubleValue + +// An ISO 4217, three-letter currency code. (In LITE projection.) +@property (copy) NSString *currencyCode; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeVolumeInfoDimensions +// + +@interface GTLBooksVolumeVolumeInfoDimensions : GTLObject + +// Height or length of this volume (in cm). +@property (copy) NSString *height; + +// Thickness of this volume (in cm). +@property (copy) NSString *thickness; + +// Width of this volume (in cm). +@property (copy) NSString *width; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeVolumeInfoImageLinks +// + +@interface GTLBooksVolumeVolumeInfoImageLinks : GTLObject + +// Image link for extra large size (width of ~1280 pixels). (In LITE projection) +@property (copy) NSString *extraLarge; + +// Image link for large size (width of ~800 pixels). (In LITE projection) +@property (copy) NSString *large; + +// Image link for medium size (width of ~575 pixels). (In LITE projection) +@property (copy) NSString *medium; + +// Image link for small size (width of ~300 pixels). (In LITE projection) +@property (copy) NSString *small; + +// Image link for small thumbnail size (width of ~80 pixels). (In LITE +// projection) +@property (copy) NSString *smallThumbnail; + +// Image link for thumbnail size (width of ~128 pixels). (In LITE projection) +@property (copy) NSString *thumbnail; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeVolumeInfoIndustryIdentifiersItem +// + +@interface GTLBooksVolumeVolumeInfoIndustryIdentifiersItem : GTLObject + +// Industry specific volume identifier. +// identifierProperty property maps to 'identifier' in the JSON ('identifier' is +// reserved for remapping 'id'). +@property (copy) NSString *identifierProperty; + +// Identifier type. Possible values are ISBN_10, ISBN_13, ISSN and OTHER. +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksVolume.m b/GTL/Source/Services/Books/Generated/GTLBooksVolume.m new file mode 100644 index 0000000..e5b0bbb --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksVolume.m @@ -0,0 +1,236 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksVolume.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksVolume (0 custom class methods, 10 custom properties) +// GTLBooksVolumeAccessInfo (0 custom class methods, 11 custom properties) +// GTLBooksVolumeRecommendedInfo (0 custom class methods, 1 custom properties) +// GTLBooksVolumeSaleInfo (0 custom class methods, 7 custom properties) +// GTLBooksVolumeSearchInfo (0 custom class methods, 1 custom properties) +// GTLBooksVolumeUserInfo (0 custom class methods, 6 custom properties) +// GTLBooksVolumeVolumeInfo (0 custom class methods, 20 custom properties) +// GTLBooksVolumeAccessInfoEpub (0 custom class methods, 3 custom properties) +// GTLBooksVolumeAccessInfoPdf (0 custom class methods, 3 custom properties) +// GTLBooksVolumeSaleInfoListPrice (0 custom class methods, 2 custom properties) +// GTLBooksVolumeSaleInfoRetailPrice (0 custom class methods, 2 custom properties) +// GTLBooksVolumeVolumeInfoDimensions (0 custom class methods, 3 custom properties) +// GTLBooksVolumeVolumeInfoImageLinks (0 custom class methods, 6 custom properties) +// GTLBooksVolumeVolumeInfoIndustryIdentifiersItem (0 custom class methods, 2 custom properties) + +#import "GTLBooksVolume.h" + +#import "GTLBooksDownloadAccessRestriction.h" +#import "GTLBooksReadingPosition.h" +#import "GTLBooksReview.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolume +// + +@implementation GTLBooksVolume +@dynamic accessInfo, ETag, identifier, kind, recommendedInfo, saleInfo, + searchInfo, selfLink, userInfo, volumeInfo; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#volume"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeAccessInfo +// + +@implementation GTLBooksVolumeAccessInfo +@dynamic accessViewStatus, country, downloadAccess, embeddable, epub, pdf, + publicDomain, textToSpeechPermission, viewability, viewOrderUrl, + webReaderLink; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeRecommendedInfo +// + +@implementation GTLBooksVolumeRecommendedInfo +@dynamic explanation; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeSaleInfo +// + +@implementation GTLBooksVolumeSaleInfo +@dynamic buyLink, country, isEbook, listPrice, onSaleDate, retailPrice, + saleability; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeSearchInfo +// + +@implementation GTLBooksVolumeSearchInfo +@dynamic textSnippet; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeUserInfo +// + +@implementation GTLBooksVolumeUserInfo +@dynamic isInMyBooks, isPreordered, isPurchased, readingPosition, review, + updated; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeVolumeInfo +// + +@implementation GTLBooksVolumeVolumeInfo +@dynamic authors, averageRating, canonicalVolumeLink, categories, + contentVersion, descriptionProperty, dimensions, imageLinks, + industryIdentifiers, infoLink, language, mainCategory, pageCount, + previewLink, printType, publishedDate, publisher, ratingsCount, + subtitle, title; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"authors", + [NSString class], @"categories", + [GTLBooksVolumeVolumeInfoIndustryIdentifiersItem class], @"industryIdentifiers", + nil]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeAccessInfoEpub +// + +@implementation GTLBooksVolumeAccessInfoEpub +@dynamic acsTokenLink, downloadLink, isAvailable; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeAccessInfoPdf +// + +@implementation GTLBooksVolumeAccessInfoPdf +@dynamic acsTokenLink, downloadLink, isAvailable; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeSaleInfoListPrice +// + +@implementation GTLBooksVolumeSaleInfoListPrice +@dynamic amount, currencyCode; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeSaleInfoRetailPrice +// + +@implementation GTLBooksVolumeSaleInfoRetailPrice +@dynamic amount, currencyCode; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeVolumeInfoDimensions +// + +@implementation GTLBooksVolumeVolumeInfoDimensions +@dynamic height, thickness, width; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeVolumeInfoImageLinks +// + +@implementation GTLBooksVolumeVolumeInfoImageLinks +@dynamic extraLarge, large, medium, small, smallThumbnail, thumbnail; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeVolumeInfoIndustryIdentifiersItem +// + +@implementation GTLBooksVolumeVolumeInfoIndustryIdentifiersItem +@dynamic identifierProperty, type; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"identifier" + forKey:@"identifierProperty"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksVolumeannotation.h b/GTL/Source/Services/Books/Generated/GTLBooksVolumeannotation.h new file mode 100644 index 0000000..4e51952 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksVolumeannotation.h @@ -0,0 +1,114 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksVolumeannotation.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksVolumeannotation (0 custom class methods, 14 custom properties) +// GTLBooksVolumeannotationContentRanges (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBooksAnnotationsRange; +@class GTLBooksVolumeannotationContentRanges; + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeannotation +// + +@interface GTLBooksVolumeannotation : GTLObject + +// The annotation data id for this volume annotation. +@property (copy) NSString *annotationDataId; + +// Link to get data for this annotation. +@property (copy) NSString *annotationDataLink; + +// The type of annotation this is. +@property (copy) NSString *annotationType; + +// The content ranges to identify the selected text. +@property (retain) GTLBooksVolumeannotationContentRanges *contentRanges; + +// Data for this annotation. +@property (copy) NSString *data; + +// Indicates that this annotation is deleted. +@property (retain) NSNumber *deleted; // boolValue + +// Unique id of this volume annotation. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Resource Type +@property (copy) NSString *kind; + +// The Layer this annotation is for. +@property (copy) NSString *layerId; + +// Pages the annotation spans. +@property (retain) NSArray *pageIds; // of NSString + +// Excerpt from the volume. +@property (copy) NSString *selectedText; + +// URL to this resource. +@property (copy) NSString *selfLink; + +// Timestamp for the last time this anntoation was updated. (RFC 3339 UTC +// date-time format). +@property (retain) GTLDateTime *updated; + +// The Volume this annotation is for. +@property (copy) NSString *volumeId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeannotationContentRanges +// + +@interface GTLBooksVolumeannotationContentRanges : GTLObject + +// Range in CFI format for this annotation for version above. +@property (retain) GTLBooksAnnotationsRange *cfiRange; + +// Content version applicable to ranges below. +@property (copy) NSString *contentVersion; + +// Range in GB image format for this annotation for version above. +@property (retain) GTLBooksAnnotationsRange *gbImageRange; + +// Range in GB text format for this annotation for version above. +@property (retain) GTLBooksAnnotationsRange *gbTextRange; + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksVolumeannotation.m b/GTL/Source/Services/Books/Generated/GTLBooksVolumeannotation.m new file mode 100644 index 0000000..8d711d5 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksVolumeannotation.m @@ -0,0 +1,74 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksVolumeannotation.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksVolumeannotation (0 custom class methods, 14 custom properties) +// GTLBooksVolumeannotationContentRanges (0 custom class methods, 4 custom properties) + +#import "GTLBooksVolumeannotation.h" + +#import "GTLBooksAnnotationsRange.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeannotation +// + +@implementation GTLBooksVolumeannotation +@dynamic annotationDataId, annotationDataLink, annotationType, contentRanges, + data, deleted, identifier, kind, layerId, pageIds, selectedText, + selfLink, updated, volumeId; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"pageIds"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#volumeannotation"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeannotationContentRanges +// + +@implementation GTLBooksVolumeannotationContentRanges +@dynamic cfiRange, contentVersion, gbImageRange, gbTextRange; +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksVolumeannotations.h b/GTL/Source/Services/Books/Generated/GTLBooksVolumeannotations.h new file mode 100644 index 0000000..20495fa --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksVolumeannotations.h @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksVolumeannotations.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksVolumeannotations (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBooksVolumeannotation; + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeannotations +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLBooksVolumeannotations : GTLCollectionObject + +// A list of volume annotations. +@property (retain) NSArray *items; // of GTLBooksVolumeannotation + +// Resource type +@property (copy) NSString *kind; + +// Token to pass in for pagination for the next page. This will not be present +// if this request does not have more results. +@property (copy) NSString *nextPageToken; + +// The total number of volume annotations found. +@property (retain) NSNumber *totalItems; // intValue + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksVolumeannotations.m b/GTL/Source/Services/Books/Generated/GTLBooksVolumeannotations.m new file mode 100644 index 0000000..30ad7cb --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksVolumeannotations.m @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksVolumeannotations.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksVolumeannotations (0 custom class methods, 4 custom properties) + +#import "GTLBooksVolumeannotations.h" + +#import "GTLBooksVolumeannotation.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumeannotations +// + +@implementation GTLBooksVolumeannotations +@dynamic items, kind, nextPageToken, totalItems; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBooksVolumeannotation class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#volumeannotations"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksVolumes.h b/GTL/Source/Services/Books/Generated/GTLBooksVolumes.h new file mode 100644 index 0000000..acacbcd --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksVolumes.h @@ -0,0 +1,59 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksVolumes.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksVolumes (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLBooksVolume; + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumes +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLBooksVolumes : GTLCollectionObject + +// A list of volumes. +@property (retain) NSArray *items; // of GTLBooksVolume + +// Resource type. +@property (copy) NSString *kind; + +// Total number of volumes found. This might be greater than the number of +// volumes returned in this response if results have been paginated. +@property (retain) NSNumber *totalItems; // intValue + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooksVolumes.m b/GTL/Source/Services/Books/Generated/GTLBooksVolumes.m new file mode 100644 index 0000000..298bf40 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooksVolumes.m @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooksVolumes.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLBooksVolumes (0 custom class methods, 3 custom properties) + +#import "GTLBooksVolumes.h" + +#import "GTLBooksVolume.h" + +// ---------------------------------------------------------------------------- +// +// GTLBooksVolumes +// + +@implementation GTLBooksVolumes +@dynamic items, kind, totalItems; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLBooksVolume class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"books#volumes"]; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLBooks_Sources.m b/GTL/Source/Services/Books/Generated/GTLBooks_Sources.m new file mode 100644 index 0000000..060b15e --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLBooks_Sources.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLBooks_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started + +#import "GTLBooksConstants.m" + +#import "GTLBooksAnnotation.m" +#import "GTLBooksAnnotationdata.m" +#import "GTLBooksAnnotations.m" +#import "GTLBooksAnnotationsdata.m" +#import "GTLBooksAnnotationsRange.m" +#import "GTLBooksBookshelf.m" +#import "GTLBooksBookshelves.m" +#import "GTLBooksConcurrentAccessRestriction.m" +#import "GTLBooksDownloadAccesses.m" +#import "GTLBooksDownloadAccessRestriction.m" +#import "GTLBooksLayersummaries.m" +#import "GTLBooksLayersummary.m" +#import "GTLBooksReadingPosition.m" +#import "GTLBooksRequestAccess.m" +#import "GTLBooksReview.m" +#import "GTLBooksVolume.m" +#import "GTLBooksVolumeannotation.m" +#import "GTLBooksVolumeannotations.m" +#import "GTLBooksVolumes.m" + +#import "GTLQueryBooks.m" +#import "GTLServiceBooks.m" diff --git a/GTL/Source/Services/Books/Generated/GTLQueryBooks.h b/GTL/Source/Services/Books/Generated/GTLQueryBooks.h new file mode 100644 index 0000000..3a2e5bd --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLQueryBooks.h @@ -0,0 +1,632 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryBooks.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLQueryBooks (29 custom class methods, 44 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLBooksAnnotation; + +@interface GTLQueryBooks : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *action; +// "annotationDataId" has different types for some query methods; see the +// documentation for the right type for each query method. +@property (retain) id annotationDataId; +@property (copy) NSString *annotationId; +@property (copy) NSString *association; +@property (copy) NSString *contentVersion; +@property (copy) NSString *country; +@property (copy) NSString *cpksver; +@property (copy) NSString *download; +@property (copy) NSString *endOffset; +@property (copy) NSString *endPosition; +@property (copy) NSString *filter; +@property (assign) NSInteger h; +@property (copy) NSString *langRestrict; +@property (copy) NSString *layerId; +@property (copy) NSString *libraryRestrict; +@property (copy) NSString *locale; +@property (assign) NSUInteger maxResults; +@property (copy) NSString *nonce; +@property (copy) NSString *orderBy; +@property (retain) NSArray *pageIds; // of NSString +@property (copy) NSString *pageToken; +@property (copy) NSString *partner; +@property (copy) NSString *position; +@property (copy) NSString *printType; +@property (copy) NSString *projection; +@property (copy) NSString *q; +@property (assign) NSInteger scale; +@property (copy) NSString *shelf; +@property (assign) BOOL showDeleted; +@property (assign) BOOL showPreorders; +@property (copy) NSString *source; +@property (assign) NSUInteger startIndex; +@property (copy) NSString *startOffset; +@property (copy) NSString *startPosition; +@property (copy) NSString *summaryId; +@property (copy) NSString *timestamp; +@property (copy) NSString *updatedMax; +@property (copy) NSString *updatedMin; +@property (copy) NSString *userId; +@property (copy) NSString *volumeId; +@property (retain) NSArray *volumeIds; // of NSString +@property (assign) NSInteger volumePosition; +@property (assign) NSInteger w; + +#pragma mark - +#pragma mark "bookshelves" methods +// These create a GTLQueryBooks object. + +// Method: books.bookshelves.get +// Retrieves metadata for a specific bookshelf for the specified user. +// Required: +// userId: ID of user for whom to retrieve bookshelves. +// shelf: ID of bookshelf to retrieve. +// Optional: +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksBookshelf. ++ (id)queryForBookshelvesGetWithUserId:(NSString *)userId + shelf:(NSString *)shelf; + +// Method: books.bookshelves.list +// Retrieves a list of public bookshelves for the specified user. +// Required: +// userId: ID of user for whom to retrieve bookshelves. +// Optional: +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksBookshelves. ++ (id)queryForBookshelvesListWithUserId:(NSString *)userId; + +#pragma mark - +#pragma mark "bookshelves.volumes" methods +// These create a GTLQueryBooks object. + +// Method: books.bookshelves.volumes.list +// Retrieves volumes in a specific bookshelf for the specified user. +// Required: +// userId: ID of user for whom to retrieve bookshelf volumes. +// shelf: ID of bookshelf to retrieve volumes. +// Optional: +// maxResults: Maximum number of results to return +// showPreorders: Set to true to show pre-ordered books. Defaults to false. +// source: String to identify the originator of this request. +// startIndex: Index of the first element to return (starts at 0) +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksVolumes. ++ (id)queryForBookshelvesVolumesListWithUserId:(NSString *)userId + shelf:(NSString *)shelf; + +#pragma mark - +#pragma mark "layers.annotationData" methods +// These create a GTLQueryBooks object. + +// Method: books.layers.annotationData.get +// Gets the annotation data. +// Required: +// volumeId: The volume to retrieve annotations for. +// layerId: The ID for the layer to get the annotations. +// annotationDataId: The ID of the annotation data to retrieve. +// contentVersion: The content version for the volume you are trying to +// retrieve. +// Optional: +// h: The requested pixel height for any images. If height is provided width +// must also be provided. +// locale: The locale information for the data. ISO-639-1 language and +// ISO-3166-1 country code. Ex: 'en_US'. +// scale: The requested scale for the image. +// source: String to identify the originator of this request. +// w: The requested pixel width for any images. If width is provided height +// must also be provided. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksAnnotationdata. ++ (id)queryForLayersAnnotationDataGetWithVolumeId:(NSString *)volumeId + layerId:(NSString *)layerId + annotationDataId:(NSString *)annotationDataId + contentVersion:(NSString *)contentVersion; + +// Method: books.layers.annotationData.list +// Gets the annotation data for a volume and layer. +// Required: +// volumeId: The volume to retrieve annotation data for. +// layerId: The ID for the layer to get the annotation data. +// contentVersion: The content version for the requested volume. +// Optional: +// annotationDataId: The list of Annotation Data Ids to retrieve. Pagination +// is ignored if this is set. +// Note: For this method, "annotationDataId" should be of type NSArray. +// h: The requested pixel height for any images. If height is provided width +// must also be provided. +// locale: The locale information for the data. ISO-639-1 language and +// ISO-3166-1 country code. Ex: 'en_US'. +// maxResults: Maximum number of results to return (0..200) +// pageToken: The value of the nextToken from the previous page. +// scale: The requested scale for the image. +// source: String to identify the originator of this request. +// updatedMax: RFC 3339 timestamp to restrict to items updated prior to this +// timestamp (exclusive). +// updatedMin: RFC 3339 timestamp to restrict to items updated since this +// timestamp (inclusive). +// w: The requested pixel width for any images. If width is provided height +// must also be provided. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksAnnotationsdata. ++ (id)queryForLayersAnnotationDataListWithVolumeId:(NSString *)volumeId + layerId:(NSString *)layerId + contentVersion:(NSString *)contentVersion; + +#pragma mark - +#pragma mark "layers" methods +// These create a GTLQueryBooks object. + +// Method: books.layers.get +// Gets the layer summary for a volume. +// Required: +// volumeId: The volume to retrieve layers for. +// summaryId: The ID for the layer to get the summary for. +// Optional: +// contentVersion: The content version for the requested volume. +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksLayersummary. ++ (id)queryForLayersGetWithVolumeId:(NSString *)volumeId + summaryId:(NSString *)summaryId; + +// Method: books.layers.list +// List the layer summaries for a volume. +// Required: +// volumeId: The volume to retrieve layers for. +// Optional: +// contentVersion: The content version for the requested volume. +// maxResults: Maximum number of results to return (0..200) +// pageToken: The value of the nextToken from the previous page. +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksLayersummaries. ++ (id)queryForLayersListWithVolumeId:(NSString *)volumeId; + +#pragma mark - +#pragma mark "layers.volumeAnnotations" methods +// These create a GTLQueryBooks object. + +// Method: books.layers.volumeAnnotations.get +// Gets the volume annotation. +// Required: +// volumeId: The volume to retrieve annotations for. +// layerId: The ID for the layer to get the annotations. +// annotationId: The ID of the volume annotation to retrieve. +// Optional: +// locale: The locale information for the data. ISO-639-1 language and +// ISO-3166-1 country code. Ex: 'en_US'. +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksVolumeannotation. ++ (id)queryForLayersVolumeAnnotationsGetWithVolumeId:(NSString *)volumeId + layerId:(NSString *)layerId + annotationId:(NSString *)annotationId; + +// Method: books.layers.volumeAnnotations.list +// Gets the volume annotations for a volume and layer. +// Required: +// volumeId: The volume to retrieve annotations for. +// layerId: The ID for the layer to get the annotations. +// contentVersion: The content version for the requested volume. +// Optional: +// endOffset: The end offset to end retrieving data from. +// endPosition: The end position to end retrieving data from. +// locale: The locale information for the data. ISO-639-1 language and +// ISO-3166-1 country code. Ex: 'en_US'. +// maxResults: Maximum number of results to return (0..200) +// pageToken: The value of the nextToken from the previous page. +// showDeleted: Set to true to return deleted annotations. updatedMin must be +// in the request to use this. Defaults to false. +// source: String to identify the originator of this request. +// startOffset: The start offset to start retrieving data from. +// startPosition: The start position to start retrieving data from. +// updatedMax: RFC 3339 timestamp to restrict to items updated prior to this +// timestamp (exclusive). +// updatedMin: RFC 3339 timestamp to restrict to items updated since this +// timestamp (inclusive). +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksVolumeannotations. ++ (id)queryForLayersVolumeAnnotationsListWithVolumeId:(NSString *)volumeId + layerId:(NSString *)layerId + contentVersion:(NSString *)contentVersion; + +#pragma mark - +#pragma mark "myconfig" methods +// These create a GTLQueryBooks object. + +// Method: books.myconfig.releaseDownloadAccess +// Release downloaded content access restriction. +// Required: +// volumeIds: The volume(s) to release restrictions for. +// cpksver: The device/version ID from which to release the restriction. +// Optional: +// locale: ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksDownloadAccesses. ++ (id)queryForMyconfigReleaseDownloadAccessWithVolumeIds:(NSArray *)volumeIds + cpksver:(NSString *)cpksver; + +// Method: books.myconfig.requestAccess +// Request concurrent and download access restrictions. +// Required: +// source: String to identify the originator of this request. +// volumeId: The volume to request concurrent/download restrictions for. +// nonce: The client nonce value. +// cpksver: The device/version ID from which to request the restrictions. +// Optional: +// locale: ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksRequestAccess. ++ (id)queryForMyconfigRequestAccessWithSource:(NSString *)source + volumeId:(NSString *)volumeId + nonce:(NSString *)nonce + cpksver:(NSString *)cpksver; + +// Method: books.myconfig.syncVolumeLicenses +// Request downloaded content access for specified volumes on the My eBooks +// shelf. +// Required: +// source: String to identify the originator of this request. +// nonce: The client nonce value. +// cpksver: The device/version ID from which to release the restriction. +// Optional: +// locale: ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. +// showPreorders: Set to true to show pre-ordered books. Defaults to false. +// volumeIds: The volume(s) to request download restrictions for. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksVolumes. ++ (id)queryForMyconfigSyncVolumeLicensesWithSource:(NSString *)source + nonce:(NSString *)nonce + cpksver:(NSString *)cpksver; + +#pragma mark - +#pragma mark "mylibrary.annotations" methods +// These create a GTLQueryBooks object. + +// Method: books.mylibrary.annotations.delete +// Deletes an annotation. +// Required: +// annotationId: The ID for the annotation to delete. +// Optional: +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks ++ (id)queryForMylibraryAnnotationsDeleteWithAnnotationId:(NSString *)annotationId; + +// Method: books.mylibrary.annotations.get +// Gets an annotation by its ID. +// Required: +// annotationId: The ID for the annotation to retrieve. +// Optional: +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksAnnotation. ++ (id)queryForMylibraryAnnotationsGetWithAnnotationId:(NSString *)annotationId; + +// Method: books.mylibrary.annotations.insert +// Inserts a new annotation. +// Optional: +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksAnnotation. ++ (id)queryForMylibraryAnnotationsInsertWithObject:(GTLBooksAnnotation *)object; + +// Method: books.mylibrary.annotations.list +// Retrieves a list of annotations, possibly filtered. +// Optional: +// contentVersion: The content version for the requested volume. +// layerId: The layer ID to limit annotation by. +// maxResults: Maximum number of results to return (0..40) +// pageIds: The page ID(s) for the volume that is being queried. +// pageToken: The value of the nextToken from the previous page. +// showDeleted: Set to true to return deleted annotations. updatedMin must be +// in the request to use this. Defaults to false. +// source: String to identify the originator of this request. +// updatedMax: RFC 3339 timestamp to restrict to items updated prior to this +// timestamp (exclusive). +// updatedMin: RFC 3339 timestamp to restrict to items updated since this +// timestamp (inclusive). +// volumeId: The volume to restrict annotations to. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksAnnotations. ++ (id)queryForMylibraryAnnotationsList; + +// Method: books.mylibrary.annotations.update +// Updates an existing annotation. +// Required: +// annotationId: The ID for the annotation to update. +// Optional: +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksAnnotation. ++ (id)queryForMylibraryAnnotationsUpdateWithObject:(GTLBooksAnnotation *)object + annotationId:(NSString *)annotationId; + +#pragma mark - +#pragma mark "mylibrary.bookshelves" methods +// These create a GTLQueryBooks object. + +// Method: books.mylibrary.bookshelves.addVolume +// Adds a volume to a bookshelf. +// Required: +// shelf: ID of bookshelf to which to add a volume. +// volumeId: ID of volume to add. +// Optional: +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks ++ (id)queryForMylibraryBookshelvesAddVolumeWithShelf:(NSString *)shelf + volumeId:(NSString *)volumeId; + +// Method: books.mylibrary.bookshelves.clearVolumes +// Clears all volumes from a bookshelf. +// Required: +// shelf: ID of bookshelf from which to remove a volume. +// Optional: +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks ++ (id)queryForMylibraryBookshelvesClearVolumesWithShelf:(NSString *)shelf; + +// Method: books.mylibrary.bookshelves.get +// Retrieves metadata for a specific bookshelf belonging to the authenticated +// user. +// Required: +// shelf: ID of bookshelf to retrieve. +// Optional: +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksBookshelf. ++ (id)queryForMylibraryBookshelvesGetWithShelf:(NSString *)shelf; + +// Method: books.mylibrary.bookshelves.list +// Retrieves a list of bookshelves belonging to the authenticated user. +// Optional: +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksBookshelves. ++ (id)queryForMylibraryBookshelvesList; + +// Method: books.mylibrary.bookshelves.moveVolume +// Moves a volume within a bookshelf. +// Required: +// shelf: ID of bookshelf with the volume. +// volumeId: ID of volume to move. +// volumePosition: Position on shelf to move the item (0 puts the item before +// the current first item, 1 puts it between the first and the second and so +// on.) +// Optional: +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks ++ (id)queryForMylibraryBookshelvesMoveVolumeWithShelf:(NSString *)shelf + volumeId:(NSString *)volumeId + volumePosition:(NSInteger)volumePosition; + +// Method: books.mylibrary.bookshelves.removeVolume +// Removes a volume from a bookshelf. +// Required: +// shelf: ID of bookshelf from which to remove a volume. +// volumeId: ID of volume to remove. +// Optional: +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks ++ (id)queryForMylibraryBookshelvesRemoveVolumeWithShelf:(NSString *)shelf + volumeId:(NSString *)volumeId; + +#pragma mark - +#pragma mark "mylibrary.bookshelves.volumes" methods +// These create a GTLQueryBooks object. + +// Method: books.mylibrary.bookshelves.volumes.list +// Gets volume information for volumes on a bookshelf. +// Required: +// shelf: The bookshelf ID or name retrieve volumes for. +// Optional: +// country: ISO-3166-1 code to override the IP-based location. +// maxResults: Maximum number of results to return +// projection: Restrict information returned to a set of selected fields. +// kGTLBooksProjectionFull: Includes all volume data. +// kGTLBooksProjectionLite: Includes a subset of fields in volumeInfo and +// accessInfo. +// q: Full-text search query string in this bookshelf. +// showPreorders: Set to true to show pre-ordered books. Defaults to false. +// source: String to identify the originator of this request. +// startIndex: Index of the first element to return (starts at 0) +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksVolumes. ++ (id)queryForMylibraryBookshelvesVolumesListWithShelf:(NSString *)shelf; + +#pragma mark - +#pragma mark "mylibrary.readingpositions" methods +// These create a GTLQueryBooks object. + +// Method: books.mylibrary.readingpositions.get +// Retrieves my reading position information for a volume. +// Required: +// volumeId: ID of volume for which to retrieve a reading position. +// Optional: +// contentVersion: Volume content version for which this reading position is +// requested. +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksReadingPosition. ++ (id)queryForMylibraryReadingpositionsGetWithVolumeId:(NSString *)volumeId; + +// Method: books.mylibrary.readingpositions.setPosition +// Sets my reading position information for a volume. +// Required: +// volumeId: ID of volume for which to update the reading position. +// timestamp: RFC 3339 UTC format timestamp associated with this reading +// position. +// position: Position string for the new volume reading position. +// Optional: +// action: Action that caused this reading position to be set. +// kGTLBooksActionBookmark: User chose bookmark within volume. +// kGTLBooksActionChapter: User selected chapter from list. +// kGTLBooksActionNextPage: Next page event. +// kGTLBooksActionPrevPage: Previous page event. +// kGTLBooksActionScroll: User navigated to page. +// kGTLBooksActionSearch: User chose search results within volume. +// contentVersion: Volume content version for which this reading position +// applies. +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks ++ (id)queryForMylibraryReadingpositionsSetPositionWithVolumeId:(NSString *)volumeId + timestamp:(NSString *)timestamp + position:(NSString *)position; + +#pragma mark - +#pragma mark "volumes.associated" methods +// These create a GTLQueryBooks object. + +// Method: books.volumes.associated.list +// Return a list of associated books. +// Required: +// volumeId: ID of the source volume. +// Optional: +// association: Association type. +// kGTLBooksAssociationEndOfSample: Recommendations for display +// end-of-sample. +// kGTLBooksAssociationEndOfVolume: Recommendations for display +// end-of-volume. +// locale: ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used +// for generating recommendations. +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksVolumes. ++ (id)queryForVolumesAssociatedListWithVolumeId:(NSString *)volumeId; + +#pragma mark - +#pragma mark "volumes" methods +// These create a GTLQueryBooks object. + +// Method: books.volumes.get +// Gets volume information for a single volume. +// Required: +// volumeId: ID of volume to retrieve. +// Optional: +// country: ISO-3166-1 code to override the IP-based location. +// partner: Brand results for partner ID. +// projection: Restrict information returned to a set of selected fields. +// kGTLBooksProjectionFull: Includes all volume data. +// kGTLBooksProjectionLite: Includes a subset of fields in volumeInfo and +// accessInfo. +// source: String to identify the originator of this request. +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksVolume. ++ (id)queryForVolumesGetWithVolumeId:(NSString *)volumeId; + +// Method: books.volumes.list +// Performs a book search. +// Required: +// q: Full-text search query string. +// Optional: +// download: Restrict to volumes by download availability. +// kGTLBooksDownloadEpub: All volumes with epub. +// filter: Filter search results. +// kGTLBooksFilterEbooks: All Google eBooks. +// kGTLBooksFilterFreeEbooks: Google eBook with full volume text +// viewability. +// kGTLBooksFilterFull: Public can view entire volume text. +// kGTLBooksFilterPaidEbooks: Google eBook with a price. +// kGTLBooksFilterPartial: Public able to see parts of text. +// langRestrict: Restrict results to books with this language code. +// libraryRestrict: Restrict search to this user's library. +// kGTLBooksLibraryRestrictMyLibrary: Restrict to the user's library, any +// shelf. +// kGTLBooksLibraryRestrictNoRestrict: Do not restrict based on user's +// library. +// maxResults: Maximum number of results to return. (0..40) +// orderBy: Sort search results. +// kGTLBooksOrderByNewest: Most recently published. +// kGTLBooksOrderByRelevance: Relevance to search terms. +// partner: Restrict and brand results for partner ID. +// printType: Restrict to books or magazines. +// kGTLBooksPrintTypeAll: All volume content types. +// kGTLBooksPrintTypeBooks: Just books. +// kGTLBooksPrintTypeMagazines: Just magazines. +// projection: Restrict information returned to a set of selected fields. +// kGTLBooksProjectionFull: Includes all volume data. +// kGTLBooksProjectionLite: Includes a subset of fields in volumeInfo and +// accessInfo. +// showPreorders: Set to true to show books available for preorder. Defaults +// to false. +// source: String to identify the originator of this request. +// startIndex: Index of the first result to return (starts at 0) +// Authorization scope(s): +// kGTLAuthScopeBooks +// Fetches a GTLBooksVolumes. ++ (id)queryForVolumesListWithQ:(NSString *)q; + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLQueryBooks.m b/GTL/Source/Services/Books/Generated/GTLQueryBooks.m new file mode 100644 index 0000000..49729f8 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLQueryBooks.m @@ -0,0 +1,398 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryBooks.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLQueryBooks (29 custom class methods, 44 custom properties) + +#import "GTLQueryBooks.h" + +#import "GTLBooksAnnotation.h" +#import "GTLBooksAnnotationdata.h" +#import "GTLBooksAnnotations.h" +#import "GTLBooksAnnotationsdata.h" +#import "GTLBooksBookshelf.h" +#import "GTLBooksBookshelves.h" +#import "GTLBooksDownloadAccesses.h" +#import "GTLBooksLayersummaries.h" +#import "GTLBooksLayersummary.h" +#import "GTLBooksReadingPosition.h" +#import "GTLBooksRequestAccess.h" +#import "GTLBooksVolume.h" +#import "GTLBooksVolumeannotation.h" +#import "GTLBooksVolumeannotations.h" +#import "GTLBooksVolumes.h" + +@implementation GTLQueryBooks + +@dynamic action, annotationDataId, annotationId, association, contentVersion, + country, cpksver, download, endOffset, endPosition, fields, filter, h, + langRestrict, layerId, libraryRestrict, locale, maxResults, nonce, + orderBy, pageIds, pageToken, partner, position, printType, projection, + q, scale, shelf, showDeleted, showPreorders, source, startIndex, + startOffset, startPosition, summaryId, timestamp, updatedMax, + updatedMin, userId, volumeId, volumeIds, volumePosition, w; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"pageIds", + [NSString class], @"volumeIds", + nil]; + return map; +} + +#pragma mark - +#pragma mark "bookshelves" methods +// These create a GTLQueryBooks object. + ++ (id)queryForBookshelvesGetWithUserId:(NSString *)userId + shelf:(NSString *)shelf { + NSString *methodName = @"books.bookshelves.get"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.userId = userId; + query.shelf = shelf; + query.expectedObjectClass = [GTLBooksBookshelf class]; + return query; +} + ++ (id)queryForBookshelvesListWithUserId:(NSString *)userId { + NSString *methodName = @"books.bookshelves.list"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.userId = userId; + query.expectedObjectClass = [GTLBooksBookshelves class]; + return query; +} + +#pragma mark - +#pragma mark "bookshelves.volumes" methods +// These create a GTLQueryBooks object. + ++ (id)queryForBookshelvesVolumesListWithUserId:(NSString *)userId + shelf:(NSString *)shelf { + NSString *methodName = @"books.bookshelves.volumes.list"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.userId = userId; + query.shelf = shelf; + query.expectedObjectClass = [GTLBooksVolumes class]; + return query; +} + +#pragma mark - +#pragma mark "layers.annotationData" methods +// These create a GTLQueryBooks object. + ++ (id)queryForLayersAnnotationDataGetWithVolumeId:(NSString *)volumeId + layerId:(NSString *)layerId + annotationDataId:(NSString *)annotationDataId + contentVersion:(NSString *)contentVersion { + NSString *methodName = @"books.layers.annotationData.get"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.volumeId = volumeId; + query.layerId = layerId; + query.annotationDataId = annotationDataId; + query.contentVersion = contentVersion; + query.expectedObjectClass = [GTLBooksAnnotationdata class]; + return query; +} + ++ (id)queryForLayersAnnotationDataListWithVolumeId:(NSString *)volumeId + layerId:(NSString *)layerId + contentVersion:(NSString *)contentVersion { + NSString *methodName = @"books.layers.annotationData.list"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.volumeId = volumeId; + query.layerId = layerId; + query.contentVersion = contentVersion; + query.expectedObjectClass = [GTLBooksAnnotationsdata class]; + return query; +} + +#pragma mark - +#pragma mark "layers" methods +// These create a GTLQueryBooks object. + ++ (id)queryForLayersGetWithVolumeId:(NSString *)volumeId + summaryId:(NSString *)summaryId { + NSString *methodName = @"books.layers.get"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.volumeId = volumeId; + query.summaryId = summaryId; + query.expectedObjectClass = [GTLBooksLayersummary class]; + return query; +} + ++ (id)queryForLayersListWithVolumeId:(NSString *)volumeId { + NSString *methodName = @"books.layers.list"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.volumeId = volumeId; + query.expectedObjectClass = [GTLBooksLayersummaries class]; + return query; +} + +#pragma mark - +#pragma mark "layers.volumeAnnotations" methods +// These create a GTLQueryBooks object. + ++ (id)queryForLayersVolumeAnnotationsGetWithVolumeId:(NSString *)volumeId + layerId:(NSString *)layerId + annotationId:(NSString *)annotationId { + NSString *methodName = @"books.layers.volumeAnnotations.get"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.volumeId = volumeId; + query.layerId = layerId; + query.annotationId = annotationId; + query.expectedObjectClass = [GTLBooksVolumeannotation class]; + return query; +} + ++ (id)queryForLayersVolumeAnnotationsListWithVolumeId:(NSString *)volumeId + layerId:(NSString *)layerId + contentVersion:(NSString *)contentVersion { + NSString *methodName = @"books.layers.volumeAnnotations.list"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.volumeId = volumeId; + query.layerId = layerId; + query.contentVersion = contentVersion; + query.expectedObjectClass = [GTLBooksVolumeannotations class]; + return query; +} + +#pragma mark - +#pragma mark "myconfig" methods +// These create a GTLQueryBooks object. + ++ (id)queryForMyconfigReleaseDownloadAccessWithVolumeIds:(NSArray *)volumeIds + cpksver:(NSString *)cpksver { + NSString *methodName = @"books.myconfig.releaseDownloadAccess"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.volumeIds = volumeIds; + query.cpksver = cpksver; + query.expectedObjectClass = [GTLBooksDownloadAccesses class]; + return query; +} + ++ (id)queryForMyconfigRequestAccessWithSource:(NSString *)source + volumeId:(NSString *)volumeId + nonce:(NSString *)nonce + cpksver:(NSString *)cpksver { + NSString *methodName = @"books.myconfig.requestAccess"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.source = source; + query.volumeId = volumeId; + query.nonce = nonce; + query.cpksver = cpksver; + query.expectedObjectClass = [GTLBooksRequestAccess class]; + return query; +} + ++ (id)queryForMyconfigSyncVolumeLicensesWithSource:(NSString *)source + nonce:(NSString *)nonce + cpksver:(NSString *)cpksver { + NSString *methodName = @"books.myconfig.syncVolumeLicenses"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.source = source; + query.nonce = nonce; + query.cpksver = cpksver; + query.expectedObjectClass = [GTLBooksVolumes class]; + return query; +} + +#pragma mark - +#pragma mark "mylibrary.annotations" methods +// These create a GTLQueryBooks object. + ++ (id)queryForMylibraryAnnotationsDeleteWithAnnotationId:(NSString *)annotationId { + NSString *methodName = @"books.mylibrary.annotations.delete"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.annotationId = annotationId; + return query; +} + ++ (id)queryForMylibraryAnnotationsGetWithAnnotationId:(NSString *)annotationId { + NSString *methodName = @"books.mylibrary.annotations.get"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.annotationId = annotationId; + query.expectedObjectClass = [GTLBooksAnnotation class]; + return query; +} + ++ (id)queryForMylibraryAnnotationsInsertWithObject:(GTLBooksAnnotation *)object { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"books.mylibrary.annotations.insert"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.expectedObjectClass = [GTLBooksAnnotation class]; + return query; +} + ++ (id)queryForMylibraryAnnotationsList { + NSString *methodName = @"books.mylibrary.annotations.list"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLBooksAnnotations class]; + return query; +} + ++ (id)queryForMylibraryAnnotationsUpdateWithObject:(GTLBooksAnnotation *)object + annotationId:(NSString *)annotationId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"books.mylibrary.annotations.update"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.annotationId = annotationId; + query.expectedObjectClass = [GTLBooksAnnotation class]; + return query; +} + +#pragma mark - +#pragma mark "mylibrary.bookshelves" methods +// These create a GTLQueryBooks object. + ++ (id)queryForMylibraryBookshelvesAddVolumeWithShelf:(NSString *)shelf + volumeId:(NSString *)volumeId { + NSString *methodName = @"books.mylibrary.bookshelves.addVolume"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.shelf = shelf; + query.volumeId = volumeId; + return query; +} + ++ (id)queryForMylibraryBookshelvesClearVolumesWithShelf:(NSString *)shelf { + NSString *methodName = @"books.mylibrary.bookshelves.clearVolumes"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.shelf = shelf; + return query; +} + ++ (id)queryForMylibraryBookshelvesGetWithShelf:(NSString *)shelf { + NSString *methodName = @"books.mylibrary.bookshelves.get"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.shelf = shelf; + query.expectedObjectClass = [GTLBooksBookshelf class]; + return query; +} + ++ (id)queryForMylibraryBookshelvesList { + NSString *methodName = @"books.mylibrary.bookshelves.list"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLBooksBookshelves class]; + return query; +} + ++ (id)queryForMylibraryBookshelvesMoveVolumeWithShelf:(NSString *)shelf + volumeId:(NSString *)volumeId + volumePosition:(NSInteger)volumePosition { + NSString *methodName = @"books.mylibrary.bookshelves.moveVolume"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.shelf = shelf; + query.volumeId = volumeId; + query.volumePosition = volumePosition; + return query; +} + ++ (id)queryForMylibraryBookshelvesRemoveVolumeWithShelf:(NSString *)shelf + volumeId:(NSString *)volumeId { + NSString *methodName = @"books.mylibrary.bookshelves.removeVolume"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.shelf = shelf; + query.volumeId = volumeId; + return query; +} + +#pragma mark - +#pragma mark "mylibrary.bookshelves.volumes" methods +// These create a GTLQueryBooks object. + ++ (id)queryForMylibraryBookshelvesVolumesListWithShelf:(NSString *)shelf { + NSString *methodName = @"books.mylibrary.bookshelves.volumes.list"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.shelf = shelf; + query.expectedObjectClass = [GTLBooksVolumes class]; + return query; +} + +#pragma mark - +#pragma mark "mylibrary.readingpositions" methods +// These create a GTLQueryBooks object. + ++ (id)queryForMylibraryReadingpositionsGetWithVolumeId:(NSString *)volumeId { + NSString *methodName = @"books.mylibrary.readingpositions.get"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.volumeId = volumeId; + query.expectedObjectClass = [GTLBooksReadingPosition class]; + return query; +} + ++ (id)queryForMylibraryReadingpositionsSetPositionWithVolumeId:(NSString *)volumeId + timestamp:(NSString *)timestamp + position:(NSString *)position { + NSString *methodName = @"books.mylibrary.readingpositions.setPosition"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.volumeId = volumeId; + query.timestamp = timestamp; + query.position = position; + return query; +} + +#pragma mark - +#pragma mark "volumes.associated" methods +// These create a GTLQueryBooks object. + ++ (id)queryForVolumesAssociatedListWithVolumeId:(NSString *)volumeId { + NSString *methodName = @"books.volumes.associated.list"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.volumeId = volumeId; + query.expectedObjectClass = [GTLBooksVolumes class]; + return query; +} + +#pragma mark - +#pragma mark "volumes" methods +// These create a GTLQueryBooks object. + ++ (id)queryForVolumesGetWithVolumeId:(NSString *)volumeId { + NSString *methodName = @"books.volumes.get"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.volumeId = volumeId; + query.expectedObjectClass = [GTLBooksVolume class]; + return query; +} + ++ (id)queryForVolumesListWithQ:(NSString *)q { + NSString *methodName = @"books.volumes.list"; + GTLQueryBooks *query = [self queryWithMethodName:methodName]; + query.q = q; + query.expectedObjectClass = [GTLBooksVolumes class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLServiceBooks.h b/GTL/Source/Services/Books/Generated/GTLServiceBooks.h new file mode 100644 index 0000000..61b5d68 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLServiceBooks.h @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceBooks.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLServiceBooks (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceBooks : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryBooks.h. The query can the be sent with GTLService's execute methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Books/Generated/GTLServiceBooks.m b/GTL/Source/Services/Books/Generated/GTLServiceBooks.m new file mode 100644 index 0000000..a50d7f4 --- /dev/null +++ b/GTL/Source/Services/Books/Generated/GTLServiceBooks.m @@ -0,0 +1,79 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceBooks.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Books API (books/v1) +// Description: +// Lets you search for books and manage your Google Books library. +// Documentation: +// https://developers.google.com/books/docs/v1/getting_started +// Classes: +// GTLServiceBooks (0 custom class methods, 0 custom properties) + +#import "GTLBooks.h" + +@implementation GTLServiceBooks + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryBooks class], + [GTLBooksAnnotation class], + [GTLBooksAnnotationdata class], + [GTLBooksAnnotations class], + [GTLBooksAnnotationsdata class], + [GTLBooksAnnotationsRange class], + [GTLBooksBookshelf class], + [GTLBooksBookshelves class], + [GTLBooksConcurrentAccessRestriction class], + [GTLBooksDownloadAccesses class], + [GTLBooksDownloadAccessRestriction class], + [GTLBooksLayersummaries class], + [GTLBooksLayersummary class], + [GTLBooksReadingPosition class], + [GTLBooksRequestAccess class], + [GTLBooksReview class], + [GTLBooksVolume class], + [GTLBooksVolumeannotation class], + [GTLBooksVolumeannotations class], + [GTLBooksVolumes class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v1"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Calendar/.svn/all-wcprops b/GTL/Source/Services/Calendar/.svn/all-wcprops new file mode 100644 index 0000000..c53eb9e --- /dev/null +++ b/GTL/Source/Services/Calendar/.svn/all-wcprops @@ -0,0 +1,5 @@ +K 25 +svn:wc:ra_dav:version-url +V 48 +/svn/!svn/ver/238/trunk/Source/Services/Calendar +END diff --git a/GTL/Source/Services/Calendar/.svn/entries b/GTL/Source/Services/Calendar/.svn/entries new file mode 100644 index 0000000..82ac5a5 --- /dev/null +++ b/GTL/Source/Services/Calendar/.svn/entries @@ -0,0 +1,31 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Calendar +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-23T20:26:17.342817Z +238 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +Generated +dir + diff --git a/GTL/Source/Services/Calendar/Generated/.svn/all-wcprops b/GTL/Source/Services/Calendar/Generated/.svn/all-wcprops new file mode 100644 index 0000000..82e8b65 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/all-wcprops @@ -0,0 +1,293 @@ +K 25 +svn:wc:ra_dav:version-url +V 58 +/svn/!svn/ver/238/trunk/Source/Services/Calendar/Generated +END +GTLCalendarAclRule.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarAclRule.m +END +GTLCalendarSettings.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarSettings.h +END +GTLServiceCalendar.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLServiceCalendar.h +END +GTLCalendarTimePeriod.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarTimePeriod.h +END +GTLCalendarEvents.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarEvents.h +END +GTLCalendarSettings.m +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarSettings.m +END +GTLServiceCalendar.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLServiceCalendar.m +END +GTLCalendarTimePeriod.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarTimePeriod.m +END +GTLCalendarEvents.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarEvents.m +END +GTLCalendarFreeBusyRequestItem.h +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarFreeBusyRequestItem.h +END +GTLCalendarConstants.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarConstants.h +END +GTLCalendarFreeBusyCalendar.h +K 25 +svn:wc:ra_dav:version-url +V 88 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarFreeBusyCalendar.h +END +GTLCalendar.h +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendar.h +END +GTLCalendarConstants.m +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarConstants.m +END +GTLCalendarFreeBusyRequestItem.m +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarFreeBusyRequestItem.m +END +GTLCalendarFreeBusyCalendar.m +K 25 +svn:wc:ra_dav:version-url +V 88 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarFreeBusyCalendar.m +END +GTLCalendarCalendarListEntry.h +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarCalendarListEntry.h +END +GTLCalendarColorDefinition.h +K 25 +svn:wc:ra_dav:version-url +V 87 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarColorDefinition.h +END +GTLCalendarError.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarError.h +END +GTLCalendarEventAttendee.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarEventAttendee.h +END +GTLCalendarColorDefinition.m +K 25 +svn:wc:ra_dav:version-url +V 87 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarColorDefinition.m +END +GTLCalendarCalendarListEntry.m +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarCalendarListEntry.m +END +GTLCalendarError.m +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarError.m +END +GTLCalendarEventDateTime.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarEventDateTime.h +END +GTLCalendarAcl.h +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarAcl.h +END +GTLCalendarEventAttendee.m +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarEventAttendee.m +END +GTLCalendarColors.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarColors.h +END +GTLCalendarFreeBusyGroup.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarFreeBusyGroup.h +END +GTLCalendarFreeBusyResponse.h +K 25 +svn:wc:ra_dav:version-url +V 88 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarFreeBusyResponse.h +END +GTLCalendarEventDateTime.m +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarEventDateTime.m +END +GTLCalendarAcl.m +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarAcl.m +END +GTLQueryCalendar.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/238/trunk/Source/Services/Calendar/Generated/GTLQueryCalendar.h +END +GTLCalendarCalendarList.h +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarCalendarList.h +END +GTLCalendarFreeBusyGroup.m +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarFreeBusyGroup.m +END +GTLCalendarColors.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarColors.m +END +GTLCalendarEventReminder.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarEventReminder.h +END +GTLCalendarFreeBusyResponse.m +K 25 +svn:wc:ra_dav:version-url +V 88 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarFreeBusyResponse.m +END +GTLCalendarCalendar.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarCalendar.h +END +GTLCalendarCalendarList.m +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarCalendarList.m +END +GTLQueryCalendar.m +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLQueryCalendar.m +END +GTLCalendarEventReminder.m +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarEventReminder.m +END +GTLCalendarSetting.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarSetting.h +END +GTLCalendarCalendar.m +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarCalendar.m +END +GTLCalendarEvent.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/238/trunk/Source/Services/Calendar/Generated/GTLCalendarEvent.h +END +GTLCalendarSetting.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarSetting.m +END +GTLCalendarEvent.m +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarEvent.m +END +GTLCalendarAclRule.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/206/trunk/Source/Services/Calendar/Generated/GTLCalendarAclRule.h +END +GTLCalendar_Sources.m +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/225/trunk/Source/Services/Calendar/Generated/GTLCalendar_Sources.m +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/entries b/GTL/Source/Services/Calendar/Generated/.svn/entries new file mode 100644 index 0000000..ca41afa --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/entries @@ -0,0 +1,1660 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Calendar/Generated +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-23T20:26:17.342817Z +238 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +GTLCalendarAclRule.m +file + + + + +2012-12-09T08:42:32.000000Z +4862a01b849985bf23192526e92b1701 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1817 + +GTLCalendarSettings.h +file + + + + +2012-12-09T08:42:32.000000Z +10e27d251cdd46e1329541b3bab492e0 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1734 + +GTLServiceCalendar.h +file + + + + +2012-12-09T08:42:32.000000Z +dfc4cd46321e4fc1444036c06359dba6 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +2119 + +GTLCalendarTimePeriod.h +file + + + + +2012-12-09T08:42:32.000000Z +10050d7577537dcff99922e1d217b370 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1490 + +GTLCalendarEvents.h +file + + + + +2012-12-09T08:42:32.000000Z +b993fb198ceacdca8b283eb80dcaa9ce +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +3371 + +GTLCalendarSettings.m +file + + + + +2012-12-09T08:42:32.000000Z +2b74784c6aa8f5ed48411cf36a8a7c53 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1760 + +GTLServiceCalendar.m +file + + + + +2012-12-09T08:42:32.000000Z +b4724b89619c088cfd3742f4fdcc9665 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +2919 + +GTLCalendarTimePeriod.m +file + + + + +2012-12-09T08:42:32.000000Z +f74f67b6219c6a4da19fdf705a2e1d5d +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1279 + +GTLCalendarEvents.m +file + + + + +2012-12-09T08:42:32.000000Z +e3f255435d6fcb307bea82e1ef3d8009 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1968 + +GTLCalendarFreeBusyRequestItem.h +file + + + + +2012-12-09T08:42:32.000000Z +66aabf586c6c216f81b6a8616ad27a87 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1519 + +GTLCalendarConstants.h +file + + + + +2012-12-09T08:42:32.000000Z +bbd581a10b037c6a3243daf03e6d97b9 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1895 + +GTLCalendarFreeBusyCalendar.h +file + + + + +2012-12-09T08:42:32.000000Z +e0c5f0d13534d271c1ae3089d5c81447 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1670 + +GTLCalendar.h +file + + + + +2012-12-09T08:42:32.000000Z +ac58bc43cfa49cebfd5250bd57736b34 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1758 + +GTLCalendarConstants.m +file + + + + +2012-12-09T08:42:32.000000Z +5d44e501c06b97607cfe7a8fb72ff1a6 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1673 + +GTLCalendarFreeBusyRequestItem.m +file + + + + +2012-12-09T08:42:32.000000Z +19209d3a0410d46afe4464ff18624ff9 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1505 + +GTLCalendarFreeBusyCalendar.m +file + + + + +2012-12-09T08:42:32.000000Z +45ef2e935c72e5c91bae6e70639e5bb1 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1608 + +GTLCalendarCalendarListEntry.h +file + + + + +2012-12-09T08:42:32.000000Z +6ec4bb59ac3f44c209811019a2e68fc6 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +3967 + +GTLCalendarColorDefinition.h +file + + + + +2012-12-09T08:42:32.000000Z +245950d1a306f24090842c6ef2869a4c +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1588 + +GTLCalendarError.h +file + + + + +2012-12-09T08:42:32.000000Z +e4bbd4df1329b55a9d663c2ea7dd6914 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1954 + +GTLCalendarEventAttendee.h +file + + + + +2012-12-09T08:42:32.000000Z +2becb2bd74b67a4245920acd106320c8 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +2940 + +GTLCalendarColorDefinition.m +file + + + + +2012-12-09T08:42:32.000000Z +99fc326057e20bbcd1e80c27a7d569ea +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1316 + +GTLCalendarCalendarListEntry.m +file + + + + +2012-12-09T08:42:32.000000Z +30597eb8791817de5e80ad0b6e6c8c6c +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +2081 + +GTLCalendarError.m +file + + + + +2012-12-09T08:42:32.000000Z +b1e9e01b3a4e6e643b10c83df5ab3119 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1258 + +GTLCalendarEventDateTime.h +file + + + + +2012-12-09T08:42:32.000000Z +1f7259da956d2dae1d653a65b0a6fd27 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1869 + +GTLCalendarAcl.h +file + + + + +2012-12-09T08:42:32.000000Z +859a7b49af5d87d0ef88641d0efbfa6a +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1873 + +GTLCalendarEventAttendee.m +file + + + + +2012-12-09T08:42:32.000000Z +97e6efc3e15232325f4e6766c53e3401 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1613 + +GTLCalendarColors.h +file + + + + +2012-12-09T08:42:32.000000Z +c64922b6e57568aa0f3a9169d7d69646 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +3087 + +GTLCalendarFreeBusyGroup.h +file + + + + +2012-12-09T08:42:32.000000Z +81c4a7dd530bf04ad15fd0ac731ead1f +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1589 + +GTLCalendarFreeBusyResponse.h +file + + + + +2012-12-09T08:42:32.000000Z +6570555b3c6beb59ae611e2a24e35413 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +3010 + +GTLCalendarEventDateTime.m +file + + + + +2012-12-09T08:42:32.000000Z +14772d852abc36fed3a83c4b9dd848ec +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1308 + +GTLCalendarAcl.m +file + + + + +2012-12-09T08:42:32.000000Z +b71730c704d2aa213c520a57f275fd56 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1745 + +GTLQueryCalendar.h +file + + + + +2012-12-09T08:42:32.000000Z +c1d3e5081eb4bf4d08a36668081d6832 +2012-10-23T20:26:17.342817Z +238 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +23560 + +GTLCalendarCalendarList.h +file + + + + +2012-12-09T08:42:32.000000Z +d61cf1868bd5ff1dd2dae69ce46b1783 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1904 + +GTLCalendarFreeBusyGroup.m +file + + + + +2012-12-09T08:42:32.000000Z +b635ea7408375360ab3f1e6af444ec7a +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1556 + +GTLCalendarColors.m +file + + + + +2012-12-09T08:42:32.000000Z +624366d784ecce885158eabba715744a +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +2051 + +GTLCalendarEventReminder.h +file + + + + +2012-12-09T08:42:32.000000Z +58607d579b99d140ac060f5eff1a577f +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1706 + +GTLCalendarFreeBusyResponse.m +file + + + + +2012-12-09T08:42:32.000000Z +5aa637d6f6b3a631c6b207b7c44faada +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +2217 + +GTLCalendarCalendar.h +file + + + + +2012-12-09T08:42:32.000000Z +56ed3ad129346aed59da184086d0e9a3 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +2016 + +GTLCalendarCalendarList.m +file + + + + +2012-12-09T08:42:32.000000Z +e29a07b8c875ceed3d7e6b9ffb2e3663 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1819 + +GTLQueryCalendar.m +file + + + + +2012-12-09T08:42:32.000000Z +dc22947d70c8523e4ab13ffbfec64598 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +15464 + +GTLCalendarEventReminder.m +file + + + + +2012-12-09T08:42:32.000000Z +eef6b9e8b836021df2a34719a3752b24 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1299 + +GTLCalendarSetting.h +file + + + + +2012-12-09T08:42:32.000000Z +bec96019ac63b57435bf495a4fd3312b +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1721 + +GTLCalendarCalendar.m +file + + + + +2012-12-09T08:42:32.000000Z +4d482de06f145a04d1989413d9cfbb19 +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1655 + +GTLCalendarEvent.h +file + + + + +2012-12-09T08:42:32.000000Z +5eb2b14565dd3a53482c2122b3becf38 +2012-10-23T20:26:17.342817Z +238 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +13256 + +GTLCalendarSetting.m +file + + + + +2012-12-09T08:42:32.000000Z +5fabf232ff8148b85acaafbe3f663a4d +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1551 + +GTLCalendarEvent.m +file + + + + +2012-12-09T08:42:32.000000Z +45d19d63ba2c2b0be1d58ab391fe3d7f +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +5745 + +GTLCalendarAclRule.h +file + + + + +2012-12-09T08:42:32.000000Z +ca80f41a33ca69e1c151e0c5e9e8cfff +2012-08-31T21:20:54.957097Z +206 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +3175 + +GTLCalendar_Sources.m +file + + + + +2012-12-09T08:42:32.000000Z +b6368cb340b4d732d08b72669b9ded40 +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1877 + diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendar.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendar.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendar.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarAcl.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarAcl.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarAcl.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarAcl.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarAcl.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarAcl.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarAclRule.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarAclRule.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarAclRule.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarAclRule.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarAclRule.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarAclRule.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarCalendar.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarCalendar.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarCalendar.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarCalendar.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarCalendar.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarCalendar.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarCalendarList.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarCalendarList.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarCalendarList.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarCalendarList.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarCalendarList.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarCalendarList.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarCalendarListEntry.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarCalendarListEntry.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarCalendarListEntry.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarCalendarListEntry.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarCalendarListEntry.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarCalendarListEntry.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarColorDefinition.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarColorDefinition.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarColorDefinition.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarColorDefinition.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarColorDefinition.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarColorDefinition.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarColors.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarColors.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarColors.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarColors.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarColors.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarColors.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarConstants.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarConstants.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarConstants.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarConstants.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarConstants.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarConstants.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarError.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarError.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarError.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarError.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarError.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarError.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEvent.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEvent.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEvent.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEvent.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEvent.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEvent.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEventAttendee.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEventAttendee.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEventAttendee.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEventAttendee.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEventAttendee.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEventAttendee.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEventDateTime.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEventDateTime.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEventDateTime.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEventDateTime.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEventDateTime.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEventDateTime.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEventReminder.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEventReminder.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEventReminder.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEventReminder.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEventReminder.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEventReminder.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEvents.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEvents.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEvents.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEvents.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEvents.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarEvents.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarFreeBusyCalendar.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarFreeBusyCalendar.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarFreeBusyCalendar.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarFreeBusyCalendar.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarFreeBusyCalendar.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarFreeBusyCalendar.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarFreeBusyGroup.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarFreeBusyGroup.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarFreeBusyGroup.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarFreeBusyGroup.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarFreeBusyGroup.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarFreeBusyGroup.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarFreeBusyRequestItem.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarFreeBusyRequestItem.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarFreeBusyRequestItem.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarFreeBusyRequestItem.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarFreeBusyRequestItem.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarFreeBusyRequestItem.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarFreeBusyResponse.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarFreeBusyResponse.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarFreeBusyResponse.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarFreeBusyResponse.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarFreeBusyResponse.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarFreeBusyResponse.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarSetting.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarSetting.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarSetting.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarSetting.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarSetting.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarSetting.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarSettings.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarSettings.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarSettings.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarSettings.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarSettings.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarSettings.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarTimePeriod.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarTimePeriod.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarTimePeriod.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarTimePeriod.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarTimePeriod.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLCalendarTimePeriod.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLQueryCalendar.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLQueryCalendar.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLQueryCalendar.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLQueryCalendar.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLQueryCalendar.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLQueryCalendar.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLServiceCalendar.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLServiceCalendar.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLServiceCalendar.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLServiceCalendar.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLServiceCalendar.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/prop-base/GTLServiceCalendar.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendar.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendar.h.svn-base new file mode 100644 index 0000000..3c4c9bb --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendar.h.svn-base @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendar.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp + +#import "GTLCalendarConstants.h" + +#import "GTLCalendarAcl.h" +#import "GTLCalendarAclRule.h" +#import "GTLCalendarCalendar.h" +#import "GTLCalendarCalendarList.h" +#import "GTLCalendarCalendarListEntry.h" +#import "GTLCalendarColorDefinition.h" +#import "GTLCalendarColors.h" +#import "GTLCalendarError.h" +#import "GTLCalendarEvent.h" +#import "GTLCalendarEventAttendee.h" +#import "GTLCalendarEventDateTime.h" +#import "GTLCalendarEventReminder.h" +#import "GTLCalendarEvents.h" +#import "GTLCalendarFreeBusyCalendar.h" +#import "GTLCalendarFreeBusyGroup.h" +#import "GTLCalendarFreeBusyRequestItem.h" +#import "GTLCalendarFreeBusyResponse.h" +#import "GTLCalendarSetting.h" +#import "GTLCalendarSettings.h" +#import "GTLCalendarTimePeriod.h" + +#import "GTLQueryCalendar.h" +#import "GTLServiceCalendar.h" diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarAcl.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarAcl.h.svn-base new file mode 100644 index 0000000..44e51e3 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarAcl.h.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarAcl.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarAcl (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCalendarAclRule; + +// ---------------------------------------------------------------------------- +// +// GTLCalendarAcl +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLCalendarAcl : GTLCollectionObject + +// ETag of the collection. +@property (copy) NSString *ETag; + +// List of rules on the access control list. +@property (retain) NSArray *items; // of GTLCalendarAclRule + +// Type of the collection ("calendar#acl"). +@property (copy) NSString *kind; + +// Token used to access the next page of this result. Omitted if no further +// results are available. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarAcl.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarAcl.m.svn-base new file mode 100644 index 0000000..1a8aa24 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarAcl.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarAcl.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarAcl (0 custom class methods, 4 custom properties) + +#import "GTLCalendarAcl.h" + +#import "GTLCalendarAclRule.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarAcl +// + +@implementation GTLCalendarAcl +@dynamic ETag, items, kind, nextPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLCalendarAclRule class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"calendar#acl"]; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarAclRule.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarAclRule.h.svn-base new file mode 100644 index 0000000..f7e501e --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarAclRule.h.svn-base @@ -0,0 +1,94 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarAclRule.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarAclRule (0 custom class methods, 5 custom properties) +// GTLCalendarAclRuleScope (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCalendarAclRuleScope; + +// ---------------------------------------------------------------------------- +// +// GTLCalendarAclRule +// + +@interface GTLCalendarAclRule : GTLObject + +// ETag of the resource. +@property (copy) NSString *ETag; + +// Identifier of the ACL rule. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Type of the resource ("calendar#aclRule"). +@property (copy) NSString *kind; + +// The role assigned to the scope. Possible values are: +// - "none" - Provides no access. +// - "freeBusyReader" - Provides read access to free/busy information. +// - "reader" - Provides read access to the calendar. Private events will appear +// to users with reader access, but event details will be hidden. +// - "writer" - Provides read and write access to the calendar. Private events +// will appear to users with writer access, and event details will be visible. +// - "owner" - Provides ownership of the calendar. This role has all of the +// permissions of the writer role with the additional ability to see and +// manipulate ACLs. +@property (copy) NSString *role; + +// The scope of the rule. +@property (retain) GTLCalendarAclRuleScope *scope; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarAclRuleScope +// + +@interface GTLCalendarAclRuleScope : GTLObject + +// The type of the scope. Possible values are: +// - "default" - The public scope. This is the default value. +// - "user" - Limits the scope to a single user. +// - "group" - Limits the scope to a group. +// - "domain" - Limits the scope to a domain. Note: The permissions granted to +// the "default", or public, scope apply to any user, authenticated or not. +@property (copy) NSString *type; + +// The email address of a user or group, or the name of a domain, depending on +// the scope type. Omitted for type "default". +@property (copy) NSString *value; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarAclRule.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarAclRule.m.svn-base new file mode 100644 index 0000000..9c649d3 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarAclRule.m.svn-base @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarAclRule.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarAclRule (0 custom class methods, 5 custom properties) +// GTLCalendarAclRuleScope (0 custom class methods, 2 custom properties) + +#import "GTLCalendarAclRule.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarAclRule +// + +@implementation GTLCalendarAclRule +@dynamic ETag, identifier, kind, role, scope; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"calendar#aclRule"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarAclRuleScope +// + +@implementation GTLCalendarAclRuleScope +@dynamic type, value; +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarCalendar.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarCalendar.h.svn-base new file mode 100644 index 0000000..fe36709 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarCalendar.h.svn-base @@ -0,0 +1,67 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarCalendar.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarCalendar (0 custom class methods, 7 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCalendarCalendar +// + +@interface GTLCalendarCalendar : GTLObject + +// Description of the calendar. Optional. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// ETag of the resource. +@property (copy) NSString *ETag; + +// Identifier of the calendar. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Type of the resource ("calendar#calendar"). +@property (copy) NSString *kind; + +// Geographic location of the calendar as free-form text. Optional. +@property (copy) NSString *location; + +// Title of the calendar. +@property (copy) NSString *summary; + +// The time zone of the calendar. Optional. +@property (copy) NSString *timeZone; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarCalendar.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarCalendar.m.svn-base new file mode 100644 index 0000000..910bc3e --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarCalendar.m.svn-base @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarCalendar.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarCalendar (0 custom class methods, 7 custom properties) + +#import "GTLCalendarCalendar.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarCalendar +// + +@implementation GTLCalendarCalendar +@dynamic descriptionProperty, ETag, identifier, kind, location, summary, + timeZone; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"calendar#calendar"]; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarCalendarList.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarCalendarList.h.svn-base new file mode 100644 index 0000000..7f3090e --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarCalendarList.h.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarCalendarList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarCalendarList (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCalendarCalendarListEntry; + +// ---------------------------------------------------------------------------- +// +// GTLCalendarCalendarList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLCalendarCalendarList : GTLCollectionObject + +// ETag of the collection. +@property (copy) NSString *ETag; + +// Calendars that are present on the user's calendar list. +@property (retain) NSArray *items; // of GTLCalendarCalendarListEntry + +// Type of the collection ("calendar#calendarList"). +@property (copy) NSString *kind; + +// Token used to access the next page of this result. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarCalendarList.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarCalendarList.m.svn-base new file mode 100644 index 0000000..81a40c6 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarCalendarList.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarCalendarList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarCalendarList (0 custom class methods, 4 custom properties) + +#import "GTLCalendarCalendarList.h" + +#import "GTLCalendarCalendarListEntry.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarCalendarList +// + +@implementation GTLCalendarCalendarList +@dynamic ETag, items, kind, nextPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLCalendarCalendarListEntry class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"calendar#calendarList"]; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarCalendarListEntry.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarCalendarListEntry.h.svn-base new file mode 100644 index 0000000..fef4f66 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarCalendarListEntry.h.svn-base @@ -0,0 +1,108 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarCalendarListEntry.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarCalendarListEntry (0 custom class methods, 15 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCalendarEventReminder; + +// ---------------------------------------------------------------------------- +// +// GTLCalendarCalendarListEntry +// + +@interface GTLCalendarCalendarListEntry : GTLObject + +// The effective access role that the authenticated user has on the calendar. +// Read-only. Possible values are: +// - "freeBusyReader" - Provides read access to free/busy information. +// - "reader" - Provides read access to the calendar. Private events will appear +// to users with reader access, but event details will be hidden. +// - "writer" - Provides read and write access to the calendar. Private events +// will appear to users with writer access, and event details will be visible. +// - "owner" - Provides ownership of the calendar. This role has all of the +// permissions of the writer role with the additional ability to see and +// manipulate ACLs. +@property (copy) NSString *accessRole; + +// The main color of the calendar in the format '#0088aa'. This property +// supersedes the index-based colorId property. Optional. +@property (copy) NSString *backgroundColor; + +// The color of the calendar. This is an ID referring to an entry in the +// "calendar" section of the colors definition (see the "colors" endpoint). +// Optional. +@property (copy) NSString *colorId; + +// The default reminders that the authenticated user has for this calendar. +@property (retain) NSArray *defaultReminders; // of GTLCalendarEventReminder + +// Description of the calendar. Optional. Read-only. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// ETag of the resource. +@property (copy) NSString *ETag; + +// The foreground color of the calendar in the format '#ffffff'. This property +// supersedes the index-based colorId property. Optional. +@property (copy) NSString *foregroundColor; + +// Whether the calendar has been hidden from the list. Optional. The default is +// False. +@property (retain) NSNumber *hidden; // boolValue + +// Identifier of the calendar. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Type of the resource ("calendar#calendarListEntry"). +@property (copy) NSString *kind; + +// Geographic location of the calendar as free-form text. Optional. Read-only. +@property (copy) NSString *location; + +// Whether the calendar content shows up in the calendar UI. Optional. The +// default is False. +@property (retain) NSNumber *selected; // boolValue + +// Title of the calendar. Read-only. +@property (copy) NSString *summary; + +// The summary that the authenticated user has set for this calendar. Optional. +@property (copy) NSString *summaryOverride; + +// The time zone of the calendar. Optional. Read-only. +@property (copy) NSString *timeZone; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarCalendarListEntry.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarCalendarListEntry.m.svn-base new file mode 100644 index 0000000..73965f8 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarCalendarListEntry.m.svn-base @@ -0,0 +1,66 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarCalendarListEntry.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarCalendarListEntry (0 custom class methods, 15 custom properties) + +#import "GTLCalendarCalendarListEntry.h" + +#import "GTLCalendarEventReminder.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarCalendarListEntry +// + +@implementation GTLCalendarCalendarListEntry +@dynamic accessRole, backgroundColor, colorId, defaultReminders, + descriptionProperty, ETag, foregroundColor, hidden, identifier, kind, + location, selected, summary, summaryOverride, timeZone; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLCalendarEventReminder class] + forKey:@"defaultReminders"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"calendar#calendarListEntry"]; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarColorDefinition.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarColorDefinition.h.svn-base new file mode 100644 index 0000000..e0b663c --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarColorDefinition.h.svn-base @@ -0,0 +1,51 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarColorDefinition.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarColorDefinition (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCalendarColorDefinition +// + +@interface GTLCalendarColorDefinition : GTLObject + +// The background color associated with this color definition. +@property (copy) NSString *background; + +// The foreground color that can be used to write on top of a background with +// 'background' color. +@property (copy) NSString *foreground; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarColorDefinition.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarColorDefinition.m.svn-base new file mode 100644 index 0000000..5cca4f9 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarColorDefinition.m.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarColorDefinition.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarColorDefinition (0 custom class methods, 2 custom properties) + +#import "GTLCalendarColorDefinition.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarColorDefinition +// + +@implementation GTLCalendarColorDefinition +@dynamic background, foreground; +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarColors.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarColors.h.svn-base new file mode 100644 index 0000000..b194090 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarColors.h.svn-base @@ -0,0 +1,93 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarColors.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarColors (0 custom class methods, 4 custom properties) +// GTLCalendarColorsCalendar (0 custom class methods, 0 custom properties) +// GTLCalendarColorsEvent (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCalendarColorDefinition; +@class GTLCalendarColorsCalendar; +@class GTLCalendarColorsEvent; + +// ---------------------------------------------------------------------------- +// +// GTLCalendarColors +// + +@interface GTLCalendarColors : GTLObject + +// Palette of calendar colors, mapping from the color ID to its definition. An +// 'calendarListEntry' resource refers to one of these color IDs in its 'color' +// field. Read-only. +@property (retain) GTLCalendarColorsCalendar *calendar; + +// Palette of event colors, mapping from the color ID to its definition. An +// 'event' resource may refer to one of these color IDs in its 'color' field. +// Read-only. +@property (retain) GTLCalendarColorsEvent *event; + +// Type of the resource ("calendar#colors"). +@property (copy) NSString *kind; + +// Last modification time of the color palette (as a RFC 3339 timestamp). +// Read-only. +@property (retain) GTLDateTime *updated; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarColorsCalendar +// + +@interface GTLCalendarColorsCalendar : GTLObject +// This object is documented as having more properties that are +// GTLCalendarColorDefinition. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarColorsEvent +// + +@interface GTLCalendarColorsEvent : GTLObject +// This object is documented as having more properties that are +// GTLCalendarColorDefinition. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarColors.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarColors.m.svn-base new file mode 100644 index 0000000..7944953 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarColors.m.svn-base @@ -0,0 +1,77 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarColors.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarColors (0 custom class methods, 4 custom properties) +// GTLCalendarColorsCalendar (0 custom class methods, 0 custom properties) +// GTLCalendarColorsEvent (0 custom class methods, 0 custom properties) + +#import "GTLCalendarColors.h" + +#import "GTLCalendarColorDefinition.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarColors +// + +@implementation GTLCalendarColors +@dynamic calendar, event, kind, updated; + ++ (void)load { + [self registerObjectClassForKind:@"calendar#colors"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarColorsCalendar +// + +@implementation GTLCalendarColorsCalendar + ++ (Class)classForAdditionalProperties { + return [GTLCalendarColorDefinition class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarColorsEvent +// + +@implementation GTLCalendarColorsEvent + ++ (Class)classForAdditionalProperties { + return [GTLCalendarColorDefinition class]; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarConstants.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarConstants.h.svn-base new file mode 100644 index 0000000..d017711 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarConstants.h.svn-base @@ -0,0 +1,51 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// Manage your calendars +GTL_EXTERN NSString * const kGTLAuthScopeCalendar; // "https://www.googleapis.com/auth/calendar" +// View your calendars +GTL_EXTERN NSString * const kGTLAuthScopeCalendarReadonly; // "https://www.googleapis.com/auth/calendar.readonly" + +// MinAccessRole +GTL_EXTERN NSString * const kGTLCalendarMinAccessRoleFreeBusyReader; // "freeBusyReader" +GTL_EXTERN NSString * const kGTLCalendarMinAccessRoleOwner; // "owner" +GTL_EXTERN NSString * const kGTLCalendarMinAccessRoleReader; // "reader" +GTL_EXTERN NSString * const kGTLCalendarMinAccessRoleWriter; // "writer" + +// OrderBy +GTL_EXTERN NSString * const kGTLCalendarOrderByStartTime; // "startTime" +GTL_EXTERN NSString * const kGTLCalendarOrderByUpdated; // "updated" diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarConstants.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarConstants.m.svn-base new file mode 100644 index 0000000..9eae55e --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarConstants.m.svn-base @@ -0,0 +1,43 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp + +#import "GTLCalendarConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeCalendar = @"https://www.googleapis.com/auth/calendar"; +NSString * const kGTLAuthScopeCalendarReadonly = @"https://www.googleapis.com/auth/calendar.readonly"; + +// MinAccessRole +NSString * const kGTLCalendarMinAccessRoleFreeBusyReader = @"freeBusyReader"; +NSString * const kGTLCalendarMinAccessRoleOwner = @"owner"; +NSString * const kGTLCalendarMinAccessRoleReader = @"reader"; +NSString * const kGTLCalendarMinAccessRoleWriter = @"writer"; + +// OrderBy +NSString * const kGTLCalendarOrderByStartTime = @"startTime"; +NSString * const kGTLCalendarOrderByUpdated = @"updated"; diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarError.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarError.h.svn-base new file mode 100644 index 0000000..31d1104 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarError.h.svn-base @@ -0,0 +1,58 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarError.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarError (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCalendarError +// + +@interface GTLCalendarError : GTLObject + +// Domain, or broad category, of the error. +@property (copy) NSString *domain; + +// Specific reason for the error. Some of the possible values are: +// - "groupTooBig" - The group of users requested is too large for a single +// query. +// - "tooManyCalendarsRequested" - The number of calendars requested is too +// large for a single query. +// - "notFound" - The requested resource was not found. +// - "internalError" - The API service has encountered an internal error. +// Additional error types may be added in the future, so clients should +// gracefully handle additional error statuses not included in this list. +@property (copy) NSString *reason; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarError.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarError.m.svn-base new file mode 100644 index 0000000..d0537b3 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarError.m.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarError.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarError (0 custom class methods, 2 custom properties) + +#import "GTLCalendarError.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarError +// + +@implementation GTLCalendarError +@dynamic domain, reason; +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEvent.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEvent.h.svn-base new file mode 100644 index 0000000..0bcc9a4 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEvent.h.svn-base @@ -0,0 +1,371 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarEvent.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarEvent (0 custom class methods, 35 custom properties) +// GTLCalendarEventCreator (0 custom class methods, 4 custom properties) +// GTLCalendarEventExtendedProperties (0 custom class methods, 2 custom properties) +// GTLCalendarEventGadget (0 custom class methods, 8 custom properties) +// GTLCalendarEventOrganizer (0 custom class methods, 4 custom properties) +// GTLCalendarEventReminders (0 custom class methods, 2 custom properties) +// GTLCalendarEventExtendedPropertiesPrivate (0 custom class methods, 0 custom properties) +// GTLCalendarEventExtendedPropertiesShared (0 custom class methods, 0 custom properties) +// GTLCalendarEventGadgetPreferences (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCalendarEventAttendee; +@class GTLCalendarEventCreator; +@class GTLCalendarEventDateTime; +@class GTLCalendarEventExtendedProperties; +@class GTLCalendarEventExtendedPropertiesPrivate; +@class GTLCalendarEventExtendedPropertiesShared; +@class GTLCalendarEventGadget; +@class GTLCalendarEventGadgetPreferences; +@class GTLCalendarEventOrganizer; +@class GTLCalendarEventReminder; +@class GTLCalendarEventReminders; + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEvent +// + +@interface GTLCalendarEvent : GTLObject + +// Whether anyone can invite themselves to the event. Optional. The default is +// False. +@property (retain) NSNumber *anyoneCanAddSelf; // boolValue + +// The attendees of the event. +@property (retain) NSArray *attendees; // of GTLCalendarEventAttendee + +// Whether attendees may have been omitted from the event's representation. When +// retrieving an event, this may be due to a restriction specified by the +// 'maxAttendee' query parameter. When updating an event, this can be used to +// only update the participant's response. Optional. The default is False. +@property (retain) NSNumber *attendeesOmitted; // boolValue + +// The color of the event. This is an ID referring to an entry in the "event" +// section of the colors definition (see the "colors" endpoint). Optional. +@property (copy) NSString *colorId; + +// Creation time of the event (as a RFC 3339 timestamp). Read-only. +@property (retain) GTLDateTime *created; + +// The creator of the event. Read-only. +@property (retain) GTLCalendarEventCreator *creator; + +// Description of the event. Optional. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The (exclusive) end time of the event. For a recurring event, this is the end +// time of the first instance. +@property (retain) GTLCalendarEventDateTime *end; + +// Whether the end time is actually unspecified. An end time is still provided +// for compatibility reasons, even if this attribute is set to True. The default +// is False. +@property (retain) NSNumber *endTimeUnspecified; // boolValue + +// ETag of the resource. +@property (copy) NSString *ETag; + +// Extended properties of the event. +@property (retain) GTLCalendarEventExtendedProperties *extendedProperties; + +// A gadget that extends this event. +@property (retain) GTLCalendarEventGadget *gadget; + +// Whether attendees other than the organizer can invite others to the event. +// Optional. The default is True. +@property (retain) NSNumber *guestsCanInviteOthers; // boolValue + +// Whether attendees other than the organizer can modify the event. Optional. +// The default is False. +@property (retain) NSNumber *guestsCanModify; // boolValue + +// Whether attendees other than the organizer can see who the event's attendees +// are. Optional. The default is True. +@property (retain) NSNumber *guestsCanSeeOtherGuests; // boolValue + +// An absolute link to the Google+ hangout associated with this event. +// Read-only. +@property (copy) NSString *hangoutLink; + +// An absolute link to this event in the Google Calendar Web UI. Read-only. +@property (copy) NSString *htmlLink; + +// Event ID in the iCalendar format. +@property (copy) NSString *iCalUID; + +// Identifier of the event. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Type of the resource ("calendar#event"). +@property (copy) NSString *kind; + +// Geographic location of the event as free-form text. Optional. +@property (copy) NSString *location; + +// Whether this is a locked event copy where no changes can be made to the main +// event fields "summary", "description", "location", "start", "end" or +// "recurrence". The default is False. Read-Only. +@property (retain) NSNumber *locked; // boolValue + +// The organizer of the event. If the organizer is also an attendee, this is +// indicated with a separate entry in 'attendees' with the 'organizer' field set +// to True. To change the organizer, use the "move" operation. Read-only, except +// when importing an event. +@property (retain) GTLCalendarEventOrganizer *organizer; + +// For an instance of a recurring event, this is the time at which this event +// would start according to the recurrence data in the recurring event +// identified by recurringEventId. Immutable. +@property (retain) GTLCalendarEventDateTime *originalStartTime; + +// Whether this is a private event copy where changes are not shared with other +// copies on other calendars. Optional. Immutable. +@property (retain) NSNumber *privateCopy; // boolValue + +// List of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event. This +// field is omitted for single events or instances of recurring events. +@property (retain) NSArray *recurrence; // of NSString + +// For an instance of a recurring event, this is the event ID of the recurring +// event itself. Immutable. +@property (copy) NSString *recurringEventId; + +// Information about the event's reminders for the authenticated user. +@property (retain) GTLCalendarEventReminders *reminders; + +// Sequence number as per iCalendar. +@property (retain) NSNumber *sequence; // intValue + +// The (inclusive) start time of the event. For a recurring event, this is the +// start time of the first instance. +@property (retain) GTLCalendarEventDateTime *start; + +// Status of the event. Optional. Possible values are: +// - "confirmed" - The event is confirmed. This is the default status. +// - "tentative" - The event is tentatively confirmed. +// - "cancelled" - The event is cancelled. +@property (copy) NSString *status; + +// Title of the event. +@property (copy) NSString *summary; + +// Whether the event blocks time on the calendar. Optional. Possible values are: +// - "opaque" - The event blocks time on the calendar. This is the default +// value. +// - "transparent" - The event does not block time on the calendar. +@property (copy) NSString *transparency; + +// Last modification time of the event (as a RFC 3339 timestamp). Read-only. +@property (retain) GTLDateTime *updated; + +// Visibility of the event. Optional. Possible values are: +// - "default" - Uses the default visibility for events on the calendar. This is +// the default value. +// - "public" - The event is public and event details are visible to all readers +// of the calendar. +// - "private" - The event is private and only event attendees may view event +// details. +// - "confidential" - The event is private. This value is provided for +// compatibility reasons. +@property (copy) NSString *visibility; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventCreator +// + +@interface GTLCalendarEventCreator : GTLObject + +// The creator's name, if available. +@property (copy) NSString *displayName; + +// The creator's email address, if available. +@property (copy) NSString *email; + +// The creator's Profile ID, if available. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Whether the creator corresponds to the calendar on which this copy of the +// event appears. Read-only. The default is False. +// Remapped to 'selfProperty' to avoid language reserved word 'self'. +@property (retain) NSNumber *selfProperty; // boolValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventExtendedProperties +// + +@interface GTLCalendarEventExtendedProperties : GTLObject + +// Properties that are private to the copy of the event that appears on this +// calendar. +// Remapped to 'privateProperty' to avoid language reserved word 'private'. +@property (retain) GTLCalendarEventExtendedPropertiesPrivate *privateProperty; + +// Properties that are shared between copies of the event on other attendees' +// calendars. +@property (retain) GTLCalendarEventExtendedPropertiesShared *shared; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventGadget +// + +@interface GTLCalendarEventGadget : GTLObject + +// The gadget's display mode. Optional. Possible values are: +// - "icon" - The gadget displays next to the event's title in the calendar +// view. +// - "chip" - The gadget displays when the event is clicked. +@property (copy) NSString *display; + +// The gadget's height in pixels. Optional. +@property (retain) NSNumber *height; // intValue + +// The gadget's icon URL. +@property (copy) NSString *iconLink; + +// The gadget's URL. +@property (copy) NSString *link; + +// Preferences. +@property (retain) GTLCalendarEventGadgetPreferences *preferences; + +// The gadget's title. +@property (copy) NSString *title; + +// The gadget's type. +@property (copy) NSString *type; + +// The gadget's width in pixels. Optional. +@property (retain) NSNumber *width; // intValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventOrganizer +// + +@interface GTLCalendarEventOrganizer : GTLObject + +// The organizer's name, if available. +@property (copy) NSString *displayName; + +// The organizer's email address, if available. +@property (copy) NSString *email; + +// The organizer's Profile ID, if available. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Whether the organizer corresponds to the calendar on which this copy of the +// event appears. Read-only. The default is False. +// Remapped to 'selfProperty' to avoid language reserved word 'self'. +@property (retain) NSNumber *selfProperty; // boolValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventReminders +// + +@interface GTLCalendarEventReminders : GTLObject + +// If the event doesn't use the default reminders, this lists the reminders +// specific to the event, or, if not set, indicates that no reminders are set +// for this event. +@property (retain) NSArray *overrides; // of GTLCalendarEventReminder + +// Whether the default reminders of the calendar apply to the event. +@property (retain) NSNumber *useDefault; // boolValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventExtendedPropertiesPrivate +// + +@interface GTLCalendarEventExtendedPropertiesPrivate : GTLObject +// This object is documented as having more properties that are NSString. Use +// -additionalJSONKeys and -additionalPropertyForName: to get the list of +// properties and then fetch them; or -additionalProperties to fetch them all at +// once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventExtendedPropertiesShared +// + +@interface GTLCalendarEventExtendedPropertiesShared : GTLObject +// This object is documented as having more properties that are NSString. Use +// -additionalJSONKeys and -additionalPropertyForName: to get the list of +// properties and then fetch them; or -additionalProperties to fetch them all at +// once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventGadgetPreferences +// + +@interface GTLCalendarEventGadgetPreferences : GTLObject +// This object is documented as having more properties that are NSString. Use +// -additionalJSONKeys and -additionalPropertyForName: to get the list of +// properties and then fetch them; or -additionalProperties to fetch them all at +// once. +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEvent.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEvent.m.svn-base new file mode 100644 index 0000000..1b3cea8 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEvent.m.svn-base @@ -0,0 +1,210 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarEvent.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarEvent (0 custom class methods, 35 custom properties) +// GTLCalendarEventCreator (0 custom class methods, 4 custom properties) +// GTLCalendarEventExtendedProperties (0 custom class methods, 2 custom properties) +// GTLCalendarEventGadget (0 custom class methods, 8 custom properties) +// GTLCalendarEventOrganizer (0 custom class methods, 4 custom properties) +// GTLCalendarEventReminders (0 custom class methods, 2 custom properties) +// GTLCalendarEventExtendedPropertiesPrivate (0 custom class methods, 0 custom properties) +// GTLCalendarEventExtendedPropertiesShared (0 custom class methods, 0 custom properties) +// GTLCalendarEventGadgetPreferences (0 custom class methods, 0 custom properties) + +#import "GTLCalendarEvent.h" + +#import "GTLCalendarEventAttendee.h" +#import "GTLCalendarEventDateTime.h" +#import "GTLCalendarEventReminder.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEvent +// + +@implementation GTLCalendarEvent +@dynamic anyoneCanAddSelf, attendees, attendeesOmitted, colorId, created, + creator, descriptionProperty, end, endTimeUnspecified, ETag, + extendedProperties, gadget, guestsCanInviteOthers, guestsCanModify, + guestsCanSeeOtherGuests, hangoutLink, htmlLink, iCalUID, identifier, + kind, location, locked, organizer, originalStartTime, privateCopy, + recurrence, recurringEventId, reminders, sequence, start, status, + summary, transparency, updated, visibility; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLCalendarEventAttendee class], @"attendees", + [NSString class], @"recurrence", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"calendar#event"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventCreator +// + +@implementation GTLCalendarEventCreator +@dynamic displayName, email, identifier, selfProperty; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"id", @"identifier", + @"self", @"selfProperty", + nil]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventExtendedProperties +// + +@implementation GTLCalendarEventExtendedProperties +@dynamic privateProperty, shared; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"private" + forKey:@"privateProperty"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventGadget +// + +@implementation GTLCalendarEventGadget +@dynamic display, height, iconLink, link, preferences, title, type, width; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventOrganizer +// + +@implementation GTLCalendarEventOrganizer +@dynamic displayName, email, identifier, selfProperty; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"id", @"identifier", + @"self", @"selfProperty", + nil]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventReminders +// + +@implementation GTLCalendarEventReminders +@dynamic overrides, useDefault; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLCalendarEventReminder class] + forKey:@"overrides"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventExtendedPropertiesPrivate +// + +@implementation GTLCalendarEventExtendedPropertiesPrivate + ++ (Class)classForAdditionalProperties { + return [NSString class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventExtendedPropertiesShared +// + +@implementation GTLCalendarEventExtendedPropertiesShared + ++ (Class)classForAdditionalProperties { + return [NSString class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventGadgetPreferences +// + +@implementation GTLCalendarEventGadgetPreferences + ++ (Class)classForAdditionalProperties { + return [NSString class]; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEventAttendee.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEventAttendee.h.svn-base new file mode 100644 index 0000000..2c61653 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEventAttendee.h.svn-base @@ -0,0 +1,83 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarEventAttendee.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarEventAttendee (0 custom class methods, 10 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventAttendee +// + +@interface GTLCalendarEventAttendee : GTLObject + +// Number of additional guests. Optional. The default is 0. +@property (retain) NSNumber *additionalGuests; // intValue + +// The attendee's response comment. Optional. +@property (copy) NSString *comment; + +// The attendee's name, if available. Optional. +@property (copy) NSString *displayName; + +// The attendee's email address, if available. This field must be present when +// adding an attendee. +@property (copy) NSString *email; + +// The attendee's Profile ID, if available. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Whether this is an optional attendee. Optional. The default is False. +@property (retain) NSNumber *optional; // boolValue + +// Whether the attendee is the organizer of the event. Read-only. The default is +// False. +@property (retain) NSNumber *organizer; // boolValue + +// Whether the attendee is a resource. Read-only. The default is False. +@property (retain) NSNumber *resource; // boolValue + +// The attendee's response status. Possible values are: +// - "needsAction" - The attendee has not responded to the invitation. +// - "declined" - The attendee has declined the invitation. +// - "tentative" - The attendee has tentatively accepted the invitation. +// - "accepted" - The attendee has accepted the invitation. +@property (copy) NSString *responseStatus; + +// Whether this entry represents the calendar on which this copy of the event +// appears. Read-only. The default is False. +// Remapped to 'selfProperty' to avoid language reserved word 'self'. +@property (retain) NSNumber *selfProperty; // boolValue + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEventAttendee.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEventAttendee.m.svn-base new file mode 100644 index 0000000..f13fa5f --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEventAttendee.m.svn-base @@ -0,0 +1,51 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarEventAttendee.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarEventAttendee (0 custom class methods, 10 custom properties) + +#import "GTLCalendarEventAttendee.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventAttendee +// + +@implementation GTLCalendarEventAttendee +@dynamic additionalGuests, comment, displayName, email, identifier, optional, + organizer, resource, responseStatus, selfProperty; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"id", @"identifier", + @"self", @"selfProperty", + nil]; + return map; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEventDateTime.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEventDateTime.h.svn-base new file mode 100644 index 0000000..80532b6 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEventDateTime.h.svn-base @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarEventDateTime.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarEventDateTime (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventDateTime +// + +@interface GTLCalendarEventDateTime : GTLObject + +// The date, in the format "yyyy-mm-dd", if this is an all-day event. +@property (retain) GTLDateTime *date; // Date only (yyyy-mm-dd) + +// The time, as a combined date-time value (formatted according to RFC 3339). A +// time zone offset is required unless a time zone is explicitly specified in +// 'timeZone'. +@property (retain) GTLDateTime *dateTime; + +// The name of the time zone in which the time is specified (e.g. +// "Europe/Zurich"). Optional. The default is the time zone of the calendar. +@property (copy) NSString *timeZone; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEventDateTime.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEventDateTime.m.svn-base new file mode 100644 index 0000000..758c682 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEventDateTime.m.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarEventDateTime.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarEventDateTime (0 custom class methods, 3 custom properties) + +#import "GTLCalendarEventDateTime.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventDateTime +// + +@implementation GTLCalendarEventDateTime +@dynamic date, dateTime, timeZone; +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEventReminder.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEventReminder.h.svn-base new file mode 100644 index 0000000..c7dc04b --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEventReminder.h.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarEventReminder.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarEventReminder (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventReminder +// + +@interface GTLCalendarEventReminder : GTLObject + +// The method used by this reminder. Possible values are: +// - "email" - Reminders are sent via email. +// - "sms" - Reminders are sent via SMS. +// - "popup" - Reminders are sent via a UI popup. +@property (copy) NSString *method; + +// Number of minutes before the start of the event when the reminder should +// trigger. +@property (retain) NSNumber *minutes; // intValue + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEventReminder.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEventReminder.m.svn-base new file mode 100644 index 0000000..12dd257 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEventReminder.m.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarEventReminder.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarEventReminder (0 custom class methods, 2 custom properties) + +#import "GTLCalendarEventReminder.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventReminder +// + +@implementation GTLCalendarEventReminder +@dynamic method, minutes; +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEvents.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEvents.h.svn-base new file mode 100644 index 0000000..f9945fe --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEvents.h.svn-base @@ -0,0 +1,94 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarEvents.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarEvents (0 custom class methods, 10 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCalendarEvent; +@class GTLCalendarEventReminder; + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEvents +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLCalendarEvents : GTLCollectionObject + +// The user's access role for this calendar. Read-only. Possible values are: +// - "none" - The user has no access. +// - "freeBusyReader" - The user has read access to free/busy information. +// - "reader" - The user has read access to the calendar. Private events will +// appear to users with reader access, but event details will be hidden. +// - "writer" - The user has read and write access to the calendar. Private +// events will appear to users with writer access, and event details will be +// visible. +// - "owner" - The user has ownership of the calendar. This role has all of the +// permissions of the writer role with the additional ability to see and +// manipulate ACLs. +@property (copy) NSString *accessRole; + +// The default reminders on the calendar for the authenticated user. These +// reminders apply to all events on this calendar that do not explicitly +// override them (i.e. do not have 'reminders.useDefault' set to 'true'). +@property (retain) NSArray *defaultReminders; // of GTLCalendarEventReminder + +// Description of the calendar. Read-only. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// ETag of the collection. +@property (copy) NSString *ETag; + +// List of events on the calendar. +@property (retain) NSArray *items; // of GTLCalendarEvent + +// Type of the collection ("calendar#events"). +@property (copy) NSString *kind; + +// Token used to access the next page of this result. Omitted if no further +// results are available. +@property (copy) NSString *nextPageToken; + +// Title of the calendar. Read-only. +@property (copy) NSString *summary; + +// The time zone of the calendar. Read-only. +@property (copy) NSString *timeZone; + +// Last modification time of the calendar (as a RFC 3339 timestamp). Read-only. +@property (retain) GTLDateTime *updated; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEvents.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEvents.m.svn-base new file mode 100644 index 0000000..d328474 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarEvents.m.svn-base @@ -0,0 +1,67 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarEvents.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarEvents (0 custom class methods, 10 custom properties) + +#import "GTLCalendarEvents.h" + +#import "GTLCalendarEvent.h" +#import "GTLCalendarEventReminder.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEvents +// + +@implementation GTLCalendarEvents +@dynamic accessRole, defaultReminders, descriptionProperty, ETag, items, kind, + nextPageToken, summary, timeZone, updated; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"etag", @"ETag", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLCalendarEventReminder class], @"defaultReminders", + [GTLCalendarEvent class], @"items", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"calendar#events"]; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarFreeBusyCalendar.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarFreeBusyCalendar.h.svn-base new file mode 100644 index 0000000..2376e71 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarFreeBusyCalendar.h.svn-base @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarFreeBusyCalendar.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarFreeBusyCalendar (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCalendarError; +@class GTLCalendarTimePeriod; + +// ---------------------------------------------------------------------------- +// +// GTLCalendarFreeBusyCalendar +// + +@interface GTLCalendarFreeBusyCalendar : GTLObject + +// List of time ranges during which this calendar should be regarded as busy. +@property (retain) NSArray *busy; // of GTLCalendarTimePeriod + +// Optional error(s) (if computation for the calendar failed). +@property (retain) NSArray *errors; // of GTLCalendarError + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarFreeBusyCalendar.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarFreeBusyCalendar.m.svn-base new file mode 100644 index 0000000..2ce48c6 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarFreeBusyCalendar.m.svn-base @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarFreeBusyCalendar.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarFreeBusyCalendar (0 custom class methods, 2 custom properties) + +#import "GTLCalendarFreeBusyCalendar.h" + +#import "GTLCalendarError.h" +#import "GTLCalendarTimePeriod.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarFreeBusyCalendar +// + +@implementation GTLCalendarFreeBusyCalendar +@dynamic busy, errors; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLCalendarTimePeriod class], @"busy", + [GTLCalendarError class], @"errors", + nil]; + return map; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarFreeBusyGroup.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarFreeBusyGroup.h.svn-base new file mode 100644 index 0000000..dafef3d --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarFreeBusyGroup.h.svn-base @@ -0,0 +1,52 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarFreeBusyGroup.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarFreeBusyGroup (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCalendarError; + +// ---------------------------------------------------------------------------- +// +// GTLCalendarFreeBusyGroup +// + +@interface GTLCalendarFreeBusyGroup : GTLObject + +// List of calendars' identifiers within a group. +@property (retain) NSArray *calendars; // of NSString + +// Optional error(s) (if computation for the group failed). +@property (retain) NSArray *errors; // of GTLCalendarError + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarFreeBusyGroup.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarFreeBusyGroup.m.svn-base new file mode 100644 index 0000000..7736f23 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarFreeBusyGroup.m.svn-base @@ -0,0 +1,52 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarFreeBusyGroup.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarFreeBusyGroup (0 custom class methods, 2 custom properties) + +#import "GTLCalendarFreeBusyGroup.h" + +#import "GTLCalendarError.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarFreeBusyGroup +// + +@implementation GTLCalendarFreeBusyGroup +@dynamic calendars, errors; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"calendars", + [GTLCalendarError class], @"errors", + nil]; + return map; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarFreeBusyRequestItem.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarFreeBusyRequestItem.h.svn-base new file mode 100644 index 0000000..860b4eb --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarFreeBusyRequestItem.h.svn-base @@ -0,0 +1,48 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarFreeBusyRequestItem.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarFreeBusyRequestItem (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCalendarFreeBusyRequestItem +// + +@interface GTLCalendarFreeBusyRequestItem : GTLObject + +// The identifier of a calendar or a group. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarFreeBusyRequestItem.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarFreeBusyRequestItem.m.svn-base new file mode 100644 index 0000000..6420c37 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarFreeBusyRequestItem.m.svn-base @@ -0,0 +1,48 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarFreeBusyRequestItem.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarFreeBusyRequestItem (0 custom class methods, 1 custom properties) + +#import "GTLCalendarFreeBusyRequestItem.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarFreeBusyRequestItem +// + +@implementation GTLCalendarFreeBusyRequestItem +@dynamic identifier; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarFreeBusyResponse.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarFreeBusyResponse.h.svn-base new file mode 100644 index 0000000..22b2a16 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarFreeBusyResponse.h.svn-base @@ -0,0 +1,92 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarFreeBusyResponse.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarFreeBusyResponse (0 custom class methods, 5 custom properties) +// GTLCalendarFreeBusyResponseCalendars (0 custom class methods, 0 custom properties) +// GTLCalendarFreeBusyResponseGroups (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCalendarFreeBusyCalendar; +@class GTLCalendarFreeBusyGroup; +@class GTLCalendarFreeBusyResponseCalendars; +@class GTLCalendarFreeBusyResponseGroups; + +// ---------------------------------------------------------------------------- +// +// GTLCalendarFreeBusyResponse +// + +@interface GTLCalendarFreeBusyResponse : GTLObject + +// List of free/busy information for calendars. +@property (retain) GTLCalendarFreeBusyResponseCalendars *calendars; + +// Expansion of groups. +@property (retain) GTLCalendarFreeBusyResponseGroups *groups; + +// Type of the resource ("calendar#freeBusy"). +@property (copy) NSString *kind; + +// The end of the interval. +@property (retain) GTLDateTime *timeMax; + +// The start of the interval. +@property (retain) GTLDateTime *timeMin; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarFreeBusyResponseCalendars +// + +@interface GTLCalendarFreeBusyResponseCalendars : GTLObject +// This object is documented as having more properties that are +// GTLCalendarFreeBusyCalendar. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarFreeBusyResponseGroups +// + +@interface GTLCalendarFreeBusyResponseGroups : GTLObject +// This object is documented as having more properties that are +// GTLCalendarFreeBusyGroup. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarFreeBusyResponse.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarFreeBusyResponse.m.svn-base new file mode 100644 index 0000000..c609b34 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarFreeBusyResponse.m.svn-base @@ -0,0 +1,78 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarFreeBusyResponse.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarFreeBusyResponse (0 custom class methods, 5 custom properties) +// GTLCalendarFreeBusyResponseCalendars (0 custom class methods, 0 custom properties) +// GTLCalendarFreeBusyResponseGroups (0 custom class methods, 0 custom properties) + +#import "GTLCalendarFreeBusyResponse.h" + +#import "GTLCalendarFreeBusyCalendar.h" +#import "GTLCalendarFreeBusyGroup.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarFreeBusyResponse +// + +@implementation GTLCalendarFreeBusyResponse +@dynamic calendars, groups, kind, timeMax, timeMin; + ++ (void)load { + [self registerObjectClassForKind:@"calendar#freeBusy"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarFreeBusyResponseCalendars +// + +@implementation GTLCalendarFreeBusyResponseCalendars + ++ (Class)classForAdditionalProperties { + return [GTLCalendarFreeBusyCalendar class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarFreeBusyResponseGroups +// + +@implementation GTLCalendarFreeBusyResponseGroups + ++ (Class)classForAdditionalProperties { + return [GTLCalendarFreeBusyGroup class]; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarSetting.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarSetting.h.svn-base new file mode 100644 index 0000000..1069a40 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarSetting.h.svn-base @@ -0,0 +1,58 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarSetting.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarSetting (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCalendarSetting +// + +@interface GTLCalendarSetting : GTLObject + +// ETag of the resource. +@property (copy) NSString *ETag; + +// Name of the user setting. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Type of the resource ("calendar#setting"). +@property (copy) NSString *kind; + +// Value of the user setting. The format of the value depends on the ID of the +// setting. +@property (copy) NSString *value; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarSetting.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarSetting.m.svn-base new file mode 100644 index 0000000..12f3c7b --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarSetting.m.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarSetting.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarSetting (0 custom class methods, 4 custom properties) + +#import "GTLCalendarSetting.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarSetting +// + +@implementation GTLCalendarSetting +@dynamic ETag, identifier, kind, value; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"calendar#setting"]; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarSettings.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarSettings.h.svn-base new file mode 100644 index 0000000..eb5bc81 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarSettings.h.svn-base @@ -0,0 +1,58 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarSettings.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarSettings (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCalendarSetting; + +// ---------------------------------------------------------------------------- +// +// GTLCalendarSettings +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLCalendarSettings : GTLCollectionObject + +// Etag of the collection. +@property (copy) NSString *ETag; + +// List of user settings. +@property (retain) NSArray *items; // of GTLCalendarSetting + +// Type of the collection ("calendar#settings"). +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarSettings.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarSettings.m.svn-base new file mode 100644 index 0000000..1cd828a --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarSettings.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarSettings.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarSettings (0 custom class methods, 3 custom properties) + +#import "GTLCalendarSettings.h" + +#import "GTLCalendarSetting.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarSettings +// + +@implementation GTLCalendarSettings +@dynamic ETag, items, kind; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLCalendarSetting class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"calendar#settings"]; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarTimePeriod.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarTimePeriod.h.svn-base new file mode 100644 index 0000000..7b6ce5b --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarTimePeriod.h.svn-base @@ -0,0 +1,50 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarTimePeriod.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarTimePeriod (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCalendarTimePeriod +// + +@interface GTLCalendarTimePeriod : GTLObject + +// The (exclusive) end of the time period. +@property (retain) GTLDateTime *end; + +// The (inclusive) start of the time period. +@property (retain) GTLDateTime *start; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarTimePeriod.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarTimePeriod.m.svn-base new file mode 100644 index 0000000..2e6f69c --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendarTimePeriod.m.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarTimePeriod.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarTimePeriod (0 custom class methods, 2 custom properties) + +#import "GTLCalendarTimePeriod.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarTimePeriod +// + +@implementation GTLCalendarTimePeriod +@dynamic end, start; +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendar_Sources.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendar_Sources.m.svn-base new file mode 100644 index 0000000..b4095ac --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLCalendar_Sources.m.svn-base @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendar_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp + +#import "GTLCalendarConstants.m" + +#import "GTLCalendarAcl.m" +#import "GTLCalendarAclRule.m" +#import "GTLCalendarCalendar.m" +#import "GTLCalendarCalendarList.m" +#import "GTLCalendarCalendarListEntry.m" +#import "GTLCalendarColorDefinition.m" +#import "GTLCalendarColors.m" +#import "GTLCalendarError.m" +#import "GTLCalendarEvent.m" +#import "GTLCalendarEventAttendee.m" +#import "GTLCalendarEventDateTime.m" +#import "GTLCalendarEventReminder.m" +#import "GTLCalendarEvents.m" +#import "GTLCalendarFreeBusyCalendar.m" +#import "GTLCalendarFreeBusyGroup.m" +#import "GTLCalendarFreeBusyRequestItem.m" +#import "GTLCalendarFreeBusyResponse.m" +#import "GTLCalendarSetting.m" +#import "GTLCalendarSettings.m" +#import "GTLCalendarTimePeriod.m" + +#import "GTLQueryCalendar.m" +#import "GTLServiceCalendar.m" diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLQueryCalendar.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLQueryCalendar.h.svn-base new file mode 100644 index 0000000..33ed552 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLQueryCalendar.h.svn-base @@ -0,0 +1,584 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryCalendar.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLQueryCalendar (32 custom class methods, 29 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLCalendarAclRule; +@class GTLCalendarCalendar; +@class GTLCalendarCalendarListEntry; +@class GTLCalendarEvent; +@class GTLCalendarFreeBusyRequestItem; + +@interface GTLQueryCalendar : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (assign) BOOL alwaysIncludeEmail; +@property (assign) NSInteger calendarExpansionMax; +@property (copy) NSString *calendarId; +@property (assign) BOOL colorRgbFormat; +@property (copy) NSString *destination; +@property (copy) NSString *eventId; +@property (assign) NSInteger groupExpansionMax; +@property (copy) NSString *iCalUID; +@property (retain) NSArray *items; // of GTLCalendarFreeBusyRequestItem +@property (assign) NSInteger maxAttendees; +@property (assign) NSInteger maxResults; +@property (copy) NSString *minAccessRole; +@property (copy) NSString *orderBy; +@property (copy) NSString *originalStart; +@property (copy) NSString *pageToken; +@property (copy) NSString *q; +@property (copy) NSString *ruleId; +@property (assign) BOOL sendNotifications; +@property (copy) NSString *setting; +@property (assign) BOOL showDeleted; +@property (assign) BOOL showHidden; +@property (assign) BOOL showHiddenInvitations; +@property (assign) BOOL singleEvents; +@property (copy) NSString *text; +@property (retain) GTLDateTime *timeMax; +@property (retain) GTLDateTime *timeMin; +@property (copy) NSString *timeZone; +@property (retain) GTLDateTime *updatedMin; + +#pragma mark - +#pragma mark "acl" methods +// These create a GTLQueryCalendar object. + +// Method: calendar.acl.delete +// Deletes an access control rule. +// Required: +// calendarId: Calendar identifier. +// ruleId: ACL rule identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar ++ (id)queryForAclDeleteWithCalendarId:(NSString *)calendarId + ruleId:(NSString *)ruleId; + +// Method: calendar.acl.get +// Returns an access control rule. +// Required: +// calendarId: Calendar identifier. +// ruleId: ACL rule identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// kGTLAuthScopeCalendarReadonly +// Fetches a GTLCalendarAclRule. ++ (id)queryForAclGetWithCalendarId:(NSString *)calendarId + ruleId:(NSString *)ruleId; + +// Method: calendar.acl.insert +// Creates an access control rule. +// Required: +// calendarId: Calendar identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarAclRule. ++ (id)queryForAclInsertWithObject:(GTLCalendarAclRule *)object + calendarId:(NSString *)calendarId; + +// Method: calendar.acl.list +// Returns the rules in the access control list for the calendar. +// Required: +// calendarId: Calendar identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarAcl. ++ (id)queryForAclListWithCalendarId:(NSString *)calendarId; + +// Method: calendar.acl.patch +// Updates an access control rule. This method supports patch semantics. +// Required: +// calendarId: Calendar identifier. +// ruleId: ACL rule identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarAclRule. ++ (id)queryForAclPatchWithObject:(GTLCalendarAclRule *)object + calendarId:(NSString *)calendarId + ruleId:(NSString *)ruleId; + +// Method: calendar.acl.update +// Updates an access control rule. +// Required: +// calendarId: Calendar identifier. +// ruleId: ACL rule identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarAclRule. ++ (id)queryForAclUpdateWithObject:(GTLCalendarAclRule *)object + calendarId:(NSString *)calendarId + ruleId:(NSString *)ruleId; + +#pragma mark - +#pragma mark "calendarList" methods +// These create a GTLQueryCalendar object. + +// Method: calendar.calendarList.delete +// Deletes an entry on the user's calendar list. +// Required: +// calendarId: Calendar identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar ++ (id)queryForCalendarListDeleteWithCalendarId:(NSString *)calendarId; + +// Method: calendar.calendarList.get +// Returns an entry on the user's calendar list. +// Required: +// calendarId: Calendar identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// kGTLAuthScopeCalendarReadonly +// Fetches a GTLCalendarCalendarListEntry. ++ (id)queryForCalendarListGetWithCalendarId:(NSString *)calendarId; + +// Method: calendar.calendarList.insert +// Adds an entry to the user's calendar list. +// Optional: +// colorRgbFormat: Whether to use the 'frontendColor' and 'backgroundColor' +// fields to write the calendar colors (RGB). If this feature is used, the +// index-based 'color' field will be set to the best matching option +// automatically. Optional. The default is False. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarCalendarListEntry. ++ (id)queryForCalendarListInsertWithObject:(GTLCalendarCalendarListEntry *)object; + +// Method: calendar.calendarList.list +// Returns entries on the user's calendar list. +// Optional: +// maxResults: Maximum number of entries returned on one result page. +// Optional. +// minAccessRole: The minimum access role for the user in the returned +// entires. Optional. The default is no restriction. +// kGTLCalendarMinAccessRoleFreeBusyReader: The user can read free/busy +// information. +// kGTLCalendarMinAccessRoleOwner: The user can read and modify events and +// access control lists. +// kGTLCalendarMinAccessRoleReader: The user can read events that are not +// private. +// kGTLCalendarMinAccessRoleWriter: The user can read and modify events. +// pageToken: Token specifying which result page to return. Optional. +// showHidden: Whether to show hidden entries. Optional. The default is False. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// kGTLAuthScopeCalendarReadonly +// Fetches a GTLCalendarCalendarList. ++ (id)queryForCalendarListList; + +// Method: calendar.calendarList.patch +// Updates an entry on the user's calendar list. This method supports patch +// semantics. +// Required: +// calendarId: Calendar identifier. +// Optional: +// colorRgbFormat: Whether to use the 'frontendColor' and 'backgroundColor' +// fields to write the calendar colors (RGB). If this feature is used, the +// index-based 'color' field will be set to the best matching option +// automatically. Optional. The default is False. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarCalendarListEntry. ++ (id)queryForCalendarListPatchWithObject:(GTLCalendarCalendarListEntry *)object + calendarId:(NSString *)calendarId; + +// Method: calendar.calendarList.update +// Updates an entry on the user's calendar list. +// Required: +// calendarId: Calendar identifier. +// Optional: +// colorRgbFormat: Whether to use the 'frontendColor' and 'backgroundColor' +// fields to write the calendar colors (RGB). If this feature is used, the +// index-based 'color' field will be set to the best matching option +// automatically. Optional. The default is False. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarCalendarListEntry. ++ (id)queryForCalendarListUpdateWithObject:(GTLCalendarCalendarListEntry *)object + calendarId:(NSString *)calendarId; + +#pragma mark - +#pragma mark "calendars" methods +// These create a GTLQueryCalendar object. + +// Method: calendar.calendars.clear +// Clears a primary calendar. This operation deletes all data associated with +// the primary calendar of an account and cannot be undone. +// Required: +// calendarId: Calendar identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar ++ (id)queryForCalendarsClearWithCalendarId:(NSString *)calendarId; + +// Method: calendar.calendars.delete +// Deletes a secondary calendar. +// Required: +// calendarId: Calendar identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar ++ (id)queryForCalendarsDeleteWithCalendarId:(NSString *)calendarId; + +// Method: calendar.calendars.get +// Returns metadata for a calendar. +// Required: +// calendarId: Calendar identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// kGTLAuthScopeCalendarReadonly +// Fetches a GTLCalendarCalendar. ++ (id)queryForCalendarsGetWithCalendarId:(NSString *)calendarId; + +// Method: calendar.calendars.insert +// Creates a secondary calendar. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarCalendar. ++ (id)queryForCalendarsInsertWithObject:(GTLCalendarCalendar *)object; + +// Method: calendar.calendars.patch +// Updates metadata for a calendar. This method supports patch semantics. +// Required: +// calendarId: Calendar identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarCalendar. ++ (id)queryForCalendarsPatchWithObject:(GTLCalendarCalendar *)object + calendarId:(NSString *)calendarId; + +// Method: calendar.calendars.update +// Updates metadata for a calendar. +// Required: +// calendarId: Calendar identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarCalendar. ++ (id)queryForCalendarsUpdateWithObject:(GTLCalendarCalendar *)object + calendarId:(NSString *)calendarId; + +#pragma mark - +#pragma mark "colors" methods +// These create a GTLQueryCalendar object. + +// Method: calendar.colors.get +// Returns the color definitions for calendars and events. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// kGTLAuthScopeCalendarReadonly +// Fetches a GTLCalendarColors. ++ (id)queryForColorsGet; + +#pragma mark - +#pragma mark "events" methods +// These create a GTLQueryCalendar object. + +// Method: calendar.events.delete +// Deletes an event. +// Required: +// calendarId: Calendar identifier. +// eventId: Event identifier. +// Optional: +// sendNotifications: Whether to send notifications about the deletion of the +// event. Optional. The default is False. +// Authorization scope(s): +// kGTLAuthScopeCalendar ++ (id)queryForEventsDeleteWithCalendarId:(NSString *)calendarId + eventId:(NSString *)eventId; + +// Method: calendar.events.get +// Returns an event. +// Required: +// calendarId: Calendar identifier. +// eventId: Event identifier. +// Optional: +// alwaysIncludeEmail: Whether to always include a value in the "email" field +// for the organizer, creator and attendees, even if no real email is +// available (i.e. a generated, non-working value will be provided). The use +// of this option is discouraged and should only be used by clients which +// cannot handle the absence of an email address value in the mentioned +// places. Optional. The default is False. +// maxAttendees: The maximum number of attendees to include in the response. +// If there are more than the specified number of attendees, only the +// participant is returned. Optional. +// timeZone: Time zone used in the response. Optional. The default is the time +// zone of the calendar. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// kGTLAuthScopeCalendarReadonly +// Fetches a GTLCalendarEvent. ++ (id)queryForEventsGetWithCalendarId:(NSString *)calendarId + eventId:(NSString *)eventId; + +// Method: calendar.events.import +// Imports an event. +// Required: +// calendarId: Calendar identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarEvent. ++ (id)queryForEventsImportWithObject:(GTLCalendarEvent *)object + calendarId:(NSString *)calendarId; + +// Method: calendar.events.insert +// Creates an event. +// Required: +// calendarId: Calendar identifier. +// Optional: +// maxAttendees: The maximum number of attendees to include in the response. +// If there are more than the specified number of attendees, only the +// participant is returned. Optional. +// sendNotifications: Whether to send notifications about the creation of the +// new event. Optional. The default is False. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarEvent. ++ (id)queryForEventsInsertWithObject:(GTLCalendarEvent *)object + calendarId:(NSString *)calendarId; + +// Method: calendar.events.instances +// Returns instances of the specified recurring event. +// Required: +// calendarId: Calendar identifier. +// eventId: Recurring event identifier. +// Optional: +// alwaysIncludeEmail: Whether to always include a value in the "email" field +// for the organizer, creator and attendees, even if no real email is +// available (i.e. a generated, non-working value will be provided). The use +// of this option is discouraged and should only be used by clients which +// cannot handle the absence of an email address value in the mentioned +// places. Optional. The default is False. +// maxAttendees: The maximum number of attendees to include in the response. +// If there are more than the specified number of attendees, only the +// participant is returned. Optional. +// maxResults: Maximum number of events returned on one result page. Optional. +// originalStart: The original start time of the instance in the result. +// Optional. +// pageToken: Token specifying which result page to return. Optional. +// showDeleted: Whether to include deleted events (with 'eventStatus' equals +// 'cancelled') in the result. Optional. The default is False. +// timeZone: Time zone used in the response. Optional. The default is the time +// zone of the calendar. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// kGTLAuthScopeCalendarReadonly +// Fetches a GTLCalendarEvents. ++ (id)queryForEventsInstancesWithCalendarId:(NSString *)calendarId + eventId:(NSString *)eventId; + +// Method: calendar.events.list +// Returns events on the specified calendar. +// Required: +// calendarId: Calendar identifier. +// Optional: +// alwaysIncludeEmail: Whether to always include a value in the "email" field +// for the organizer, creator and attendees, even if no real email is +// available (i.e. a generated, non-working value will be provided). The use +// of this option is discouraged and should only be used by clients which +// cannot handle the absence of an email address value in the mentioned +// places. Optional. The default is False. +// iCalUID: Specifies iCalendar UID (iCalUID) of events to be included in the +// response. Optional. +// maxAttendees: The maximum number of attendees to include in the response. +// If there are more than the specified number of attendees, only the +// participant is returned. Optional. +// maxResults: Maximum number of events returned on one result page. Optional. +// orderBy: The order of the events returned in the result. Optional. The +// default is an unspecified, stable order. +// kGTLCalendarOrderByStartTime: Order by the start date/time (ascending). +// This is only available when querying single events (i.e. the parameter +// "singleEvents" is True) +// kGTLCalendarOrderByUpdated: Order by last modification time (ascending). +// pageToken: Token specifying which result page to return. Optional. +// q: Free text search terms to find events that match these terms in any +// field, except for extended properties. Optional. +// showDeleted: Whether to include deleted single events (with 'status' equals +// 'cancelled') in the result. Cancelled instances of recurring events will +// still be included if 'singleEvents' is False. Optional. The default is +// False. +// showHiddenInvitations: Whether to include hidden invitations in the result. +// Optional. The default is False. +// singleEvents: Whether to expand recurring events into instances and only +// return single one-off events and instances of recurring events, but not +// the underlying recurring events themselves. Optional. The default is +// False. +// timeMax: Upper bound (exclusive) for an event's start time to filter by. +// Optional. The default is not to filter by start time. +// timeMin: Lower bound (inclusive) for an event's end time to filter by. +// Optional. The default is not to filter by end time. +// timeZone: Time zone used in the response. Optional. The default is the time +// zone of the calendar. +// updatedMin: Lower bound for an event's last modification time (as a RFC +// 3339 timestamp) to filter by. Optional. The default is not to filter by +// last modification time. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// kGTLAuthScopeCalendarReadonly +// Fetches a GTLCalendarEvents. ++ (id)queryForEventsListWithCalendarId:(NSString *)calendarId; + +// Method: calendar.events.move +// Moves an event to another calendar, i.e. changes an event's organizer. +// Required: +// calendarId: Calendar identifier of the source calendar where the event +// currently is on. +// eventId: Event identifier. +// destination: Calendar identifier of the target calendar where the event is +// to be moved to. +// Optional: +// sendNotifications: Whether to send notifications about the change of the +// event's organizer. Optional. The default is False. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarEvent. ++ (id)queryForEventsMoveWithCalendarId:(NSString *)calendarId + eventId:(NSString *)eventId + destination:(NSString *)destination; + +// Method: calendar.events.patch +// Updates an event. This method supports patch semantics. +// Required: +// calendarId: Calendar identifier. +// eventId: Event identifier. +// Optional: +// alwaysIncludeEmail: Whether to always include a value in the "email" field +// for the organizer, creator and attendees, even if no real email is +// available (i.e. a generated, non-working value will be provided). The use +// of this option is discouraged and should only be used by clients which +// cannot handle the absence of an email address value in the mentioned +// places. Optional. The default is False. +// maxAttendees: The maximum number of attendees to include in the response. +// If there are more than the specified number of attendees, only the +// participant is returned. Optional. +// sendNotifications: Whether to send notifications about the event update +// (e.g. attendee's responses, title changes, etc.). Optional. The default +// is False. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarEvent. ++ (id)queryForEventsPatchWithObject:(GTLCalendarEvent *)object + calendarId:(NSString *)calendarId + eventId:(NSString *)eventId; + +// Method: calendar.events.quickAdd +// Creates an event based on a simple text string. +// Required: +// calendarId: Calendar identifier. +// text: The text describing the event to be created. +// Optional: +// sendNotifications: Whether to send notifications about the creation of the +// event. Optional. The default is False. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarEvent. ++ (id)queryForEventsQuickAddWithCalendarId:(NSString *)calendarId + text:(NSString *)text; + +// Method: calendar.events.update +// Updates an event. +// Required: +// calendarId: Calendar identifier. +// eventId: Event identifier. +// Optional: +// alwaysIncludeEmail: Whether to always include a value in the "email" field +// for the organizer, creator and attendees, even if no real email is +// available (i.e. a generated, non-working value will be provided). The use +// of this option is discouraged and should only be used by clients which +// cannot handle the absence of an email address value in the mentioned +// places. Optional. The default is False. +// maxAttendees: The maximum number of attendees to include in the response. +// If there are more than the specified number of attendees, only the +// participant is returned. Optional. +// sendNotifications: Whether to send notifications about the event update +// (e.g. attendee's responses, title changes, etc.). Optional. The default +// is False. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarEvent. ++ (id)queryForEventsUpdateWithObject:(GTLCalendarEvent *)object + calendarId:(NSString *)calendarId + eventId:(NSString *)eventId; + +#pragma mark - +#pragma mark "freebusy" methods +// These create a GTLQueryCalendar object. + +// Method: calendar.freebusy.query +// Returns free/busy information for a set of calendars. +// Optional: +// calendarExpansionMax: Maximal number of calendars for which FreeBusy +// information is to be provided. Optional. +// groupExpansionMax: Maximal number of calendar identifiers to be provided +// for a single group. Optional. An error will be returned for a group with +// more members than this value. +// items: List of calendars and/or groups to query. +// timeMax: The end of the interval for the query. +// timeMin: The start of the interval for the query. +// timeZone: Time zone used in the response. Optional. The default is UTC. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// kGTLAuthScopeCalendarReadonly +// Fetches a GTLCalendarFreeBusyResponse. ++ (id)queryForFreebusyQuery; + +#pragma mark - +#pragma mark "settings" methods +// These create a GTLQueryCalendar object. + +// Method: calendar.settings.get +// Returns a single user setting. +// Required: +// setting: Name of the user setting. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// kGTLAuthScopeCalendarReadonly +// Fetches a GTLCalendarSetting. ++ (id)queryForSettingsGetWithSetting:(NSString *)setting; + +// Method: calendar.settings.list +// Returns all user settings for the authenticated user. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// kGTLAuthScopeCalendarReadonly +// Fetches a GTLCalendarSettings. ++ (id)queryForSettingsList; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLQueryCalendar.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLQueryCalendar.m.svn-base new file mode 100644 index 0000000..a3cd246 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLQueryCalendar.m.svn-base @@ -0,0 +1,435 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryCalendar.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLQueryCalendar (32 custom class methods, 29 custom properties) + +#import "GTLQueryCalendar.h" + +#import "GTLCalendarAcl.h" +#import "GTLCalendarAclRule.h" +#import "GTLCalendarCalendar.h" +#import "GTLCalendarCalendarList.h" +#import "GTLCalendarCalendarListEntry.h" +#import "GTLCalendarColors.h" +#import "GTLCalendarEvent.h" +#import "GTLCalendarEvents.h" +#import "GTLCalendarFreeBusyRequestItem.h" +#import "GTLCalendarFreeBusyResponse.h" +#import "GTLCalendarSetting.h" +#import "GTLCalendarSettings.h" + +@implementation GTLQueryCalendar + +@dynamic alwaysIncludeEmail, calendarExpansionMax, calendarId, colorRgbFormat, + destination, eventId, fields, groupExpansionMax, iCalUID, items, + maxAttendees, maxResults, minAccessRole, orderBy, originalStart, + pageToken, q, ruleId, sendNotifications, setting, showDeleted, + showHidden, showHiddenInvitations, singleEvents, text, timeMax, + timeMin, timeZone, updatedMin; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLCalendarFreeBusyRequestItem class] + forKey:@"items"]; + return map; +} + +#pragma mark - +#pragma mark "acl" methods +// These create a GTLQueryCalendar object. + ++ (id)queryForAclDeleteWithCalendarId:(NSString *)calendarId + ruleId:(NSString *)ruleId { + NSString *methodName = @"calendar.acl.delete"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + query.ruleId = ruleId; + return query; +} + ++ (id)queryForAclGetWithCalendarId:(NSString *)calendarId + ruleId:(NSString *)ruleId { + NSString *methodName = @"calendar.acl.get"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + query.ruleId = ruleId; + query.expectedObjectClass = [GTLCalendarAclRule class]; + return query; +} + ++ (id)queryForAclInsertWithObject:(GTLCalendarAclRule *)object + calendarId:(NSString *)calendarId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.acl.insert"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.calendarId = calendarId; + query.expectedObjectClass = [GTLCalendarAclRule class]; + return query; +} + ++ (id)queryForAclListWithCalendarId:(NSString *)calendarId { + NSString *methodName = @"calendar.acl.list"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + query.expectedObjectClass = [GTLCalendarAcl class]; + return query; +} + ++ (id)queryForAclPatchWithObject:(GTLCalendarAclRule *)object + calendarId:(NSString *)calendarId + ruleId:(NSString *)ruleId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.acl.patch"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.calendarId = calendarId; + query.ruleId = ruleId; + query.expectedObjectClass = [GTLCalendarAclRule class]; + return query; +} + ++ (id)queryForAclUpdateWithObject:(GTLCalendarAclRule *)object + calendarId:(NSString *)calendarId + ruleId:(NSString *)ruleId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.acl.update"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.calendarId = calendarId; + query.ruleId = ruleId; + query.expectedObjectClass = [GTLCalendarAclRule class]; + return query; +} + +#pragma mark - +#pragma mark "calendarList" methods +// These create a GTLQueryCalendar object. + ++ (id)queryForCalendarListDeleteWithCalendarId:(NSString *)calendarId { + NSString *methodName = @"calendar.calendarList.delete"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + return query; +} + ++ (id)queryForCalendarListGetWithCalendarId:(NSString *)calendarId { + NSString *methodName = @"calendar.calendarList.get"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + query.expectedObjectClass = [GTLCalendarCalendarListEntry class]; + return query; +} + ++ (id)queryForCalendarListInsertWithObject:(GTLCalendarCalendarListEntry *)object { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.calendarList.insert"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.expectedObjectClass = [GTLCalendarCalendarListEntry class]; + return query; +} + ++ (id)queryForCalendarListList { + NSString *methodName = @"calendar.calendarList.list"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLCalendarCalendarList class]; + return query; +} + ++ (id)queryForCalendarListPatchWithObject:(GTLCalendarCalendarListEntry *)object + calendarId:(NSString *)calendarId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.calendarList.patch"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.calendarId = calendarId; + query.expectedObjectClass = [GTLCalendarCalendarListEntry class]; + return query; +} + ++ (id)queryForCalendarListUpdateWithObject:(GTLCalendarCalendarListEntry *)object + calendarId:(NSString *)calendarId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.calendarList.update"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.calendarId = calendarId; + query.expectedObjectClass = [GTLCalendarCalendarListEntry class]; + return query; +} + +#pragma mark - +#pragma mark "calendars" methods +// These create a GTLQueryCalendar object. + ++ (id)queryForCalendarsClearWithCalendarId:(NSString *)calendarId { + NSString *methodName = @"calendar.calendars.clear"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + return query; +} + ++ (id)queryForCalendarsDeleteWithCalendarId:(NSString *)calendarId { + NSString *methodName = @"calendar.calendars.delete"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + return query; +} + ++ (id)queryForCalendarsGetWithCalendarId:(NSString *)calendarId { + NSString *methodName = @"calendar.calendars.get"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + query.expectedObjectClass = [GTLCalendarCalendar class]; + return query; +} + ++ (id)queryForCalendarsInsertWithObject:(GTLCalendarCalendar *)object { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.calendars.insert"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.expectedObjectClass = [GTLCalendarCalendar class]; + return query; +} + ++ (id)queryForCalendarsPatchWithObject:(GTLCalendarCalendar *)object + calendarId:(NSString *)calendarId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.calendars.patch"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.calendarId = calendarId; + query.expectedObjectClass = [GTLCalendarCalendar class]; + return query; +} + ++ (id)queryForCalendarsUpdateWithObject:(GTLCalendarCalendar *)object + calendarId:(NSString *)calendarId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.calendars.update"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.calendarId = calendarId; + query.expectedObjectClass = [GTLCalendarCalendar class]; + return query; +} + +#pragma mark - +#pragma mark "colors" methods +// These create a GTLQueryCalendar object. + ++ (id)queryForColorsGet { + NSString *methodName = @"calendar.colors.get"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLCalendarColors class]; + return query; +} + +#pragma mark - +#pragma mark "events" methods +// These create a GTLQueryCalendar object. + ++ (id)queryForEventsDeleteWithCalendarId:(NSString *)calendarId + eventId:(NSString *)eventId { + NSString *methodName = @"calendar.events.delete"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + query.eventId = eventId; + return query; +} + ++ (id)queryForEventsGetWithCalendarId:(NSString *)calendarId + eventId:(NSString *)eventId { + NSString *methodName = @"calendar.events.get"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + query.eventId = eventId; + query.expectedObjectClass = [GTLCalendarEvent class]; + return query; +} + ++ (id)queryForEventsImportWithObject:(GTLCalendarEvent *)object + calendarId:(NSString *)calendarId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.events.import"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.calendarId = calendarId; + query.expectedObjectClass = [GTLCalendarEvent class]; + return query; +} + ++ (id)queryForEventsInsertWithObject:(GTLCalendarEvent *)object + calendarId:(NSString *)calendarId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.events.insert"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.calendarId = calendarId; + query.expectedObjectClass = [GTLCalendarEvent class]; + return query; +} + ++ (id)queryForEventsInstancesWithCalendarId:(NSString *)calendarId + eventId:(NSString *)eventId { + NSString *methodName = @"calendar.events.instances"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + query.eventId = eventId; + query.expectedObjectClass = [GTLCalendarEvents class]; + return query; +} + ++ (id)queryForEventsListWithCalendarId:(NSString *)calendarId { + NSString *methodName = @"calendar.events.list"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + query.expectedObjectClass = [GTLCalendarEvents class]; + return query; +} + ++ (id)queryForEventsMoveWithCalendarId:(NSString *)calendarId + eventId:(NSString *)eventId + destination:(NSString *)destination { + NSString *methodName = @"calendar.events.move"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + query.eventId = eventId; + query.destination = destination; + query.expectedObjectClass = [GTLCalendarEvent class]; + return query; +} + ++ (id)queryForEventsPatchWithObject:(GTLCalendarEvent *)object + calendarId:(NSString *)calendarId + eventId:(NSString *)eventId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.events.patch"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.calendarId = calendarId; + query.eventId = eventId; + query.expectedObjectClass = [GTLCalendarEvent class]; + return query; +} + ++ (id)queryForEventsQuickAddWithCalendarId:(NSString *)calendarId + text:(NSString *)text { + NSString *methodName = @"calendar.events.quickAdd"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + query.text = text; + query.expectedObjectClass = [GTLCalendarEvent class]; + return query; +} + ++ (id)queryForEventsUpdateWithObject:(GTLCalendarEvent *)object + calendarId:(NSString *)calendarId + eventId:(NSString *)eventId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.events.update"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.calendarId = calendarId; + query.eventId = eventId; + query.expectedObjectClass = [GTLCalendarEvent class]; + return query; +} + +#pragma mark - +#pragma mark "freebusy" methods +// These create a GTLQueryCalendar object. + ++ (id)queryForFreebusyQuery { + NSString *methodName = @"calendar.freebusy.query"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLCalendarFreeBusyResponse class]; + return query; +} + +#pragma mark - +#pragma mark "settings" methods +// These create a GTLQueryCalendar object. + ++ (id)queryForSettingsGetWithSetting:(NSString *)setting { + NSString *methodName = @"calendar.settings.get"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.setting = setting; + query.expectedObjectClass = [GTLCalendarSetting class]; + return query; +} + ++ (id)queryForSettingsList { + NSString *methodName = @"calendar.settings.list"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLCalendarSettings class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLServiceCalendar.h.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLServiceCalendar.h.svn-base new file mode 100644 index 0000000..4c1f454 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLServiceCalendar.h.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceCalendar.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLServiceCalendar (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceCalendar : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryCalendar.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLServiceCalendar.m.svn-base b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLServiceCalendar.m.svn-base new file mode 100644 index 0000000..8f9b919 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/.svn/text-base/GTLServiceCalendar.m.svn-base @@ -0,0 +1,80 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceCalendar.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLServiceCalendar (0 custom class methods, 0 custom properties) + +#import "GTLCalendar.h" + +@implementation GTLServiceCalendar + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryCalendar class], + [GTLCalendarAcl class], + [GTLCalendarAclRule class], + [GTLCalendarCalendar class], + [GTLCalendarCalendarList class], + [GTLCalendarCalendarListEntry class], + [GTLCalendarColorDefinition class], + [GTLCalendarColors class], + [GTLCalendarError class], + [GTLCalendarEvent class], + [GTLCalendarEventAttendee class], + [GTLCalendarEventDateTime class], + [GTLCalendarEventReminder class], + [GTLCalendarEvents class], + [GTLCalendarFreeBusyCalendar class], + [GTLCalendarFreeBusyGroup class], + [GTLCalendarFreeBusyRequestItem class], + [GTLCalendarFreeBusyResponse class], + [GTLCalendarSetting class], + [GTLCalendarSettings class], + [GTLCalendarTimePeriod class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v3"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendar.h b/GTL/Source/Services/Calendar/Generated/GTLCalendar.h new file mode 100644 index 0000000..3c4c9bb --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendar.h @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendar.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp + +#import "GTLCalendarConstants.h" + +#import "GTLCalendarAcl.h" +#import "GTLCalendarAclRule.h" +#import "GTLCalendarCalendar.h" +#import "GTLCalendarCalendarList.h" +#import "GTLCalendarCalendarListEntry.h" +#import "GTLCalendarColorDefinition.h" +#import "GTLCalendarColors.h" +#import "GTLCalendarError.h" +#import "GTLCalendarEvent.h" +#import "GTLCalendarEventAttendee.h" +#import "GTLCalendarEventDateTime.h" +#import "GTLCalendarEventReminder.h" +#import "GTLCalendarEvents.h" +#import "GTLCalendarFreeBusyCalendar.h" +#import "GTLCalendarFreeBusyGroup.h" +#import "GTLCalendarFreeBusyRequestItem.h" +#import "GTLCalendarFreeBusyResponse.h" +#import "GTLCalendarSetting.h" +#import "GTLCalendarSettings.h" +#import "GTLCalendarTimePeriod.h" + +#import "GTLQueryCalendar.h" +#import "GTLServiceCalendar.h" diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarAcl.h b/GTL/Source/Services/Calendar/Generated/GTLCalendarAcl.h new file mode 100644 index 0000000..44e51e3 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarAcl.h @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarAcl.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarAcl (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCalendarAclRule; + +// ---------------------------------------------------------------------------- +// +// GTLCalendarAcl +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLCalendarAcl : GTLCollectionObject + +// ETag of the collection. +@property (copy) NSString *ETag; + +// List of rules on the access control list. +@property (retain) NSArray *items; // of GTLCalendarAclRule + +// Type of the collection ("calendar#acl"). +@property (copy) NSString *kind; + +// Token used to access the next page of this result. Omitted if no further +// results are available. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarAcl.m b/GTL/Source/Services/Calendar/Generated/GTLCalendarAcl.m new file mode 100644 index 0000000..1a8aa24 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarAcl.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarAcl.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarAcl (0 custom class methods, 4 custom properties) + +#import "GTLCalendarAcl.h" + +#import "GTLCalendarAclRule.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarAcl +// + +@implementation GTLCalendarAcl +@dynamic ETag, items, kind, nextPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLCalendarAclRule class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"calendar#acl"]; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarAclRule.h b/GTL/Source/Services/Calendar/Generated/GTLCalendarAclRule.h new file mode 100644 index 0000000..f7e501e --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarAclRule.h @@ -0,0 +1,94 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarAclRule.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarAclRule (0 custom class methods, 5 custom properties) +// GTLCalendarAclRuleScope (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCalendarAclRuleScope; + +// ---------------------------------------------------------------------------- +// +// GTLCalendarAclRule +// + +@interface GTLCalendarAclRule : GTLObject + +// ETag of the resource. +@property (copy) NSString *ETag; + +// Identifier of the ACL rule. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Type of the resource ("calendar#aclRule"). +@property (copy) NSString *kind; + +// The role assigned to the scope. Possible values are: +// - "none" - Provides no access. +// - "freeBusyReader" - Provides read access to free/busy information. +// - "reader" - Provides read access to the calendar. Private events will appear +// to users with reader access, but event details will be hidden. +// - "writer" - Provides read and write access to the calendar. Private events +// will appear to users with writer access, and event details will be visible. +// - "owner" - Provides ownership of the calendar. This role has all of the +// permissions of the writer role with the additional ability to see and +// manipulate ACLs. +@property (copy) NSString *role; + +// The scope of the rule. +@property (retain) GTLCalendarAclRuleScope *scope; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarAclRuleScope +// + +@interface GTLCalendarAclRuleScope : GTLObject + +// The type of the scope. Possible values are: +// - "default" - The public scope. This is the default value. +// - "user" - Limits the scope to a single user. +// - "group" - Limits the scope to a group. +// - "domain" - Limits the scope to a domain. Note: The permissions granted to +// the "default", or public, scope apply to any user, authenticated or not. +@property (copy) NSString *type; + +// The email address of a user or group, or the name of a domain, depending on +// the scope type. Omitted for type "default". +@property (copy) NSString *value; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarAclRule.m b/GTL/Source/Services/Calendar/Generated/GTLCalendarAclRule.m new file mode 100644 index 0000000..9c649d3 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarAclRule.m @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarAclRule.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarAclRule (0 custom class methods, 5 custom properties) +// GTLCalendarAclRuleScope (0 custom class methods, 2 custom properties) + +#import "GTLCalendarAclRule.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarAclRule +// + +@implementation GTLCalendarAclRule +@dynamic ETag, identifier, kind, role, scope; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"calendar#aclRule"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarAclRuleScope +// + +@implementation GTLCalendarAclRuleScope +@dynamic type, value; +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarCalendar.h b/GTL/Source/Services/Calendar/Generated/GTLCalendarCalendar.h new file mode 100644 index 0000000..fe36709 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarCalendar.h @@ -0,0 +1,67 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarCalendar.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarCalendar (0 custom class methods, 7 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCalendarCalendar +// + +@interface GTLCalendarCalendar : GTLObject + +// Description of the calendar. Optional. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// ETag of the resource. +@property (copy) NSString *ETag; + +// Identifier of the calendar. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Type of the resource ("calendar#calendar"). +@property (copy) NSString *kind; + +// Geographic location of the calendar as free-form text. Optional. +@property (copy) NSString *location; + +// Title of the calendar. +@property (copy) NSString *summary; + +// The time zone of the calendar. Optional. +@property (copy) NSString *timeZone; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarCalendar.m b/GTL/Source/Services/Calendar/Generated/GTLCalendarCalendar.m new file mode 100644 index 0000000..910bc3e --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarCalendar.m @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarCalendar.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarCalendar (0 custom class methods, 7 custom properties) + +#import "GTLCalendarCalendar.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarCalendar +// + +@implementation GTLCalendarCalendar +@dynamic descriptionProperty, ETag, identifier, kind, location, summary, + timeZone; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"calendar#calendar"]; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarCalendarList.h b/GTL/Source/Services/Calendar/Generated/GTLCalendarCalendarList.h new file mode 100644 index 0000000..7f3090e --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarCalendarList.h @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarCalendarList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarCalendarList (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCalendarCalendarListEntry; + +// ---------------------------------------------------------------------------- +// +// GTLCalendarCalendarList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLCalendarCalendarList : GTLCollectionObject + +// ETag of the collection. +@property (copy) NSString *ETag; + +// Calendars that are present on the user's calendar list. +@property (retain) NSArray *items; // of GTLCalendarCalendarListEntry + +// Type of the collection ("calendar#calendarList"). +@property (copy) NSString *kind; + +// Token used to access the next page of this result. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarCalendarList.m b/GTL/Source/Services/Calendar/Generated/GTLCalendarCalendarList.m new file mode 100644 index 0000000..81a40c6 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarCalendarList.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarCalendarList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarCalendarList (0 custom class methods, 4 custom properties) + +#import "GTLCalendarCalendarList.h" + +#import "GTLCalendarCalendarListEntry.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarCalendarList +// + +@implementation GTLCalendarCalendarList +@dynamic ETag, items, kind, nextPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLCalendarCalendarListEntry class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"calendar#calendarList"]; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarCalendarListEntry.h b/GTL/Source/Services/Calendar/Generated/GTLCalendarCalendarListEntry.h new file mode 100644 index 0000000..fef4f66 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarCalendarListEntry.h @@ -0,0 +1,108 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarCalendarListEntry.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarCalendarListEntry (0 custom class methods, 15 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCalendarEventReminder; + +// ---------------------------------------------------------------------------- +// +// GTLCalendarCalendarListEntry +// + +@interface GTLCalendarCalendarListEntry : GTLObject + +// The effective access role that the authenticated user has on the calendar. +// Read-only. Possible values are: +// - "freeBusyReader" - Provides read access to free/busy information. +// - "reader" - Provides read access to the calendar. Private events will appear +// to users with reader access, but event details will be hidden. +// - "writer" - Provides read and write access to the calendar. Private events +// will appear to users with writer access, and event details will be visible. +// - "owner" - Provides ownership of the calendar. This role has all of the +// permissions of the writer role with the additional ability to see and +// manipulate ACLs. +@property (copy) NSString *accessRole; + +// The main color of the calendar in the format '#0088aa'. This property +// supersedes the index-based colorId property. Optional. +@property (copy) NSString *backgroundColor; + +// The color of the calendar. This is an ID referring to an entry in the +// "calendar" section of the colors definition (see the "colors" endpoint). +// Optional. +@property (copy) NSString *colorId; + +// The default reminders that the authenticated user has for this calendar. +@property (retain) NSArray *defaultReminders; // of GTLCalendarEventReminder + +// Description of the calendar. Optional. Read-only. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// ETag of the resource. +@property (copy) NSString *ETag; + +// The foreground color of the calendar in the format '#ffffff'. This property +// supersedes the index-based colorId property. Optional. +@property (copy) NSString *foregroundColor; + +// Whether the calendar has been hidden from the list. Optional. The default is +// False. +@property (retain) NSNumber *hidden; // boolValue + +// Identifier of the calendar. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Type of the resource ("calendar#calendarListEntry"). +@property (copy) NSString *kind; + +// Geographic location of the calendar as free-form text. Optional. Read-only. +@property (copy) NSString *location; + +// Whether the calendar content shows up in the calendar UI. Optional. The +// default is False. +@property (retain) NSNumber *selected; // boolValue + +// Title of the calendar. Read-only. +@property (copy) NSString *summary; + +// The summary that the authenticated user has set for this calendar. Optional. +@property (copy) NSString *summaryOverride; + +// The time zone of the calendar. Optional. Read-only. +@property (copy) NSString *timeZone; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarCalendarListEntry.m b/GTL/Source/Services/Calendar/Generated/GTLCalendarCalendarListEntry.m new file mode 100644 index 0000000..73965f8 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarCalendarListEntry.m @@ -0,0 +1,66 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarCalendarListEntry.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarCalendarListEntry (0 custom class methods, 15 custom properties) + +#import "GTLCalendarCalendarListEntry.h" + +#import "GTLCalendarEventReminder.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarCalendarListEntry +// + +@implementation GTLCalendarCalendarListEntry +@dynamic accessRole, backgroundColor, colorId, defaultReminders, + descriptionProperty, ETag, foregroundColor, hidden, identifier, kind, + location, selected, summary, summaryOverride, timeZone; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLCalendarEventReminder class] + forKey:@"defaultReminders"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"calendar#calendarListEntry"]; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarColorDefinition.h b/GTL/Source/Services/Calendar/Generated/GTLCalendarColorDefinition.h new file mode 100644 index 0000000..e0b663c --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarColorDefinition.h @@ -0,0 +1,51 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarColorDefinition.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarColorDefinition (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCalendarColorDefinition +// + +@interface GTLCalendarColorDefinition : GTLObject + +// The background color associated with this color definition. +@property (copy) NSString *background; + +// The foreground color that can be used to write on top of a background with +// 'background' color. +@property (copy) NSString *foreground; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarColorDefinition.m b/GTL/Source/Services/Calendar/Generated/GTLCalendarColorDefinition.m new file mode 100644 index 0000000..5cca4f9 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarColorDefinition.m @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarColorDefinition.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarColorDefinition (0 custom class methods, 2 custom properties) + +#import "GTLCalendarColorDefinition.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarColorDefinition +// + +@implementation GTLCalendarColorDefinition +@dynamic background, foreground; +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarColors.h b/GTL/Source/Services/Calendar/Generated/GTLCalendarColors.h new file mode 100644 index 0000000..b194090 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarColors.h @@ -0,0 +1,93 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarColors.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarColors (0 custom class methods, 4 custom properties) +// GTLCalendarColorsCalendar (0 custom class methods, 0 custom properties) +// GTLCalendarColorsEvent (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCalendarColorDefinition; +@class GTLCalendarColorsCalendar; +@class GTLCalendarColorsEvent; + +// ---------------------------------------------------------------------------- +// +// GTLCalendarColors +// + +@interface GTLCalendarColors : GTLObject + +// Palette of calendar colors, mapping from the color ID to its definition. An +// 'calendarListEntry' resource refers to one of these color IDs in its 'color' +// field. Read-only. +@property (retain) GTLCalendarColorsCalendar *calendar; + +// Palette of event colors, mapping from the color ID to its definition. An +// 'event' resource may refer to one of these color IDs in its 'color' field. +// Read-only. +@property (retain) GTLCalendarColorsEvent *event; + +// Type of the resource ("calendar#colors"). +@property (copy) NSString *kind; + +// Last modification time of the color palette (as a RFC 3339 timestamp). +// Read-only. +@property (retain) GTLDateTime *updated; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarColorsCalendar +// + +@interface GTLCalendarColorsCalendar : GTLObject +// This object is documented as having more properties that are +// GTLCalendarColorDefinition. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarColorsEvent +// + +@interface GTLCalendarColorsEvent : GTLObject +// This object is documented as having more properties that are +// GTLCalendarColorDefinition. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarColors.m b/GTL/Source/Services/Calendar/Generated/GTLCalendarColors.m new file mode 100644 index 0000000..7944953 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarColors.m @@ -0,0 +1,77 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarColors.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarColors (0 custom class methods, 4 custom properties) +// GTLCalendarColorsCalendar (0 custom class methods, 0 custom properties) +// GTLCalendarColorsEvent (0 custom class methods, 0 custom properties) + +#import "GTLCalendarColors.h" + +#import "GTLCalendarColorDefinition.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarColors +// + +@implementation GTLCalendarColors +@dynamic calendar, event, kind, updated; + ++ (void)load { + [self registerObjectClassForKind:@"calendar#colors"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarColorsCalendar +// + +@implementation GTLCalendarColorsCalendar + ++ (Class)classForAdditionalProperties { + return [GTLCalendarColorDefinition class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarColorsEvent +// + +@implementation GTLCalendarColorsEvent + ++ (Class)classForAdditionalProperties { + return [GTLCalendarColorDefinition class]; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarConstants.h b/GTL/Source/Services/Calendar/Generated/GTLCalendarConstants.h new file mode 100644 index 0000000..d017711 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarConstants.h @@ -0,0 +1,51 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// Manage your calendars +GTL_EXTERN NSString * const kGTLAuthScopeCalendar; // "https://www.googleapis.com/auth/calendar" +// View your calendars +GTL_EXTERN NSString * const kGTLAuthScopeCalendarReadonly; // "https://www.googleapis.com/auth/calendar.readonly" + +// MinAccessRole +GTL_EXTERN NSString * const kGTLCalendarMinAccessRoleFreeBusyReader; // "freeBusyReader" +GTL_EXTERN NSString * const kGTLCalendarMinAccessRoleOwner; // "owner" +GTL_EXTERN NSString * const kGTLCalendarMinAccessRoleReader; // "reader" +GTL_EXTERN NSString * const kGTLCalendarMinAccessRoleWriter; // "writer" + +// OrderBy +GTL_EXTERN NSString * const kGTLCalendarOrderByStartTime; // "startTime" +GTL_EXTERN NSString * const kGTLCalendarOrderByUpdated; // "updated" diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarConstants.m b/GTL/Source/Services/Calendar/Generated/GTLCalendarConstants.m new file mode 100644 index 0000000..9eae55e --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarConstants.m @@ -0,0 +1,43 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp + +#import "GTLCalendarConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeCalendar = @"https://www.googleapis.com/auth/calendar"; +NSString * const kGTLAuthScopeCalendarReadonly = @"https://www.googleapis.com/auth/calendar.readonly"; + +// MinAccessRole +NSString * const kGTLCalendarMinAccessRoleFreeBusyReader = @"freeBusyReader"; +NSString * const kGTLCalendarMinAccessRoleOwner = @"owner"; +NSString * const kGTLCalendarMinAccessRoleReader = @"reader"; +NSString * const kGTLCalendarMinAccessRoleWriter = @"writer"; + +// OrderBy +NSString * const kGTLCalendarOrderByStartTime = @"startTime"; +NSString * const kGTLCalendarOrderByUpdated = @"updated"; diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarError.h b/GTL/Source/Services/Calendar/Generated/GTLCalendarError.h new file mode 100644 index 0000000..31d1104 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarError.h @@ -0,0 +1,58 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarError.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarError (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCalendarError +// + +@interface GTLCalendarError : GTLObject + +// Domain, or broad category, of the error. +@property (copy) NSString *domain; + +// Specific reason for the error. Some of the possible values are: +// - "groupTooBig" - The group of users requested is too large for a single +// query. +// - "tooManyCalendarsRequested" - The number of calendars requested is too +// large for a single query. +// - "notFound" - The requested resource was not found. +// - "internalError" - The API service has encountered an internal error. +// Additional error types may be added in the future, so clients should +// gracefully handle additional error statuses not included in this list. +@property (copy) NSString *reason; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarError.m b/GTL/Source/Services/Calendar/Generated/GTLCalendarError.m new file mode 100644 index 0000000..d0537b3 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarError.m @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarError.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarError (0 custom class methods, 2 custom properties) + +#import "GTLCalendarError.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarError +// + +@implementation GTLCalendarError +@dynamic domain, reason; +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarEvent.h b/GTL/Source/Services/Calendar/Generated/GTLCalendarEvent.h new file mode 100644 index 0000000..0bcc9a4 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarEvent.h @@ -0,0 +1,371 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarEvent.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarEvent (0 custom class methods, 35 custom properties) +// GTLCalendarEventCreator (0 custom class methods, 4 custom properties) +// GTLCalendarEventExtendedProperties (0 custom class methods, 2 custom properties) +// GTLCalendarEventGadget (0 custom class methods, 8 custom properties) +// GTLCalendarEventOrganizer (0 custom class methods, 4 custom properties) +// GTLCalendarEventReminders (0 custom class methods, 2 custom properties) +// GTLCalendarEventExtendedPropertiesPrivate (0 custom class methods, 0 custom properties) +// GTLCalendarEventExtendedPropertiesShared (0 custom class methods, 0 custom properties) +// GTLCalendarEventGadgetPreferences (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCalendarEventAttendee; +@class GTLCalendarEventCreator; +@class GTLCalendarEventDateTime; +@class GTLCalendarEventExtendedProperties; +@class GTLCalendarEventExtendedPropertiesPrivate; +@class GTLCalendarEventExtendedPropertiesShared; +@class GTLCalendarEventGadget; +@class GTLCalendarEventGadgetPreferences; +@class GTLCalendarEventOrganizer; +@class GTLCalendarEventReminder; +@class GTLCalendarEventReminders; + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEvent +// + +@interface GTLCalendarEvent : GTLObject + +// Whether anyone can invite themselves to the event. Optional. The default is +// False. +@property (retain) NSNumber *anyoneCanAddSelf; // boolValue + +// The attendees of the event. +@property (retain) NSArray *attendees; // of GTLCalendarEventAttendee + +// Whether attendees may have been omitted from the event's representation. When +// retrieving an event, this may be due to a restriction specified by the +// 'maxAttendee' query parameter. When updating an event, this can be used to +// only update the participant's response. Optional. The default is False. +@property (retain) NSNumber *attendeesOmitted; // boolValue + +// The color of the event. This is an ID referring to an entry in the "event" +// section of the colors definition (see the "colors" endpoint). Optional. +@property (copy) NSString *colorId; + +// Creation time of the event (as a RFC 3339 timestamp). Read-only. +@property (retain) GTLDateTime *created; + +// The creator of the event. Read-only. +@property (retain) GTLCalendarEventCreator *creator; + +// Description of the event. Optional. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The (exclusive) end time of the event. For a recurring event, this is the end +// time of the first instance. +@property (retain) GTLCalendarEventDateTime *end; + +// Whether the end time is actually unspecified. An end time is still provided +// for compatibility reasons, even if this attribute is set to True. The default +// is False. +@property (retain) NSNumber *endTimeUnspecified; // boolValue + +// ETag of the resource. +@property (copy) NSString *ETag; + +// Extended properties of the event. +@property (retain) GTLCalendarEventExtendedProperties *extendedProperties; + +// A gadget that extends this event. +@property (retain) GTLCalendarEventGadget *gadget; + +// Whether attendees other than the organizer can invite others to the event. +// Optional. The default is True. +@property (retain) NSNumber *guestsCanInviteOthers; // boolValue + +// Whether attendees other than the organizer can modify the event. Optional. +// The default is False. +@property (retain) NSNumber *guestsCanModify; // boolValue + +// Whether attendees other than the organizer can see who the event's attendees +// are. Optional. The default is True. +@property (retain) NSNumber *guestsCanSeeOtherGuests; // boolValue + +// An absolute link to the Google+ hangout associated with this event. +// Read-only. +@property (copy) NSString *hangoutLink; + +// An absolute link to this event in the Google Calendar Web UI. Read-only. +@property (copy) NSString *htmlLink; + +// Event ID in the iCalendar format. +@property (copy) NSString *iCalUID; + +// Identifier of the event. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Type of the resource ("calendar#event"). +@property (copy) NSString *kind; + +// Geographic location of the event as free-form text. Optional. +@property (copy) NSString *location; + +// Whether this is a locked event copy where no changes can be made to the main +// event fields "summary", "description", "location", "start", "end" or +// "recurrence". The default is False. Read-Only. +@property (retain) NSNumber *locked; // boolValue + +// The organizer of the event. If the organizer is also an attendee, this is +// indicated with a separate entry in 'attendees' with the 'organizer' field set +// to True. To change the organizer, use the "move" operation. Read-only, except +// when importing an event. +@property (retain) GTLCalendarEventOrganizer *organizer; + +// For an instance of a recurring event, this is the time at which this event +// would start according to the recurrence data in the recurring event +// identified by recurringEventId. Immutable. +@property (retain) GTLCalendarEventDateTime *originalStartTime; + +// Whether this is a private event copy where changes are not shared with other +// copies on other calendars. Optional. Immutable. +@property (retain) NSNumber *privateCopy; // boolValue + +// List of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event. This +// field is omitted for single events or instances of recurring events. +@property (retain) NSArray *recurrence; // of NSString + +// For an instance of a recurring event, this is the event ID of the recurring +// event itself. Immutable. +@property (copy) NSString *recurringEventId; + +// Information about the event's reminders for the authenticated user. +@property (retain) GTLCalendarEventReminders *reminders; + +// Sequence number as per iCalendar. +@property (retain) NSNumber *sequence; // intValue + +// The (inclusive) start time of the event. For a recurring event, this is the +// start time of the first instance. +@property (retain) GTLCalendarEventDateTime *start; + +// Status of the event. Optional. Possible values are: +// - "confirmed" - The event is confirmed. This is the default status. +// - "tentative" - The event is tentatively confirmed. +// - "cancelled" - The event is cancelled. +@property (copy) NSString *status; + +// Title of the event. +@property (copy) NSString *summary; + +// Whether the event blocks time on the calendar. Optional. Possible values are: +// - "opaque" - The event blocks time on the calendar. This is the default +// value. +// - "transparent" - The event does not block time on the calendar. +@property (copy) NSString *transparency; + +// Last modification time of the event (as a RFC 3339 timestamp). Read-only. +@property (retain) GTLDateTime *updated; + +// Visibility of the event. Optional. Possible values are: +// - "default" - Uses the default visibility for events on the calendar. This is +// the default value. +// - "public" - The event is public and event details are visible to all readers +// of the calendar. +// - "private" - The event is private and only event attendees may view event +// details. +// - "confidential" - The event is private. This value is provided for +// compatibility reasons. +@property (copy) NSString *visibility; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventCreator +// + +@interface GTLCalendarEventCreator : GTLObject + +// The creator's name, if available. +@property (copy) NSString *displayName; + +// The creator's email address, if available. +@property (copy) NSString *email; + +// The creator's Profile ID, if available. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Whether the creator corresponds to the calendar on which this copy of the +// event appears. Read-only. The default is False. +// Remapped to 'selfProperty' to avoid language reserved word 'self'. +@property (retain) NSNumber *selfProperty; // boolValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventExtendedProperties +// + +@interface GTLCalendarEventExtendedProperties : GTLObject + +// Properties that are private to the copy of the event that appears on this +// calendar. +// Remapped to 'privateProperty' to avoid language reserved word 'private'. +@property (retain) GTLCalendarEventExtendedPropertiesPrivate *privateProperty; + +// Properties that are shared between copies of the event on other attendees' +// calendars. +@property (retain) GTLCalendarEventExtendedPropertiesShared *shared; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventGadget +// + +@interface GTLCalendarEventGadget : GTLObject + +// The gadget's display mode. Optional. Possible values are: +// - "icon" - The gadget displays next to the event's title in the calendar +// view. +// - "chip" - The gadget displays when the event is clicked. +@property (copy) NSString *display; + +// The gadget's height in pixels. Optional. +@property (retain) NSNumber *height; // intValue + +// The gadget's icon URL. +@property (copy) NSString *iconLink; + +// The gadget's URL. +@property (copy) NSString *link; + +// Preferences. +@property (retain) GTLCalendarEventGadgetPreferences *preferences; + +// The gadget's title. +@property (copy) NSString *title; + +// The gadget's type. +@property (copy) NSString *type; + +// The gadget's width in pixels. Optional. +@property (retain) NSNumber *width; // intValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventOrganizer +// + +@interface GTLCalendarEventOrganizer : GTLObject + +// The organizer's name, if available. +@property (copy) NSString *displayName; + +// The organizer's email address, if available. +@property (copy) NSString *email; + +// The organizer's Profile ID, if available. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Whether the organizer corresponds to the calendar on which this copy of the +// event appears. Read-only. The default is False. +// Remapped to 'selfProperty' to avoid language reserved word 'self'. +@property (retain) NSNumber *selfProperty; // boolValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventReminders +// + +@interface GTLCalendarEventReminders : GTLObject + +// If the event doesn't use the default reminders, this lists the reminders +// specific to the event, or, if not set, indicates that no reminders are set +// for this event. +@property (retain) NSArray *overrides; // of GTLCalendarEventReminder + +// Whether the default reminders of the calendar apply to the event. +@property (retain) NSNumber *useDefault; // boolValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventExtendedPropertiesPrivate +// + +@interface GTLCalendarEventExtendedPropertiesPrivate : GTLObject +// This object is documented as having more properties that are NSString. Use +// -additionalJSONKeys and -additionalPropertyForName: to get the list of +// properties and then fetch them; or -additionalProperties to fetch them all at +// once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventExtendedPropertiesShared +// + +@interface GTLCalendarEventExtendedPropertiesShared : GTLObject +// This object is documented as having more properties that are NSString. Use +// -additionalJSONKeys and -additionalPropertyForName: to get the list of +// properties and then fetch them; or -additionalProperties to fetch them all at +// once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventGadgetPreferences +// + +@interface GTLCalendarEventGadgetPreferences : GTLObject +// This object is documented as having more properties that are NSString. Use +// -additionalJSONKeys and -additionalPropertyForName: to get the list of +// properties and then fetch them; or -additionalProperties to fetch them all at +// once. +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarEvent.m b/GTL/Source/Services/Calendar/Generated/GTLCalendarEvent.m new file mode 100644 index 0000000..1b3cea8 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarEvent.m @@ -0,0 +1,210 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarEvent.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarEvent (0 custom class methods, 35 custom properties) +// GTLCalendarEventCreator (0 custom class methods, 4 custom properties) +// GTLCalendarEventExtendedProperties (0 custom class methods, 2 custom properties) +// GTLCalendarEventGadget (0 custom class methods, 8 custom properties) +// GTLCalendarEventOrganizer (0 custom class methods, 4 custom properties) +// GTLCalendarEventReminders (0 custom class methods, 2 custom properties) +// GTLCalendarEventExtendedPropertiesPrivate (0 custom class methods, 0 custom properties) +// GTLCalendarEventExtendedPropertiesShared (0 custom class methods, 0 custom properties) +// GTLCalendarEventGadgetPreferences (0 custom class methods, 0 custom properties) + +#import "GTLCalendarEvent.h" + +#import "GTLCalendarEventAttendee.h" +#import "GTLCalendarEventDateTime.h" +#import "GTLCalendarEventReminder.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEvent +// + +@implementation GTLCalendarEvent +@dynamic anyoneCanAddSelf, attendees, attendeesOmitted, colorId, created, + creator, descriptionProperty, end, endTimeUnspecified, ETag, + extendedProperties, gadget, guestsCanInviteOthers, guestsCanModify, + guestsCanSeeOtherGuests, hangoutLink, htmlLink, iCalUID, identifier, + kind, location, locked, organizer, originalStartTime, privateCopy, + recurrence, recurringEventId, reminders, sequence, start, status, + summary, transparency, updated, visibility; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLCalendarEventAttendee class], @"attendees", + [NSString class], @"recurrence", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"calendar#event"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventCreator +// + +@implementation GTLCalendarEventCreator +@dynamic displayName, email, identifier, selfProperty; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"id", @"identifier", + @"self", @"selfProperty", + nil]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventExtendedProperties +// + +@implementation GTLCalendarEventExtendedProperties +@dynamic privateProperty, shared; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"private" + forKey:@"privateProperty"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventGadget +// + +@implementation GTLCalendarEventGadget +@dynamic display, height, iconLink, link, preferences, title, type, width; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventOrganizer +// + +@implementation GTLCalendarEventOrganizer +@dynamic displayName, email, identifier, selfProperty; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"id", @"identifier", + @"self", @"selfProperty", + nil]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventReminders +// + +@implementation GTLCalendarEventReminders +@dynamic overrides, useDefault; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLCalendarEventReminder class] + forKey:@"overrides"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventExtendedPropertiesPrivate +// + +@implementation GTLCalendarEventExtendedPropertiesPrivate + ++ (Class)classForAdditionalProperties { + return [NSString class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventExtendedPropertiesShared +// + +@implementation GTLCalendarEventExtendedPropertiesShared + ++ (Class)classForAdditionalProperties { + return [NSString class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventGadgetPreferences +// + +@implementation GTLCalendarEventGadgetPreferences + ++ (Class)classForAdditionalProperties { + return [NSString class]; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarEventAttendee.h b/GTL/Source/Services/Calendar/Generated/GTLCalendarEventAttendee.h new file mode 100644 index 0000000..2c61653 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarEventAttendee.h @@ -0,0 +1,83 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarEventAttendee.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarEventAttendee (0 custom class methods, 10 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventAttendee +// + +@interface GTLCalendarEventAttendee : GTLObject + +// Number of additional guests. Optional. The default is 0. +@property (retain) NSNumber *additionalGuests; // intValue + +// The attendee's response comment. Optional. +@property (copy) NSString *comment; + +// The attendee's name, if available. Optional. +@property (copy) NSString *displayName; + +// The attendee's email address, if available. This field must be present when +// adding an attendee. +@property (copy) NSString *email; + +// The attendee's Profile ID, if available. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Whether this is an optional attendee. Optional. The default is False. +@property (retain) NSNumber *optional; // boolValue + +// Whether the attendee is the organizer of the event. Read-only. The default is +// False. +@property (retain) NSNumber *organizer; // boolValue + +// Whether the attendee is a resource. Read-only. The default is False. +@property (retain) NSNumber *resource; // boolValue + +// The attendee's response status. Possible values are: +// - "needsAction" - The attendee has not responded to the invitation. +// - "declined" - The attendee has declined the invitation. +// - "tentative" - The attendee has tentatively accepted the invitation. +// - "accepted" - The attendee has accepted the invitation. +@property (copy) NSString *responseStatus; + +// Whether this entry represents the calendar on which this copy of the event +// appears. Read-only. The default is False. +// Remapped to 'selfProperty' to avoid language reserved word 'self'. +@property (retain) NSNumber *selfProperty; // boolValue + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarEventAttendee.m b/GTL/Source/Services/Calendar/Generated/GTLCalendarEventAttendee.m new file mode 100644 index 0000000..f13fa5f --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarEventAttendee.m @@ -0,0 +1,51 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarEventAttendee.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarEventAttendee (0 custom class methods, 10 custom properties) + +#import "GTLCalendarEventAttendee.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventAttendee +// + +@implementation GTLCalendarEventAttendee +@dynamic additionalGuests, comment, displayName, email, identifier, optional, + organizer, resource, responseStatus, selfProperty; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"id", @"identifier", + @"self", @"selfProperty", + nil]; + return map; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarEventDateTime.h b/GTL/Source/Services/Calendar/Generated/GTLCalendarEventDateTime.h new file mode 100644 index 0000000..80532b6 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarEventDateTime.h @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarEventDateTime.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarEventDateTime (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventDateTime +// + +@interface GTLCalendarEventDateTime : GTLObject + +// The date, in the format "yyyy-mm-dd", if this is an all-day event. +@property (retain) GTLDateTime *date; // Date only (yyyy-mm-dd) + +// The time, as a combined date-time value (formatted according to RFC 3339). A +// time zone offset is required unless a time zone is explicitly specified in +// 'timeZone'. +@property (retain) GTLDateTime *dateTime; + +// The name of the time zone in which the time is specified (e.g. +// "Europe/Zurich"). Optional. The default is the time zone of the calendar. +@property (copy) NSString *timeZone; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarEventDateTime.m b/GTL/Source/Services/Calendar/Generated/GTLCalendarEventDateTime.m new file mode 100644 index 0000000..758c682 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarEventDateTime.m @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarEventDateTime.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarEventDateTime (0 custom class methods, 3 custom properties) + +#import "GTLCalendarEventDateTime.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventDateTime +// + +@implementation GTLCalendarEventDateTime +@dynamic date, dateTime, timeZone; +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarEventReminder.h b/GTL/Source/Services/Calendar/Generated/GTLCalendarEventReminder.h new file mode 100644 index 0000000..c7dc04b --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarEventReminder.h @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarEventReminder.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarEventReminder (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventReminder +// + +@interface GTLCalendarEventReminder : GTLObject + +// The method used by this reminder. Possible values are: +// - "email" - Reminders are sent via email. +// - "sms" - Reminders are sent via SMS. +// - "popup" - Reminders are sent via a UI popup. +@property (copy) NSString *method; + +// Number of minutes before the start of the event when the reminder should +// trigger. +@property (retain) NSNumber *minutes; // intValue + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarEventReminder.m b/GTL/Source/Services/Calendar/Generated/GTLCalendarEventReminder.m new file mode 100644 index 0000000..12dd257 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarEventReminder.m @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarEventReminder.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarEventReminder (0 custom class methods, 2 custom properties) + +#import "GTLCalendarEventReminder.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEventReminder +// + +@implementation GTLCalendarEventReminder +@dynamic method, minutes; +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarEvents.h b/GTL/Source/Services/Calendar/Generated/GTLCalendarEvents.h new file mode 100644 index 0000000..f9945fe --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarEvents.h @@ -0,0 +1,94 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarEvents.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarEvents (0 custom class methods, 10 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCalendarEvent; +@class GTLCalendarEventReminder; + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEvents +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLCalendarEvents : GTLCollectionObject + +// The user's access role for this calendar. Read-only. Possible values are: +// - "none" - The user has no access. +// - "freeBusyReader" - The user has read access to free/busy information. +// - "reader" - The user has read access to the calendar. Private events will +// appear to users with reader access, but event details will be hidden. +// - "writer" - The user has read and write access to the calendar. Private +// events will appear to users with writer access, and event details will be +// visible. +// - "owner" - The user has ownership of the calendar. This role has all of the +// permissions of the writer role with the additional ability to see and +// manipulate ACLs. +@property (copy) NSString *accessRole; + +// The default reminders on the calendar for the authenticated user. These +// reminders apply to all events on this calendar that do not explicitly +// override them (i.e. do not have 'reminders.useDefault' set to 'true'). +@property (retain) NSArray *defaultReminders; // of GTLCalendarEventReminder + +// Description of the calendar. Read-only. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// ETag of the collection. +@property (copy) NSString *ETag; + +// List of events on the calendar. +@property (retain) NSArray *items; // of GTLCalendarEvent + +// Type of the collection ("calendar#events"). +@property (copy) NSString *kind; + +// Token used to access the next page of this result. Omitted if no further +// results are available. +@property (copy) NSString *nextPageToken; + +// Title of the calendar. Read-only. +@property (copy) NSString *summary; + +// The time zone of the calendar. Read-only. +@property (copy) NSString *timeZone; + +// Last modification time of the calendar (as a RFC 3339 timestamp). Read-only. +@property (retain) GTLDateTime *updated; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarEvents.m b/GTL/Source/Services/Calendar/Generated/GTLCalendarEvents.m new file mode 100644 index 0000000..d328474 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarEvents.m @@ -0,0 +1,67 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarEvents.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarEvents (0 custom class methods, 10 custom properties) + +#import "GTLCalendarEvents.h" + +#import "GTLCalendarEvent.h" +#import "GTLCalendarEventReminder.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarEvents +// + +@implementation GTLCalendarEvents +@dynamic accessRole, defaultReminders, descriptionProperty, ETag, items, kind, + nextPageToken, summary, timeZone, updated; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"etag", @"ETag", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLCalendarEventReminder class], @"defaultReminders", + [GTLCalendarEvent class], @"items", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"calendar#events"]; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarFreeBusyCalendar.h b/GTL/Source/Services/Calendar/Generated/GTLCalendarFreeBusyCalendar.h new file mode 100644 index 0000000..2376e71 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarFreeBusyCalendar.h @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarFreeBusyCalendar.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarFreeBusyCalendar (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCalendarError; +@class GTLCalendarTimePeriod; + +// ---------------------------------------------------------------------------- +// +// GTLCalendarFreeBusyCalendar +// + +@interface GTLCalendarFreeBusyCalendar : GTLObject + +// List of time ranges during which this calendar should be regarded as busy. +@property (retain) NSArray *busy; // of GTLCalendarTimePeriod + +// Optional error(s) (if computation for the calendar failed). +@property (retain) NSArray *errors; // of GTLCalendarError + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarFreeBusyCalendar.m b/GTL/Source/Services/Calendar/Generated/GTLCalendarFreeBusyCalendar.m new file mode 100644 index 0000000..2ce48c6 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarFreeBusyCalendar.m @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarFreeBusyCalendar.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarFreeBusyCalendar (0 custom class methods, 2 custom properties) + +#import "GTLCalendarFreeBusyCalendar.h" + +#import "GTLCalendarError.h" +#import "GTLCalendarTimePeriod.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarFreeBusyCalendar +// + +@implementation GTLCalendarFreeBusyCalendar +@dynamic busy, errors; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLCalendarTimePeriod class], @"busy", + [GTLCalendarError class], @"errors", + nil]; + return map; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarFreeBusyGroup.h b/GTL/Source/Services/Calendar/Generated/GTLCalendarFreeBusyGroup.h new file mode 100644 index 0000000..dafef3d --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarFreeBusyGroup.h @@ -0,0 +1,52 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarFreeBusyGroup.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarFreeBusyGroup (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCalendarError; + +// ---------------------------------------------------------------------------- +// +// GTLCalendarFreeBusyGroup +// + +@interface GTLCalendarFreeBusyGroup : GTLObject + +// List of calendars' identifiers within a group. +@property (retain) NSArray *calendars; // of NSString + +// Optional error(s) (if computation for the group failed). +@property (retain) NSArray *errors; // of GTLCalendarError + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarFreeBusyGroup.m b/GTL/Source/Services/Calendar/Generated/GTLCalendarFreeBusyGroup.m new file mode 100644 index 0000000..7736f23 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarFreeBusyGroup.m @@ -0,0 +1,52 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarFreeBusyGroup.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarFreeBusyGroup (0 custom class methods, 2 custom properties) + +#import "GTLCalendarFreeBusyGroup.h" + +#import "GTLCalendarError.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarFreeBusyGroup +// + +@implementation GTLCalendarFreeBusyGroup +@dynamic calendars, errors; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"calendars", + [GTLCalendarError class], @"errors", + nil]; + return map; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarFreeBusyRequestItem.h b/GTL/Source/Services/Calendar/Generated/GTLCalendarFreeBusyRequestItem.h new file mode 100644 index 0000000..860b4eb --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarFreeBusyRequestItem.h @@ -0,0 +1,48 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarFreeBusyRequestItem.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarFreeBusyRequestItem (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCalendarFreeBusyRequestItem +// + +@interface GTLCalendarFreeBusyRequestItem : GTLObject + +// The identifier of a calendar or a group. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarFreeBusyRequestItem.m b/GTL/Source/Services/Calendar/Generated/GTLCalendarFreeBusyRequestItem.m new file mode 100644 index 0000000..6420c37 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarFreeBusyRequestItem.m @@ -0,0 +1,48 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarFreeBusyRequestItem.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarFreeBusyRequestItem (0 custom class methods, 1 custom properties) + +#import "GTLCalendarFreeBusyRequestItem.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarFreeBusyRequestItem +// + +@implementation GTLCalendarFreeBusyRequestItem +@dynamic identifier; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarFreeBusyResponse.h b/GTL/Source/Services/Calendar/Generated/GTLCalendarFreeBusyResponse.h new file mode 100644 index 0000000..22b2a16 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarFreeBusyResponse.h @@ -0,0 +1,92 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarFreeBusyResponse.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarFreeBusyResponse (0 custom class methods, 5 custom properties) +// GTLCalendarFreeBusyResponseCalendars (0 custom class methods, 0 custom properties) +// GTLCalendarFreeBusyResponseGroups (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCalendarFreeBusyCalendar; +@class GTLCalendarFreeBusyGroup; +@class GTLCalendarFreeBusyResponseCalendars; +@class GTLCalendarFreeBusyResponseGroups; + +// ---------------------------------------------------------------------------- +// +// GTLCalendarFreeBusyResponse +// + +@interface GTLCalendarFreeBusyResponse : GTLObject + +// List of free/busy information for calendars. +@property (retain) GTLCalendarFreeBusyResponseCalendars *calendars; + +// Expansion of groups. +@property (retain) GTLCalendarFreeBusyResponseGroups *groups; + +// Type of the resource ("calendar#freeBusy"). +@property (copy) NSString *kind; + +// The end of the interval. +@property (retain) GTLDateTime *timeMax; + +// The start of the interval. +@property (retain) GTLDateTime *timeMin; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarFreeBusyResponseCalendars +// + +@interface GTLCalendarFreeBusyResponseCalendars : GTLObject +// This object is documented as having more properties that are +// GTLCalendarFreeBusyCalendar. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarFreeBusyResponseGroups +// + +@interface GTLCalendarFreeBusyResponseGroups : GTLObject +// This object is documented as having more properties that are +// GTLCalendarFreeBusyGroup. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarFreeBusyResponse.m b/GTL/Source/Services/Calendar/Generated/GTLCalendarFreeBusyResponse.m new file mode 100644 index 0000000..c609b34 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarFreeBusyResponse.m @@ -0,0 +1,78 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarFreeBusyResponse.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarFreeBusyResponse (0 custom class methods, 5 custom properties) +// GTLCalendarFreeBusyResponseCalendars (0 custom class methods, 0 custom properties) +// GTLCalendarFreeBusyResponseGroups (0 custom class methods, 0 custom properties) + +#import "GTLCalendarFreeBusyResponse.h" + +#import "GTLCalendarFreeBusyCalendar.h" +#import "GTLCalendarFreeBusyGroup.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarFreeBusyResponse +// + +@implementation GTLCalendarFreeBusyResponse +@dynamic calendars, groups, kind, timeMax, timeMin; + ++ (void)load { + [self registerObjectClassForKind:@"calendar#freeBusy"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarFreeBusyResponseCalendars +// + +@implementation GTLCalendarFreeBusyResponseCalendars + ++ (Class)classForAdditionalProperties { + return [GTLCalendarFreeBusyCalendar class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLCalendarFreeBusyResponseGroups +// + +@implementation GTLCalendarFreeBusyResponseGroups + ++ (Class)classForAdditionalProperties { + return [GTLCalendarFreeBusyGroup class]; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarSetting.h b/GTL/Source/Services/Calendar/Generated/GTLCalendarSetting.h new file mode 100644 index 0000000..1069a40 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarSetting.h @@ -0,0 +1,58 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarSetting.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarSetting (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCalendarSetting +// + +@interface GTLCalendarSetting : GTLObject + +// ETag of the resource. +@property (copy) NSString *ETag; + +// Name of the user setting. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Type of the resource ("calendar#setting"). +@property (copy) NSString *kind; + +// Value of the user setting. The format of the value depends on the ID of the +// setting. +@property (copy) NSString *value; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarSetting.m b/GTL/Source/Services/Calendar/Generated/GTLCalendarSetting.m new file mode 100644 index 0000000..12f3c7b --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarSetting.m @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarSetting.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarSetting (0 custom class methods, 4 custom properties) + +#import "GTLCalendarSetting.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarSetting +// + +@implementation GTLCalendarSetting +@dynamic ETag, identifier, kind, value; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"calendar#setting"]; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarSettings.h b/GTL/Source/Services/Calendar/Generated/GTLCalendarSettings.h new file mode 100644 index 0000000..eb5bc81 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarSettings.h @@ -0,0 +1,58 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarSettings.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarSettings (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCalendarSetting; + +// ---------------------------------------------------------------------------- +// +// GTLCalendarSettings +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLCalendarSettings : GTLCollectionObject + +// Etag of the collection. +@property (copy) NSString *ETag; + +// List of user settings. +@property (retain) NSArray *items; // of GTLCalendarSetting + +// Type of the collection ("calendar#settings"). +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarSettings.m b/GTL/Source/Services/Calendar/Generated/GTLCalendarSettings.m new file mode 100644 index 0000000..1cd828a --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarSettings.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarSettings.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarSettings (0 custom class methods, 3 custom properties) + +#import "GTLCalendarSettings.h" + +#import "GTLCalendarSetting.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarSettings +// + +@implementation GTLCalendarSettings +@dynamic ETag, items, kind; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLCalendarSetting class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"calendar#settings"]; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarTimePeriod.h b/GTL/Source/Services/Calendar/Generated/GTLCalendarTimePeriod.h new file mode 100644 index 0000000..7b6ce5b --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarTimePeriod.h @@ -0,0 +1,50 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarTimePeriod.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarTimePeriod (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCalendarTimePeriod +// + +@interface GTLCalendarTimePeriod : GTLObject + +// The (exclusive) end of the time period. +@property (retain) GTLDateTime *end; + +// The (inclusive) start of the time period. +@property (retain) GTLDateTime *start; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendarTimePeriod.m b/GTL/Source/Services/Calendar/Generated/GTLCalendarTimePeriod.m new file mode 100644 index 0000000..2e6f69c --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendarTimePeriod.m @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendarTimePeriod.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLCalendarTimePeriod (0 custom class methods, 2 custom properties) + +#import "GTLCalendarTimePeriod.h" + +// ---------------------------------------------------------------------------- +// +// GTLCalendarTimePeriod +// + +@implementation GTLCalendarTimePeriod +@dynamic end, start; +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLCalendar_Sources.m b/GTL/Source/Services/Calendar/Generated/GTLCalendar_Sources.m new file mode 100644 index 0000000..b4095ac --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLCalendar_Sources.m @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCalendar_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp + +#import "GTLCalendarConstants.m" + +#import "GTLCalendarAcl.m" +#import "GTLCalendarAclRule.m" +#import "GTLCalendarCalendar.m" +#import "GTLCalendarCalendarList.m" +#import "GTLCalendarCalendarListEntry.m" +#import "GTLCalendarColorDefinition.m" +#import "GTLCalendarColors.m" +#import "GTLCalendarError.m" +#import "GTLCalendarEvent.m" +#import "GTLCalendarEventAttendee.m" +#import "GTLCalendarEventDateTime.m" +#import "GTLCalendarEventReminder.m" +#import "GTLCalendarEvents.m" +#import "GTLCalendarFreeBusyCalendar.m" +#import "GTLCalendarFreeBusyGroup.m" +#import "GTLCalendarFreeBusyRequestItem.m" +#import "GTLCalendarFreeBusyResponse.m" +#import "GTLCalendarSetting.m" +#import "GTLCalendarSettings.m" +#import "GTLCalendarTimePeriod.m" + +#import "GTLQueryCalendar.m" +#import "GTLServiceCalendar.m" diff --git a/GTL/Source/Services/Calendar/Generated/GTLQueryCalendar.h b/GTL/Source/Services/Calendar/Generated/GTLQueryCalendar.h new file mode 100644 index 0000000..33ed552 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLQueryCalendar.h @@ -0,0 +1,584 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryCalendar.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLQueryCalendar (32 custom class methods, 29 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLCalendarAclRule; +@class GTLCalendarCalendar; +@class GTLCalendarCalendarListEntry; +@class GTLCalendarEvent; +@class GTLCalendarFreeBusyRequestItem; + +@interface GTLQueryCalendar : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (assign) BOOL alwaysIncludeEmail; +@property (assign) NSInteger calendarExpansionMax; +@property (copy) NSString *calendarId; +@property (assign) BOOL colorRgbFormat; +@property (copy) NSString *destination; +@property (copy) NSString *eventId; +@property (assign) NSInteger groupExpansionMax; +@property (copy) NSString *iCalUID; +@property (retain) NSArray *items; // of GTLCalendarFreeBusyRequestItem +@property (assign) NSInteger maxAttendees; +@property (assign) NSInteger maxResults; +@property (copy) NSString *minAccessRole; +@property (copy) NSString *orderBy; +@property (copy) NSString *originalStart; +@property (copy) NSString *pageToken; +@property (copy) NSString *q; +@property (copy) NSString *ruleId; +@property (assign) BOOL sendNotifications; +@property (copy) NSString *setting; +@property (assign) BOOL showDeleted; +@property (assign) BOOL showHidden; +@property (assign) BOOL showHiddenInvitations; +@property (assign) BOOL singleEvents; +@property (copy) NSString *text; +@property (retain) GTLDateTime *timeMax; +@property (retain) GTLDateTime *timeMin; +@property (copy) NSString *timeZone; +@property (retain) GTLDateTime *updatedMin; + +#pragma mark - +#pragma mark "acl" methods +// These create a GTLQueryCalendar object. + +// Method: calendar.acl.delete +// Deletes an access control rule. +// Required: +// calendarId: Calendar identifier. +// ruleId: ACL rule identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar ++ (id)queryForAclDeleteWithCalendarId:(NSString *)calendarId + ruleId:(NSString *)ruleId; + +// Method: calendar.acl.get +// Returns an access control rule. +// Required: +// calendarId: Calendar identifier. +// ruleId: ACL rule identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// kGTLAuthScopeCalendarReadonly +// Fetches a GTLCalendarAclRule. ++ (id)queryForAclGetWithCalendarId:(NSString *)calendarId + ruleId:(NSString *)ruleId; + +// Method: calendar.acl.insert +// Creates an access control rule. +// Required: +// calendarId: Calendar identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarAclRule. ++ (id)queryForAclInsertWithObject:(GTLCalendarAclRule *)object + calendarId:(NSString *)calendarId; + +// Method: calendar.acl.list +// Returns the rules in the access control list for the calendar. +// Required: +// calendarId: Calendar identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarAcl. ++ (id)queryForAclListWithCalendarId:(NSString *)calendarId; + +// Method: calendar.acl.patch +// Updates an access control rule. This method supports patch semantics. +// Required: +// calendarId: Calendar identifier. +// ruleId: ACL rule identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarAclRule. ++ (id)queryForAclPatchWithObject:(GTLCalendarAclRule *)object + calendarId:(NSString *)calendarId + ruleId:(NSString *)ruleId; + +// Method: calendar.acl.update +// Updates an access control rule. +// Required: +// calendarId: Calendar identifier. +// ruleId: ACL rule identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarAclRule. ++ (id)queryForAclUpdateWithObject:(GTLCalendarAclRule *)object + calendarId:(NSString *)calendarId + ruleId:(NSString *)ruleId; + +#pragma mark - +#pragma mark "calendarList" methods +// These create a GTLQueryCalendar object. + +// Method: calendar.calendarList.delete +// Deletes an entry on the user's calendar list. +// Required: +// calendarId: Calendar identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar ++ (id)queryForCalendarListDeleteWithCalendarId:(NSString *)calendarId; + +// Method: calendar.calendarList.get +// Returns an entry on the user's calendar list. +// Required: +// calendarId: Calendar identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// kGTLAuthScopeCalendarReadonly +// Fetches a GTLCalendarCalendarListEntry. ++ (id)queryForCalendarListGetWithCalendarId:(NSString *)calendarId; + +// Method: calendar.calendarList.insert +// Adds an entry to the user's calendar list. +// Optional: +// colorRgbFormat: Whether to use the 'frontendColor' and 'backgroundColor' +// fields to write the calendar colors (RGB). If this feature is used, the +// index-based 'color' field will be set to the best matching option +// automatically. Optional. The default is False. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarCalendarListEntry. ++ (id)queryForCalendarListInsertWithObject:(GTLCalendarCalendarListEntry *)object; + +// Method: calendar.calendarList.list +// Returns entries on the user's calendar list. +// Optional: +// maxResults: Maximum number of entries returned on one result page. +// Optional. +// minAccessRole: The minimum access role for the user in the returned +// entires. Optional. The default is no restriction. +// kGTLCalendarMinAccessRoleFreeBusyReader: The user can read free/busy +// information. +// kGTLCalendarMinAccessRoleOwner: The user can read and modify events and +// access control lists. +// kGTLCalendarMinAccessRoleReader: The user can read events that are not +// private. +// kGTLCalendarMinAccessRoleWriter: The user can read and modify events. +// pageToken: Token specifying which result page to return. Optional. +// showHidden: Whether to show hidden entries. Optional. The default is False. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// kGTLAuthScopeCalendarReadonly +// Fetches a GTLCalendarCalendarList. ++ (id)queryForCalendarListList; + +// Method: calendar.calendarList.patch +// Updates an entry on the user's calendar list. This method supports patch +// semantics. +// Required: +// calendarId: Calendar identifier. +// Optional: +// colorRgbFormat: Whether to use the 'frontendColor' and 'backgroundColor' +// fields to write the calendar colors (RGB). If this feature is used, the +// index-based 'color' field will be set to the best matching option +// automatically. Optional. The default is False. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarCalendarListEntry. ++ (id)queryForCalendarListPatchWithObject:(GTLCalendarCalendarListEntry *)object + calendarId:(NSString *)calendarId; + +// Method: calendar.calendarList.update +// Updates an entry on the user's calendar list. +// Required: +// calendarId: Calendar identifier. +// Optional: +// colorRgbFormat: Whether to use the 'frontendColor' and 'backgroundColor' +// fields to write the calendar colors (RGB). If this feature is used, the +// index-based 'color' field will be set to the best matching option +// automatically. Optional. The default is False. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarCalendarListEntry. ++ (id)queryForCalendarListUpdateWithObject:(GTLCalendarCalendarListEntry *)object + calendarId:(NSString *)calendarId; + +#pragma mark - +#pragma mark "calendars" methods +// These create a GTLQueryCalendar object. + +// Method: calendar.calendars.clear +// Clears a primary calendar. This operation deletes all data associated with +// the primary calendar of an account and cannot be undone. +// Required: +// calendarId: Calendar identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar ++ (id)queryForCalendarsClearWithCalendarId:(NSString *)calendarId; + +// Method: calendar.calendars.delete +// Deletes a secondary calendar. +// Required: +// calendarId: Calendar identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar ++ (id)queryForCalendarsDeleteWithCalendarId:(NSString *)calendarId; + +// Method: calendar.calendars.get +// Returns metadata for a calendar. +// Required: +// calendarId: Calendar identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// kGTLAuthScopeCalendarReadonly +// Fetches a GTLCalendarCalendar. ++ (id)queryForCalendarsGetWithCalendarId:(NSString *)calendarId; + +// Method: calendar.calendars.insert +// Creates a secondary calendar. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarCalendar. ++ (id)queryForCalendarsInsertWithObject:(GTLCalendarCalendar *)object; + +// Method: calendar.calendars.patch +// Updates metadata for a calendar. This method supports patch semantics. +// Required: +// calendarId: Calendar identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarCalendar. ++ (id)queryForCalendarsPatchWithObject:(GTLCalendarCalendar *)object + calendarId:(NSString *)calendarId; + +// Method: calendar.calendars.update +// Updates metadata for a calendar. +// Required: +// calendarId: Calendar identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarCalendar. ++ (id)queryForCalendarsUpdateWithObject:(GTLCalendarCalendar *)object + calendarId:(NSString *)calendarId; + +#pragma mark - +#pragma mark "colors" methods +// These create a GTLQueryCalendar object. + +// Method: calendar.colors.get +// Returns the color definitions for calendars and events. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// kGTLAuthScopeCalendarReadonly +// Fetches a GTLCalendarColors. ++ (id)queryForColorsGet; + +#pragma mark - +#pragma mark "events" methods +// These create a GTLQueryCalendar object. + +// Method: calendar.events.delete +// Deletes an event. +// Required: +// calendarId: Calendar identifier. +// eventId: Event identifier. +// Optional: +// sendNotifications: Whether to send notifications about the deletion of the +// event. Optional. The default is False. +// Authorization scope(s): +// kGTLAuthScopeCalendar ++ (id)queryForEventsDeleteWithCalendarId:(NSString *)calendarId + eventId:(NSString *)eventId; + +// Method: calendar.events.get +// Returns an event. +// Required: +// calendarId: Calendar identifier. +// eventId: Event identifier. +// Optional: +// alwaysIncludeEmail: Whether to always include a value in the "email" field +// for the organizer, creator and attendees, even if no real email is +// available (i.e. a generated, non-working value will be provided). The use +// of this option is discouraged and should only be used by clients which +// cannot handle the absence of an email address value in the mentioned +// places. Optional. The default is False. +// maxAttendees: The maximum number of attendees to include in the response. +// If there are more than the specified number of attendees, only the +// participant is returned. Optional. +// timeZone: Time zone used in the response. Optional. The default is the time +// zone of the calendar. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// kGTLAuthScopeCalendarReadonly +// Fetches a GTLCalendarEvent. ++ (id)queryForEventsGetWithCalendarId:(NSString *)calendarId + eventId:(NSString *)eventId; + +// Method: calendar.events.import +// Imports an event. +// Required: +// calendarId: Calendar identifier. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarEvent. ++ (id)queryForEventsImportWithObject:(GTLCalendarEvent *)object + calendarId:(NSString *)calendarId; + +// Method: calendar.events.insert +// Creates an event. +// Required: +// calendarId: Calendar identifier. +// Optional: +// maxAttendees: The maximum number of attendees to include in the response. +// If there are more than the specified number of attendees, only the +// participant is returned. Optional. +// sendNotifications: Whether to send notifications about the creation of the +// new event. Optional. The default is False. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarEvent. ++ (id)queryForEventsInsertWithObject:(GTLCalendarEvent *)object + calendarId:(NSString *)calendarId; + +// Method: calendar.events.instances +// Returns instances of the specified recurring event. +// Required: +// calendarId: Calendar identifier. +// eventId: Recurring event identifier. +// Optional: +// alwaysIncludeEmail: Whether to always include a value in the "email" field +// for the organizer, creator and attendees, even if no real email is +// available (i.e. a generated, non-working value will be provided). The use +// of this option is discouraged and should only be used by clients which +// cannot handle the absence of an email address value in the mentioned +// places. Optional. The default is False. +// maxAttendees: The maximum number of attendees to include in the response. +// If there are more than the specified number of attendees, only the +// participant is returned. Optional. +// maxResults: Maximum number of events returned on one result page. Optional. +// originalStart: The original start time of the instance in the result. +// Optional. +// pageToken: Token specifying which result page to return. Optional. +// showDeleted: Whether to include deleted events (with 'eventStatus' equals +// 'cancelled') in the result. Optional. The default is False. +// timeZone: Time zone used in the response. Optional. The default is the time +// zone of the calendar. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// kGTLAuthScopeCalendarReadonly +// Fetches a GTLCalendarEvents. ++ (id)queryForEventsInstancesWithCalendarId:(NSString *)calendarId + eventId:(NSString *)eventId; + +// Method: calendar.events.list +// Returns events on the specified calendar. +// Required: +// calendarId: Calendar identifier. +// Optional: +// alwaysIncludeEmail: Whether to always include a value in the "email" field +// for the organizer, creator and attendees, even if no real email is +// available (i.e. a generated, non-working value will be provided). The use +// of this option is discouraged and should only be used by clients which +// cannot handle the absence of an email address value in the mentioned +// places. Optional. The default is False. +// iCalUID: Specifies iCalendar UID (iCalUID) of events to be included in the +// response. Optional. +// maxAttendees: The maximum number of attendees to include in the response. +// If there are more than the specified number of attendees, only the +// participant is returned. Optional. +// maxResults: Maximum number of events returned on one result page. Optional. +// orderBy: The order of the events returned in the result. Optional. The +// default is an unspecified, stable order. +// kGTLCalendarOrderByStartTime: Order by the start date/time (ascending). +// This is only available when querying single events (i.e. the parameter +// "singleEvents" is True) +// kGTLCalendarOrderByUpdated: Order by last modification time (ascending). +// pageToken: Token specifying which result page to return. Optional. +// q: Free text search terms to find events that match these terms in any +// field, except for extended properties. Optional. +// showDeleted: Whether to include deleted single events (with 'status' equals +// 'cancelled') in the result. Cancelled instances of recurring events will +// still be included if 'singleEvents' is False. Optional. The default is +// False. +// showHiddenInvitations: Whether to include hidden invitations in the result. +// Optional. The default is False. +// singleEvents: Whether to expand recurring events into instances and only +// return single one-off events and instances of recurring events, but not +// the underlying recurring events themselves. Optional. The default is +// False. +// timeMax: Upper bound (exclusive) for an event's start time to filter by. +// Optional. The default is not to filter by start time. +// timeMin: Lower bound (inclusive) for an event's end time to filter by. +// Optional. The default is not to filter by end time. +// timeZone: Time zone used in the response. Optional. The default is the time +// zone of the calendar. +// updatedMin: Lower bound for an event's last modification time (as a RFC +// 3339 timestamp) to filter by. Optional. The default is not to filter by +// last modification time. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// kGTLAuthScopeCalendarReadonly +// Fetches a GTLCalendarEvents. ++ (id)queryForEventsListWithCalendarId:(NSString *)calendarId; + +// Method: calendar.events.move +// Moves an event to another calendar, i.e. changes an event's organizer. +// Required: +// calendarId: Calendar identifier of the source calendar where the event +// currently is on. +// eventId: Event identifier. +// destination: Calendar identifier of the target calendar where the event is +// to be moved to. +// Optional: +// sendNotifications: Whether to send notifications about the change of the +// event's organizer. Optional. The default is False. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarEvent. ++ (id)queryForEventsMoveWithCalendarId:(NSString *)calendarId + eventId:(NSString *)eventId + destination:(NSString *)destination; + +// Method: calendar.events.patch +// Updates an event. This method supports patch semantics. +// Required: +// calendarId: Calendar identifier. +// eventId: Event identifier. +// Optional: +// alwaysIncludeEmail: Whether to always include a value in the "email" field +// for the organizer, creator and attendees, even if no real email is +// available (i.e. a generated, non-working value will be provided). The use +// of this option is discouraged and should only be used by clients which +// cannot handle the absence of an email address value in the mentioned +// places. Optional. The default is False. +// maxAttendees: The maximum number of attendees to include in the response. +// If there are more than the specified number of attendees, only the +// participant is returned. Optional. +// sendNotifications: Whether to send notifications about the event update +// (e.g. attendee's responses, title changes, etc.). Optional. The default +// is False. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarEvent. ++ (id)queryForEventsPatchWithObject:(GTLCalendarEvent *)object + calendarId:(NSString *)calendarId + eventId:(NSString *)eventId; + +// Method: calendar.events.quickAdd +// Creates an event based on a simple text string. +// Required: +// calendarId: Calendar identifier. +// text: The text describing the event to be created. +// Optional: +// sendNotifications: Whether to send notifications about the creation of the +// event. Optional. The default is False. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarEvent. ++ (id)queryForEventsQuickAddWithCalendarId:(NSString *)calendarId + text:(NSString *)text; + +// Method: calendar.events.update +// Updates an event. +// Required: +// calendarId: Calendar identifier. +// eventId: Event identifier. +// Optional: +// alwaysIncludeEmail: Whether to always include a value in the "email" field +// for the organizer, creator and attendees, even if no real email is +// available (i.e. a generated, non-working value will be provided). The use +// of this option is discouraged and should only be used by clients which +// cannot handle the absence of an email address value in the mentioned +// places. Optional. The default is False. +// maxAttendees: The maximum number of attendees to include in the response. +// If there are more than the specified number of attendees, only the +// participant is returned. Optional. +// sendNotifications: Whether to send notifications about the event update +// (e.g. attendee's responses, title changes, etc.). Optional. The default +// is False. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// Fetches a GTLCalendarEvent. ++ (id)queryForEventsUpdateWithObject:(GTLCalendarEvent *)object + calendarId:(NSString *)calendarId + eventId:(NSString *)eventId; + +#pragma mark - +#pragma mark "freebusy" methods +// These create a GTLQueryCalendar object. + +// Method: calendar.freebusy.query +// Returns free/busy information for a set of calendars. +// Optional: +// calendarExpansionMax: Maximal number of calendars for which FreeBusy +// information is to be provided. Optional. +// groupExpansionMax: Maximal number of calendar identifiers to be provided +// for a single group. Optional. An error will be returned for a group with +// more members than this value. +// items: List of calendars and/or groups to query. +// timeMax: The end of the interval for the query. +// timeMin: The start of the interval for the query. +// timeZone: Time zone used in the response. Optional. The default is UTC. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// kGTLAuthScopeCalendarReadonly +// Fetches a GTLCalendarFreeBusyResponse. ++ (id)queryForFreebusyQuery; + +#pragma mark - +#pragma mark "settings" methods +// These create a GTLQueryCalendar object. + +// Method: calendar.settings.get +// Returns a single user setting. +// Required: +// setting: Name of the user setting. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// kGTLAuthScopeCalendarReadonly +// Fetches a GTLCalendarSetting. ++ (id)queryForSettingsGetWithSetting:(NSString *)setting; + +// Method: calendar.settings.list +// Returns all user settings for the authenticated user. +// Authorization scope(s): +// kGTLAuthScopeCalendar +// kGTLAuthScopeCalendarReadonly +// Fetches a GTLCalendarSettings. ++ (id)queryForSettingsList; + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLQueryCalendar.m b/GTL/Source/Services/Calendar/Generated/GTLQueryCalendar.m new file mode 100644 index 0000000..a3cd246 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLQueryCalendar.m @@ -0,0 +1,435 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryCalendar.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLQueryCalendar (32 custom class methods, 29 custom properties) + +#import "GTLQueryCalendar.h" + +#import "GTLCalendarAcl.h" +#import "GTLCalendarAclRule.h" +#import "GTLCalendarCalendar.h" +#import "GTLCalendarCalendarList.h" +#import "GTLCalendarCalendarListEntry.h" +#import "GTLCalendarColors.h" +#import "GTLCalendarEvent.h" +#import "GTLCalendarEvents.h" +#import "GTLCalendarFreeBusyRequestItem.h" +#import "GTLCalendarFreeBusyResponse.h" +#import "GTLCalendarSetting.h" +#import "GTLCalendarSettings.h" + +@implementation GTLQueryCalendar + +@dynamic alwaysIncludeEmail, calendarExpansionMax, calendarId, colorRgbFormat, + destination, eventId, fields, groupExpansionMax, iCalUID, items, + maxAttendees, maxResults, minAccessRole, orderBy, originalStart, + pageToken, q, ruleId, sendNotifications, setting, showDeleted, + showHidden, showHiddenInvitations, singleEvents, text, timeMax, + timeMin, timeZone, updatedMin; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLCalendarFreeBusyRequestItem class] + forKey:@"items"]; + return map; +} + +#pragma mark - +#pragma mark "acl" methods +// These create a GTLQueryCalendar object. + ++ (id)queryForAclDeleteWithCalendarId:(NSString *)calendarId + ruleId:(NSString *)ruleId { + NSString *methodName = @"calendar.acl.delete"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + query.ruleId = ruleId; + return query; +} + ++ (id)queryForAclGetWithCalendarId:(NSString *)calendarId + ruleId:(NSString *)ruleId { + NSString *methodName = @"calendar.acl.get"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + query.ruleId = ruleId; + query.expectedObjectClass = [GTLCalendarAclRule class]; + return query; +} + ++ (id)queryForAclInsertWithObject:(GTLCalendarAclRule *)object + calendarId:(NSString *)calendarId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.acl.insert"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.calendarId = calendarId; + query.expectedObjectClass = [GTLCalendarAclRule class]; + return query; +} + ++ (id)queryForAclListWithCalendarId:(NSString *)calendarId { + NSString *methodName = @"calendar.acl.list"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + query.expectedObjectClass = [GTLCalendarAcl class]; + return query; +} + ++ (id)queryForAclPatchWithObject:(GTLCalendarAclRule *)object + calendarId:(NSString *)calendarId + ruleId:(NSString *)ruleId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.acl.patch"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.calendarId = calendarId; + query.ruleId = ruleId; + query.expectedObjectClass = [GTLCalendarAclRule class]; + return query; +} + ++ (id)queryForAclUpdateWithObject:(GTLCalendarAclRule *)object + calendarId:(NSString *)calendarId + ruleId:(NSString *)ruleId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.acl.update"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.calendarId = calendarId; + query.ruleId = ruleId; + query.expectedObjectClass = [GTLCalendarAclRule class]; + return query; +} + +#pragma mark - +#pragma mark "calendarList" methods +// These create a GTLQueryCalendar object. + ++ (id)queryForCalendarListDeleteWithCalendarId:(NSString *)calendarId { + NSString *methodName = @"calendar.calendarList.delete"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + return query; +} + ++ (id)queryForCalendarListGetWithCalendarId:(NSString *)calendarId { + NSString *methodName = @"calendar.calendarList.get"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + query.expectedObjectClass = [GTLCalendarCalendarListEntry class]; + return query; +} + ++ (id)queryForCalendarListInsertWithObject:(GTLCalendarCalendarListEntry *)object { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.calendarList.insert"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.expectedObjectClass = [GTLCalendarCalendarListEntry class]; + return query; +} + ++ (id)queryForCalendarListList { + NSString *methodName = @"calendar.calendarList.list"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLCalendarCalendarList class]; + return query; +} + ++ (id)queryForCalendarListPatchWithObject:(GTLCalendarCalendarListEntry *)object + calendarId:(NSString *)calendarId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.calendarList.patch"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.calendarId = calendarId; + query.expectedObjectClass = [GTLCalendarCalendarListEntry class]; + return query; +} + ++ (id)queryForCalendarListUpdateWithObject:(GTLCalendarCalendarListEntry *)object + calendarId:(NSString *)calendarId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.calendarList.update"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.calendarId = calendarId; + query.expectedObjectClass = [GTLCalendarCalendarListEntry class]; + return query; +} + +#pragma mark - +#pragma mark "calendars" methods +// These create a GTLQueryCalendar object. + ++ (id)queryForCalendarsClearWithCalendarId:(NSString *)calendarId { + NSString *methodName = @"calendar.calendars.clear"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + return query; +} + ++ (id)queryForCalendarsDeleteWithCalendarId:(NSString *)calendarId { + NSString *methodName = @"calendar.calendars.delete"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + return query; +} + ++ (id)queryForCalendarsGetWithCalendarId:(NSString *)calendarId { + NSString *methodName = @"calendar.calendars.get"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + query.expectedObjectClass = [GTLCalendarCalendar class]; + return query; +} + ++ (id)queryForCalendarsInsertWithObject:(GTLCalendarCalendar *)object { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.calendars.insert"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.expectedObjectClass = [GTLCalendarCalendar class]; + return query; +} + ++ (id)queryForCalendarsPatchWithObject:(GTLCalendarCalendar *)object + calendarId:(NSString *)calendarId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.calendars.patch"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.calendarId = calendarId; + query.expectedObjectClass = [GTLCalendarCalendar class]; + return query; +} + ++ (id)queryForCalendarsUpdateWithObject:(GTLCalendarCalendar *)object + calendarId:(NSString *)calendarId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.calendars.update"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.calendarId = calendarId; + query.expectedObjectClass = [GTLCalendarCalendar class]; + return query; +} + +#pragma mark - +#pragma mark "colors" methods +// These create a GTLQueryCalendar object. + ++ (id)queryForColorsGet { + NSString *methodName = @"calendar.colors.get"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLCalendarColors class]; + return query; +} + +#pragma mark - +#pragma mark "events" methods +// These create a GTLQueryCalendar object. + ++ (id)queryForEventsDeleteWithCalendarId:(NSString *)calendarId + eventId:(NSString *)eventId { + NSString *methodName = @"calendar.events.delete"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + query.eventId = eventId; + return query; +} + ++ (id)queryForEventsGetWithCalendarId:(NSString *)calendarId + eventId:(NSString *)eventId { + NSString *methodName = @"calendar.events.get"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + query.eventId = eventId; + query.expectedObjectClass = [GTLCalendarEvent class]; + return query; +} + ++ (id)queryForEventsImportWithObject:(GTLCalendarEvent *)object + calendarId:(NSString *)calendarId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.events.import"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.calendarId = calendarId; + query.expectedObjectClass = [GTLCalendarEvent class]; + return query; +} + ++ (id)queryForEventsInsertWithObject:(GTLCalendarEvent *)object + calendarId:(NSString *)calendarId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.events.insert"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.calendarId = calendarId; + query.expectedObjectClass = [GTLCalendarEvent class]; + return query; +} + ++ (id)queryForEventsInstancesWithCalendarId:(NSString *)calendarId + eventId:(NSString *)eventId { + NSString *methodName = @"calendar.events.instances"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + query.eventId = eventId; + query.expectedObjectClass = [GTLCalendarEvents class]; + return query; +} + ++ (id)queryForEventsListWithCalendarId:(NSString *)calendarId { + NSString *methodName = @"calendar.events.list"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + query.expectedObjectClass = [GTLCalendarEvents class]; + return query; +} + ++ (id)queryForEventsMoveWithCalendarId:(NSString *)calendarId + eventId:(NSString *)eventId + destination:(NSString *)destination { + NSString *methodName = @"calendar.events.move"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + query.eventId = eventId; + query.destination = destination; + query.expectedObjectClass = [GTLCalendarEvent class]; + return query; +} + ++ (id)queryForEventsPatchWithObject:(GTLCalendarEvent *)object + calendarId:(NSString *)calendarId + eventId:(NSString *)eventId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.events.patch"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.calendarId = calendarId; + query.eventId = eventId; + query.expectedObjectClass = [GTLCalendarEvent class]; + return query; +} + ++ (id)queryForEventsQuickAddWithCalendarId:(NSString *)calendarId + text:(NSString *)text { + NSString *methodName = @"calendar.events.quickAdd"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.calendarId = calendarId; + query.text = text; + query.expectedObjectClass = [GTLCalendarEvent class]; + return query; +} + ++ (id)queryForEventsUpdateWithObject:(GTLCalendarEvent *)object + calendarId:(NSString *)calendarId + eventId:(NSString *)eventId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"calendar.events.update"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.calendarId = calendarId; + query.eventId = eventId; + query.expectedObjectClass = [GTLCalendarEvent class]; + return query; +} + +#pragma mark - +#pragma mark "freebusy" methods +// These create a GTLQueryCalendar object. + ++ (id)queryForFreebusyQuery { + NSString *methodName = @"calendar.freebusy.query"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLCalendarFreeBusyResponse class]; + return query; +} + +#pragma mark - +#pragma mark "settings" methods +// These create a GTLQueryCalendar object. + ++ (id)queryForSettingsGetWithSetting:(NSString *)setting { + NSString *methodName = @"calendar.settings.get"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.setting = setting; + query.expectedObjectClass = [GTLCalendarSetting class]; + return query; +} + ++ (id)queryForSettingsList { + NSString *methodName = @"calendar.settings.list"; + GTLQueryCalendar *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLCalendarSettings class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLServiceCalendar.h b/GTL/Source/Services/Calendar/Generated/GTLServiceCalendar.h new file mode 100644 index 0000000..4c1f454 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLServiceCalendar.h @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceCalendar.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLServiceCalendar (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceCalendar : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryCalendar.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Calendar/Generated/GTLServiceCalendar.m b/GTL/Source/Services/Calendar/Generated/GTLServiceCalendar.m new file mode 100644 index 0000000..8f9b919 --- /dev/null +++ b/GTL/Source/Services/Calendar/Generated/GTLServiceCalendar.m @@ -0,0 +1,80 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceCalendar.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Calendar API (calendar/v3) +// Description: +// Lets you manipulate events and other calendar data. +// Documentation: +// https://developers.google.com/google-apps/calendar/firstapp +// Classes: +// GTLServiceCalendar (0 custom class methods, 0 custom properties) + +#import "GTLCalendar.h" + +@implementation GTLServiceCalendar + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryCalendar class], + [GTLCalendarAcl class], + [GTLCalendarAclRule class], + [GTLCalendarCalendar class], + [GTLCalendarCalendarList class], + [GTLCalendarCalendarListEntry class], + [GTLCalendarColorDefinition class], + [GTLCalendarColors class], + [GTLCalendarError class], + [GTLCalendarEvent class], + [GTLCalendarEventAttendee class], + [GTLCalendarEventDateTime class], + [GTLCalendarEventReminder class], + [GTLCalendarEvents class], + [GTLCalendarFreeBusyCalendar class], + [GTLCalendarFreeBusyGroup class], + [GTLCalendarFreeBusyRequestItem class], + [GTLCalendarFreeBusyResponse class], + [GTLCalendarSetting class], + [GTLCalendarSettings class], + [GTLCalendarTimePeriod class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v3"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/CivicInfo/.svn/all-wcprops b/GTL/Source/Services/CivicInfo/.svn/all-wcprops new file mode 100644 index 0000000..fc79411 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/.svn/all-wcprops @@ -0,0 +1,5 @@ +K 25 +svn:wc:ra_dav:version-url +V 49 +/svn/!svn/ver/237/trunk/Source/Services/CivicInfo +END diff --git a/GTL/Source/Services/CivicInfo/.svn/entries b/GTL/Source/Services/CivicInfo/.svn/entries new file mode 100644 index 0000000..c7c7db3 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/.svn/entries @@ -0,0 +1,31 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/CivicInfo +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-23T20:22:06.494543Z +237 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +Generated +dir + diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/all-wcprops b/GTL/Source/Services/CivicInfo/Generated/.svn/all-wcprops new file mode 100644 index 0000000..a3f8942 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/all-wcprops @@ -0,0 +1,197 @@ +K 25 +svn:wc:ra_dav:version-url +V 59 +/svn/!svn/ver/237/trunk/Source/Services/CivicInfo/Generated +END +GTLCivicInfoVoterInfoResponse.h +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/229/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoVoterInfoResponse.h +END +GTLCivicInfoElectionsQueryResponse.h +K 25 +svn:wc:ra_dav:version-url +V 96 +/svn/!svn/ver/229/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoElectionsQueryResponse.h +END +GTLCivicInfoPollingLocation.h +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/229/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoPollingLocation.h +END +GTLCivicInfoElectionOfficial.h +K 25 +svn:wc:ra_dav:version-url +V 90 +/svn/!svn/ver/223/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoElectionOfficial.h +END +GTLCivicInfoVoterInfoResponse.m +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/229/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoVoterInfoResponse.m +END +GTLCivicInfoElectionsQueryResponse.m +K 25 +svn:wc:ra_dav:version-url +V 96 +/svn/!svn/ver/229/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoElectionsQueryResponse.m +END +GTLServiceCivicInfo.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/223/trunk/Source/Services/CivicInfo/Generated/GTLServiceCivicInfo.h +END +GTLCivicInfoSource.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/223/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoSource.h +END +GTLCivicInfoSimpleAddressType.h +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/223/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoSimpleAddressType.h +END +GTLCivicInfoElection.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/223/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoElection.h +END +GTLCivicInfoPollingLocation.m +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/229/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoPollingLocation.m +END +GTLCivicInfoElectionOfficial.m +K 25 +svn:wc:ra_dav:version-url +V 90 +/svn/!svn/ver/223/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoElectionOfficial.m +END +GTLServiceCivicInfo.m +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/223/trunk/Source/Services/CivicInfo/Generated/GTLServiceCivicInfo.m +END +GTLQueryCivicInfo.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/223/trunk/Source/Services/CivicInfo/Generated/GTLQueryCivicInfo.h +END +GTLCivicInfoSource.m +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/223/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoSource.m +END +GTLCivicInfoSimpleAddressType.m +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/223/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoSimpleAddressType.m +END +GTLCivicInfoElection.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/223/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoElection.m +END +GTLQueryCivicInfo.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/223/trunk/Source/Services/CivicInfo/Generated/GTLQueryCivicInfo.m +END +GTLCivicInfoElectoralDistrict.h +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/223/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoElectoralDistrict.h +END +GTLCivicInfoElectoralDistrict.m +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/223/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoElectoralDistrict.m +END +GTLCivicInfo_Sources.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/225/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfo_Sources.m +END +GTLCivicInfoAdministrationRegion.h +K 25 +svn:wc:ra_dav:version-url +V 94 +/svn/!svn/ver/223/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoAdministrationRegion.h +END +GTLCivicInfoAdministrationRegion.m +K 25 +svn:wc:ra_dav:version-url +V 94 +/svn/!svn/ver/223/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoAdministrationRegion.m +END +GTLCivicInfoAdministrativeBody.h +K 25 +svn:wc:ra_dav:version-url +V 92 +/svn/!svn/ver/229/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoAdministrativeBody.h +END +GTLCivicInfoAdministrativeBody.m +K 25 +svn:wc:ra_dav:version-url +V 92 +/svn/!svn/ver/223/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoAdministrativeBody.m +END +GTLCivicInfoChannel.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/223/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoChannel.h +END +GTLCivicInfoCandidate.h +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/223/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoCandidate.h +END +GTLCivicInfoChannel.m +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/223/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoChannel.m +END +GTLCivicInfoContest.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/237/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoContest.h +END +GTLCivicInfo.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/223/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfo.h +END +GTLCivicInfoCandidate.m +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/223/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoCandidate.m +END +GTLCivicInfoContest.m +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/237/trunk/Source/Services/CivicInfo/Generated/GTLCivicInfoContest.m +END diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/entries b/GTL/Source/Services/CivicInfo/Generated/.svn/entries new file mode 100644 index 0000000..f31e3dd --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/entries @@ -0,0 +1,1116 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/CivicInfo/Generated +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-23T20:22:06.494543Z +237 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +GTLCivicInfoVoterInfoResponse.h +file + + + + +2012-12-09T08:42:32.000000Z +fc4dfaaf0e209ded6fcf75d51967cdf0 +2012-10-10T23:48:28.140564Z +229 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2921 + +GTLCivicInfoElectionsQueryResponse.h +file + + + + +2012-12-09T08:42:32.000000Z +033e994e6ba45d9260c24626dd62ef94 +2012-10-10T23:48:28.140564Z +229 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1660 + +GTLCivicInfoPollingLocation.h +file + + + + +2012-12-09T08:42:32.000000Z +a3ae4f38731a00409a11ad654cf9db7d +2012-10-10T23:48:28.140564Z +229 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2564 + +GTLCivicInfoElectionOfficial.h +file + + + + +2012-12-09T08:42:32.000000Z +423405bc64ff6b085b037ed34390b5bd +2012-09-30T21:49:26.977854Z +223 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1824 + +GTLCivicInfoVoterInfoResponse.m +file + + + + +2012-12-09T08:42:32.000000Z +3823d6873957083572db6cb17141b1a6 +2012-10-10T23:48:28.140564Z +229 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2059 + +GTLCivicInfoElectionsQueryResponse.m +file + + + + +2012-12-09T08:42:32.000000Z +b30968369029adbce7182c161fd6e537 +2012-10-10T23:48:28.140564Z +229 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1676 + +GTLServiceCivicInfo.h +file + + + + +2012-12-09T08:42:32.000000Z +fc19f8e3931bddd2ab611ec79437afbf +2012-09-30T21:49:26.977854Z +223 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2119 + +GTLCivicInfoSource.h +file + + + + +2012-12-09T08:42:32.000000Z +06d19890f39a858e5e881f39bf2906a6 +2012-09-30T21:49:26.977854Z +223 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1569 + +GTLCivicInfoSimpleAddressType.h +file + + + + +2012-12-09T08:42:32.000000Z +766252f3c0df4a85ce59b3f7d3285d26 +2012-09-30T21:49:26.977854Z +223 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1943 + +GTLCivicInfoElection.h +file + + + + +2012-12-09T08:42:32.000000Z +4e3ea277c0fcb7011eb288c0938df52e +2012-09-30T21:49:26.977854Z +223 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1699 + +GTLCivicInfoPollingLocation.m +file + + + + +2012-12-09T08:42:32.000000Z +0cc93ebaf244a8e195df12a1c456a9b6 +2012-10-10T23:48:28.140564Z +229 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1658 + +GTLCivicInfoElectionOfficial.m +file + + + + +2012-12-09T08:42:32.000000Z +e7ba1e4e6f6074dd75d3ab7a0ed47e27 +2012-09-30T21:49:26.977854Z +223 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1355 + +GTLServiceCivicInfo.m +file + + + + +2012-12-09T08:42:32.000000Z +d2d05560e6de65b476a722c9b5c92e4d +2012-09-30T21:49:26.977854Z +223 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2602 + +GTLQueryCivicInfo.h +file + + + + +2012-12-09T08:42:32.000000Z +19aa1992d0d64cb50160dd519116ef1d +2012-09-30T21:49:26.977854Z +223 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2419 + +GTLCivicInfoSource.m +file + + + + +2012-12-09T08:42:32.000000Z +0c0b430065829b766c4c1671fccddad0 +2012-09-30T21:49:26.977854Z +223 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1264 + +GTLCivicInfoSimpleAddressType.m +file + + + + +2012-12-09T08:42:32.000000Z +d156bf0b80525970776ed656ea50d8b4 +2012-09-30T21:49:26.977854Z +223 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1356 + +GTLCivicInfoElection.m +file + + + + +2012-12-09T08:42:32.000000Z +a6a44983000fef4126e9d1ebf76dd893 +2012-09-30T21:49:26.977854Z +223 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1470 + +GTLQueryCivicInfo.m +file + + + + +2012-12-09T08:42:32.000000Z +4abdcab98abb6df7f421d6b4c695df3e +2012-09-30T21:49:26.977854Z +223 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1953 + +GTLCivicInfoElectoralDistrict.h +file + + + + +2012-12-09T08:42:32.000000Z +6a699a442f8e22dd028219298999a922 +2012-09-30T21:49:26.977854Z +223 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1979 + +GTLCivicInfoElectoralDistrict.m +file + + + + +2012-12-09T08:42:32.000000Z +9fe0254e1042ab7d1341a43ec18df185 +2012-09-30T21:49:26.977854Z +223 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1509 + +GTLCivicInfo_Sources.m +file + + + + +2012-12-09T08:42:32.000000Z +79defd0d1e8c91b1404e338eb053b144 +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1654 + +GTLCivicInfoAdministrationRegion.h +file + + + + +2012-12-09T08:42:32.000000Z +656b1ee7e1e66c3e8a7ec2deaea61b46 +2012-09-30T21:49:26.977854Z +223 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2124 + +GTLCivicInfoAdministrationRegion.m +file + + + + +2012-12-09T08:42:32.000000Z +6bfa702c2f386dc889c2c2346d945bd9 +2012-09-30T21:49:26.977854Z +223 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1860 + +GTLCivicInfoAdministrativeBody.h +file + + + + +2012-12-09T08:42:32.000000Z +f6140f7157f641d03ee86460f6a8e4e5 +2012-10-10T23:48:28.140564Z +229 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3236 + +GTLCivicInfoAdministrativeBody.m +file + + + + +2012-12-09T08:42:32.000000Z +6264891365dd318193e2398c63477e3c +2012-09-30T21:49:26.977854Z +223 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2135 + +GTLCivicInfoChannel.h +file + + + + +2012-12-09T08:42:32.000000Z +a86cb027c5fcbc18598598e642899f47 +2012-09-30T21:49:26.977854Z +223 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1768 + +GTLCivicInfoCandidate.h +file + + + + +2012-12-09T08:42:32.000000Z +5215db446479f29e0d20f7559c601959 +2012-09-30T21:49:26.977854Z +223 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2177 + +GTLCivicInfoChannel.m +file + + + + +2012-12-09T08:42:32.000000Z +0990c42fc24549646f889cf45af64180 +2012-09-30T21:49:26.977854Z +223 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1452 + +GTLCivicInfoContest.h +file + + + + +2012-12-09T08:42:32.000000Z +c5e71ab26bdd3d90c7315e608b22ab39 +2012-10-23T20:22:06.494543Z +237 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3566 + +GTLCivicInfo.h +file + + + + +2012-12-09T08:42:32.000000Z +05afb971b09dd92a1b35a6c4586eaa0c +2012-09-30T21:49:26.977854Z +223 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1535 + +GTLCivicInfoCandidate.m +file + + + + +2012-12-09T08:42:32.000000Z +4047b18e8938b6fb975894d8cd660309 +2012-09-30T21:49:26.977854Z +223 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1585 + +GTLCivicInfoContest.m +file + + + + +2012-12-09T08:42:32.000000Z +87e7b043fcf7cd64de0313f944466565 +2012-10-23T20:22:06.494543Z +237 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1833 + diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfo.h.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfo.h.svn-base new file mode 100644 index 0000000..2db4aea --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfo.h.svn-base @@ -0,0 +1,44 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfo.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information + +#import "GTLCivicInfoAdministrationRegion.h" +#import "GTLCivicInfoAdministrativeBody.h" +#import "GTLCivicInfoCandidate.h" +#import "GTLCivicInfoChannel.h" +#import "GTLCivicInfoContest.h" +#import "GTLCivicInfoElection.h" +#import "GTLCivicInfoElectionOfficial.h" +#import "GTLCivicInfoElectionsQueryResponse.h" +#import "GTLCivicInfoElectoralDistrict.h" +#import "GTLCivicInfoPollingLocation.h" +#import "GTLCivicInfoSimpleAddressType.h" +#import "GTLCivicInfoSource.h" +#import "GTLCivicInfoVoterInfoResponse.h" + +#import "GTLQueryCivicInfo.h" +#import "GTLServiceCivicInfo.h" diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoAdministrationRegion.h.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoAdministrationRegion.h.svn-base new file mode 100644 index 0000000..473f2ce --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoAdministrationRegion.h.svn-base @@ -0,0 +1,64 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoAdministrationRegion.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoAdministrationRegion (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCivicInfoAdministrationRegion; +@class GTLCivicInfoAdministrativeBody; +@class GTLCivicInfoSource; + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoAdministrationRegion +// + +// Describes information about a regional election administrative area. + +@interface GTLCivicInfoAdministrationRegion : GTLObject + +// The election administration body for this area. +@property (retain) GTLCivicInfoAdministrativeBody *electionAdministrationBody; + +// The city or county that provides election information for this voter. This +// object can have the same elements as state. +@property (retain) GTLCivicInfoAdministrationRegion *localJurisdiction; + +// The name of the jurisdiction. +@property (copy) NSString *name; + +// A list of sources for this area. If multiple sources are listed the data has +// been aggregated from those sources. +@property (retain) NSArray *sources; // of GTLCivicInfoSource + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoAdministrationRegion.m.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoAdministrationRegion.m.svn-base new file mode 100644 index 0000000..5f01a6b --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoAdministrationRegion.m.svn-base @@ -0,0 +1,58 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoAdministrationRegion.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoAdministrationRegion (0 custom class methods, 4 custom properties) + +#import "GTLCivicInfoAdministrationRegion.h" + +#import "GTLCivicInfoAdministrativeBody.h" +#import "GTLCivicInfoSource.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoAdministrationRegion +// + +@implementation GTLCivicInfoAdministrationRegion +@dynamic electionAdministrationBody, localJurisdiction, name, sources; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"local_jurisdiction" + forKey:@"localJurisdiction"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLCivicInfoSource class] + forKey:@"sources"]; + return map; +} + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoAdministrativeBody.h.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoAdministrativeBody.h.svn-base new file mode 100644 index 0000000..083232b --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoAdministrativeBody.h.svn-base @@ -0,0 +1,95 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoAdministrativeBody.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoAdministrativeBody (0 custom class methods, 13 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCivicInfoElectionOfficial; +@class GTLCivicInfoSimpleAddressType; + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoAdministrativeBody +// + +// Information about an election administrative body (e.g. County Board of +// Elections). + +@interface GTLCivicInfoAdministrativeBody : GTLObject + +// A URL provided by this administrative body for information on absentee +// voting. +@property (copy) NSString *absenteeVotingInfoUrl; + +// A URL provided by this administrative body to give contest information to the +// voter. +@property (copy) NSString *ballotInfoUrl; + +// The mailing address of this administrative body. +@property (retain) GTLCivicInfoSimpleAddressType *correspondenceAddress; + +// A URL provided by this administrative body for looking up general election +// information. +@property (copy) NSString *electionInfoUrl; + +// The election officials for this election administrative body. +@property (retain) NSArray *electionOfficials; // of GTLCivicInfoElectionOfficial + +// A URL provided by this administrative body for confirming that the voter is +// registered to vote. +@property (copy) NSString *electionRegistrationConfirmationUrl; + +// A URL provided by this administrative body for looking up how to register to +// vote. +@property (copy) NSString *electionRegistrationUrl; + +// A URL provided by this administrative body describing election rules to the +// voter. +@property (copy) NSString *electionRulesUrl; + +// A description of the hours of operation for this administrative body. +@property (copy) NSString *hoursOfOperation; + +// The name of this election administrative body. +@property (copy) NSString *name; + +// The physical address of this administrative body. +@property (retain) GTLCivicInfoSimpleAddressType *physicalAddress; + +// A description of the services this administrative body may provide. +@property (retain) NSArray *voterServices; // of NSString + +// A URL provided by this administrative body for looking up where to vote. +@property (copy) NSString *votingLocationFinderUrl; + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoAdministrativeBody.m.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoAdministrativeBody.m.svn-base new file mode 100644 index 0000000..5eff3ed --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoAdministrativeBody.m.svn-base @@ -0,0 +1,64 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoAdministrativeBody.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoAdministrativeBody (0 custom class methods, 13 custom properties) + +#import "GTLCivicInfoAdministrativeBody.h" + +#import "GTLCivicInfoElectionOfficial.h" +#import "GTLCivicInfoSimpleAddressType.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoAdministrativeBody +// + +@implementation GTLCivicInfoAdministrativeBody +@dynamic absenteeVotingInfoUrl, ballotInfoUrl, correspondenceAddress, + electionInfoUrl, electionOfficials, + electionRegistrationConfirmationUrl, electionRegistrationUrl, + electionRulesUrl, hoursOfOperation, name, physicalAddress, + voterServices, votingLocationFinderUrl; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"voter_services" + forKey:@"voterServices"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLCivicInfoElectionOfficial class], @"electionOfficials", + [NSString class], @"voter_services", + nil]; + return map; +} + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoCandidate.h.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoCandidate.h.svn-base new file mode 100644 index 0000000..8d662cd --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoCandidate.h.svn-base @@ -0,0 +1,72 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoCandidate.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoCandidate (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCivicInfoChannel; + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoCandidate +// + +// Information about a candidate running for elected office. + +@interface GTLCivicInfoCandidate : GTLObject + +// The URL for the candidate's campaign web site. +@property (copy) NSString *candidateUrl; + +// A list of known (social) media channels for this candidate. +@property (retain) NSArray *channels; // of GTLCivicInfoChannel + +// The email address for the candidate's campaign. +@property (copy) NSString *email; + +// The candidate's name. +@property (copy) NSString *name; + +// The order the candidate appears on the ballot for this contest. +@property (retain) NSNumber *orderOnBallot; // longLongValue + +// The full name of the party the candidate is a member of. +@property (copy) NSString *party; + +// The voice phone number for the candidate's campaign office. +@property (copy) NSString *phone; + +// A URL for a photo of the candidate. +@property (copy) NSString *photoUrl; + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoCandidate.m.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoCandidate.m.svn-base new file mode 100644 index 0000000..42e1dee --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoCandidate.m.svn-base @@ -0,0 +1,51 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoCandidate.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoCandidate (0 custom class methods, 8 custom properties) + +#import "GTLCivicInfoCandidate.h" + +#import "GTLCivicInfoChannel.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoCandidate +// + +@implementation GTLCivicInfoCandidate +@dynamic candidateUrl, channels, email, name, orderOnBallot, party, phone, + photoUrl; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLCivicInfoChannel class] + forKey:@"channels"]; + return map; +} + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoChannel.h.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoChannel.h.svn-base new file mode 100644 index 0000000..f273493 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoChannel.h.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoChannel.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoChannel (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoChannel +// + +// A social media or web channel for a candidate. + +@interface GTLCivicInfoChannel : GTLObject + +// The unique public identifier for the candidate's channel. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The type of channel. The following is a list of types of channels, but is not +// exhaustive. More channel types may be added at a later time. One of: +// GooglePlus, YouTube, Facebook, Twitter +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoChannel.m.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoChannel.m.svn-base new file mode 100644 index 0000000..3fc52bb --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoChannel.m.svn-base @@ -0,0 +1,48 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoChannel.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoChannel (0 custom class methods, 2 custom properties) + +#import "GTLCivicInfoChannel.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoChannel +// + +@implementation GTLCivicInfoChannel +@dynamic identifier, type; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoContest.h.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoContest.h.svn-base new file mode 100644 index 0000000..d057a69 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoContest.h.svn-base @@ -0,0 +1,103 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoContest.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoContest (0 custom class methods, 15 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCivicInfoCandidate; +@class GTLCivicInfoElectoralDistrict; +@class GTLCivicInfoSource; + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoContest +// + +// Information about a contest that appears on a voter's ballot. + +@interface GTLCivicInfoContest : GTLObject + +// A number specifying the position of this contest on the voter's ballot. +@property (retain) NSNumber *ballotPlacement; // longLongValue + +// The candidate choices for this contest. +@property (retain) NSArray *candidates; // of GTLCivicInfoCandidate + +// Information about the electoral district that this contest is in. +@property (retain) GTLCivicInfoElectoralDistrict *district; + +// A description of any additional eligibility requirements for voting in this +// contest. +@property (copy) NSString *electorateSpecifications; + +// The level of office for this contest. One of: federal, state, county, city, +// other +@property (copy) NSString *level; + +// The number of candidates that will be elected to office in this contest. +@property (retain) NSNumber *numberElected; // longLongValue + +// The number of candidates that a voter may vote for in this contest. +@property (retain) NSNumber *numberVotingFor; // longLongValue + +// The name of the office for this contest. +@property (copy) NSString *office; + +// If this is a partisan election, the name of the party it is for. +@property (copy) NSString *primaryParty; + +// A brief description of the referendum. This field is only populated for +// contests of type 'Referendum'. +@property (copy) NSString *referendumSubtitle; + +// The title of the referendum. (e.g. 'Proposition 42') This field is only +// populated for contests of type 'Referendum'. +@property (copy) NSString *referendumTitle; + +// A link the referendum. This field is only populated for contests of type +// 'Referendum'. +@property (copy) NSString *referendumUrl; + +// A list of sources for this contest. If multiple sources are listed, the data +// has been aggregated from those sources. +@property (retain) NSArray *sources; // of GTLCivicInfoSource + +// "Yes" or "No" depending on whether this a contest being held outside the +// normal election cycle. +@property (copy) NSString *special; + +// The type of contest. Usually this will be 'General', 'Primary', or 'Run-off' +// for contests with candidates. For referenda this will be 'Referendum'. +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoContest.m.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoContest.m.svn-base new file mode 100644 index 0000000..932e7b6 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoContest.m.svn-base @@ -0,0 +1,57 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoContest.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoContest (0 custom class methods, 15 custom properties) + +#import "GTLCivicInfoContest.h" + +#import "GTLCivicInfoCandidate.h" +#import "GTLCivicInfoElectoralDistrict.h" +#import "GTLCivicInfoSource.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoContest +// + +@implementation GTLCivicInfoContest +@dynamic ballotPlacement, candidates, district, electorateSpecifications, level, + numberElected, numberVotingFor, office, primaryParty, + referendumSubtitle, referendumTitle, referendumUrl, sources, special, + type; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLCivicInfoCandidate class], @"candidates", + [GTLCivicInfoSource class], @"sources", + nil]; + return map; +} + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoElection.h.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoElection.h.svn-base new file mode 100644 index 0000000..74719fb --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoElection.h.svn-base @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoElection.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoElection (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoElection +// + +// Information about the election that was queried. + +@interface GTLCivicInfoElection : GTLObject + +// Day of the election in YYYY-MM-DD format. +@property (copy) NSString *electionDay; + +// The unique ID of this election. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +// A displayable name for the election. +@property (copy) NSString *name; + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoElection.m.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoElection.m.svn-base new file mode 100644 index 0000000..7f8c605 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoElection.m.svn-base @@ -0,0 +1,48 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoElection.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoElection (0 custom class methods, 3 custom properties) + +#import "GTLCivicInfoElection.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoElection +// + +@implementation GTLCivicInfoElection +@dynamic electionDay, identifier, name; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoElectionOfficial.h.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoElectionOfficial.h.svn-base new file mode 100644 index 0000000..219a43a --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoElectionOfficial.h.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoElectionOfficial.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoElectionOfficial (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoElectionOfficial +// + +// Information about individual election officials. + +@interface GTLCivicInfoElectionOfficial : GTLObject + +// The email address of the election official. +@property (copy) NSString *emailAddress; + +// The fax number of the election official. +@property (copy) NSString *faxNumber; + +// The full name of the election official. +@property (copy) NSString *name; + +// The office phone number of the election official. +@property (copy) NSString *officePhoneNumber; + +// The title of the election official. +@property (copy) NSString *title; + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoElectionOfficial.m.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoElectionOfficial.m.svn-base new file mode 100644 index 0000000..7211694 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoElectionOfficial.m.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoElectionOfficial.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoElectionOfficial (0 custom class methods, 5 custom properties) + +#import "GTLCivicInfoElectionOfficial.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoElectionOfficial +// + +@implementation GTLCivicInfoElectionOfficial +@dynamic emailAddress, faxNumber, name, officePhoneNumber, title; +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoElectionsQueryResponse.h.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoElectionsQueryResponse.h.svn-base new file mode 100644 index 0000000..48b2030 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoElectionsQueryResponse.h.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoElectionsQueryResponse.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoElectionsQueryResponse (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCivicInfoElection; + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoElectionsQueryResponse +// + +// The list of elections available for this version of the API. + +@interface GTLCivicInfoElectionsQueryResponse : GTLObject + +// A list of available elections +@property (retain) NSArray *elections; // of GTLCivicInfoElection + +// The kind, fixed to "civicinfo#electionsQueryResponse". +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoElectionsQueryResponse.m.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoElectionsQueryResponse.m.svn-base new file mode 100644 index 0000000..a6f2a34 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoElectionsQueryResponse.m.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoElectionsQueryResponse.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoElectionsQueryResponse (0 custom class methods, 2 custom properties) + +#import "GTLCivicInfoElectionsQueryResponse.h" + +#import "GTLCivicInfoElection.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoElectionsQueryResponse +// + +@implementation GTLCivicInfoElectionsQueryResponse +@dynamic elections, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLCivicInfoElection class] + forKey:@"elections"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"civicinfo#electionsQueryResponse"]; +} + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoElectoralDistrict.h.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoElectoralDistrict.h.svn-base new file mode 100644 index 0000000..c96d366 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoElectoralDistrict.h.svn-base @@ -0,0 +1,59 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoElectoralDistrict.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoElectoralDistrict (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoElectoralDistrict +// + +// Describes the geographic scope of a contest. + +@interface GTLCivicInfoElectoralDistrict : GTLObject + +// An identifier for this district, relative to its scope. For example, the 34th +// State Senate district would have id "34" and a scope of stateUpper. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The name of the district. +@property (copy) NSString *name; + +// The geographic scope of this district. If unspecified the district's +// geography is not known. One of: statewide, congressional, stateUpper, +// stateLower, countywide, judicial, schoolBoard, cityWide, special +@property (copy) NSString *scope; + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoElectoralDistrict.m.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoElectoralDistrict.m.svn-base new file mode 100644 index 0000000..2518ca4 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoElectoralDistrict.m.svn-base @@ -0,0 +1,48 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoElectoralDistrict.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoElectoralDistrict (0 custom class methods, 3 custom properties) + +#import "GTLCivicInfoElectoralDistrict.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoElectoralDistrict +// + +@implementation GTLCivicInfoElectoralDistrict +@dynamic identifier, name, scope; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoPollingLocation.h.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoPollingLocation.h.svn-base new file mode 100644 index 0000000..f0f4ab8 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoPollingLocation.h.svn-base @@ -0,0 +1,79 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoPollingLocation.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoPollingLocation (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCivicInfoSimpleAddressType; +@class GTLCivicInfoSource; + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoPollingLocation +// + +// A location where a voter can vote. This may be an early vote site or an +// election day voting location. + +@interface GTLCivicInfoPollingLocation : GTLObject + +// The address of the location +@property (retain) GTLCivicInfoSimpleAddressType *address; + +// The last date that this early vote site may be used. This field is not +// populated for polling locations. +@property (copy) NSString *endDate; + +// The name of the early vote site. This field is not populated for polling +// locations. +@property (copy) NSString *name; + +// Notes about this location (e.g. accessibility ramp or entrance to use) +@property (copy) NSString *notes; + +// A description of when this location is open. +@property (copy) NSString *pollingHours; + +// A list of sources for this location. If multiple sources are listed the data +// has been aggregated from those sources. +@property (retain) NSArray *sources; // of GTLCivicInfoSource + +// The first date that this early vote site may be used. This field is not +// populated for polling locations. +@property (copy) NSString *startDate; + +// The services provided by this early vote site. This field is not populated +// for polling locations. +@property (copy) NSString *voterServices; + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoPollingLocation.m.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoPollingLocation.m.svn-base new file mode 100644 index 0000000..6e054ee --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoPollingLocation.m.svn-base @@ -0,0 +1,52 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoPollingLocation.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoPollingLocation (0 custom class methods, 8 custom properties) + +#import "GTLCivicInfoPollingLocation.h" + +#import "GTLCivicInfoSimpleAddressType.h" +#import "GTLCivicInfoSource.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoPollingLocation +// + +@implementation GTLCivicInfoPollingLocation +@dynamic address, endDate, name, notes, pollingHours, sources, startDate, + voterServices; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLCivicInfoSource class] + forKey:@"sources"]; + return map; +} + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoSimpleAddressType.h.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoSimpleAddressType.h.svn-base new file mode 100644 index 0000000..b66037e --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoSimpleAddressType.h.svn-base @@ -0,0 +1,67 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoSimpleAddressType.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoSimpleAddressType (0 custom class methods, 7 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoSimpleAddressType +// + +// A simple representation of an address. + +@interface GTLCivicInfoSimpleAddressType : GTLObject + +// The city or town for the address. +@property (copy) NSString *city; + +// The street name and number of this address. +@property (copy) NSString *line1; + +// The second line the address, if needed. +@property (copy) NSString *line2; + +// The third line of the address, if needed. +@property (copy) NSString *line3; + +// The name of the location. +@property (copy) NSString *locationName; + +// The US two letter state abbreviation of the address. +@property (copy) NSString *state; + +// The US Postal Zip Code of the address. +@property (copy) NSString *zip; + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoSimpleAddressType.m.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoSimpleAddressType.m.svn-base new file mode 100644 index 0000000..181b269 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoSimpleAddressType.m.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoSimpleAddressType.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoSimpleAddressType (0 custom class methods, 7 custom properties) + +#import "GTLCivicInfoSimpleAddressType.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoSimpleAddressType +// + +@implementation GTLCivicInfoSimpleAddressType +@dynamic city, line1, line2, line3, locationName, state, zip; +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoSource.h.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoSource.h.svn-base new file mode 100644 index 0000000..dcfe605 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoSource.h.svn-base @@ -0,0 +1,52 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoSource.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoSource (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoSource +// + +// Contains information about the data source for the element containing it. + +@interface GTLCivicInfoSource : GTLObject + +// The name of the data source. +@property (copy) NSString *name; + +// Whether this data comes from an official government source. +@property (retain) NSNumber *official; // boolValue + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoSource.m.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoSource.m.svn-base new file mode 100644 index 0000000..0a159ec --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoSource.m.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoSource.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoSource (0 custom class methods, 2 custom properties) + +#import "GTLCivicInfoSource.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoSource +// + +@implementation GTLCivicInfoSource +@dynamic name, official; +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoVoterInfoResponse.h.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoVoterInfoResponse.h.svn-base new file mode 100644 index 0000000..62c3065 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoVoterInfoResponse.h.svn-base @@ -0,0 +1,82 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoVoterInfoResponse.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoVoterInfoResponse (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCivicInfoAdministrationRegion; +@class GTLCivicInfoContest; +@class GTLCivicInfoElection; +@class GTLCivicInfoPollingLocation; +@class GTLCivicInfoSimpleAddressType; + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoVoterInfoResponse +// + +// The result of a voter info lookup query. + +@interface GTLCivicInfoVoterInfoResponse : GTLObject + +// Contests that will appear on the voter's ballot +@property (retain) NSArray *contests; // of GTLCivicInfoContest + +// Locations where the voter is eligible to vote early, prior to election day +@property (retain) NSArray *earlyVoteSites; // of GTLCivicInfoPollingLocation + +// The election that was queried. +@property (retain) GTLCivicInfoElection *election; + +// The kind, fixed to "civicinfo#voterInfoResponse". +@property (copy) NSString *kind; + +// The normalized version of the requested address +@property (retain) GTLCivicInfoSimpleAddressType *normalizedInput; + +// Locations where the voter is eligible to vote on election day. For states +// with mail-in voting only, these locations will be nearby drop box locations. +// Drop box locations are free to the voter and may be used instead of placing +// the ballot in the mail. +@property (retain) NSArray *pollingLocations; // of GTLCivicInfoPollingLocation + +// Local Election Information for the state that the voter votes in. For the US, +// there will only be one element in this array. +@property (retain) NSArray *state; // of GTLCivicInfoAdministrationRegion + +// The result of the request. One of: success, noStreetSegmentFound, +// addressUnparseable, noAddressParameter, multipleStreetSegmentsFound, +// electionOver, electionUnknown, internalLookupFailure +@property (copy) NSString *status; + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoVoterInfoResponse.m.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoVoterInfoResponse.m.svn-base new file mode 100644 index 0000000..a7c1866 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfoVoterInfoResponse.m.svn-base @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoVoterInfoResponse.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoVoterInfoResponse (0 custom class methods, 8 custom properties) + +#import "GTLCivicInfoVoterInfoResponse.h" + +#import "GTLCivicInfoAdministrationRegion.h" +#import "GTLCivicInfoContest.h" +#import "GTLCivicInfoElection.h" +#import "GTLCivicInfoPollingLocation.h" +#import "GTLCivicInfoSimpleAddressType.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoVoterInfoResponse +// + +@implementation GTLCivicInfoVoterInfoResponse +@dynamic contests, earlyVoteSites, election, kind, normalizedInput, + pollingLocations, state, status; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLCivicInfoContest class], @"contests", + [GTLCivicInfoPollingLocation class], @"earlyVoteSites", + [GTLCivicInfoPollingLocation class], @"pollingLocations", + [GTLCivicInfoAdministrationRegion class], @"state", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"civicinfo#voterInfoResponse"]; +} + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfo_Sources.m.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfo_Sources.m.svn-base new file mode 100644 index 0000000..6a9b75f --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLCivicInfo_Sources.m.svn-base @@ -0,0 +1,47 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfo_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information + +#import "GTLCivicInfoAdministrationRegion.m" +#import "GTLCivicInfoAdministrativeBody.m" +#import "GTLCivicInfoCandidate.m" +#import "GTLCivicInfoChannel.m" +#import "GTLCivicInfoContest.m" +#import "GTLCivicInfoElection.m" +#import "GTLCivicInfoElectionOfficial.m" +#import "GTLCivicInfoElectionsQueryResponse.m" +#import "GTLCivicInfoElectoralDistrict.m" +#import "GTLCivicInfoPollingLocation.m" +#import "GTLCivicInfoSimpleAddressType.m" +#import "GTLCivicInfoSource.m" +#import "GTLCivicInfoVoterInfoResponse.m" + +#import "GTLQueryCivicInfo.m" +#import "GTLServiceCivicInfo.m" diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLQueryCivicInfo.h.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLQueryCivicInfo.h.svn-base new file mode 100644 index 0000000..460ff68 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLQueryCivicInfo.h.svn-base @@ -0,0 +1,76 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryCivicInfo.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLQueryCivicInfo (2 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@interface GTLQueryCivicInfo : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *address; +@property (assign) long long electionId; +@property (assign) BOOL officialOnly; + +#pragma mark - +#pragma mark "elections" methods +// These create a GTLQueryCivicInfo object. + +// Method: civicinfo.elections.electionQuery +// List of available elections to query. +// Fetches a GTLCivicInfoElectionsQueryResponse. ++ (id)queryForElectionsElectionQuery; + +// Method: civicinfo.elections.voterInfoQuery +// Looks up information relevant to a voter based on the voter's registered +// address. +// Required: +// electionId: The unique ID of the election to look up. A list of election +// IDs can be obtained +// at.https://www.googleapis.com/civicinfo/{version}/elections +// Optional: +// address: The registered address of the voter to look up. +// officialOnly: If set to true, only data from official state sources will be +// returned. +// Fetches a GTLCivicInfoVoterInfoResponse. ++ (id)queryForElectionsVoterInfoQueryWithElectionId:(long long)electionId; + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLQueryCivicInfo.m.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLQueryCivicInfo.m.svn-base new file mode 100644 index 0000000..1340ad0 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLQueryCivicInfo.m.svn-base @@ -0,0 +1,59 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryCivicInfo.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLQueryCivicInfo (2 custom class methods, 4 custom properties) + +#import "GTLQueryCivicInfo.h" + +#import "GTLCivicInfoElectionsQueryResponse.h" +#import "GTLCivicInfoVoterInfoResponse.h" + +@implementation GTLQueryCivicInfo + +@dynamic address, electionId, fields, officialOnly; + +#pragma mark - +#pragma mark "elections" methods +// These create a GTLQueryCivicInfo object. + ++ (id)queryForElectionsElectionQuery { + NSString *methodName = @"civicinfo.elections.electionQuery"; + GTLQueryCivicInfo *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLCivicInfoElectionsQueryResponse class]; + return query; +} + ++ (id)queryForElectionsVoterInfoQueryWithElectionId:(long long)electionId { + NSString *methodName = @"civicinfo.elections.voterInfoQuery"; + GTLQueryCivicInfo *query = [self queryWithMethodName:methodName]; + query.electionId = electionId; + query.expectedObjectClass = [GTLCivicInfoVoterInfoResponse class]; + return query; +} + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLServiceCivicInfo.h.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLServiceCivicInfo.h.svn-base new file mode 100644 index 0000000..e3a272c --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLServiceCivicInfo.h.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceCivicInfo.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLServiceCivicInfo (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceCivicInfo : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryCivicInfo.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLServiceCivicInfo.m.svn-base b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLServiceCivicInfo.m.svn-base new file mode 100644 index 0000000..ce25d66 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/.svn/text-base/GTLServiceCivicInfo.m.svn-base @@ -0,0 +1,73 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceCivicInfo.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLServiceCivicInfo (0 custom class methods, 0 custom properties) + +#import "GTLCivicInfo.h" + +@implementation GTLServiceCivicInfo + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryCivicInfo class], + [GTLCivicInfoAdministrationRegion class], + [GTLCivicInfoAdministrativeBody class], + [GTLCivicInfoCandidate class], + [GTLCivicInfoChannel class], + [GTLCivicInfoContest class], + [GTLCivicInfoElection class], + [GTLCivicInfoElectionOfficial class], + [GTLCivicInfoElectionsQueryResponse class], + [GTLCivicInfoElectoralDistrict class], + [GTLCivicInfoPollingLocation class], + [GTLCivicInfoSimpleAddressType class], + [GTLCivicInfoSource class], + [GTLCivicInfoVoterInfoResponse class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"us_v1"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfo.h b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfo.h new file mode 100644 index 0000000..2db4aea --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfo.h @@ -0,0 +1,44 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfo.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information + +#import "GTLCivicInfoAdministrationRegion.h" +#import "GTLCivicInfoAdministrativeBody.h" +#import "GTLCivicInfoCandidate.h" +#import "GTLCivicInfoChannel.h" +#import "GTLCivicInfoContest.h" +#import "GTLCivicInfoElection.h" +#import "GTLCivicInfoElectionOfficial.h" +#import "GTLCivicInfoElectionsQueryResponse.h" +#import "GTLCivicInfoElectoralDistrict.h" +#import "GTLCivicInfoPollingLocation.h" +#import "GTLCivicInfoSimpleAddressType.h" +#import "GTLCivicInfoSource.h" +#import "GTLCivicInfoVoterInfoResponse.h" + +#import "GTLQueryCivicInfo.h" +#import "GTLServiceCivicInfo.h" diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoAdministrationRegion.h b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoAdministrationRegion.h new file mode 100644 index 0000000..473f2ce --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoAdministrationRegion.h @@ -0,0 +1,64 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoAdministrationRegion.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoAdministrationRegion (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCivicInfoAdministrationRegion; +@class GTLCivicInfoAdministrativeBody; +@class GTLCivicInfoSource; + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoAdministrationRegion +// + +// Describes information about a regional election administrative area. + +@interface GTLCivicInfoAdministrationRegion : GTLObject + +// The election administration body for this area. +@property (retain) GTLCivicInfoAdministrativeBody *electionAdministrationBody; + +// The city or county that provides election information for this voter. This +// object can have the same elements as state. +@property (retain) GTLCivicInfoAdministrationRegion *localJurisdiction; + +// The name of the jurisdiction. +@property (copy) NSString *name; + +// A list of sources for this area. If multiple sources are listed the data has +// been aggregated from those sources. +@property (retain) NSArray *sources; // of GTLCivicInfoSource + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoAdministrationRegion.m b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoAdministrationRegion.m new file mode 100644 index 0000000..5f01a6b --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoAdministrationRegion.m @@ -0,0 +1,58 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoAdministrationRegion.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoAdministrationRegion (0 custom class methods, 4 custom properties) + +#import "GTLCivicInfoAdministrationRegion.h" + +#import "GTLCivicInfoAdministrativeBody.h" +#import "GTLCivicInfoSource.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoAdministrationRegion +// + +@implementation GTLCivicInfoAdministrationRegion +@dynamic electionAdministrationBody, localJurisdiction, name, sources; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"local_jurisdiction" + forKey:@"localJurisdiction"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLCivicInfoSource class] + forKey:@"sources"]; + return map; +} + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoAdministrativeBody.h b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoAdministrativeBody.h new file mode 100644 index 0000000..083232b --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoAdministrativeBody.h @@ -0,0 +1,95 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoAdministrativeBody.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoAdministrativeBody (0 custom class methods, 13 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCivicInfoElectionOfficial; +@class GTLCivicInfoSimpleAddressType; + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoAdministrativeBody +// + +// Information about an election administrative body (e.g. County Board of +// Elections). + +@interface GTLCivicInfoAdministrativeBody : GTLObject + +// A URL provided by this administrative body for information on absentee +// voting. +@property (copy) NSString *absenteeVotingInfoUrl; + +// A URL provided by this administrative body to give contest information to the +// voter. +@property (copy) NSString *ballotInfoUrl; + +// The mailing address of this administrative body. +@property (retain) GTLCivicInfoSimpleAddressType *correspondenceAddress; + +// A URL provided by this administrative body for looking up general election +// information. +@property (copy) NSString *electionInfoUrl; + +// The election officials for this election administrative body. +@property (retain) NSArray *electionOfficials; // of GTLCivicInfoElectionOfficial + +// A URL provided by this administrative body for confirming that the voter is +// registered to vote. +@property (copy) NSString *electionRegistrationConfirmationUrl; + +// A URL provided by this administrative body for looking up how to register to +// vote. +@property (copy) NSString *electionRegistrationUrl; + +// A URL provided by this administrative body describing election rules to the +// voter. +@property (copy) NSString *electionRulesUrl; + +// A description of the hours of operation for this administrative body. +@property (copy) NSString *hoursOfOperation; + +// The name of this election administrative body. +@property (copy) NSString *name; + +// The physical address of this administrative body. +@property (retain) GTLCivicInfoSimpleAddressType *physicalAddress; + +// A description of the services this administrative body may provide. +@property (retain) NSArray *voterServices; // of NSString + +// A URL provided by this administrative body for looking up where to vote. +@property (copy) NSString *votingLocationFinderUrl; + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoAdministrativeBody.m b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoAdministrativeBody.m new file mode 100644 index 0000000..5eff3ed --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoAdministrativeBody.m @@ -0,0 +1,64 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoAdministrativeBody.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoAdministrativeBody (0 custom class methods, 13 custom properties) + +#import "GTLCivicInfoAdministrativeBody.h" + +#import "GTLCivicInfoElectionOfficial.h" +#import "GTLCivicInfoSimpleAddressType.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoAdministrativeBody +// + +@implementation GTLCivicInfoAdministrativeBody +@dynamic absenteeVotingInfoUrl, ballotInfoUrl, correspondenceAddress, + electionInfoUrl, electionOfficials, + electionRegistrationConfirmationUrl, electionRegistrationUrl, + electionRulesUrl, hoursOfOperation, name, physicalAddress, + voterServices, votingLocationFinderUrl; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"voter_services" + forKey:@"voterServices"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLCivicInfoElectionOfficial class], @"electionOfficials", + [NSString class], @"voter_services", + nil]; + return map; +} + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoCandidate.h b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoCandidate.h new file mode 100644 index 0000000..8d662cd --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoCandidate.h @@ -0,0 +1,72 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoCandidate.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoCandidate (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCivicInfoChannel; + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoCandidate +// + +// Information about a candidate running for elected office. + +@interface GTLCivicInfoCandidate : GTLObject + +// The URL for the candidate's campaign web site. +@property (copy) NSString *candidateUrl; + +// A list of known (social) media channels for this candidate. +@property (retain) NSArray *channels; // of GTLCivicInfoChannel + +// The email address for the candidate's campaign. +@property (copy) NSString *email; + +// The candidate's name. +@property (copy) NSString *name; + +// The order the candidate appears on the ballot for this contest. +@property (retain) NSNumber *orderOnBallot; // longLongValue + +// The full name of the party the candidate is a member of. +@property (copy) NSString *party; + +// The voice phone number for the candidate's campaign office. +@property (copy) NSString *phone; + +// A URL for a photo of the candidate. +@property (copy) NSString *photoUrl; + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoCandidate.m b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoCandidate.m new file mode 100644 index 0000000..42e1dee --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoCandidate.m @@ -0,0 +1,51 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoCandidate.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoCandidate (0 custom class methods, 8 custom properties) + +#import "GTLCivicInfoCandidate.h" + +#import "GTLCivicInfoChannel.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoCandidate +// + +@implementation GTLCivicInfoCandidate +@dynamic candidateUrl, channels, email, name, orderOnBallot, party, phone, + photoUrl; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLCivicInfoChannel class] + forKey:@"channels"]; + return map; +} + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoChannel.h b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoChannel.h new file mode 100644 index 0000000..f273493 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoChannel.h @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoChannel.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoChannel (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoChannel +// + +// A social media or web channel for a candidate. + +@interface GTLCivicInfoChannel : GTLObject + +// The unique public identifier for the candidate's channel. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The type of channel. The following is a list of types of channels, but is not +// exhaustive. More channel types may be added at a later time. One of: +// GooglePlus, YouTube, Facebook, Twitter +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoChannel.m b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoChannel.m new file mode 100644 index 0000000..3fc52bb --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoChannel.m @@ -0,0 +1,48 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoChannel.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoChannel (0 custom class methods, 2 custom properties) + +#import "GTLCivicInfoChannel.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoChannel +// + +@implementation GTLCivicInfoChannel +@dynamic identifier, type; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoContest.h b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoContest.h new file mode 100644 index 0000000..d057a69 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoContest.h @@ -0,0 +1,103 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoContest.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoContest (0 custom class methods, 15 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCivicInfoCandidate; +@class GTLCivicInfoElectoralDistrict; +@class GTLCivicInfoSource; + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoContest +// + +// Information about a contest that appears on a voter's ballot. + +@interface GTLCivicInfoContest : GTLObject + +// A number specifying the position of this contest on the voter's ballot. +@property (retain) NSNumber *ballotPlacement; // longLongValue + +// The candidate choices for this contest. +@property (retain) NSArray *candidates; // of GTLCivicInfoCandidate + +// Information about the electoral district that this contest is in. +@property (retain) GTLCivicInfoElectoralDistrict *district; + +// A description of any additional eligibility requirements for voting in this +// contest. +@property (copy) NSString *electorateSpecifications; + +// The level of office for this contest. One of: federal, state, county, city, +// other +@property (copy) NSString *level; + +// The number of candidates that will be elected to office in this contest. +@property (retain) NSNumber *numberElected; // longLongValue + +// The number of candidates that a voter may vote for in this contest. +@property (retain) NSNumber *numberVotingFor; // longLongValue + +// The name of the office for this contest. +@property (copy) NSString *office; + +// If this is a partisan election, the name of the party it is for. +@property (copy) NSString *primaryParty; + +// A brief description of the referendum. This field is only populated for +// contests of type 'Referendum'. +@property (copy) NSString *referendumSubtitle; + +// The title of the referendum. (e.g. 'Proposition 42') This field is only +// populated for contests of type 'Referendum'. +@property (copy) NSString *referendumTitle; + +// A link the referendum. This field is only populated for contests of type +// 'Referendum'. +@property (copy) NSString *referendumUrl; + +// A list of sources for this contest. If multiple sources are listed, the data +// has been aggregated from those sources. +@property (retain) NSArray *sources; // of GTLCivicInfoSource + +// "Yes" or "No" depending on whether this a contest being held outside the +// normal election cycle. +@property (copy) NSString *special; + +// The type of contest. Usually this will be 'General', 'Primary', or 'Run-off' +// for contests with candidates. For referenda this will be 'Referendum'. +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoContest.m b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoContest.m new file mode 100644 index 0000000..932e7b6 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoContest.m @@ -0,0 +1,57 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoContest.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoContest (0 custom class methods, 15 custom properties) + +#import "GTLCivicInfoContest.h" + +#import "GTLCivicInfoCandidate.h" +#import "GTLCivicInfoElectoralDistrict.h" +#import "GTLCivicInfoSource.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoContest +// + +@implementation GTLCivicInfoContest +@dynamic ballotPlacement, candidates, district, electorateSpecifications, level, + numberElected, numberVotingFor, office, primaryParty, + referendumSubtitle, referendumTitle, referendumUrl, sources, special, + type; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLCivicInfoCandidate class], @"candidates", + [GTLCivicInfoSource class], @"sources", + nil]; + return map; +} + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoElection.h b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoElection.h new file mode 100644 index 0000000..74719fb --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoElection.h @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoElection.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoElection (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoElection +// + +// Information about the election that was queried. + +@interface GTLCivicInfoElection : GTLObject + +// Day of the election in YYYY-MM-DD format. +@property (copy) NSString *electionDay; + +// The unique ID of this election. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +// A displayable name for the election. +@property (copy) NSString *name; + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoElection.m b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoElection.m new file mode 100644 index 0000000..7f8c605 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoElection.m @@ -0,0 +1,48 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoElection.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoElection (0 custom class methods, 3 custom properties) + +#import "GTLCivicInfoElection.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoElection +// + +@implementation GTLCivicInfoElection +@dynamic electionDay, identifier, name; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoElectionOfficial.h b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoElectionOfficial.h new file mode 100644 index 0000000..219a43a --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoElectionOfficial.h @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoElectionOfficial.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoElectionOfficial (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoElectionOfficial +// + +// Information about individual election officials. + +@interface GTLCivicInfoElectionOfficial : GTLObject + +// The email address of the election official. +@property (copy) NSString *emailAddress; + +// The fax number of the election official. +@property (copy) NSString *faxNumber; + +// The full name of the election official. +@property (copy) NSString *name; + +// The office phone number of the election official. +@property (copy) NSString *officePhoneNumber; + +// The title of the election official. +@property (copy) NSString *title; + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoElectionOfficial.m b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoElectionOfficial.m new file mode 100644 index 0000000..7211694 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoElectionOfficial.m @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoElectionOfficial.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoElectionOfficial (0 custom class methods, 5 custom properties) + +#import "GTLCivicInfoElectionOfficial.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoElectionOfficial +// + +@implementation GTLCivicInfoElectionOfficial +@dynamic emailAddress, faxNumber, name, officePhoneNumber, title; +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoElectionsQueryResponse.h b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoElectionsQueryResponse.h new file mode 100644 index 0000000..48b2030 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoElectionsQueryResponse.h @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoElectionsQueryResponse.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoElectionsQueryResponse (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCivicInfoElection; + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoElectionsQueryResponse +// + +// The list of elections available for this version of the API. + +@interface GTLCivicInfoElectionsQueryResponse : GTLObject + +// A list of available elections +@property (retain) NSArray *elections; // of GTLCivicInfoElection + +// The kind, fixed to "civicinfo#electionsQueryResponse". +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoElectionsQueryResponse.m b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoElectionsQueryResponse.m new file mode 100644 index 0000000..a6f2a34 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoElectionsQueryResponse.m @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoElectionsQueryResponse.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoElectionsQueryResponse (0 custom class methods, 2 custom properties) + +#import "GTLCivicInfoElectionsQueryResponse.h" + +#import "GTLCivicInfoElection.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoElectionsQueryResponse +// + +@implementation GTLCivicInfoElectionsQueryResponse +@dynamic elections, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLCivicInfoElection class] + forKey:@"elections"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"civicinfo#electionsQueryResponse"]; +} + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoElectoralDistrict.h b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoElectoralDistrict.h new file mode 100644 index 0000000..c96d366 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoElectoralDistrict.h @@ -0,0 +1,59 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoElectoralDistrict.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoElectoralDistrict (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoElectoralDistrict +// + +// Describes the geographic scope of a contest. + +@interface GTLCivicInfoElectoralDistrict : GTLObject + +// An identifier for this district, relative to its scope. For example, the 34th +// State Senate district would have id "34" and a scope of stateUpper. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The name of the district. +@property (copy) NSString *name; + +// The geographic scope of this district. If unspecified the district's +// geography is not known. One of: statewide, congressional, stateUpper, +// stateLower, countywide, judicial, schoolBoard, cityWide, special +@property (copy) NSString *scope; + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoElectoralDistrict.m b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoElectoralDistrict.m new file mode 100644 index 0000000..2518ca4 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoElectoralDistrict.m @@ -0,0 +1,48 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoElectoralDistrict.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoElectoralDistrict (0 custom class methods, 3 custom properties) + +#import "GTLCivicInfoElectoralDistrict.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoElectoralDistrict +// + +@implementation GTLCivicInfoElectoralDistrict +@dynamic identifier, name, scope; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoPollingLocation.h b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoPollingLocation.h new file mode 100644 index 0000000..f0f4ab8 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoPollingLocation.h @@ -0,0 +1,79 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoPollingLocation.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoPollingLocation (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCivicInfoSimpleAddressType; +@class GTLCivicInfoSource; + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoPollingLocation +// + +// A location where a voter can vote. This may be an early vote site or an +// election day voting location. + +@interface GTLCivicInfoPollingLocation : GTLObject + +// The address of the location +@property (retain) GTLCivicInfoSimpleAddressType *address; + +// The last date that this early vote site may be used. This field is not +// populated for polling locations. +@property (copy) NSString *endDate; + +// The name of the early vote site. This field is not populated for polling +// locations. +@property (copy) NSString *name; + +// Notes about this location (e.g. accessibility ramp or entrance to use) +@property (copy) NSString *notes; + +// A description of when this location is open. +@property (copy) NSString *pollingHours; + +// A list of sources for this location. If multiple sources are listed the data +// has been aggregated from those sources. +@property (retain) NSArray *sources; // of GTLCivicInfoSource + +// The first date that this early vote site may be used. This field is not +// populated for polling locations. +@property (copy) NSString *startDate; + +// The services provided by this early vote site. This field is not populated +// for polling locations. +@property (copy) NSString *voterServices; + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoPollingLocation.m b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoPollingLocation.m new file mode 100644 index 0000000..6e054ee --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoPollingLocation.m @@ -0,0 +1,52 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoPollingLocation.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoPollingLocation (0 custom class methods, 8 custom properties) + +#import "GTLCivicInfoPollingLocation.h" + +#import "GTLCivicInfoSimpleAddressType.h" +#import "GTLCivicInfoSource.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoPollingLocation +// + +@implementation GTLCivicInfoPollingLocation +@dynamic address, endDate, name, notes, pollingHours, sources, startDate, + voterServices; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLCivicInfoSource class] + forKey:@"sources"]; + return map; +} + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoSimpleAddressType.h b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoSimpleAddressType.h new file mode 100644 index 0000000..b66037e --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoSimpleAddressType.h @@ -0,0 +1,67 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoSimpleAddressType.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoSimpleAddressType (0 custom class methods, 7 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoSimpleAddressType +// + +// A simple representation of an address. + +@interface GTLCivicInfoSimpleAddressType : GTLObject + +// The city or town for the address. +@property (copy) NSString *city; + +// The street name and number of this address. +@property (copy) NSString *line1; + +// The second line the address, if needed. +@property (copy) NSString *line2; + +// The third line of the address, if needed. +@property (copy) NSString *line3; + +// The name of the location. +@property (copy) NSString *locationName; + +// The US two letter state abbreviation of the address. +@property (copy) NSString *state; + +// The US Postal Zip Code of the address. +@property (copy) NSString *zip; + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoSimpleAddressType.m b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoSimpleAddressType.m new file mode 100644 index 0000000..181b269 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoSimpleAddressType.m @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoSimpleAddressType.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoSimpleAddressType (0 custom class methods, 7 custom properties) + +#import "GTLCivicInfoSimpleAddressType.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoSimpleAddressType +// + +@implementation GTLCivicInfoSimpleAddressType +@dynamic city, line1, line2, line3, locationName, state, zip; +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoSource.h b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoSource.h new file mode 100644 index 0000000..dcfe605 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoSource.h @@ -0,0 +1,52 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoSource.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoSource (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoSource +// + +// Contains information about the data source for the element containing it. + +@interface GTLCivicInfoSource : GTLObject + +// The name of the data source. +@property (copy) NSString *name; + +// Whether this data comes from an official government source. +@property (retain) NSNumber *official; // boolValue + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoSource.m b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoSource.m new file mode 100644 index 0000000..0a159ec --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoSource.m @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoSource.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoSource (0 custom class methods, 2 custom properties) + +#import "GTLCivicInfoSource.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoSource +// + +@implementation GTLCivicInfoSource +@dynamic name, official; +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoVoterInfoResponse.h b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoVoterInfoResponse.h new file mode 100644 index 0000000..62c3065 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoVoterInfoResponse.h @@ -0,0 +1,82 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoVoterInfoResponse.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoVoterInfoResponse (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLCivicInfoAdministrationRegion; +@class GTLCivicInfoContest; +@class GTLCivicInfoElection; +@class GTLCivicInfoPollingLocation; +@class GTLCivicInfoSimpleAddressType; + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoVoterInfoResponse +// + +// The result of a voter info lookup query. + +@interface GTLCivicInfoVoterInfoResponse : GTLObject + +// Contests that will appear on the voter's ballot +@property (retain) NSArray *contests; // of GTLCivicInfoContest + +// Locations where the voter is eligible to vote early, prior to election day +@property (retain) NSArray *earlyVoteSites; // of GTLCivicInfoPollingLocation + +// The election that was queried. +@property (retain) GTLCivicInfoElection *election; + +// The kind, fixed to "civicinfo#voterInfoResponse". +@property (copy) NSString *kind; + +// The normalized version of the requested address +@property (retain) GTLCivicInfoSimpleAddressType *normalizedInput; + +// Locations where the voter is eligible to vote on election day. For states +// with mail-in voting only, these locations will be nearby drop box locations. +// Drop box locations are free to the voter and may be used instead of placing +// the ballot in the mail. +@property (retain) NSArray *pollingLocations; // of GTLCivicInfoPollingLocation + +// Local Election Information for the state that the voter votes in. For the US, +// there will only be one element in this array. +@property (retain) NSArray *state; // of GTLCivicInfoAdministrationRegion + +// The result of the request. One of: success, noStreetSegmentFound, +// addressUnparseable, noAddressParameter, multipleStreetSegmentsFound, +// electionOver, electionUnknown, internalLookupFailure +@property (copy) NSString *status; + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoVoterInfoResponse.m b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoVoterInfoResponse.m new file mode 100644 index 0000000..a7c1866 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfoVoterInfoResponse.m @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfoVoterInfoResponse.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLCivicInfoVoterInfoResponse (0 custom class methods, 8 custom properties) + +#import "GTLCivicInfoVoterInfoResponse.h" + +#import "GTLCivicInfoAdministrationRegion.h" +#import "GTLCivicInfoContest.h" +#import "GTLCivicInfoElection.h" +#import "GTLCivicInfoPollingLocation.h" +#import "GTLCivicInfoSimpleAddressType.h" + +// ---------------------------------------------------------------------------- +// +// GTLCivicInfoVoterInfoResponse +// + +@implementation GTLCivicInfoVoterInfoResponse +@dynamic contests, earlyVoteSites, election, kind, normalizedInput, + pollingLocations, state, status; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLCivicInfoContest class], @"contests", + [GTLCivicInfoPollingLocation class], @"earlyVoteSites", + [GTLCivicInfoPollingLocation class], @"pollingLocations", + [GTLCivicInfoAdministrationRegion class], @"state", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"civicinfo#voterInfoResponse"]; +} + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfo_Sources.m b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfo_Sources.m new file mode 100644 index 0000000..6a9b75f --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLCivicInfo_Sources.m @@ -0,0 +1,47 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCivicInfo_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information + +#import "GTLCivicInfoAdministrationRegion.m" +#import "GTLCivicInfoAdministrativeBody.m" +#import "GTLCivicInfoCandidate.m" +#import "GTLCivicInfoChannel.m" +#import "GTLCivicInfoContest.m" +#import "GTLCivicInfoElection.m" +#import "GTLCivicInfoElectionOfficial.m" +#import "GTLCivicInfoElectionsQueryResponse.m" +#import "GTLCivicInfoElectoralDistrict.m" +#import "GTLCivicInfoPollingLocation.m" +#import "GTLCivicInfoSimpleAddressType.m" +#import "GTLCivicInfoSource.m" +#import "GTLCivicInfoVoterInfoResponse.m" + +#import "GTLQueryCivicInfo.m" +#import "GTLServiceCivicInfo.m" diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLQueryCivicInfo.h b/GTL/Source/Services/CivicInfo/Generated/GTLQueryCivicInfo.h new file mode 100644 index 0000000..460ff68 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLQueryCivicInfo.h @@ -0,0 +1,76 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryCivicInfo.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLQueryCivicInfo (2 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@interface GTLQueryCivicInfo : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *address; +@property (assign) long long electionId; +@property (assign) BOOL officialOnly; + +#pragma mark - +#pragma mark "elections" methods +// These create a GTLQueryCivicInfo object. + +// Method: civicinfo.elections.electionQuery +// List of available elections to query. +// Fetches a GTLCivicInfoElectionsQueryResponse. ++ (id)queryForElectionsElectionQuery; + +// Method: civicinfo.elections.voterInfoQuery +// Looks up information relevant to a voter based on the voter's registered +// address. +// Required: +// electionId: The unique ID of the election to look up. A list of election +// IDs can be obtained +// at.https://www.googleapis.com/civicinfo/{version}/elections +// Optional: +// address: The registered address of the voter to look up. +// officialOnly: If set to true, only data from official state sources will be +// returned. +// Fetches a GTLCivicInfoVoterInfoResponse. ++ (id)queryForElectionsVoterInfoQueryWithElectionId:(long long)electionId; + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLQueryCivicInfo.m b/GTL/Source/Services/CivicInfo/Generated/GTLQueryCivicInfo.m new file mode 100644 index 0000000..1340ad0 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLQueryCivicInfo.m @@ -0,0 +1,59 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryCivicInfo.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLQueryCivicInfo (2 custom class methods, 4 custom properties) + +#import "GTLQueryCivicInfo.h" + +#import "GTLCivicInfoElectionsQueryResponse.h" +#import "GTLCivicInfoVoterInfoResponse.h" + +@implementation GTLQueryCivicInfo + +@dynamic address, electionId, fields, officialOnly; + +#pragma mark - +#pragma mark "elections" methods +// These create a GTLQueryCivicInfo object. + ++ (id)queryForElectionsElectionQuery { + NSString *methodName = @"civicinfo.elections.electionQuery"; + GTLQueryCivicInfo *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLCivicInfoElectionsQueryResponse class]; + return query; +} + ++ (id)queryForElectionsVoterInfoQueryWithElectionId:(long long)electionId { + NSString *methodName = @"civicinfo.elections.voterInfoQuery"; + GTLQueryCivicInfo *query = [self queryWithMethodName:methodName]; + query.electionId = electionId; + query.expectedObjectClass = [GTLCivicInfoVoterInfoResponse class]; + return query; +} + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLServiceCivicInfo.h b/GTL/Source/Services/CivicInfo/Generated/GTLServiceCivicInfo.h new file mode 100644 index 0000000..e3a272c --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLServiceCivicInfo.h @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceCivicInfo.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLServiceCivicInfo (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceCivicInfo : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryCivicInfo.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/CivicInfo/Generated/GTLServiceCivicInfo.m b/GTL/Source/Services/CivicInfo/Generated/GTLServiceCivicInfo.m new file mode 100644 index 0000000..ce25d66 --- /dev/null +++ b/GTL/Source/Services/CivicInfo/Generated/GTLServiceCivicInfo.m @@ -0,0 +1,73 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceCivicInfo.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Civic Information API (civicinfo/us_v1) +// Description: +// An API for accessing civic information. +// Documentation: +// https://developers.google.com/civic-information +// Classes: +// GTLServiceCivicInfo (0 custom class methods, 0 custom properties) + +#import "GTLCivicInfo.h" + +@implementation GTLServiceCivicInfo + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryCivicInfo class], + [GTLCivicInfoAdministrationRegion class], + [GTLCivicInfoAdministrativeBody class], + [GTLCivicInfoCandidate class], + [GTLCivicInfoChannel class], + [GTLCivicInfoContest class], + [GTLCivicInfoElection class], + [GTLCivicInfoElectionOfficial class], + [GTLCivicInfoElectionsQueryResponse class], + [GTLCivicInfoElectoralDistrict class], + [GTLCivicInfoPollingLocation class], + [GTLCivicInfoSimpleAddressType class], + [GTLCivicInfoSource class], + [GTLCivicInfoVoterInfoResponse class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"us_v1"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Compute/.svn/all-wcprops b/GTL/Source/Services/Compute/.svn/all-wcprops new file mode 100644 index 0000000..9c82229 --- /dev/null +++ b/GTL/Source/Services/Compute/.svn/all-wcprops @@ -0,0 +1,5 @@ +K 25 +svn:wc:ra_dav:version-url +V 47 +/svn/!svn/ver/242/trunk/Source/Services/Compute +END diff --git a/GTL/Source/Services/Compute/.svn/entries b/GTL/Source/Services/Compute/.svn/entries new file mode 100644 index 0000000..28aeb7b --- /dev/null +++ b/GTL/Source/Services/Compute/.svn/entries @@ -0,0 +1,31 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Compute +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +Generated +dir + diff --git a/GTL/Source/Services/Compute/Generated/.svn/all-wcprops b/GTL/Source/Services/Compute/Generated/.svn/all-wcprops new file mode 100644 index 0000000..f80dd93 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/all-wcprops @@ -0,0 +1,377 @@ +K 25 +svn:wc:ra_dav:version-url +V 57 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated +END +GTLComputeKernel.m +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeKernel.m +END +GTLComputeNetworkList.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeNetworkList.h +END +GTLComputeDiskList.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeDiskList.h +END +GTLCompute_Sources.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLCompute_Sources.m +END +GTLComputeImage.m +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeImage.m +END +GTLComputeAttachedDisk.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeAttachedDisk.h +END +GTLComputeNetwork.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeNetwork.h +END +GTLComputeNetworkList.m +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeNetworkList.m +END +GTLComputeDisk.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeDisk.h +END +GTLComputeDiskList.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeDiskList.m +END +GTLComputeAttachedDisk.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeAttachedDisk.m +END +GTLComputeNetwork.m +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeNetwork.m +END +GTLComputeDisk.m +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeDisk.m +END +GTLComputeInstanceList.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeInstanceList.h +END +GTLComputeMachineTypeList.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeMachineTypeList.h +END +GTLComputeInstance.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeInstance.h +END +GTLComputeInstanceList.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeInstanceList.m +END +GTLComputeMachineType.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeMachineType.h +END +GTLComputeProject.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeProject.h +END +GTLComputeMachineTypeList.m +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeMachineTypeList.m +END +GTLComputeInstance.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeInstance.m +END +GTLComputeNetworkInterface.h +K 25 +svn:wc:ra_dav:version-url +V 86 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeNetworkInterface.h +END +GTLComputeProject.m +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeProject.m +END +GTLComputeMachineType.m +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeMachineType.m +END +GTLComputeServiceAccount.h +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeServiceAccount.h +END +GTLCompute.h +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLCompute.h +END +GTLComputeNetworkInterface.m +K 25 +svn:wc:ra_dav:version-url +V 86 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeNetworkInterface.m +END +GTLComputeMetadata.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeMetadata.h +END +GTLComputeServiceAccount.m +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeServiceAccount.m +END +GTLComputeMetadata.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeMetadata.m +END +GTLComputeAccessConfig.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeAccessConfig.h +END +GTLComputeSnapshotList.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeSnapshotList.h +END +GTLComputeAccessConfig.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeAccessConfig.m +END +GTLComputeOperationList.h +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeOperationList.h +END +GTLComputeSnapshot.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeSnapshot.h +END +GTLComputeSnapshotList.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeSnapshotList.m +END +GTLServiceCompute.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLServiceCompute.h +END +GTLComputeOperation.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeOperation.h +END +GTLComputeFirewallList.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeFirewallList.h +END +GTLComputeOperationList.m +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeOperationList.m +END +GTLComputeSnapshot.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeSnapshot.m +END +GTLServiceCompute.m +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLServiceCompute.m +END +GTLComputeFirewall.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeFirewall.h +END +GTLComputeOperation.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeOperation.m +END +GTLQueryCompute.h +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLQueryCompute.h +END +GTLComputeSerialPortOutput.h +K 25 +svn:wc:ra_dav:version-url +V 86 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeSerialPortOutput.h +END +GTLComputeFirewallList.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeFirewallList.m +END +GTLComputeZoneList.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeZoneList.h +END +GTLComputeFirewall.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeFirewall.m +END +GTLQueryCompute.m +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLQueryCompute.m +END +GTLComputeSerialPortOutput.m +K 25 +svn:wc:ra_dav:version-url +V 86 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeSerialPortOutput.m +END +GTLComputeZone.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeZone.h +END +GTLComputeConstants.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeConstants.h +END +GTLComputeZoneList.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeZoneList.m +END +GTLComputeKernelList.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeKernelList.h +END +GTLComputeImageList.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeImageList.h +END +GTLComputeZone.m +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeZone.m +END +GTLComputeKernel.h +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeKernel.h +END +GTLComputeKernelList.m +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeKernelList.m +END +GTLComputeConstants.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeConstants.m +END +GTLComputeImage.h +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeImage.h +END +GTLComputeImageList.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/242/trunk/Source/Services/Compute/Generated/GTLComputeImageList.m +END diff --git a/GTL/Source/Services/Compute/Generated/.svn/entries b/GTL/Source/Services/Compute/Generated/.svn/entries new file mode 100644 index 0000000..2e2f1e3 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/entries @@ -0,0 +1,2136 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Compute/Generated +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +GTLComputeKernel.m +file + + + + +2012-12-09T08:42:33.000000Z +165f17eea93e3a12391717b4e36cfa98 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1617 + +GTLComputeNetworkList.h +file + + + + +2012-12-09T08:42:33.000000Z +d8611bf6185366d2c1da64890b1bd620 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2050 + +GTLComputeDiskList.h +file + + + + +2012-12-09T08:42:33.000000Z +9b01084f6e762f5f52a1c3bd7d794043 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2040 + +GTLCompute_Sources.m +file + + + + +2012-12-09T08:42:33.000000Z +55707f05a356ffb9a6a25813ddeb7f93 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2071 + +GTLComputeImage.m +file + + + + +2012-12-09T08:42:33.000000Z +528f00a6577dd5fef7b95d4220d63fda +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2212 + +GTLComputeAttachedDisk.h +file + + + + +2012-12-09T08:42:33.000000Z +af06f756e1f3caf34f7a08d23f77e27a +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2519 + +GTLComputeNetwork.h +file + + + + +2012-12-09T08:42:33.000000Z +d603e9757dc24e25f0ccacdd74294361 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2750 + +GTLComputeNetworkList.m +file + + + + +2012-12-09T08:42:33.000000Z +f0f7a187bb33fac92dd8eb284da37831 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1809 + +GTLComputeDisk.h +file + + + + +2012-12-09T08:42:33.000000Z +0395e4284b348c99818e2fc1e8232d03 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3238 + +GTLComputeDiskList.m +file + + + + +2012-12-09T08:42:33.000000Z +eef1d5b0af45cafa1e98efac60cf464e +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1785 + +GTLComputeAttachedDisk.m +file + + + + +2012-12-09T08:42:33.000000Z +c3f257226a8acb2af55ab9fc6be042e6 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1420 + +GTLComputeNetwork.m +file + + + + +2012-12-09T08:42:33.000000Z +d40c3f326358920937e78878da69cd95 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1647 + +GTLComputeDisk.m +file + + + + +2012-12-09T08:42:33.000000Z +fecc9d10ef20a80a5d1c39e77f4e9c3b +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1720 + +GTLComputeInstanceList.h +file + + + + +2012-12-09T08:42:33.000000Z +416345c2dffc954923fe82d8ce3d99d2 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2063 + +GTLComputeMachineTypeList.h +file + + + + +2012-12-09T08:42:33.000000Z +73ce1408f5e1c443153268f848ab2982 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2079 + +GTLComputeInstance.h +file + + + + +2012-12-09T08:42:33.000000Z +247b34dbd54a11639ff806b38331850d +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4625 + +GTLComputeInstanceList.m +file + + + + +2012-12-09T08:42:33.000000Z +42eb2f1e69817228414a7c81ad81f38e +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1817 + +GTLComputeMachineType.h +file + + + + +2012-12-09T08:42:33.000000Z +ce9715b9b0265e11250da48dfae7e344 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3289 + +GTLComputeProject.h +file + + + + +2012-12-09T08:42:33.000000Z +1065d37b9451ace696e4b884c106fe76 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2972 + +GTLComputeMachineTypeList.m +file + + + + +2012-12-09T08:42:33.000000Z +d54f6a9f6c2e5193efbb8545e2816e96 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1841 + +GTLComputeInstance.m +file + + + + +2012-12-09T08:42:33.000000Z +309cd40ef61b4cc537355635324a20ad +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2278 + +GTLComputeNetworkInterface.h +file + + + + +2012-12-09T08:42:33.000000Z +56b272524861159fa5e1ce925cb68ed4 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2291 + +GTLComputeProject.m +file + + + + +2012-12-09T08:42:33.000000Z +1ae17b7eef96b228fc8fb6ead3c669ca +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2234 + +GTLComputeMachineType.m +file + + + + +2012-12-09T08:42:33.000000Z +ce8eb891fed1f4c50871a9bafd6b26f7 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2339 + +GTLComputeServiceAccount.h +file + + + + +2012-12-09T08:42:33.000000Z +106ed886593fc657b038fac50b8b4035 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1597 + +GTLCompute.h +file + + + + +2012-12-09T08:42:33.000000Z +79bfd39a3edc7621e930cbb2ee2df680 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1952 + +GTLComputeNetworkInterface.m +file + + + + +2012-12-09T08:42:33.000000Z +9714155c7dbfbdc01f2ca15a38567c8f +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1674 + +GTLComputeMetadata.h +file + + + + +2012-12-09T08:42:33.000000Z +38e0d4d2e5c7a286c16f5189dca22b01 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2608 + +GTLComputeServiceAccount.m +file + + + + +2012-12-09T08:42:33.000000Z +fba65be743243843521a2374d0c69ceb +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1579 + +GTLComputeMetadata.m +file + + + + +2012-12-09T08:42:33.000000Z +8f8ce8ac9bf1d6798bbe7f90629c2ff9 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1824 + +GTLComputeAccessConfig.h +file + + + + +2012-12-09T08:42:33.000000Z +3b2156bed3d10f5d052565d5b9bf543b +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1845 + +GTLComputeSnapshotList.h +file + + + + +2012-12-09T08:42:33.000000Z +65fc14b17d3a6b93ff5b0770656e8b6b +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2068 + +GTLComputeAccessConfig.m +file + + + + +2012-12-09T08:42:33.000000Z +1c122cef2349fc3a9fce27de98517ab8 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1381 + +GTLComputeOperationList.h +file + + + + +2012-12-09T08:42:33.000000Z +afe999c4a1a45c5609446e4373fe2a89 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2064 + +GTLComputeSnapshot.h +file + + + + +2012-12-09T08:42:33.000000Z +7ef1b6d9e24497265979f22551f0fd32 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2921 + +GTLComputeSnapshotList.m +file + + + + +2012-12-09T08:42:33.000000Z +aff5bdc58da97f3140d8ec65a4a5145b +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1817 + +GTLServiceCompute.h +file + + + + +2012-12-09T08:42:33.000000Z +a3818ede18dfa9204c654ce6206e62cb +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2119 + +GTLComputeOperation.h +file + + + + +2012-12-09T08:42:33.000000Z +876caedad4161f34278e065a2927abad +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +5135 + +GTLComputeFirewallList.h +file + + + + +2012-12-09T08:42:33.000000Z +1faa645b11ad3a18972837e30b520a75 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2057 + +GTLComputeOperationList.m +file + + + + +2012-12-09T08:42:33.000000Z +88c487517b4ce3948edc047f826d3262 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1825 + +GTLComputeSnapshot.m +file + + + + +2012-12-09T08:42:33.000000Z +0e1567031ad22c7c494749146e9e2691 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1676 + +GTLServiceCompute.m +file + + + + +2012-12-09T08:42:33.000000Z +12058376167bc1bdae621d94c4944f1a +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3251 + +GTLComputeFirewall.h +file + + + + +2012-12-09T08:42:33.000000Z +e39c948cf7e870adf564465ccf2b07d7 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4288 + +GTLComputeOperation.m +file + + + + +2012-12-09T08:42:33.000000Z +88b19e9ab192b3b9bd0d27c3f66476e1 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2552 + +GTLQueryCompute.h +file + + + + +2012-12-09T08:42:33.000000Z +eedb3b09102326bfc8f6c8616c209eb2 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +23795 + +GTLComputeSerialPortOutput.h +file + + + + +2012-12-09T08:42:33.000000Z +81fd60c6de2a41d1a46f9a6d2365f071 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1601 + +GTLComputeFirewallList.m +file + + + + +2012-12-09T08:42:33.000000Z +eb959a4d79fc92c12247c93565a36dd6 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1817 + +GTLComputeZoneList.h +file + + + + +2012-12-09T08:42:33.000000Z +efebd634c4bccba4134eba90d671f624 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2029 + +GTLComputeFirewall.m +file + + + + +2012-12-09T08:42:33.000000Z +05840bf2c241d14ea84f917fec550c9f +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2479 + +GTLQueryCompute.m +file + + + + +2012-12-09T08:42:33.000000Z +10395159c4959116adb11c6832974b09 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +18897 + +GTLComputeSerialPortOutput.m +file + + + + +2012-12-09T08:42:33.000000Z +1306ccf93cdc6560498b1e8bc15ab518 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1406 + +GTLComputeZone.h +file + + + + +2012-12-09T08:42:33.000000Z +9aba4d3ccb156c10e3246bcaf881ffd6 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3217 + +GTLComputeConstants.h +file + + + + +2012-12-09T08:42:33.000000Z +9530c317ce1450079902d4d1155f1f64 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1633 + +GTLComputeZoneList.m +file + + + + +2012-12-09T08:42:33.000000Z +b2dd1d1ab21db8e1c96b681bea81c7b5 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1785 + +GTLComputeKernelList.h +file + + + + +2012-12-09T08:42:33.000000Z +10dc9d4bf432bef52edb3cd27548a7e4 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2043 + +GTLComputeImageList.h +file + + + + +2012-12-09T08:42:33.000000Z +6f857e324fe29902d5c0bbe7b861c510 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2041 + +GTLComputeZone.m +file + + + + +2012-12-09T08:42:33.000000Z +fb473dc561611812929327ef28c043b8 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2454 + +GTLComputeKernel.h +file + + + + +2012-12-09T08:42:33.000000Z +c8af14935228083a47f499540af7dadd +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2017 + +GTLComputeKernelList.m +file + + + + +2012-12-09T08:42:33.000000Z +b81d407adf61a682175ce7fe505aa747 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1801 + +GTLComputeConstants.m +file + + + + +2012-12-09T08:42:33.000000Z +44212aae4e0fe33078a72b44e5d83b88 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1367 + +GTLComputeImage.h +file + + + + +2012-12-09T08:42:33.000000Z +6f9abbdbc750848d355378922cbab1f6 +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3868 + +GTLComputeImageList.m +file + + + + +2012-12-09T08:42:33.000000Z +749586df3b4ca55adeffebd05b28dabf +2012-11-14T23:43:09.613969Z +242 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1793 + diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLCompute.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLCompute.h.svn-base new file mode 100644 index 0000000..4f8f104 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLCompute.h.svn-base @@ -0,0 +1,60 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCompute.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 + +#import "GTLComputeConstants.h" + +#import "GTLComputeAccessConfig.h" +#import "GTLComputeAttachedDisk.h" +#import "GTLComputeDisk.h" +#import "GTLComputeDiskList.h" +#import "GTLComputeFirewall.h" +#import "GTLComputeFirewallList.h" +#import "GTLComputeImage.h" +#import "GTLComputeImageList.h" +#import "GTLComputeInstance.h" +#import "GTLComputeInstanceList.h" +#import "GTLComputeKernel.h" +#import "GTLComputeKernelList.h" +#import "GTLComputeMachineType.h" +#import "GTLComputeMachineTypeList.h" +#import "GTLComputeMetadata.h" +#import "GTLComputeNetwork.h" +#import "GTLComputeNetworkInterface.h" +#import "GTLComputeNetworkList.h" +#import "GTLComputeOperation.h" +#import "GTLComputeOperationList.h" +#import "GTLComputeProject.h" +#import "GTLComputeSerialPortOutput.h" +#import "GTLComputeServiceAccount.h" +#import "GTLComputeSnapshot.h" +#import "GTLComputeSnapshotList.h" +#import "GTLComputeZone.h" +#import "GTLComputeZoneList.h" + +#import "GTLQueryCompute.h" +#import "GTLServiceCompute.h" diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeAccessConfig.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeAccessConfig.h.svn-base new file mode 100644 index 0000000..f61a308 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeAccessConfig.h.svn-base @@ -0,0 +1,59 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeAccessConfig.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeAccessConfig (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLComputeAccessConfig +// + +@interface GTLComputeAccessConfig : GTLObject + +// Type of the resource. +@property (copy) NSString *kind; + +// Name of this access configuration. +@property (copy) NSString *name; + +// An external IP address associated with this instance. Specify an unused +// static IP address available to the project. If left blank, the external IP +// will be drawn from a shared ephemeral pool. +@property (copy) NSString *natIP; + +// Type of configuration. Must be set to "ONE_TO_ONE_NAT". This configures +// port-for-port NAT to the internet. +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeAccessConfig.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeAccessConfig.m.svn-base new file mode 100644 index 0000000..9ffb873 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeAccessConfig.m.svn-base @@ -0,0 +1,45 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeAccessConfig.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeAccessConfig (0 custom class methods, 4 custom properties) + +#import "GTLComputeAccessConfig.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeAccessConfig +// + +@implementation GTLComputeAccessConfig +@dynamic kind, name, natIP, type; + ++ (void)load { + [self registerObjectClassForKind:@"compute#accessConfig"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeAttachedDisk.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeAttachedDisk.h.svn-base new file mode 100644 index 0000000..647ec23 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeAttachedDisk.h.svn-base @@ -0,0 +1,72 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeAttachedDisk.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeAttachedDisk (0 custom class methods, 7 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLComputeAttachedDisk +// + +@interface GTLComputeAttachedDisk : GTLObject + +// Persistent disk only; If true, delete the disk and all its data when the +// associated instance is deleted. This property defaults to false if not +// specified. +@property (retain) NSNumber *deleteOnTerminate; // boolValue + +// Persistent disk only; must be unique within the instance when specified. This +// represents a unique device name that is reflected into the /dev/ tree of a +// Linux operating system running within the instance. If not specified, a +// default will be chosen by the system. +@property (copy) NSString *deviceName; + +// A zero-based index to assign to this disk, where 0 is reserved for the boot +// disk. If not specified, the server will choose an appropriate value. +@property (retain) NSNumber *index; // intValue + +// Type of the resource. +@property (copy) NSString *kind; + +// The mode in which to attach this disk, either "READ_WRITE" or "READ_ONLY". +@property (copy) NSString *mode; + +// Persistent disk only; the URL of the persistent disk resource. +@property (copy) NSString *source; + +// Type of the disk, either "EPHEMERAL" or "PERSISTENT". Note that persistent +// disks must be created before you can specify them here. +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeAttachedDisk.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeAttachedDisk.m.svn-base new file mode 100644 index 0000000..eedac07 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeAttachedDisk.m.svn-base @@ -0,0 +1,45 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeAttachedDisk.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeAttachedDisk (0 custom class methods, 7 custom properties) + +#import "GTLComputeAttachedDisk.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeAttachedDisk +// + +@implementation GTLComputeAttachedDisk +@dynamic deleteOnTerminate, deviceName, index, kind, mode, source, type; + ++ (void)load { + [self registerObjectClassForKind:@"compute#attachedDisk"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeConstants.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeConstants.h.svn-base new file mode 100644 index 0000000..537c7f6 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeConstants.h.svn-base @@ -0,0 +1,43 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// View and manage your Google Compute Engine resources +GTL_EXTERN NSString * const kGTLAuthScopeCompute; // "https://www.googleapis.com/auth/compute" +// View your data in Google Cloud Storage +GTL_EXTERN NSString * const kGTLAuthScopeComputeDevstorageReadOnly; // "https://www.googleapis.com/auth/devstorage.read_only" +// View your Google Compute Engine resources +GTL_EXTERN NSString * const kGTLAuthScopeComputeReadonly; // "https://www.googleapis.com/auth/compute.readonly" diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeConstants.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeConstants.m.svn-base new file mode 100644 index 0000000..0e84713 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeConstants.m.svn-base @@ -0,0 +1,34 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 + +#import "GTLComputeConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeCompute = @"https://www.googleapis.com/auth/compute"; +NSString * const kGTLAuthScopeComputeDevstorageReadOnly = @"https://www.googleapis.com/auth/devstorage.read_only"; +NSString * const kGTLAuthScopeComputeReadonly = @"https://www.googleapis.com/auth/compute.readonly"; diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeDisk.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeDisk.h.svn-base new file mode 100644 index 0000000..beefb57 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeDisk.h.svn-base @@ -0,0 +1,91 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeDisk.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeDisk (0 custom class methods, 12 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLComputeDisk +// + +@interface GTLComputeDisk : GTLObject + +// Creation timestamp in RFC3339 text format (output only). +@property (copy) NSString *creationTimestamp; + +// An optional textual description of the resource; provided by the client when +// the resource is created. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // unsignedLongLongValue + +// Type of the resource. +@property (copy) NSString *kind; + +// Name of the resource; provided by the client when the resource is created. +// The name must be 1-63 characters long, and comply with RFC1035. +@property (copy) NSString *name; + +// Internal use only. +@property (copy) NSString *options; + +// Server defined URL for the resource (output only). +@property (copy) NSString *selfLink; + +// Size of the persistent disk, specified in GB. +@property (retain) NSNumber *sizeGb; // longLongValue + +// The source snapshot used to create this disk. Once the source snapshot has +// been deleted from the system, this field will be cleared, and will not be set +// even if a snapshot with the same name has been re-created. +@property (copy) NSString *sourceSnapshot; + +// The 'id' value of the snapshot used to create this disk. This value may be +// used to determine whether the disk was created from the current or a previous +// instance of a given disk snapshot. +@property (copy) NSString *sourceSnapshotId; + +// The status of disk creation (output only). +@property (copy) NSString *status; + +// URL for the zone where the persistent disk resides; provided by the client +// when the disk is created. A persistent disk must reside in the same zone as +// the instance to which it is attached. +// Remapped to 'zoneProperty' to avoid NSObject's 'zone'. +@property (copy) NSString *zoneProperty; + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeDisk.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeDisk.m.svn-base new file mode 100644 index 0000000..4d21f34 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeDisk.m.svn-base @@ -0,0 +1,57 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeDisk.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeDisk (0 custom class methods, 12 custom properties) + +#import "GTLComputeDisk.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeDisk +// + +@implementation GTLComputeDisk +@dynamic creationTimestamp, descriptionProperty, identifier, kind, name, + options, selfLink, sizeGb, sourceSnapshot, sourceSnapshotId, status, + zoneProperty; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + @"zone", @"zoneProperty", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#disk"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeDiskList.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeDiskList.h.svn-base new file mode 100644 index 0000000..15c4bb1 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeDiskList.h.svn-base @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeDiskList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeDiskList (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeDisk; + +// ---------------------------------------------------------------------------- +// +// GTLComputeDiskList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLComputeDiskList : GTLCollectionObject + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The persistent disk resources. +@property (retain) NSArray *items; // of GTLComputeDisk + +// Type of resource. +@property (copy) NSString *kind; + +// A token used to continue a truncated list request (output only). +@property (copy) NSString *nextPageToken; + +// Server defined URL for this resource (output only). +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeDiskList.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeDiskList.m.svn-base new file mode 100644 index 0000000..c787b3a --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeDiskList.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeDiskList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeDiskList (0 custom class methods, 5 custom properties) + +#import "GTLComputeDiskList.h" + +#import "GTLComputeDisk.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeDiskList +// + +@implementation GTLComputeDiskList +@dynamic identifier, items, kind, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeDisk class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#diskList"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeFirewall.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeFirewall.h.svn-base new file mode 100644 index 0000000..458587a --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeFirewall.h.svn-base @@ -0,0 +1,114 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeFirewall.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeFirewall (0 custom class methods, 11 custom properties) +// GTLComputeFirewallAllowedItem (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeFirewallAllowedItem; + +// ---------------------------------------------------------------------------- +// +// GTLComputeFirewall +// + +@interface GTLComputeFirewall : GTLObject + +// The list of rules specified by this firewall. Each rule specifies a protocol +// and port-range tuple that describes a permitted connection. +@property (retain) NSArray *allowed; // of GTLComputeFirewallAllowedItem + +// Creation timestamp in RFC3339 text format (output only). +@property (copy) NSString *creationTimestamp; + +// An optional textual description of the resource; provided by the client when +// the resource is created. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // unsignedLongLongValue + +// Type of the resource. +@property (copy) NSString *kind; + +// Name of the resource; provided by the client when the resource is created. +// The name must be 1-63 characters long, and comply with RFC1035. +@property (copy) NSString *name; + +// URL of the network to which this firewall is applied; provided by the client +// when the firewall is created. +@property (copy) NSString *network; + +// Server defined URL for the resource (output only). +@property (copy) NSString *selfLink; + +// A list of IP address blocks expressed in CIDR format which this rule applies +// to. One or both of sourceRanges and sourceTags may be set; an inbound +// connection is allowed if either the range or the tag of the source matches. +@property (retain) NSArray *sourceRanges; // of NSString + +// A list of instance tags which this rule applies to. One or both of +// sourceRanges and sourceTags may be set; an inbound connection is allowed if +// either the range or the tag of the source matches. +@property (retain) NSArray *sourceTags; // of NSString + +// A list of instance tags indicating sets of instances located on network which +// may make network connections as specified in allowed. If no targetTags are +// specified, the firewall rule applies to all instances on the specified +// network. +@property (retain) NSArray *targetTags; // of NSString + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeFirewallAllowedItem +// + +@interface GTLComputeFirewallAllowedItem : GTLObject + +// Required; this is the IP protocol that is allowed for this rule. This can +// either be a well known protocol string (tcp, udp or icmp) or the IP protocol +// number. +@property (copy) NSString *IPProtocol; + +// An optional list of ports which are allowed. It is an error to specify this +// for any protocol that isn't UDP or TCP. Each entry must be either an integer +// or a range. If not specified, connections through any port are allowed. +// Example inputs include: ["22"], ["80,"443"] and ["12345-12349"]. +@property (retain) NSArray *ports; // of NSString + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeFirewall.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeFirewall.m.svn-base new file mode 100644 index 0000000..d30e2ad --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeFirewall.m.svn-base @@ -0,0 +1,85 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeFirewall.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeFirewall (0 custom class methods, 11 custom properties) +// GTLComputeFirewallAllowedItem (0 custom class methods, 2 custom properties) + +#import "GTLComputeFirewall.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeFirewall +// + +@implementation GTLComputeFirewall +@dynamic allowed, creationTimestamp, descriptionProperty, identifier, kind, + name, network, selfLink, sourceRanges, sourceTags, targetTags; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLComputeFirewallAllowedItem class], @"allowed", + [NSString class], @"sourceRanges", + [NSString class], @"sourceTags", + [NSString class], @"targetTags", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#firewall"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeFirewallAllowedItem +// + +@implementation GTLComputeFirewallAllowedItem +@dynamic IPProtocol, ports; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"ports"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeFirewallList.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeFirewallList.h.svn-base new file mode 100644 index 0000000..84b4868 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeFirewallList.h.svn-base @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeFirewallList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeFirewallList (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeFirewall; + +// ---------------------------------------------------------------------------- +// +// GTLComputeFirewallList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLComputeFirewallList : GTLCollectionObject + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The firewall resources. +@property (retain) NSArray *items; // of GTLComputeFirewall + +// Type of resource. +@property (copy) NSString *kind; + +// A token used to continue a truncated list request (output only). +@property (copy) NSString *nextPageToken; + +// Server defined URL for this resource (output only). +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeFirewallList.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeFirewallList.m.svn-base new file mode 100644 index 0000000..8939c3b --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeFirewallList.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeFirewallList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeFirewallList (0 custom class methods, 5 custom properties) + +#import "GTLComputeFirewallList.h" + +#import "GTLComputeFirewall.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeFirewallList +// + +@implementation GTLComputeFirewallList +@dynamic identifier, items, kind, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeFirewall class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#firewallList"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeImage.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeImage.h.svn-base new file mode 100644 index 0000000..b3e8ffd --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeImage.h.svn-base @@ -0,0 +1,120 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeImage.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeImage (0 custom class methods, 10 custom properties) +// GTLComputeImageDiskSnapshot (0 custom class methods, 1 custom properties) +// GTLComputeImageRawDisk (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeImageDiskSnapshot; +@class GTLComputeImageRawDisk; + +// ---------------------------------------------------------------------------- +// +// GTLComputeImage +// + +@interface GTLComputeImage : GTLObject + +// Creation timestamp in RFC3339 text format (output only). +@property (copy) NSString *creationTimestamp; + +// Textual description of the resource; provided by the client when the resource +// is created. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Not yet implemented. +@property (retain) GTLComputeImageDiskSnapshot *diskSnapshot; + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // unsignedLongLongValue + +// Type of the resource. +@property (copy) NSString *kind; + +// Name of the resource; provided by the client when the resource is created. +// The name must be 1-63 characters long, and comply with RFC1035. +@property (copy) NSString *name; + +// An optional URL of the preferred kernel for use with this disk image. If not +// specified, a server defined default kernel will be used. +@property (copy) NSString *preferredKernel; + +// The raw disk image parameters. +@property (retain) GTLComputeImageRawDisk *rawDisk; + +// Server defined URL for the resource (output only). +@property (copy) NSString *selfLink; + +// Must be "RAW"; provided by the client when the disk image is created. +@property (copy) NSString *sourceType; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeImageDiskSnapshot +// + +@interface GTLComputeImageDiskSnapshot : GTLObject + +// URL of the disk snapshot. +@property (copy) NSString *source; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeImageRawDisk +// + +@interface GTLComputeImageRawDisk : GTLObject + +// The format used to encode and transmit the block device. Should be TAR. This +// is just a container and transmission format and not a runtime format. +// Provided by the client when the disk image is created. +@property (copy) NSString *containerType; + +// An optional SHA1 checksum of the disk image before unpackaging; provided by +// the client when the disk image is created. +@property (copy) NSString *sha1Checksum; + +// The full Google Cloud Storage URL where the disk image is stored; provided by +// the client when the disk image is created. +@property (copy) NSString *source; + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeImage.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeImage.m.svn-base new file mode 100644 index 0000000..7646b7a --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeImage.m.svn-base @@ -0,0 +1,77 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeImage.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeImage (0 custom class methods, 10 custom properties) +// GTLComputeImageDiskSnapshot (0 custom class methods, 1 custom properties) +// GTLComputeImageRawDisk (0 custom class methods, 3 custom properties) + +#import "GTLComputeImage.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeImage +// + +@implementation GTLComputeImage +@dynamic creationTimestamp, descriptionProperty, diskSnapshot, identifier, kind, + name, preferredKernel, rawDisk, selfLink, sourceType; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#image"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeImageDiskSnapshot +// + +@implementation GTLComputeImageDiskSnapshot +@dynamic source; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeImageRawDisk +// + +@implementation GTLComputeImageRawDisk +@dynamic containerType, sha1Checksum, source; +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeImageList.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeImageList.h.svn-base new file mode 100644 index 0000000..29d65eb --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeImageList.h.svn-base @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeImageList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeImageList (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeImage; + +// ---------------------------------------------------------------------------- +// +// GTLComputeImageList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLComputeImageList : GTLCollectionObject + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The disk image resources. +@property (retain) NSArray *items; // of GTLComputeImage + +// Type of resource. +@property (copy) NSString *kind; + +// A token used to continue a truncated list request (output only). +@property (copy) NSString *nextPageToken; + +// Server defined URL for this resource (output only). +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeImageList.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeImageList.m.svn-base new file mode 100644 index 0000000..7de7252 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeImageList.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeImageList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeImageList (0 custom class methods, 5 custom properties) + +#import "GTLComputeImageList.h" + +#import "GTLComputeImage.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeImageList +// + +@implementation GTLComputeImageList +@dynamic identifier, items, kind, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeImage class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#imageList"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeInstance.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeInstance.h.svn-base new file mode 100644 index 0000000..c1bbe8d --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeInstance.h.svn-base @@ -0,0 +1,117 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeInstance.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeInstance (0 custom class methods, 16 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeAttachedDisk; +@class GTLComputeMetadata; +@class GTLComputeNetworkInterface; +@class GTLComputeServiceAccount; + +// ---------------------------------------------------------------------------- +// +// GTLComputeInstance +// + +@interface GTLComputeInstance : GTLObject + +// Creation timestamp in RFC3339 text format (output only). +@property (copy) NSString *creationTimestamp; + +// An optional textual description of the resource; provided by the client when +// the resource is created. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Array of disks associated with this instance. Persistent disks must be +// created before you can assign them. +@property (retain) NSArray *disks; // of GTLComputeAttachedDisk + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // unsignedLongLongValue + +// An optional URL of the disk image resource to be to be installed on this +// instance; provided by the client when the instance is created. If not +// specified, the server will choose a default image. +@property (copy) NSString *image; + +// Type of the resource. +@property (copy) NSString *kind; + +// URL of the machine type resource describing which machine type to use to host +// the instance; provided by the client when the instance is created. +@property (copy) NSString *machineType; + +// Metadata key/value pairs assigned to this instance. Consists of custom +// metadata or predefined keys; see Instance documentation for more information. +@property (retain) GTLComputeMetadata *metadata; + +// Name of the resource; provided by the client when the resource is created. +// The name must be 1-63 characters long, and comply with RFC1035. +@property (copy) NSString *name; + +// Array of configurations for this interface. This specifies how this interface +// is configured to interact with other network services, such as connecting to +// the internet. Currently, ONE_TO_ONE_NAT is the only access config supported. +// If there are no accessConfigs specified, then this instance will have no +// external internet access. +@property (retain) NSArray *networkInterfaces; // of GTLComputeNetworkInterface + +// Server defined URL for the resource (output only). +@property (copy) NSString *selfLink; + +// A list of service accounts each with specified scopes, for which access +// tokens are to be made available to the instance through metadata queries. +@property (retain) NSArray *serviceAccounts; // of GTLComputeServiceAccount + +// Instance status. One of the following values: "PROVISIONING", "STAGING", +// "RUNNING", "STOPPED", "TERMINATED", and "STOPPING" (output only). +@property (copy) NSString *status; + +// An optional, human-readable explanation of the status (output only). +@property (copy) NSString *statusMessage; + +// An optional set of tags applied to this instance. Used to identify valid +// sources or targets for network firewalls. Provided by the client when the +// instance is created. Each tag must be 1-63 characters long, and comply with +// RFC1035. +@property (retain) NSArray *tags; // of NSString + +// URL of the zone resource describing where this instance should be hosted; +// provided by the client when the instance is created. +// Remapped to 'zoneProperty' to avoid NSObject's 'zone'. +@property (copy) NSString *zoneProperty; + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeInstance.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeInstance.m.svn-base new file mode 100644 index 0000000..a7dae33 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeInstance.m.svn-base @@ -0,0 +1,73 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeInstance.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeInstance (0 custom class methods, 16 custom properties) + +#import "GTLComputeInstance.h" + +#import "GTLComputeAttachedDisk.h" +#import "GTLComputeMetadata.h" +#import "GTLComputeNetworkInterface.h" +#import "GTLComputeServiceAccount.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeInstance +// + +@implementation GTLComputeInstance +@dynamic creationTimestamp, descriptionProperty, disks, identifier, image, kind, + machineType, metadata, name, networkInterfaces, selfLink, + serviceAccounts, status, statusMessage, tags, zoneProperty; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + @"zone", @"zoneProperty", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLComputeAttachedDisk class], @"disks", + [GTLComputeNetworkInterface class], @"networkInterfaces", + [GTLComputeServiceAccount class], @"serviceAccounts", + [NSString class], @"tags", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#instance"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeInstanceList.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeInstanceList.h.svn-base new file mode 100644 index 0000000..21f2d88 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeInstanceList.h.svn-base @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeInstanceList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeInstanceList (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeInstance; + +// ---------------------------------------------------------------------------- +// +// GTLComputeInstanceList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLComputeInstanceList : GTLCollectionObject + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// A list of instance resources. +@property (retain) NSArray *items; // of GTLComputeInstance + +// Type of resource. +@property (copy) NSString *kind; + +// A token used to continue a truncated list request (output only). +@property (copy) NSString *nextPageToken; + +// Server defined URL for this resource (output only). +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeInstanceList.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeInstanceList.m.svn-base new file mode 100644 index 0000000..ed289c5 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeInstanceList.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeInstanceList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeInstanceList (0 custom class methods, 5 custom properties) + +#import "GTLComputeInstanceList.h" + +#import "GTLComputeInstance.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeInstanceList +// + +@implementation GTLComputeInstanceList +@dynamic identifier, items, kind, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeInstance class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#instanceList"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeKernel.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeKernel.h.svn-base new file mode 100644 index 0000000..6d8cdcc --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeKernel.h.svn-base @@ -0,0 +1,64 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeKernel.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeKernel (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLComputeKernel +// + +@interface GTLComputeKernel : GTLObject + +// Creation timestamp in RFC3339 text format (output only). +@property (copy) NSString *creationTimestamp; + +// An optional textual description of the resource. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // unsignedLongLongValue + +// Type of the resource. +@property (copy) NSString *kind; + +// Name of the resource. +@property (copy) NSString *name; + +// Server defined URL for the resource (output only). +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeKernel.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeKernel.m.svn-base new file mode 100644 index 0000000..51df8a3 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeKernel.m.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeKernel.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeKernel (0 custom class methods, 6 custom properties) + +#import "GTLComputeKernel.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeKernel +// + +@implementation GTLComputeKernel +@dynamic creationTimestamp, descriptionProperty, identifier, kind, name, + selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#kernel"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeKernelList.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeKernelList.h.svn-base new file mode 100644 index 0000000..9e76d13 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeKernelList.h.svn-base @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeKernelList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeKernelList (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeKernel; + +// ---------------------------------------------------------------------------- +// +// GTLComputeKernelList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLComputeKernelList : GTLCollectionObject + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The kernel resources. +@property (retain) NSArray *items; // of GTLComputeKernel + +// Type of resource. +@property (copy) NSString *kind; + +// A token used to continue a truncated list request (output only). +@property (copy) NSString *nextPageToken; + +// Server defined URL for this resource (output only). +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeKernelList.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeKernelList.m.svn-base new file mode 100644 index 0000000..a1c5a19 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeKernelList.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeKernelList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeKernelList (0 custom class methods, 5 custom properties) + +#import "GTLComputeKernelList.h" + +#import "GTLComputeKernel.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeKernelList +// + +@implementation GTLComputeKernelList +@dynamic identifier, items, kind, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeKernel class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#kernelList"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeMachineType.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeMachineType.h.svn-base new file mode 100644 index 0000000..627c7f8 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeMachineType.h.svn-base @@ -0,0 +1,101 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeMachineType.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeMachineType (0 custom class methods, 13 custom properties) +// GTLComputeMachineTypeEphemeralDisksItem (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeMachineTypeEphemeralDisksItem; + +// ---------------------------------------------------------------------------- +// +// GTLComputeMachineType +// + +@interface GTLComputeMachineType : GTLObject + +// The zones that this machine type can run in. +@property (retain) NSArray *availableZone; // of NSString + +// Creation timestamp in RFC3339 text format (output only). +@property (copy) NSString *creationTimestamp; + +// An optional textual description of the resource. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// List of extended ephemeral disks assigned to the instance. +@property (retain) NSArray *ephemeralDisks; // of GTLComputeMachineTypeEphemeralDisksItem + +// Count of CPUs exposed to the instance. +@property (retain) NSNumber *guestCpus; // intValue + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // unsignedLongLongValue + +// Space allotted for the image, defined in GB. +@property (retain) NSNumber *imageSpaceGb; // intValue + +// Type of the resource. +@property (copy) NSString *kind; + +// Maximum persistent disks allowed. +@property (retain) NSNumber *maximumPersistentDisks; // intValue + +// Maximum total persistent disks size (GB) allowed. +@property (retain) NSNumber *maximumPersistentDisksSizeGb; // longLongValue + +// Physical memory assigned to the instance, defined in MB. +@property (retain) NSNumber *memoryMb; // intValue + +// Name of the resource. +@property (copy) NSString *name; + +// Server defined URL for the resource (output only). +@property (copy) NSString *selfLink; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeMachineTypeEphemeralDisksItem +// + +@interface GTLComputeMachineTypeEphemeralDisksItem : GTLObject + +// Size of the ephemeral disk, defined in GB. +@property (retain) NSNumber *diskGb; // intValue + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeMachineType.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeMachineType.m.svn-base new file mode 100644 index 0000000..dc00b08 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeMachineType.m.svn-base @@ -0,0 +1,76 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeMachineType.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeMachineType (0 custom class methods, 13 custom properties) +// GTLComputeMachineTypeEphemeralDisksItem (0 custom class methods, 1 custom properties) + +#import "GTLComputeMachineType.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeMachineType +// + +@implementation GTLComputeMachineType +@dynamic availableZone, creationTimestamp, descriptionProperty, ephemeralDisks, + guestCpus, identifier, imageSpaceGb, kind, maximumPersistentDisks, + maximumPersistentDisksSizeGb, memoryMb, name, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"availableZone", + [GTLComputeMachineTypeEphemeralDisksItem class], @"ephemeralDisks", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#machineType"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeMachineTypeEphemeralDisksItem +// + +@implementation GTLComputeMachineTypeEphemeralDisksItem +@dynamic diskGb; +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeMachineTypeList.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeMachineTypeList.h.svn-base new file mode 100644 index 0000000..bda5eea --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeMachineTypeList.h.svn-base @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeMachineTypeList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeMachineTypeList (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeMachineType; + +// ---------------------------------------------------------------------------- +// +// GTLComputeMachineTypeList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLComputeMachineTypeList : GTLCollectionObject + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The machine type resources. +@property (retain) NSArray *items; // of GTLComputeMachineType + +// Type of resource. +@property (copy) NSString *kind; + +// A token used to continue a truncated list request (output only). +@property (copy) NSString *nextPageToken; + +// Server defined URL for this resource (output only). +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeMachineTypeList.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeMachineTypeList.m.svn-base new file mode 100644 index 0000000..e064ea4 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeMachineTypeList.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeMachineTypeList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeMachineTypeList (0 custom class methods, 5 custom properties) + +#import "GTLComputeMachineTypeList.h" + +#import "GTLComputeMachineType.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeMachineTypeList +// + +@implementation GTLComputeMachineTypeList +@dynamic identifier, items, kind, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeMachineType class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#machineTypeList"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeMetadata.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeMetadata.h.svn-base new file mode 100644 index 0000000..1c536d4 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeMetadata.h.svn-base @@ -0,0 +1,79 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeMetadata.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeMetadata (0 custom class methods, 2 custom properties) +// GTLComputeMetadataItemsItem (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeMetadataItemsItem; + +// ---------------------------------------------------------------------------- +// +// GTLComputeMetadata +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLComputeMetadata : GTLCollectionObject + +// Array of key/value pairs. The total size of all keys and values must be less +// than 512 KB. +@property (retain) NSArray *items; // of GTLComputeMetadataItemsItem + +// Type of the resource. +@property (copy) NSString *kind; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeMetadataItemsItem +// + +@interface GTLComputeMetadataItemsItem : GTLObject + +// Key for the metadata entry. Keys must conform to the following regexp: +// [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as +// part of a URL in the metadata server. Additionally, to avoid ambiguity, keys +// must not conflict with any other metadata keys for the project. +@property (copy) NSString *key; + +// Value for the metadata entry. These are free-form strings, and only have +// meaning as interpreted by the image running in the instance. The only +// restriction placed on values is that their size must be less than or equal to +// 32768 bytes. +@property (copy) NSString *value; + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeMetadata.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeMetadata.m.svn-base new file mode 100644 index 0000000..d486edb --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeMetadata.m.svn-base @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeMetadata.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeMetadata (0 custom class methods, 2 custom properties) +// GTLComputeMetadataItemsItem (0 custom class methods, 2 custom properties) + +#import "GTLComputeMetadata.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeMetadata +// + +@implementation GTLComputeMetadata +@dynamic items, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeMetadataItemsItem class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#metadata"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeMetadataItemsItem +// + +@implementation GTLComputeMetadataItemsItem +@dynamic key, value; +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeNetwork.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeNetwork.h.svn-base new file mode 100644 index 0000000..1ce253e --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeNetwork.h.svn-base @@ -0,0 +1,77 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeNetwork.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeNetwork (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLComputeNetwork +// + +@interface GTLComputeNetwork : GTLObject + +// Creation timestamp in RFC3339 text format (output only). +@property (copy) NSString *creationTimestamp; + +// An optional textual description of the resource; provided by the client when +// the resource is created. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// An optional address that is used for default routing to other networks. This +// must be within the range specified by IPv4Range, and is typically the first +// usable address in that range. If not specified, the default value is the +// first usable address in IPv4Range. +@property (copy) NSString *gatewayIPv4; + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // unsignedLongLongValue + +// Required; The range of internal addresses that are legal on this network. +// This range is a CIDR specification, for example: 192.168.0.0/16. Provided by +// the client when the network is created. +@property (copy) NSString *IPv4Range; + +// Type of the resource. +@property (copy) NSString *kind; + +// Name of the resource; provided by the client when the resource is created. +// The name must be 1-63 characters long, and comply with RFC1035. +@property (copy) NSString *name; + +// Server defined URL for the resource (output only). +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeNetwork.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeNetwork.m.svn-base new file mode 100644 index 0000000..b1b608a --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeNetwork.m.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeNetwork.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeNetwork (0 custom class methods, 8 custom properties) + +#import "GTLComputeNetwork.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeNetwork +// + +@implementation GTLComputeNetwork +@dynamic creationTimestamp, descriptionProperty, gatewayIPv4, identifier, + IPv4Range, kind, name, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#network"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeNetworkInterface.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeNetworkInterface.h.svn-base new file mode 100644 index 0000000..61fb328 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeNetworkInterface.h.svn-base @@ -0,0 +1,67 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeNetworkInterface.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeNetworkInterface (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeAccessConfig; + +// ---------------------------------------------------------------------------- +// +// GTLComputeNetworkInterface +// + +@interface GTLComputeNetworkInterface : GTLObject + +// Array of configurations for this interface. This specifies how this interface +// is configured to interact with other network services, such as connecting to +// the internet. Currently, ONE_TO_ONE_NAT is the only access config supported. +// If there are no accessConfigs specified, then this instance will have no +// external internet access. +@property (retain) NSArray *accessConfigs; // of GTLComputeAccessConfig + +// Type of the resource. +@property (copy) NSString *kind; + +// Name of the resource, determined by the server; for network devices, these +// are e.g. eth0, eth1, etc. (output only). +@property (copy) NSString *name; + +// URL of the network resource attached to this interface. +@property (copy) NSString *network; + +// An optional IPV4 internal network address to assign to this instance. If not +// specified, one will be assigned from the available range. +@property (copy) NSString *networkIP; + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeNetworkInterface.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeNetworkInterface.m.svn-base new file mode 100644 index 0000000..0bd5105 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeNetworkInterface.m.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeNetworkInterface.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeNetworkInterface (0 custom class methods, 5 custom properties) + +#import "GTLComputeNetworkInterface.h" + +#import "GTLComputeAccessConfig.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeNetworkInterface +// + +@implementation GTLComputeNetworkInterface +@dynamic accessConfigs, kind, name, network, networkIP; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeAccessConfig class] + forKey:@"accessConfigs"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#networkInterface"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeNetworkList.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeNetworkList.h.svn-base new file mode 100644 index 0000000..43ec880 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeNetworkList.h.svn-base @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeNetworkList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeNetworkList (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeNetwork; + +// ---------------------------------------------------------------------------- +// +// GTLComputeNetworkList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLComputeNetworkList : GTLCollectionObject + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The network resources. +@property (retain) NSArray *items; // of GTLComputeNetwork + +// Type of resource. +@property (copy) NSString *kind; + +// A token used to continue a truncated list request (output only). +@property (copy) NSString *nextPageToken; + +// Server defined URL for this resource (output only). +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeNetworkList.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeNetworkList.m.svn-base new file mode 100644 index 0000000..86bc8f5 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeNetworkList.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeNetworkList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeNetworkList (0 custom class methods, 5 custom properties) + +#import "GTLComputeNetworkList.h" + +#import "GTLComputeNetwork.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeNetworkList +// + +@implementation GTLComputeNetworkList +@dynamic identifier, items, kind, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeNetwork class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#networkList"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeOperation.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeOperation.h.svn-base new file mode 100644 index 0000000..02b2d38 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeOperation.h.svn-base @@ -0,0 +1,157 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeOperation.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeOperation (0 custom class methods, 19 custom properties) +// GTLComputeOperationError (0 custom class methods, 1 custom properties) +// GTLComputeOperationErrorErrorsItem (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeOperationError; +@class GTLComputeOperationErrorErrorsItem; + +// ---------------------------------------------------------------------------- +// +// GTLComputeOperation +// + +@interface GTLComputeOperation : GTLObject + +// An optional identifier specified by the client when the mutation was +// initiated. Must be unique for all operation resources in the project (output +// only). +@property (copy) NSString *clientOperationId; + +// Creation timestamp in RFC3339 text format (output only). +@property (copy) NSString *creationTimestamp; + +// The time that this operation was completed. This is in RFC 3339 format +// (output only). +@property (copy) NSString *endTime; + +// If errors occurred during processing of this operation, this field will be +// populated (output only). +@property (retain) GTLComputeOperationError *error; + +// If operation fails, the HTTP error message returned, e.g. NOT FOUND. (output +// only). +@property (copy) NSString *httpErrorMessage; + +// If operation fails, the HTTP error status code returned, e.g. 404. (output +// only). +@property (retain) NSNumber *httpErrorStatusCode; // intValue + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // unsignedLongLongValue + +// The time that this operation was requested. This is in RFC 3339 format +// (output only). +@property (copy) NSString *insertTime; + +// Type of the resource. +@property (copy) NSString *kind; + +// Name of the resource. +@property (copy) NSString *name; + +// Type of the operation. Examples include "insert", "update", and "delete" +// (output only). +@property (copy) NSString *operationType; + +// An optional progress indicator that ranges from 0 to 100. There is no +// requirement that this be linear or support any granularity of operations. +// This should not be used to guess at when the operation will be complete. This +// number should be monotonically increasing as the operation progresses (output +// only). +@property (retain) NSNumber *progress; // intValue + +// Server defined URL for the resource (output only). +@property (copy) NSString *selfLink; + +// The time that this operation was started by the server. This is in RFC 3339 +// format (output only). +@property (copy) NSString *startTime; + +// Status of the operation. Can be one of the following: "PENDING", "RUNNING", +// or "DONE" (output only). +@property (copy) NSString *status; + +// An optional textual description of the current status of the operation +// (output only). +@property (copy) NSString *statusMessage; + +// Unique target id which identifies a particular incarnation of the target +// (output only). +@property (retain) NSNumber *targetId; // unsignedLongLongValue + +// URL of the resource the operation is mutating (output only). +@property (copy) NSString *targetLink; + +// User who requested the operation, for example "user@example.com" (output +// only). +@property (copy) NSString *user; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeOperationError +// + +@interface GTLComputeOperationError : GTLObject + +// The array of errors encountered while processing this operation. +@property (retain) NSArray *errors; // of GTLComputeOperationErrorErrorsItem + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeOperationErrorErrorsItem +// + +@interface GTLComputeOperationErrorErrorsItem : GTLObject + +// The error type identifier for this error. +@property (copy) NSString *code; + +// Indicates the field in the request which caused the error. This property is +// optional. +@property (copy) NSString *location; + +// An optional, human-readable error message. +@property (copy) NSString *message; + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeOperation.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeOperation.m.svn-base new file mode 100644 index 0000000..0c42cf8 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeOperation.m.svn-base @@ -0,0 +1,85 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeOperation.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeOperation (0 custom class methods, 19 custom properties) +// GTLComputeOperationError (0 custom class methods, 1 custom properties) +// GTLComputeOperationErrorErrorsItem (0 custom class methods, 3 custom properties) + +#import "GTLComputeOperation.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeOperation +// + +@implementation GTLComputeOperation +@dynamic clientOperationId, creationTimestamp, endTime, error, httpErrorMessage, + httpErrorStatusCode, identifier, insertTime, kind, name, operationType, + progress, selfLink, startTime, status, statusMessage, targetId, + targetLink, user; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#operation"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeOperationError +// + +@implementation GTLComputeOperationError +@dynamic errors; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeOperationErrorErrorsItem class] + forKey:@"errors"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeOperationErrorErrorsItem +// + +@implementation GTLComputeOperationErrorErrorsItem +@dynamic code, location, message; +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeOperationList.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeOperationList.h.svn-base new file mode 100644 index 0000000..172781f --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeOperationList.h.svn-base @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeOperationList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeOperationList (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeOperation; + +// ---------------------------------------------------------------------------- +// +// GTLComputeOperationList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLComputeOperationList : GTLCollectionObject + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The operation resources. +@property (retain) NSArray *items; // of GTLComputeOperation + +// Type of resource. +@property (copy) NSString *kind; + +// A token used to continue a truncated list request (output only). +@property (copy) NSString *nextPageToken; + +// Server defined URL for this resource (output only). +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeOperationList.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeOperationList.m.svn-base new file mode 100644 index 0000000..8344180 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeOperationList.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeOperationList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeOperationList (0 custom class methods, 5 custom properties) + +#import "GTLComputeOperationList.h" + +#import "GTLComputeOperation.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeOperationList +// + +@implementation GTLComputeOperationList +@dynamic identifier, items, kind, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeOperation class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#operationList"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeProject.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeProject.h.svn-base new file mode 100644 index 0000000..ed949f4 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeProject.h.svn-base @@ -0,0 +1,97 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeProject.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeProject (0 custom class methods, 9 custom properties) +// GTLComputeProjectQuotasItem (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeMetadata; +@class GTLComputeProjectQuotasItem; + +// ---------------------------------------------------------------------------- +// +// GTLComputeProject +// + +@interface GTLComputeProject : GTLObject + +// Metadata key/value pairs available to all instances contained in this +// project. +@property (retain) GTLComputeMetadata *commonInstanceMetadata; + +// Creation timestamp in RFC3339 text format (output only). +@property (copy) NSString *creationTimestamp; + +// An optional textual description of the resource. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Internet available IP addresses available for use in this project. +@property (retain) NSArray *externalIpAddresses; // of NSString + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // unsignedLongLongValue + +// Type of the resource. +@property (copy) NSString *kind; + +// Name of the resource. +@property (copy) NSString *name; + +// Quotas assigned to this project. +@property (retain) NSArray *quotas; // of GTLComputeProjectQuotasItem + +// Server defined URL for the resource (output only). +@property (copy) NSString *selfLink; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeProjectQuotasItem +// + +@interface GTLComputeProjectQuotasItem : GTLObject + +// Quota limit for this metric. +@property (retain) NSNumber *limit; // doubleValue + +// Name of the quota metric. +@property (copy) NSString *metric; + +// Current usage of this metric. +@property (retain) NSNumber *usage; // doubleValue + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeProject.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeProject.m.svn-base new file mode 100644 index 0000000..03f49ac --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeProject.m.svn-base @@ -0,0 +1,77 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeProject.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeProject (0 custom class methods, 9 custom properties) +// GTLComputeProjectQuotasItem (0 custom class methods, 3 custom properties) + +#import "GTLComputeProject.h" + +#import "GTLComputeMetadata.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeProject +// + +@implementation GTLComputeProject +@dynamic commonInstanceMetadata, creationTimestamp, descriptionProperty, + externalIpAddresses, identifier, kind, name, quotas, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"externalIpAddresses", + [GTLComputeProjectQuotasItem class], @"quotas", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#project"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeProjectQuotasItem +// + +@implementation GTLComputeProjectQuotasItem +@dynamic limit, metric, usage; +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeSerialPortOutput.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeSerialPortOutput.h.svn-base new file mode 100644 index 0000000..e71191f --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeSerialPortOutput.h.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeSerialPortOutput.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeSerialPortOutput (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLComputeSerialPortOutput +// + +// An instance serial console output. + +@interface GTLComputeSerialPortOutput : GTLObject + +// The contents of the console output. +@property (copy) NSString *contents; + +// Type of the resource. +@property (copy) NSString *kind; + +// Server defined URL for the resource. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeSerialPortOutput.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeSerialPortOutput.m.svn-base new file mode 100644 index 0000000..97c3e0e --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeSerialPortOutput.m.svn-base @@ -0,0 +1,45 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeSerialPortOutput.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeSerialPortOutput (0 custom class methods, 3 custom properties) + +#import "GTLComputeSerialPortOutput.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeSerialPortOutput +// + +@implementation GTLComputeSerialPortOutput +@dynamic contents, kind, selfLink; + ++ (void)load { + [self registerObjectClassForKind:@"compute#serialPortOutput"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeServiceAccount.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeServiceAccount.h.svn-base new file mode 100644 index 0000000..cb10e1d --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeServiceAccount.h.svn-base @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeServiceAccount.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeServiceAccount (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLComputeServiceAccount +// + +@interface GTLComputeServiceAccount : GTLObject + +// Email address of the service account. +@property (copy) NSString *email; + +// Type of the resource. +@property (copy) NSString *kind; + +// The list of scopes to be made available for this service account. +@property (retain) NSArray *scopes; // of NSString + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeServiceAccount.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeServiceAccount.m.svn-base new file mode 100644 index 0000000..249abb4 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeServiceAccount.m.svn-base @@ -0,0 +1,52 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeServiceAccount.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeServiceAccount (0 custom class methods, 3 custom properties) + +#import "GTLComputeServiceAccount.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeServiceAccount +// + +@implementation GTLComputeServiceAccount +@dynamic email, kind, scopes; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"scopes"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#serviceAccount"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeSnapshot.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeSnapshot.h.svn-base new file mode 100644 index 0000000..7eb12e0 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeSnapshot.h.svn-base @@ -0,0 +1,82 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeSnapshot.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeSnapshot (0 custom class methods, 10 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLComputeSnapshot +// + +@interface GTLComputeSnapshot : GTLObject + +// Creation timestamp in RFC3339 text format (output only). +@property (copy) NSString *creationTimestamp; + +// An optional textual description of the resource; provided by the client when +// the resource is created. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Size of the persistent disk snapshot, specified in GB (output only). +@property (retain) NSNumber *diskSizeGb; // longLongValue + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // unsignedLongLongValue + +// Type of the resource. +@property (copy) NSString *kind; + +// Name of the resource; provided by the client when the resource is created. +// The name must be 1-63 characters long, and comply with RFC1035. +@property (copy) NSString *name; + +// Server defined URL for the resource (output only). +@property (copy) NSString *selfLink; + +// The source disk used to create this snapshot. Once the source disk has been +// deleted from the system, this field will be cleared, and will not be set even +// if a disk with the same name has been re-created. +@property (copy) NSString *sourceDisk; + +// The 'id' value of the disk used to create this snapshot. This value may be +// used to determine whether the snapshot was taken from the current or a +// previous instance of a given disk name. +@property (copy) NSString *sourceDiskId; + +// The status of the persistent disk snapshot (output only). +@property (copy) NSString *status; + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeSnapshot.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeSnapshot.m.svn-base new file mode 100644 index 0000000..b146303 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeSnapshot.m.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeSnapshot.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeSnapshot (0 custom class methods, 10 custom properties) + +#import "GTLComputeSnapshot.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeSnapshot +// + +@implementation GTLComputeSnapshot +@dynamic creationTimestamp, descriptionProperty, diskSizeGb, identifier, kind, + name, selfLink, sourceDisk, sourceDiskId, status; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#snapshot"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeSnapshotList.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeSnapshotList.h.svn-base new file mode 100644 index 0000000..6b1f986 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeSnapshotList.h.svn-base @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeSnapshotList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeSnapshotList (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeSnapshot; + +// ---------------------------------------------------------------------------- +// +// GTLComputeSnapshotList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLComputeSnapshotList : GTLCollectionObject + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The persistent snapshot resources. +@property (retain) NSArray *items; // of GTLComputeSnapshot + +// Type of resource. +@property (copy) NSString *kind; + +// A token used to continue a truncated list request (output only). +@property (copy) NSString *nextPageToken; + +// Server defined URL for this resource (output only). +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeSnapshotList.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeSnapshotList.m.svn-base new file mode 100644 index 0000000..a0ccdd2 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeSnapshotList.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeSnapshotList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeSnapshotList (0 custom class methods, 5 custom properties) + +#import "GTLComputeSnapshotList.h" + +#import "GTLComputeSnapshot.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeSnapshotList +// + +@implementation GTLComputeSnapshotList +@dynamic identifier, items, kind, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeSnapshot class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#snapshotList"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeZone.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeZone.h.svn-base new file mode 100644 index 0000000..38a3331 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeZone.h.svn-base @@ -0,0 +1,100 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeZone.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeZone (0 custom class methods, 9 custom properties) +// GTLComputeZoneMaintenanceWindowsItem (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeZoneMaintenanceWindowsItem; + +// ---------------------------------------------------------------------------- +// +// GTLComputeZone +// + +@interface GTLComputeZone : GTLObject + +// The machine types that can be used in this zone (output only). +@property (retain) NSArray *availableMachineType; // of NSString + +// Creation timestamp in RFC3339 text format (output only). +@property (copy) NSString *creationTimestamp; + +// Textual description of the resource. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // unsignedLongLongValue + +// Type of the resource. +@property (copy) NSString *kind; + +// Scheduled maintenance windows for the zone. When the zone is in a maintenance +// window, all resources which reside in the zone will be unavailable. +@property (retain) NSArray *maintenanceWindows; // of GTLComputeZoneMaintenanceWindowsItem + +// Name of the resource. +@property (copy) NSString *name; + +// Server defined URL for the resource (output only). +@property (copy) NSString *selfLink; + +// Status of the zone. "UP" or "DOWN". +@property (copy) NSString *status; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeZoneMaintenanceWindowsItem +// + +@interface GTLComputeZoneMaintenanceWindowsItem : GTLObject + +// Begin time of the maintenance window, in RFC 3339 format. +@property (copy) NSString *beginTime; + +// Textual description of the maintenance window. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// End time of the maintenance window, in RFC 3339 format. +@property (copy) NSString *endTime; + +// Name of the maintenance window. +@property (copy) NSString *name; + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeZone.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeZone.m.svn-base new file mode 100644 index 0000000..e6963dc --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeZone.m.svn-base @@ -0,0 +1,83 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeZone.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeZone (0 custom class methods, 9 custom properties) +// GTLComputeZoneMaintenanceWindowsItem (0 custom class methods, 4 custom properties) + +#import "GTLComputeZone.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeZone +// + +@implementation GTLComputeZone +@dynamic availableMachineType, creationTimestamp, descriptionProperty, + identifier, kind, maintenanceWindows, name, selfLink, status; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"availableMachineType", + [GTLComputeZoneMaintenanceWindowsItem class], @"maintenanceWindows", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#zone"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeZoneMaintenanceWindowsItem +// + +@implementation GTLComputeZoneMaintenanceWindowsItem +@dynamic beginTime, descriptionProperty, endTime, name; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeZoneList.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeZoneList.h.svn-base new file mode 100644 index 0000000..a91cea5 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeZoneList.h.svn-base @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeZoneList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeZoneList (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeZone; + +// ---------------------------------------------------------------------------- +// +// GTLComputeZoneList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLComputeZoneList : GTLCollectionObject + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The zone resources. +@property (retain) NSArray *items; // of GTLComputeZone + +// Type of resource. +@property (copy) NSString *kind; + +// A token used to continue a truncated list request (output only). +@property (copy) NSString *nextPageToken; + +// Server defined URL for this resource (output only). +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeZoneList.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeZoneList.m.svn-base new file mode 100644 index 0000000..6d39ca4 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLComputeZoneList.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeZoneList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeZoneList (0 custom class methods, 5 custom properties) + +#import "GTLComputeZoneList.h" + +#import "GTLComputeZone.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeZoneList +// + +@implementation GTLComputeZoneList +@dynamic identifier, items, kind, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeZone class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#zoneList"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLCompute_Sources.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLCompute_Sources.m.svn-base new file mode 100644 index 0000000..29cefbe --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLCompute_Sources.m.svn-base @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCompute_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 + +#import "GTLComputeConstants.m" + +#import "GTLComputeAccessConfig.m" +#import "GTLComputeAttachedDisk.m" +#import "GTLComputeDisk.m" +#import "GTLComputeDiskList.m" +#import "GTLComputeFirewall.m" +#import "GTLComputeFirewallList.m" +#import "GTLComputeImage.m" +#import "GTLComputeImageList.m" +#import "GTLComputeInstance.m" +#import "GTLComputeInstanceList.m" +#import "GTLComputeKernel.m" +#import "GTLComputeKernelList.m" +#import "GTLComputeMachineType.m" +#import "GTLComputeMachineTypeList.m" +#import "GTLComputeMetadata.m" +#import "GTLComputeNetwork.m" +#import "GTLComputeNetworkInterface.m" +#import "GTLComputeNetworkList.m" +#import "GTLComputeOperation.m" +#import "GTLComputeOperationList.m" +#import "GTLComputeProject.m" +#import "GTLComputeSerialPortOutput.m" +#import "GTLComputeServiceAccount.m" +#import "GTLComputeSnapshot.m" +#import "GTLComputeSnapshotList.m" +#import "GTLComputeZone.m" +#import "GTLComputeZoneList.m" + +#import "GTLQueryCompute.m" +#import "GTLServiceCompute.m" diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLQueryCompute.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLQueryCompute.h.svn-base new file mode 100644 index 0000000..fcb5d08 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLQueryCompute.h.svn-base @@ -0,0 +1,620 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryCompute.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLQueryCompute (40 custom class methods, 18 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLComputeAccessConfig; +@class GTLComputeDisk; +@class GTLComputeFirewall; +@class GTLComputeImage; +@class GTLComputeInstance; +@class GTLComputeMetadata; +@class GTLComputeNetwork; +@class GTLComputeSnapshot; + +@interface GTLQueryCompute : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +// "accessConfig" has different types for some query methods; see the +// documentation for the right type for each query method. +@property (retain) id accessConfig; +@property (copy) NSString *disk; +@property (copy) NSString *filter; +@property (copy) NSString *firewall; +@property (copy) NSString *image; +@property (copy) NSString *instance; +@property (copy) NSString *kernel; +@property (copy) NSString *machineType; +@property (assign) NSUInteger maxResults; +@property (retain) GTLComputeMetadata *metadata; +@property (copy) NSString *network; +@property (copy) NSString *networkInterface; +@property (copy) NSString *operation; +@property (copy) NSString *pageToken; +@property (copy) NSString *project; +@property (copy) NSString *snapshot; +// Remapped to 'zoneProperty' to avoid NSObject's 'zone'. +@property (copy) NSString *zoneProperty; + +#pragma mark - +#pragma mark "disks" methods +// These create a GTLQueryCompute object. + +// Method: compute.disks.delete +// Deletes the specified persistent disk resource. +// Required: +// project: Name of the project scoping this request. +// disk: Name of the persistent disk resource to delete. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForDisksDeleteWithProject:(NSString *)project + disk:(NSString *)disk; + +// Method: compute.disks.get +// Returns the specified persistent disk resource. +// Required: +// project: Name of the project scoping this request. +// disk: Name of the persistent disk resource to return. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeDisk. ++ (id)queryForDisksGetWithProject:(NSString *)project + disk:(NSString *)disk; + +// Method: compute.disks.insert +// Creates a persistent disk resource in the specified project using the data +// included in the request. +// Required: +// project: Name of the project scoping this request. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForDisksInsertWithObject:(GTLComputeDisk *)object + project:(NSString *)project; + +// Method: compute.disks.list +// Retrieves the list of persistent disk resources contained within the +// specified project. +// Required: +// project: Name of the project scoping this request. +// Optional: +// filter: Optional. Filter expression for filtering listed resources. +// maxResults: Optional. Maximum count of results to be returned. Maximum and +// default value is 100. (0..100, default 100) +// pageToken: Optional. Tag returned by a previous list request truncated by +// maxResults. Used to continue a previous list request. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeDiskList. ++ (id)queryForDisksListWithProject:(NSString *)project; + +#pragma mark - +#pragma mark "firewalls" methods +// These create a GTLQueryCompute object. + +// Method: compute.firewalls.delete +// Deletes the specified firewall resource. +// Required: +// project: Name of the project scoping this request. +// firewall: Name of the firewall resource to delete. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForFirewallsDeleteWithProject:(NSString *)project + firewall:(NSString *)firewall; + +// Method: compute.firewalls.get +// Returns the specified firewall resource. +// Required: +// project: Name of the project scoping this request. +// firewall: Name of the firewall resource to return. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeFirewall. ++ (id)queryForFirewallsGetWithProject:(NSString *)project + firewall:(NSString *)firewall; + +// Method: compute.firewalls.insert +// Creates a firewall resource in the specified project using the data included +// in the request. +// Required: +// project: Name of the project scoping this request. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForFirewallsInsertWithObject:(GTLComputeFirewall *)object + project:(NSString *)project; + +// Method: compute.firewalls.list +// Retrieves the list of firewall resources available to the specified project. +// Required: +// project: Name of the project scoping this request. +// Optional: +// filter: Optional. Filter expression for filtering listed resources. +// maxResults: Optional. Maximum count of results to be returned. Maximum and +// default value is 100. (0..100, default 100) +// pageToken: Optional. Tag returned by a previous list request truncated by +// maxResults. Used to continue a previous list request. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeFirewallList. ++ (id)queryForFirewallsListWithProject:(NSString *)project; + +// Method: compute.firewalls.patch +// Updates the specified firewall resource with the data included in the +// request. This method supports patch semantics. +// Required: +// project: Name of the project scoping this request. +// firewall: Name of the firewall resource to update. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForFirewallsPatchWithObject:(GTLComputeFirewall *)object + project:(NSString *)project + firewall:(NSString *)firewall; + +// Method: compute.firewalls.update +// Updates the specified firewall resource with the data included in the +// request. +// Required: +// project: Name of the project scoping this request. +// firewall: Name of the firewall resource to update. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForFirewallsUpdateWithObject:(GTLComputeFirewall *)object + project:(NSString *)project + firewall:(NSString *)firewall; + +#pragma mark - +#pragma mark "images" methods +// These create a GTLQueryCompute object. + +// Method: compute.images.delete +// Deletes the specified image resource. +// Required: +// project: Name of the project scoping this request. +// image: Name of the image resource to delete. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForImagesDeleteWithProject:(NSString *)project + image:(NSString *)image; + +// Method: compute.images.get +// Returns the specified image resource. +// Required: +// project: Name of the project scoping this request. +// image: Name of the image resource to return. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeImage. ++ (id)queryForImagesGetWithProject:(NSString *)project + image:(NSString *)image; + +// Method: compute.images.insert +// Creates an image resource in the specified project using the data included in +// the request. +// Required: +// project: Name of the project scoping this request. +// Authorization scope(s): +// kGTLAuthScopeCompute +// kGTLAuthScopeComputeDevstorageReadOnly +// Fetches a GTLComputeOperation. ++ (id)queryForImagesInsertWithObject:(GTLComputeImage *)object + project:(NSString *)project; + +// Method: compute.images.list +// Retrieves the list of image resources available to the specified project. +// Required: +// project: Name of the project scoping this request. +// Optional: +// filter: Optional. Filter expression for filtering listed resources. +// maxResults: Optional. Maximum count of results to be returned. Maximum and +// default value is 100. (0..100, default 100) +// pageToken: Optional. Tag returned by a previous list request truncated by +// maxResults. Used to continue a previous list request. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeImageList. ++ (id)queryForImagesListWithProject:(NSString *)project; + +#pragma mark - +#pragma mark "instances" methods +// These create a GTLQueryCompute object. + +// Method: compute.instances.addAccessConfig +// Adds an access config to an instance's network interface. +// Required: +// project: Project name. +// instance: Instance name. +// networkInterface: Network interface name. +// Optional: +// accessConfig: For this method, "accessConfig" should be of type +// GTLComputeAccessConfig. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForInstancesAddAccessConfigWithProject:(NSString *)project + instance:(NSString *)instance + networkInterface:(NSString *)networkInterface; + +// Method: compute.instances.delete +// Deletes the specified instance resource. +// Required: +// project: Name of the project scoping this request. +// instance: Name of the instance resource to delete. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForInstancesDeleteWithProject:(NSString *)project + instance:(NSString *)instance; + +// Method: compute.instances.deleteAccessConfig +// Deletes an access config from an instance's network interface. +// Required: +// project: Project name. +// instance: Instance name. +// accessConfig: Access config name. +// networkInterface: Network interface name. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForInstancesDeleteAccessConfigWithProject:(NSString *)project + instance:(NSString *)instance + accessConfig:(NSString *)accessConfig + networkInterface:(NSString *)networkInterface; + +// Method: compute.instances.get +// Returns the specified instance resource. +// Required: +// project: Name of the project scoping this request. +// instance: Name of the instance resource to return. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeInstance. ++ (id)queryForInstancesGetWithProject:(NSString *)project + instance:(NSString *)instance; + +// Method: compute.instances.getSerialPortOutput +// Returns the specified instance's serial port output. +// Required: +// project: Name of the project scoping this request. +// instance: Name of the instance scoping this request. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeSerialPortOutput. ++ (id)queryForInstancesGetSerialPortOutputWithProject:(NSString *)project + instance:(NSString *)instance; + +// Method: compute.instances.insert +// Creates an instance resource in the specified project using the data included +// in the request. +// Required: +// project: Name of the project scoping this request. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForInstancesInsertWithObject:(GTLComputeInstance *)object + project:(NSString *)project; + +// Method: compute.instances.list +// Retrieves the list of instance resources contained within the specified +// project. +// Required: +// project: Name of the project scoping this request. +// Optional: +// filter: Optional. Filter expression for filtering listed resources. +// maxResults: Optional. Maximum count of results to be returned. Maximum and +// default value is 100. (0..100, default 100) +// pageToken: Optional. Tag returned by a previous list request truncated by +// maxResults. Used to continue a previous list request. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeInstanceList. ++ (id)queryForInstancesListWithProject:(NSString *)project; + +#pragma mark - +#pragma mark "kernels" methods +// These create a GTLQueryCompute object. + +// Method: compute.kernels.get +// Returns the specified kernel resource. +// Required: +// project: Name of the project scoping this request. +// kernel: Name of the kernel resource to return. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeKernel. ++ (id)queryForKernelsGetWithProject:(NSString *)project + kernel:(NSString *)kernel; + +// Method: compute.kernels.list +// Retrieves the list of kernel resources available to the specified project. +// Required: +// project: Name of the project scoping this request. +// Optional: +// filter: Optional. Filter expression for filtering listed resources. +// maxResults: Optional. Maximum count of results to be returned. Maximum and +// default value is 100. (0..100, default 100) +// pageToken: Optional. Tag returned by a previous list request truncated by +// maxResults. Used to continue a previous list request. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeKernelList. ++ (id)queryForKernelsListWithProject:(NSString *)project; + +#pragma mark - +#pragma mark "machineTypes" methods +// These create a GTLQueryCompute object. + +// Method: compute.machineTypes.get +// Returns the specified machine type resource. +// Required: +// project: Name of the project scoping this request. +// machineType: Name of the machine type resource to return. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeMachineType. ++ (id)queryForMachineTypesGetWithProject:(NSString *)project + machineType:(NSString *)machineType; + +// Method: compute.machineTypes.list +// Retrieves the list of machine type resources available to the specified +// project. +// Required: +// project: Name of the project scoping this request. +// Optional: +// filter: Optional. Filter expression for filtering listed resources. +// maxResults: Optional. Maximum count of results to be returned. Maximum and +// default value is 100. (0..100, default 100) +// pageToken: Optional. Tag returned by a previous list request truncated by +// maxResults. Used to continue a previous list request. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeMachineTypeList. ++ (id)queryForMachineTypesListWithProject:(NSString *)project; + +#pragma mark - +#pragma mark "networks" methods +// These create a GTLQueryCompute object. + +// Method: compute.networks.delete +// Deletes the specified network resource. +// Required: +// project: Name of the project scoping this request. +// network: Name of the network resource to delete. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForNetworksDeleteWithProject:(NSString *)project + network:(NSString *)network; + +// Method: compute.networks.get +// Returns the specified network resource. +// Required: +// project: Name of the project scoping this request. +// network: Name of the network resource to return. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeNetwork. ++ (id)queryForNetworksGetWithProject:(NSString *)project + network:(NSString *)network; + +// Method: compute.networks.insert +// Creates a network resource in the specified project using the data included +// in the request. +// Required: +// project: Name of the project scoping this request. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForNetworksInsertWithObject:(GTLComputeNetwork *)object + project:(NSString *)project; + +// Method: compute.networks.list +// Retrieves the list of network resources available to the specified project. +// Required: +// project: Name of the project scoping this request. +// Optional: +// filter: Optional. Filter expression for filtering listed resources. +// maxResults: Optional. Maximum count of results to be returned. Maximum and +// default value is 100. (0..100, default 100) +// pageToken: Optional. Tag returned by a previous list request truncated by +// maxResults. Used to continue a previous list request. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeNetworkList. ++ (id)queryForNetworksListWithProject:(NSString *)project; + +#pragma mark - +#pragma mark "operations" methods +// These create a GTLQueryCompute object. + +// Method: compute.operations.delete +// Deletes the specified operation resource. +// Required: +// project: Name of the project scoping this request. +// operation: Name of the operation resource to delete. +// Authorization scope(s): +// kGTLAuthScopeCompute ++ (id)queryForOperationsDeleteWithProject:(NSString *)project + operation:(NSString *)operation; + +// Method: compute.operations.get +// Retrieves the specified operation resource. +// Required: +// project: Name of the project scoping this request. +// operation: Name of the operation resource to return. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeOperation. ++ (id)queryForOperationsGetWithProject:(NSString *)project + operation:(NSString *)operation; + +// Method: compute.operations.list +// Retrieves the list of operation resources contained within the specified +// project. +// Required: +// project: Name of the project scoping this request. +// Optional: +// filter: Optional. Filter expression for filtering listed resources. +// maxResults: Optional. Maximum count of results to be returned. Maximum and +// default value is 100. (0..100, default 100) +// pageToken: Optional. Tag returned by a previous list request truncated by +// maxResults. Used to continue a previous list request. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeOperationList. ++ (id)queryForOperationsListWithProject:(NSString *)project; + +#pragma mark - +#pragma mark "projects" methods +// These create a GTLQueryCompute object. + +// Method: compute.projects.get +// Returns the specified project resource. +// Required: +// project: Name of the project resource to retrieve. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeProject. ++ (id)queryForProjectsGetWithProject:(NSString *)project; + +// Method: compute.projects.setCommonInstanceMetadata +// Sets metadata common to all instances within the specified project using the +// data included in the request. +// Required: +// project: Name of the project scoping this request. +// Optional: +// metadata: GTLComputeMetadata +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForProjectsSetCommonInstanceMetadataWithProject:(NSString *)project; + +#pragma mark - +#pragma mark "snapshots" methods +// These create a GTLQueryCompute object. + +// Method: compute.snapshots.delete +// Deletes the specified persistent disk snapshot resource. +// Required: +// project: Name of the project scoping this request. +// snapshot: Name of the persistent disk snapshot resource to delete. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForSnapshotsDeleteWithProject:(NSString *)project + snapshot:(NSString *)snapshot; + +// Method: compute.snapshots.get +// Returns the specified persistent disk snapshot resource. +// Required: +// project: Name of the project scoping this request. +// snapshot: Name of the persistent disk snapshot resource to return. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeSnapshot. ++ (id)queryForSnapshotsGetWithProject:(NSString *)project + snapshot:(NSString *)snapshot; + +// Method: compute.snapshots.insert +// Creates a persistent disk snapshot resource in the specified project using +// the data included in the request. +// Required: +// project: Name of the project scoping this request. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForSnapshotsInsertWithObject:(GTLComputeSnapshot *)object + project:(NSString *)project; + +// Method: compute.snapshots.list +// Retrieves the list of persistent disk snapshot resources contained within the +// specified project. +// Required: +// project: Name of the project scoping this request. +// Optional: +// filter: Optional. Filter expression for filtering listed resources. +// maxResults: Optional. Maximum count of results to be returned. Maximum and +// default value is 100. (0..100, default 100) +// pageToken: Optional. Tag returned by a previous list request truncated by +// maxResults. Used to continue a previous list request. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeSnapshotList. ++ (id)queryForSnapshotsListWithProject:(NSString *)project; + +#pragma mark - +#pragma mark "zones" methods +// These create a GTLQueryCompute object. + +// Method: compute.zones.get +// Returns the specified zone resource. +// Required: +// project: Name of the project scoping this request. +// zoneProperty: Name of the zone resource to return. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeZone. ++ (id)queryForZonesGetWithProject:(NSString *)project + zoneProperty:(NSString *)zoneProperty; + +// Method: compute.zones.list +// Retrieves the list of zone resources available to the specified project. +// Required: +// project: Name of the project scoping this request. +// Optional: +// filter: Optional. Filter expression for filtering listed resources. +// maxResults: Optional. Maximum count of results to be returned. Maximum and +// default value is 100. (0..100, default 100) +// pageToken: Optional. Tag returned by a previous list request truncated by +// maxResults. Used to continue a previous list request. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeZoneList. ++ (id)queryForZonesListWithProject:(NSString *)project; + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLQueryCompute.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLQueryCompute.m.svn-base new file mode 100644 index 0000000..315920f --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLQueryCompute.m.svn-base @@ -0,0 +1,535 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryCompute.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLQueryCompute (40 custom class methods, 18 custom properties) + +#import "GTLQueryCompute.h" + +#import "GTLComputeAccessConfig.h" +#import "GTLComputeDisk.h" +#import "GTLComputeDiskList.h" +#import "GTLComputeFirewall.h" +#import "GTLComputeFirewallList.h" +#import "GTLComputeImage.h" +#import "GTLComputeImageList.h" +#import "GTLComputeInstance.h" +#import "GTLComputeInstanceList.h" +#import "GTLComputeKernel.h" +#import "GTLComputeKernelList.h" +#import "GTLComputeMachineType.h" +#import "GTLComputeMachineTypeList.h" +#import "GTLComputeMetadata.h" +#import "GTLComputeNetwork.h" +#import "GTLComputeNetworkList.h" +#import "GTLComputeOperation.h" +#import "GTLComputeOperationList.h" +#import "GTLComputeProject.h" +#import "GTLComputeSerialPortOutput.h" +#import "GTLComputeSnapshot.h" +#import "GTLComputeSnapshotList.h" +#import "GTLComputeZone.h" +#import "GTLComputeZoneList.h" + +@implementation GTLQueryCompute + +@dynamic accessConfig, disk, fields, filter, firewall, image, instance, kernel, + machineType, maxResults, metadata, network, networkInterface, + operation, pageToken, project, snapshot, zoneProperty; + ++ (NSDictionary *)parameterNameMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"access_config", @"accessConfig", + @"network_interface", @"networkInterface", + @"zone", @"zoneProperty", + nil]; + return map; +} + +#pragma mark - +#pragma mark "disks" methods +// These create a GTLQueryCompute object. + ++ (id)queryForDisksDeleteWithProject:(NSString *)project + disk:(NSString *)disk { + NSString *methodName = @"compute.disks.delete"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.disk = disk; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForDisksGetWithProject:(NSString *)project + disk:(NSString *)disk { + NSString *methodName = @"compute.disks.get"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.disk = disk; + query.expectedObjectClass = [GTLComputeDisk class]; + return query; +} + ++ (id)queryForDisksInsertWithObject:(GTLComputeDisk *)object + project:(NSString *)project { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"compute.disks.insert"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.project = project; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForDisksListWithProject:(NSString *)project { + NSString *methodName = @"compute.disks.list"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.expectedObjectClass = [GTLComputeDiskList class]; + return query; +} + +#pragma mark - +#pragma mark "firewalls" methods +// These create a GTLQueryCompute object. + ++ (id)queryForFirewallsDeleteWithProject:(NSString *)project + firewall:(NSString *)firewall { + NSString *methodName = @"compute.firewalls.delete"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.firewall = firewall; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForFirewallsGetWithProject:(NSString *)project + firewall:(NSString *)firewall { + NSString *methodName = @"compute.firewalls.get"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.firewall = firewall; + query.expectedObjectClass = [GTLComputeFirewall class]; + return query; +} + ++ (id)queryForFirewallsInsertWithObject:(GTLComputeFirewall *)object + project:(NSString *)project { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"compute.firewalls.insert"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.project = project; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForFirewallsListWithProject:(NSString *)project { + NSString *methodName = @"compute.firewalls.list"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.expectedObjectClass = [GTLComputeFirewallList class]; + return query; +} + ++ (id)queryForFirewallsPatchWithObject:(GTLComputeFirewall *)object + project:(NSString *)project + firewall:(NSString *)firewall { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"compute.firewalls.patch"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.project = project; + query.firewall = firewall; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForFirewallsUpdateWithObject:(GTLComputeFirewall *)object + project:(NSString *)project + firewall:(NSString *)firewall { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"compute.firewalls.update"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.project = project; + query.firewall = firewall; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + +#pragma mark - +#pragma mark "images" methods +// These create a GTLQueryCompute object. + ++ (id)queryForImagesDeleteWithProject:(NSString *)project + image:(NSString *)image { + NSString *methodName = @"compute.images.delete"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.image = image; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForImagesGetWithProject:(NSString *)project + image:(NSString *)image { + NSString *methodName = @"compute.images.get"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.image = image; + query.expectedObjectClass = [GTLComputeImage class]; + return query; +} + ++ (id)queryForImagesInsertWithObject:(GTLComputeImage *)object + project:(NSString *)project { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"compute.images.insert"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.project = project; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForImagesListWithProject:(NSString *)project { + NSString *methodName = @"compute.images.list"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.expectedObjectClass = [GTLComputeImageList class]; + return query; +} + +#pragma mark - +#pragma mark "instances" methods +// These create a GTLQueryCompute object. + ++ (id)queryForInstancesAddAccessConfigWithProject:(NSString *)project + instance:(NSString *)instance + networkInterface:(NSString *)networkInterface { + NSString *methodName = @"compute.instances.addAccessConfig"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.instance = instance; + query.networkInterface = networkInterface; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForInstancesDeleteWithProject:(NSString *)project + instance:(NSString *)instance { + NSString *methodName = @"compute.instances.delete"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.instance = instance; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForInstancesDeleteAccessConfigWithProject:(NSString *)project + instance:(NSString *)instance + accessConfig:(NSString *)accessConfig + networkInterface:(NSString *)networkInterface { + NSString *methodName = @"compute.instances.deleteAccessConfig"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.instance = instance; + query.accessConfig = accessConfig; + query.networkInterface = networkInterface; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForInstancesGetWithProject:(NSString *)project + instance:(NSString *)instance { + NSString *methodName = @"compute.instances.get"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.instance = instance; + query.expectedObjectClass = [GTLComputeInstance class]; + return query; +} + ++ (id)queryForInstancesGetSerialPortOutputWithProject:(NSString *)project + instance:(NSString *)instance { + NSString *methodName = @"compute.instances.getSerialPortOutput"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.instance = instance; + query.expectedObjectClass = [GTLComputeSerialPortOutput class]; + return query; +} + ++ (id)queryForInstancesInsertWithObject:(GTLComputeInstance *)object + project:(NSString *)project { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"compute.instances.insert"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.project = project; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForInstancesListWithProject:(NSString *)project { + NSString *methodName = @"compute.instances.list"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.expectedObjectClass = [GTLComputeInstanceList class]; + return query; +} + +#pragma mark - +#pragma mark "kernels" methods +// These create a GTLQueryCompute object. + ++ (id)queryForKernelsGetWithProject:(NSString *)project + kernel:(NSString *)kernel { + NSString *methodName = @"compute.kernels.get"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.kernel = kernel; + query.expectedObjectClass = [GTLComputeKernel class]; + return query; +} + ++ (id)queryForKernelsListWithProject:(NSString *)project { + NSString *methodName = @"compute.kernels.list"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.expectedObjectClass = [GTLComputeKernelList class]; + return query; +} + +#pragma mark - +#pragma mark "machineTypes" methods +// These create a GTLQueryCompute object. + ++ (id)queryForMachineTypesGetWithProject:(NSString *)project + machineType:(NSString *)machineType { + NSString *methodName = @"compute.machineTypes.get"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.machineType = machineType; + query.expectedObjectClass = [GTLComputeMachineType class]; + return query; +} + ++ (id)queryForMachineTypesListWithProject:(NSString *)project { + NSString *methodName = @"compute.machineTypes.list"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.expectedObjectClass = [GTLComputeMachineTypeList class]; + return query; +} + +#pragma mark - +#pragma mark "networks" methods +// These create a GTLQueryCompute object. + ++ (id)queryForNetworksDeleteWithProject:(NSString *)project + network:(NSString *)network { + NSString *methodName = @"compute.networks.delete"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.network = network; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForNetworksGetWithProject:(NSString *)project + network:(NSString *)network { + NSString *methodName = @"compute.networks.get"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.network = network; + query.expectedObjectClass = [GTLComputeNetwork class]; + return query; +} + ++ (id)queryForNetworksInsertWithObject:(GTLComputeNetwork *)object + project:(NSString *)project { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"compute.networks.insert"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.project = project; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForNetworksListWithProject:(NSString *)project { + NSString *methodName = @"compute.networks.list"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.expectedObjectClass = [GTLComputeNetworkList class]; + return query; +} + +#pragma mark - +#pragma mark "operations" methods +// These create a GTLQueryCompute object. + ++ (id)queryForOperationsDeleteWithProject:(NSString *)project + operation:(NSString *)operation { + NSString *methodName = @"compute.operations.delete"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.operation = operation; + return query; +} + ++ (id)queryForOperationsGetWithProject:(NSString *)project + operation:(NSString *)operation { + NSString *methodName = @"compute.operations.get"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.operation = operation; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForOperationsListWithProject:(NSString *)project { + NSString *methodName = @"compute.operations.list"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.expectedObjectClass = [GTLComputeOperationList class]; + return query; +} + +#pragma mark - +#pragma mark "projects" methods +// These create a GTLQueryCompute object. + ++ (id)queryForProjectsGetWithProject:(NSString *)project { + NSString *methodName = @"compute.projects.get"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.expectedObjectClass = [GTLComputeProject class]; + return query; +} + ++ (id)queryForProjectsSetCommonInstanceMetadataWithProject:(NSString *)project { + NSString *methodName = @"compute.projects.setCommonInstanceMetadata"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + +#pragma mark - +#pragma mark "snapshots" methods +// These create a GTLQueryCompute object. + ++ (id)queryForSnapshotsDeleteWithProject:(NSString *)project + snapshot:(NSString *)snapshot { + NSString *methodName = @"compute.snapshots.delete"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.snapshot = snapshot; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForSnapshotsGetWithProject:(NSString *)project + snapshot:(NSString *)snapshot { + NSString *methodName = @"compute.snapshots.get"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.snapshot = snapshot; + query.expectedObjectClass = [GTLComputeSnapshot class]; + return query; +} + ++ (id)queryForSnapshotsInsertWithObject:(GTLComputeSnapshot *)object + project:(NSString *)project { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"compute.snapshots.insert"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.project = project; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForSnapshotsListWithProject:(NSString *)project { + NSString *methodName = @"compute.snapshots.list"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.expectedObjectClass = [GTLComputeSnapshotList class]; + return query; +} + +#pragma mark - +#pragma mark "zones" methods +// These create a GTLQueryCompute object. + ++ (id)queryForZonesGetWithProject:(NSString *)project + zoneProperty:(NSString *)zoneProperty { + NSString *methodName = @"compute.zones.get"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.zoneProperty = zoneProperty; + query.expectedObjectClass = [GTLComputeZone class]; + return query; +} + ++ (id)queryForZonesListWithProject:(NSString *)project { + NSString *methodName = @"compute.zones.list"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.expectedObjectClass = [GTLComputeZoneList class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLServiceCompute.h.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLServiceCompute.h.svn-base new file mode 100644 index 0000000..096a678 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLServiceCompute.h.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceCompute.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLServiceCompute (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceCompute : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryCompute.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLServiceCompute.m.svn-base b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLServiceCompute.m.svn-base new file mode 100644 index 0000000..08ba5a9 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/.svn/text-base/GTLServiceCompute.m.svn-base @@ -0,0 +1,87 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceCompute.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLServiceCompute (0 custom class methods, 0 custom properties) + +#import "GTLCompute.h" + +@implementation GTLServiceCompute + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryCompute class], + [GTLComputeAccessConfig class], + [GTLComputeAttachedDisk class], + [GTLComputeDisk class], + [GTLComputeDiskList class], + [GTLComputeFirewall class], + [GTLComputeFirewallList class], + [GTLComputeImage class], + [GTLComputeImageList class], + [GTLComputeInstance class], + [GTLComputeInstanceList class], + [GTLComputeKernel class], + [GTLComputeKernelList class], + [GTLComputeMachineType class], + [GTLComputeMachineTypeList class], + [GTLComputeMetadata class], + [GTLComputeNetwork class], + [GTLComputeNetworkInterface class], + [GTLComputeNetworkList class], + [GTLComputeOperation class], + [GTLComputeOperationList class], + [GTLComputeProject class], + [GTLComputeSerialPortOutput class], + [GTLComputeServiceAccount class], + [GTLComputeSnapshot class], + [GTLComputeSnapshotList class], + [GTLComputeZone class], + [GTLComputeZoneList class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v1beta13"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLCompute.h b/GTL/Source/Services/Compute/Generated/GTLCompute.h new file mode 100644 index 0000000..4f8f104 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLCompute.h @@ -0,0 +1,60 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCompute.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 + +#import "GTLComputeConstants.h" + +#import "GTLComputeAccessConfig.h" +#import "GTLComputeAttachedDisk.h" +#import "GTLComputeDisk.h" +#import "GTLComputeDiskList.h" +#import "GTLComputeFirewall.h" +#import "GTLComputeFirewallList.h" +#import "GTLComputeImage.h" +#import "GTLComputeImageList.h" +#import "GTLComputeInstance.h" +#import "GTLComputeInstanceList.h" +#import "GTLComputeKernel.h" +#import "GTLComputeKernelList.h" +#import "GTLComputeMachineType.h" +#import "GTLComputeMachineTypeList.h" +#import "GTLComputeMetadata.h" +#import "GTLComputeNetwork.h" +#import "GTLComputeNetworkInterface.h" +#import "GTLComputeNetworkList.h" +#import "GTLComputeOperation.h" +#import "GTLComputeOperationList.h" +#import "GTLComputeProject.h" +#import "GTLComputeSerialPortOutput.h" +#import "GTLComputeServiceAccount.h" +#import "GTLComputeSnapshot.h" +#import "GTLComputeSnapshotList.h" +#import "GTLComputeZone.h" +#import "GTLComputeZoneList.h" + +#import "GTLQueryCompute.h" +#import "GTLServiceCompute.h" diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeAccessConfig.h b/GTL/Source/Services/Compute/Generated/GTLComputeAccessConfig.h new file mode 100644 index 0000000..f61a308 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeAccessConfig.h @@ -0,0 +1,59 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeAccessConfig.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeAccessConfig (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLComputeAccessConfig +// + +@interface GTLComputeAccessConfig : GTLObject + +// Type of the resource. +@property (copy) NSString *kind; + +// Name of this access configuration. +@property (copy) NSString *name; + +// An external IP address associated with this instance. Specify an unused +// static IP address available to the project. If left blank, the external IP +// will be drawn from a shared ephemeral pool. +@property (copy) NSString *natIP; + +// Type of configuration. Must be set to "ONE_TO_ONE_NAT". This configures +// port-for-port NAT to the internet. +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeAccessConfig.m b/GTL/Source/Services/Compute/Generated/GTLComputeAccessConfig.m new file mode 100644 index 0000000..9ffb873 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeAccessConfig.m @@ -0,0 +1,45 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeAccessConfig.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeAccessConfig (0 custom class methods, 4 custom properties) + +#import "GTLComputeAccessConfig.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeAccessConfig +// + +@implementation GTLComputeAccessConfig +@dynamic kind, name, natIP, type; + ++ (void)load { + [self registerObjectClassForKind:@"compute#accessConfig"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeAttachedDisk.h b/GTL/Source/Services/Compute/Generated/GTLComputeAttachedDisk.h new file mode 100644 index 0000000..647ec23 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeAttachedDisk.h @@ -0,0 +1,72 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeAttachedDisk.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeAttachedDisk (0 custom class methods, 7 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLComputeAttachedDisk +// + +@interface GTLComputeAttachedDisk : GTLObject + +// Persistent disk only; If true, delete the disk and all its data when the +// associated instance is deleted. This property defaults to false if not +// specified. +@property (retain) NSNumber *deleteOnTerminate; // boolValue + +// Persistent disk only; must be unique within the instance when specified. This +// represents a unique device name that is reflected into the /dev/ tree of a +// Linux operating system running within the instance. If not specified, a +// default will be chosen by the system. +@property (copy) NSString *deviceName; + +// A zero-based index to assign to this disk, where 0 is reserved for the boot +// disk. If not specified, the server will choose an appropriate value. +@property (retain) NSNumber *index; // intValue + +// Type of the resource. +@property (copy) NSString *kind; + +// The mode in which to attach this disk, either "READ_WRITE" or "READ_ONLY". +@property (copy) NSString *mode; + +// Persistent disk only; the URL of the persistent disk resource. +@property (copy) NSString *source; + +// Type of the disk, either "EPHEMERAL" or "PERSISTENT". Note that persistent +// disks must be created before you can specify them here. +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeAttachedDisk.m b/GTL/Source/Services/Compute/Generated/GTLComputeAttachedDisk.m new file mode 100644 index 0000000..eedac07 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeAttachedDisk.m @@ -0,0 +1,45 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeAttachedDisk.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeAttachedDisk (0 custom class methods, 7 custom properties) + +#import "GTLComputeAttachedDisk.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeAttachedDisk +// + +@implementation GTLComputeAttachedDisk +@dynamic deleteOnTerminate, deviceName, index, kind, mode, source, type; + ++ (void)load { + [self registerObjectClassForKind:@"compute#attachedDisk"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeConstants.h b/GTL/Source/Services/Compute/Generated/GTLComputeConstants.h new file mode 100644 index 0000000..537c7f6 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeConstants.h @@ -0,0 +1,43 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// View and manage your Google Compute Engine resources +GTL_EXTERN NSString * const kGTLAuthScopeCompute; // "https://www.googleapis.com/auth/compute" +// View your data in Google Cloud Storage +GTL_EXTERN NSString * const kGTLAuthScopeComputeDevstorageReadOnly; // "https://www.googleapis.com/auth/devstorage.read_only" +// View your Google Compute Engine resources +GTL_EXTERN NSString * const kGTLAuthScopeComputeReadonly; // "https://www.googleapis.com/auth/compute.readonly" diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeConstants.m b/GTL/Source/Services/Compute/Generated/GTLComputeConstants.m new file mode 100644 index 0000000..0e84713 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeConstants.m @@ -0,0 +1,34 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 + +#import "GTLComputeConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeCompute = @"https://www.googleapis.com/auth/compute"; +NSString * const kGTLAuthScopeComputeDevstorageReadOnly = @"https://www.googleapis.com/auth/devstorage.read_only"; +NSString * const kGTLAuthScopeComputeReadonly = @"https://www.googleapis.com/auth/compute.readonly"; diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeDisk.h b/GTL/Source/Services/Compute/Generated/GTLComputeDisk.h new file mode 100644 index 0000000..beefb57 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeDisk.h @@ -0,0 +1,91 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeDisk.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeDisk (0 custom class methods, 12 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLComputeDisk +// + +@interface GTLComputeDisk : GTLObject + +// Creation timestamp in RFC3339 text format (output only). +@property (copy) NSString *creationTimestamp; + +// An optional textual description of the resource; provided by the client when +// the resource is created. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // unsignedLongLongValue + +// Type of the resource. +@property (copy) NSString *kind; + +// Name of the resource; provided by the client when the resource is created. +// The name must be 1-63 characters long, and comply with RFC1035. +@property (copy) NSString *name; + +// Internal use only. +@property (copy) NSString *options; + +// Server defined URL for the resource (output only). +@property (copy) NSString *selfLink; + +// Size of the persistent disk, specified in GB. +@property (retain) NSNumber *sizeGb; // longLongValue + +// The source snapshot used to create this disk. Once the source snapshot has +// been deleted from the system, this field will be cleared, and will not be set +// even if a snapshot with the same name has been re-created. +@property (copy) NSString *sourceSnapshot; + +// The 'id' value of the snapshot used to create this disk. This value may be +// used to determine whether the disk was created from the current or a previous +// instance of a given disk snapshot. +@property (copy) NSString *sourceSnapshotId; + +// The status of disk creation (output only). +@property (copy) NSString *status; + +// URL for the zone where the persistent disk resides; provided by the client +// when the disk is created. A persistent disk must reside in the same zone as +// the instance to which it is attached. +// Remapped to 'zoneProperty' to avoid NSObject's 'zone'. +@property (copy) NSString *zoneProperty; + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeDisk.m b/GTL/Source/Services/Compute/Generated/GTLComputeDisk.m new file mode 100644 index 0000000..4d21f34 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeDisk.m @@ -0,0 +1,57 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeDisk.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeDisk (0 custom class methods, 12 custom properties) + +#import "GTLComputeDisk.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeDisk +// + +@implementation GTLComputeDisk +@dynamic creationTimestamp, descriptionProperty, identifier, kind, name, + options, selfLink, sizeGb, sourceSnapshot, sourceSnapshotId, status, + zoneProperty; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + @"zone", @"zoneProperty", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#disk"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeDiskList.h b/GTL/Source/Services/Compute/Generated/GTLComputeDiskList.h new file mode 100644 index 0000000..15c4bb1 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeDiskList.h @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeDiskList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeDiskList (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeDisk; + +// ---------------------------------------------------------------------------- +// +// GTLComputeDiskList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLComputeDiskList : GTLCollectionObject + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The persistent disk resources. +@property (retain) NSArray *items; // of GTLComputeDisk + +// Type of resource. +@property (copy) NSString *kind; + +// A token used to continue a truncated list request (output only). +@property (copy) NSString *nextPageToken; + +// Server defined URL for this resource (output only). +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeDiskList.m b/GTL/Source/Services/Compute/Generated/GTLComputeDiskList.m new file mode 100644 index 0000000..c787b3a --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeDiskList.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeDiskList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeDiskList (0 custom class methods, 5 custom properties) + +#import "GTLComputeDiskList.h" + +#import "GTLComputeDisk.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeDiskList +// + +@implementation GTLComputeDiskList +@dynamic identifier, items, kind, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeDisk class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#diskList"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeFirewall.h b/GTL/Source/Services/Compute/Generated/GTLComputeFirewall.h new file mode 100644 index 0000000..458587a --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeFirewall.h @@ -0,0 +1,114 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeFirewall.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeFirewall (0 custom class methods, 11 custom properties) +// GTLComputeFirewallAllowedItem (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeFirewallAllowedItem; + +// ---------------------------------------------------------------------------- +// +// GTLComputeFirewall +// + +@interface GTLComputeFirewall : GTLObject + +// The list of rules specified by this firewall. Each rule specifies a protocol +// and port-range tuple that describes a permitted connection. +@property (retain) NSArray *allowed; // of GTLComputeFirewallAllowedItem + +// Creation timestamp in RFC3339 text format (output only). +@property (copy) NSString *creationTimestamp; + +// An optional textual description of the resource; provided by the client when +// the resource is created. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // unsignedLongLongValue + +// Type of the resource. +@property (copy) NSString *kind; + +// Name of the resource; provided by the client when the resource is created. +// The name must be 1-63 characters long, and comply with RFC1035. +@property (copy) NSString *name; + +// URL of the network to which this firewall is applied; provided by the client +// when the firewall is created. +@property (copy) NSString *network; + +// Server defined URL for the resource (output only). +@property (copy) NSString *selfLink; + +// A list of IP address blocks expressed in CIDR format which this rule applies +// to. One or both of sourceRanges and sourceTags may be set; an inbound +// connection is allowed if either the range or the tag of the source matches. +@property (retain) NSArray *sourceRanges; // of NSString + +// A list of instance tags which this rule applies to. One or both of +// sourceRanges and sourceTags may be set; an inbound connection is allowed if +// either the range or the tag of the source matches. +@property (retain) NSArray *sourceTags; // of NSString + +// A list of instance tags indicating sets of instances located on network which +// may make network connections as specified in allowed. If no targetTags are +// specified, the firewall rule applies to all instances on the specified +// network. +@property (retain) NSArray *targetTags; // of NSString + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeFirewallAllowedItem +// + +@interface GTLComputeFirewallAllowedItem : GTLObject + +// Required; this is the IP protocol that is allowed for this rule. This can +// either be a well known protocol string (tcp, udp or icmp) or the IP protocol +// number. +@property (copy) NSString *IPProtocol; + +// An optional list of ports which are allowed. It is an error to specify this +// for any protocol that isn't UDP or TCP. Each entry must be either an integer +// or a range. If not specified, connections through any port are allowed. +// Example inputs include: ["22"], ["80,"443"] and ["12345-12349"]. +@property (retain) NSArray *ports; // of NSString + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeFirewall.m b/GTL/Source/Services/Compute/Generated/GTLComputeFirewall.m new file mode 100644 index 0000000..d30e2ad --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeFirewall.m @@ -0,0 +1,85 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeFirewall.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeFirewall (0 custom class methods, 11 custom properties) +// GTLComputeFirewallAllowedItem (0 custom class methods, 2 custom properties) + +#import "GTLComputeFirewall.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeFirewall +// + +@implementation GTLComputeFirewall +@dynamic allowed, creationTimestamp, descriptionProperty, identifier, kind, + name, network, selfLink, sourceRanges, sourceTags, targetTags; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLComputeFirewallAllowedItem class], @"allowed", + [NSString class], @"sourceRanges", + [NSString class], @"sourceTags", + [NSString class], @"targetTags", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#firewall"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeFirewallAllowedItem +// + +@implementation GTLComputeFirewallAllowedItem +@dynamic IPProtocol, ports; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"ports"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeFirewallList.h b/GTL/Source/Services/Compute/Generated/GTLComputeFirewallList.h new file mode 100644 index 0000000..84b4868 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeFirewallList.h @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeFirewallList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeFirewallList (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeFirewall; + +// ---------------------------------------------------------------------------- +// +// GTLComputeFirewallList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLComputeFirewallList : GTLCollectionObject + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The firewall resources. +@property (retain) NSArray *items; // of GTLComputeFirewall + +// Type of resource. +@property (copy) NSString *kind; + +// A token used to continue a truncated list request (output only). +@property (copy) NSString *nextPageToken; + +// Server defined URL for this resource (output only). +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeFirewallList.m b/GTL/Source/Services/Compute/Generated/GTLComputeFirewallList.m new file mode 100644 index 0000000..8939c3b --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeFirewallList.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeFirewallList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeFirewallList (0 custom class methods, 5 custom properties) + +#import "GTLComputeFirewallList.h" + +#import "GTLComputeFirewall.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeFirewallList +// + +@implementation GTLComputeFirewallList +@dynamic identifier, items, kind, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeFirewall class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#firewallList"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeImage.h b/GTL/Source/Services/Compute/Generated/GTLComputeImage.h new file mode 100644 index 0000000..b3e8ffd --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeImage.h @@ -0,0 +1,120 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeImage.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeImage (0 custom class methods, 10 custom properties) +// GTLComputeImageDiskSnapshot (0 custom class methods, 1 custom properties) +// GTLComputeImageRawDisk (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeImageDiskSnapshot; +@class GTLComputeImageRawDisk; + +// ---------------------------------------------------------------------------- +// +// GTLComputeImage +// + +@interface GTLComputeImage : GTLObject + +// Creation timestamp in RFC3339 text format (output only). +@property (copy) NSString *creationTimestamp; + +// Textual description of the resource; provided by the client when the resource +// is created. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Not yet implemented. +@property (retain) GTLComputeImageDiskSnapshot *diskSnapshot; + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // unsignedLongLongValue + +// Type of the resource. +@property (copy) NSString *kind; + +// Name of the resource; provided by the client when the resource is created. +// The name must be 1-63 characters long, and comply with RFC1035. +@property (copy) NSString *name; + +// An optional URL of the preferred kernel for use with this disk image. If not +// specified, a server defined default kernel will be used. +@property (copy) NSString *preferredKernel; + +// The raw disk image parameters. +@property (retain) GTLComputeImageRawDisk *rawDisk; + +// Server defined URL for the resource (output only). +@property (copy) NSString *selfLink; + +// Must be "RAW"; provided by the client when the disk image is created. +@property (copy) NSString *sourceType; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeImageDiskSnapshot +// + +@interface GTLComputeImageDiskSnapshot : GTLObject + +// URL of the disk snapshot. +@property (copy) NSString *source; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeImageRawDisk +// + +@interface GTLComputeImageRawDisk : GTLObject + +// The format used to encode and transmit the block device. Should be TAR. This +// is just a container and transmission format and not a runtime format. +// Provided by the client when the disk image is created. +@property (copy) NSString *containerType; + +// An optional SHA1 checksum of the disk image before unpackaging; provided by +// the client when the disk image is created. +@property (copy) NSString *sha1Checksum; + +// The full Google Cloud Storage URL where the disk image is stored; provided by +// the client when the disk image is created. +@property (copy) NSString *source; + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeImage.m b/GTL/Source/Services/Compute/Generated/GTLComputeImage.m new file mode 100644 index 0000000..7646b7a --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeImage.m @@ -0,0 +1,77 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeImage.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeImage (0 custom class methods, 10 custom properties) +// GTLComputeImageDiskSnapshot (0 custom class methods, 1 custom properties) +// GTLComputeImageRawDisk (0 custom class methods, 3 custom properties) + +#import "GTLComputeImage.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeImage +// + +@implementation GTLComputeImage +@dynamic creationTimestamp, descriptionProperty, diskSnapshot, identifier, kind, + name, preferredKernel, rawDisk, selfLink, sourceType; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#image"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeImageDiskSnapshot +// + +@implementation GTLComputeImageDiskSnapshot +@dynamic source; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeImageRawDisk +// + +@implementation GTLComputeImageRawDisk +@dynamic containerType, sha1Checksum, source; +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeImageList.h b/GTL/Source/Services/Compute/Generated/GTLComputeImageList.h new file mode 100644 index 0000000..29d65eb --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeImageList.h @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeImageList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeImageList (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeImage; + +// ---------------------------------------------------------------------------- +// +// GTLComputeImageList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLComputeImageList : GTLCollectionObject + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The disk image resources. +@property (retain) NSArray *items; // of GTLComputeImage + +// Type of resource. +@property (copy) NSString *kind; + +// A token used to continue a truncated list request (output only). +@property (copy) NSString *nextPageToken; + +// Server defined URL for this resource (output only). +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeImageList.m b/GTL/Source/Services/Compute/Generated/GTLComputeImageList.m new file mode 100644 index 0000000..7de7252 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeImageList.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeImageList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeImageList (0 custom class methods, 5 custom properties) + +#import "GTLComputeImageList.h" + +#import "GTLComputeImage.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeImageList +// + +@implementation GTLComputeImageList +@dynamic identifier, items, kind, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeImage class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#imageList"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeInstance.h b/GTL/Source/Services/Compute/Generated/GTLComputeInstance.h new file mode 100644 index 0000000..c1bbe8d --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeInstance.h @@ -0,0 +1,117 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeInstance.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeInstance (0 custom class methods, 16 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeAttachedDisk; +@class GTLComputeMetadata; +@class GTLComputeNetworkInterface; +@class GTLComputeServiceAccount; + +// ---------------------------------------------------------------------------- +// +// GTLComputeInstance +// + +@interface GTLComputeInstance : GTLObject + +// Creation timestamp in RFC3339 text format (output only). +@property (copy) NSString *creationTimestamp; + +// An optional textual description of the resource; provided by the client when +// the resource is created. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Array of disks associated with this instance. Persistent disks must be +// created before you can assign them. +@property (retain) NSArray *disks; // of GTLComputeAttachedDisk + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // unsignedLongLongValue + +// An optional URL of the disk image resource to be to be installed on this +// instance; provided by the client when the instance is created. If not +// specified, the server will choose a default image. +@property (copy) NSString *image; + +// Type of the resource. +@property (copy) NSString *kind; + +// URL of the machine type resource describing which machine type to use to host +// the instance; provided by the client when the instance is created. +@property (copy) NSString *machineType; + +// Metadata key/value pairs assigned to this instance. Consists of custom +// metadata or predefined keys; see Instance documentation for more information. +@property (retain) GTLComputeMetadata *metadata; + +// Name of the resource; provided by the client when the resource is created. +// The name must be 1-63 characters long, and comply with RFC1035. +@property (copy) NSString *name; + +// Array of configurations for this interface. This specifies how this interface +// is configured to interact with other network services, such as connecting to +// the internet. Currently, ONE_TO_ONE_NAT is the only access config supported. +// If there are no accessConfigs specified, then this instance will have no +// external internet access. +@property (retain) NSArray *networkInterfaces; // of GTLComputeNetworkInterface + +// Server defined URL for the resource (output only). +@property (copy) NSString *selfLink; + +// A list of service accounts each with specified scopes, for which access +// tokens are to be made available to the instance through metadata queries. +@property (retain) NSArray *serviceAccounts; // of GTLComputeServiceAccount + +// Instance status. One of the following values: "PROVISIONING", "STAGING", +// "RUNNING", "STOPPED", "TERMINATED", and "STOPPING" (output only). +@property (copy) NSString *status; + +// An optional, human-readable explanation of the status (output only). +@property (copy) NSString *statusMessage; + +// An optional set of tags applied to this instance. Used to identify valid +// sources or targets for network firewalls. Provided by the client when the +// instance is created. Each tag must be 1-63 characters long, and comply with +// RFC1035. +@property (retain) NSArray *tags; // of NSString + +// URL of the zone resource describing where this instance should be hosted; +// provided by the client when the instance is created. +// Remapped to 'zoneProperty' to avoid NSObject's 'zone'. +@property (copy) NSString *zoneProperty; + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeInstance.m b/GTL/Source/Services/Compute/Generated/GTLComputeInstance.m new file mode 100644 index 0000000..a7dae33 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeInstance.m @@ -0,0 +1,73 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeInstance.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeInstance (0 custom class methods, 16 custom properties) + +#import "GTLComputeInstance.h" + +#import "GTLComputeAttachedDisk.h" +#import "GTLComputeMetadata.h" +#import "GTLComputeNetworkInterface.h" +#import "GTLComputeServiceAccount.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeInstance +// + +@implementation GTLComputeInstance +@dynamic creationTimestamp, descriptionProperty, disks, identifier, image, kind, + machineType, metadata, name, networkInterfaces, selfLink, + serviceAccounts, status, statusMessage, tags, zoneProperty; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + @"zone", @"zoneProperty", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLComputeAttachedDisk class], @"disks", + [GTLComputeNetworkInterface class], @"networkInterfaces", + [GTLComputeServiceAccount class], @"serviceAccounts", + [NSString class], @"tags", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#instance"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeInstanceList.h b/GTL/Source/Services/Compute/Generated/GTLComputeInstanceList.h new file mode 100644 index 0000000..21f2d88 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeInstanceList.h @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeInstanceList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeInstanceList (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeInstance; + +// ---------------------------------------------------------------------------- +// +// GTLComputeInstanceList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLComputeInstanceList : GTLCollectionObject + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// A list of instance resources. +@property (retain) NSArray *items; // of GTLComputeInstance + +// Type of resource. +@property (copy) NSString *kind; + +// A token used to continue a truncated list request (output only). +@property (copy) NSString *nextPageToken; + +// Server defined URL for this resource (output only). +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeInstanceList.m b/GTL/Source/Services/Compute/Generated/GTLComputeInstanceList.m new file mode 100644 index 0000000..ed289c5 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeInstanceList.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeInstanceList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeInstanceList (0 custom class methods, 5 custom properties) + +#import "GTLComputeInstanceList.h" + +#import "GTLComputeInstance.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeInstanceList +// + +@implementation GTLComputeInstanceList +@dynamic identifier, items, kind, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeInstance class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#instanceList"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeKernel.h b/GTL/Source/Services/Compute/Generated/GTLComputeKernel.h new file mode 100644 index 0000000..6d8cdcc --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeKernel.h @@ -0,0 +1,64 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeKernel.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeKernel (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLComputeKernel +// + +@interface GTLComputeKernel : GTLObject + +// Creation timestamp in RFC3339 text format (output only). +@property (copy) NSString *creationTimestamp; + +// An optional textual description of the resource. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // unsignedLongLongValue + +// Type of the resource. +@property (copy) NSString *kind; + +// Name of the resource. +@property (copy) NSString *name; + +// Server defined URL for the resource (output only). +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeKernel.m b/GTL/Source/Services/Compute/Generated/GTLComputeKernel.m new file mode 100644 index 0000000..51df8a3 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeKernel.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeKernel.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeKernel (0 custom class methods, 6 custom properties) + +#import "GTLComputeKernel.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeKernel +// + +@implementation GTLComputeKernel +@dynamic creationTimestamp, descriptionProperty, identifier, kind, name, + selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#kernel"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeKernelList.h b/GTL/Source/Services/Compute/Generated/GTLComputeKernelList.h new file mode 100644 index 0000000..9e76d13 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeKernelList.h @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeKernelList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeKernelList (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeKernel; + +// ---------------------------------------------------------------------------- +// +// GTLComputeKernelList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLComputeKernelList : GTLCollectionObject + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The kernel resources. +@property (retain) NSArray *items; // of GTLComputeKernel + +// Type of resource. +@property (copy) NSString *kind; + +// A token used to continue a truncated list request (output only). +@property (copy) NSString *nextPageToken; + +// Server defined URL for this resource (output only). +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeKernelList.m b/GTL/Source/Services/Compute/Generated/GTLComputeKernelList.m new file mode 100644 index 0000000..a1c5a19 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeKernelList.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeKernelList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeKernelList (0 custom class methods, 5 custom properties) + +#import "GTLComputeKernelList.h" + +#import "GTLComputeKernel.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeKernelList +// + +@implementation GTLComputeKernelList +@dynamic identifier, items, kind, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeKernel class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#kernelList"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeMachineType.h b/GTL/Source/Services/Compute/Generated/GTLComputeMachineType.h new file mode 100644 index 0000000..627c7f8 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeMachineType.h @@ -0,0 +1,101 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeMachineType.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeMachineType (0 custom class methods, 13 custom properties) +// GTLComputeMachineTypeEphemeralDisksItem (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeMachineTypeEphemeralDisksItem; + +// ---------------------------------------------------------------------------- +// +// GTLComputeMachineType +// + +@interface GTLComputeMachineType : GTLObject + +// The zones that this machine type can run in. +@property (retain) NSArray *availableZone; // of NSString + +// Creation timestamp in RFC3339 text format (output only). +@property (copy) NSString *creationTimestamp; + +// An optional textual description of the resource. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// List of extended ephemeral disks assigned to the instance. +@property (retain) NSArray *ephemeralDisks; // of GTLComputeMachineTypeEphemeralDisksItem + +// Count of CPUs exposed to the instance. +@property (retain) NSNumber *guestCpus; // intValue + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // unsignedLongLongValue + +// Space allotted for the image, defined in GB. +@property (retain) NSNumber *imageSpaceGb; // intValue + +// Type of the resource. +@property (copy) NSString *kind; + +// Maximum persistent disks allowed. +@property (retain) NSNumber *maximumPersistentDisks; // intValue + +// Maximum total persistent disks size (GB) allowed. +@property (retain) NSNumber *maximumPersistentDisksSizeGb; // longLongValue + +// Physical memory assigned to the instance, defined in MB. +@property (retain) NSNumber *memoryMb; // intValue + +// Name of the resource. +@property (copy) NSString *name; + +// Server defined URL for the resource (output only). +@property (copy) NSString *selfLink; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeMachineTypeEphemeralDisksItem +// + +@interface GTLComputeMachineTypeEphemeralDisksItem : GTLObject + +// Size of the ephemeral disk, defined in GB. +@property (retain) NSNumber *diskGb; // intValue + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeMachineType.m b/GTL/Source/Services/Compute/Generated/GTLComputeMachineType.m new file mode 100644 index 0000000..dc00b08 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeMachineType.m @@ -0,0 +1,76 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeMachineType.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeMachineType (0 custom class methods, 13 custom properties) +// GTLComputeMachineTypeEphemeralDisksItem (0 custom class methods, 1 custom properties) + +#import "GTLComputeMachineType.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeMachineType +// + +@implementation GTLComputeMachineType +@dynamic availableZone, creationTimestamp, descriptionProperty, ephemeralDisks, + guestCpus, identifier, imageSpaceGb, kind, maximumPersistentDisks, + maximumPersistentDisksSizeGb, memoryMb, name, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"availableZone", + [GTLComputeMachineTypeEphemeralDisksItem class], @"ephemeralDisks", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#machineType"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeMachineTypeEphemeralDisksItem +// + +@implementation GTLComputeMachineTypeEphemeralDisksItem +@dynamic diskGb; +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeMachineTypeList.h b/GTL/Source/Services/Compute/Generated/GTLComputeMachineTypeList.h new file mode 100644 index 0000000..bda5eea --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeMachineTypeList.h @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeMachineTypeList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeMachineTypeList (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeMachineType; + +// ---------------------------------------------------------------------------- +// +// GTLComputeMachineTypeList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLComputeMachineTypeList : GTLCollectionObject + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The machine type resources. +@property (retain) NSArray *items; // of GTLComputeMachineType + +// Type of resource. +@property (copy) NSString *kind; + +// A token used to continue a truncated list request (output only). +@property (copy) NSString *nextPageToken; + +// Server defined URL for this resource (output only). +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeMachineTypeList.m b/GTL/Source/Services/Compute/Generated/GTLComputeMachineTypeList.m new file mode 100644 index 0000000..e064ea4 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeMachineTypeList.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeMachineTypeList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeMachineTypeList (0 custom class methods, 5 custom properties) + +#import "GTLComputeMachineTypeList.h" + +#import "GTLComputeMachineType.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeMachineTypeList +// + +@implementation GTLComputeMachineTypeList +@dynamic identifier, items, kind, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeMachineType class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#machineTypeList"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeMetadata.h b/GTL/Source/Services/Compute/Generated/GTLComputeMetadata.h new file mode 100644 index 0000000..1c536d4 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeMetadata.h @@ -0,0 +1,79 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeMetadata.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeMetadata (0 custom class methods, 2 custom properties) +// GTLComputeMetadataItemsItem (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeMetadataItemsItem; + +// ---------------------------------------------------------------------------- +// +// GTLComputeMetadata +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLComputeMetadata : GTLCollectionObject + +// Array of key/value pairs. The total size of all keys and values must be less +// than 512 KB. +@property (retain) NSArray *items; // of GTLComputeMetadataItemsItem + +// Type of the resource. +@property (copy) NSString *kind; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeMetadataItemsItem +// + +@interface GTLComputeMetadataItemsItem : GTLObject + +// Key for the metadata entry. Keys must conform to the following regexp: +// [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as +// part of a URL in the metadata server. Additionally, to avoid ambiguity, keys +// must not conflict with any other metadata keys for the project. +@property (copy) NSString *key; + +// Value for the metadata entry. These are free-form strings, and only have +// meaning as interpreted by the image running in the instance. The only +// restriction placed on values is that their size must be less than or equal to +// 32768 bytes. +@property (copy) NSString *value; + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeMetadata.m b/GTL/Source/Services/Compute/Generated/GTLComputeMetadata.m new file mode 100644 index 0000000..d486edb --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeMetadata.m @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeMetadata.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeMetadata (0 custom class methods, 2 custom properties) +// GTLComputeMetadataItemsItem (0 custom class methods, 2 custom properties) + +#import "GTLComputeMetadata.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeMetadata +// + +@implementation GTLComputeMetadata +@dynamic items, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeMetadataItemsItem class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#metadata"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeMetadataItemsItem +// + +@implementation GTLComputeMetadataItemsItem +@dynamic key, value; +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeNetwork.h b/GTL/Source/Services/Compute/Generated/GTLComputeNetwork.h new file mode 100644 index 0000000..1ce253e --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeNetwork.h @@ -0,0 +1,77 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeNetwork.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeNetwork (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLComputeNetwork +// + +@interface GTLComputeNetwork : GTLObject + +// Creation timestamp in RFC3339 text format (output only). +@property (copy) NSString *creationTimestamp; + +// An optional textual description of the resource; provided by the client when +// the resource is created. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// An optional address that is used for default routing to other networks. This +// must be within the range specified by IPv4Range, and is typically the first +// usable address in that range. If not specified, the default value is the +// first usable address in IPv4Range. +@property (copy) NSString *gatewayIPv4; + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // unsignedLongLongValue + +// Required; The range of internal addresses that are legal on this network. +// This range is a CIDR specification, for example: 192.168.0.0/16. Provided by +// the client when the network is created. +@property (copy) NSString *IPv4Range; + +// Type of the resource. +@property (copy) NSString *kind; + +// Name of the resource; provided by the client when the resource is created. +// The name must be 1-63 characters long, and comply with RFC1035. +@property (copy) NSString *name; + +// Server defined URL for the resource (output only). +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeNetwork.m b/GTL/Source/Services/Compute/Generated/GTLComputeNetwork.m new file mode 100644 index 0000000..b1b608a --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeNetwork.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeNetwork.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeNetwork (0 custom class methods, 8 custom properties) + +#import "GTLComputeNetwork.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeNetwork +// + +@implementation GTLComputeNetwork +@dynamic creationTimestamp, descriptionProperty, gatewayIPv4, identifier, + IPv4Range, kind, name, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#network"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeNetworkInterface.h b/GTL/Source/Services/Compute/Generated/GTLComputeNetworkInterface.h new file mode 100644 index 0000000..61fb328 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeNetworkInterface.h @@ -0,0 +1,67 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeNetworkInterface.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeNetworkInterface (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeAccessConfig; + +// ---------------------------------------------------------------------------- +// +// GTLComputeNetworkInterface +// + +@interface GTLComputeNetworkInterface : GTLObject + +// Array of configurations for this interface. This specifies how this interface +// is configured to interact with other network services, such as connecting to +// the internet. Currently, ONE_TO_ONE_NAT is the only access config supported. +// If there are no accessConfigs specified, then this instance will have no +// external internet access. +@property (retain) NSArray *accessConfigs; // of GTLComputeAccessConfig + +// Type of the resource. +@property (copy) NSString *kind; + +// Name of the resource, determined by the server; for network devices, these +// are e.g. eth0, eth1, etc. (output only). +@property (copy) NSString *name; + +// URL of the network resource attached to this interface. +@property (copy) NSString *network; + +// An optional IPV4 internal network address to assign to this instance. If not +// specified, one will be assigned from the available range. +@property (copy) NSString *networkIP; + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeNetworkInterface.m b/GTL/Source/Services/Compute/Generated/GTLComputeNetworkInterface.m new file mode 100644 index 0000000..0bd5105 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeNetworkInterface.m @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeNetworkInterface.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeNetworkInterface (0 custom class methods, 5 custom properties) + +#import "GTLComputeNetworkInterface.h" + +#import "GTLComputeAccessConfig.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeNetworkInterface +// + +@implementation GTLComputeNetworkInterface +@dynamic accessConfigs, kind, name, network, networkIP; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeAccessConfig class] + forKey:@"accessConfigs"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#networkInterface"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeNetworkList.h b/GTL/Source/Services/Compute/Generated/GTLComputeNetworkList.h new file mode 100644 index 0000000..43ec880 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeNetworkList.h @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeNetworkList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeNetworkList (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeNetwork; + +// ---------------------------------------------------------------------------- +// +// GTLComputeNetworkList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLComputeNetworkList : GTLCollectionObject + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The network resources. +@property (retain) NSArray *items; // of GTLComputeNetwork + +// Type of resource. +@property (copy) NSString *kind; + +// A token used to continue a truncated list request (output only). +@property (copy) NSString *nextPageToken; + +// Server defined URL for this resource (output only). +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeNetworkList.m b/GTL/Source/Services/Compute/Generated/GTLComputeNetworkList.m new file mode 100644 index 0000000..86bc8f5 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeNetworkList.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeNetworkList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeNetworkList (0 custom class methods, 5 custom properties) + +#import "GTLComputeNetworkList.h" + +#import "GTLComputeNetwork.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeNetworkList +// + +@implementation GTLComputeNetworkList +@dynamic identifier, items, kind, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeNetwork class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#networkList"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeOperation.h b/GTL/Source/Services/Compute/Generated/GTLComputeOperation.h new file mode 100644 index 0000000..02b2d38 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeOperation.h @@ -0,0 +1,157 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeOperation.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeOperation (0 custom class methods, 19 custom properties) +// GTLComputeOperationError (0 custom class methods, 1 custom properties) +// GTLComputeOperationErrorErrorsItem (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeOperationError; +@class GTLComputeOperationErrorErrorsItem; + +// ---------------------------------------------------------------------------- +// +// GTLComputeOperation +// + +@interface GTLComputeOperation : GTLObject + +// An optional identifier specified by the client when the mutation was +// initiated. Must be unique for all operation resources in the project (output +// only). +@property (copy) NSString *clientOperationId; + +// Creation timestamp in RFC3339 text format (output only). +@property (copy) NSString *creationTimestamp; + +// The time that this operation was completed. This is in RFC 3339 format +// (output only). +@property (copy) NSString *endTime; + +// If errors occurred during processing of this operation, this field will be +// populated (output only). +@property (retain) GTLComputeOperationError *error; + +// If operation fails, the HTTP error message returned, e.g. NOT FOUND. (output +// only). +@property (copy) NSString *httpErrorMessage; + +// If operation fails, the HTTP error status code returned, e.g. 404. (output +// only). +@property (retain) NSNumber *httpErrorStatusCode; // intValue + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // unsignedLongLongValue + +// The time that this operation was requested. This is in RFC 3339 format +// (output only). +@property (copy) NSString *insertTime; + +// Type of the resource. +@property (copy) NSString *kind; + +// Name of the resource. +@property (copy) NSString *name; + +// Type of the operation. Examples include "insert", "update", and "delete" +// (output only). +@property (copy) NSString *operationType; + +// An optional progress indicator that ranges from 0 to 100. There is no +// requirement that this be linear or support any granularity of operations. +// This should not be used to guess at when the operation will be complete. This +// number should be monotonically increasing as the operation progresses (output +// only). +@property (retain) NSNumber *progress; // intValue + +// Server defined URL for the resource (output only). +@property (copy) NSString *selfLink; + +// The time that this operation was started by the server. This is in RFC 3339 +// format (output only). +@property (copy) NSString *startTime; + +// Status of the operation. Can be one of the following: "PENDING", "RUNNING", +// or "DONE" (output only). +@property (copy) NSString *status; + +// An optional textual description of the current status of the operation +// (output only). +@property (copy) NSString *statusMessage; + +// Unique target id which identifies a particular incarnation of the target +// (output only). +@property (retain) NSNumber *targetId; // unsignedLongLongValue + +// URL of the resource the operation is mutating (output only). +@property (copy) NSString *targetLink; + +// User who requested the operation, for example "user@example.com" (output +// only). +@property (copy) NSString *user; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeOperationError +// + +@interface GTLComputeOperationError : GTLObject + +// The array of errors encountered while processing this operation. +@property (retain) NSArray *errors; // of GTLComputeOperationErrorErrorsItem + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeOperationErrorErrorsItem +// + +@interface GTLComputeOperationErrorErrorsItem : GTLObject + +// The error type identifier for this error. +@property (copy) NSString *code; + +// Indicates the field in the request which caused the error. This property is +// optional. +@property (copy) NSString *location; + +// An optional, human-readable error message. +@property (copy) NSString *message; + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeOperation.m b/GTL/Source/Services/Compute/Generated/GTLComputeOperation.m new file mode 100644 index 0000000..0c42cf8 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeOperation.m @@ -0,0 +1,85 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeOperation.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeOperation (0 custom class methods, 19 custom properties) +// GTLComputeOperationError (0 custom class methods, 1 custom properties) +// GTLComputeOperationErrorErrorsItem (0 custom class methods, 3 custom properties) + +#import "GTLComputeOperation.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeOperation +// + +@implementation GTLComputeOperation +@dynamic clientOperationId, creationTimestamp, endTime, error, httpErrorMessage, + httpErrorStatusCode, identifier, insertTime, kind, name, operationType, + progress, selfLink, startTime, status, statusMessage, targetId, + targetLink, user; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#operation"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeOperationError +// + +@implementation GTLComputeOperationError +@dynamic errors; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeOperationErrorErrorsItem class] + forKey:@"errors"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeOperationErrorErrorsItem +// + +@implementation GTLComputeOperationErrorErrorsItem +@dynamic code, location, message; +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeOperationList.h b/GTL/Source/Services/Compute/Generated/GTLComputeOperationList.h new file mode 100644 index 0000000..172781f --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeOperationList.h @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeOperationList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeOperationList (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeOperation; + +// ---------------------------------------------------------------------------- +// +// GTLComputeOperationList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLComputeOperationList : GTLCollectionObject + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The operation resources. +@property (retain) NSArray *items; // of GTLComputeOperation + +// Type of resource. +@property (copy) NSString *kind; + +// A token used to continue a truncated list request (output only). +@property (copy) NSString *nextPageToken; + +// Server defined URL for this resource (output only). +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeOperationList.m b/GTL/Source/Services/Compute/Generated/GTLComputeOperationList.m new file mode 100644 index 0000000..8344180 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeOperationList.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeOperationList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeOperationList (0 custom class methods, 5 custom properties) + +#import "GTLComputeOperationList.h" + +#import "GTLComputeOperation.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeOperationList +// + +@implementation GTLComputeOperationList +@dynamic identifier, items, kind, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeOperation class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#operationList"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeProject.h b/GTL/Source/Services/Compute/Generated/GTLComputeProject.h new file mode 100644 index 0000000..ed949f4 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeProject.h @@ -0,0 +1,97 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeProject.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeProject (0 custom class methods, 9 custom properties) +// GTLComputeProjectQuotasItem (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeMetadata; +@class GTLComputeProjectQuotasItem; + +// ---------------------------------------------------------------------------- +// +// GTLComputeProject +// + +@interface GTLComputeProject : GTLObject + +// Metadata key/value pairs available to all instances contained in this +// project. +@property (retain) GTLComputeMetadata *commonInstanceMetadata; + +// Creation timestamp in RFC3339 text format (output only). +@property (copy) NSString *creationTimestamp; + +// An optional textual description of the resource. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Internet available IP addresses available for use in this project. +@property (retain) NSArray *externalIpAddresses; // of NSString + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // unsignedLongLongValue + +// Type of the resource. +@property (copy) NSString *kind; + +// Name of the resource. +@property (copy) NSString *name; + +// Quotas assigned to this project. +@property (retain) NSArray *quotas; // of GTLComputeProjectQuotasItem + +// Server defined URL for the resource (output only). +@property (copy) NSString *selfLink; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeProjectQuotasItem +// + +@interface GTLComputeProjectQuotasItem : GTLObject + +// Quota limit for this metric. +@property (retain) NSNumber *limit; // doubleValue + +// Name of the quota metric. +@property (copy) NSString *metric; + +// Current usage of this metric. +@property (retain) NSNumber *usage; // doubleValue + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeProject.m b/GTL/Source/Services/Compute/Generated/GTLComputeProject.m new file mode 100644 index 0000000..03f49ac --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeProject.m @@ -0,0 +1,77 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeProject.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeProject (0 custom class methods, 9 custom properties) +// GTLComputeProjectQuotasItem (0 custom class methods, 3 custom properties) + +#import "GTLComputeProject.h" + +#import "GTLComputeMetadata.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeProject +// + +@implementation GTLComputeProject +@dynamic commonInstanceMetadata, creationTimestamp, descriptionProperty, + externalIpAddresses, identifier, kind, name, quotas, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"externalIpAddresses", + [GTLComputeProjectQuotasItem class], @"quotas", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#project"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeProjectQuotasItem +// + +@implementation GTLComputeProjectQuotasItem +@dynamic limit, metric, usage; +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeSerialPortOutput.h b/GTL/Source/Services/Compute/Generated/GTLComputeSerialPortOutput.h new file mode 100644 index 0000000..e71191f --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeSerialPortOutput.h @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeSerialPortOutput.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeSerialPortOutput (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLComputeSerialPortOutput +// + +// An instance serial console output. + +@interface GTLComputeSerialPortOutput : GTLObject + +// The contents of the console output. +@property (copy) NSString *contents; + +// Type of the resource. +@property (copy) NSString *kind; + +// Server defined URL for the resource. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeSerialPortOutput.m b/GTL/Source/Services/Compute/Generated/GTLComputeSerialPortOutput.m new file mode 100644 index 0000000..97c3e0e --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeSerialPortOutput.m @@ -0,0 +1,45 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeSerialPortOutput.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeSerialPortOutput (0 custom class methods, 3 custom properties) + +#import "GTLComputeSerialPortOutput.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeSerialPortOutput +// + +@implementation GTLComputeSerialPortOutput +@dynamic contents, kind, selfLink; + ++ (void)load { + [self registerObjectClassForKind:@"compute#serialPortOutput"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeServiceAccount.h b/GTL/Source/Services/Compute/Generated/GTLComputeServiceAccount.h new file mode 100644 index 0000000..cb10e1d --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeServiceAccount.h @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeServiceAccount.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeServiceAccount (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLComputeServiceAccount +// + +@interface GTLComputeServiceAccount : GTLObject + +// Email address of the service account. +@property (copy) NSString *email; + +// Type of the resource. +@property (copy) NSString *kind; + +// The list of scopes to be made available for this service account. +@property (retain) NSArray *scopes; // of NSString + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeServiceAccount.m b/GTL/Source/Services/Compute/Generated/GTLComputeServiceAccount.m new file mode 100644 index 0000000..249abb4 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeServiceAccount.m @@ -0,0 +1,52 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeServiceAccount.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeServiceAccount (0 custom class methods, 3 custom properties) + +#import "GTLComputeServiceAccount.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeServiceAccount +// + +@implementation GTLComputeServiceAccount +@dynamic email, kind, scopes; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"scopes"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#serviceAccount"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeSnapshot.h b/GTL/Source/Services/Compute/Generated/GTLComputeSnapshot.h new file mode 100644 index 0000000..7eb12e0 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeSnapshot.h @@ -0,0 +1,82 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeSnapshot.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeSnapshot (0 custom class methods, 10 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLComputeSnapshot +// + +@interface GTLComputeSnapshot : GTLObject + +// Creation timestamp in RFC3339 text format (output only). +@property (copy) NSString *creationTimestamp; + +// An optional textual description of the resource; provided by the client when +// the resource is created. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Size of the persistent disk snapshot, specified in GB (output only). +@property (retain) NSNumber *diskSizeGb; // longLongValue + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // unsignedLongLongValue + +// Type of the resource. +@property (copy) NSString *kind; + +// Name of the resource; provided by the client when the resource is created. +// The name must be 1-63 characters long, and comply with RFC1035. +@property (copy) NSString *name; + +// Server defined URL for the resource (output only). +@property (copy) NSString *selfLink; + +// The source disk used to create this snapshot. Once the source disk has been +// deleted from the system, this field will be cleared, and will not be set even +// if a disk with the same name has been re-created. +@property (copy) NSString *sourceDisk; + +// The 'id' value of the disk used to create this snapshot. This value may be +// used to determine whether the snapshot was taken from the current or a +// previous instance of a given disk name. +@property (copy) NSString *sourceDiskId; + +// The status of the persistent disk snapshot (output only). +@property (copy) NSString *status; + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeSnapshot.m b/GTL/Source/Services/Compute/Generated/GTLComputeSnapshot.m new file mode 100644 index 0000000..b146303 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeSnapshot.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeSnapshot.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeSnapshot (0 custom class methods, 10 custom properties) + +#import "GTLComputeSnapshot.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeSnapshot +// + +@implementation GTLComputeSnapshot +@dynamic creationTimestamp, descriptionProperty, diskSizeGb, identifier, kind, + name, selfLink, sourceDisk, sourceDiskId, status; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#snapshot"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeSnapshotList.h b/GTL/Source/Services/Compute/Generated/GTLComputeSnapshotList.h new file mode 100644 index 0000000..6b1f986 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeSnapshotList.h @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeSnapshotList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeSnapshotList (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeSnapshot; + +// ---------------------------------------------------------------------------- +// +// GTLComputeSnapshotList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLComputeSnapshotList : GTLCollectionObject + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The persistent snapshot resources. +@property (retain) NSArray *items; // of GTLComputeSnapshot + +// Type of resource. +@property (copy) NSString *kind; + +// A token used to continue a truncated list request (output only). +@property (copy) NSString *nextPageToken; + +// Server defined URL for this resource (output only). +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeSnapshotList.m b/GTL/Source/Services/Compute/Generated/GTLComputeSnapshotList.m new file mode 100644 index 0000000..a0ccdd2 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeSnapshotList.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeSnapshotList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeSnapshotList (0 custom class methods, 5 custom properties) + +#import "GTLComputeSnapshotList.h" + +#import "GTLComputeSnapshot.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeSnapshotList +// + +@implementation GTLComputeSnapshotList +@dynamic identifier, items, kind, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeSnapshot class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#snapshotList"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeZone.h b/GTL/Source/Services/Compute/Generated/GTLComputeZone.h new file mode 100644 index 0000000..38a3331 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeZone.h @@ -0,0 +1,100 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeZone.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeZone (0 custom class methods, 9 custom properties) +// GTLComputeZoneMaintenanceWindowsItem (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeZoneMaintenanceWindowsItem; + +// ---------------------------------------------------------------------------- +// +// GTLComputeZone +// + +@interface GTLComputeZone : GTLObject + +// The machine types that can be used in this zone (output only). +@property (retain) NSArray *availableMachineType; // of NSString + +// Creation timestamp in RFC3339 text format (output only). +@property (copy) NSString *creationTimestamp; + +// Textual description of the resource. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // unsignedLongLongValue + +// Type of the resource. +@property (copy) NSString *kind; + +// Scheduled maintenance windows for the zone. When the zone is in a maintenance +// window, all resources which reside in the zone will be unavailable. +@property (retain) NSArray *maintenanceWindows; // of GTLComputeZoneMaintenanceWindowsItem + +// Name of the resource. +@property (copy) NSString *name; + +// Server defined URL for the resource (output only). +@property (copy) NSString *selfLink; + +// Status of the zone. "UP" or "DOWN". +@property (copy) NSString *status; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeZoneMaintenanceWindowsItem +// + +@interface GTLComputeZoneMaintenanceWindowsItem : GTLObject + +// Begin time of the maintenance window, in RFC 3339 format. +@property (copy) NSString *beginTime; + +// Textual description of the maintenance window. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// End time of the maintenance window, in RFC 3339 format. +@property (copy) NSString *endTime; + +// Name of the maintenance window. +@property (copy) NSString *name; + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeZone.m b/GTL/Source/Services/Compute/Generated/GTLComputeZone.m new file mode 100644 index 0000000..e6963dc --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeZone.m @@ -0,0 +1,83 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeZone.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeZone (0 custom class methods, 9 custom properties) +// GTLComputeZoneMaintenanceWindowsItem (0 custom class methods, 4 custom properties) + +#import "GTLComputeZone.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeZone +// + +@implementation GTLComputeZone +@dynamic availableMachineType, creationTimestamp, descriptionProperty, + identifier, kind, maintenanceWindows, name, selfLink, status; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"availableMachineType", + [GTLComputeZoneMaintenanceWindowsItem class], @"maintenanceWindows", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#zone"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLComputeZoneMaintenanceWindowsItem +// + +@implementation GTLComputeZoneMaintenanceWindowsItem +@dynamic beginTime, descriptionProperty, endTime, name; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeZoneList.h b/GTL/Source/Services/Compute/Generated/GTLComputeZoneList.h new file mode 100644 index 0000000..a91cea5 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeZoneList.h @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeZoneList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeZoneList (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLComputeZone; + +// ---------------------------------------------------------------------------- +// +// GTLComputeZoneList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLComputeZoneList : GTLCollectionObject + +// Unique identifier for the resource; defined by the server (output only). +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The zone resources. +@property (retain) NSArray *items; // of GTLComputeZone + +// Type of resource. +@property (copy) NSString *kind; + +// A token used to continue a truncated list request (output only). +@property (copy) NSString *nextPageToken; + +// Server defined URL for this resource (output only). +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLComputeZoneList.m b/GTL/Source/Services/Compute/Generated/GTLComputeZoneList.m new file mode 100644 index 0000000..6d39ca4 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLComputeZoneList.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLComputeZoneList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLComputeZoneList (0 custom class methods, 5 custom properties) + +#import "GTLComputeZoneList.h" + +#import "GTLComputeZone.h" + +// ---------------------------------------------------------------------------- +// +// GTLComputeZoneList +// + +@implementation GTLComputeZoneList +@dynamic identifier, items, kind, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLComputeZone class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"compute#zoneList"]; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLCompute_Sources.m b/GTL/Source/Services/Compute/Generated/GTLCompute_Sources.m new file mode 100644 index 0000000..29cefbe --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLCompute_Sources.m @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLCompute_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 + +#import "GTLComputeConstants.m" + +#import "GTLComputeAccessConfig.m" +#import "GTLComputeAttachedDisk.m" +#import "GTLComputeDisk.m" +#import "GTLComputeDiskList.m" +#import "GTLComputeFirewall.m" +#import "GTLComputeFirewallList.m" +#import "GTLComputeImage.m" +#import "GTLComputeImageList.m" +#import "GTLComputeInstance.m" +#import "GTLComputeInstanceList.m" +#import "GTLComputeKernel.m" +#import "GTLComputeKernelList.m" +#import "GTLComputeMachineType.m" +#import "GTLComputeMachineTypeList.m" +#import "GTLComputeMetadata.m" +#import "GTLComputeNetwork.m" +#import "GTLComputeNetworkInterface.m" +#import "GTLComputeNetworkList.m" +#import "GTLComputeOperation.m" +#import "GTLComputeOperationList.m" +#import "GTLComputeProject.m" +#import "GTLComputeSerialPortOutput.m" +#import "GTLComputeServiceAccount.m" +#import "GTLComputeSnapshot.m" +#import "GTLComputeSnapshotList.m" +#import "GTLComputeZone.m" +#import "GTLComputeZoneList.m" + +#import "GTLQueryCompute.m" +#import "GTLServiceCompute.m" diff --git a/GTL/Source/Services/Compute/Generated/GTLQueryCompute.h b/GTL/Source/Services/Compute/Generated/GTLQueryCompute.h new file mode 100644 index 0000000..fcb5d08 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLQueryCompute.h @@ -0,0 +1,620 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryCompute.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLQueryCompute (40 custom class methods, 18 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLComputeAccessConfig; +@class GTLComputeDisk; +@class GTLComputeFirewall; +@class GTLComputeImage; +@class GTLComputeInstance; +@class GTLComputeMetadata; +@class GTLComputeNetwork; +@class GTLComputeSnapshot; + +@interface GTLQueryCompute : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +// "accessConfig" has different types for some query methods; see the +// documentation for the right type for each query method. +@property (retain) id accessConfig; +@property (copy) NSString *disk; +@property (copy) NSString *filter; +@property (copy) NSString *firewall; +@property (copy) NSString *image; +@property (copy) NSString *instance; +@property (copy) NSString *kernel; +@property (copy) NSString *machineType; +@property (assign) NSUInteger maxResults; +@property (retain) GTLComputeMetadata *metadata; +@property (copy) NSString *network; +@property (copy) NSString *networkInterface; +@property (copy) NSString *operation; +@property (copy) NSString *pageToken; +@property (copy) NSString *project; +@property (copy) NSString *snapshot; +// Remapped to 'zoneProperty' to avoid NSObject's 'zone'. +@property (copy) NSString *zoneProperty; + +#pragma mark - +#pragma mark "disks" methods +// These create a GTLQueryCompute object. + +// Method: compute.disks.delete +// Deletes the specified persistent disk resource. +// Required: +// project: Name of the project scoping this request. +// disk: Name of the persistent disk resource to delete. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForDisksDeleteWithProject:(NSString *)project + disk:(NSString *)disk; + +// Method: compute.disks.get +// Returns the specified persistent disk resource. +// Required: +// project: Name of the project scoping this request. +// disk: Name of the persistent disk resource to return. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeDisk. ++ (id)queryForDisksGetWithProject:(NSString *)project + disk:(NSString *)disk; + +// Method: compute.disks.insert +// Creates a persistent disk resource in the specified project using the data +// included in the request. +// Required: +// project: Name of the project scoping this request. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForDisksInsertWithObject:(GTLComputeDisk *)object + project:(NSString *)project; + +// Method: compute.disks.list +// Retrieves the list of persistent disk resources contained within the +// specified project. +// Required: +// project: Name of the project scoping this request. +// Optional: +// filter: Optional. Filter expression for filtering listed resources. +// maxResults: Optional. Maximum count of results to be returned. Maximum and +// default value is 100. (0..100, default 100) +// pageToken: Optional. Tag returned by a previous list request truncated by +// maxResults. Used to continue a previous list request. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeDiskList. ++ (id)queryForDisksListWithProject:(NSString *)project; + +#pragma mark - +#pragma mark "firewalls" methods +// These create a GTLQueryCompute object. + +// Method: compute.firewalls.delete +// Deletes the specified firewall resource. +// Required: +// project: Name of the project scoping this request. +// firewall: Name of the firewall resource to delete. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForFirewallsDeleteWithProject:(NSString *)project + firewall:(NSString *)firewall; + +// Method: compute.firewalls.get +// Returns the specified firewall resource. +// Required: +// project: Name of the project scoping this request. +// firewall: Name of the firewall resource to return. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeFirewall. ++ (id)queryForFirewallsGetWithProject:(NSString *)project + firewall:(NSString *)firewall; + +// Method: compute.firewalls.insert +// Creates a firewall resource in the specified project using the data included +// in the request. +// Required: +// project: Name of the project scoping this request. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForFirewallsInsertWithObject:(GTLComputeFirewall *)object + project:(NSString *)project; + +// Method: compute.firewalls.list +// Retrieves the list of firewall resources available to the specified project. +// Required: +// project: Name of the project scoping this request. +// Optional: +// filter: Optional. Filter expression for filtering listed resources. +// maxResults: Optional. Maximum count of results to be returned. Maximum and +// default value is 100. (0..100, default 100) +// pageToken: Optional. Tag returned by a previous list request truncated by +// maxResults. Used to continue a previous list request. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeFirewallList. ++ (id)queryForFirewallsListWithProject:(NSString *)project; + +// Method: compute.firewalls.patch +// Updates the specified firewall resource with the data included in the +// request. This method supports patch semantics. +// Required: +// project: Name of the project scoping this request. +// firewall: Name of the firewall resource to update. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForFirewallsPatchWithObject:(GTLComputeFirewall *)object + project:(NSString *)project + firewall:(NSString *)firewall; + +// Method: compute.firewalls.update +// Updates the specified firewall resource with the data included in the +// request. +// Required: +// project: Name of the project scoping this request. +// firewall: Name of the firewall resource to update. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForFirewallsUpdateWithObject:(GTLComputeFirewall *)object + project:(NSString *)project + firewall:(NSString *)firewall; + +#pragma mark - +#pragma mark "images" methods +// These create a GTLQueryCompute object. + +// Method: compute.images.delete +// Deletes the specified image resource. +// Required: +// project: Name of the project scoping this request. +// image: Name of the image resource to delete. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForImagesDeleteWithProject:(NSString *)project + image:(NSString *)image; + +// Method: compute.images.get +// Returns the specified image resource. +// Required: +// project: Name of the project scoping this request. +// image: Name of the image resource to return. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeImage. ++ (id)queryForImagesGetWithProject:(NSString *)project + image:(NSString *)image; + +// Method: compute.images.insert +// Creates an image resource in the specified project using the data included in +// the request. +// Required: +// project: Name of the project scoping this request. +// Authorization scope(s): +// kGTLAuthScopeCompute +// kGTLAuthScopeComputeDevstorageReadOnly +// Fetches a GTLComputeOperation. ++ (id)queryForImagesInsertWithObject:(GTLComputeImage *)object + project:(NSString *)project; + +// Method: compute.images.list +// Retrieves the list of image resources available to the specified project. +// Required: +// project: Name of the project scoping this request. +// Optional: +// filter: Optional. Filter expression for filtering listed resources. +// maxResults: Optional. Maximum count of results to be returned. Maximum and +// default value is 100. (0..100, default 100) +// pageToken: Optional. Tag returned by a previous list request truncated by +// maxResults. Used to continue a previous list request. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeImageList. ++ (id)queryForImagesListWithProject:(NSString *)project; + +#pragma mark - +#pragma mark "instances" methods +// These create a GTLQueryCompute object. + +// Method: compute.instances.addAccessConfig +// Adds an access config to an instance's network interface. +// Required: +// project: Project name. +// instance: Instance name. +// networkInterface: Network interface name. +// Optional: +// accessConfig: For this method, "accessConfig" should be of type +// GTLComputeAccessConfig. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForInstancesAddAccessConfigWithProject:(NSString *)project + instance:(NSString *)instance + networkInterface:(NSString *)networkInterface; + +// Method: compute.instances.delete +// Deletes the specified instance resource. +// Required: +// project: Name of the project scoping this request. +// instance: Name of the instance resource to delete. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForInstancesDeleteWithProject:(NSString *)project + instance:(NSString *)instance; + +// Method: compute.instances.deleteAccessConfig +// Deletes an access config from an instance's network interface. +// Required: +// project: Project name. +// instance: Instance name. +// accessConfig: Access config name. +// networkInterface: Network interface name. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForInstancesDeleteAccessConfigWithProject:(NSString *)project + instance:(NSString *)instance + accessConfig:(NSString *)accessConfig + networkInterface:(NSString *)networkInterface; + +// Method: compute.instances.get +// Returns the specified instance resource. +// Required: +// project: Name of the project scoping this request. +// instance: Name of the instance resource to return. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeInstance. ++ (id)queryForInstancesGetWithProject:(NSString *)project + instance:(NSString *)instance; + +// Method: compute.instances.getSerialPortOutput +// Returns the specified instance's serial port output. +// Required: +// project: Name of the project scoping this request. +// instance: Name of the instance scoping this request. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeSerialPortOutput. ++ (id)queryForInstancesGetSerialPortOutputWithProject:(NSString *)project + instance:(NSString *)instance; + +// Method: compute.instances.insert +// Creates an instance resource in the specified project using the data included +// in the request. +// Required: +// project: Name of the project scoping this request. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForInstancesInsertWithObject:(GTLComputeInstance *)object + project:(NSString *)project; + +// Method: compute.instances.list +// Retrieves the list of instance resources contained within the specified +// project. +// Required: +// project: Name of the project scoping this request. +// Optional: +// filter: Optional. Filter expression for filtering listed resources. +// maxResults: Optional. Maximum count of results to be returned. Maximum and +// default value is 100. (0..100, default 100) +// pageToken: Optional. Tag returned by a previous list request truncated by +// maxResults. Used to continue a previous list request. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeInstanceList. ++ (id)queryForInstancesListWithProject:(NSString *)project; + +#pragma mark - +#pragma mark "kernels" methods +// These create a GTLQueryCompute object. + +// Method: compute.kernels.get +// Returns the specified kernel resource. +// Required: +// project: Name of the project scoping this request. +// kernel: Name of the kernel resource to return. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeKernel. ++ (id)queryForKernelsGetWithProject:(NSString *)project + kernel:(NSString *)kernel; + +// Method: compute.kernels.list +// Retrieves the list of kernel resources available to the specified project. +// Required: +// project: Name of the project scoping this request. +// Optional: +// filter: Optional. Filter expression for filtering listed resources. +// maxResults: Optional. Maximum count of results to be returned. Maximum and +// default value is 100. (0..100, default 100) +// pageToken: Optional. Tag returned by a previous list request truncated by +// maxResults. Used to continue a previous list request. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeKernelList. ++ (id)queryForKernelsListWithProject:(NSString *)project; + +#pragma mark - +#pragma mark "machineTypes" methods +// These create a GTLQueryCompute object. + +// Method: compute.machineTypes.get +// Returns the specified machine type resource. +// Required: +// project: Name of the project scoping this request. +// machineType: Name of the machine type resource to return. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeMachineType. ++ (id)queryForMachineTypesGetWithProject:(NSString *)project + machineType:(NSString *)machineType; + +// Method: compute.machineTypes.list +// Retrieves the list of machine type resources available to the specified +// project. +// Required: +// project: Name of the project scoping this request. +// Optional: +// filter: Optional. Filter expression for filtering listed resources. +// maxResults: Optional. Maximum count of results to be returned. Maximum and +// default value is 100. (0..100, default 100) +// pageToken: Optional. Tag returned by a previous list request truncated by +// maxResults. Used to continue a previous list request. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeMachineTypeList. ++ (id)queryForMachineTypesListWithProject:(NSString *)project; + +#pragma mark - +#pragma mark "networks" methods +// These create a GTLQueryCompute object. + +// Method: compute.networks.delete +// Deletes the specified network resource. +// Required: +// project: Name of the project scoping this request. +// network: Name of the network resource to delete. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForNetworksDeleteWithProject:(NSString *)project + network:(NSString *)network; + +// Method: compute.networks.get +// Returns the specified network resource. +// Required: +// project: Name of the project scoping this request. +// network: Name of the network resource to return. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeNetwork. ++ (id)queryForNetworksGetWithProject:(NSString *)project + network:(NSString *)network; + +// Method: compute.networks.insert +// Creates a network resource in the specified project using the data included +// in the request. +// Required: +// project: Name of the project scoping this request. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForNetworksInsertWithObject:(GTLComputeNetwork *)object + project:(NSString *)project; + +// Method: compute.networks.list +// Retrieves the list of network resources available to the specified project. +// Required: +// project: Name of the project scoping this request. +// Optional: +// filter: Optional. Filter expression for filtering listed resources. +// maxResults: Optional. Maximum count of results to be returned. Maximum and +// default value is 100. (0..100, default 100) +// pageToken: Optional. Tag returned by a previous list request truncated by +// maxResults. Used to continue a previous list request. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeNetworkList. ++ (id)queryForNetworksListWithProject:(NSString *)project; + +#pragma mark - +#pragma mark "operations" methods +// These create a GTLQueryCompute object. + +// Method: compute.operations.delete +// Deletes the specified operation resource. +// Required: +// project: Name of the project scoping this request. +// operation: Name of the operation resource to delete. +// Authorization scope(s): +// kGTLAuthScopeCompute ++ (id)queryForOperationsDeleteWithProject:(NSString *)project + operation:(NSString *)operation; + +// Method: compute.operations.get +// Retrieves the specified operation resource. +// Required: +// project: Name of the project scoping this request. +// operation: Name of the operation resource to return. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeOperation. ++ (id)queryForOperationsGetWithProject:(NSString *)project + operation:(NSString *)operation; + +// Method: compute.operations.list +// Retrieves the list of operation resources contained within the specified +// project. +// Required: +// project: Name of the project scoping this request. +// Optional: +// filter: Optional. Filter expression for filtering listed resources. +// maxResults: Optional. Maximum count of results to be returned. Maximum and +// default value is 100. (0..100, default 100) +// pageToken: Optional. Tag returned by a previous list request truncated by +// maxResults. Used to continue a previous list request. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeOperationList. ++ (id)queryForOperationsListWithProject:(NSString *)project; + +#pragma mark - +#pragma mark "projects" methods +// These create a GTLQueryCompute object. + +// Method: compute.projects.get +// Returns the specified project resource. +// Required: +// project: Name of the project resource to retrieve. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeProject. ++ (id)queryForProjectsGetWithProject:(NSString *)project; + +// Method: compute.projects.setCommonInstanceMetadata +// Sets metadata common to all instances within the specified project using the +// data included in the request. +// Required: +// project: Name of the project scoping this request. +// Optional: +// metadata: GTLComputeMetadata +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForProjectsSetCommonInstanceMetadataWithProject:(NSString *)project; + +#pragma mark - +#pragma mark "snapshots" methods +// These create a GTLQueryCompute object. + +// Method: compute.snapshots.delete +// Deletes the specified persistent disk snapshot resource. +// Required: +// project: Name of the project scoping this request. +// snapshot: Name of the persistent disk snapshot resource to delete. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForSnapshotsDeleteWithProject:(NSString *)project + snapshot:(NSString *)snapshot; + +// Method: compute.snapshots.get +// Returns the specified persistent disk snapshot resource. +// Required: +// project: Name of the project scoping this request. +// snapshot: Name of the persistent disk snapshot resource to return. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeSnapshot. ++ (id)queryForSnapshotsGetWithProject:(NSString *)project + snapshot:(NSString *)snapshot; + +// Method: compute.snapshots.insert +// Creates a persistent disk snapshot resource in the specified project using +// the data included in the request. +// Required: +// project: Name of the project scoping this request. +// Authorization scope(s): +// kGTLAuthScopeCompute +// Fetches a GTLComputeOperation. ++ (id)queryForSnapshotsInsertWithObject:(GTLComputeSnapshot *)object + project:(NSString *)project; + +// Method: compute.snapshots.list +// Retrieves the list of persistent disk snapshot resources contained within the +// specified project. +// Required: +// project: Name of the project scoping this request. +// Optional: +// filter: Optional. Filter expression for filtering listed resources. +// maxResults: Optional. Maximum count of results to be returned. Maximum and +// default value is 100. (0..100, default 100) +// pageToken: Optional. Tag returned by a previous list request truncated by +// maxResults. Used to continue a previous list request. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeSnapshotList. ++ (id)queryForSnapshotsListWithProject:(NSString *)project; + +#pragma mark - +#pragma mark "zones" methods +// These create a GTLQueryCompute object. + +// Method: compute.zones.get +// Returns the specified zone resource. +// Required: +// project: Name of the project scoping this request. +// zoneProperty: Name of the zone resource to return. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeZone. ++ (id)queryForZonesGetWithProject:(NSString *)project + zoneProperty:(NSString *)zoneProperty; + +// Method: compute.zones.list +// Retrieves the list of zone resources available to the specified project. +// Required: +// project: Name of the project scoping this request. +// Optional: +// filter: Optional. Filter expression for filtering listed resources. +// maxResults: Optional. Maximum count of results to be returned. Maximum and +// default value is 100. (0..100, default 100) +// pageToken: Optional. Tag returned by a previous list request truncated by +// maxResults. Used to continue a previous list request. +// Authorization scope(s): +// kGTLAuthScopeComputeReadonly +// Fetches a GTLComputeZoneList. ++ (id)queryForZonesListWithProject:(NSString *)project; + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLQueryCompute.m b/GTL/Source/Services/Compute/Generated/GTLQueryCompute.m new file mode 100644 index 0000000..315920f --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLQueryCompute.m @@ -0,0 +1,535 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryCompute.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLQueryCompute (40 custom class methods, 18 custom properties) + +#import "GTLQueryCompute.h" + +#import "GTLComputeAccessConfig.h" +#import "GTLComputeDisk.h" +#import "GTLComputeDiskList.h" +#import "GTLComputeFirewall.h" +#import "GTLComputeFirewallList.h" +#import "GTLComputeImage.h" +#import "GTLComputeImageList.h" +#import "GTLComputeInstance.h" +#import "GTLComputeInstanceList.h" +#import "GTLComputeKernel.h" +#import "GTLComputeKernelList.h" +#import "GTLComputeMachineType.h" +#import "GTLComputeMachineTypeList.h" +#import "GTLComputeMetadata.h" +#import "GTLComputeNetwork.h" +#import "GTLComputeNetworkList.h" +#import "GTLComputeOperation.h" +#import "GTLComputeOperationList.h" +#import "GTLComputeProject.h" +#import "GTLComputeSerialPortOutput.h" +#import "GTLComputeSnapshot.h" +#import "GTLComputeSnapshotList.h" +#import "GTLComputeZone.h" +#import "GTLComputeZoneList.h" + +@implementation GTLQueryCompute + +@dynamic accessConfig, disk, fields, filter, firewall, image, instance, kernel, + machineType, maxResults, metadata, network, networkInterface, + operation, pageToken, project, snapshot, zoneProperty; + ++ (NSDictionary *)parameterNameMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"access_config", @"accessConfig", + @"network_interface", @"networkInterface", + @"zone", @"zoneProperty", + nil]; + return map; +} + +#pragma mark - +#pragma mark "disks" methods +// These create a GTLQueryCompute object. + ++ (id)queryForDisksDeleteWithProject:(NSString *)project + disk:(NSString *)disk { + NSString *methodName = @"compute.disks.delete"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.disk = disk; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForDisksGetWithProject:(NSString *)project + disk:(NSString *)disk { + NSString *methodName = @"compute.disks.get"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.disk = disk; + query.expectedObjectClass = [GTLComputeDisk class]; + return query; +} + ++ (id)queryForDisksInsertWithObject:(GTLComputeDisk *)object + project:(NSString *)project { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"compute.disks.insert"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.project = project; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForDisksListWithProject:(NSString *)project { + NSString *methodName = @"compute.disks.list"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.expectedObjectClass = [GTLComputeDiskList class]; + return query; +} + +#pragma mark - +#pragma mark "firewalls" methods +// These create a GTLQueryCompute object. + ++ (id)queryForFirewallsDeleteWithProject:(NSString *)project + firewall:(NSString *)firewall { + NSString *methodName = @"compute.firewalls.delete"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.firewall = firewall; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForFirewallsGetWithProject:(NSString *)project + firewall:(NSString *)firewall { + NSString *methodName = @"compute.firewalls.get"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.firewall = firewall; + query.expectedObjectClass = [GTLComputeFirewall class]; + return query; +} + ++ (id)queryForFirewallsInsertWithObject:(GTLComputeFirewall *)object + project:(NSString *)project { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"compute.firewalls.insert"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.project = project; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForFirewallsListWithProject:(NSString *)project { + NSString *methodName = @"compute.firewalls.list"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.expectedObjectClass = [GTLComputeFirewallList class]; + return query; +} + ++ (id)queryForFirewallsPatchWithObject:(GTLComputeFirewall *)object + project:(NSString *)project + firewall:(NSString *)firewall { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"compute.firewalls.patch"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.project = project; + query.firewall = firewall; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForFirewallsUpdateWithObject:(GTLComputeFirewall *)object + project:(NSString *)project + firewall:(NSString *)firewall { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"compute.firewalls.update"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.project = project; + query.firewall = firewall; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + +#pragma mark - +#pragma mark "images" methods +// These create a GTLQueryCompute object. + ++ (id)queryForImagesDeleteWithProject:(NSString *)project + image:(NSString *)image { + NSString *methodName = @"compute.images.delete"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.image = image; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForImagesGetWithProject:(NSString *)project + image:(NSString *)image { + NSString *methodName = @"compute.images.get"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.image = image; + query.expectedObjectClass = [GTLComputeImage class]; + return query; +} + ++ (id)queryForImagesInsertWithObject:(GTLComputeImage *)object + project:(NSString *)project { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"compute.images.insert"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.project = project; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForImagesListWithProject:(NSString *)project { + NSString *methodName = @"compute.images.list"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.expectedObjectClass = [GTLComputeImageList class]; + return query; +} + +#pragma mark - +#pragma mark "instances" methods +// These create a GTLQueryCompute object. + ++ (id)queryForInstancesAddAccessConfigWithProject:(NSString *)project + instance:(NSString *)instance + networkInterface:(NSString *)networkInterface { + NSString *methodName = @"compute.instances.addAccessConfig"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.instance = instance; + query.networkInterface = networkInterface; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForInstancesDeleteWithProject:(NSString *)project + instance:(NSString *)instance { + NSString *methodName = @"compute.instances.delete"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.instance = instance; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForInstancesDeleteAccessConfigWithProject:(NSString *)project + instance:(NSString *)instance + accessConfig:(NSString *)accessConfig + networkInterface:(NSString *)networkInterface { + NSString *methodName = @"compute.instances.deleteAccessConfig"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.instance = instance; + query.accessConfig = accessConfig; + query.networkInterface = networkInterface; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForInstancesGetWithProject:(NSString *)project + instance:(NSString *)instance { + NSString *methodName = @"compute.instances.get"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.instance = instance; + query.expectedObjectClass = [GTLComputeInstance class]; + return query; +} + ++ (id)queryForInstancesGetSerialPortOutputWithProject:(NSString *)project + instance:(NSString *)instance { + NSString *methodName = @"compute.instances.getSerialPortOutput"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.instance = instance; + query.expectedObjectClass = [GTLComputeSerialPortOutput class]; + return query; +} + ++ (id)queryForInstancesInsertWithObject:(GTLComputeInstance *)object + project:(NSString *)project { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"compute.instances.insert"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.project = project; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForInstancesListWithProject:(NSString *)project { + NSString *methodName = @"compute.instances.list"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.expectedObjectClass = [GTLComputeInstanceList class]; + return query; +} + +#pragma mark - +#pragma mark "kernels" methods +// These create a GTLQueryCompute object. + ++ (id)queryForKernelsGetWithProject:(NSString *)project + kernel:(NSString *)kernel { + NSString *methodName = @"compute.kernels.get"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.kernel = kernel; + query.expectedObjectClass = [GTLComputeKernel class]; + return query; +} + ++ (id)queryForKernelsListWithProject:(NSString *)project { + NSString *methodName = @"compute.kernels.list"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.expectedObjectClass = [GTLComputeKernelList class]; + return query; +} + +#pragma mark - +#pragma mark "machineTypes" methods +// These create a GTLQueryCompute object. + ++ (id)queryForMachineTypesGetWithProject:(NSString *)project + machineType:(NSString *)machineType { + NSString *methodName = @"compute.machineTypes.get"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.machineType = machineType; + query.expectedObjectClass = [GTLComputeMachineType class]; + return query; +} + ++ (id)queryForMachineTypesListWithProject:(NSString *)project { + NSString *methodName = @"compute.machineTypes.list"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.expectedObjectClass = [GTLComputeMachineTypeList class]; + return query; +} + +#pragma mark - +#pragma mark "networks" methods +// These create a GTLQueryCompute object. + ++ (id)queryForNetworksDeleteWithProject:(NSString *)project + network:(NSString *)network { + NSString *methodName = @"compute.networks.delete"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.network = network; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForNetworksGetWithProject:(NSString *)project + network:(NSString *)network { + NSString *methodName = @"compute.networks.get"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.network = network; + query.expectedObjectClass = [GTLComputeNetwork class]; + return query; +} + ++ (id)queryForNetworksInsertWithObject:(GTLComputeNetwork *)object + project:(NSString *)project { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"compute.networks.insert"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.project = project; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForNetworksListWithProject:(NSString *)project { + NSString *methodName = @"compute.networks.list"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.expectedObjectClass = [GTLComputeNetworkList class]; + return query; +} + +#pragma mark - +#pragma mark "operations" methods +// These create a GTLQueryCompute object. + ++ (id)queryForOperationsDeleteWithProject:(NSString *)project + operation:(NSString *)operation { + NSString *methodName = @"compute.operations.delete"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.operation = operation; + return query; +} + ++ (id)queryForOperationsGetWithProject:(NSString *)project + operation:(NSString *)operation { + NSString *methodName = @"compute.operations.get"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.operation = operation; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForOperationsListWithProject:(NSString *)project { + NSString *methodName = @"compute.operations.list"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.expectedObjectClass = [GTLComputeOperationList class]; + return query; +} + +#pragma mark - +#pragma mark "projects" methods +// These create a GTLQueryCompute object. + ++ (id)queryForProjectsGetWithProject:(NSString *)project { + NSString *methodName = @"compute.projects.get"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.expectedObjectClass = [GTLComputeProject class]; + return query; +} + ++ (id)queryForProjectsSetCommonInstanceMetadataWithProject:(NSString *)project { + NSString *methodName = @"compute.projects.setCommonInstanceMetadata"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + +#pragma mark - +#pragma mark "snapshots" methods +// These create a GTLQueryCompute object. + ++ (id)queryForSnapshotsDeleteWithProject:(NSString *)project + snapshot:(NSString *)snapshot { + NSString *methodName = @"compute.snapshots.delete"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.snapshot = snapshot; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForSnapshotsGetWithProject:(NSString *)project + snapshot:(NSString *)snapshot { + NSString *methodName = @"compute.snapshots.get"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.snapshot = snapshot; + query.expectedObjectClass = [GTLComputeSnapshot class]; + return query; +} + ++ (id)queryForSnapshotsInsertWithObject:(GTLComputeSnapshot *)object + project:(NSString *)project { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"compute.snapshots.insert"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.project = project; + query.expectedObjectClass = [GTLComputeOperation class]; + return query; +} + ++ (id)queryForSnapshotsListWithProject:(NSString *)project { + NSString *methodName = @"compute.snapshots.list"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.expectedObjectClass = [GTLComputeSnapshotList class]; + return query; +} + +#pragma mark - +#pragma mark "zones" methods +// These create a GTLQueryCompute object. + ++ (id)queryForZonesGetWithProject:(NSString *)project + zoneProperty:(NSString *)zoneProperty { + NSString *methodName = @"compute.zones.get"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.zoneProperty = zoneProperty; + query.expectedObjectClass = [GTLComputeZone class]; + return query; +} + ++ (id)queryForZonesListWithProject:(NSString *)project { + NSString *methodName = @"compute.zones.list"; + GTLQueryCompute *query = [self queryWithMethodName:methodName]; + query.project = project; + query.expectedObjectClass = [GTLComputeZoneList class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLServiceCompute.h b/GTL/Source/Services/Compute/Generated/GTLServiceCompute.h new file mode 100644 index 0000000..096a678 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLServiceCompute.h @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceCompute.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLServiceCompute (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceCompute : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryCompute.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Compute/Generated/GTLServiceCompute.m b/GTL/Source/Services/Compute/Generated/GTLServiceCompute.m new file mode 100644 index 0000000..08ba5a9 --- /dev/null +++ b/GTL/Source/Services/Compute/Generated/GTLServiceCompute.m @@ -0,0 +1,87 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceCompute.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Compute Engine API (compute/v1beta13) +// Description: +// API for the Google Compute Engine service. +// Documentation: +// https://developers.google.com/compute/docs/reference/v1beta13 +// Classes: +// GTLServiceCompute (0 custom class methods, 0 custom properties) + +#import "GTLCompute.h" + +@implementation GTLServiceCompute + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryCompute class], + [GTLComputeAccessConfig class], + [GTLComputeAttachedDisk class], + [GTLComputeDisk class], + [GTLComputeDiskList class], + [GTLComputeFirewall class], + [GTLComputeFirewallList class], + [GTLComputeImage class], + [GTLComputeImageList class], + [GTLComputeInstance class], + [GTLComputeInstanceList class], + [GTLComputeKernel class], + [GTLComputeKernelList class], + [GTLComputeMachineType class], + [GTLComputeMachineTypeList class], + [GTLComputeMetadata class], + [GTLComputeNetwork class], + [GTLComputeNetworkInterface class], + [GTLComputeNetworkList class], + [GTLComputeOperation class], + [GTLComputeOperationList class], + [GTLComputeProject class], + [GTLComputeSerialPortOutput class], + [GTLComputeServiceAccount class], + [GTLComputeSnapshot class], + [GTLComputeSnapshotList class], + [GTLComputeZone class], + [GTLComputeZoneList class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v1beta13"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Discovery/.svn/all-wcprops b/GTL/Source/Services/Discovery/.svn/all-wcprops new file mode 100644 index 0000000..3602e17 --- /dev/null +++ b/GTL/Source/Services/Discovery/.svn/all-wcprops @@ -0,0 +1,5 @@ +K 25 +svn:wc:ra_dav:version-url +V 49 +/svn/!svn/ver/241/trunk/Source/Services/Discovery +END diff --git a/GTL/Source/Services/Discovery/.svn/entries b/GTL/Source/Services/Discovery/.svn/entries new file mode 100644 index 0000000..a5dd22b --- /dev/null +++ b/GTL/Source/Services/Discovery/.svn/entries @@ -0,0 +1,31 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Discovery +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-11-06T21:10:03.064870Z +241 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +Generated +dir + diff --git a/GTL/Source/Services/Discovery/Generated/.svn/all-wcprops b/GTL/Source/Services/Discovery/Generated/.svn/all-wcprops new file mode 100644 index 0000000..45b053e --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/.svn/all-wcprops @@ -0,0 +1,137 @@ +K 25 +svn:wc:ra_dav:version-url +V 59 +/svn/!svn/ver/241/trunk/Source/Services/Discovery/Generated +END +GTLDiscoveryRestResource.m +K 25 +svn:wc:ra_dav:version-url +V 86 +/svn/!svn/ver/208/trunk/Source/Services/Discovery/Generated/GTLDiscoveryRestResource.m +END +GTLDiscoveryJsonSchema.h +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/!svn/ver/241/trunk/Source/Services/Discovery/Generated/GTLDiscoveryJsonSchema.h +END +GTLDiscoveryRpcMethod.m +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/230/trunk/Source/Services/Discovery/Generated/GTLDiscoveryRpcMethod.m +END +GTLDiscoveryRpcDescription.m +K 25 +svn:wc:ra_dav:version-url +V 88 +/svn/!svn/ver/237/trunk/Source/Services/Discovery/Generated/GTLDiscoveryRpcDescription.m +END +GTLDiscoveryJsonSchema.m +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/!svn/ver/241/trunk/Source/Services/Discovery/Generated/GTLDiscoveryJsonSchema.m +END +GTLDiscoveryDirectoryList.h +K 25 +svn:wc:ra_dav:version-url +V 87 +/svn/!svn/ver/208/trunk/Source/Services/Discovery/Generated/GTLDiscoveryDirectoryList.h +END +GTLServiceDiscovery.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/208/trunk/Source/Services/Discovery/Generated/GTLServiceDiscovery.h +END +GTLQueryDiscovery.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/208/trunk/Source/Services/Discovery/Generated/GTLQueryDiscovery.h +END +GTLServiceDiscovery.m +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/208/trunk/Source/Services/Discovery/Generated/GTLServiceDiscovery.m +END +GTLDiscoveryDirectoryList.m +K 25 +svn:wc:ra_dav:version-url +V 87 +/svn/!svn/ver/208/trunk/Source/Services/Discovery/Generated/GTLDiscoveryDirectoryList.m +END +GTLQueryDiscovery.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/208/trunk/Source/Services/Discovery/Generated/GTLQueryDiscovery.m +END +GTLDiscoveryConstants.h +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/208/trunk/Source/Services/Discovery/Generated/GTLDiscoveryConstants.h +END +GTLDiscoveryRestMethod.h +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/!svn/ver/230/trunk/Source/Services/Discovery/Generated/GTLDiscoveryRestMethod.h +END +GTLDiscovery.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/208/trunk/Source/Services/Discovery/Generated/GTLDiscovery.h +END +GTLDiscoveryRestDescription.h +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/237/trunk/Source/Services/Discovery/Generated/GTLDiscoveryRestDescription.h +END +GTLDiscoveryConstants.m +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/208/trunk/Source/Services/Discovery/Generated/GTLDiscoveryConstants.m +END +GTLDiscoveryRestMethod.m +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/!svn/ver/230/trunk/Source/Services/Discovery/Generated/GTLDiscoveryRestMethod.m +END +GTLDiscoveryRestResource.h +K 25 +svn:wc:ra_dav:version-url +V 86 +/svn/!svn/ver/208/trunk/Source/Services/Discovery/Generated/GTLDiscoveryRestResource.h +END +GTLDiscoveryRpcMethod.h +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/230/trunk/Source/Services/Discovery/Generated/GTLDiscoveryRpcMethod.h +END +GTLDiscoveryRestDescription.m +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/237/trunk/Source/Services/Discovery/Generated/GTLDiscoveryRestDescription.m +END +GTLDiscovery_Sources.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/225/trunk/Source/Services/Discovery/Generated/GTLDiscovery_Sources.m +END +GTLDiscoveryRpcDescription.h +K 25 +svn:wc:ra_dav:version-url +V 88 +/svn/!svn/ver/237/trunk/Source/Services/Discovery/Generated/GTLDiscoveryRpcDescription.h +END diff --git a/GTL/Source/Services/Discovery/Generated/.svn/entries b/GTL/Source/Services/Discovery/Generated/.svn/entries new file mode 100644 index 0000000..d769604 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/.svn/entries @@ -0,0 +1,776 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Discovery/Generated +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-11-06T21:10:03.064870Z +241 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +GTLDiscoveryRestResource.m +file + + + + +2012-12-09T08:42:32.000000Z +c1646963bb159d74045921ffcfd2e133 +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2118 + +GTLDiscoveryJsonSchema.h +file + + + + +2012-12-09T08:42:32.000000Z +c58c2315d34720bc83ea1ea8eed063c0 +2012-11-06T21:10:03.064870Z +241 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +5424 + +GTLDiscoveryRpcMethod.m +file + + + + +2012-12-09T08:42:32.000000Z +d366f7778e02a1052804f9c9f5b40450 +2012-10-10T23:49:38.997853Z +230 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3292 + +GTLDiscoveryRpcDescription.m +file + + + + +2012-12-09T08:42:32.000000Z +c72166b2ea9ab7de948131ccdbd3f4d1 +2012-10-23T20:22:06.494543Z +237 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +5093 + +GTLDiscoveryJsonSchema.m +file + + + + +2012-12-09T08:42:32.000000Z +62f6b3047f476d8086c287c5d796b4b5 +2012-11-06T21:10:03.064870Z +241 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3033 + +GTLDiscoveryDirectoryList.h +file + + + + +2012-12-09T08:42:32.000000Z +68a2cda4fe25d34c311ce4af511da86e +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3864 + +GTLServiceDiscovery.h +file + + + + +2012-12-09T08:42:32.000000Z +8d6368be499ebb6e6460633c272e82b6 +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2201 + +GTLQueryDiscovery.h +file + + + + +2012-12-09T08:42:32.000000Z +bde7a309d8aa88e0d5dd3a7511c16ba2 +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3018 + +GTLServiceDiscovery.m +file + + + + +2012-12-09T08:42:32.000000Z +abc4d742822b9ea7bed149f68362366a +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2321 + +GTLDiscoveryDirectoryList.m +file + + + + +2012-12-09T08:42:32.000000Z +a2ab28175966e5c0218a0ef104752ebc +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2924 + +GTLQueryDiscovery.m +file + + + + +2012-12-09T08:42:32.000000Z +4d07f5ca37abdb5a6c09c098d3040d26 +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2403 + +GTLDiscoveryConstants.h +file + + + + +2012-12-09T08:42:32.000000Z +b6448b9f71ffc02e26d3804d16218c82 +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1416 + +GTLDiscoveryRestMethod.h +file + + + + +2012-12-09T08:42:32.000000Z +f4e121d5b1ea2a05651f6999684d17b2 +2012-10-10T23:49:38.997853Z +230 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +7021 + +GTLDiscovery.h +file + + + + +2012-12-09T08:42:32.000000Z +2594447ced08f08cdaef98f545e50969 +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1406 + +GTLDiscoveryConstants.m +file + + + + +2012-12-09T08:42:32.000000Z +225475572f6dcdd343399737325dfdd3 +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1285 + +GTLDiscoveryRestDescription.h +file + + + + +2012-12-09T08:42:32.000000Z +ef5b82c57c64eedefd053ebaecbe2c0b +2012-10-23T20:22:06.494543Z +237 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +8713 + +GTLDiscoveryRestMethod.m +file + + + + +2012-12-09T08:42:32.000000Z +b3c2445064a59a1c1f87cf2d6b2c538a +2012-10-10T23:49:38.997853Z +230 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4781 + +GTLDiscoveryRestResource.h +file + + + + +2012-12-09T08:42:32.000000Z +ab59edc0cf68b54b911d788e2854193a +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2811 + +GTLDiscoveryRpcMethod.h +file + + + + +2012-12-09T08:42:32.000000Z +8d838e4fb1145f63366f1584b578168d +2012-10-10T23:49:38.997853Z +230 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4523 + +GTLDiscoveryRestDescription.m +file + + + + +2012-12-09T08:42:32.000000Z +63588583c5219411845fdefe834c4946 +2012-10-23T20:22:06.494543Z +237 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +5564 + +GTLDiscovery_Sources.m +file + + + + +2012-12-09T08:42:32.000000Z +84e35d0edd68c16e70631057d2a74615 +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1525 + +GTLDiscoveryRpcDescription.h +file + + + + +2012-12-09T08:42:32.000000Z +112857dab6f7ab6a68aecbcb64957094 +2012-10-23T20:22:06.494543Z +237 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +7774 + diff --git a/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscovery.h.svn-base b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscovery.h.svn-base new file mode 100644 index 0000000..33e95ef --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscovery.h.svn-base @@ -0,0 +1,41 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscovery.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ + +#import "GTLDiscoveryConstants.h" + +#import "GTLDiscoveryDirectoryList.h" +#import "GTLDiscoveryJsonSchema.h" +#import "GTLDiscoveryRestDescription.h" +#import "GTLDiscoveryRestMethod.h" +#import "GTLDiscoveryRestResource.h" +#import "GTLDiscoveryRpcDescription.h" +#import "GTLDiscoveryRpcMethod.h" + +#import "GTLQueryDiscovery.h" +#import "GTLServiceDiscovery.h" diff --git a/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryConstants.h.svn-base b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryConstants.h.svn-base new file mode 100644 index 0000000..203dd9d --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryConstants.h.svn-base @@ -0,0 +1,41 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Label +GTL_EXTERN NSString * const kGTLDiscoveryLabelDeprecated; // "deprecated" +GTL_EXTERN NSString * const kGTLDiscoveryLabelGraduated; // "graduated" +GTL_EXTERN NSString * const kGTLDiscoveryLabelLabs; // "labs" diff --git a/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryConstants.m.svn-base b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryConstants.m.svn-base new file mode 100644 index 0000000..8a766b6 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryConstants.m.svn-base @@ -0,0 +1,35 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ + +#import "GTLDiscoveryConstants.h" + +// Label +NSString * const kGTLDiscoveryLabelDeprecated = @"deprecated"; +NSString * const kGTLDiscoveryLabelGraduated = @"graduated"; +NSString * const kGTLDiscoveryLabelLabs = @"labs"; diff --git a/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryDirectoryList.h.svn-base b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryDirectoryList.h.svn-base new file mode 100644 index 0000000..18e3bf7 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryDirectoryList.h.svn-base @@ -0,0 +1,126 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryDirectoryList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryDirectoryList (0 custom class methods, 3 custom properties) +// GTLDiscoveryDirectoryListItemsItem (0 custom class methods, 12 custom properties) +// GTLDiscoveryDirectoryListItemsItemIcons (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDiscoveryDirectoryListItemsItem; +@class GTLDiscoveryDirectoryListItemsItemIcons; + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryDirectoryList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLDiscoveryDirectoryList : GTLCollectionObject + +// Indicate the version of the Discovery API used to generate this doc. +@property (copy) NSString *discoveryVersion; + +// The individual directory entries. One entry per api/version pair. +@property (retain) NSArray *items; // of GTLDiscoveryDirectoryListItemsItem + +// The kind for this response. +@property (copy) NSString *kind; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryDirectoryListItemsItem +// + +@interface GTLDiscoveryDirectoryListItemsItem : GTLObject + +// The description of this API. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// A link to the discovery document. +@property (copy) NSString *discoveryLink; + +// The url for the discovery REST document. +@property (copy) NSString *discoveryRestUrl; + +// A link to human readable documentation for the API. +@property (copy) NSString *documentationLink; + +// Links to 16x16 and 32x32 icons representing the API. +@property (retain) GTLDiscoveryDirectoryListItemsItemIcons *icons; + +// The id of this API. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The kind for this response. +@property (copy) NSString *kind; + +// Labels for the status of this API, such as labs or deprecated. +@property (retain) NSArray *labels; // of NSString + +// The name of the API. +@property (copy) NSString *name; + +// True if this version is the preferred version to use. +@property (retain) NSNumber *preferred; // boolValue + +// The title of this API. +@property (copy) NSString *title; + +// The version of the API. +@property (copy) NSString *version; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryDirectoryListItemsItemIcons +// + +@interface GTLDiscoveryDirectoryListItemsItemIcons : GTLObject + +// The url of the 16x16 icon. +@property (copy) NSString *x16; + +// The url of the 32x32 icon. +@property (copy) NSString *x32; + +@end diff --git a/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryDirectoryList.m.svn-base b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryDirectoryList.m.svn-base new file mode 100644 index 0000000..3ba0dc4 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryDirectoryList.m.svn-base @@ -0,0 +1,98 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryDirectoryList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryDirectoryList (0 custom class methods, 3 custom properties) +// GTLDiscoveryDirectoryListItemsItem (0 custom class methods, 12 custom properties) +// GTLDiscoveryDirectoryListItemsItemIcons (0 custom class methods, 2 custom properties) + +#import "GTLDiscoveryDirectoryList.h" + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryDirectoryList +// + +@implementation GTLDiscoveryDirectoryList +@dynamic discoveryVersion, items, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLDiscoveryDirectoryListItemsItem class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"discovery#directoryList"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryDirectoryListItemsItem +// + +@implementation GTLDiscoveryDirectoryListItemsItem +@dynamic descriptionProperty, discoveryLink, discoveryRestUrl, + documentationLink, icons, identifier, kind, labels, name, preferred, + title, version; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"labels"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"discovery#directoryItem"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryDirectoryListItemsItemIcons +// + +@implementation GTLDiscoveryDirectoryListItemsItemIcons +@dynamic x16, x32; +@end diff --git a/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryJsonSchema.h.svn-base b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryJsonSchema.h.svn-base new file mode 100644 index 0000000..b1b4706 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryJsonSchema.h.svn-base @@ -0,0 +1,151 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryJsonSchema.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryJsonSchema (0 custom class methods, 19 custom properties) +// GTLDiscoveryJsonSchemaAnnotations (0 custom class methods, 1 custom properties) +// GTLDiscoveryJsonSchemaProperties (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDiscoveryJsonSchema; +@class GTLDiscoveryJsonSchemaAnnotations; +@class GTLDiscoveryJsonSchemaProperties; + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryJsonSchema +// + +@interface GTLDiscoveryJsonSchema : GTLObject + +// A reference to another schema. The value of this property is the "id" of +// another schema. +@property (copy) NSString *xRef; + +// If this is a schema for an object, this property is the schema for any +// additional properties with dynamic keys on this object. +// Remapped to 'additionalPropertiesProperty' to avoid GTLObject's +// 'additionalProperties'. +@property (retain) GTLDiscoveryJsonSchema *additionalPropertiesProperty; + +// Additional information about this property. +@property (retain) GTLDiscoveryJsonSchemaAnnotations *annotations; + +// The default value of this property (if one exists). +// Remapped to 'defaultProperty' to avoid language reserved word 'default'. +@property (copy) NSString *defaultProperty; + +// A description of this object. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Values this parameter may take (if it is an enum). +// Remapped to 'enumProperty' to avoid language reserved word 'enum'. +@property (retain) NSArray *enumProperty; // of NSString + +// The descriptions for the enums. Each position maps to the corresponding value +// in the "enum" array. +@property (retain) NSArray *enumDescriptions; // of NSString + +// An additional regular expression or key that helps constrain the value. For +// more details see: +// http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.23 +@property (copy) NSString *format; + +// Unique identifier for this schema. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// If this is a schema for an array, this property is the schema for each +// element in the array. +@property (retain) GTLDiscoveryJsonSchema *items; + +// Whether this parameter goes in the query or the path for REST requests. +@property (copy) NSString *location; + +// The maximum value of this parameter. +@property (copy) NSString *maximum; + +// The minimum value of this parameter. +@property (copy) NSString *minimum; + +// The regular expression this parameter must conform to. Uses Java 6 regex +// format: http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html +@property (copy) NSString *pattern; + +// If this is a schema for an object, list the schema for each property of this +// object. +@property (retain) GTLDiscoveryJsonSchemaProperties *properties; + +// The value is read-only, generated by the service. The value can not be +// modified by the client. It the value is included in a POST, PUT or PATCH +// request, it will be ignored by the service. +@property (retain) NSNumber *readOnly; // boolValue + +// Whether this parameter may appear multiple times. +@property (retain) NSNumber *repeated; // boolValue + +// Whether the parameter is required. +@property (retain) NSNumber *required; // boolValue + +// The value type for this schema. A list of values can be found here: +// http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1 +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryJsonSchemaAnnotations +// + +@interface GTLDiscoveryJsonSchemaAnnotations : GTLObject + +// A list of methods for which this property is required on requests. +@property (retain) NSArray *required; // of NSString + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryJsonSchemaProperties +// + +@interface GTLDiscoveryJsonSchemaProperties : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryJsonSchema. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end diff --git a/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryJsonSchema.m.svn-base b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryJsonSchema.m.svn-base new file mode 100644 index 0000000..c9e515a --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryJsonSchema.m.svn-base @@ -0,0 +1,101 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryJsonSchema.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryJsonSchema (0 custom class methods, 19 custom properties) +// GTLDiscoveryJsonSchemaAnnotations (0 custom class methods, 1 custom properties) +// GTLDiscoveryJsonSchemaProperties (0 custom class methods, 0 custom properties) + +#import "GTLDiscoveryJsonSchema.h" + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryJsonSchema +// + +@implementation GTLDiscoveryJsonSchema +@dynamic xRef, additionalPropertiesProperty, annotations, defaultProperty, + descriptionProperty, enumProperty, enumDescriptions, format, + identifier, items, location, maximum, minimum, pattern, properties, + readOnly, repeated, required, type; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"additionalProperties", @"additionalPropertiesProperty", + @"default", @"defaultProperty", + @"description", @"descriptionProperty", + @"enum", @"enumProperty", + @"id", @"identifier", + @"$ref", @"xRef", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"enum", + [NSString class], @"enumDescriptions", + nil]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryJsonSchemaAnnotations +// + +@implementation GTLDiscoveryJsonSchemaAnnotations +@dynamic required; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"required"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryJsonSchemaProperties +// + +@implementation GTLDiscoveryJsonSchemaProperties + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryJsonSchema class]; +} + +@end diff --git a/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRestDescription.h.svn-base b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRestDescription.h.svn-base new file mode 100644 index 0000000..9323f12 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRestDescription.h.svn-base @@ -0,0 +1,266 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryRestDescription.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryRestDescription (0 custom class methods, 25 custom properties) +// GTLDiscoveryRestDescriptionAuth (0 custom class methods, 1 custom properties) +// GTLDiscoveryRestDescriptionIcons (0 custom class methods, 2 custom properties) +// GTLDiscoveryRestDescriptionMethods (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestDescriptionParameters (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestDescriptionResources (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestDescriptionSchemas (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestDescriptionAuthOauth2 (0 custom class methods, 1 custom properties) +// GTLDiscoveryRestDescriptionAuthOauth2Scopes (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestDescriptionAuthOauth2ScopesScope (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDiscoveryJsonSchema; +@class GTLDiscoveryRestDescriptionAuth; +@class GTLDiscoveryRestDescriptionAuthOauth2; +@class GTLDiscoveryRestDescriptionAuthOauth2Scopes; +@class GTLDiscoveryRestDescriptionAuthOauth2ScopesScope; +@class GTLDiscoveryRestDescriptionIcons; +@class GTLDiscoveryRestDescriptionMethods; +@class GTLDiscoveryRestDescriptionParameters; +@class GTLDiscoveryRestDescriptionResources; +@class GTLDiscoveryRestDescriptionSchemas; +@class GTLDiscoveryRestMethod; +@class GTLDiscoveryRestResource; + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescription +// + +@interface GTLDiscoveryRestDescription : GTLObject + +// Authentication information. +@property (retain) GTLDiscoveryRestDescriptionAuth *auth; + +// [DEPRECATED] The base path for REST requests. +@property (copy) NSString *basePath; + +// [DEPRECATED] The base URL for REST requests. +@property (copy) NSString *baseUrl; + +// The path for REST batch requests. +@property (copy) NSString *batchPath; + +// Indicates how the API name should be capitalized and split into various +// parts. Useful for generating pretty class names. +@property (copy) NSString *canonicalName; + +// The description of this API. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Indicate the version of the Discovery API used to generate this doc. +@property (copy) NSString *discoveryVersion; + +// A link to human readable documentation for the API. +@property (copy) NSString *documentationLink; + +// The etag for this response. +@property (copy) NSString *ETag; + +// A list of supported features for this API. +@property (retain) NSArray *features; // of NSString + +// Links to 16x16 and 32x32 icons representing the API. +@property (retain) GTLDiscoveryRestDescriptionIcons *icons; + +// The id of this API. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The kind for this response. +@property (copy) NSString *kind; + +// Labels for the status of this API, such as labs or deprecated. +@property (retain) NSArray *labels; // of NSString + +// API-level methods for this API. +@property (retain) GTLDiscoveryRestDescriptionMethods *methods; + +// The name of this API. +@property (copy) NSString *name; + +// Common parameters that apply across all apis. +@property (retain) GTLDiscoveryRestDescriptionParameters *parameters; + +// The protocol described by this document. +@property (copy) NSString *protocol; + +// The resources in this API. +@property (retain) GTLDiscoveryRestDescriptionResources *resources; + +// The version of this API. +@property (copy) NSString *revision; + +// The root url under which all API services live. +@property (copy) NSString *rootUrl; + +// The schemas for this API. +@property (retain) GTLDiscoveryRestDescriptionSchemas *schemas; + +// The base path for all REST requests. +@property (copy) NSString *servicePath; + +// The title of this API. +@property (copy) NSString *title; + +// The version of this API. +@property (copy) NSString *version; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionAuth +// + +@interface GTLDiscoveryRestDescriptionAuth : GTLObject + +// OAuth 2.0 authentication information. +@property (retain) GTLDiscoveryRestDescriptionAuthOauth2 *oauth2; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionIcons +// + +@interface GTLDiscoveryRestDescriptionIcons : GTLObject + +// The url of the 16x16 icon. +@property (copy) NSString *x16; + +// The url of the 32x32 icon. +@property (copy) NSString *x32; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionMethods +// + +@interface GTLDiscoveryRestDescriptionMethods : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryRestMethod. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionParameters +// + +@interface GTLDiscoveryRestDescriptionParameters : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryJsonSchema. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionResources +// + +@interface GTLDiscoveryRestDescriptionResources : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryRestResource. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionSchemas +// + +@interface GTLDiscoveryRestDescriptionSchemas : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryJsonSchema. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionAuthOauth2 +// + +@interface GTLDiscoveryRestDescriptionAuthOauth2 : GTLObject + +// Available OAuth 2.0 scopes. +@property (retain) GTLDiscoveryRestDescriptionAuthOauth2Scopes *scopes; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionAuthOauth2Scopes +// + +@interface GTLDiscoveryRestDescriptionAuthOauth2Scopes : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryRestDescriptionAuthOauth2ScopesScope. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionAuthOauth2ScopesScope +// + +@interface GTLDiscoveryRestDescriptionAuthOauth2ScopesScope : GTLObject + +// Description of scope. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +@end diff --git a/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRestDescription.m.svn-base b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRestDescription.m.svn-base new file mode 100644 index 0000000..bdad075 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRestDescription.m.svn-base @@ -0,0 +1,199 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryRestDescription.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryRestDescription (0 custom class methods, 25 custom properties) +// GTLDiscoveryRestDescriptionAuth (0 custom class methods, 1 custom properties) +// GTLDiscoveryRestDescriptionIcons (0 custom class methods, 2 custom properties) +// GTLDiscoveryRestDescriptionMethods (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestDescriptionParameters (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestDescriptionResources (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestDescriptionSchemas (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestDescriptionAuthOauth2 (0 custom class methods, 1 custom properties) +// GTLDiscoveryRestDescriptionAuthOauth2Scopes (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestDescriptionAuthOauth2ScopesScope (0 custom class methods, 1 custom properties) + +#import "GTLDiscoveryRestDescription.h" + +#import "GTLDiscoveryJsonSchema.h" +#import "GTLDiscoveryRestMethod.h" +#import "GTLDiscoveryRestResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescription +// + +@implementation GTLDiscoveryRestDescription +@dynamic auth, basePath, baseUrl, batchPath, canonicalName, descriptionProperty, + discoveryVersion, documentationLink, ETag, features, icons, identifier, + kind, labels, methods, name, parameters, protocol, resources, revision, + rootUrl, schemas, servicePath, title, version; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"features", + [NSString class], @"labels", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"discovery#restDescription"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionAuth +// + +@implementation GTLDiscoveryRestDescriptionAuth +@dynamic oauth2; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionIcons +// + +@implementation GTLDiscoveryRestDescriptionIcons +@dynamic x16, x32; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionMethods +// + +@implementation GTLDiscoveryRestDescriptionMethods + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryRestMethod class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionParameters +// + +@implementation GTLDiscoveryRestDescriptionParameters + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryJsonSchema class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionResources +// + +@implementation GTLDiscoveryRestDescriptionResources + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryRestResource class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionSchemas +// + +@implementation GTLDiscoveryRestDescriptionSchemas + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryJsonSchema class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionAuthOauth2 +// + +@implementation GTLDiscoveryRestDescriptionAuthOauth2 +@dynamic scopes; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionAuthOauth2Scopes +// + +@implementation GTLDiscoveryRestDescriptionAuthOauth2Scopes + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryRestDescriptionAuthOauth2ScopesScope class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionAuthOauth2ScopesScope +// + +@implementation GTLDiscoveryRestDescriptionAuthOauth2ScopesScope +@dynamic descriptionProperty; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRestMethod.h.svn-base b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRestMethod.h.svn-base new file mode 100644 index 0000000..3910122 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRestMethod.h.svn-base @@ -0,0 +1,214 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryRestMethod.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryRestMethod (0 custom class methods, 13 custom properties) +// GTLDiscoveryRestMethodMediaUpload (0 custom class methods, 3 custom properties) +// GTLDiscoveryRestMethodParameters (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestMethodRequest (0 custom class methods, 1 custom properties) +// GTLDiscoveryRestMethodResponse (0 custom class methods, 1 custom properties) +// GTLDiscoveryRestMethodMediaUploadProtocols (0 custom class methods, 2 custom properties) +// GTLDiscoveryRestMethodMediaUploadProtocolsResumable (0 custom class methods, 2 custom properties) +// GTLDiscoveryRestMethodMediaUploadProtocolsSimple (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDiscoveryJsonSchema; +@class GTLDiscoveryRestMethodMediaUpload; +@class GTLDiscoveryRestMethodMediaUploadProtocols; +@class GTLDiscoveryRestMethodMediaUploadProtocolsResumable; +@class GTLDiscoveryRestMethodMediaUploadProtocolsSimple; +@class GTLDiscoveryRestMethodParameters; +@class GTLDiscoveryRestMethodRequest; +@class GTLDiscoveryRestMethodResponse; + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethod +// + +@interface GTLDiscoveryRestMethod : GTLObject + +// Description of this method. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// HTTP method used by this method. +@property (copy) NSString *httpMethod; + +// A unique ID for this method. This property can be used to match methods +// between different versions of Discovery. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Media upload parameters. +@property (retain) GTLDiscoveryRestMethodMediaUpload *mediaUpload; + +// Ordered list of required parameters, serves as a hint to clients on how to +// structure their method signatures. The array is ordered such that the +// "most-significant" parameter appears first. +@property (retain) NSArray *parameterOrder; // of NSString + +// Details for all parameters in this method. +@property (retain) GTLDiscoveryRestMethodParameters *parameters; + +// The URI path of this REST method. Should be used in conjunction with the +// basePath property at the api-level. +@property (copy) NSString *path; + +// The schema for the request. +@property (retain) GTLDiscoveryRestMethodRequest *request; + +// The schema for the response. +@property (retain) GTLDiscoveryRestMethodResponse *response; + +// OAuth 2.0 scopes applicable to this method. +@property (retain) NSArray *scopes; // of NSString + +// Whether this method supports media downloads. +@property (retain) NSNumber *supportsMediaDownload; // boolValue + +// Whether this method supports media uploads. +@property (retain) NSNumber *supportsMediaUpload; // boolValue + +// Whether this method supports subscriptions. +@property (retain) NSNumber *supportsSubscription; // boolValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodMediaUpload +// + +@interface GTLDiscoveryRestMethodMediaUpload : GTLObject + +// MIME Media Ranges for acceptable media uploads to this method. +@property (retain) NSArray *accept; // of NSString + +// Maximum size of a media upload, such as "1MB", "2GB" or "3TB". +@property (copy) NSString *maxSize; + +// Supported upload protocols. +@property (retain) GTLDiscoveryRestMethodMediaUploadProtocols *protocols; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodParameters +// + +@interface GTLDiscoveryRestMethodParameters : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryJsonSchema. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodRequest +// + +@interface GTLDiscoveryRestMethodRequest : GTLObject + +// Schema ID for the request schema. +@property (copy) NSString *xRef; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodResponse +// + +@interface GTLDiscoveryRestMethodResponse : GTLObject + +// Schema ID for the response schema. +@property (copy) NSString *xRef; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodMediaUploadProtocols +// + +@interface GTLDiscoveryRestMethodMediaUploadProtocols : GTLObject + +// Supports the Resumable Media Upload protocol. +@property (retain) GTLDiscoveryRestMethodMediaUploadProtocolsResumable *resumable; + +// Supports uploading as a single HTTP request. +@property (retain) GTLDiscoveryRestMethodMediaUploadProtocolsSimple *simple; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodMediaUploadProtocolsResumable +// + +@interface GTLDiscoveryRestMethodMediaUploadProtocolsResumable : GTLObject + +// True if this endpoint supports uploading multipart media. +@property (retain) NSNumber *multipart; // boolValue + +// The URI path to be used for upload. Should be used in conjunction with the +// basePath property at the api-level. +@property (copy) NSString *path; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodMediaUploadProtocolsSimple +// + +@interface GTLDiscoveryRestMethodMediaUploadProtocolsSimple : GTLObject + +// True if this endpoint supports upload multipart media. +@property (retain) NSNumber *multipart; // boolValue + +// The URI path to be used for upload. Should be used in conjunction with the +// basePath property at the api-level. +@property (copy) NSString *path; + +@end diff --git a/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRestMethod.m.svn-base b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRestMethod.m.svn-base new file mode 100644 index 0000000..81a3d23 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRestMethod.m.svn-base @@ -0,0 +1,169 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryRestMethod.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryRestMethod (0 custom class methods, 13 custom properties) +// GTLDiscoveryRestMethodMediaUpload (0 custom class methods, 3 custom properties) +// GTLDiscoveryRestMethodParameters (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestMethodRequest (0 custom class methods, 1 custom properties) +// GTLDiscoveryRestMethodResponse (0 custom class methods, 1 custom properties) +// GTLDiscoveryRestMethodMediaUploadProtocols (0 custom class methods, 2 custom properties) +// GTLDiscoveryRestMethodMediaUploadProtocolsResumable (0 custom class methods, 2 custom properties) +// GTLDiscoveryRestMethodMediaUploadProtocolsSimple (0 custom class methods, 2 custom properties) + +#import "GTLDiscoveryRestMethod.h" + +#import "GTLDiscoveryJsonSchema.h" + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethod +// + +@implementation GTLDiscoveryRestMethod +@dynamic descriptionProperty, httpMethod, identifier, mediaUpload, + parameterOrder, parameters, path, request, response, scopes, + supportsMediaDownload, supportsMediaUpload, supportsSubscription; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"parameterOrder", + [NSString class], @"scopes", + nil]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodMediaUpload +// + +@implementation GTLDiscoveryRestMethodMediaUpload +@dynamic accept, maxSize, protocols; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"accept"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodParameters +// + +@implementation GTLDiscoveryRestMethodParameters + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryJsonSchema class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodRequest +// + +@implementation GTLDiscoveryRestMethodRequest +@dynamic xRef; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"$ref" + forKey:@"xRef"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodResponse +// + +@implementation GTLDiscoveryRestMethodResponse +@dynamic xRef; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"$ref" + forKey:@"xRef"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodMediaUploadProtocols +// + +@implementation GTLDiscoveryRestMethodMediaUploadProtocols +@dynamic resumable, simple; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodMediaUploadProtocolsResumable +// + +@implementation GTLDiscoveryRestMethodMediaUploadProtocolsResumable +@dynamic multipart, path; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodMediaUploadProtocolsSimple +// + +@implementation GTLDiscoveryRestMethodMediaUploadProtocolsSimple +@dynamic multipart, path; +@end diff --git a/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRestResource.h.svn-base b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRestResource.h.svn-base new file mode 100644 index 0000000..50d8593 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRestResource.h.svn-base @@ -0,0 +1,84 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryRestResource.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryRestResource (0 custom class methods, 2 custom properties) +// GTLDiscoveryRestResourceMethods (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestResourceResources (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDiscoveryRestMethod; +@class GTLDiscoveryRestResource; +@class GTLDiscoveryRestResourceMethods; +@class GTLDiscoveryRestResourceResources; + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestResource +// + +@interface GTLDiscoveryRestResource : GTLObject + +// Methods on this resource. +@property (retain) GTLDiscoveryRestResourceMethods *methods; + +// Sub-resources on this resource. +@property (retain) GTLDiscoveryRestResourceResources *resources; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestResourceMethods +// + +@interface GTLDiscoveryRestResourceMethods : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryRestMethod. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestResourceResources +// + +@interface GTLDiscoveryRestResourceResources : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryRestResource. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end diff --git a/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRestResource.m.svn-base b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRestResource.m.svn-base new file mode 100644 index 0000000..09c86a5 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRestResource.m.svn-base @@ -0,0 +1,73 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryRestResource.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryRestResource (0 custom class methods, 2 custom properties) +// GTLDiscoveryRestResourceMethods (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestResourceResources (0 custom class methods, 0 custom properties) + +#import "GTLDiscoveryRestResource.h" + +#import "GTLDiscoveryRestMethod.h" + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestResource +// + +@implementation GTLDiscoveryRestResource +@dynamic methods, resources; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestResourceMethods +// + +@implementation GTLDiscoveryRestResourceMethods + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryRestMethod class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestResourceResources +// + +@implementation GTLDiscoveryRestResourceResources + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryRestResource class]; +} + +@end diff --git a/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRpcDescription.h.svn-base b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRpcDescription.h.svn-base new file mode 100644 index 0000000..c3020be --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRpcDescription.h.svn-base @@ -0,0 +1,241 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryRpcDescription.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryRpcDescription (0 custom class methods, 22 custom properties) +// GTLDiscoveryRpcDescriptionAuth (0 custom class methods, 1 custom properties) +// GTLDiscoveryRpcDescriptionIcons (0 custom class methods, 2 custom properties) +// GTLDiscoveryRpcDescriptionMethods (0 custom class methods, 0 custom properties) +// GTLDiscoveryRpcDescriptionParameters (0 custom class methods, 0 custom properties) +// GTLDiscoveryRpcDescriptionSchemas (0 custom class methods, 0 custom properties) +// GTLDiscoveryRpcDescriptionAuthOauth2 (0 custom class methods, 1 custom properties) +// GTLDiscoveryRpcDescriptionAuthOauth2Scopes (0 custom class methods, 0 custom properties) +// GTLDiscoveryRpcDescriptionAuthOauth2ScopesScope (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDiscoveryJsonSchema; +@class GTLDiscoveryRpcDescriptionAuth; +@class GTLDiscoveryRpcDescriptionAuthOauth2; +@class GTLDiscoveryRpcDescriptionAuthOauth2Scopes; +@class GTLDiscoveryRpcDescriptionAuthOauth2ScopesScope; +@class GTLDiscoveryRpcDescriptionIcons; +@class GTLDiscoveryRpcDescriptionMethods; +@class GTLDiscoveryRpcDescriptionParameters; +@class GTLDiscoveryRpcDescriptionSchemas; +@class GTLDiscoveryRpcMethod; + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescription +// + +@interface GTLDiscoveryRpcDescription : GTLObject + +// Authentication information. +@property (retain) GTLDiscoveryRpcDescriptionAuth *auth; + +// Indicates how the API name should be capitalized and split into various +// parts. Useful for generating pretty class names. +@property (copy) NSString *canonicalName; + +// The description of this API. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Indicate the version of the Discovery API used to generate this doc. +@property (copy) NSString *discoveryVersion; + +// A link to human readable documentation for the API. +@property (copy) NSString *documentationLink; + +// The etag for this response. +@property (copy) NSString *ETag; + +// A list of supported features for this API. +@property (retain) NSArray *features; // of NSString + +// Links to 16x16 and 32x32 icons representing the API. +@property (retain) GTLDiscoveryRpcDescriptionIcons *icons; + +// The id of this API. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The kind for this response. +@property (copy) NSString *kind; + +// Labels for the status of this API, such as labs or deprecated. +@property (retain) NSArray *labels; // of NSString + +// API-level methods for this API. +@property (retain) GTLDiscoveryRpcDescriptionMethods *methods; + +// The name of this API. +@property (copy) NSString *name; + +// Common parameters that apply across all apis. +@property (retain) GTLDiscoveryRpcDescriptionParameters *parameters; + +// The protocol described by this document. +@property (copy) NSString *protocol; + +// The version of this API. +@property (copy) NSString *revision; + +// The root url under which all API services live. +@property (copy) NSString *rootUrl; + +// The path for JSON-RPC requests. +@property (copy) NSString *rpcPath; + +// [DEPRECATED] The url for JSON-RPC requests. +@property (copy) NSString *rpcUrl; + +// The schemas for this API. +@property (retain) GTLDiscoveryRpcDescriptionSchemas *schemas; + +// The title of this API. +@property (copy) NSString *title; + +// The version of this API. +@property (copy) NSString *version; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionAuth +// + +@interface GTLDiscoveryRpcDescriptionAuth : GTLObject + +// OAuth 2.0 authentication information. +@property (retain) GTLDiscoveryRpcDescriptionAuthOauth2 *oauth2; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionIcons +// + +@interface GTLDiscoveryRpcDescriptionIcons : GTLObject + +// The url of the 16x16 icon. +@property (copy) NSString *x16; + +// The url of the 32x32 icon. +@property (copy) NSString *x32; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionMethods +// + +@interface GTLDiscoveryRpcDescriptionMethods : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryRpcMethod. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionParameters +// + +@interface GTLDiscoveryRpcDescriptionParameters : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryJsonSchema. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionSchemas +// + +@interface GTLDiscoveryRpcDescriptionSchemas : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryJsonSchema. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionAuthOauth2 +// + +@interface GTLDiscoveryRpcDescriptionAuthOauth2 : GTLObject + +// Available OAuth 2.0 scopes. +@property (retain) GTLDiscoveryRpcDescriptionAuthOauth2Scopes *scopes; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionAuthOauth2Scopes +// + +@interface GTLDiscoveryRpcDescriptionAuthOauth2Scopes : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryRpcDescriptionAuthOauth2ScopesScope. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionAuthOauth2ScopesScope +// + +@interface GTLDiscoveryRpcDescriptionAuthOauth2ScopesScope : GTLObject + +// Description of scope. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +@end diff --git a/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRpcDescription.m.svn-base b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRpcDescription.m.svn-base new file mode 100644 index 0000000..89ea068 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRpcDescription.m.svn-base @@ -0,0 +1,183 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryRpcDescription.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryRpcDescription (0 custom class methods, 22 custom properties) +// GTLDiscoveryRpcDescriptionAuth (0 custom class methods, 1 custom properties) +// GTLDiscoveryRpcDescriptionIcons (0 custom class methods, 2 custom properties) +// GTLDiscoveryRpcDescriptionMethods (0 custom class methods, 0 custom properties) +// GTLDiscoveryRpcDescriptionParameters (0 custom class methods, 0 custom properties) +// GTLDiscoveryRpcDescriptionSchemas (0 custom class methods, 0 custom properties) +// GTLDiscoveryRpcDescriptionAuthOauth2 (0 custom class methods, 1 custom properties) +// GTLDiscoveryRpcDescriptionAuthOauth2Scopes (0 custom class methods, 0 custom properties) +// GTLDiscoveryRpcDescriptionAuthOauth2ScopesScope (0 custom class methods, 1 custom properties) + +#import "GTLDiscoveryRpcDescription.h" + +#import "GTLDiscoveryJsonSchema.h" +#import "GTLDiscoveryRpcMethod.h" + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescription +// + +@implementation GTLDiscoveryRpcDescription +@dynamic auth, canonicalName, descriptionProperty, discoveryVersion, + documentationLink, ETag, features, icons, identifier, kind, labels, + methods, name, parameters, protocol, revision, rootUrl, rpcPath, + rpcUrl, schemas, title, version; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"features", + [NSString class], @"labels", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"discovery#rpcDescription"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionAuth +// + +@implementation GTLDiscoveryRpcDescriptionAuth +@dynamic oauth2; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionIcons +// + +@implementation GTLDiscoveryRpcDescriptionIcons +@dynamic x16, x32; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionMethods +// + +@implementation GTLDiscoveryRpcDescriptionMethods + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryRpcMethod class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionParameters +// + +@implementation GTLDiscoveryRpcDescriptionParameters + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryJsonSchema class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionSchemas +// + +@implementation GTLDiscoveryRpcDescriptionSchemas + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryJsonSchema class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionAuthOauth2 +// + +@implementation GTLDiscoveryRpcDescriptionAuthOauth2 +@dynamic scopes; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionAuthOauth2Scopes +// + +@implementation GTLDiscoveryRpcDescriptionAuthOauth2Scopes + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryRpcDescriptionAuthOauth2ScopesScope class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionAuthOauth2ScopesScope +// + +@implementation GTLDiscoveryRpcDescriptionAuthOauth2ScopesScope +@dynamic descriptionProperty; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRpcMethod.h.svn-base b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRpcMethod.h.svn-base new file mode 100644 index 0000000..bc7fbab --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRpcMethod.h.svn-base @@ -0,0 +1,136 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryRpcMethod.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryRpcMethod (0 custom class methods, 12 custom properties) +// GTLDiscoveryRpcMethodMediaUpload (0 custom class methods, 2 custom properties) +// GTLDiscoveryRpcMethodParameters (0 custom class methods, 0 custom properties) +// GTLDiscoveryRpcMethodReturns (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDiscoveryJsonSchema; +@class GTLDiscoveryRpcMethodMediaUpload; +@class GTLDiscoveryRpcMethodParameters; +@class GTLDiscoveryRpcMethodReturns; + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcMethod +// + +@interface GTLDiscoveryRpcMethod : GTLObject + +// Whether the method can be made using an HTTP GET JSON-RPC request. +@property (retain) NSNumber *allowGet; // boolValue + +// Description of this method. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// A unique ID for this method. This property can be used to match methods +// between different versions of Discovery. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Media upload parameters. +@property (retain) GTLDiscoveryRpcMethodMediaUpload *mediaUpload; + +// Ordered list of required parameters, serves as a hint to clients on how to +// structure their method signatures. The array is ordered such that the +// "most-significant" parameter appears first. +@property (retain) NSArray *parameterOrder; // of NSString + +// Description for all parameters in this method. +@property (retain) GTLDiscoveryRpcMethodParameters *parameters; + +// The schema for the response. +@property (retain) GTLDiscoveryRpcMethodReturns *returns; + +// OAuth 2.0 scopes applicable to this method. +@property (retain) NSArray *scopes; // of NSString + +// Whether this method supports media download. +@property (retain) NSNumber *supportsMediaDownload; // boolValue + +// Whether this method supports media upload. +@property (retain) NSNumber *supportsMediaUpload; // boolValue + +// Whether this method supports patch semantics. +@property (retain) NSNumber *supportsPatch; // boolValue + +// Whether this method supports subscriptions. +@property (retain) NSNumber *supportsSubscription; // boolValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcMethodMediaUpload +// + +@interface GTLDiscoveryRpcMethodMediaUpload : GTLObject + +// MIME Media Ranges for acceptable media uploads to this method. +@property (retain) NSArray *accept; // of NSString + +// Maximum size of a media upload, such as "1MB", "2GB" or "3TB". +@property (copy) NSString *maxSize; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcMethodParameters +// + +@interface GTLDiscoveryRpcMethodParameters : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryJsonSchema. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcMethodReturns +// + +@interface GTLDiscoveryRpcMethodReturns : GTLObject + +// Schema ID for the response schema. +@property (copy) NSString *xRef; + +@end diff --git a/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRpcMethod.m.svn-base b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRpcMethod.m.svn-base new file mode 100644 index 0000000..927711b --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscoveryRpcMethod.m.svn-base @@ -0,0 +1,117 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryRpcMethod.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryRpcMethod (0 custom class methods, 12 custom properties) +// GTLDiscoveryRpcMethodMediaUpload (0 custom class methods, 2 custom properties) +// GTLDiscoveryRpcMethodParameters (0 custom class methods, 0 custom properties) +// GTLDiscoveryRpcMethodReturns (0 custom class methods, 1 custom properties) + +#import "GTLDiscoveryRpcMethod.h" + +#import "GTLDiscoveryJsonSchema.h" + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcMethod +// + +@implementation GTLDiscoveryRpcMethod +@dynamic allowGet, descriptionProperty, identifier, mediaUpload, parameterOrder, + parameters, returns, scopes, supportsMediaDownload, + supportsMediaUpload, supportsPatch, supportsSubscription; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"parameterOrder", + [NSString class], @"scopes", + nil]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcMethodMediaUpload +// + +@implementation GTLDiscoveryRpcMethodMediaUpload +@dynamic accept, maxSize; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"accept"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcMethodParameters +// + +@implementation GTLDiscoveryRpcMethodParameters + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryJsonSchema class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcMethodReturns +// + +@implementation GTLDiscoveryRpcMethodReturns +@dynamic xRef; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"$ref" + forKey:@"xRef"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscovery_Sources.m.svn-base b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscovery_Sources.m.svn-base new file mode 100644 index 0000000..c65d64b --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLDiscovery_Sources.m.svn-base @@ -0,0 +1,44 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscovery_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ + +#import "GTLDiscoveryConstants.m" + +#import "GTLDiscoveryDirectoryList.m" +#import "GTLDiscoveryJsonSchema.m" +#import "GTLDiscoveryRestDescription.m" +#import "GTLDiscoveryRestMethod.m" +#import "GTLDiscoveryRestResource.m" +#import "GTLDiscoveryRpcDescription.m" +#import "GTLDiscoveryRpcMethod.m" + +#import "GTLQueryDiscovery.m" +#import "GTLServiceDiscovery.m" diff --git a/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLQueryDiscovery.h.svn-base b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLQueryDiscovery.h.svn-base new file mode 100644 index 0000000..3fc1770 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLQueryDiscovery.h.svn-base @@ -0,0 +1,92 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryDiscovery.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLQueryDiscovery (3 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@interface GTLQueryDiscovery : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *api; +@property (copy) NSString *label; +@property (copy) NSString *name; +@property (assign) BOOL preferred; +@property (copy) NSString *version; + +#pragma mark - +#pragma mark "apis" methods +// These create a GTLQueryDiscovery object. + +// Method: discovery.apis.getRest +// Retrieve the description of a particular version of an api. +// Required: +// api: The name of the API. +// version: The version of the API. +// Fetches a GTLDiscoveryRestDescription. ++ (id)queryForApisGetRestWithApi:(NSString *)api + version:(NSString *)version; + +// Method: discovery.apis.getRpc +// Retrieve the description of a particular version of an api. +// Required: +// api: The name of the API. +// version: The version of the API. +// Fetches a GTLDiscoveryRpcDescription. ++ (id)queryForApisGetRpcWithApi:(NSString *)api + version:(NSString *)version; + +// Method: discovery.apis.list +// Retrieve the list of APIs supported at this endpoint. +// Optional: +// label: Only include APIs with a matching label, such as 'graduated' or +// 'labs'. +// kGTLDiscoveryLabelDeprecated: APIs that have been deprecated. +// kGTLDiscoveryLabelGraduated: Supported APIs that have graduated from +// labs. +// kGTLDiscoveryLabelLabs: APIs that are experimental +// name: Only include APIs with the given name. +// preferred: Return only the preferred version of an API. (Default false) +// Fetches a GTLDiscoveryDirectoryList. ++ (id)queryForApisList; + +@end diff --git a/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLQueryDiscovery.m.svn-base b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLQueryDiscovery.m.svn-base new file mode 100644 index 0000000..b79b4df --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLQueryDiscovery.m.svn-base @@ -0,0 +1,73 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryDiscovery.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLQueryDiscovery (3 custom class methods, 6 custom properties) + +#import "GTLQueryDiscovery.h" + +#import "GTLDiscoveryDirectoryList.h" +#import "GTLDiscoveryRestDescription.h" +#import "GTLDiscoveryRpcDescription.h" + +@implementation GTLQueryDiscovery + +@dynamic api, fields, label, name, preferred, version; + +#pragma mark - +#pragma mark "apis" methods +// These create a GTLQueryDiscovery object. + ++ (id)queryForApisGetRestWithApi:(NSString *)api + version:(NSString *)version { + NSString *methodName = @"discovery.apis.getRest"; + GTLQueryDiscovery *query = [self queryWithMethodName:methodName]; + query.api = api; + query.version = version; + query.expectedObjectClass = [GTLDiscoveryRestDescription class]; + return query; +} + ++ (id)queryForApisGetRpcWithApi:(NSString *)api + version:(NSString *)version { + NSString *methodName = @"discovery.apis.getRpc"; + GTLQueryDiscovery *query = [self queryWithMethodName:methodName]; + query.api = api; + query.version = version; + query.expectedObjectClass = [GTLDiscoveryRpcDescription class]; + return query; +} + ++ (id)queryForApisList { + NSString *methodName = @"discovery.apis.list"; + GTLQueryDiscovery *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLDiscoveryDirectoryList class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLServiceDiscovery.h.svn-base b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLServiceDiscovery.h.svn-base new file mode 100644 index 0000000..bd3201a --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLServiceDiscovery.h.svn-base @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceDiscovery.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLServiceDiscovery (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceDiscovery : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryDiscovery.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLServiceDiscovery.m.svn-base b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLServiceDiscovery.m.svn-base new file mode 100644 index 0000000..0ef78a0 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/.svn/text-base/GTLServiceDiscovery.m.svn-base @@ -0,0 +1,68 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceDiscovery.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLServiceDiscovery (0 custom class methods, 0 custom properties) + +#import "GTLDiscovery.h" + +@implementation GTLServiceDiscovery + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryDiscovery class], + [GTLDiscoveryDirectoryList class], + [GTLDiscoveryJsonSchema class], + [GTLDiscoveryRestDescription class], + [GTLDiscoveryRestMethod class], + [GTLDiscoveryRestResource class], + [GTLDiscoveryRpcDescription class], + [GTLDiscoveryRpcMethod class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v1"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Discovery/Generated/GTLDiscovery.h b/GTL/Source/Services/Discovery/Generated/GTLDiscovery.h new file mode 100644 index 0000000..33e95ef --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/GTLDiscovery.h @@ -0,0 +1,41 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscovery.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ + +#import "GTLDiscoveryConstants.h" + +#import "GTLDiscoveryDirectoryList.h" +#import "GTLDiscoveryJsonSchema.h" +#import "GTLDiscoveryRestDescription.h" +#import "GTLDiscoveryRestMethod.h" +#import "GTLDiscoveryRestResource.h" +#import "GTLDiscoveryRpcDescription.h" +#import "GTLDiscoveryRpcMethod.h" + +#import "GTLQueryDiscovery.h" +#import "GTLServiceDiscovery.h" diff --git a/GTL/Source/Services/Discovery/Generated/GTLDiscoveryConstants.h b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryConstants.h new file mode 100644 index 0000000..203dd9d --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryConstants.h @@ -0,0 +1,41 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Label +GTL_EXTERN NSString * const kGTLDiscoveryLabelDeprecated; // "deprecated" +GTL_EXTERN NSString * const kGTLDiscoveryLabelGraduated; // "graduated" +GTL_EXTERN NSString * const kGTLDiscoveryLabelLabs; // "labs" diff --git a/GTL/Source/Services/Discovery/Generated/GTLDiscoveryConstants.m b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryConstants.m new file mode 100644 index 0000000..8a766b6 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryConstants.m @@ -0,0 +1,35 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ + +#import "GTLDiscoveryConstants.h" + +// Label +NSString * const kGTLDiscoveryLabelDeprecated = @"deprecated"; +NSString * const kGTLDiscoveryLabelGraduated = @"graduated"; +NSString * const kGTLDiscoveryLabelLabs = @"labs"; diff --git a/GTL/Source/Services/Discovery/Generated/GTLDiscoveryDirectoryList.h b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryDirectoryList.h new file mode 100644 index 0000000..18e3bf7 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryDirectoryList.h @@ -0,0 +1,126 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryDirectoryList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryDirectoryList (0 custom class methods, 3 custom properties) +// GTLDiscoveryDirectoryListItemsItem (0 custom class methods, 12 custom properties) +// GTLDiscoveryDirectoryListItemsItemIcons (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDiscoveryDirectoryListItemsItem; +@class GTLDiscoveryDirectoryListItemsItemIcons; + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryDirectoryList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLDiscoveryDirectoryList : GTLCollectionObject + +// Indicate the version of the Discovery API used to generate this doc. +@property (copy) NSString *discoveryVersion; + +// The individual directory entries. One entry per api/version pair. +@property (retain) NSArray *items; // of GTLDiscoveryDirectoryListItemsItem + +// The kind for this response. +@property (copy) NSString *kind; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryDirectoryListItemsItem +// + +@interface GTLDiscoveryDirectoryListItemsItem : GTLObject + +// The description of this API. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// A link to the discovery document. +@property (copy) NSString *discoveryLink; + +// The url for the discovery REST document. +@property (copy) NSString *discoveryRestUrl; + +// A link to human readable documentation for the API. +@property (copy) NSString *documentationLink; + +// Links to 16x16 and 32x32 icons representing the API. +@property (retain) GTLDiscoveryDirectoryListItemsItemIcons *icons; + +// The id of this API. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The kind for this response. +@property (copy) NSString *kind; + +// Labels for the status of this API, such as labs or deprecated. +@property (retain) NSArray *labels; // of NSString + +// The name of the API. +@property (copy) NSString *name; + +// True if this version is the preferred version to use. +@property (retain) NSNumber *preferred; // boolValue + +// The title of this API. +@property (copy) NSString *title; + +// The version of the API. +@property (copy) NSString *version; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryDirectoryListItemsItemIcons +// + +@interface GTLDiscoveryDirectoryListItemsItemIcons : GTLObject + +// The url of the 16x16 icon. +@property (copy) NSString *x16; + +// The url of the 32x32 icon. +@property (copy) NSString *x32; + +@end diff --git a/GTL/Source/Services/Discovery/Generated/GTLDiscoveryDirectoryList.m b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryDirectoryList.m new file mode 100644 index 0000000..3ba0dc4 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryDirectoryList.m @@ -0,0 +1,98 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryDirectoryList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryDirectoryList (0 custom class methods, 3 custom properties) +// GTLDiscoveryDirectoryListItemsItem (0 custom class methods, 12 custom properties) +// GTLDiscoveryDirectoryListItemsItemIcons (0 custom class methods, 2 custom properties) + +#import "GTLDiscoveryDirectoryList.h" + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryDirectoryList +// + +@implementation GTLDiscoveryDirectoryList +@dynamic discoveryVersion, items, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLDiscoveryDirectoryListItemsItem class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"discovery#directoryList"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryDirectoryListItemsItem +// + +@implementation GTLDiscoveryDirectoryListItemsItem +@dynamic descriptionProperty, discoveryLink, discoveryRestUrl, + documentationLink, icons, identifier, kind, labels, name, preferred, + title, version; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"labels"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"discovery#directoryItem"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryDirectoryListItemsItemIcons +// + +@implementation GTLDiscoveryDirectoryListItemsItemIcons +@dynamic x16, x32; +@end diff --git a/GTL/Source/Services/Discovery/Generated/GTLDiscoveryJsonSchema.h b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryJsonSchema.h new file mode 100644 index 0000000..b1b4706 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryJsonSchema.h @@ -0,0 +1,151 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryJsonSchema.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryJsonSchema (0 custom class methods, 19 custom properties) +// GTLDiscoveryJsonSchemaAnnotations (0 custom class methods, 1 custom properties) +// GTLDiscoveryJsonSchemaProperties (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDiscoveryJsonSchema; +@class GTLDiscoveryJsonSchemaAnnotations; +@class GTLDiscoveryJsonSchemaProperties; + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryJsonSchema +// + +@interface GTLDiscoveryJsonSchema : GTLObject + +// A reference to another schema. The value of this property is the "id" of +// another schema. +@property (copy) NSString *xRef; + +// If this is a schema for an object, this property is the schema for any +// additional properties with dynamic keys on this object. +// Remapped to 'additionalPropertiesProperty' to avoid GTLObject's +// 'additionalProperties'. +@property (retain) GTLDiscoveryJsonSchema *additionalPropertiesProperty; + +// Additional information about this property. +@property (retain) GTLDiscoveryJsonSchemaAnnotations *annotations; + +// The default value of this property (if one exists). +// Remapped to 'defaultProperty' to avoid language reserved word 'default'. +@property (copy) NSString *defaultProperty; + +// A description of this object. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Values this parameter may take (if it is an enum). +// Remapped to 'enumProperty' to avoid language reserved word 'enum'. +@property (retain) NSArray *enumProperty; // of NSString + +// The descriptions for the enums. Each position maps to the corresponding value +// in the "enum" array. +@property (retain) NSArray *enumDescriptions; // of NSString + +// An additional regular expression or key that helps constrain the value. For +// more details see: +// http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.23 +@property (copy) NSString *format; + +// Unique identifier for this schema. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// If this is a schema for an array, this property is the schema for each +// element in the array. +@property (retain) GTLDiscoveryJsonSchema *items; + +// Whether this parameter goes in the query or the path for REST requests. +@property (copy) NSString *location; + +// The maximum value of this parameter. +@property (copy) NSString *maximum; + +// The minimum value of this parameter. +@property (copy) NSString *minimum; + +// The regular expression this parameter must conform to. Uses Java 6 regex +// format: http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html +@property (copy) NSString *pattern; + +// If this is a schema for an object, list the schema for each property of this +// object. +@property (retain) GTLDiscoveryJsonSchemaProperties *properties; + +// The value is read-only, generated by the service. The value can not be +// modified by the client. It the value is included in a POST, PUT or PATCH +// request, it will be ignored by the service. +@property (retain) NSNumber *readOnly; // boolValue + +// Whether this parameter may appear multiple times. +@property (retain) NSNumber *repeated; // boolValue + +// Whether the parameter is required. +@property (retain) NSNumber *required; // boolValue + +// The value type for this schema. A list of values can be found here: +// http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1 +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryJsonSchemaAnnotations +// + +@interface GTLDiscoveryJsonSchemaAnnotations : GTLObject + +// A list of methods for which this property is required on requests. +@property (retain) NSArray *required; // of NSString + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryJsonSchemaProperties +// + +@interface GTLDiscoveryJsonSchemaProperties : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryJsonSchema. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end diff --git a/GTL/Source/Services/Discovery/Generated/GTLDiscoveryJsonSchema.m b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryJsonSchema.m new file mode 100644 index 0000000..c9e515a --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryJsonSchema.m @@ -0,0 +1,101 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryJsonSchema.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryJsonSchema (0 custom class methods, 19 custom properties) +// GTLDiscoveryJsonSchemaAnnotations (0 custom class methods, 1 custom properties) +// GTLDiscoveryJsonSchemaProperties (0 custom class methods, 0 custom properties) + +#import "GTLDiscoveryJsonSchema.h" + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryJsonSchema +// + +@implementation GTLDiscoveryJsonSchema +@dynamic xRef, additionalPropertiesProperty, annotations, defaultProperty, + descriptionProperty, enumProperty, enumDescriptions, format, + identifier, items, location, maximum, minimum, pattern, properties, + readOnly, repeated, required, type; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"additionalProperties", @"additionalPropertiesProperty", + @"default", @"defaultProperty", + @"description", @"descriptionProperty", + @"enum", @"enumProperty", + @"id", @"identifier", + @"$ref", @"xRef", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"enum", + [NSString class], @"enumDescriptions", + nil]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryJsonSchemaAnnotations +// + +@implementation GTLDiscoveryJsonSchemaAnnotations +@dynamic required; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"required"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryJsonSchemaProperties +// + +@implementation GTLDiscoveryJsonSchemaProperties + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryJsonSchema class]; +} + +@end diff --git a/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRestDescription.h b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRestDescription.h new file mode 100644 index 0000000..9323f12 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRestDescription.h @@ -0,0 +1,266 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryRestDescription.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryRestDescription (0 custom class methods, 25 custom properties) +// GTLDiscoveryRestDescriptionAuth (0 custom class methods, 1 custom properties) +// GTLDiscoveryRestDescriptionIcons (0 custom class methods, 2 custom properties) +// GTLDiscoveryRestDescriptionMethods (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestDescriptionParameters (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestDescriptionResources (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestDescriptionSchemas (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestDescriptionAuthOauth2 (0 custom class methods, 1 custom properties) +// GTLDiscoveryRestDescriptionAuthOauth2Scopes (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestDescriptionAuthOauth2ScopesScope (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDiscoveryJsonSchema; +@class GTLDiscoveryRestDescriptionAuth; +@class GTLDiscoveryRestDescriptionAuthOauth2; +@class GTLDiscoveryRestDescriptionAuthOauth2Scopes; +@class GTLDiscoveryRestDescriptionAuthOauth2ScopesScope; +@class GTLDiscoveryRestDescriptionIcons; +@class GTLDiscoveryRestDescriptionMethods; +@class GTLDiscoveryRestDescriptionParameters; +@class GTLDiscoveryRestDescriptionResources; +@class GTLDiscoveryRestDescriptionSchemas; +@class GTLDiscoveryRestMethod; +@class GTLDiscoveryRestResource; + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescription +// + +@interface GTLDiscoveryRestDescription : GTLObject + +// Authentication information. +@property (retain) GTLDiscoveryRestDescriptionAuth *auth; + +// [DEPRECATED] The base path for REST requests. +@property (copy) NSString *basePath; + +// [DEPRECATED] The base URL for REST requests. +@property (copy) NSString *baseUrl; + +// The path for REST batch requests. +@property (copy) NSString *batchPath; + +// Indicates how the API name should be capitalized and split into various +// parts. Useful for generating pretty class names. +@property (copy) NSString *canonicalName; + +// The description of this API. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Indicate the version of the Discovery API used to generate this doc. +@property (copy) NSString *discoveryVersion; + +// A link to human readable documentation for the API. +@property (copy) NSString *documentationLink; + +// The etag for this response. +@property (copy) NSString *ETag; + +// A list of supported features for this API. +@property (retain) NSArray *features; // of NSString + +// Links to 16x16 and 32x32 icons representing the API. +@property (retain) GTLDiscoveryRestDescriptionIcons *icons; + +// The id of this API. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The kind for this response. +@property (copy) NSString *kind; + +// Labels for the status of this API, such as labs or deprecated. +@property (retain) NSArray *labels; // of NSString + +// API-level methods for this API. +@property (retain) GTLDiscoveryRestDescriptionMethods *methods; + +// The name of this API. +@property (copy) NSString *name; + +// Common parameters that apply across all apis. +@property (retain) GTLDiscoveryRestDescriptionParameters *parameters; + +// The protocol described by this document. +@property (copy) NSString *protocol; + +// The resources in this API. +@property (retain) GTLDiscoveryRestDescriptionResources *resources; + +// The version of this API. +@property (copy) NSString *revision; + +// The root url under which all API services live. +@property (copy) NSString *rootUrl; + +// The schemas for this API. +@property (retain) GTLDiscoveryRestDescriptionSchemas *schemas; + +// The base path for all REST requests. +@property (copy) NSString *servicePath; + +// The title of this API. +@property (copy) NSString *title; + +// The version of this API. +@property (copy) NSString *version; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionAuth +// + +@interface GTLDiscoveryRestDescriptionAuth : GTLObject + +// OAuth 2.0 authentication information. +@property (retain) GTLDiscoveryRestDescriptionAuthOauth2 *oauth2; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionIcons +// + +@interface GTLDiscoveryRestDescriptionIcons : GTLObject + +// The url of the 16x16 icon. +@property (copy) NSString *x16; + +// The url of the 32x32 icon. +@property (copy) NSString *x32; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionMethods +// + +@interface GTLDiscoveryRestDescriptionMethods : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryRestMethod. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionParameters +// + +@interface GTLDiscoveryRestDescriptionParameters : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryJsonSchema. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionResources +// + +@interface GTLDiscoveryRestDescriptionResources : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryRestResource. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionSchemas +// + +@interface GTLDiscoveryRestDescriptionSchemas : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryJsonSchema. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionAuthOauth2 +// + +@interface GTLDiscoveryRestDescriptionAuthOauth2 : GTLObject + +// Available OAuth 2.0 scopes. +@property (retain) GTLDiscoveryRestDescriptionAuthOauth2Scopes *scopes; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionAuthOauth2Scopes +// + +@interface GTLDiscoveryRestDescriptionAuthOauth2Scopes : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryRestDescriptionAuthOauth2ScopesScope. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionAuthOauth2ScopesScope +// + +@interface GTLDiscoveryRestDescriptionAuthOauth2ScopesScope : GTLObject + +// Description of scope. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +@end diff --git a/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRestDescription.m b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRestDescription.m new file mode 100644 index 0000000..bdad075 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRestDescription.m @@ -0,0 +1,199 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryRestDescription.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryRestDescription (0 custom class methods, 25 custom properties) +// GTLDiscoveryRestDescriptionAuth (0 custom class methods, 1 custom properties) +// GTLDiscoveryRestDescriptionIcons (0 custom class methods, 2 custom properties) +// GTLDiscoveryRestDescriptionMethods (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestDescriptionParameters (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestDescriptionResources (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestDescriptionSchemas (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestDescriptionAuthOauth2 (0 custom class methods, 1 custom properties) +// GTLDiscoveryRestDescriptionAuthOauth2Scopes (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestDescriptionAuthOauth2ScopesScope (0 custom class methods, 1 custom properties) + +#import "GTLDiscoveryRestDescription.h" + +#import "GTLDiscoveryJsonSchema.h" +#import "GTLDiscoveryRestMethod.h" +#import "GTLDiscoveryRestResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescription +// + +@implementation GTLDiscoveryRestDescription +@dynamic auth, basePath, baseUrl, batchPath, canonicalName, descriptionProperty, + discoveryVersion, documentationLink, ETag, features, icons, identifier, + kind, labels, methods, name, parameters, protocol, resources, revision, + rootUrl, schemas, servicePath, title, version; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"features", + [NSString class], @"labels", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"discovery#restDescription"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionAuth +// + +@implementation GTLDiscoveryRestDescriptionAuth +@dynamic oauth2; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionIcons +// + +@implementation GTLDiscoveryRestDescriptionIcons +@dynamic x16, x32; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionMethods +// + +@implementation GTLDiscoveryRestDescriptionMethods + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryRestMethod class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionParameters +// + +@implementation GTLDiscoveryRestDescriptionParameters + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryJsonSchema class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionResources +// + +@implementation GTLDiscoveryRestDescriptionResources + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryRestResource class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionSchemas +// + +@implementation GTLDiscoveryRestDescriptionSchemas + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryJsonSchema class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionAuthOauth2 +// + +@implementation GTLDiscoveryRestDescriptionAuthOauth2 +@dynamic scopes; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionAuthOauth2Scopes +// + +@implementation GTLDiscoveryRestDescriptionAuthOauth2Scopes + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryRestDescriptionAuthOauth2ScopesScope class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestDescriptionAuthOauth2ScopesScope +// + +@implementation GTLDiscoveryRestDescriptionAuthOauth2ScopesScope +@dynamic descriptionProperty; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRestMethod.h b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRestMethod.h new file mode 100644 index 0000000..3910122 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRestMethod.h @@ -0,0 +1,214 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryRestMethod.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryRestMethod (0 custom class methods, 13 custom properties) +// GTLDiscoveryRestMethodMediaUpload (0 custom class methods, 3 custom properties) +// GTLDiscoveryRestMethodParameters (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestMethodRequest (0 custom class methods, 1 custom properties) +// GTLDiscoveryRestMethodResponse (0 custom class methods, 1 custom properties) +// GTLDiscoveryRestMethodMediaUploadProtocols (0 custom class methods, 2 custom properties) +// GTLDiscoveryRestMethodMediaUploadProtocolsResumable (0 custom class methods, 2 custom properties) +// GTLDiscoveryRestMethodMediaUploadProtocolsSimple (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDiscoveryJsonSchema; +@class GTLDiscoveryRestMethodMediaUpload; +@class GTLDiscoveryRestMethodMediaUploadProtocols; +@class GTLDiscoveryRestMethodMediaUploadProtocolsResumable; +@class GTLDiscoveryRestMethodMediaUploadProtocolsSimple; +@class GTLDiscoveryRestMethodParameters; +@class GTLDiscoveryRestMethodRequest; +@class GTLDiscoveryRestMethodResponse; + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethod +// + +@interface GTLDiscoveryRestMethod : GTLObject + +// Description of this method. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// HTTP method used by this method. +@property (copy) NSString *httpMethod; + +// A unique ID for this method. This property can be used to match methods +// between different versions of Discovery. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Media upload parameters. +@property (retain) GTLDiscoveryRestMethodMediaUpload *mediaUpload; + +// Ordered list of required parameters, serves as a hint to clients on how to +// structure their method signatures. The array is ordered such that the +// "most-significant" parameter appears first. +@property (retain) NSArray *parameterOrder; // of NSString + +// Details for all parameters in this method. +@property (retain) GTLDiscoveryRestMethodParameters *parameters; + +// The URI path of this REST method. Should be used in conjunction with the +// basePath property at the api-level. +@property (copy) NSString *path; + +// The schema for the request. +@property (retain) GTLDiscoveryRestMethodRequest *request; + +// The schema for the response. +@property (retain) GTLDiscoveryRestMethodResponse *response; + +// OAuth 2.0 scopes applicable to this method. +@property (retain) NSArray *scopes; // of NSString + +// Whether this method supports media downloads. +@property (retain) NSNumber *supportsMediaDownload; // boolValue + +// Whether this method supports media uploads. +@property (retain) NSNumber *supportsMediaUpload; // boolValue + +// Whether this method supports subscriptions. +@property (retain) NSNumber *supportsSubscription; // boolValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodMediaUpload +// + +@interface GTLDiscoveryRestMethodMediaUpload : GTLObject + +// MIME Media Ranges for acceptable media uploads to this method. +@property (retain) NSArray *accept; // of NSString + +// Maximum size of a media upload, such as "1MB", "2GB" or "3TB". +@property (copy) NSString *maxSize; + +// Supported upload protocols. +@property (retain) GTLDiscoveryRestMethodMediaUploadProtocols *protocols; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodParameters +// + +@interface GTLDiscoveryRestMethodParameters : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryJsonSchema. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodRequest +// + +@interface GTLDiscoveryRestMethodRequest : GTLObject + +// Schema ID for the request schema. +@property (copy) NSString *xRef; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodResponse +// + +@interface GTLDiscoveryRestMethodResponse : GTLObject + +// Schema ID for the response schema. +@property (copy) NSString *xRef; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodMediaUploadProtocols +// + +@interface GTLDiscoveryRestMethodMediaUploadProtocols : GTLObject + +// Supports the Resumable Media Upload protocol. +@property (retain) GTLDiscoveryRestMethodMediaUploadProtocolsResumable *resumable; + +// Supports uploading as a single HTTP request. +@property (retain) GTLDiscoveryRestMethodMediaUploadProtocolsSimple *simple; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodMediaUploadProtocolsResumable +// + +@interface GTLDiscoveryRestMethodMediaUploadProtocolsResumable : GTLObject + +// True if this endpoint supports uploading multipart media. +@property (retain) NSNumber *multipart; // boolValue + +// The URI path to be used for upload. Should be used in conjunction with the +// basePath property at the api-level. +@property (copy) NSString *path; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodMediaUploadProtocolsSimple +// + +@interface GTLDiscoveryRestMethodMediaUploadProtocolsSimple : GTLObject + +// True if this endpoint supports upload multipart media. +@property (retain) NSNumber *multipart; // boolValue + +// The URI path to be used for upload. Should be used in conjunction with the +// basePath property at the api-level. +@property (copy) NSString *path; + +@end diff --git a/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRestMethod.m b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRestMethod.m new file mode 100644 index 0000000..81a3d23 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRestMethod.m @@ -0,0 +1,169 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryRestMethod.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryRestMethod (0 custom class methods, 13 custom properties) +// GTLDiscoveryRestMethodMediaUpload (0 custom class methods, 3 custom properties) +// GTLDiscoveryRestMethodParameters (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestMethodRequest (0 custom class methods, 1 custom properties) +// GTLDiscoveryRestMethodResponse (0 custom class methods, 1 custom properties) +// GTLDiscoveryRestMethodMediaUploadProtocols (0 custom class methods, 2 custom properties) +// GTLDiscoveryRestMethodMediaUploadProtocolsResumable (0 custom class methods, 2 custom properties) +// GTLDiscoveryRestMethodMediaUploadProtocolsSimple (0 custom class methods, 2 custom properties) + +#import "GTLDiscoveryRestMethod.h" + +#import "GTLDiscoveryJsonSchema.h" + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethod +// + +@implementation GTLDiscoveryRestMethod +@dynamic descriptionProperty, httpMethod, identifier, mediaUpload, + parameterOrder, parameters, path, request, response, scopes, + supportsMediaDownload, supportsMediaUpload, supportsSubscription; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"parameterOrder", + [NSString class], @"scopes", + nil]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodMediaUpload +// + +@implementation GTLDiscoveryRestMethodMediaUpload +@dynamic accept, maxSize, protocols; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"accept"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodParameters +// + +@implementation GTLDiscoveryRestMethodParameters + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryJsonSchema class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodRequest +// + +@implementation GTLDiscoveryRestMethodRequest +@dynamic xRef; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"$ref" + forKey:@"xRef"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodResponse +// + +@implementation GTLDiscoveryRestMethodResponse +@dynamic xRef; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"$ref" + forKey:@"xRef"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodMediaUploadProtocols +// + +@implementation GTLDiscoveryRestMethodMediaUploadProtocols +@dynamic resumable, simple; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodMediaUploadProtocolsResumable +// + +@implementation GTLDiscoveryRestMethodMediaUploadProtocolsResumable +@dynamic multipart, path; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestMethodMediaUploadProtocolsSimple +// + +@implementation GTLDiscoveryRestMethodMediaUploadProtocolsSimple +@dynamic multipart, path; +@end diff --git a/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRestResource.h b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRestResource.h new file mode 100644 index 0000000..50d8593 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRestResource.h @@ -0,0 +1,84 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryRestResource.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryRestResource (0 custom class methods, 2 custom properties) +// GTLDiscoveryRestResourceMethods (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestResourceResources (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDiscoveryRestMethod; +@class GTLDiscoveryRestResource; +@class GTLDiscoveryRestResourceMethods; +@class GTLDiscoveryRestResourceResources; + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestResource +// + +@interface GTLDiscoveryRestResource : GTLObject + +// Methods on this resource. +@property (retain) GTLDiscoveryRestResourceMethods *methods; + +// Sub-resources on this resource. +@property (retain) GTLDiscoveryRestResourceResources *resources; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestResourceMethods +// + +@interface GTLDiscoveryRestResourceMethods : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryRestMethod. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestResourceResources +// + +@interface GTLDiscoveryRestResourceResources : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryRestResource. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end diff --git a/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRestResource.m b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRestResource.m new file mode 100644 index 0000000..09c86a5 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRestResource.m @@ -0,0 +1,73 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryRestResource.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryRestResource (0 custom class methods, 2 custom properties) +// GTLDiscoveryRestResourceMethods (0 custom class methods, 0 custom properties) +// GTLDiscoveryRestResourceResources (0 custom class methods, 0 custom properties) + +#import "GTLDiscoveryRestResource.h" + +#import "GTLDiscoveryRestMethod.h" + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestResource +// + +@implementation GTLDiscoveryRestResource +@dynamic methods, resources; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestResourceMethods +// + +@implementation GTLDiscoveryRestResourceMethods + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryRestMethod class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRestResourceResources +// + +@implementation GTLDiscoveryRestResourceResources + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryRestResource class]; +} + +@end diff --git a/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRpcDescription.h b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRpcDescription.h new file mode 100644 index 0000000..c3020be --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRpcDescription.h @@ -0,0 +1,241 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryRpcDescription.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryRpcDescription (0 custom class methods, 22 custom properties) +// GTLDiscoveryRpcDescriptionAuth (0 custom class methods, 1 custom properties) +// GTLDiscoveryRpcDescriptionIcons (0 custom class methods, 2 custom properties) +// GTLDiscoveryRpcDescriptionMethods (0 custom class methods, 0 custom properties) +// GTLDiscoveryRpcDescriptionParameters (0 custom class methods, 0 custom properties) +// GTLDiscoveryRpcDescriptionSchemas (0 custom class methods, 0 custom properties) +// GTLDiscoveryRpcDescriptionAuthOauth2 (0 custom class methods, 1 custom properties) +// GTLDiscoveryRpcDescriptionAuthOauth2Scopes (0 custom class methods, 0 custom properties) +// GTLDiscoveryRpcDescriptionAuthOauth2ScopesScope (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDiscoveryJsonSchema; +@class GTLDiscoveryRpcDescriptionAuth; +@class GTLDiscoveryRpcDescriptionAuthOauth2; +@class GTLDiscoveryRpcDescriptionAuthOauth2Scopes; +@class GTLDiscoveryRpcDescriptionAuthOauth2ScopesScope; +@class GTLDiscoveryRpcDescriptionIcons; +@class GTLDiscoveryRpcDescriptionMethods; +@class GTLDiscoveryRpcDescriptionParameters; +@class GTLDiscoveryRpcDescriptionSchemas; +@class GTLDiscoveryRpcMethod; + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescription +// + +@interface GTLDiscoveryRpcDescription : GTLObject + +// Authentication information. +@property (retain) GTLDiscoveryRpcDescriptionAuth *auth; + +// Indicates how the API name should be capitalized and split into various +// parts. Useful for generating pretty class names. +@property (copy) NSString *canonicalName; + +// The description of this API. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Indicate the version of the Discovery API used to generate this doc. +@property (copy) NSString *discoveryVersion; + +// A link to human readable documentation for the API. +@property (copy) NSString *documentationLink; + +// The etag for this response. +@property (copy) NSString *ETag; + +// A list of supported features for this API. +@property (retain) NSArray *features; // of NSString + +// Links to 16x16 and 32x32 icons representing the API. +@property (retain) GTLDiscoveryRpcDescriptionIcons *icons; + +// The id of this API. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The kind for this response. +@property (copy) NSString *kind; + +// Labels for the status of this API, such as labs or deprecated. +@property (retain) NSArray *labels; // of NSString + +// API-level methods for this API. +@property (retain) GTLDiscoveryRpcDescriptionMethods *methods; + +// The name of this API. +@property (copy) NSString *name; + +// Common parameters that apply across all apis. +@property (retain) GTLDiscoveryRpcDescriptionParameters *parameters; + +// The protocol described by this document. +@property (copy) NSString *protocol; + +// The version of this API. +@property (copy) NSString *revision; + +// The root url under which all API services live. +@property (copy) NSString *rootUrl; + +// The path for JSON-RPC requests. +@property (copy) NSString *rpcPath; + +// [DEPRECATED] The url for JSON-RPC requests. +@property (copy) NSString *rpcUrl; + +// The schemas for this API. +@property (retain) GTLDiscoveryRpcDescriptionSchemas *schemas; + +// The title of this API. +@property (copy) NSString *title; + +// The version of this API. +@property (copy) NSString *version; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionAuth +// + +@interface GTLDiscoveryRpcDescriptionAuth : GTLObject + +// OAuth 2.0 authentication information. +@property (retain) GTLDiscoveryRpcDescriptionAuthOauth2 *oauth2; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionIcons +// + +@interface GTLDiscoveryRpcDescriptionIcons : GTLObject + +// The url of the 16x16 icon. +@property (copy) NSString *x16; + +// The url of the 32x32 icon. +@property (copy) NSString *x32; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionMethods +// + +@interface GTLDiscoveryRpcDescriptionMethods : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryRpcMethod. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionParameters +// + +@interface GTLDiscoveryRpcDescriptionParameters : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryJsonSchema. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionSchemas +// + +@interface GTLDiscoveryRpcDescriptionSchemas : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryJsonSchema. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionAuthOauth2 +// + +@interface GTLDiscoveryRpcDescriptionAuthOauth2 : GTLObject + +// Available OAuth 2.0 scopes. +@property (retain) GTLDiscoveryRpcDescriptionAuthOauth2Scopes *scopes; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionAuthOauth2Scopes +// + +@interface GTLDiscoveryRpcDescriptionAuthOauth2Scopes : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryRpcDescriptionAuthOauth2ScopesScope. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionAuthOauth2ScopesScope +// + +@interface GTLDiscoveryRpcDescriptionAuthOauth2ScopesScope : GTLObject + +// Description of scope. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +@end diff --git a/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRpcDescription.m b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRpcDescription.m new file mode 100644 index 0000000..89ea068 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRpcDescription.m @@ -0,0 +1,183 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryRpcDescription.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryRpcDescription (0 custom class methods, 22 custom properties) +// GTLDiscoveryRpcDescriptionAuth (0 custom class methods, 1 custom properties) +// GTLDiscoveryRpcDescriptionIcons (0 custom class methods, 2 custom properties) +// GTLDiscoveryRpcDescriptionMethods (0 custom class methods, 0 custom properties) +// GTLDiscoveryRpcDescriptionParameters (0 custom class methods, 0 custom properties) +// GTLDiscoveryRpcDescriptionSchemas (0 custom class methods, 0 custom properties) +// GTLDiscoveryRpcDescriptionAuthOauth2 (0 custom class methods, 1 custom properties) +// GTLDiscoveryRpcDescriptionAuthOauth2Scopes (0 custom class methods, 0 custom properties) +// GTLDiscoveryRpcDescriptionAuthOauth2ScopesScope (0 custom class methods, 1 custom properties) + +#import "GTLDiscoveryRpcDescription.h" + +#import "GTLDiscoveryJsonSchema.h" +#import "GTLDiscoveryRpcMethod.h" + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescription +// + +@implementation GTLDiscoveryRpcDescription +@dynamic auth, canonicalName, descriptionProperty, discoveryVersion, + documentationLink, ETag, features, icons, identifier, kind, labels, + methods, name, parameters, protocol, revision, rootUrl, rpcPath, + rpcUrl, schemas, title, version; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"features", + [NSString class], @"labels", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"discovery#rpcDescription"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionAuth +// + +@implementation GTLDiscoveryRpcDescriptionAuth +@dynamic oauth2; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionIcons +// + +@implementation GTLDiscoveryRpcDescriptionIcons +@dynamic x16, x32; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionMethods +// + +@implementation GTLDiscoveryRpcDescriptionMethods + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryRpcMethod class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionParameters +// + +@implementation GTLDiscoveryRpcDescriptionParameters + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryJsonSchema class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionSchemas +// + +@implementation GTLDiscoveryRpcDescriptionSchemas + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryJsonSchema class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionAuthOauth2 +// + +@implementation GTLDiscoveryRpcDescriptionAuthOauth2 +@dynamic scopes; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionAuthOauth2Scopes +// + +@implementation GTLDiscoveryRpcDescriptionAuthOauth2Scopes + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryRpcDescriptionAuthOauth2ScopesScope class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcDescriptionAuthOauth2ScopesScope +// + +@implementation GTLDiscoveryRpcDescriptionAuthOauth2ScopesScope +@dynamic descriptionProperty; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRpcMethod.h b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRpcMethod.h new file mode 100644 index 0000000..bc7fbab --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRpcMethod.h @@ -0,0 +1,136 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryRpcMethod.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryRpcMethod (0 custom class methods, 12 custom properties) +// GTLDiscoveryRpcMethodMediaUpload (0 custom class methods, 2 custom properties) +// GTLDiscoveryRpcMethodParameters (0 custom class methods, 0 custom properties) +// GTLDiscoveryRpcMethodReturns (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDiscoveryJsonSchema; +@class GTLDiscoveryRpcMethodMediaUpload; +@class GTLDiscoveryRpcMethodParameters; +@class GTLDiscoveryRpcMethodReturns; + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcMethod +// + +@interface GTLDiscoveryRpcMethod : GTLObject + +// Whether the method can be made using an HTTP GET JSON-RPC request. +@property (retain) NSNumber *allowGet; // boolValue + +// Description of this method. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// A unique ID for this method. This property can be used to match methods +// between different versions of Discovery. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Media upload parameters. +@property (retain) GTLDiscoveryRpcMethodMediaUpload *mediaUpload; + +// Ordered list of required parameters, serves as a hint to clients on how to +// structure their method signatures. The array is ordered such that the +// "most-significant" parameter appears first. +@property (retain) NSArray *parameterOrder; // of NSString + +// Description for all parameters in this method. +@property (retain) GTLDiscoveryRpcMethodParameters *parameters; + +// The schema for the response. +@property (retain) GTLDiscoveryRpcMethodReturns *returns; + +// OAuth 2.0 scopes applicable to this method. +@property (retain) NSArray *scopes; // of NSString + +// Whether this method supports media download. +@property (retain) NSNumber *supportsMediaDownload; // boolValue + +// Whether this method supports media upload. +@property (retain) NSNumber *supportsMediaUpload; // boolValue + +// Whether this method supports patch semantics. +@property (retain) NSNumber *supportsPatch; // boolValue + +// Whether this method supports subscriptions. +@property (retain) NSNumber *supportsSubscription; // boolValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcMethodMediaUpload +// + +@interface GTLDiscoveryRpcMethodMediaUpload : GTLObject + +// MIME Media Ranges for acceptable media uploads to this method. +@property (retain) NSArray *accept; // of NSString + +// Maximum size of a media upload, such as "1MB", "2GB" or "3TB". +@property (copy) NSString *maxSize; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcMethodParameters +// + +@interface GTLDiscoveryRpcMethodParameters : GTLObject +// This object is documented as having more properties that are +// GTLDiscoveryJsonSchema. Use -additionalJSONKeys and +// -additionalPropertyForName: to get the list of properties and then fetch +// them; or -additionalProperties to fetch them all at once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcMethodReturns +// + +@interface GTLDiscoveryRpcMethodReturns : GTLObject + +// Schema ID for the response schema. +@property (copy) NSString *xRef; + +@end diff --git a/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRpcMethod.m b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRpcMethod.m new file mode 100644 index 0000000..927711b --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/GTLDiscoveryRpcMethod.m @@ -0,0 +1,117 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscoveryRpcMethod.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLDiscoveryRpcMethod (0 custom class methods, 12 custom properties) +// GTLDiscoveryRpcMethodMediaUpload (0 custom class methods, 2 custom properties) +// GTLDiscoveryRpcMethodParameters (0 custom class methods, 0 custom properties) +// GTLDiscoveryRpcMethodReturns (0 custom class methods, 1 custom properties) + +#import "GTLDiscoveryRpcMethod.h" + +#import "GTLDiscoveryJsonSchema.h" + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcMethod +// + +@implementation GTLDiscoveryRpcMethod +@dynamic allowGet, descriptionProperty, identifier, mediaUpload, parameterOrder, + parameters, returns, scopes, supportsMediaDownload, + supportsMediaUpload, supportsPatch, supportsSubscription; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"parameterOrder", + [NSString class], @"scopes", + nil]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcMethodMediaUpload +// + +@implementation GTLDiscoveryRpcMethodMediaUpload +@dynamic accept, maxSize; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"accept"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcMethodParameters +// + +@implementation GTLDiscoveryRpcMethodParameters + ++ (Class)classForAdditionalProperties { + return [GTLDiscoveryJsonSchema class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDiscoveryRpcMethodReturns +// + +@implementation GTLDiscoveryRpcMethodReturns +@dynamic xRef; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"$ref" + forKey:@"xRef"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Discovery/Generated/GTLDiscovery_Sources.m b/GTL/Source/Services/Discovery/Generated/GTLDiscovery_Sources.m new file mode 100644 index 0000000..c65d64b --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/GTLDiscovery_Sources.m @@ -0,0 +1,44 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDiscovery_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ + +#import "GTLDiscoveryConstants.m" + +#import "GTLDiscoveryDirectoryList.m" +#import "GTLDiscoveryJsonSchema.m" +#import "GTLDiscoveryRestDescription.m" +#import "GTLDiscoveryRestMethod.m" +#import "GTLDiscoveryRestResource.m" +#import "GTLDiscoveryRpcDescription.m" +#import "GTLDiscoveryRpcMethod.m" + +#import "GTLQueryDiscovery.m" +#import "GTLServiceDiscovery.m" diff --git a/GTL/Source/Services/Discovery/Generated/GTLQueryDiscovery.h b/GTL/Source/Services/Discovery/Generated/GTLQueryDiscovery.h new file mode 100644 index 0000000..3fc1770 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/GTLQueryDiscovery.h @@ -0,0 +1,92 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryDiscovery.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLQueryDiscovery (3 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@interface GTLQueryDiscovery : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *api; +@property (copy) NSString *label; +@property (copy) NSString *name; +@property (assign) BOOL preferred; +@property (copy) NSString *version; + +#pragma mark - +#pragma mark "apis" methods +// These create a GTLQueryDiscovery object. + +// Method: discovery.apis.getRest +// Retrieve the description of a particular version of an api. +// Required: +// api: The name of the API. +// version: The version of the API. +// Fetches a GTLDiscoveryRestDescription. ++ (id)queryForApisGetRestWithApi:(NSString *)api + version:(NSString *)version; + +// Method: discovery.apis.getRpc +// Retrieve the description of a particular version of an api. +// Required: +// api: The name of the API. +// version: The version of the API. +// Fetches a GTLDiscoveryRpcDescription. ++ (id)queryForApisGetRpcWithApi:(NSString *)api + version:(NSString *)version; + +// Method: discovery.apis.list +// Retrieve the list of APIs supported at this endpoint. +// Optional: +// label: Only include APIs with a matching label, such as 'graduated' or +// 'labs'. +// kGTLDiscoveryLabelDeprecated: APIs that have been deprecated. +// kGTLDiscoveryLabelGraduated: Supported APIs that have graduated from +// labs. +// kGTLDiscoveryLabelLabs: APIs that are experimental +// name: Only include APIs with the given name. +// preferred: Return only the preferred version of an API. (Default false) +// Fetches a GTLDiscoveryDirectoryList. ++ (id)queryForApisList; + +@end diff --git a/GTL/Source/Services/Discovery/Generated/GTLQueryDiscovery.m b/GTL/Source/Services/Discovery/Generated/GTLQueryDiscovery.m new file mode 100644 index 0000000..b79b4df --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/GTLQueryDiscovery.m @@ -0,0 +1,73 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryDiscovery.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLQueryDiscovery (3 custom class methods, 6 custom properties) + +#import "GTLQueryDiscovery.h" + +#import "GTLDiscoveryDirectoryList.h" +#import "GTLDiscoveryRestDescription.h" +#import "GTLDiscoveryRpcDescription.h" + +@implementation GTLQueryDiscovery + +@dynamic api, fields, label, name, preferred, version; + +#pragma mark - +#pragma mark "apis" methods +// These create a GTLQueryDiscovery object. + ++ (id)queryForApisGetRestWithApi:(NSString *)api + version:(NSString *)version { + NSString *methodName = @"discovery.apis.getRest"; + GTLQueryDiscovery *query = [self queryWithMethodName:methodName]; + query.api = api; + query.version = version; + query.expectedObjectClass = [GTLDiscoveryRestDescription class]; + return query; +} + ++ (id)queryForApisGetRpcWithApi:(NSString *)api + version:(NSString *)version { + NSString *methodName = @"discovery.apis.getRpc"; + GTLQueryDiscovery *query = [self queryWithMethodName:methodName]; + query.api = api; + query.version = version; + query.expectedObjectClass = [GTLDiscoveryRpcDescription class]; + return query; +} + ++ (id)queryForApisList { + NSString *methodName = @"discovery.apis.list"; + GTLQueryDiscovery *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLDiscoveryDirectoryList class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Discovery/Generated/GTLServiceDiscovery.h b/GTL/Source/Services/Discovery/Generated/GTLServiceDiscovery.h new file mode 100644 index 0000000..bd3201a --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/GTLServiceDiscovery.h @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceDiscovery.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLServiceDiscovery (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceDiscovery : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryDiscovery.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Discovery/Generated/GTLServiceDiscovery.m b/GTL/Source/Services/Discovery/Generated/GTLServiceDiscovery.m new file mode 100644 index 0000000..0ef78a0 --- /dev/null +++ b/GTL/Source/Services/Discovery/Generated/GTLServiceDiscovery.m @@ -0,0 +1,68 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceDiscovery.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// APIs Discovery Service (discovery/v1) +// Description: +// Lets you discover information about other Google APIs, such as what APIs +// are available, the resource and method details for each API +// Documentation: +// https://developers.google.com/discovery/ +// Classes: +// GTLServiceDiscovery (0 custom class methods, 0 custom properties) + +#import "GTLDiscovery.h" + +@implementation GTLServiceDiscovery + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryDiscovery class], + [GTLDiscoveryDirectoryList class], + [GTLDiscoveryJsonSchema class], + [GTLDiscoveryRestDescription class], + [GTLDiscoveryRestMethod class], + [GTLDiscoveryRestResource class], + [GTLDiscoveryRpcDescription class], + [GTLDiscoveryRpcMethod class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v1"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Drive/.svn/all-wcprops b/GTL/Source/Services/Drive/.svn/all-wcprops new file mode 100644 index 0000000..de4d918 --- /dev/null +++ b/GTL/Source/Services/Drive/.svn/all-wcprops @@ -0,0 +1,5 @@ +K 25 +svn:wc:ra_dav:version-url +V 45 +/svn/!svn/ver/248/trunk/Source/Services/Drive +END diff --git a/GTL/Source/Services/Drive/.svn/entries b/GTL/Source/Services/Drive/.svn/entries new file mode 100644 index 0000000..b4888db --- /dev/null +++ b/GTL/Source/Services/Drive/.svn/entries @@ -0,0 +1,31 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Drive +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-12-06T21:11:28.758294Z +248 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +Generated +dir + diff --git a/GTL/Source/Services/Drive/Generated/.svn/all-wcprops b/GTL/Source/Services/Drive/Generated/.svn/all-wcprops new file mode 100644 index 0000000..caa5cf2 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/all-wcprops @@ -0,0 +1,293 @@ +K 25 +svn:wc:ra_dav:version-url +V 55 +/svn/!svn/ver/248/trunk/Source/Services/Drive/Generated +END +GTLDriveChange.m +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/189/trunk/Source/Services/Drive/Generated/GTLDriveChange.m +END +GTLDriveParentList.m +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/189/trunk/Source/Services/Drive/Generated/GTLDriveParentList.m +END +GTLDriveCommentList.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/231/trunk/Source/Services/Drive/Generated/GTLDriveCommentList.h +END +GTLDriveComment.h +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/!svn/ver/243/trunk/Source/Services/Drive/Generated/GTLDriveComment.h +END +GTLDriveChildReference.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/189/trunk/Source/Services/Drive/Generated/GTLDriveChildReference.h +END +GTLDriveCommentList.m +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/231/trunk/Source/Services/Drive/Generated/GTLDriveCommentList.m +END +GTLDriveChildReference.m +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/189/trunk/Source/Services/Drive/Generated/GTLDriveChildReference.m +END +GTLDriveComment.m +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/!svn/ver/231/trunk/Source/Services/Drive/Generated/GTLDriveComment.m +END +GTLDriveAbout.h +K 25 +svn:wc:ra_dav:version-url +V 71 +/svn/!svn/ver/231/trunk/Source/Services/Drive/Generated/GTLDriveAbout.h +END +GTLDriveFileList.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/189/trunk/Source/Services/Drive/Generated/GTLDriveFileList.h +END +GTLDriveConstants.h +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/189/trunk/Source/Services/Drive/Generated/GTLDriveConstants.h +END +GTLDriveAppList.h +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/!svn/ver/189/trunk/Source/Services/Drive/Generated/GTLDriveAppList.h +END +GTLDriveAbout.m +K 25 +svn:wc:ra_dav:version-url +V 71 +/svn/!svn/ver/231/trunk/Source/Services/Drive/Generated/GTLDriveAbout.m +END +GTLDriveChildList.h +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/189/trunk/Source/Services/Drive/Generated/GTLDriveChildList.h +END +GTLDrive.h +K 25 +svn:wc:ra_dav:version-url +V 66 +/svn/!svn/ver/231/trunk/Source/Services/Drive/Generated/GTLDrive.h +END +GTLDriveFile.h +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/248/trunk/Source/Services/Drive/Generated/GTLDriveFile.h +END +GTLDriveApp.h +K 25 +svn:wc:ra_dav:version-url +V 69 +/svn/!svn/ver/201/trunk/Source/Services/Drive/Generated/GTLDriveApp.h +END +GTLDriveFileList.m +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/189/trunk/Source/Services/Drive/Generated/GTLDriveFileList.m +END +GTLDriveAppList.m +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/!svn/ver/189/trunk/Source/Services/Drive/Generated/GTLDriveAppList.m +END +GTLDriveConstants.m +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/189/trunk/Source/Services/Drive/Generated/GTLDriveConstants.m +END +GTLDriveChildList.m +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/189/trunk/Source/Services/Drive/Generated/GTLDriveChildList.m +END +GTLDriveFile.m +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/248/trunk/Source/Services/Drive/Generated/GTLDriveFile.m +END +GTLDrivePermissionList.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/189/trunk/Source/Services/Drive/Generated/GTLDrivePermissionList.h +END +GTLDriveApp.m +K 25 +svn:wc:ra_dav:version-url +V 69 +/svn/!svn/ver/197/trunk/Source/Services/Drive/Generated/GTLDriveApp.m +END +GTLDrivePermission.h +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/189/trunk/Source/Services/Drive/Generated/GTLDrivePermission.h +END +GTLDrivePermissionList.m +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/189/trunk/Source/Services/Drive/Generated/GTLDrivePermissionList.m +END +GTLDriveRevisionList.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/189/trunk/Source/Services/Drive/Generated/GTLDriveRevisionList.h +END +GTLDrivePermission.m +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/189/trunk/Source/Services/Drive/Generated/GTLDrivePermission.m +END +GTLDriveRevision.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/194/trunk/Source/Services/Drive/Generated/GTLDriveRevision.h +END +GTLDriveRevisionList.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/189/trunk/Source/Services/Drive/Generated/GTLDriveRevisionList.m +END +GTLServiceDrive.h +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/!svn/ver/189/trunk/Source/Services/Drive/Generated/GTLServiceDrive.h +END +GTLDriveRevision.m +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/189/trunk/Source/Services/Drive/Generated/GTLDriveRevision.m +END +GTLQueryDrive.h +K 25 +svn:wc:ra_dav:version-url +V 71 +/svn/!svn/ver/243/trunk/Source/Services/Drive/Generated/GTLQueryDrive.h +END +GTLServiceDrive.m +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/!svn/ver/231/trunk/Source/Services/Drive/Generated/GTLServiceDrive.m +END +GTLDriveParentReference.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/189/trunk/Source/Services/Drive/Generated/GTLDriveParentReference.h +END +GTLDriveCommentReplyList.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/231/trunk/Source/Services/Drive/Generated/GTLDriveCommentReplyList.h +END +GTLQueryDrive.m +K 25 +svn:wc:ra_dav:version-url +V 71 +/svn/!svn/ver/231/trunk/Source/Services/Drive/Generated/GTLQueryDrive.m +END +GTLDriveParentReference.m +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/189/trunk/Source/Services/Drive/Generated/GTLDriveParentReference.m +END +GTLDriveCommentReply.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/231/trunk/Source/Services/Drive/Generated/GTLDriveCommentReply.h +END +GTLDriveUser.h +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/231/trunk/Source/Services/Drive/Generated/GTLDriveUser.h +END +GTLDriveCommentReplyList.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/231/trunk/Source/Services/Drive/Generated/GTLDriveCommentReplyList.m +END +GTLDriveChangeList.h +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/201/trunk/Source/Services/Drive/Generated/GTLDriveChangeList.h +END +GTLDriveCommentReply.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/231/trunk/Source/Services/Drive/Generated/GTLDriveCommentReply.m +END +GTLDriveUser.m +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/231/trunk/Source/Services/Drive/Generated/GTLDriveUser.m +END +GTLDriveChange.h +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/201/trunk/Source/Services/Drive/Generated/GTLDriveChange.h +END +GTLDriveParentList.h +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/189/trunk/Source/Services/Drive/Generated/GTLDriveParentList.h +END +GTLDriveChangeList.m +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/189/trunk/Source/Services/Drive/Generated/GTLDriveChangeList.m +END +GTLDrive_Sources.m +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/225/trunk/Source/Services/Drive/Generated/GTLDrive_Sources.m +END diff --git a/GTL/Source/Services/Drive/Generated/.svn/entries b/GTL/Source/Services/Drive/Generated/.svn/entries new file mode 100644 index 0000000..2aaff0f --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/entries @@ -0,0 +1,1660 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Drive/Generated +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-12-06T21:11:28.758294Z +248 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +GTLDriveChange.m +file + + + + +2012-12-09T08:42:32.000000Z +7545970eb7acfdbffb0ccce0dd6085f0 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1512 + +GTLDriveParentList.m +file + + + + +2012-12-09T08:42:32.000000Z +743f0d76a11b45e9e343715640e5fae1 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1725 + +GTLDriveCommentList.h +file + + + + +2012-12-09T08:42:32.000000Z +e847e7c0de3bd3f267caee119b0dde55 +2012-10-10T23:52:59.304692Z +231 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1776 + +GTLDriveComment.h +file + + + + +2012-12-09T08:42:32.000000Z +cfe6cb77d12045774c44e502a110c525 +2012-11-14T23:46:14.437398Z +243 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3746 + +GTLDriveChildReference.h +file + + + + +2012-12-09T08:42:32.000000Z +166e856a18735fa4aed18c1fcc9bc1f2 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1662 + +GTLDriveCommentList.m +file + + + + +2012-12-09T08:42:32.000000Z +1ee99aa296487e5be12d806e3219e8c5 +2012-10-10T23:52:59.304692Z +231 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1538 + +GTLDriveChildReference.m +file + + + + +2012-12-09T08:42:32.000000Z +e7367a2f94efe384afe764365c1884a7 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1522 + +GTLDriveComment.m +file + + + + +2012-12-09T08:42:32.000000Z +e182158b9772cbbba84505f24fa85c7a +2012-10-10T23:52:59.304692Z +231 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1945 + +GTLDriveAbout.h +file + + + + +2012-12-09T08:42:32.000000Z +26390924365786135f4ed1876e102199 +2012-10-10T23:52:59.304692Z +231 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +6527 + +GTLDriveFileList.h +file + + + + +2012-12-09T08:42:32.000000Z +6c426ed77dc9a753949db090a3d45e3b +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1899 + +GTLDriveConstants.h +file + + + + +2012-12-09T08:42:32.000000Z +ab0772102c6004ce148552dbc2f74ab9 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2106 + +GTLDriveAppList.h +file + + + + +2012-12-09T08:42:32.000000Z +ca154a0dba1376fce47e665fd991dd02 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1810 + +GTLDriveFile.h +file + + + + +2012-12-09T08:42:32.000000Z +2ca19b2f9ebf63abc7a8e8517bf01008 +2012-12-06T21:11:28.758294Z +248 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +11877 + +GTLDriveAbout.m +file + + + + +2012-12-09T08:42:32.000000Z +4e7fd4113f6401cddf2effdcb1521dcc +2012-10-10T23:52:59.304692Z +231 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4849 + +GTLDriveChildList.h +file + + + + +2012-12-09T08:42:32.000000Z +c41ec1a9edb26b0557aa742ac259e7bb +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1946 + +GTLDrive.h +file + + + + +2012-12-09T08:42:32.000000Z +83ce2d7b0684dc282896852654a92778 +2012-10-10T23:52:59.304692Z +231 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1610 + +GTLDriveApp.h +file + + + + +2012-12-09T08:42:32.000000Z +c9200ed118beb4c1b11e3ee34d6e6279 +2012-08-11T03:10:15.515419Z +201 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3602 + +GTLDriveFileList.m +file + + + + +2012-12-09T08:42:32.000000Z +aa55c431f779bbc785fb3635dc852f46 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1716 + +GTLDriveAppList.m +file + + + + +2012-12-09T08:42:32.000000Z +5c54c3dfd38695c699150c48251cfb59 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1683 + +GTLDriveConstants.m +file + + + + +2012-12-09T08:42:32.000000Z +d76f8d011093c573bc889c38619cbde9 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1630 + +GTLDriveChildList.m +file + + + + +2012-12-09T08:42:32.000000Z +8e6243e5fe8cb667db0a756956b255b1 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1742 + +GTLDriveFile.m +file + + + + +2012-12-09T08:42:32.000000Z +338c3dcde1117b6ea6af0df1dea136b0 +2012-12-06T21:11:28.758294Z +248 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4303 + +GTLDrivePermissionList.h +file + + + + +2012-12-09T08:42:32.000000Z +4fa15e1b75b7da509b87ca7ce222c1a7 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1812 + +GTLDriveApp.m +file + + + + +2012-12-09T08:42:32.000000Z +dc8ff715377814291c76ed8781cae4f6 +2012-08-01T23:47:02.375550Z +197 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2301 + +GTLDrivePermission.h +file + + + + +2012-12-09T08:42:32.000000Z +82c80aee6873d0960e987e2c2cc47287 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2507 + +GTLDrivePermissionList.m +file + + + + +2012-12-09T08:42:32.000000Z +755666a66131fb7aa86a4e4cc69414c5 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1739 + +GTLDriveRevisionList.h +file + + + + +2012-12-09T08:42:32.000000Z +e4fb75daffcc756d75ebf2abcbb82d4e +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1781 + +GTLDrivePermission.m +file + + + + +2012-12-09T08:42:32.000000Z +799b33c6a75e665986b2f47bd021e147 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1786 + +GTLDriveRevision.h +file + + + + +2012-12-09T08:42:32.000000Z +b1b89ac47ee0d83aa16d0d51ee5a2b63 +2012-07-28T01:02:22.137373Z +194 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4240 + +GTLDriveRevisionList.m +file + + + + +2012-12-09T08:42:32.000000Z +3c1c129ce2335e3521e0f6294c506119 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1723 + +GTLServiceDrive.h +file + + + + +2012-12-09T08:42:32.000000Z +36b68aa8485427123059617f8904c4d5 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2055 + +GTLDriveRevision.m +file + + + + +2012-12-09T08:42:32.000000Z +8d5c60a4d886f17703c8293abd0209d8 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2027 + +GTLQueryDrive.h +file + + + + +2012-12-09T08:42:32.000000Z +2685a88c43b6e53785143d9eedbecce0 +2012-11-14T23:46:14.437398Z +243 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +28053 + +GTLServiceDrive.m +file + + + + +2012-12-09T08:42:32.000000Z +98f29f2bb930f5485467a7d44b3ac693 +2012-10-10T23:52:59.304692Z +231 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2895 + +GTLDriveParentReference.h +file + + + + +2012-12-09T08:42:32.000000Z +d0dc317c844a55bfe5346e08c8b3f3d2 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1772 + +GTLDriveCommentReplyList.h +file + + + + +2012-12-09T08:42:32.000000Z +1d0d2eaec59870c5c5a4631ba3768b56 +2012-10-10T23:52:59.304692Z +231 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1823 + +GTLQueryDrive.m +file + + + + +2012-12-09T08:42:32.000000Z +79f70a2a7b1b425363dd772c13afbb53 +2012-10-10T23:52:59.304692Z +231 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +21329 + +GTLDriveParentReference.m +file + + + + +2012-12-09T08:42:32.000000Z +0a89079e2975447ebf161ff7ecc603a7 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1537 + +GTLDriveCommentReply.h +file + + + + +2012-12-09T08:42:32.000000Z +48a1b2469a00647b4f02ef52ff42390e +2012-10-10T23:52:59.304692Z +231 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2621 + +GTLDriveUser.h +file + + + + +2012-12-09T08:42:32.000000Z +d2d311d48008c3f53e471a5c01df95fa +2012-10-10T23:52:59.304692Z +231 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2027 + +GTLDriveCommentReplyList.m +file + + + + +2012-12-09T08:42:32.000000Z +cb4efa71efead404e045d0ed1dbf407a +2012-10-10T23:52:59.304692Z +231 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1578 + +GTLDriveChangeList.h +file + + + + +2012-12-09T08:42:32.000000Z +d9d853de6dc346199d6e714c3742864c +2012-08-11T03:10:15.515419Z +201 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2031 + +GTLDriveCommentReply.m +file + + + + +2012-12-09T08:42:32.000000Z +f3eded5db7cad438d2637fa564fbf8f6 +2012-10-10T23:52:59.304692Z +231 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1413 + +GTLDriveUser.m +file + + + + +2012-12-09T08:42:32.000000Z +a6e95f2c915504295d0eee8cba3f638f +2012-10-10T23:52:59.304692Z +231 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1532 + +GTLDriveChange.h +file + + + + +2012-12-09T08:42:32.000000Z +062f545a961e82dc824ac5e6bcc1f6af +2012-08-11T03:10:15.515419Z +201 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1900 + +GTLDriveParentList.h +file + + + + +2012-12-09T08:42:32.000000Z +a739551238c90513f446590c599aac73 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1780 + +GTLDriveChangeList.m +file + + + + +2012-12-09T08:42:32.000000Z +23153c6bdb17e494d933b586f6b7b2b3 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1749 + +GTLDrive_Sources.m +file + + + + +2012-12-09T08:42:32.000000Z +4976e12e12e6a6b06920c3e078e822ae +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1729 + diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDrive.h.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDrive.h.svn-base new file mode 100644 index 0000000..a5b33a5 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDrive.h.svn-base @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDrive.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ + +#import "GTLDriveConstants.h" + +#import "GTLDriveAbout.h" +#import "GTLDriveApp.h" +#import "GTLDriveAppList.h" +#import "GTLDriveChange.h" +#import "GTLDriveChangeList.h" +#import "GTLDriveChildList.h" +#import "GTLDriveChildReference.h" +#import "GTLDriveComment.h" +#import "GTLDriveCommentList.h" +#import "GTLDriveCommentReply.h" +#import "GTLDriveCommentReplyList.h" +#import "GTLDriveFile.h" +#import "GTLDriveFileList.h" +#import "GTLDriveParentList.h" +#import "GTLDriveParentReference.h" +#import "GTLDrivePermission.h" +#import "GTLDrivePermissionList.h" +#import "GTLDriveRevision.h" +#import "GTLDriveRevisionList.h" +#import "GTLDriveUser.h" + +#import "GTLQueryDrive.h" +#import "GTLServiceDrive.h" diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveAbout.h.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveAbout.h.svn-base new file mode 100644 index 0000000..c44ce4e --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveAbout.h.svn-base @@ -0,0 +1,219 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveAbout.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveAbout (0 custom class methods, 20 custom properties) +// GTLDriveAboutAdditionalRoleInfoItem (0 custom class methods, 2 custom properties) +// GTLDriveAboutExportFormatsItem (0 custom class methods, 2 custom properties) +// GTLDriveAboutFeaturesItem (0 custom class methods, 2 custom properties) +// GTLDriveAboutImportFormatsItem (0 custom class methods, 2 custom properties) +// GTLDriveAboutMaxUploadSizesItem (0 custom class methods, 2 custom properties) +// GTLDriveAboutAdditionalRoleInfoItemRoleSetsItem (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveAboutAdditionalRoleInfoItem; +@class GTLDriveAboutAdditionalRoleInfoItemRoleSetsItem; +@class GTLDriveAboutExportFormatsItem; +@class GTLDriveAboutFeaturesItem; +@class GTLDriveAboutImportFormatsItem; +@class GTLDriveAboutMaxUploadSizesItem; +@class GTLDriveUser; + +// ---------------------------------------------------------------------------- +// +// GTLDriveAbout +// + +// An item with user information and settings. + +@interface GTLDriveAbout : GTLObject + +// Information about supported additional roles per file type. The most specific +// type takes precedence. +@property (retain) NSArray *additionalRoleInfo; // of GTLDriveAboutAdditionalRoleInfoItem + +// The domain sharing policy for the current user. +@property (copy) NSString *domainSharingPolicy; + +// The ETag of the item. +@property (copy) NSString *ETag; + +// The allowable export formats. +@property (retain) NSArray *exportFormats; // of GTLDriveAboutExportFormatsItem + +// List of additional features enabled on this account. +@property (retain) NSArray *features; // of GTLDriveAboutFeaturesItem + +// The allowable import formats. +@property (retain) NSArray *importFormats; // of GTLDriveAboutImportFormatsItem + +// A boolean indicating whether the authenticated app is installed by the +// authenticated user. +@property (retain) NSNumber *isCurrentAppInstalled; // boolValue + +// This is always drive#about. +@property (copy) NSString *kind; + +// The largest change id. +@property (retain) NSNumber *largestChangeId; // longLongValue + +// List of max upload sizes for each file type. The most specific type takes +// precedence. +@property (retain) NSArray *maxUploadSizes; // of GTLDriveAboutMaxUploadSizesItem + +// The name of the current user. +@property (copy) NSString *name; + +// The current user's ID as visible in the permissions collection. +@property (copy) NSString *permissionId; + +// The total number of quota bytes. +@property (retain) NSNumber *quotaBytesTotal; // longLongValue + +// The number of quota bytes used. +@property (retain) NSNumber *quotaBytesUsed; // longLongValue + +// The number of quota bytes used by all Google apps (Drive, Picasa, etc.). +@property (retain) NSNumber *quotaBytesUsedAggregate; // longLongValue + +// The number of quota bytes used by trashed items. +@property (retain) NSNumber *quotaBytesUsedInTrash; // longLongValue + +// The number of remaining change ids. +@property (retain) NSNumber *remainingChangeIds; // longLongValue + +// The id of the root folder. +@property (copy) NSString *rootFolderId; + +// A link back to this item. +@property (copy) NSString *selfLink; + +// The authenticated user. +@property (retain) GTLDriveUser *user; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAboutAdditionalRoleInfoItem +// + +@interface GTLDriveAboutAdditionalRoleInfoItem : GTLObject + +// The supported additional roles per primary role. +@property (retain) NSArray *roleSets; // of GTLDriveAboutAdditionalRoleInfoItemRoleSetsItem + +// The content type that this additional role info applies to. +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAboutExportFormatsItem +// + +@interface GTLDriveAboutExportFormatsItem : GTLObject + +// The content type to convert from. +@property (copy) NSString *source; + +// The possible content types to convert to. +@property (retain) NSArray *targets; // of NSString + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAboutFeaturesItem +// + +@interface GTLDriveAboutFeaturesItem : GTLObject + +// The name of the feature. +@property (copy) NSString *featureName; + +// The request limit rate for this feature, in queries per second. +@property (retain) NSNumber *featureRate; // doubleValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAboutImportFormatsItem +// + +@interface GTLDriveAboutImportFormatsItem : GTLObject + +// The imported file's content type to convert from. +@property (copy) NSString *source; + +// The possible content types to convert to. +@property (retain) NSArray *targets; // of NSString + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAboutMaxUploadSizesItem +// + +@interface GTLDriveAboutMaxUploadSizesItem : GTLObject + +// The max upload size for this type. +@property (retain) NSNumber *size; // longLongValue + +// The file type. +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAboutAdditionalRoleInfoItemRoleSetsItem +// + +@interface GTLDriveAboutAdditionalRoleInfoItemRoleSetsItem : GTLObject + +// The supported additional roles with the primary role. +@property (retain) NSArray *additionalRoles; // of NSString + +// A primary permission role. +@property (copy) NSString *primaryRole; + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveAbout.m.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveAbout.m.svn-base new file mode 100644 index 0000000..23e3c1a --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveAbout.m.svn-base @@ -0,0 +1,168 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveAbout.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveAbout (0 custom class methods, 20 custom properties) +// GTLDriveAboutAdditionalRoleInfoItem (0 custom class methods, 2 custom properties) +// GTLDriveAboutExportFormatsItem (0 custom class methods, 2 custom properties) +// GTLDriveAboutFeaturesItem (0 custom class methods, 2 custom properties) +// GTLDriveAboutImportFormatsItem (0 custom class methods, 2 custom properties) +// GTLDriveAboutMaxUploadSizesItem (0 custom class methods, 2 custom properties) +// GTLDriveAboutAdditionalRoleInfoItemRoleSetsItem (0 custom class methods, 2 custom properties) + +#import "GTLDriveAbout.h" + +#import "GTLDriveUser.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveAbout +// + +@implementation GTLDriveAbout +@dynamic additionalRoleInfo, domainSharingPolicy, ETag, exportFormats, features, + importFormats, isCurrentAppInstalled, kind, largestChangeId, + maxUploadSizes, name, permissionId, quotaBytesTotal, quotaBytesUsed, + quotaBytesUsedAggregate, quotaBytesUsedInTrash, remainingChangeIds, + rootFolderId, selfLink, user; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLDriveAboutAdditionalRoleInfoItem class], @"additionalRoleInfo", + [GTLDriveAboutExportFormatsItem class], @"exportFormats", + [GTLDriveAboutFeaturesItem class], @"features", + [GTLDriveAboutImportFormatsItem class], @"importFormats", + [GTLDriveAboutMaxUploadSizesItem class], @"maxUploadSizes", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#about"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAboutAdditionalRoleInfoItem +// + +@implementation GTLDriveAboutAdditionalRoleInfoItem +@dynamic roleSets, type; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLDriveAboutAdditionalRoleInfoItemRoleSetsItem class] + forKey:@"roleSets"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAboutExportFormatsItem +// + +@implementation GTLDriveAboutExportFormatsItem +@dynamic source, targets; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"targets"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAboutFeaturesItem +// + +@implementation GTLDriveAboutFeaturesItem +@dynamic featureName, featureRate; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAboutImportFormatsItem +// + +@implementation GTLDriveAboutImportFormatsItem +@dynamic source, targets; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"targets"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAboutMaxUploadSizesItem +// + +@implementation GTLDriveAboutMaxUploadSizesItem +@dynamic size, type; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAboutAdditionalRoleInfoItemRoleSetsItem +// + +@implementation GTLDriveAboutAdditionalRoleInfoItemRoleSetsItem +@dynamic additionalRoles, primaryRole; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"additionalRoles"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveApp.h.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveApp.h.svn-base new file mode 100644 index 0000000..96407a2 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveApp.h.svn-base @@ -0,0 +1,119 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveApp.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveApp (0 custom class methods, 15 custom properties) +// GTLDriveAppIconsItem (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveAppIconsItem; + +// ---------------------------------------------------------------------------- +// +// GTLDriveApp +// + +// Information about a third-party application which the user has installed or +// given access to Google Drive. + +@interface GTLDriveApp : GTLObject + +// Whether the app is authorized to access data on the user's Drive. +@property (retain) NSNumber *authorized; // boolValue + +// The various icons for the app. +@property (retain) NSArray *icons; // of GTLDriveAppIconsItem + +// The ID of the app. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Whether the app is installed. +@property (retain) NSNumber *installed; // boolValue + +// This is always drive#app. +@property (copy) NSString *kind; + +// The name of the app. +@property (copy) NSString *name; + +// The type of object this app creates (e.g. Chart). If empty, the app name +// should be used instead. +@property (copy) NSString *objectType; + +// The list of primary file extensions. +@property (retain) NSArray *primaryFileExtensions; // of NSString + +// The list of primary mime types. +@property (retain) NSArray *primaryMimeTypes; // of NSString + +// The product URL. +@property (copy) NSString *productUrl; + +// The list of secondary file extensions. +@property (retain) NSArray *secondaryFileExtensions; // of NSString + +// The list of secondary mime types. +@property (retain) NSArray *secondaryMimeTypes; // of NSString + +// Whether this app supports creating new objects. +@property (retain) NSNumber *supportsCreate; // boolValue + +// Whether this app supports importing Google Docs. +@property (retain) NSNumber *supportsImport; // boolValue + +// Whether the app is selected as the default handler for the types it supports. +@property (retain) NSNumber *useByDefault; // boolValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAppIconsItem +// + +@interface GTLDriveAppIconsItem : GTLObject + +// Category of the icon. Allowed values are: +// - application - icon for the application +// - document - icon for a file associated with the app +// - documentShared - icon for a shared file associated with the app +@property (copy) NSString *category; + +// URL for the icon. +@property (copy) NSString *iconUrl; + +// Size of the icon. Represented as the maximum of the width and height. +@property (retain) NSNumber *size; // intValue + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveApp.m.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveApp.m.svn-base new file mode 100644 index 0000000..5fb7840 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveApp.m.svn-base @@ -0,0 +1,78 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveApp.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveApp (0 custom class methods, 15 custom properties) +// GTLDriveAppIconsItem (0 custom class methods, 3 custom properties) + +#import "GTLDriveApp.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveApp +// + +@implementation GTLDriveApp +@dynamic authorized, icons, identifier, installed, kind, name, objectType, + primaryFileExtensions, primaryMimeTypes, productUrl, + secondaryFileExtensions, secondaryMimeTypes, supportsCreate, + supportsImport, useByDefault; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLDriveAppIconsItem class], @"icons", + [NSString class], @"primaryFileExtensions", + [NSString class], @"primaryMimeTypes", + [NSString class], @"secondaryFileExtensions", + [NSString class], @"secondaryMimeTypes", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#app"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAppIconsItem +// + +@implementation GTLDriveAppIconsItem +@dynamic category, iconUrl, size; +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveAppList.h.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveAppList.h.svn-base new file mode 100644 index 0000000..59e872f --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveAppList.h.svn-base @@ -0,0 +1,64 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveAppList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveAppList (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveApp; + +// ---------------------------------------------------------------------------- +// +// GTLDriveAppList +// + +// A list of third-party applications which the user has installed or given +// access to Google Drive. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLDriveAppList : GTLCollectionObject + +// The ETag of the list. +@property (copy) NSString *ETag; + +// The actual list of apps. +@property (retain) NSArray *items; // of GTLDriveApp + +// This is always drive#appList. +@property (copy) NSString *kind; + +// A link back to this list. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveAppList.m.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveAppList.m.svn-base new file mode 100644 index 0000000..a397387 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveAppList.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveAppList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveAppList (0 custom class methods, 4 custom properties) + +#import "GTLDriveAppList.h" + +#import "GTLDriveApp.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveAppList +// + +@implementation GTLDriveAppList +@dynamic ETag, items, kind, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLDriveApp class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#appList"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveChange.h.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveChange.h.svn-base new file mode 100644 index 0000000..6d013b5 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveChange.h.svn-base @@ -0,0 +1,67 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveChange.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveChange (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveFile; + +// ---------------------------------------------------------------------------- +// +// GTLDriveChange +// + +// Representation of a change to a file. + +@interface GTLDriveChange : GTLObject + +// Whether the file has been deleted. +@property (retain) NSNumber *deleted; // boolValue + +// The updated state of the file. Present if the file has not been deleted. +@property (retain) GTLDriveFile *file; + +// The ID of the file associated with this change. +@property (copy) NSString *fileId; + +// The ID of the change. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +// This is always drive#change. +@property (copy) NSString *kind; + +// A link back to this change. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveChange.m.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveChange.m.svn-base new file mode 100644 index 0000000..6fcd70f --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveChange.m.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveChange.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveChange (0 custom class methods, 6 custom properties) + +#import "GTLDriveChange.h" + +#import "GTLDriveFile.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveChange +// + +@implementation GTLDriveChange +@dynamic deleted, file, fileId, identifier, kind, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#change"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveChangeList.h.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveChangeList.h.svn-base new file mode 100644 index 0000000..81c08e1 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveChangeList.h.svn-base @@ -0,0 +1,72 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveChangeList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveChangeList (0 custom class methods, 7 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveChange; + +// ---------------------------------------------------------------------------- +// +// GTLDriveChangeList +// + +// A list of changes for a user. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLDriveChangeList : GTLCollectionObject + +// The ETag of the list. +@property (copy) NSString *ETag; + +// The actual list of changes. +@property (retain) NSArray *items; // of GTLDriveChange + +// This is always drive#changeList. +@property (copy) NSString *kind; + +// The current largest change ID. +@property (retain) NSNumber *largestChangeId; // longLongValue + +// A link to the next page of changes. +@property (copy) NSString *nextLink; + +// The page token for the next page of changes. +@property (copy) NSString *nextPageToken; + +// A link back to this list. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveChangeList.m.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveChangeList.m.svn-base new file mode 100644 index 0000000..e6ef167 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveChangeList.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveChangeList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveChangeList (0 custom class methods, 7 custom properties) + +#import "GTLDriveChangeList.h" + +#import "GTLDriveChange.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveChangeList +// + +@implementation GTLDriveChangeList +@dynamic ETag, items, kind, largestChangeId, nextLink, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLDriveChange class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#changeList"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveChildList.h.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveChildList.h.svn-base new file mode 100644 index 0000000..20185f7 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveChildList.h.svn-base @@ -0,0 +1,69 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveChildList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveChildList (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveChildReference; + +// ---------------------------------------------------------------------------- +// +// GTLDriveChildList +// + +// A list of children of a file. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLDriveChildList : GTLCollectionObject + +// The ETag of the list. +@property (copy) NSString *ETag; + +// The actual list of children. +@property (retain) NSArray *items; // of GTLDriveChildReference + +// This is always drive#childList. +@property (copy) NSString *kind; + +// A link to the next page of children. +@property (copy) NSString *nextLink; + +// The page token for the next page of children. +@property (copy) NSString *nextPageToken; + +// A link back to this list. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveChildList.m.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveChildList.m.svn-base new file mode 100644 index 0000000..61d5c84 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveChildList.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveChildList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveChildList (0 custom class methods, 6 custom properties) + +#import "GTLDriveChildList.h" + +#import "GTLDriveChildReference.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveChildList +// + +@implementation GTLDriveChildList +@dynamic ETag, items, kind, nextLink, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLDriveChildReference class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#childList"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveChildReference.h.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveChildReference.h.svn-base new file mode 100644 index 0000000..2c9aabe --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveChildReference.h.svn-base @@ -0,0 +1,59 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveChildReference.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveChildReference (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLDriveChildReference +// + +// A reference to a file's child. + +@interface GTLDriveChildReference : GTLObject + +// A link to the child. +@property (copy) NSString *childLink; + +// The ID of the child. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// This is always drive#childReference. +@property (copy) NSString *kind; + +// A link back to this reference. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveChildReference.m.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveChildReference.m.svn-base new file mode 100644 index 0000000..6c912da --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveChildReference.m.svn-base @@ -0,0 +1,52 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveChildReference.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveChildReference (0 custom class methods, 4 custom properties) + +#import "GTLDriveChildReference.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveChildReference +// + +@implementation GTLDriveChildReference +@dynamic childLink, identifier, kind, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#childReference"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveComment.h.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveComment.h.svn-base new file mode 100644 index 0000000..df54dd0 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveComment.h.svn-base @@ -0,0 +1,121 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveComment.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveComment (0 custom class methods, 15 custom properties) +// GTLDriveCommentContext (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveCommentContext; +@class GTLDriveCommentReply; +@class GTLDriveUser; + +// ---------------------------------------------------------------------------- +// +// GTLDriveComment +// + +// A JSON representation of a comment on a file in Google Drive. + +@interface GTLDriveComment : GTLObject + +// A region of the document represented as a JSON string. See anchor +// documentation for details on how to define and interpret anchor properties. +@property (copy) NSString *anchor; + +// The user who wrote this comment. +@property (retain) GTLDriveUser *author; + +// The ID of the comment. +@property (copy) NSString *commentId; + +// The plain text content used to create this comment. This is not HTML safe and +// should only be used as a starting point to make edits to a comment's content. +@property (copy) NSString *content; + +// The context of the file which is being commented on. +@property (retain) GTLDriveCommentContext *context; + +// The date when this comment was first created. +@property (retain) GTLDateTime *createdDate; + +// Whether this comment has been deleted. If a comment has been deleted the +// content will be cleared and this will only represent a comment that once +// existed. +@property (retain) NSNumber *deleted; // boolValue + +// The file which this comment is addressing. +@property (copy) NSString *fileId; + +// The title of the file which this comment is addressing. +@property (copy) NSString *fileTitle; + +// HTML formatted content for this comment. +@property (copy) NSString *htmlContent; + +// This is always drive#comment. +@property (copy) NSString *kind; + +// The date when this comment or any of its replies were last modified. +@property (retain) GTLDateTime *modifiedDate; + +// Replies to this post. +@property (retain) NSArray *replies; // of GTLDriveCommentReply + +// A link back to this comment. +@property (copy) NSString *selfLink; + +// The status of this comment. Status can be changed by posting a reply to a +// comment with the desired status. +// - "open" - The comment is still open. +// - "resolved" - The comment has been resolved by one of its replies. +@property (copy) NSString *status; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveCommentContext +// + +@interface GTLDriveCommentContext : GTLObject + +// The MIME type of the context snippet. +@property (copy) NSString *type; + +// Data representation of the segment of the file being commented on. In the +// case of a text file for example, this would be the actual text that the +// comment is about. +@property (copy) NSString *value; + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveComment.m.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveComment.m.svn-base new file mode 100644 index 0000000..f042e30 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveComment.m.svn-base @@ -0,0 +1,68 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveComment.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveComment (0 custom class methods, 15 custom properties) +// GTLDriveCommentContext (0 custom class methods, 2 custom properties) + +#import "GTLDriveComment.h" + +#import "GTLDriveCommentReply.h" +#import "GTLDriveUser.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveComment +// + +@implementation GTLDriveComment +@dynamic anchor, author, commentId, content, context, createdDate, deleted, + fileId, fileTitle, htmlContent, kind, modifiedDate, replies, selfLink, + status; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLDriveCommentReply class] + forKey:@"replies"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#comment"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveCommentContext +// + +@implementation GTLDriveCommentContext +@dynamic type, value; +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveCommentList.h.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveCommentList.h.svn-base new file mode 100644 index 0000000..c9ff1c4 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveCommentList.h.svn-base @@ -0,0 +1,60 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveCommentList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveCommentList (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveComment; + +// ---------------------------------------------------------------------------- +// +// GTLDriveCommentList +// + +// A JSON representation of a list of comments on a file in Google Drive. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLDriveCommentList : GTLCollectionObject + +// List of comments. +@property (retain) NSArray *items; // of GTLDriveComment + +// This is always drive#commentList. +@property (copy) NSString *kind; + +// The token to use to request the next page of results. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveCommentList.m.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveCommentList.m.svn-base new file mode 100644 index 0000000..39e4353 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveCommentList.m.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveCommentList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveCommentList (0 custom class methods, 3 custom properties) + +#import "GTLDriveCommentList.h" + +#import "GTLDriveComment.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveCommentList +// + +@implementation GTLDriveCommentList +@dynamic items, kind, nextPageToken; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLDriveComment class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#commentList"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveCommentReply.h.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveCommentReply.h.svn-base new file mode 100644 index 0000000..5d0c0cb --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveCommentReply.h.svn-base @@ -0,0 +1,82 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveCommentReply.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveCommentReply (0 custom class methods, 9 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveUser; + +// ---------------------------------------------------------------------------- +// +// GTLDriveCommentReply +// + +// A JSON representation of a reply to a comment on a file in Google Drive. + +@interface GTLDriveCommentReply : GTLObject + +// The user who wrote this reply. +@property (retain) GTLDriveUser *author; + +// The plain text content used to create this reply. This is not HTML safe and +// should only be used as a starting point to make edits to a reply's content. +// This field is required on inserts if no verb is specified (resolve/reopen). +@property (copy) NSString *content; + +// The date when this reply was first created. +@property (retain) GTLDateTime *createdDate; + +// Whether this reply has been deleted. If a reply has been deleted the content +// will be cleared and this will only represent a reply that once existed. +@property (retain) NSNumber *deleted; // boolValue + +// HTML formatted content for this reply. +@property (copy) NSString *htmlContent; + +// This is always drive#commentReply. +@property (copy) NSString *kind; + +// The date when this reply was last modified. +@property (retain) GTLDateTime *modifiedDate; + +// The ID of the reply. +@property (copy) NSString *replyId; + +// The action this reply performed to the parent comment. When creating a new +// reply this is the action to be perform to the parent comment. Possible values +// are: +// - "resolve" - To resolve a comment. +// - "reopen" - To reopen (un-resolve) a comment. +@property (copy) NSString *verb; + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveCommentReply.m.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveCommentReply.m.svn-base new file mode 100644 index 0000000..237d1b9 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveCommentReply.m.svn-base @@ -0,0 +1,48 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveCommentReply.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveCommentReply (0 custom class methods, 9 custom properties) + +#import "GTLDriveCommentReply.h" + +#import "GTLDriveUser.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveCommentReply +// + +@implementation GTLDriveCommentReply +@dynamic author, content, createdDate, deleted, htmlContent, kind, modifiedDate, + replyId, verb; + ++ (void)load { + [self registerObjectClassForKind:@"drive#commentReply"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveCommentReplyList.h.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveCommentReplyList.h.svn-base new file mode 100644 index 0000000..2ce023c --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveCommentReplyList.h.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveCommentReplyList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveCommentReplyList (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveCommentReply; + +// ---------------------------------------------------------------------------- +// +// GTLDriveCommentReplyList +// + +// A JSON representation of a list of replies to a comment on a file in Google +// Drive. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLDriveCommentReplyList : GTLCollectionObject + +// List of reply. +@property (retain) NSArray *items; // of GTLDriveCommentReply + +// This is always drive#commentReplyList. +@property (copy) NSString *kind; + +// The token to use to request the next page of results. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveCommentReplyList.m.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveCommentReplyList.m.svn-base new file mode 100644 index 0000000..ea25605 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveCommentReplyList.m.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveCommentReplyList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveCommentReplyList (0 custom class methods, 3 custom properties) + +#import "GTLDriveCommentReplyList.h" + +#import "GTLDriveCommentReply.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveCommentReplyList +// + +@implementation GTLDriveCommentReplyList +@dynamic items, kind, nextPageToken; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLDriveCommentReply class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#commentReplyList"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveConstants.h.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveConstants.h.svn-base new file mode 100644 index 0000000..e9f9a40 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveConstants.h.svn-base @@ -0,0 +1,52 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// View and manage the files and documents in your Google Drive +GTL_EXTERN NSString * const kGTLAuthScopeDrive; // "https://www.googleapis.com/auth/drive" +// View your Google Drive apps +GTL_EXTERN NSString * const kGTLAuthScopeDriveAppsReadonly; // "https://www.googleapis.com/auth/drive.apps.readonly" +// View and manage Google Drive files that you have opened or created with this +// app +GTL_EXTERN NSString * const kGTLAuthScopeDriveFile; // "https://www.googleapis.com/auth/drive.file" +// View metadata for files and documents in your Google Drive +GTL_EXTERN NSString * const kGTLAuthScopeDriveMetadataReadonly; // "https://www.googleapis.com/auth/drive.metadata.readonly" +// View the files and documents in your Google Drive +GTL_EXTERN NSString * const kGTLAuthScopeDriveReadonly; // "https://www.googleapis.com/auth/drive.readonly" + +// Projection +GTL_EXTERN NSString * const kGTLDriveProjectionBasic; // "BASIC" +GTL_EXTERN NSString * const kGTLDriveProjectionFull; // "FULL" diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveConstants.m.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveConstants.m.svn-base new file mode 100644 index 0000000..374b0c9 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveConstants.m.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ + +#import "GTLDriveConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeDrive = @"https://www.googleapis.com/auth/drive"; +NSString * const kGTLAuthScopeDriveAppsReadonly = @"https://www.googleapis.com/auth/drive.apps.readonly"; +NSString * const kGTLAuthScopeDriveFile = @"https://www.googleapis.com/auth/drive.file"; +NSString * const kGTLAuthScopeDriveMetadataReadonly = @"https://www.googleapis.com/auth/drive.metadata.readonly"; +NSString * const kGTLAuthScopeDriveReadonly = @"https://www.googleapis.com/auth/drive.readonly"; + +// Projection +NSString * const kGTLDriveProjectionBasic = @"BASIC"; +NSString * const kGTLDriveProjectionFull = @"FULL"; diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveFile.h.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveFile.h.svn-base new file mode 100644 index 0000000..04e0d72 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveFile.h.svn-base @@ -0,0 +1,355 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveFile.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveFile (0 custom class methods, 36 custom properties) +// GTLDriveFileExportLinks (0 custom class methods, 0 custom properties) +// GTLDriveFileImageMediaMetadata (0 custom class methods, 21 custom properties) +// GTLDriveFileIndexableText (0 custom class methods, 1 custom properties) +// GTLDriveFileLabels (0 custom class methods, 5 custom properties) +// GTLDriveFileThumbnail (0 custom class methods, 2 custom properties) +// GTLDriveFileImageMediaMetadataLocation (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveFileExportLinks; +@class GTLDriveFileImageMediaMetadata; +@class GTLDriveFileImageMediaMetadataLocation; +@class GTLDriveFileIndexableText; +@class GTLDriveFileLabels; +@class GTLDriveFileThumbnail; +@class GTLDriveParentReference; +@class GTLDrivePermission; + +// ---------------------------------------------------------------------------- +// +// GTLDriveFile +// + +// The metadata for a file. + +@interface GTLDriveFile : GTLObject + +// A link for opening the file in using a relevant Google editor or viewer. +@property (copy) NSString *alternateLink; + +// Create time for this file (formatted ISO8601 timestamp). +@property (retain) GTLDateTime *createdDate; + +// A short description of the file. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Short term download URL for the file. This will only be populated on files +// with content stored in Drive. +@property (copy) NSString *downloadUrl; + +// Whether the file can be edited by the current user. +@property (retain) NSNumber *editable; // boolValue + +// A link for embedding the file. +@property (copy) NSString *embedLink; + +// ETag of the file. +@property (copy) NSString *ETag; + +// Whether this file has been explicitly trashed, as opposed to recursively +// trashed. This will only be populated if the file is trashed. +@property (retain) NSNumber *explicitlyTrashed; // boolValue + +// Links for exporting Google Docs to specific formats. +@property (retain) GTLDriveFileExportLinks *exportLinks; + +// The file extension used when downloading this file. This field is set from +// the title when inserting or uploading new content. This will only be +// populated on files with content stored in Drive. +@property (copy) NSString *fileExtension; + +// The size of the file in bytes. This will only be populated on files with +// content stored in Drive. +@property (retain) NSNumber *fileSize; // longLongValue + +// A link to the file's icon. +@property (copy) NSString *iconLink; + +// The id of the file. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Metadata about image media. This will only be present for image types, and +// its contents will depend on what can be parsed from the image content. +@property (retain) GTLDriveFileImageMediaMetadata *imageMediaMetadata; + +// Indexable text attributes for the file (can only be written) +@property (retain) GTLDriveFileIndexableText *indexableText; + +// The type of file. This is always drive#file. +@property (copy) NSString *kind; + +// A group of labels for the file. +@property (retain) GTLDriveFileLabels *labels; + +// Name of the last user to modify this file. This will only be populated if a +// user has edited this file. +@property (copy) NSString *lastModifyingUserName; + +// Last time this file was viewed by the user (formatted RFC 3339 timestamp). +@property (retain) GTLDateTime *lastViewedByMeDate; + +// An MD5 checksum for the content of this file. This will only be populated on +// files with content stored in Drive. +@property (copy) NSString *md5Checksum; + +// The MIME type of the file. This is only mutable on update when uploading new +// content. This field can be left blank, and the mimetype will be determined +// from the uploaded content's MIME type. +@property (copy) NSString *mimeType; + +// Last time this file was modified by the user (formatted RFC 3339 timestamp). +// Note that setting modifiedDate will also update the modifiedByMe date for the +// user which set the date. +@property (retain) GTLDateTime *modifiedByMeDate; + +// Last time this file was modified by anyone (formatted RFC 3339 timestamp). +// This is only mutable on update when the setModifiedDate parameter is set. +@property (retain) GTLDateTime *modifiedDate; + +// The original filename if the file was uploaded manually, or the original +// title if the file was inserted through the API. Note that renames of the +// title will not change the original filename. This will only be populated on +// files with content stored in Drive. +@property (copy) NSString *originalFilename; + +// Name(s) of the owner(s) of this file. +@property (retain) NSArray *ownerNames; // of NSString + +// Collection of parent folders which contain this file. +// Setting this field will put the file in all of the provided folders. On +// insert, if no folders are provided, the file will be placed in the default +// root folder. +@property (retain) NSArray *parents; // of GTLDriveParentReference + +// The number of quota bytes used by this file. +@property (retain) NSNumber *quotaBytesUsed; // longLongValue + +// A link back to this file. +@property (copy) NSString *selfLink; + +// Time at which this file was shared with the user (formatted RFC 3339 +// timestamp). +@property (retain) GTLDateTime *sharedWithMeDate; + +// Thumbnail for the file. Only accepted on upload and for files that are not +// already thumbnailed by Google. +@property (retain) GTLDriveFileThumbnail *thumbnail; + +// A link to the file's thumbnail. +@property (copy) NSString *thumbnailLink; + +// The title of this file. +@property (copy) NSString *title; + +// The permissions for the authenticated user on this file. +@property (retain) GTLDrivePermission *userPermission; + +// A link for downloading the content of the file in a browser using cookie +// based authentication. In cases where the content is shared publicly, the +// content can be downloaded without any credentials. +@property (copy) NSString *webContentLink; + +// A link only available on public folders for viewing their static web assets +// (HTML, CSS, JS, etc) via Google Drive's Website Hosting. +@property (copy) NSString *webViewLink; + +// Whether writers can share the document with other users. +@property (retain) NSNumber *writersCanShare; // boolValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileExportLinks +// + +@interface GTLDriveFileExportLinks : GTLObject +// This object is documented as having more properties that are NSString. Use +// -additionalJSONKeys and -additionalPropertyForName: to get the list of +// properties and then fetch them; or -additionalProperties to fetch them all at +// once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileImageMediaMetadata +// + +@interface GTLDriveFileImageMediaMetadata : GTLObject + +// The aperture used to create the photo (f-number). +@property (retain) NSNumber *aperture; // floatValue + +// The make of the camera used to create the photo. +@property (copy) NSString *cameraMake; + +// The model of the camera used to create the photo. +@property (copy) NSString *cameraModel; + +// The color space of the photo. +@property (copy) NSString *colorSpace; + +// The date and time the photo was taken (EXIF format timestamp). +@property (copy) NSString *date; + +// The exposure bias of the photo (APEX value). +@property (retain) NSNumber *exposureBias; // floatValue + +// The exposure mode used to create the photo. +@property (copy) NSString *exposureMode; + +// The length of the exposure, in seconds. +@property (retain) NSNumber *exposureTime; // floatValue + +// Whether a flash was used to create the photo. +@property (retain) NSNumber *flashUsed; // boolValue + +// The focal length used to create the photo, in millimeters. +@property (retain) NSNumber *focalLength; // floatValue + +// The height of the image in pixels. +@property (retain) NSNumber *height; // intValue + +// The ISO speed used to create the photo. +@property (retain) NSNumber *isoSpeed; // intValue + +// The lens used to create the photo. +@property (copy) NSString *lens; + +// Geographic location information stored in the image. +@property (retain) GTLDriveFileImageMediaMetadataLocation *location; + +// The smallest f-number of the lens at the focal length used to create the +// photo (APEX value). +@property (retain) NSNumber *maxApertureValue; // floatValue + +// The metering mode used to create the photo. +@property (copy) NSString *meteringMode; + +// The rotation in clockwise degrees from the image's original orientation. +@property (retain) NSNumber *rotation; // intValue + +// The type of sensor used to create the photo. +@property (copy) NSString *sensor; + +// The distance to the subject of the photo, in meters. +@property (retain) NSNumber *subjectDistance; // intValue + +// The white balance mode used to create the photo. +@property (copy) NSString *whiteBalance; + +// The width of the image in pixels. +@property (retain) NSNumber *width; // intValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileIndexableText +// + +@interface GTLDriveFileIndexableText : GTLObject + +// The text to be indexed for this file +@property (copy) NSString *text; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileLabels +// + +@interface GTLDriveFileLabels : GTLObject + +// Whether this file is hidden from the user. +@property (retain) NSNumber *hidden; // boolValue + +// Whether viewers are prevented from downloading this file. +@property (retain) NSNumber *restricted; // boolValue + +// Whether this file is starred by the user. +@property (retain) NSNumber *starred; // boolValue + +// Whether this file has been trashed. +@property (retain) NSNumber *trashed; // boolValue + +// Whether this file has been viewed by this user. +@property (retain) NSNumber *viewed; // boolValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileThumbnail +// + +@interface GTLDriveFileThumbnail : GTLObject + +// The URL-safe Base64 encoded bytes of the thumbnail image. +@property (copy) NSString *image; // GTLBase64 can encode/decode (probably web-safe format) + +// The MIME type of the thumbnail. +@property (copy) NSString *mimeType; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileImageMediaMetadataLocation +// + +@interface GTLDriveFileImageMediaMetadataLocation : GTLObject + +// The altitude stored in the image. +@property (retain) NSNumber *altitude; // doubleValue + +// The latitude stored in the image. +@property (retain) NSNumber *latitude; // doubleValue + +// The longitude stored in the image. +@property (retain) NSNumber *longitude; // doubleValue + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveFile.m.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveFile.m.svn-base new file mode 100644 index 0000000..a8ebe9b --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveFile.m.svn-base @@ -0,0 +1,147 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveFile.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveFile (0 custom class methods, 36 custom properties) +// GTLDriveFileExportLinks (0 custom class methods, 0 custom properties) +// GTLDriveFileImageMediaMetadata (0 custom class methods, 21 custom properties) +// GTLDriveFileIndexableText (0 custom class methods, 1 custom properties) +// GTLDriveFileLabels (0 custom class methods, 5 custom properties) +// GTLDriveFileThumbnail (0 custom class methods, 2 custom properties) +// GTLDriveFileImageMediaMetadataLocation (0 custom class methods, 3 custom properties) + +#import "GTLDriveFile.h" + +#import "GTLDriveParentReference.h" +#import "GTLDrivePermission.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveFile +// + +@implementation GTLDriveFile +@dynamic alternateLink, createdDate, descriptionProperty, downloadUrl, editable, + embedLink, ETag, explicitlyTrashed, exportLinks, fileExtension, + fileSize, iconLink, identifier, imageMediaMetadata, indexableText, + kind, labels, lastModifyingUserName, lastViewedByMeDate, md5Checksum, + mimeType, modifiedByMeDate, modifiedDate, originalFilename, ownerNames, + parents, quotaBytesUsed, selfLink, sharedWithMeDate, thumbnail, + thumbnailLink, title, userPermission, webContentLink, webViewLink, + writersCanShare; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"ownerNames", + [GTLDriveParentReference class], @"parents", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#file"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileExportLinks +// + +@implementation GTLDriveFileExportLinks + ++ (Class)classForAdditionalProperties { + return [NSString class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileImageMediaMetadata +// + +@implementation GTLDriveFileImageMediaMetadata +@dynamic aperture, cameraMake, cameraModel, colorSpace, date, exposureBias, + exposureMode, exposureTime, flashUsed, focalLength, height, isoSpeed, + lens, location, maxApertureValue, meteringMode, rotation, sensor, + subjectDistance, whiteBalance, width; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileIndexableText +// + +@implementation GTLDriveFileIndexableText +@dynamic text; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileLabels +// + +@implementation GTLDriveFileLabels +@dynamic hidden, restricted, starred, trashed, viewed; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileThumbnail +// + +@implementation GTLDriveFileThumbnail +@dynamic image, mimeType; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileImageMediaMetadataLocation +// + +@implementation GTLDriveFileImageMediaMetadataLocation +@dynamic altitude, latitude, longitude; +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveFileList.h.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveFileList.h.svn-base new file mode 100644 index 0000000..5ffdfa3 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveFileList.h.svn-base @@ -0,0 +1,69 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveFileList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveFileList (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveFile; + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileList +// + +// A list of files. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLDriveFileList : GTLCollectionObject + +// The ETag of the list. +@property (copy) NSString *ETag; + +// The actual list of files. +@property (retain) NSArray *items; // of GTLDriveFile + +// This is always drive#fileList. +@property (copy) NSString *kind; + +// A link to the next page of files. +@property (copy) NSString *nextLink; + +// The page token for the next page of files. +@property (copy) NSString *nextPageToken; + +// A link back to this list. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveFileList.m.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveFileList.m.svn-base new file mode 100644 index 0000000..f90b93c --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveFileList.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveFileList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveFileList (0 custom class methods, 6 custom properties) + +#import "GTLDriveFileList.h" + +#import "GTLDriveFile.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileList +// + +@implementation GTLDriveFileList +@dynamic ETag, items, kind, nextLink, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLDriveFile class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#fileList"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveParentList.h.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveParentList.h.svn-base new file mode 100644 index 0000000..1c6ae12 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveParentList.h.svn-base @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveParentList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveParentList (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveParentReference; + +// ---------------------------------------------------------------------------- +// +// GTLDriveParentList +// + +// A list of a file's parents. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLDriveParentList : GTLCollectionObject + +// The ETag of the list. +@property (copy) NSString *ETag; + +// The actual list of parents. +@property (retain) NSArray *items; // of GTLDriveParentReference + +// This is always drive#parentList. +@property (copy) NSString *kind; + +// A link back to this list. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveParentList.m.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveParentList.m.svn-base new file mode 100644 index 0000000..e4c9736 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveParentList.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveParentList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveParentList (0 custom class methods, 4 custom properties) + +#import "GTLDriveParentList.h" + +#import "GTLDriveParentReference.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveParentList +// + +@implementation GTLDriveParentList +@dynamic ETag, items, kind, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLDriveParentReference class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#parentList"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveParentReference.h.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveParentReference.h.svn-base new file mode 100644 index 0000000..bdc8716 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveParentReference.h.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveParentReference.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveParentReference (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLDriveParentReference +// + +// A reference to a file's parent. + +@interface GTLDriveParentReference : GTLObject + +// The ID of the parent. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Whether or not the parent is the root folder. +@property (retain) NSNumber *isRoot; // boolValue + +// This is always drive#parentReference. +@property (copy) NSString *kind; + +// A link to the parent. +@property (copy) NSString *parentLink; + +// A link back to this reference. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveParentReference.m.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveParentReference.m.svn-base new file mode 100644 index 0000000..dc12c3f --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveParentReference.m.svn-base @@ -0,0 +1,52 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveParentReference.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveParentReference (0 custom class methods, 5 custom properties) + +#import "GTLDriveParentReference.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveParentReference +// + +@implementation GTLDriveParentReference +@dynamic identifier, isRoot, kind, parentLink, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#parentReference"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDrivePermission.h.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDrivePermission.h.svn-base new file mode 100644 index 0000000..843b975 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDrivePermission.h.svn-base @@ -0,0 +1,91 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDrivePermission.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDrivePermission (0 custom class methods, 12 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLDrivePermission +// + +// A single permission for a file. + +@interface GTLDrivePermission : GTLObject + +// Additional roles for this user. Only commenter is currently allowed. +@property (retain) NSArray *additionalRoles; // of NSString + +// The authkey parameter required for this permission. +@property (copy) NSString *authKey; + +// The ETag of the permission. +@property (copy) NSString *ETag; + +// The ID of the permission. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// This is always drive#permission. +@property (copy) NSString *kind; + +// The name for this permission. +@property (copy) NSString *name; + +// A link to the profile photo, if available. +@property (copy) NSString *photoLink; + +// The primary role for this user. Allowed values are: +// - owner +// - reader +// - writer +@property (copy) NSString *role; + +// A link back to this permission. +@property (copy) NSString *selfLink; + +// The account type. Allowed values are: +// - user +// - group +// - domain +// - anyone +@property (copy) NSString *type; + +// The email address or domain name for the entity. This is not populated in +// responses. +@property (copy) NSString *value; + +// Whether the link is required for this permission. +@property (retain) NSNumber *withLink; // boolValue + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDrivePermission.m.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDrivePermission.m.svn-base new file mode 100644 index 0000000..0b0ffdd --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDrivePermission.m.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDrivePermission.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDrivePermission (0 custom class methods, 12 custom properties) + +#import "GTLDrivePermission.h" + +// ---------------------------------------------------------------------------- +// +// GTLDrivePermission +// + +@implementation GTLDrivePermission +@dynamic additionalRoles, authKey, ETag, identifier, kind, name, photoLink, + role, selfLink, type, value, withLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"additionalRoles"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#permission"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDrivePermissionList.h.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDrivePermissionList.h.svn-base new file mode 100644 index 0000000..5bd9c25 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDrivePermissionList.h.svn-base @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDrivePermissionList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDrivePermissionList (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDrivePermission; + +// ---------------------------------------------------------------------------- +// +// GTLDrivePermissionList +// + +// A list of permissions associated with a file. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLDrivePermissionList : GTLCollectionObject + +// The ETag of the list. +@property (copy) NSString *ETag; + +// The actual list of permissions. +@property (retain) NSArray *items; // of GTLDrivePermission + +// This is always drive#permissionList. +@property (copy) NSString *kind; + +// A link back to this list. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDrivePermissionList.m.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDrivePermissionList.m.svn-base new file mode 100644 index 0000000..1d92b94 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDrivePermissionList.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDrivePermissionList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDrivePermissionList (0 custom class methods, 4 custom properties) + +#import "GTLDrivePermissionList.h" + +#import "GTLDrivePermission.h" + +// ---------------------------------------------------------------------------- +// +// GTLDrivePermissionList +// + +@implementation GTLDrivePermissionList +@dynamic ETag, items, kind, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLDrivePermission class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#permissionList"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveRevision.h.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveRevision.h.svn-base new file mode 100644 index 0000000..a255a11 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveRevision.h.svn-base @@ -0,0 +1,125 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveRevision.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveRevision (0 custom class methods, 17 custom properties) +// GTLDriveRevisionExportLinks (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveRevisionExportLinks; + +// ---------------------------------------------------------------------------- +// +// GTLDriveRevision +// + +// A single revision of a file. + +@interface GTLDriveRevision : GTLObject + +// Short term download URL for the file. This will only be populated on files +// with content stored in Drive. +@property (copy) NSString *downloadUrl; + +// The ETag of the revision. +@property (copy) NSString *ETag; + +// Links for exporting Google Docs to specific formats. +@property (retain) GTLDriveRevisionExportLinks *exportLinks; + +// The size of the revision in bytes. This will only be populated on files with +// content stored in Drive. +@property (retain) NSNumber *fileSize; // longLongValue + +// The ID of the revision. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// This is always drive#revision. +@property (copy) NSString *kind; + +// Name of the last user to modify this revision. +@property (copy) NSString *lastModifyingUserName; + +// An MD5 checksum for the content of this revision. This will only be populated +// on files with content stored in Drive. +@property (copy) NSString *md5Checksum; + +// The MIME type of the revision. +@property (copy) NSString *mimeType; + +// Last time this revision was modified (formatted RFC 3339 timestamp). +@property (retain) GTLDateTime *modifiedDate; + +// The original filename when this revision was created. This will only be +// populated on files with content stored in Drive. +@property (copy) NSString *originalFilename; + +// Whether this revision is pinned to prevent automatic purging. This will only +// be populated and can only be modified on files with content stored in Drive +// which are not Google Docs. Revisions can also be pinned when they are created +// through the drive.files.insert/update/copy by using the pinned query +// parameter. +@property (retain) NSNumber *pinned; // boolValue + +// Whether subsequent revisions will be automatically republished. This is only +// populated and can only be modified for Google Docs. +@property (retain) NSNumber *publishAuto; // boolValue + +// Whether this revision is published. This is only populated and can only be +// modified for Google Docs. +@property (retain) NSNumber *published; // boolValue + +// A link to the published revision. +@property (copy) NSString *publishedLink; + +// Whether this revision is published outside the domain. This is only populated +// and can only be modified for Google Docs. +@property (retain) NSNumber *publishedOutsideDomain; // boolValue + +// A link back to this revision. +@property (copy) NSString *selfLink; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveRevisionExportLinks +// + +@interface GTLDriveRevisionExportLinks : GTLObject +// This object is documented as having more properties that are NSString. Use +// -additionalJSONKeys and -additionalPropertyForName: to get the list of +// properties and then fetch them; or -additionalProperties to fetch them all at +// once. +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveRevision.m.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveRevision.m.svn-base new file mode 100644 index 0000000..ee05afe --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveRevision.m.svn-base @@ -0,0 +1,72 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveRevision.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveRevision (0 custom class methods, 17 custom properties) +// GTLDriveRevisionExportLinks (0 custom class methods, 0 custom properties) + +#import "GTLDriveRevision.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveRevision +// + +@implementation GTLDriveRevision +@dynamic downloadUrl, ETag, exportLinks, fileSize, identifier, kind, + lastModifyingUserName, md5Checksum, mimeType, modifiedDate, + originalFilename, pinned, publishAuto, published, publishedLink, + publishedOutsideDomain, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#revision"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveRevisionExportLinks +// + +@implementation GTLDriveRevisionExportLinks + ++ (Class)classForAdditionalProperties { + return [NSString class]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveRevisionList.h.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveRevisionList.h.svn-base new file mode 100644 index 0000000..72c1faf --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveRevisionList.h.svn-base @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveRevisionList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveRevisionList (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveRevision; + +// ---------------------------------------------------------------------------- +// +// GTLDriveRevisionList +// + +// A list of revisions of a file. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLDriveRevisionList : GTLCollectionObject + +// The ETag of the list. +@property (copy) NSString *ETag; + +// The actual list of revisions. +@property (retain) NSArray *items; // of GTLDriveRevision + +// This is always drive#revisionList. +@property (copy) NSString *kind; + +// A link back to this list. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveRevisionList.m.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveRevisionList.m.svn-base new file mode 100644 index 0000000..3bdf6c7 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveRevisionList.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveRevisionList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveRevisionList (0 custom class methods, 4 custom properties) + +#import "GTLDriveRevisionList.h" + +#import "GTLDriveRevision.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveRevisionList +// + +@implementation GTLDriveRevisionList +@dynamic ETag, items, kind, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLDriveRevision class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#revisionList"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveUser.h.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveUser.h.svn-base new file mode 100644 index 0000000..5437175 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveUser.h.svn-base @@ -0,0 +1,75 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveUser.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveUser (0 custom class methods, 4 custom properties) +// GTLDriveUserPicture (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveUserPicture; + +// ---------------------------------------------------------------------------- +// +// GTLDriveUser +// + +// The JSON template for a user. + +@interface GTLDriveUser : GTLObject + +// A plain text displayable name for this user. +@property (copy) NSString *displayName; + +// Whether this user is the same as the authenticated user of which the request +// was made on behalf. +@property (retain) NSNumber *isAuthenticatedUser; // boolValue + +// This is always drive#user. +@property (copy) NSString *kind; + +// The user's profile picture. +@property (retain) GTLDriveUserPicture *picture; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveUserPicture +// + +@interface GTLDriveUserPicture : GTLObject + +// A URL that points to a profile picture of this user. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveUser.m.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveUser.m.svn-base new file mode 100644 index 0000000..eb8e8f9 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDriveUser.m.svn-base @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveUser.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveUser (0 custom class methods, 4 custom properties) +// GTLDriveUserPicture (0 custom class methods, 1 custom properties) + +#import "GTLDriveUser.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveUser +// + +@implementation GTLDriveUser +@dynamic displayName, isAuthenticatedUser, kind, picture; + ++ (void)load { + [self registerObjectClassForKind:@"drive#user"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveUserPicture +// + +@implementation GTLDriveUserPicture +@dynamic url; +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDrive_Sources.m.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDrive_Sources.m.svn-base new file mode 100644 index 0000000..7e17ca9 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLDrive_Sources.m.svn-base @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDrive_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ + +#import "GTLDriveConstants.m" + +#import "GTLDriveAbout.m" +#import "GTLDriveApp.m" +#import "GTLDriveAppList.m" +#import "GTLDriveChange.m" +#import "GTLDriveChangeList.m" +#import "GTLDriveChildList.m" +#import "GTLDriveChildReference.m" +#import "GTLDriveComment.m" +#import "GTLDriveCommentList.m" +#import "GTLDriveCommentReply.m" +#import "GTLDriveCommentReplyList.m" +#import "GTLDriveFile.m" +#import "GTLDriveFileList.m" +#import "GTLDriveParentList.m" +#import "GTLDriveParentReference.m" +#import "GTLDrivePermission.m" +#import "GTLDrivePermissionList.m" +#import "GTLDriveRevision.m" +#import "GTLDriveRevisionList.m" +#import "GTLDriveUser.m" + +#import "GTLQueryDrive.m" +#import "GTLServiceDrive.m" diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLQueryDrive.h.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLQueryDrive.h.svn-base new file mode 100644 index 0000000..2ed817e --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLQueryDrive.h.svn-base @@ -0,0 +1,796 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryDrive.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLQueryDrive (46 custom class methods, 32 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLDriveChildReference; +@class GTLDriveComment; +@class GTLDriveCommentReply; +@class GTLDriveFile; +@class GTLDriveParentReference; +@class GTLDrivePermission; +@class GTLDriveRevision; + +@interface GTLQueryDrive : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *appId; +@property (copy) NSString *changeId; +@property (copy) NSString *childId; +@property (copy) NSString *commentId; +@property (assign) BOOL convert; +@property (copy) NSString *fileId; +@property (copy) NSString *folderId; +@property (assign) BOOL includeDeleted; +@property (assign) BOOL includeSubscribed; +@property (assign) long long maxChangeIdCount; +@property (assign) NSInteger maxResults; +@property (assign) BOOL newRevision; +@property (assign) BOOL ocr; +@property (copy) NSString *ocrLanguage; +@property (copy) NSString *pageToken; +@property (copy) NSString *parentId; +@property (copy) NSString *permissionId; +@property (assign) BOOL pinned; +@property (copy) NSString *projection; +@property (copy) NSString *q; +@property (copy) NSString *replyId; +@property (copy) NSString *revisionId; +@property (assign) BOOL sendNotificationEmails; +@property (assign) BOOL setModifiedDate; +@property (copy) NSString *sourceLanguage; +@property (assign) long long startChangeId; +@property (copy) NSString *targetLanguage; +@property (copy) NSString *timedTextLanguage; +@property (copy) NSString *timedTextTrackName; +@property (copy) NSString *updatedMin; +@property (assign) BOOL updateViewedDate; + +#pragma mark - +#pragma mark "about" methods +// These create a GTLQueryDrive object. + +// Method: drive.about.get +// Gets the information about the current user along with Drive API settings +// Optional: +// includeSubscribed: When calculating the number of remaining change IDs, +// whether to include shared files and public files the user has opened. +// When set to false, this counts only change IDs for owned files and any +// shared or public files that the user has explictly added to a folder in +// Drive. (Default true) +// maxChangeIdCount: Maximum number of remaining change IDs to count (Default +// 1) +// startChangeId: Change ID to start counting from when calculating number of +// remaining change IDs +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveAbout. ++ (id)queryForAboutGet; + +#pragma mark - +#pragma mark "apps" methods +// These create a GTLQueryDrive object. + +// Method: drive.apps.get +// Gets a specific app. +// Required: +// appId: The ID of the app. +// Authorization scope(s): +// kGTLAuthScopeDriveAppsReadonly +// Fetches a GTLDriveApp. ++ (id)queryForAppsGetWithAppId:(NSString *)appId; + +// Method: drive.apps.list +// Lists a user's apps. +// Authorization scope(s): +// kGTLAuthScopeDriveAppsReadonly +// Fetches a GTLDriveAppList. ++ (id)queryForAppsList; + +#pragma mark - +#pragma mark "changes" methods +// These create a GTLQueryDrive object. + +// Method: drive.changes.get +// Gets a specific change. +// Required: +// changeId: The ID of the change. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveChange. ++ (id)queryForChangesGetWithChangeId:(NSString *)changeId; + +// Method: drive.changes.list +// Lists the changes for a user. +// Optional: +// includeDeleted: Whether to include deleted items. (Default true) +// includeSubscribed: Whether to include shared files and public files the +// user has opened. When set to false, the list will include owned files +// plus any shared or public files the user has explictly added to a folder +// in Drive. (Default true) +// maxResults: Maximum number of changes to return. (Default 100) +// pageToken: Page token for changes. +// startChangeId: Change ID to start listing changes from. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveChangeList. ++ (id)queryForChangesList; + +#pragma mark - +#pragma mark "children" methods +// These create a GTLQueryDrive object. + +// Method: drive.children.delete +// Removes a child from a folder. +// Required: +// folderId: The ID of the folder. +// childId: The ID of the child. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile ++ (id)queryForChildrenDeleteWithFolderId:(NSString *)folderId + childId:(NSString *)childId; + +// Method: drive.children.get +// Gets a specific child reference. +// Required: +// folderId: The ID of the folder. +// childId: The ID of the child. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveChildReference. ++ (id)queryForChildrenGetWithFolderId:(NSString *)folderId + childId:(NSString *)childId; + +// Method: drive.children.insert +// Inserts a file into a folder. +// Required: +// folderId: The ID of the folder. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDriveChildReference. ++ (id)queryForChildrenInsertWithObject:(GTLDriveChildReference *)object + folderId:(NSString *)folderId; + +// Method: drive.children.list +// Lists a folder's children. +// Required: +// folderId: The ID of the folder. +// Optional: +// maxResults: Maximum number of children to return. (Default 100) +// pageToken: Page token for children. +// q: Query string for searching children. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveChildList. ++ (id)queryForChildrenListWithFolderId:(NSString *)folderId; + +#pragma mark - +#pragma mark "comments" methods +// These create a GTLQueryDrive object. + +// Method: drive.comments.delete +// Deletes a comment. +// Required: +// fileId: The ID of the file. +// commentId: The ID of the comment. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveReadonly ++ (id)queryForCommentsDeleteWithFileId:(NSString *)fileId + commentId:(NSString *)commentId; + +// Method: drive.comments.get +// Gets a comment by ID. +// Required: +// fileId: The ID of the file. +// commentId: The ID of the comment. +// Optional: +// includeDeleted: If set, this will succeed when retrieving a deleted +// comment, and will include any deleted replies. (Default false) +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveComment. ++ (id)queryForCommentsGetWithFileId:(NSString *)fileId + commentId:(NSString *)commentId; + +// Method: drive.comments.insert +// Creates a new comment on the given file. +// Required: +// fileId: The ID of the file. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveComment. ++ (id)queryForCommentsInsertWithObject:(GTLDriveComment *)object + fileId:(NSString *)fileId; + +// Method: drive.comments.list +// Lists a file's comments. +// Required: +// fileId: The ID of the file. +// Optional: +// includeDeleted: If set, all comments and replies, including deleted +// comments and replies (with content stripped) will be returned. (Default +// false) +// maxResults: The maximum number of discussions to include in the response, +// used for paging. (0..100, default 20) +// pageToken: The continuation token, used to page through large result sets. +// To get the next page of results, set this parameter to the value of +// "nextPageToken" from the previous response. +// updatedMin: Only discussions that were updated after this timestamp will be +// returned. Formatted as an RFC 3339 timestamp. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveCommentList. ++ (id)queryForCommentsListWithFileId:(NSString *)fileId; + +// Method: drive.comments.patch +// Updates an existing comment. This method supports patch semantics. +// Required: +// fileId: The ID of the file. +// commentId: The ID of the comment. +// Authorization scope(s): +// kGTLAuthScopeDrive +// Fetches a GTLDriveComment. ++ (id)queryForCommentsPatchWithObject:(GTLDriveComment *)object + fileId:(NSString *)fileId + commentId:(NSString *)commentId; + +// Method: drive.comments.update +// Updates an existing comment. +// Required: +// fileId: The ID of the file. +// commentId: The ID of the comment. +// Authorization scope(s): +// kGTLAuthScopeDrive +// Fetches a GTLDriveComment. ++ (id)queryForCommentsUpdateWithObject:(GTLDriveComment *)object + fileId:(NSString *)fileId + commentId:(NSString *)commentId; + +#pragma mark - +#pragma mark "files" methods +// These create a GTLQueryDrive object. + +// Method: drive.files.copy +// Creates a copy of the specified file. +// Required: +// fileId: The ID of the file to copy. +// Optional: +// convert: Whether to convert this file to the corresponding Google Docs +// format. (Default false) +// ocr: Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. (Default +// false) +// ocrLanguage: If ocr is true, hints at the language to use. Valid values are +// ISO 639-1 codes. +// pinned: Whether to pin the head revision of the new copy. (Default false) +// sourceLanguage: The language of the original file to be translated. +// targetLanguage: Target language to translate the file to. If no +// sourceLanguage is provided, the API will attempt to detect the language. +// timedTextLanguage: The language of the timed text. +// timedTextTrackName: The timed text track name. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDriveFile. ++ (id)queryForFilesCopyWithObject:(GTLDriveFile *)object + fileId:(NSString *)fileId; + +// Method: drive.files.delete +// Permanently deletes a file by ID. Skips the trash. +// Required: +// fileId: The ID of the file to delete. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile ++ (id)queryForFilesDeleteWithFileId:(NSString *)fileId; + +// Method: drive.files.get +// Gets a file's metadata by ID. +// Required: +// fileId: The ID for the file in question. +// Optional: +// projection: This parameter is deprecated and has no function. +// kGTLDriveProjectionBasic: Deprecated +// kGTLDriveProjectionFull: Deprecated +// updateViewedDate: Whether to update the view date after successfully +// retrieving the file. (Default false) +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveFile. ++ (id)queryForFilesGetWithFileId:(NSString *)fileId; + +// Method: drive.files.insert +// Insert a new file. +// Optional: +// convert: Whether to convert this file to the corresponding Google Docs +// format. (Default false) +// ocr: Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. (Default +// false) +// ocrLanguage: If ocr is true, hints at the language to use. Valid values are +// ISO 639-1 codes. +// pinned: Whether to pin the head revision of the uploaded file. (Default +// false) +// sourceLanguage: The language of the original file to be translated. +// targetLanguage: Target language to translate the file to. If no +// sourceLanguage is provided, the API will attempt to detect the language. +// timedTextLanguage: The language of the timed text. +// timedTextTrackName: The timed text track name. +// Upload Parameters: +// Maximum size: 10GB +// Accepted MIME type(s): */* +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDriveFile. ++ (id)queryForFilesInsertWithObject:(GTLDriveFile *)object + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil; + +// Method: drive.files.list +// Lists the user's files. +// Optional: +// maxResults: Maximum number of files to return. (Default 100) +// pageToken: Page token for files. +// projection: This parameter is deprecated and has no function. +// kGTLDriveProjectionBasic: Deprecated +// kGTLDriveProjectionFull: Deprecated +// q: Query string for searching files. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveFileList. ++ (id)queryForFilesList; + +// Method: drive.files.patch +// Updates file metadata and/or content. This method supports patch semantics. +// Required: +// fileId: The ID of the file to update. +// Optional: +// convert: Whether to convert this file to the corresponding Google Docs +// format. (Default false) +// newRevision: Whether a blob upload should create a new revision. If false, +// the blob data in the current head revision will be replaced. (Default +// true) +// ocr: Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. (Default +// false) +// ocrLanguage: If ocr is true, hints at the language to use. Valid values are +// ISO 639-1 codes. +// pinned: Whether to pin the new revision. (Default false) +// setModifiedDate: Whether to set the modified date with the supplied +// modified date. (Default false) +// sourceLanguage: The language of the original file to be translated. +// targetLanguage: Target language to translate the file to. If no +// sourceLanguage is provided, the API will attempt to detect the language. +// timedTextLanguage: The language of the timed text. +// timedTextTrackName: The timed text track name. +// updateViewedDate: Whether to update the view date after successfully +// updating the file. (Default true) +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDriveFile. ++ (id)queryForFilesPatchWithObject:(GTLDriveFile *)object + fileId:(NSString *)fileId; + +// Method: drive.files.touch +// Set the file's updated time to the current server time. +// Required: +// fileId: The ID of the file to update. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDriveFile. ++ (id)queryForFilesTouchWithFileId:(NSString *)fileId; + +// Method: drive.files.trash +// Moves a file to the trash. +// Required: +// fileId: The ID of the file to trash. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDriveFile. ++ (id)queryForFilesTrashWithFileId:(NSString *)fileId; + +// Method: drive.files.untrash +// Restores a file from the trash. +// Required: +// fileId: The ID of the file to untrash. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDriveFile. ++ (id)queryForFilesUntrashWithFileId:(NSString *)fileId; + +// Method: drive.files.update +// Updates file metadata and/or content +// Required: +// fileId: The ID of the file to update. +// Optional: +// convert: Whether to convert this file to the corresponding Google Docs +// format. (Default false) +// newRevision: Whether a blob upload should create a new revision. If false, +// the blob data in the current head revision will be replaced. (Default +// true) +// ocr: Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. (Default +// false) +// ocrLanguage: If ocr is true, hints at the language to use. Valid values are +// ISO 639-1 codes. +// pinned: Whether to pin the new revision. (Default false) +// setModifiedDate: Whether to set the modified date with the supplied +// modified date. (Default false) +// sourceLanguage: The language of the original file to be translated. +// targetLanguage: Target language to translate the file to. If no +// sourceLanguage is provided, the API will attempt to detect the language. +// timedTextLanguage: The language of the timed text. +// timedTextTrackName: The timed text track name. +// updateViewedDate: Whether to update the view date after successfully +// updating the file. (Default true) +// Upload Parameters: +// Maximum size: 10GB +// Accepted MIME type(s): */* +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDriveFile. ++ (id)queryForFilesUpdateWithObject:(GTLDriveFile *)object + fileId:(NSString *)fileId + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil; + +#pragma mark - +#pragma mark "parents" methods +// These create a GTLQueryDrive object. + +// Method: drive.parents.delete +// Removes a parent from a file. +// Required: +// fileId: The ID of the file. +// parentId: The ID of the parent. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile ++ (id)queryForParentsDeleteWithFileId:(NSString *)fileId + parentId:(NSString *)parentId; + +// Method: drive.parents.get +// Gets a specific parent reference. +// Required: +// fileId: The ID of the file. +// parentId: The ID of the parent. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveParentReference. ++ (id)queryForParentsGetWithFileId:(NSString *)fileId + parentId:(NSString *)parentId; + +// Method: drive.parents.insert +// Adds a parent folder for a file. +// Required: +// fileId: The ID of the file. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDriveParentReference. ++ (id)queryForParentsInsertWithObject:(GTLDriveParentReference *)object + fileId:(NSString *)fileId; + +// Method: drive.parents.list +// Lists a file's parents. +// Required: +// fileId: The ID of the file. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveParentList. ++ (id)queryForParentsListWithFileId:(NSString *)fileId; + +#pragma mark - +#pragma mark "permissions" methods +// These create a GTLQueryDrive object. + +// Method: drive.permissions.delete +// Deletes a permission from a file. +// Required: +// fileId: The ID for the file. +// permissionId: The ID for the permission. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile ++ (id)queryForPermissionsDeleteWithFileId:(NSString *)fileId + permissionId:(NSString *)permissionId; + +// Method: drive.permissions.get +// Gets a permission by ID. +// Required: +// fileId: The ID for the file. +// permissionId: The ID for the permission. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDrivePermission. ++ (id)queryForPermissionsGetWithFileId:(NSString *)fileId + permissionId:(NSString *)permissionId; + +// Method: drive.permissions.insert +// Inserts a permission for a file. +// Required: +// fileId: The ID for the file. +// Optional: +// sendNotificationEmails: Whether to send notification emails. (Default true) +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDrivePermission. ++ (id)queryForPermissionsInsertWithObject:(GTLDrivePermission *)object + fileId:(NSString *)fileId; + +// Method: drive.permissions.list +// Lists a file's permissions. +// Required: +// fileId: The ID for the file. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDrivePermissionList. ++ (id)queryForPermissionsListWithFileId:(NSString *)fileId; + +// Method: drive.permissions.patch +// Updates a permission. This method supports patch semantics. +// Required: +// fileId: The ID for the file. +// permissionId: The ID for the permission. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDrivePermission. ++ (id)queryForPermissionsPatchWithObject:(GTLDrivePermission *)object + fileId:(NSString *)fileId + permissionId:(NSString *)permissionId; + +// Method: drive.permissions.update +// Updates a permission. +// Required: +// fileId: The ID for the file. +// permissionId: The ID for the permission. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDrivePermission. ++ (id)queryForPermissionsUpdateWithObject:(GTLDrivePermission *)object + fileId:(NSString *)fileId + permissionId:(NSString *)permissionId; + +#pragma mark - +#pragma mark "replies" methods +// These create a GTLQueryDrive object. + +// Method: drive.replies.delete +// Deletes a reply. +// Required: +// fileId: The ID of the file. +// commentId: The ID of the comment. +// replyId: The ID of the reply. +// Authorization scope(s): +// kGTLAuthScopeDrive ++ (id)queryForRepliesDeleteWithFileId:(NSString *)fileId + commentId:(NSString *)commentId + replyId:(NSString *)replyId; + +// Method: drive.replies.get +// Gets a reply. +// Required: +// fileId: The ID of the file. +// commentId: The ID of the comment. +// replyId: The ID of the reply. +// Optional: +// includeDeleted: If set, this will succeed when retrieving a deleted reply. +// (Default false) +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveCommentReply. ++ (id)queryForRepliesGetWithFileId:(NSString *)fileId + commentId:(NSString *)commentId + replyId:(NSString *)replyId; + +// Method: drive.replies.insert +// Creates a new reply to the given comment. +// Required: +// fileId: The ID of the file. +// commentId: The ID of the comment. +// Authorization scope(s): +// kGTLAuthScopeDrive +// Fetches a GTLDriveCommentReply. ++ (id)queryForRepliesInsertWithObject:(GTLDriveCommentReply *)object + fileId:(NSString *)fileId + commentId:(NSString *)commentId; + +// Method: drive.replies.list +// Lists all of the replies to a comment. +// Required: +// fileId: The ID of the file. +// commentId: The ID of the comment. +// Optional: +// includeDeleted: If set, all replies, including deleted replies (with +// content stripped) will be returned. (Default false) +// maxResults: The maximum number of replies to include in the response, used +// for paging. (0..100, default 20) +// pageToken: The continuation token, used to page through large result sets. +// To get the next page of results, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveCommentReplyList. ++ (id)queryForRepliesListWithFileId:(NSString *)fileId + commentId:(NSString *)commentId; + +// Method: drive.replies.patch +// Updates an existing reply. This method supports patch semantics. +// Required: +// fileId: The ID of the file. +// commentId: The ID of the comment. +// replyId: The ID of the reply. +// Authorization scope(s): +// kGTLAuthScopeDrive +// Fetches a GTLDriveCommentReply. ++ (id)queryForRepliesPatchWithObject:(GTLDriveCommentReply *)object + fileId:(NSString *)fileId + commentId:(NSString *)commentId + replyId:(NSString *)replyId; + +// Method: drive.replies.update +// Updates an existing reply. +// Required: +// fileId: The ID of the file. +// commentId: The ID of the comment. +// replyId: The ID of the reply. +// Authorization scope(s): +// kGTLAuthScopeDrive +// Fetches a GTLDriveCommentReply. ++ (id)queryForRepliesUpdateWithObject:(GTLDriveCommentReply *)object + fileId:(NSString *)fileId + commentId:(NSString *)commentId + replyId:(NSString *)replyId; + +#pragma mark - +#pragma mark "revisions" methods +// These create a GTLQueryDrive object. + +// Method: drive.revisions.delete +// Removes a revision. +// Required: +// fileId: The ID of the file. +// revisionId: The ID of the revision. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile ++ (id)queryForRevisionsDeleteWithFileId:(NSString *)fileId + revisionId:(NSString *)revisionId; + +// Method: drive.revisions.get +// Gets a specific revision. +// Required: +// fileId: The ID of the file. +// revisionId: The ID of the revision. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveRevision. ++ (id)queryForRevisionsGetWithFileId:(NSString *)fileId + revisionId:(NSString *)revisionId; + +// Method: drive.revisions.list +// Lists a file's revisions. +// Required: +// fileId: The ID of the file. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveRevisionList. ++ (id)queryForRevisionsListWithFileId:(NSString *)fileId; + +// Method: drive.revisions.patch +// Updates a revision. This method supports patch semantics. +// Required: +// fileId: The ID for the file. +// revisionId: The ID for the revision. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDriveRevision. ++ (id)queryForRevisionsPatchWithObject:(GTLDriveRevision *)object + fileId:(NSString *)fileId + revisionId:(NSString *)revisionId; + +// Method: drive.revisions.update +// Updates a revision. +// Required: +// fileId: The ID for the file. +// revisionId: The ID for the revision. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDriveRevision. ++ (id)queryForRevisionsUpdateWithObject:(GTLDriveRevision *)object + fileId:(NSString *)fileId + revisionId:(NSString *)revisionId; + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLQueryDrive.m.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLQueryDrive.m.svn-base new file mode 100644 index 0000000..77fd0ed --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLQueryDrive.m.svn-base @@ -0,0 +1,615 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryDrive.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLQueryDrive (46 custom class methods, 32 custom properties) + +#import "GTLQueryDrive.h" + +#import "GTLDriveAbout.h" +#import "GTLDriveApp.h" +#import "GTLDriveAppList.h" +#import "GTLDriveChange.h" +#import "GTLDriveChangeList.h" +#import "GTLDriveChildList.h" +#import "GTLDriveChildReference.h" +#import "GTLDriveComment.h" +#import "GTLDriveCommentList.h" +#import "GTLDriveCommentReply.h" +#import "GTLDriveCommentReplyList.h" +#import "GTLDriveFile.h" +#import "GTLDriveFileList.h" +#import "GTLDriveParentList.h" +#import "GTLDriveParentReference.h" +#import "GTLDrivePermission.h" +#import "GTLDrivePermissionList.h" +#import "GTLDriveRevision.h" +#import "GTLDriveRevisionList.h" + +@implementation GTLQueryDrive + +@dynamic appId, changeId, childId, commentId, convert, fields, fileId, folderId, + includeDeleted, includeSubscribed, maxChangeIdCount, maxResults, + newRevision, ocr, ocrLanguage, pageToken, parentId, permissionId, + pinned, projection, q, replyId, revisionId, sendNotificationEmails, + setModifiedDate, sourceLanguage, startChangeId, targetLanguage, + timedTextLanguage, timedTextTrackName, updatedMin, updateViewedDate; + +#pragma mark - +#pragma mark "about" methods +// These create a GTLQueryDrive object. + ++ (id)queryForAboutGet { + NSString *methodName = @"drive.about.get"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLDriveAbout class]; + return query; +} + +#pragma mark - +#pragma mark "apps" methods +// These create a GTLQueryDrive object. + ++ (id)queryForAppsGetWithAppId:(NSString *)appId { + NSString *methodName = @"drive.apps.get"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.appId = appId; + query.expectedObjectClass = [GTLDriveApp class]; + return query; +} + ++ (id)queryForAppsList { + NSString *methodName = @"drive.apps.list"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLDriveAppList class]; + return query; +} + +#pragma mark - +#pragma mark "changes" methods +// These create a GTLQueryDrive object. + ++ (id)queryForChangesGetWithChangeId:(NSString *)changeId { + NSString *methodName = @"drive.changes.get"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.changeId = changeId; + query.expectedObjectClass = [GTLDriveChange class]; + return query; +} + ++ (id)queryForChangesList { + NSString *methodName = @"drive.changes.list"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLDriveChangeList class]; + return query; +} + +#pragma mark - +#pragma mark "children" methods +// These create a GTLQueryDrive object. + ++ (id)queryForChildrenDeleteWithFolderId:(NSString *)folderId + childId:(NSString *)childId { + NSString *methodName = @"drive.children.delete"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.folderId = folderId; + query.childId = childId; + return query; +} + ++ (id)queryForChildrenGetWithFolderId:(NSString *)folderId + childId:(NSString *)childId { + NSString *methodName = @"drive.children.get"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.folderId = folderId; + query.childId = childId; + query.expectedObjectClass = [GTLDriveChildReference class]; + return query; +} + ++ (id)queryForChildrenInsertWithObject:(GTLDriveChildReference *)object + folderId:(NSString *)folderId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.children.insert"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.folderId = folderId; + query.expectedObjectClass = [GTLDriveChildReference class]; + return query; +} + ++ (id)queryForChildrenListWithFolderId:(NSString *)folderId { + NSString *methodName = @"drive.children.list"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.folderId = folderId; + query.expectedObjectClass = [GTLDriveChildList class]; + return query; +} + +#pragma mark - +#pragma mark "comments" methods +// These create a GTLQueryDrive object. + ++ (id)queryForCommentsDeleteWithFileId:(NSString *)fileId + commentId:(NSString *)commentId { + NSString *methodName = @"drive.comments.delete"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.commentId = commentId; + return query; +} + ++ (id)queryForCommentsGetWithFileId:(NSString *)fileId + commentId:(NSString *)commentId { + NSString *methodName = @"drive.comments.get"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.commentId = commentId; + query.expectedObjectClass = [GTLDriveComment class]; + return query; +} + ++ (id)queryForCommentsInsertWithObject:(GTLDriveComment *)object + fileId:(NSString *)fileId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.comments.insert"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.expectedObjectClass = [GTLDriveComment class]; + return query; +} + ++ (id)queryForCommentsListWithFileId:(NSString *)fileId { + NSString *methodName = @"drive.comments.list"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.expectedObjectClass = [GTLDriveCommentList class]; + return query; +} + ++ (id)queryForCommentsPatchWithObject:(GTLDriveComment *)object + fileId:(NSString *)fileId + commentId:(NSString *)commentId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.comments.patch"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.commentId = commentId; + query.expectedObjectClass = [GTLDriveComment class]; + return query; +} + ++ (id)queryForCommentsUpdateWithObject:(GTLDriveComment *)object + fileId:(NSString *)fileId + commentId:(NSString *)commentId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.comments.update"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.commentId = commentId; + query.expectedObjectClass = [GTLDriveComment class]; + return query; +} + +#pragma mark - +#pragma mark "files" methods +// These create a GTLQueryDrive object. + ++ (id)queryForFilesCopyWithObject:(GTLDriveFile *)object + fileId:(NSString *)fileId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.files.copy"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.expectedObjectClass = [GTLDriveFile class]; + return query; +} + ++ (id)queryForFilesDeleteWithFileId:(NSString *)fileId { + NSString *methodName = @"drive.files.delete"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + return query; +} + ++ (id)queryForFilesGetWithFileId:(NSString *)fileId { + NSString *methodName = @"drive.files.get"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.expectedObjectClass = [GTLDriveFile class]; + return query; +} + ++ (id)queryForFilesInsertWithObject:(GTLDriveFile *)object + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.files.insert"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.uploadParameters = uploadParametersOrNil; + query.expectedObjectClass = [GTLDriveFile class]; + return query; +} + ++ (id)queryForFilesList { + NSString *methodName = @"drive.files.list"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLDriveFileList class]; + return query; +} + ++ (id)queryForFilesPatchWithObject:(GTLDriveFile *)object + fileId:(NSString *)fileId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.files.patch"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.expectedObjectClass = [GTLDriveFile class]; + return query; +} + ++ (id)queryForFilesTouchWithFileId:(NSString *)fileId { + NSString *methodName = @"drive.files.touch"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.expectedObjectClass = [GTLDriveFile class]; + return query; +} + ++ (id)queryForFilesTrashWithFileId:(NSString *)fileId { + NSString *methodName = @"drive.files.trash"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.expectedObjectClass = [GTLDriveFile class]; + return query; +} + ++ (id)queryForFilesUntrashWithFileId:(NSString *)fileId { + NSString *methodName = @"drive.files.untrash"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.expectedObjectClass = [GTLDriveFile class]; + return query; +} + ++ (id)queryForFilesUpdateWithObject:(GTLDriveFile *)object + fileId:(NSString *)fileId + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.files.update"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.uploadParameters = uploadParametersOrNil; + query.expectedObjectClass = [GTLDriveFile class]; + return query; +} + +#pragma mark - +#pragma mark "parents" methods +// These create a GTLQueryDrive object. + ++ (id)queryForParentsDeleteWithFileId:(NSString *)fileId + parentId:(NSString *)parentId { + NSString *methodName = @"drive.parents.delete"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.parentId = parentId; + return query; +} + ++ (id)queryForParentsGetWithFileId:(NSString *)fileId + parentId:(NSString *)parentId { + NSString *methodName = @"drive.parents.get"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.parentId = parentId; + query.expectedObjectClass = [GTLDriveParentReference class]; + return query; +} + ++ (id)queryForParentsInsertWithObject:(GTLDriveParentReference *)object + fileId:(NSString *)fileId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.parents.insert"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.expectedObjectClass = [GTLDriveParentReference class]; + return query; +} + ++ (id)queryForParentsListWithFileId:(NSString *)fileId { + NSString *methodName = @"drive.parents.list"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.expectedObjectClass = [GTLDriveParentList class]; + return query; +} + +#pragma mark - +#pragma mark "permissions" methods +// These create a GTLQueryDrive object. + ++ (id)queryForPermissionsDeleteWithFileId:(NSString *)fileId + permissionId:(NSString *)permissionId { + NSString *methodName = @"drive.permissions.delete"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.permissionId = permissionId; + return query; +} + ++ (id)queryForPermissionsGetWithFileId:(NSString *)fileId + permissionId:(NSString *)permissionId { + NSString *methodName = @"drive.permissions.get"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.permissionId = permissionId; + query.expectedObjectClass = [GTLDrivePermission class]; + return query; +} + ++ (id)queryForPermissionsInsertWithObject:(GTLDrivePermission *)object + fileId:(NSString *)fileId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.permissions.insert"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.expectedObjectClass = [GTLDrivePermission class]; + return query; +} + ++ (id)queryForPermissionsListWithFileId:(NSString *)fileId { + NSString *methodName = @"drive.permissions.list"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.expectedObjectClass = [GTLDrivePermissionList class]; + return query; +} + ++ (id)queryForPermissionsPatchWithObject:(GTLDrivePermission *)object + fileId:(NSString *)fileId + permissionId:(NSString *)permissionId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.permissions.patch"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.permissionId = permissionId; + query.expectedObjectClass = [GTLDrivePermission class]; + return query; +} + ++ (id)queryForPermissionsUpdateWithObject:(GTLDrivePermission *)object + fileId:(NSString *)fileId + permissionId:(NSString *)permissionId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.permissions.update"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.permissionId = permissionId; + query.expectedObjectClass = [GTLDrivePermission class]; + return query; +} + +#pragma mark - +#pragma mark "replies" methods +// These create a GTLQueryDrive object. + ++ (id)queryForRepliesDeleteWithFileId:(NSString *)fileId + commentId:(NSString *)commentId + replyId:(NSString *)replyId { + NSString *methodName = @"drive.replies.delete"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.commentId = commentId; + query.replyId = replyId; + return query; +} + ++ (id)queryForRepliesGetWithFileId:(NSString *)fileId + commentId:(NSString *)commentId + replyId:(NSString *)replyId { + NSString *methodName = @"drive.replies.get"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.commentId = commentId; + query.replyId = replyId; + query.expectedObjectClass = [GTLDriveCommentReply class]; + return query; +} + ++ (id)queryForRepliesInsertWithObject:(GTLDriveCommentReply *)object + fileId:(NSString *)fileId + commentId:(NSString *)commentId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.replies.insert"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.commentId = commentId; + query.expectedObjectClass = [GTLDriveCommentReply class]; + return query; +} + ++ (id)queryForRepliesListWithFileId:(NSString *)fileId + commentId:(NSString *)commentId { + NSString *methodName = @"drive.replies.list"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.commentId = commentId; + query.expectedObjectClass = [GTLDriveCommentReplyList class]; + return query; +} + ++ (id)queryForRepliesPatchWithObject:(GTLDriveCommentReply *)object + fileId:(NSString *)fileId + commentId:(NSString *)commentId + replyId:(NSString *)replyId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.replies.patch"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.commentId = commentId; + query.replyId = replyId; + query.expectedObjectClass = [GTLDriveCommentReply class]; + return query; +} + ++ (id)queryForRepliesUpdateWithObject:(GTLDriveCommentReply *)object + fileId:(NSString *)fileId + commentId:(NSString *)commentId + replyId:(NSString *)replyId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.replies.update"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.commentId = commentId; + query.replyId = replyId; + query.expectedObjectClass = [GTLDriveCommentReply class]; + return query; +} + +#pragma mark - +#pragma mark "revisions" methods +// These create a GTLQueryDrive object. + ++ (id)queryForRevisionsDeleteWithFileId:(NSString *)fileId + revisionId:(NSString *)revisionId { + NSString *methodName = @"drive.revisions.delete"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.revisionId = revisionId; + return query; +} + ++ (id)queryForRevisionsGetWithFileId:(NSString *)fileId + revisionId:(NSString *)revisionId { + NSString *methodName = @"drive.revisions.get"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.revisionId = revisionId; + query.expectedObjectClass = [GTLDriveRevision class]; + return query; +} + ++ (id)queryForRevisionsListWithFileId:(NSString *)fileId { + NSString *methodName = @"drive.revisions.list"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.expectedObjectClass = [GTLDriveRevisionList class]; + return query; +} + ++ (id)queryForRevisionsPatchWithObject:(GTLDriveRevision *)object + fileId:(NSString *)fileId + revisionId:(NSString *)revisionId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.revisions.patch"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.revisionId = revisionId; + query.expectedObjectClass = [GTLDriveRevision class]; + return query; +} + ++ (id)queryForRevisionsUpdateWithObject:(GTLDriveRevision *)object + fileId:(NSString *)fileId + revisionId:(NSString *)revisionId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.revisions.update"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.revisionId = revisionId; + query.expectedObjectClass = [GTLDriveRevision class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLServiceDrive.h.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLServiceDrive.h.svn-base new file mode 100644 index 0000000..d81141d --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLServiceDrive.h.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceDrive.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLServiceDrive (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceDrive : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryDrive.h. The query can the be sent with GTLService's execute methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLServiceDrive.m.svn-base b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLServiceDrive.m.svn-base new file mode 100644 index 0000000..d8a840f --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/.svn/text-base/GTLServiceDrive.m.svn-base @@ -0,0 +1,81 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceDrive.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLServiceDrive (0 custom class methods, 0 custom properties) + +#import "GTLDrive.h" + +@implementation GTLServiceDrive + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryDrive class], + [GTLDriveAbout class], + [GTLDriveApp class], + [GTLDriveAppList class], + [GTLDriveChange class], + [GTLDriveChangeList class], + [GTLDriveChildList class], + [GTLDriveChildReference class], + [GTLDriveComment class], + [GTLDriveCommentList class], + [GTLDriveCommentReply class], + [GTLDriveCommentReplyList class], + [GTLDriveFile class], + [GTLDriveFileList class], + [GTLDriveParentList class], + [GTLDriveParentReference class], + [GTLDrivePermission class], + [GTLDrivePermissionList class], + [GTLDriveRevision class], + [GTLDriveRevisionList class], + [GTLDriveUser class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v2"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + self.rpcUploadURL = [NSURL URLWithString:@"https://www.googleapis.com/upload/rpc?uploadType=resumable&prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDrive.h b/GTL/Source/Services/Drive/Generated/GTLDrive.h new file mode 100644 index 0000000..a5b33a5 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDrive.h @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDrive.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ + +#import "GTLDriveConstants.h" + +#import "GTLDriveAbout.h" +#import "GTLDriveApp.h" +#import "GTLDriveAppList.h" +#import "GTLDriveChange.h" +#import "GTLDriveChangeList.h" +#import "GTLDriveChildList.h" +#import "GTLDriveChildReference.h" +#import "GTLDriveComment.h" +#import "GTLDriveCommentList.h" +#import "GTLDriveCommentReply.h" +#import "GTLDriveCommentReplyList.h" +#import "GTLDriveFile.h" +#import "GTLDriveFileList.h" +#import "GTLDriveParentList.h" +#import "GTLDriveParentReference.h" +#import "GTLDrivePermission.h" +#import "GTLDrivePermissionList.h" +#import "GTLDriveRevision.h" +#import "GTLDriveRevisionList.h" +#import "GTLDriveUser.h" + +#import "GTLQueryDrive.h" +#import "GTLServiceDrive.h" diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveAbout.h b/GTL/Source/Services/Drive/Generated/GTLDriveAbout.h new file mode 100644 index 0000000..c44ce4e --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveAbout.h @@ -0,0 +1,219 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveAbout.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveAbout (0 custom class methods, 20 custom properties) +// GTLDriveAboutAdditionalRoleInfoItem (0 custom class methods, 2 custom properties) +// GTLDriveAboutExportFormatsItem (0 custom class methods, 2 custom properties) +// GTLDriveAboutFeaturesItem (0 custom class methods, 2 custom properties) +// GTLDriveAboutImportFormatsItem (0 custom class methods, 2 custom properties) +// GTLDriveAboutMaxUploadSizesItem (0 custom class methods, 2 custom properties) +// GTLDriveAboutAdditionalRoleInfoItemRoleSetsItem (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveAboutAdditionalRoleInfoItem; +@class GTLDriveAboutAdditionalRoleInfoItemRoleSetsItem; +@class GTLDriveAboutExportFormatsItem; +@class GTLDriveAboutFeaturesItem; +@class GTLDriveAboutImportFormatsItem; +@class GTLDriveAboutMaxUploadSizesItem; +@class GTLDriveUser; + +// ---------------------------------------------------------------------------- +// +// GTLDriveAbout +// + +// An item with user information and settings. + +@interface GTLDriveAbout : GTLObject + +// Information about supported additional roles per file type. The most specific +// type takes precedence. +@property (retain) NSArray *additionalRoleInfo; // of GTLDriveAboutAdditionalRoleInfoItem + +// The domain sharing policy for the current user. +@property (copy) NSString *domainSharingPolicy; + +// The ETag of the item. +@property (copy) NSString *ETag; + +// The allowable export formats. +@property (retain) NSArray *exportFormats; // of GTLDriveAboutExportFormatsItem + +// List of additional features enabled on this account. +@property (retain) NSArray *features; // of GTLDriveAboutFeaturesItem + +// The allowable import formats. +@property (retain) NSArray *importFormats; // of GTLDriveAboutImportFormatsItem + +// A boolean indicating whether the authenticated app is installed by the +// authenticated user. +@property (retain) NSNumber *isCurrentAppInstalled; // boolValue + +// This is always drive#about. +@property (copy) NSString *kind; + +// The largest change id. +@property (retain) NSNumber *largestChangeId; // longLongValue + +// List of max upload sizes for each file type. The most specific type takes +// precedence. +@property (retain) NSArray *maxUploadSizes; // of GTLDriveAboutMaxUploadSizesItem + +// The name of the current user. +@property (copy) NSString *name; + +// The current user's ID as visible in the permissions collection. +@property (copy) NSString *permissionId; + +// The total number of quota bytes. +@property (retain) NSNumber *quotaBytesTotal; // longLongValue + +// The number of quota bytes used. +@property (retain) NSNumber *quotaBytesUsed; // longLongValue + +// The number of quota bytes used by all Google apps (Drive, Picasa, etc.). +@property (retain) NSNumber *quotaBytesUsedAggregate; // longLongValue + +// The number of quota bytes used by trashed items. +@property (retain) NSNumber *quotaBytesUsedInTrash; // longLongValue + +// The number of remaining change ids. +@property (retain) NSNumber *remainingChangeIds; // longLongValue + +// The id of the root folder. +@property (copy) NSString *rootFolderId; + +// A link back to this item. +@property (copy) NSString *selfLink; + +// The authenticated user. +@property (retain) GTLDriveUser *user; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAboutAdditionalRoleInfoItem +// + +@interface GTLDriveAboutAdditionalRoleInfoItem : GTLObject + +// The supported additional roles per primary role. +@property (retain) NSArray *roleSets; // of GTLDriveAboutAdditionalRoleInfoItemRoleSetsItem + +// The content type that this additional role info applies to. +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAboutExportFormatsItem +// + +@interface GTLDriveAboutExportFormatsItem : GTLObject + +// The content type to convert from. +@property (copy) NSString *source; + +// The possible content types to convert to. +@property (retain) NSArray *targets; // of NSString + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAboutFeaturesItem +// + +@interface GTLDriveAboutFeaturesItem : GTLObject + +// The name of the feature. +@property (copy) NSString *featureName; + +// The request limit rate for this feature, in queries per second. +@property (retain) NSNumber *featureRate; // doubleValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAboutImportFormatsItem +// + +@interface GTLDriveAboutImportFormatsItem : GTLObject + +// The imported file's content type to convert from. +@property (copy) NSString *source; + +// The possible content types to convert to. +@property (retain) NSArray *targets; // of NSString + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAboutMaxUploadSizesItem +// + +@interface GTLDriveAboutMaxUploadSizesItem : GTLObject + +// The max upload size for this type. +@property (retain) NSNumber *size; // longLongValue + +// The file type. +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAboutAdditionalRoleInfoItemRoleSetsItem +// + +@interface GTLDriveAboutAdditionalRoleInfoItemRoleSetsItem : GTLObject + +// The supported additional roles with the primary role. +@property (retain) NSArray *additionalRoles; // of NSString + +// A primary permission role. +@property (copy) NSString *primaryRole; + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveAbout.m b/GTL/Source/Services/Drive/Generated/GTLDriveAbout.m new file mode 100644 index 0000000..23e3c1a --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveAbout.m @@ -0,0 +1,168 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveAbout.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveAbout (0 custom class methods, 20 custom properties) +// GTLDriveAboutAdditionalRoleInfoItem (0 custom class methods, 2 custom properties) +// GTLDriveAboutExportFormatsItem (0 custom class methods, 2 custom properties) +// GTLDriveAboutFeaturesItem (0 custom class methods, 2 custom properties) +// GTLDriveAboutImportFormatsItem (0 custom class methods, 2 custom properties) +// GTLDriveAboutMaxUploadSizesItem (0 custom class methods, 2 custom properties) +// GTLDriveAboutAdditionalRoleInfoItemRoleSetsItem (0 custom class methods, 2 custom properties) + +#import "GTLDriveAbout.h" + +#import "GTLDriveUser.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveAbout +// + +@implementation GTLDriveAbout +@dynamic additionalRoleInfo, domainSharingPolicy, ETag, exportFormats, features, + importFormats, isCurrentAppInstalled, kind, largestChangeId, + maxUploadSizes, name, permissionId, quotaBytesTotal, quotaBytesUsed, + quotaBytesUsedAggregate, quotaBytesUsedInTrash, remainingChangeIds, + rootFolderId, selfLink, user; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLDriveAboutAdditionalRoleInfoItem class], @"additionalRoleInfo", + [GTLDriveAboutExportFormatsItem class], @"exportFormats", + [GTLDriveAboutFeaturesItem class], @"features", + [GTLDriveAboutImportFormatsItem class], @"importFormats", + [GTLDriveAboutMaxUploadSizesItem class], @"maxUploadSizes", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#about"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAboutAdditionalRoleInfoItem +// + +@implementation GTLDriveAboutAdditionalRoleInfoItem +@dynamic roleSets, type; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLDriveAboutAdditionalRoleInfoItemRoleSetsItem class] + forKey:@"roleSets"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAboutExportFormatsItem +// + +@implementation GTLDriveAboutExportFormatsItem +@dynamic source, targets; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"targets"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAboutFeaturesItem +// + +@implementation GTLDriveAboutFeaturesItem +@dynamic featureName, featureRate; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAboutImportFormatsItem +// + +@implementation GTLDriveAboutImportFormatsItem +@dynamic source, targets; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"targets"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAboutMaxUploadSizesItem +// + +@implementation GTLDriveAboutMaxUploadSizesItem +@dynamic size, type; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAboutAdditionalRoleInfoItemRoleSetsItem +// + +@implementation GTLDriveAboutAdditionalRoleInfoItemRoleSetsItem +@dynamic additionalRoles, primaryRole; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"additionalRoles"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveApp.h b/GTL/Source/Services/Drive/Generated/GTLDriveApp.h new file mode 100644 index 0000000..96407a2 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveApp.h @@ -0,0 +1,119 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveApp.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveApp (0 custom class methods, 15 custom properties) +// GTLDriveAppIconsItem (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveAppIconsItem; + +// ---------------------------------------------------------------------------- +// +// GTLDriveApp +// + +// Information about a third-party application which the user has installed or +// given access to Google Drive. + +@interface GTLDriveApp : GTLObject + +// Whether the app is authorized to access data on the user's Drive. +@property (retain) NSNumber *authorized; // boolValue + +// The various icons for the app. +@property (retain) NSArray *icons; // of GTLDriveAppIconsItem + +// The ID of the app. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Whether the app is installed. +@property (retain) NSNumber *installed; // boolValue + +// This is always drive#app. +@property (copy) NSString *kind; + +// The name of the app. +@property (copy) NSString *name; + +// The type of object this app creates (e.g. Chart). If empty, the app name +// should be used instead. +@property (copy) NSString *objectType; + +// The list of primary file extensions. +@property (retain) NSArray *primaryFileExtensions; // of NSString + +// The list of primary mime types. +@property (retain) NSArray *primaryMimeTypes; // of NSString + +// The product URL. +@property (copy) NSString *productUrl; + +// The list of secondary file extensions. +@property (retain) NSArray *secondaryFileExtensions; // of NSString + +// The list of secondary mime types. +@property (retain) NSArray *secondaryMimeTypes; // of NSString + +// Whether this app supports creating new objects. +@property (retain) NSNumber *supportsCreate; // boolValue + +// Whether this app supports importing Google Docs. +@property (retain) NSNumber *supportsImport; // boolValue + +// Whether the app is selected as the default handler for the types it supports. +@property (retain) NSNumber *useByDefault; // boolValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAppIconsItem +// + +@interface GTLDriveAppIconsItem : GTLObject + +// Category of the icon. Allowed values are: +// - application - icon for the application +// - document - icon for a file associated with the app +// - documentShared - icon for a shared file associated with the app +@property (copy) NSString *category; + +// URL for the icon. +@property (copy) NSString *iconUrl; + +// Size of the icon. Represented as the maximum of the width and height. +@property (retain) NSNumber *size; // intValue + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveApp.m b/GTL/Source/Services/Drive/Generated/GTLDriveApp.m new file mode 100644 index 0000000..5fb7840 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveApp.m @@ -0,0 +1,78 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveApp.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveApp (0 custom class methods, 15 custom properties) +// GTLDriveAppIconsItem (0 custom class methods, 3 custom properties) + +#import "GTLDriveApp.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveApp +// + +@implementation GTLDriveApp +@dynamic authorized, icons, identifier, installed, kind, name, objectType, + primaryFileExtensions, primaryMimeTypes, productUrl, + secondaryFileExtensions, secondaryMimeTypes, supportsCreate, + supportsImport, useByDefault; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLDriveAppIconsItem class], @"icons", + [NSString class], @"primaryFileExtensions", + [NSString class], @"primaryMimeTypes", + [NSString class], @"secondaryFileExtensions", + [NSString class], @"secondaryMimeTypes", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#app"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveAppIconsItem +// + +@implementation GTLDriveAppIconsItem +@dynamic category, iconUrl, size; +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveAppList.h b/GTL/Source/Services/Drive/Generated/GTLDriveAppList.h new file mode 100644 index 0000000..59e872f --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveAppList.h @@ -0,0 +1,64 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveAppList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveAppList (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveApp; + +// ---------------------------------------------------------------------------- +// +// GTLDriveAppList +// + +// A list of third-party applications which the user has installed or given +// access to Google Drive. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLDriveAppList : GTLCollectionObject + +// The ETag of the list. +@property (copy) NSString *ETag; + +// The actual list of apps. +@property (retain) NSArray *items; // of GTLDriveApp + +// This is always drive#appList. +@property (copy) NSString *kind; + +// A link back to this list. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveAppList.m b/GTL/Source/Services/Drive/Generated/GTLDriveAppList.m new file mode 100644 index 0000000..a397387 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveAppList.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveAppList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveAppList (0 custom class methods, 4 custom properties) + +#import "GTLDriveAppList.h" + +#import "GTLDriveApp.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveAppList +// + +@implementation GTLDriveAppList +@dynamic ETag, items, kind, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLDriveApp class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#appList"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveChange.h b/GTL/Source/Services/Drive/Generated/GTLDriveChange.h new file mode 100644 index 0000000..6d013b5 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveChange.h @@ -0,0 +1,67 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveChange.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveChange (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveFile; + +// ---------------------------------------------------------------------------- +// +// GTLDriveChange +// + +// Representation of a change to a file. + +@interface GTLDriveChange : GTLObject + +// Whether the file has been deleted. +@property (retain) NSNumber *deleted; // boolValue + +// The updated state of the file. Present if the file has not been deleted. +@property (retain) GTLDriveFile *file; + +// The ID of the file associated with this change. +@property (copy) NSString *fileId; + +// The ID of the change. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +// This is always drive#change. +@property (copy) NSString *kind; + +// A link back to this change. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveChange.m b/GTL/Source/Services/Drive/Generated/GTLDriveChange.m new file mode 100644 index 0000000..6fcd70f --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveChange.m @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveChange.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveChange (0 custom class methods, 6 custom properties) + +#import "GTLDriveChange.h" + +#import "GTLDriveFile.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveChange +// + +@implementation GTLDriveChange +@dynamic deleted, file, fileId, identifier, kind, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#change"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveChangeList.h b/GTL/Source/Services/Drive/Generated/GTLDriveChangeList.h new file mode 100644 index 0000000..81c08e1 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveChangeList.h @@ -0,0 +1,72 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveChangeList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveChangeList (0 custom class methods, 7 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveChange; + +// ---------------------------------------------------------------------------- +// +// GTLDriveChangeList +// + +// A list of changes for a user. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLDriveChangeList : GTLCollectionObject + +// The ETag of the list. +@property (copy) NSString *ETag; + +// The actual list of changes. +@property (retain) NSArray *items; // of GTLDriveChange + +// This is always drive#changeList. +@property (copy) NSString *kind; + +// The current largest change ID. +@property (retain) NSNumber *largestChangeId; // longLongValue + +// A link to the next page of changes. +@property (copy) NSString *nextLink; + +// The page token for the next page of changes. +@property (copy) NSString *nextPageToken; + +// A link back to this list. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveChangeList.m b/GTL/Source/Services/Drive/Generated/GTLDriveChangeList.m new file mode 100644 index 0000000..e6ef167 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveChangeList.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveChangeList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveChangeList (0 custom class methods, 7 custom properties) + +#import "GTLDriveChangeList.h" + +#import "GTLDriveChange.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveChangeList +// + +@implementation GTLDriveChangeList +@dynamic ETag, items, kind, largestChangeId, nextLink, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLDriveChange class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#changeList"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveChildList.h b/GTL/Source/Services/Drive/Generated/GTLDriveChildList.h new file mode 100644 index 0000000..20185f7 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveChildList.h @@ -0,0 +1,69 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveChildList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveChildList (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveChildReference; + +// ---------------------------------------------------------------------------- +// +// GTLDriveChildList +// + +// A list of children of a file. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLDriveChildList : GTLCollectionObject + +// The ETag of the list. +@property (copy) NSString *ETag; + +// The actual list of children. +@property (retain) NSArray *items; // of GTLDriveChildReference + +// This is always drive#childList. +@property (copy) NSString *kind; + +// A link to the next page of children. +@property (copy) NSString *nextLink; + +// The page token for the next page of children. +@property (copy) NSString *nextPageToken; + +// A link back to this list. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveChildList.m b/GTL/Source/Services/Drive/Generated/GTLDriveChildList.m new file mode 100644 index 0000000..61d5c84 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveChildList.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveChildList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveChildList (0 custom class methods, 6 custom properties) + +#import "GTLDriveChildList.h" + +#import "GTLDriveChildReference.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveChildList +// + +@implementation GTLDriveChildList +@dynamic ETag, items, kind, nextLink, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLDriveChildReference class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#childList"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveChildReference.h b/GTL/Source/Services/Drive/Generated/GTLDriveChildReference.h new file mode 100644 index 0000000..2c9aabe --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveChildReference.h @@ -0,0 +1,59 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveChildReference.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveChildReference (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLDriveChildReference +// + +// A reference to a file's child. + +@interface GTLDriveChildReference : GTLObject + +// A link to the child. +@property (copy) NSString *childLink; + +// The ID of the child. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// This is always drive#childReference. +@property (copy) NSString *kind; + +// A link back to this reference. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveChildReference.m b/GTL/Source/Services/Drive/Generated/GTLDriveChildReference.m new file mode 100644 index 0000000..6c912da --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveChildReference.m @@ -0,0 +1,52 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveChildReference.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveChildReference (0 custom class methods, 4 custom properties) + +#import "GTLDriveChildReference.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveChildReference +// + +@implementation GTLDriveChildReference +@dynamic childLink, identifier, kind, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#childReference"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveComment.h b/GTL/Source/Services/Drive/Generated/GTLDriveComment.h new file mode 100644 index 0000000..df54dd0 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveComment.h @@ -0,0 +1,121 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveComment.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveComment (0 custom class methods, 15 custom properties) +// GTLDriveCommentContext (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveCommentContext; +@class GTLDriveCommentReply; +@class GTLDriveUser; + +// ---------------------------------------------------------------------------- +// +// GTLDriveComment +// + +// A JSON representation of a comment on a file in Google Drive. + +@interface GTLDriveComment : GTLObject + +// A region of the document represented as a JSON string. See anchor +// documentation for details on how to define and interpret anchor properties. +@property (copy) NSString *anchor; + +// The user who wrote this comment. +@property (retain) GTLDriveUser *author; + +// The ID of the comment. +@property (copy) NSString *commentId; + +// The plain text content used to create this comment. This is not HTML safe and +// should only be used as a starting point to make edits to a comment's content. +@property (copy) NSString *content; + +// The context of the file which is being commented on. +@property (retain) GTLDriveCommentContext *context; + +// The date when this comment was first created. +@property (retain) GTLDateTime *createdDate; + +// Whether this comment has been deleted. If a comment has been deleted the +// content will be cleared and this will only represent a comment that once +// existed. +@property (retain) NSNumber *deleted; // boolValue + +// The file which this comment is addressing. +@property (copy) NSString *fileId; + +// The title of the file which this comment is addressing. +@property (copy) NSString *fileTitle; + +// HTML formatted content for this comment. +@property (copy) NSString *htmlContent; + +// This is always drive#comment. +@property (copy) NSString *kind; + +// The date when this comment or any of its replies were last modified. +@property (retain) GTLDateTime *modifiedDate; + +// Replies to this post. +@property (retain) NSArray *replies; // of GTLDriveCommentReply + +// A link back to this comment. +@property (copy) NSString *selfLink; + +// The status of this comment. Status can be changed by posting a reply to a +// comment with the desired status. +// - "open" - The comment is still open. +// - "resolved" - The comment has been resolved by one of its replies. +@property (copy) NSString *status; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveCommentContext +// + +@interface GTLDriveCommentContext : GTLObject + +// The MIME type of the context snippet. +@property (copy) NSString *type; + +// Data representation of the segment of the file being commented on. In the +// case of a text file for example, this would be the actual text that the +// comment is about. +@property (copy) NSString *value; + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveComment.m b/GTL/Source/Services/Drive/Generated/GTLDriveComment.m new file mode 100644 index 0000000..f042e30 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveComment.m @@ -0,0 +1,68 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveComment.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveComment (0 custom class methods, 15 custom properties) +// GTLDriveCommentContext (0 custom class methods, 2 custom properties) + +#import "GTLDriveComment.h" + +#import "GTLDriveCommentReply.h" +#import "GTLDriveUser.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveComment +// + +@implementation GTLDriveComment +@dynamic anchor, author, commentId, content, context, createdDate, deleted, + fileId, fileTitle, htmlContent, kind, modifiedDate, replies, selfLink, + status; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLDriveCommentReply class] + forKey:@"replies"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#comment"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveCommentContext +// + +@implementation GTLDriveCommentContext +@dynamic type, value; +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveCommentList.h b/GTL/Source/Services/Drive/Generated/GTLDriveCommentList.h new file mode 100644 index 0000000..c9ff1c4 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveCommentList.h @@ -0,0 +1,60 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveCommentList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveCommentList (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveComment; + +// ---------------------------------------------------------------------------- +// +// GTLDriveCommentList +// + +// A JSON representation of a list of comments on a file in Google Drive. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLDriveCommentList : GTLCollectionObject + +// List of comments. +@property (retain) NSArray *items; // of GTLDriveComment + +// This is always drive#commentList. +@property (copy) NSString *kind; + +// The token to use to request the next page of results. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveCommentList.m b/GTL/Source/Services/Drive/Generated/GTLDriveCommentList.m new file mode 100644 index 0000000..39e4353 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveCommentList.m @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveCommentList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveCommentList (0 custom class methods, 3 custom properties) + +#import "GTLDriveCommentList.h" + +#import "GTLDriveComment.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveCommentList +// + +@implementation GTLDriveCommentList +@dynamic items, kind, nextPageToken; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLDriveComment class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#commentList"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveCommentReply.h b/GTL/Source/Services/Drive/Generated/GTLDriveCommentReply.h new file mode 100644 index 0000000..5d0c0cb --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveCommentReply.h @@ -0,0 +1,82 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveCommentReply.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveCommentReply (0 custom class methods, 9 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveUser; + +// ---------------------------------------------------------------------------- +// +// GTLDriveCommentReply +// + +// A JSON representation of a reply to a comment on a file in Google Drive. + +@interface GTLDriveCommentReply : GTLObject + +// The user who wrote this reply. +@property (retain) GTLDriveUser *author; + +// The plain text content used to create this reply. This is not HTML safe and +// should only be used as a starting point to make edits to a reply's content. +// This field is required on inserts if no verb is specified (resolve/reopen). +@property (copy) NSString *content; + +// The date when this reply was first created. +@property (retain) GTLDateTime *createdDate; + +// Whether this reply has been deleted. If a reply has been deleted the content +// will be cleared and this will only represent a reply that once existed. +@property (retain) NSNumber *deleted; // boolValue + +// HTML formatted content for this reply. +@property (copy) NSString *htmlContent; + +// This is always drive#commentReply. +@property (copy) NSString *kind; + +// The date when this reply was last modified. +@property (retain) GTLDateTime *modifiedDate; + +// The ID of the reply. +@property (copy) NSString *replyId; + +// The action this reply performed to the parent comment. When creating a new +// reply this is the action to be perform to the parent comment. Possible values +// are: +// - "resolve" - To resolve a comment. +// - "reopen" - To reopen (un-resolve) a comment. +@property (copy) NSString *verb; + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveCommentReply.m b/GTL/Source/Services/Drive/Generated/GTLDriveCommentReply.m new file mode 100644 index 0000000..237d1b9 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveCommentReply.m @@ -0,0 +1,48 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveCommentReply.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveCommentReply (0 custom class methods, 9 custom properties) + +#import "GTLDriveCommentReply.h" + +#import "GTLDriveUser.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveCommentReply +// + +@implementation GTLDriveCommentReply +@dynamic author, content, createdDate, deleted, htmlContent, kind, modifiedDate, + replyId, verb; + ++ (void)load { + [self registerObjectClassForKind:@"drive#commentReply"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveCommentReplyList.h b/GTL/Source/Services/Drive/Generated/GTLDriveCommentReplyList.h new file mode 100644 index 0000000..2ce023c --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveCommentReplyList.h @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveCommentReplyList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveCommentReplyList (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveCommentReply; + +// ---------------------------------------------------------------------------- +// +// GTLDriveCommentReplyList +// + +// A JSON representation of a list of replies to a comment on a file in Google +// Drive. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLDriveCommentReplyList : GTLCollectionObject + +// List of reply. +@property (retain) NSArray *items; // of GTLDriveCommentReply + +// This is always drive#commentReplyList. +@property (copy) NSString *kind; + +// The token to use to request the next page of results. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveCommentReplyList.m b/GTL/Source/Services/Drive/Generated/GTLDriveCommentReplyList.m new file mode 100644 index 0000000..ea25605 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveCommentReplyList.m @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveCommentReplyList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveCommentReplyList (0 custom class methods, 3 custom properties) + +#import "GTLDriveCommentReplyList.h" + +#import "GTLDriveCommentReply.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveCommentReplyList +// + +@implementation GTLDriveCommentReplyList +@dynamic items, kind, nextPageToken; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLDriveCommentReply class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#commentReplyList"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveConstants.h b/GTL/Source/Services/Drive/Generated/GTLDriveConstants.h new file mode 100644 index 0000000..e9f9a40 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveConstants.h @@ -0,0 +1,52 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// View and manage the files and documents in your Google Drive +GTL_EXTERN NSString * const kGTLAuthScopeDrive; // "https://www.googleapis.com/auth/drive" +// View your Google Drive apps +GTL_EXTERN NSString * const kGTLAuthScopeDriveAppsReadonly; // "https://www.googleapis.com/auth/drive.apps.readonly" +// View and manage Google Drive files that you have opened or created with this +// app +GTL_EXTERN NSString * const kGTLAuthScopeDriveFile; // "https://www.googleapis.com/auth/drive.file" +// View metadata for files and documents in your Google Drive +GTL_EXTERN NSString * const kGTLAuthScopeDriveMetadataReadonly; // "https://www.googleapis.com/auth/drive.metadata.readonly" +// View the files and documents in your Google Drive +GTL_EXTERN NSString * const kGTLAuthScopeDriveReadonly; // "https://www.googleapis.com/auth/drive.readonly" + +// Projection +GTL_EXTERN NSString * const kGTLDriveProjectionBasic; // "BASIC" +GTL_EXTERN NSString * const kGTLDriveProjectionFull; // "FULL" diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveConstants.m b/GTL/Source/Services/Drive/Generated/GTLDriveConstants.m new file mode 100644 index 0000000..374b0c9 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveConstants.m @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ + +#import "GTLDriveConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeDrive = @"https://www.googleapis.com/auth/drive"; +NSString * const kGTLAuthScopeDriveAppsReadonly = @"https://www.googleapis.com/auth/drive.apps.readonly"; +NSString * const kGTLAuthScopeDriveFile = @"https://www.googleapis.com/auth/drive.file"; +NSString * const kGTLAuthScopeDriveMetadataReadonly = @"https://www.googleapis.com/auth/drive.metadata.readonly"; +NSString * const kGTLAuthScopeDriveReadonly = @"https://www.googleapis.com/auth/drive.readonly"; + +// Projection +NSString * const kGTLDriveProjectionBasic = @"BASIC"; +NSString * const kGTLDriveProjectionFull = @"FULL"; diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveFile.h b/GTL/Source/Services/Drive/Generated/GTLDriveFile.h new file mode 100644 index 0000000..04e0d72 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveFile.h @@ -0,0 +1,355 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveFile.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveFile (0 custom class methods, 36 custom properties) +// GTLDriveFileExportLinks (0 custom class methods, 0 custom properties) +// GTLDriveFileImageMediaMetadata (0 custom class methods, 21 custom properties) +// GTLDriveFileIndexableText (0 custom class methods, 1 custom properties) +// GTLDriveFileLabels (0 custom class methods, 5 custom properties) +// GTLDriveFileThumbnail (0 custom class methods, 2 custom properties) +// GTLDriveFileImageMediaMetadataLocation (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveFileExportLinks; +@class GTLDriveFileImageMediaMetadata; +@class GTLDriveFileImageMediaMetadataLocation; +@class GTLDriveFileIndexableText; +@class GTLDriveFileLabels; +@class GTLDriveFileThumbnail; +@class GTLDriveParentReference; +@class GTLDrivePermission; + +// ---------------------------------------------------------------------------- +// +// GTLDriveFile +// + +// The metadata for a file. + +@interface GTLDriveFile : GTLObject + +// A link for opening the file in using a relevant Google editor or viewer. +@property (copy) NSString *alternateLink; + +// Create time for this file (formatted ISO8601 timestamp). +@property (retain) GTLDateTime *createdDate; + +// A short description of the file. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Short term download URL for the file. This will only be populated on files +// with content stored in Drive. +@property (copy) NSString *downloadUrl; + +// Whether the file can be edited by the current user. +@property (retain) NSNumber *editable; // boolValue + +// A link for embedding the file. +@property (copy) NSString *embedLink; + +// ETag of the file. +@property (copy) NSString *ETag; + +// Whether this file has been explicitly trashed, as opposed to recursively +// trashed. This will only be populated if the file is trashed. +@property (retain) NSNumber *explicitlyTrashed; // boolValue + +// Links for exporting Google Docs to specific formats. +@property (retain) GTLDriveFileExportLinks *exportLinks; + +// The file extension used when downloading this file. This field is set from +// the title when inserting or uploading new content. This will only be +// populated on files with content stored in Drive. +@property (copy) NSString *fileExtension; + +// The size of the file in bytes. This will only be populated on files with +// content stored in Drive. +@property (retain) NSNumber *fileSize; // longLongValue + +// A link to the file's icon. +@property (copy) NSString *iconLink; + +// The id of the file. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Metadata about image media. This will only be present for image types, and +// its contents will depend on what can be parsed from the image content. +@property (retain) GTLDriveFileImageMediaMetadata *imageMediaMetadata; + +// Indexable text attributes for the file (can only be written) +@property (retain) GTLDriveFileIndexableText *indexableText; + +// The type of file. This is always drive#file. +@property (copy) NSString *kind; + +// A group of labels for the file. +@property (retain) GTLDriveFileLabels *labels; + +// Name of the last user to modify this file. This will only be populated if a +// user has edited this file. +@property (copy) NSString *lastModifyingUserName; + +// Last time this file was viewed by the user (formatted RFC 3339 timestamp). +@property (retain) GTLDateTime *lastViewedByMeDate; + +// An MD5 checksum for the content of this file. This will only be populated on +// files with content stored in Drive. +@property (copy) NSString *md5Checksum; + +// The MIME type of the file. This is only mutable on update when uploading new +// content. This field can be left blank, and the mimetype will be determined +// from the uploaded content's MIME type. +@property (copy) NSString *mimeType; + +// Last time this file was modified by the user (formatted RFC 3339 timestamp). +// Note that setting modifiedDate will also update the modifiedByMe date for the +// user which set the date. +@property (retain) GTLDateTime *modifiedByMeDate; + +// Last time this file was modified by anyone (formatted RFC 3339 timestamp). +// This is only mutable on update when the setModifiedDate parameter is set. +@property (retain) GTLDateTime *modifiedDate; + +// The original filename if the file was uploaded manually, or the original +// title if the file was inserted through the API. Note that renames of the +// title will not change the original filename. This will only be populated on +// files with content stored in Drive. +@property (copy) NSString *originalFilename; + +// Name(s) of the owner(s) of this file. +@property (retain) NSArray *ownerNames; // of NSString + +// Collection of parent folders which contain this file. +// Setting this field will put the file in all of the provided folders. On +// insert, if no folders are provided, the file will be placed in the default +// root folder. +@property (retain) NSArray *parents; // of GTLDriveParentReference + +// The number of quota bytes used by this file. +@property (retain) NSNumber *quotaBytesUsed; // longLongValue + +// A link back to this file. +@property (copy) NSString *selfLink; + +// Time at which this file was shared with the user (formatted RFC 3339 +// timestamp). +@property (retain) GTLDateTime *sharedWithMeDate; + +// Thumbnail for the file. Only accepted on upload and for files that are not +// already thumbnailed by Google. +@property (retain) GTLDriveFileThumbnail *thumbnail; + +// A link to the file's thumbnail. +@property (copy) NSString *thumbnailLink; + +// The title of this file. +@property (copy) NSString *title; + +// The permissions for the authenticated user on this file. +@property (retain) GTLDrivePermission *userPermission; + +// A link for downloading the content of the file in a browser using cookie +// based authentication. In cases where the content is shared publicly, the +// content can be downloaded without any credentials. +@property (copy) NSString *webContentLink; + +// A link only available on public folders for viewing their static web assets +// (HTML, CSS, JS, etc) via Google Drive's Website Hosting. +@property (copy) NSString *webViewLink; + +// Whether writers can share the document with other users. +@property (retain) NSNumber *writersCanShare; // boolValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileExportLinks +// + +@interface GTLDriveFileExportLinks : GTLObject +// This object is documented as having more properties that are NSString. Use +// -additionalJSONKeys and -additionalPropertyForName: to get the list of +// properties and then fetch them; or -additionalProperties to fetch them all at +// once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileImageMediaMetadata +// + +@interface GTLDriveFileImageMediaMetadata : GTLObject + +// The aperture used to create the photo (f-number). +@property (retain) NSNumber *aperture; // floatValue + +// The make of the camera used to create the photo. +@property (copy) NSString *cameraMake; + +// The model of the camera used to create the photo. +@property (copy) NSString *cameraModel; + +// The color space of the photo. +@property (copy) NSString *colorSpace; + +// The date and time the photo was taken (EXIF format timestamp). +@property (copy) NSString *date; + +// The exposure bias of the photo (APEX value). +@property (retain) NSNumber *exposureBias; // floatValue + +// The exposure mode used to create the photo. +@property (copy) NSString *exposureMode; + +// The length of the exposure, in seconds. +@property (retain) NSNumber *exposureTime; // floatValue + +// Whether a flash was used to create the photo. +@property (retain) NSNumber *flashUsed; // boolValue + +// The focal length used to create the photo, in millimeters. +@property (retain) NSNumber *focalLength; // floatValue + +// The height of the image in pixels. +@property (retain) NSNumber *height; // intValue + +// The ISO speed used to create the photo. +@property (retain) NSNumber *isoSpeed; // intValue + +// The lens used to create the photo. +@property (copy) NSString *lens; + +// Geographic location information stored in the image. +@property (retain) GTLDriveFileImageMediaMetadataLocation *location; + +// The smallest f-number of the lens at the focal length used to create the +// photo (APEX value). +@property (retain) NSNumber *maxApertureValue; // floatValue + +// The metering mode used to create the photo. +@property (copy) NSString *meteringMode; + +// The rotation in clockwise degrees from the image's original orientation. +@property (retain) NSNumber *rotation; // intValue + +// The type of sensor used to create the photo. +@property (copy) NSString *sensor; + +// The distance to the subject of the photo, in meters. +@property (retain) NSNumber *subjectDistance; // intValue + +// The white balance mode used to create the photo. +@property (copy) NSString *whiteBalance; + +// The width of the image in pixels. +@property (retain) NSNumber *width; // intValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileIndexableText +// + +@interface GTLDriveFileIndexableText : GTLObject + +// The text to be indexed for this file +@property (copy) NSString *text; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileLabels +// + +@interface GTLDriveFileLabels : GTLObject + +// Whether this file is hidden from the user. +@property (retain) NSNumber *hidden; // boolValue + +// Whether viewers are prevented from downloading this file. +@property (retain) NSNumber *restricted; // boolValue + +// Whether this file is starred by the user. +@property (retain) NSNumber *starred; // boolValue + +// Whether this file has been trashed. +@property (retain) NSNumber *trashed; // boolValue + +// Whether this file has been viewed by this user. +@property (retain) NSNumber *viewed; // boolValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileThumbnail +// + +@interface GTLDriveFileThumbnail : GTLObject + +// The URL-safe Base64 encoded bytes of the thumbnail image. +@property (copy) NSString *image; // GTLBase64 can encode/decode (probably web-safe format) + +// The MIME type of the thumbnail. +@property (copy) NSString *mimeType; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileImageMediaMetadataLocation +// + +@interface GTLDriveFileImageMediaMetadataLocation : GTLObject + +// The altitude stored in the image. +@property (retain) NSNumber *altitude; // doubleValue + +// The latitude stored in the image. +@property (retain) NSNumber *latitude; // doubleValue + +// The longitude stored in the image. +@property (retain) NSNumber *longitude; // doubleValue + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveFile.m b/GTL/Source/Services/Drive/Generated/GTLDriveFile.m new file mode 100644 index 0000000..a8ebe9b --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveFile.m @@ -0,0 +1,147 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveFile.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveFile (0 custom class methods, 36 custom properties) +// GTLDriveFileExportLinks (0 custom class methods, 0 custom properties) +// GTLDriveFileImageMediaMetadata (0 custom class methods, 21 custom properties) +// GTLDriveFileIndexableText (0 custom class methods, 1 custom properties) +// GTLDriveFileLabels (0 custom class methods, 5 custom properties) +// GTLDriveFileThumbnail (0 custom class methods, 2 custom properties) +// GTLDriveFileImageMediaMetadataLocation (0 custom class methods, 3 custom properties) + +#import "GTLDriveFile.h" + +#import "GTLDriveParentReference.h" +#import "GTLDrivePermission.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveFile +// + +@implementation GTLDriveFile +@dynamic alternateLink, createdDate, descriptionProperty, downloadUrl, editable, + embedLink, ETag, explicitlyTrashed, exportLinks, fileExtension, + fileSize, iconLink, identifier, imageMediaMetadata, indexableText, + kind, labels, lastModifyingUserName, lastViewedByMeDate, md5Checksum, + mimeType, modifiedByMeDate, modifiedDate, originalFilename, ownerNames, + parents, quotaBytesUsed, selfLink, sharedWithMeDate, thumbnail, + thumbnailLink, title, userPermission, webContentLink, webViewLink, + writersCanShare; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"ownerNames", + [GTLDriveParentReference class], @"parents", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#file"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileExportLinks +// + +@implementation GTLDriveFileExportLinks + ++ (Class)classForAdditionalProperties { + return [NSString class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileImageMediaMetadata +// + +@implementation GTLDriveFileImageMediaMetadata +@dynamic aperture, cameraMake, cameraModel, colorSpace, date, exposureBias, + exposureMode, exposureTime, flashUsed, focalLength, height, isoSpeed, + lens, location, maxApertureValue, meteringMode, rotation, sensor, + subjectDistance, whiteBalance, width; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileIndexableText +// + +@implementation GTLDriveFileIndexableText +@dynamic text; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileLabels +// + +@implementation GTLDriveFileLabels +@dynamic hidden, restricted, starred, trashed, viewed; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileThumbnail +// + +@implementation GTLDriveFileThumbnail +@dynamic image, mimeType; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileImageMediaMetadataLocation +// + +@implementation GTLDriveFileImageMediaMetadataLocation +@dynamic altitude, latitude, longitude; +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveFileList.h b/GTL/Source/Services/Drive/Generated/GTLDriveFileList.h new file mode 100644 index 0000000..5ffdfa3 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveFileList.h @@ -0,0 +1,69 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveFileList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveFileList (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveFile; + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileList +// + +// A list of files. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLDriveFileList : GTLCollectionObject + +// The ETag of the list. +@property (copy) NSString *ETag; + +// The actual list of files. +@property (retain) NSArray *items; // of GTLDriveFile + +// This is always drive#fileList. +@property (copy) NSString *kind; + +// A link to the next page of files. +@property (copy) NSString *nextLink; + +// The page token for the next page of files. +@property (copy) NSString *nextPageToken; + +// A link back to this list. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveFileList.m b/GTL/Source/Services/Drive/Generated/GTLDriveFileList.m new file mode 100644 index 0000000..f90b93c --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveFileList.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveFileList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveFileList (0 custom class methods, 6 custom properties) + +#import "GTLDriveFileList.h" + +#import "GTLDriveFile.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveFileList +// + +@implementation GTLDriveFileList +@dynamic ETag, items, kind, nextLink, nextPageToken, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLDriveFile class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#fileList"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveParentList.h b/GTL/Source/Services/Drive/Generated/GTLDriveParentList.h new file mode 100644 index 0000000..1c6ae12 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveParentList.h @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveParentList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveParentList (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveParentReference; + +// ---------------------------------------------------------------------------- +// +// GTLDriveParentList +// + +// A list of a file's parents. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLDriveParentList : GTLCollectionObject + +// The ETag of the list. +@property (copy) NSString *ETag; + +// The actual list of parents. +@property (retain) NSArray *items; // of GTLDriveParentReference + +// This is always drive#parentList. +@property (copy) NSString *kind; + +// A link back to this list. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveParentList.m b/GTL/Source/Services/Drive/Generated/GTLDriveParentList.m new file mode 100644 index 0000000..e4c9736 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveParentList.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveParentList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveParentList (0 custom class methods, 4 custom properties) + +#import "GTLDriveParentList.h" + +#import "GTLDriveParentReference.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveParentList +// + +@implementation GTLDriveParentList +@dynamic ETag, items, kind, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLDriveParentReference class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#parentList"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveParentReference.h b/GTL/Source/Services/Drive/Generated/GTLDriveParentReference.h new file mode 100644 index 0000000..bdc8716 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveParentReference.h @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveParentReference.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveParentReference (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLDriveParentReference +// + +// A reference to a file's parent. + +@interface GTLDriveParentReference : GTLObject + +// The ID of the parent. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Whether or not the parent is the root folder. +@property (retain) NSNumber *isRoot; // boolValue + +// This is always drive#parentReference. +@property (copy) NSString *kind; + +// A link to the parent. +@property (copy) NSString *parentLink; + +// A link back to this reference. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveParentReference.m b/GTL/Source/Services/Drive/Generated/GTLDriveParentReference.m new file mode 100644 index 0000000..dc12c3f --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveParentReference.m @@ -0,0 +1,52 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveParentReference.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveParentReference (0 custom class methods, 5 custom properties) + +#import "GTLDriveParentReference.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveParentReference +// + +@implementation GTLDriveParentReference +@dynamic identifier, isRoot, kind, parentLink, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#parentReference"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDrivePermission.h b/GTL/Source/Services/Drive/Generated/GTLDrivePermission.h new file mode 100644 index 0000000..843b975 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDrivePermission.h @@ -0,0 +1,91 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDrivePermission.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDrivePermission (0 custom class methods, 12 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLDrivePermission +// + +// A single permission for a file. + +@interface GTLDrivePermission : GTLObject + +// Additional roles for this user. Only commenter is currently allowed. +@property (retain) NSArray *additionalRoles; // of NSString + +// The authkey parameter required for this permission. +@property (copy) NSString *authKey; + +// The ETag of the permission. +@property (copy) NSString *ETag; + +// The ID of the permission. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// This is always drive#permission. +@property (copy) NSString *kind; + +// The name for this permission. +@property (copy) NSString *name; + +// A link to the profile photo, if available. +@property (copy) NSString *photoLink; + +// The primary role for this user. Allowed values are: +// - owner +// - reader +// - writer +@property (copy) NSString *role; + +// A link back to this permission. +@property (copy) NSString *selfLink; + +// The account type. Allowed values are: +// - user +// - group +// - domain +// - anyone +@property (copy) NSString *type; + +// The email address or domain name for the entity. This is not populated in +// responses. +@property (copy) NSString *value; + +// Whether the link is required for this permission. +@property (retain) NSNumber *withLink; // boolValue + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDrivePermission.m b/GTL/Source/Services/Drive/Generated/GTLDrivePermission.m new file mode 100644 index 0000000..0b0ffdd --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDrivePermission.m @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDrivePermission.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDrivePermission (0 custom class methods, 12 custom properties) + +#import "GTLDrivePermission.h" + +// ---------------------------------------------------------------------------- +// +// GTLDrivePermission +// + +@implementation GTLDrivePermission +@dynamic additionalRoles, authKey, ETag, identifier, kind, name, photoLink, + role, selfLink, type, value, withLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"additionalRoles"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#permission"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDrivePermissionList.h b/GTL/Source/Services/Drive/Generated/GTLDrivePermissionList.h new file mode 100644 index 0000000..5bd9c25 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDrivePermissionList.h @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDrivePermissionList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDrivePermissionList (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDrivePermission; + +// ---------------------------------------------------------------------------- +// +// GTLDrivePermissionList +// + +// A list of permissions associated with a file. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLDrivePermissionList : GTLCollectionObject + +// The ETag of the list. +@property (copy) NSString *ETag; + +// The actual list of permissions. +@property (retain) NSArray *items; // of GTLDrivePermission + +// This is always drive#permissionList. +@property (copy) NSString *kind; + +// A link back to this list. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDrivePermissionList.m b/GTL/Source/Services/Drive/Generated/GTLDrivePermissionList.m new file mode 100644 index 0000000..1d92b94 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDrivePermissionList.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDrivePermissionList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDrivePermissionList (0 custom class methods, 4 custom properties) + +#import "GTLDrivePermissionList.h" + +#import "GTLDrivePermission.h" + +// ---------------------------------------------------------------------------- +// +// GTLDrivePermissionList +// + +@implementation GTLDrivePermissionList +@dynamic ETag, items, kind, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLDrivePermission class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#permissionList"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveRevision.h b/GTL/Source/Services/Drive/Generated/GTLDriveRevision.h new file mode 100644 index 0000000..a255a11 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveRevision.h @@ -0,0 +1,125 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveRevision.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveRevision (0 custom class methods, 17 custom properties) +// GTLDriveRevisionExportLinks (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveRevisionExportLinks; + +// ---------------------------------------------------------------------------- +// +// GTLDriveRevision +// + +// A single revision of a file. + +@interface GTLDriveRevision : GTLObject + +// Short term download URL for the file. This will only be populated on files +// with content stored in Drive. +@property (copy) NSString *downloadUrl; + +// The ETag of the revision. +@property (copy) NSString *ETag; + +// Links for exporting Google Docs to specific formats. +@property (retain) GTLDriveRevisionExportLinks *exportLinks; + +// The size of the revision in bytes. This will only be populated on files with +// content stored in Drive. +@property (retain) NSNumber *fileSize; // longLongValue + +// The ID of the revision. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// This is always drive#revision. +@property (copy) NSString *kind; + +// Name of the last user to modify this revision. +@property (copy) NSString *lastModifyingUserName; + +// An MD5 checksum for the content of this revision. This will only be populated +// on files with content stored in Drive. +@property (copy) NSString *md5Checksum; + +// The MIME type of the revision. +@property (copy) NSString *mimeType; + +// Last time this revision was modified (formatted RFC 3339 timestamp). +@property (retain) GTLDateTime *modifiedDate; + +// The original filename when this revision was created. This will only be +// populated on files with content stored in Drive. +@property (copy) NSString *originalFilename; + +// Whether this revision is pinned to prevent automatic purging. This will only +// be populated and can only be modified on files with content stored in Drive +// which are not Google Docs. Revisions can also be pinned when they are created +// through the drive.files.insert/update/copy by using the pinned query +// parameter. +@property (retain) NSNumber *pinned; // boolValue + +// Whether subsequent revisions will be automatically republished. This is only +// populated and can only be modified for Google Docs. +@property (retain) NSNumber *publishAuto; // boolValue + +// Whether this revision is published. This is only populated and can only be +// modified for Google Docs. +@property (retain) NSNumber *published; // boolValue + +// A link to the published revision. +@property (copy) NSString *publishedLink; + +// Whether this revision is published outside the domain. This is only populated +// and can only be modified for Google Docs. +@property (retain) NSNumber *publishedOutsideDomain; // boolValue + +// A link back to this revision. +@property (copy) NSString *selfLink; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveRevisionExportLinks +// + +@interface GTLDriveRevisionExportLinks : GTLObject +// This object is documented as having more properties that are NSString. Use +// -additionalJSONKeys and -additionalPropertyForName: to get the list of +// properties and then fetch them; or -additionalProperties to fetch them all at +// once. +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveRevision.m b/GTL/Source/Services/Drive/Generated/GTLDriveRevision.m new file mode 100644 index 0000000..ee05afe --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveRevision.m @@ -0,0 +1,72 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveRevision.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveRevision (0 custom class methods, 17 custom properties) +// GTLDriveRevisionExportLinks (0 custom class methods, 0 custom properties) + +#import "GTLDriveRevision.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveRevision +// + +@implementation GTLDriveRevision +@dynamic downloadUrl, ETag, exportLinks, fileSize, identifier, kind, + lastModifyingUserName, md5Checksum, mimeType, modifiedDate, + originalFilename, pinned, publishAuto, published, publishedLink, + publishedOutsideDomain, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#revision"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveRevisionExportLinks +// + +@implementation GTLDriveRevisionExportLinks + ++ (Class)classForAdditionalProperties { + return [NSString class]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveRevisionList.h b/GTL/Source/Services/Drive/Generated/GTLDriveRevisionList.h new file mode 100644 index 0000000..72c1faf --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveRevisionList.h @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveRevisionList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveRevisionList (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveRevision; + +// ---------------------------------------------------------------------------- +// +// GTLDriveRevisionList +// + +// A list of revisions of a file. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLDriveRevisionList : GTLCollectionObject + +// The ETag of the list. +@property (copy) NSString *ETag; + +// The actual list of revisions. +@property (retain) NSArray *items; // of GTLDriveRevision + +// This is always drive#revisionList. +@property (copy) NSString *kind; + +// A link back to this list. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveRevisionList.m b/GTL/Source/Services/Drive/Generated/GTLDriveRevisionList.m new file mode 100644 index 0000000..3bdf6c7 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveRevisionList.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveRevisionList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveRevisionList (0 custom class methods, 4 custom properties) + +#import "GTLDriveRevisionList.h" + +#import "GTLDriveRevision.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveRevisionList +// + +@implementation GTLDriveRevisionList +@dynamic ETag, items, kind, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLDriveRevision class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"drive#revisionList"]; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveUser.h b/GTL/Source/Services/Drive/Generated/GTLDriveUser.h new file mode 100644 index 0000000..5437175 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveUser.h @@ -0,0 +1,75 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveUser.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveUser (0 custom class methods, 4 custom properties) +// GTLDriveUserPicture (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLDriveUserPicture; + +// ---------------------------------------------------------------------------- +// +// GTLDriveUser +// + +// The JSON template for a user. + +@interface GTLDriveUser : GTLObject + +// A plain text displayable name for this user. +@property (copy) NSString *displayName; + +// Whether this user is the same as the authenticated user of which the request +// was made on behalf. +@property (retain) NSNumber *isAuthenticatedUser; // boolValue + +// This is always drive#user. +@property (copy) NSString *kind; + +// The user's profile picture. +@property (retain) GTLDriveUserPicture *picture; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveUserPicture +// + +@interface GTLDriveUserPicture : GTLObject + +// A URL that points to a profile picture of this user. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDriveUser.m b/GTL/Source/Services/Drive/Generated/GTLDriveUser.m new file mode 100644 index 0000000..eb8e8f9 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDriveUser.m @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDriveUser.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLDriveUser (0 custom class methods, 4 custom properties) +// GTLDriveUserPicture (0 custom class methods, 1 custom properties) + +#import "GTLDriveUser.h" + +// ---------------------------------------------------------------------------- +// +// GTLDriveUser +// + +@implementation GTLDriveUser +@dynamic displayName, isAuthenticatedUser, kind, picture; + ++ (void)load { + [self registerObjectClassForKind:@"drive#user"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLDriveUserPicture +// + +@implementation GTLDriveUserPicture +@dynamic url; +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLDrive_Sources.m b/GTL/Source/Services/Drive/Generated/GTLDrive_Sources.m new file mode 100644 index 0000000..7e17ca9 --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLDrive_Sources.m @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLDrive_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ + +#import "GTLDriveConstants.m" + +#import "GTLDriveAbout.m" +#import "GTLDriveApp.m" +#import "GTLDriveAppList.m" +#import "GTLDriveChange.m" +#import "GTLDriveChangeList.m" +#import "GTLDriveChildList.m" +#import "GTLDriveChildReference.m" +#import "GTLDriveComment.m" +#import "GTLDriveCommentList.m" +#import "GTLDriveCommentReply.m" +#import "GTLDriveCommentReplyList.m" +#import "GTLDriveFile.m" +#import "GTLDriveFileList.m" +#import "GTLDriveParentList.m" +#import "GTLDriveParentReference.m" +#import "GTLDrivePermission.m" +#import "GTLDrivePermissionList.m" +#import "GTLDriveRevision.m" +#import "GTLDriveRevisionList.m" +#import "GTLDriveUser.m" + +#import "GTLQueryDrive.m" +#import "GTLServiceDrive.m" diff --git a/GTL/Source/Services/Drive/Generated/GTLQueryDrive.h b/GTL/Source/Services/Drive/Generated/GTLQueryDrive.h new file mode 100644 index 0000000..2ed817e --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLQueryDrive.h @@ -0,0 +1,796 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryDrive.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLQueryDrive (46 custom class methods, 32 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLDriveChildReference; +@class GTLDriveComment; +@class GTLDriveCommentReply; +@class GTLDriveFile; +@class GTLDriveParentReference; +@class GTLDrivePermission; +@class GTLDriveRevision; + +@interface GTLQueryDrive : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *appId; +@property (copy) NSString *changeId; +@property (copy) NSString *childId; +@property (copy) NSString *commentId; +@property (assign) BOOL convert; +@property (copy) NSString *fileId; +@property (copy) NSString *folderId; +@property (assign) BOOL includeDeleted; +@property (assign) BOOL includeSubscribed; +@property (assign) long long maxChangeIdCount; +@property (assign) NSInteger maxResults; +@property (assign) BOOL newRevision; +@property (assign) BOOL ocr; +@property (copy) NSString *ocrLanguage; +@property (copy) NSString *pageToken; +@property (copy) NSString *parentId; +@property (copy) NSString *permissionId; +@property (assign) BOOL pinned; +@property (copy) NSString *projection; +@property (copy) NSString *q; +@property (copy) NSString *replyId; +@property (copy) NSString *revisionId; +@property (assign) BOOL sendNotificationEmails; +@property (assign) BOOL setModifiedDate; +@property (copy) NSString *sourceLanguage; +@property (assign) long long startChangeId; +@property (copy) NSString *targetLanguage; +@property (copy) NSString *timedTextLanguage; +@property (copy) NSString *timedTextTrackName; +@property (copy) NSString *updatedMin; +@property (assign) BOOL updateViewedDate; + +#pragma mark - +#pragma mark "about" methods +// These create a GTLQueryDrive object. + +// Method: drive.about.get +// Gets the information about the current user along with Drive API settings +// Optional: +// includeSubscribed: When calculating the number of remaining change IDs, +// whether to include shared files and public files the user has opened. +// When set to false, this counts only change IDs for owned files and any +// shared or public files that the user has explictly added to a folder in +// Drive. (Default true) +// maxChangeIdCount: Maximum number of remaining change IDs to count (Default +// 1) +// startChangeId: Change ID to start counting from when calculating number of +// remaining change IDs +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveAbout. ++ (id)queryForAboutGet; + +#pragma mark - +#pragma mark "apps" methods +// These create a GTLQueryDrive object. + +// Method: drive.apps.get +// Gets a specific app. +// Required: +// appId: The ID of the app. +// Authorization scope(s): +// kGTLAuthScopeDriveAppsReadonly +// Fetches a GTLDriveApp. ++ (id)queryForAppsGetWithAppId:(NSString *)appId; + +// Method: drive.apps.list +// Lists a user's apps. +// Authorization scope(s): +// kGTLAuthScopeDriveAppsReadonly +// Fetches a GTLDriveAppList. ++ (id)queryForAppsList; + +#pragma mark - +#pragma mark "changes" methods +// These create a GTLQueryDrive object. + +// Method: drive.changes.get +// Gets a specific change. +// Required: +// changeId: The ID of the change. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveChange. ++ (id)queryForChangesGetWithChangeId:(NSString *)changeId; + +// Method: drive.changes.list +// Lists the changes for a user. +// Optional: +// includeDeleted: Whether to include deleted items. (Default true) +// includeSubscribed: Whether to include shared files and public files the +// user has opened. When set to false, the list will include owned files +// plus any shared or public files the user has explictly added to a folder +// in Drive. (Default true) +// maxResults: Maximum number of changes to return. (Default 100) +// pageToken: Page token for changes. +// startChangeId: Change ID to start listing changes from. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveChangeList. ++ (id)queryForChangesList; + +#pragma mark - +#pragma mark "children" methods +// These create a GTLQueryDrive object. + +// Method: drive.children.delete +// Removes a child from a folder. +// Required: +// folderId: The ID of the folder. +// childId: The ID of the child. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile ++ (id)queryForChildrenDeleteWithFolderId:(NSString *)folderId + childId:(NSString *)childId; + +// Method: drive.children.get +// Gets a specific child reference. +// Required: +// folderId: The ID of the folder. +// childId: The ID of the child. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveChildReference. ++ (id)queryForChildrenGetWithFolderId:(NSString *)folderId + childId:(NSString *)childId; + +// Method: drive.children.insert +// Inserts a file into a folder. +// Required: +// folderId: The ID of the folder. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDriveChildReference. ++ (id)queryForChildrenInsertWithObject:(GTLDriveChildReference *)object + folderId:(NSString *)folderId; + +// Method: drive.children.list +// Lists a folder's children. +// Required: +// folderId: The ID of the folder. +// Optional: +// maxResults: Maximum number of children to return. (Default 100) +// pageToken: Page token for children. +// q: Query string for searching children. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveChildList. ++ (id)queryForChildrenListWithFolderId:(NSString *)folderId; + +#pragma mark - +#pragma mark "comments" methods +// These create a GTLQueryDrive object. + +// Method: drive.comments.delete +// Deletes a comment. +// Required: +// fileId: The ID of the file. +// commentId: The ID of the comment. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveReadonly ++ (id)queryForCommentsDeleteWithFileId:(NSString *)fileId + commentId:(NSString *)commentId; + +// Method: drive.comments.get +// Gets a comment by ID. +// Required: +// fileId: The ID of the file. +// commentId: The ID of the comment. +// Optional: +// includeDeleted: If set, this will succeed when retrieving a deleted +// comment, and will include any deleted replies. (Default false) +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveComment. ++ (id)queryForCommentsGetWithFileId:(NSString *)fileId + commentId:(NSString *)commentId; + +// Method: drive.comments.insert +// Creates a new comment on the given file. +// Required: +// fileId: The ID of the file. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveComment. ++ (id)queryForCommentsInsertWithObject:(GTLDriveComment *)object + fileId:(NSString *)fileId; + +// Method: drive.comments.list +// Lists a file's comments. +// Required: +// fileId: The ID of the file. +// Optional: +// includeDeleted: If set, all comments and replies, including deleted +// comments and replies (with content stripped) will be returned. (Default +// false) +// maxResults: The maximum number of discussions to include in the response, +// used for paging. (0..100, default 20) +// pageToken: The continuation token, used to page through large result sets. +// To get the next page of results, set this parameter to the value of +// "nextPageToken" from the previous response. +// updatedMin: Only discussions that were updated after this timestamp will be +// returned. Formatted as an RFC 3339 timestamp. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveCommentList. ++ (id)queryForCommentsListWithFileId:(NSString *)fileId; + +// Method: drive.comments.patch +// Updates an existing comment. This method supports patch semantics. +// Required: +// fileId: The ID of the file. +// commentId: The ID of the comment. +// Authorization scope(s): +// kGTLAuthScopeDrive +// Fetches a GTLDriveComment. ++ (id)queryForCommentsPatchWithObject:(GTLDriveComment *)object + fileId:(NSString *)fileId + commentId:(NSString *)commentId; + +// Method: drive.comments.update +// Updates an existing comment. +// Required: +// fileId: The ID of the file. +// commentId: The ID of the comment. +// Authorization scope(s): +// kGTLAuthScopeDrive +// Fetches a GTLDriveComment. ++ (id)queryForCommentsUpdateWithObject:(GTLDriveComment *)object + fileId:(NSString *)fileId + commentId:(NSString *)commentId; + +#pragma mark - +#pragma mark "files" methods +// These create a GTLQueryDrive object. + +// Method: drive.files.copy +// Creates a copy of the specified file. +// Required: +// fileId: The ID of the file to copy. +// Optional: +// convert: Whether to convert this file to the corresponding Google Docs +// format. (Default false) +// ocr: Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. (Default +// false) +// ocrLanguage: If ocr is true, hints at the language to use. Valid values are +// ISO 639-1 codes. +// pinned: Whether to pin the head revision of the new copy. (Default false) +// sourceLanguage: The language of the original file to be translated. +// targetLanguage: Target language to translate the file to. If no +// sourceLanguage is provided, the API will attempt to detect the language. +// timedTextLanguage: The language of the timed text. +// timedTextTrackName: The timed text track name. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDriveFile. ++ (id)queryForFilesCopyWithObject:(GTLDriveFile *)object + fileId:(NSString *)fileId; + +// Method: drive.files.delete +// Permanently deletes a file by ID. Skips the trash. +// Required: +// fileId: The ID of the file to delete. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile ++ (id)queryForFilesDeleteWithFileId:(NSString *)fileId; + +// Method: drive.files.get +// Gets a file's metadata by ID. +// Required: +// fileId: The ID for the file in question. +// Optional: +// projection: This parameter is deprecated and has no function. +// kGTLDriveProjectionBasic: Deprecated +// kGTLDriveProjectionFull: Deprecated +// updateViewedDate: Whether to update the view date after successfully +// retrieving the file. (Default false) +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveFile. ++ (id)queryForFilesGetWithFileId:(NSString *)fileId; + +// Method: drive.files.insert +// Insert a new file. +// Optional: +// convert: Whether to convert this file to the corresponding Google Docs +// format. (Default false) +// ocr: Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. (Default +// false) +// ocrLanguage: If ocr is true, hints at the language to use. Valid values are +// ISO 639-1 codes. +// pinned: Whether to pin the head revision of the uploaded file. (Default +// false) +// sourceLanguage: The language of the original file to be translated. +// targetLanguage: Target language to translate the file to. If no +// sourceLanguage is provided, the API will attempt to detect the language. +// timedTextLanguage: The language of the timed text. +// timedTextTrackName: The timed text track name. +// Upload Parameters: +// Maximum size: 10GB +// Accepted MIME type(s): */* +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDriveFile. ++ (id)queryForFilesInsertWithObject:(GTLDriveFile *)object + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil; + +// Method: drive.files.list +// Lists the user's files. +// Optional: +// maxResults: Maximum number of files to return. (Default 100) +// pageToken: Page token for files. +// projection: This parameter is deprecated and has no function. +// kGTLDriveProjectionBasic: Deprecated +// kGTLDriveProjectionFull: Deprecated +// q: Query string for searching files. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveFileList. ++ (id)queryForFilesList; + +// Method: drive.files.patch +// Updates file metadata and/or content. This method supports patch semantics. +// Required: +// fileId: The ID of the file to update. +// Optional: +// convert: Whether to convert this file to the corresponding Google Docs +// format. (Default false) +// newRevision: Whether a blob upload should create a new revision. If false, +// the blob data in the current head revision will be replaced. (Default +// true) +// ocr: Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. (Default +// false) +// ocrLanguage: If ocr is true, hints at the language to use. Valid values are +// ISO 639-1 codes. +// pinned: Whether to pin the new revision. (Default false) +// setModifiedDate: Whether to set the modified date with the supplied +// modified date. (Default false) +// sourceLanguage: The language of the original file to be translated. +// targetLanguage: Target language to translate the file to. If no +// sourceLanguage is provided, the API will attempt to detect the language. +// timedTextLanguage: The language of the timed text. +// timedTextTrackName: The timed text track name. +// updateViewedDate: Whether to update the view date after successfully +// updating the file. (Default true) +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDriveFile. ++ (id)queryForFilesPatchWithObject:(GTLDriveFile *)object + fileId:(NSString *)fileId; + +// Method: drive.files.touch +// Set the file's updated time to the current server time. +// Required: +// fileId: The ID of the file to update. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDriveFile. ++ (id)queryForFilesTouchWithFileId:(NSString *)fileId; + +// Method: drive.files.trash +// Moves a file to the trash. +// Required: +// fileId: The ID of the file to trash. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDriveFile. ++ (id)queryForFilesTrashWithFileId:(NSString *)fileId; + +// Method: drive.files.untrash +// Restores a file from the trash. +// Required: +// fileId: The ID of the file to untrash. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDriveFile. ++ (id)queryForFilesUntrashWithFileId:(NSString *)fileId; + +// Method: drive.files.update +// Updates file metadata and/or content +// Required: +// fileId: The ID of the file to update. +// Optional: +// convert: Whether to convert this file to the corresponding Google Docs +// format. (Default false) +// newRevision: Whether a blob upload should create a new revision. If false, +// the blob data in the current head revision will be replaced. (Default +// true) +// ocr: Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. (Default +// false) +// ocrLanguage: If ocr is true, hints at the language to use. Valid values are +// ISO 639-1 codes. +// pinned: Whether to pin the new revision. (Default false) +// setModifiedDate: Whether to set the modified date with the supplied +// modified date. (Default false) +// sourceLanguage: The language of the original file to be translated. +// targetLanguage: Target language to translate the file to. If no +// sourceLanguage is provided, the API will attempt to detect the language. +// timedTextLanguage: The language of the timed text. +// timedTextTrackName: The timed text track name. +// updateViewedDate: Whether to update the view date after successfully +// updating the file. (Default true) +// Upload Parameters: +// Maximum size: 10GB +// Accepted MIME type(s): */* +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDriveFile. ++ (id)queryForFilesUpdateWithObject:(GTLDriveFile *)object + fileId:(NSString *)fileId + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil; + +#pragma mark - +#pragma mark "parents" methods +// These create a GTLQueryDrive object. + +// Method: drive.parents.delete +// Removes a parent from a file. +// Required: +// fileId: The ID of the file. +// parentId: The ID of the parent. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile ++ (id)queryForParentsDeleteWithFileId:(NSString *)fileId + parentId:(NSString *)parentId; + +// Method: drive.parents.get +// Gets a specific parent reference. +// Required: +// fileId: The ID of the file. +// parentId: The ID of the parent. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveParentReference. ++ (id)queryForParentsGetWithFileId:(NSString *)fileId + parentId:(NSString *)parentId; + +// Method: drive.parents.insert +// Adds a parent folder for a file. +// Required: +// fileId: The ID of the file. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDriveParentReference. ++ (id)queryForParentsInsertWithObject:(GTLDriveParentReference *)object + fileId:(NSString *)fileId; + +// Method: drive.parents.list +// Lists a file's parents. +// Required: +// fileId: The ID of the file. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveParentList. ++ (id)queryForParentsListWithFileId:(NSString *)fileId; + +#pragma mark - +#pragma mark "permissions" methods +// These create a GTLQueryDrive object. + +// Method: drive.permissions.delete +// Deletes a permission from a file. +// Required: +// fileId: The ID for the file. +// permissionId: The ID for the permission. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile ++ (id)queryForPermissionsDeleteWithFileId:(NSString *)fileId + permissionId:(NSString *)permissionId; + +// Method: drive.permissions.get +// Gets a permission by ID. +// Required: +// fileId: The ID for the file. +// permissionId: The ID for the permission. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDrivePermission. ++ (id)queryForPermissionsGetWithFileId:(NSString *)fileId + permissionId:(NSString *)permissionId; + +// Method: drive.permissions.insert +// Inserts a permission for a file. +// Required: +// fileId: The ID for the file. +// Optional: +// sendNotificationEmails: Whether to send notification emails. (Default true) +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDrivePermission. ++ (id)queryForPermissionsInsertWithObject:(GTLDrivePermission *)object + fileId:(NSString *)fileId; + +// Method: drive.permissions.list +// Lists a file's permissions. +// Required: +// fileId: The ID for the file. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDrivePermissionList. ++ (id)queryForPermissionsListWithFileId:(NSString *)fileId; + +// Method: drive.permissions.patch +// Updates a permission. This method supports patch semantics. +// Required: +// fileId: The ID for the file. +// permissionId: The ID for the permission. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDrivePermission. ++ (id)queryForPermissionsPatchWithObject:(GTLDrivePermission *)object + fileId:(NSString *)fileId + permissionId:(NSString *)permissionId; + +// Method: drive.permissions.update +// Updates a permission. +// Required: +// fileId: The ID for the file. +// permissionId: The ID for the permission. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDrivePermission. ++ (id)queryForPermissionsUpdateWithObject:(GTLDrivePermission *)object + fileId:(NSString *)fileId + permissionId:(NSString *)permissionId; + +#pragma mark - +#pragma mark "replies" methods +// These create a GTLQueryDrive object. + +// Method: drive.replies.delete +// Deletes a reply. +// Required: +// fileId: The ID of the file. +// commentId: The ID of the comment. +// replyId: The ID of the reply. +// Authorization scope(s): +// kGTLAuthScopeDrive ++ (id)queryForRepliesDeleteWithFileId:(NSString *)fileId + commentId:(NSString *)commentId + replyId:(NSString *)replyId; + +// Method: drive.replies.get +// Gets a reply. +// Required: +// fileId: The ID of the file. +// commentId: The ID of the comment. +// replyId: The ID of the reply. +// Optional: +// includeDeleted: If set, this will succeed when retrieving a deleted reply. +// (Default false) +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveCommentReply. ++ (id)queryForRepliesGetWithFileId:(NSString *)fileId + commentId:(NSString *)commentId + replyId:(NSString *)replyId; + +// Method: drive.replies.insert +// Creates a new reply to the given comment. +// Required: +// fileId: The ID of the file. +// commentId: The ID of the comment. +// Authorization scope(s): +// kGTLAuthScopeDrive +// Fetches a GTLDriveCommentReply. ++ (id)queryForRepliesInsertWithObject:(GTLDriveCommentReply *)object + fileId:(NSString *)fileId + commentId:(NSString *)commentId; + +// Method: drive.replies.list +// Lists all of the replies to a comment. +// Required: +// fileId: The ID of the file. +// commentId: The ID of the comment. +// Optional: +// includeDeleted: If set, all replies, including deleted replies (with +// content stripped) will be returned. (Default false) +// maxResults: The maximum number of replies to include in the response, used +// for paging. (0..100, default 20) +// pageToken: The continuation token, used to page through large result sets. +// To get the next page of results, set this parameter to the value of +// "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveCommentReplyList. ++ (id)queryForRepliesListWithFileId:(NSString *)fileId + commentId:(NSString *)commentId; + +// Method: drive.replies.patch +// Updates an existing reply. This method supports patch semantics. +// Required: +// fileId: The ID of the file. +// commentId: The ID of the comment. +// replyId: The ID of the reply. +// Authorization scope(s): +// kGTLAuthScopeDrive +// Fetches a GTLDriveCommentReply. ++ (id)queryForRepliesPatchWithObject:(GTLDriveCommentReply *)object + fileId:(NSString *)fileId + commentId:(NSString *)commentId + replyId:(NSString *)replyId; + +// Method: drive.replies.update +// Updates an existing reply. +// Required: +// fileId: The ID of the file. +// commentId: The ID of the comment. +// replyId: The ID of the reply. +// Authorization scope(s): +// kGTLAuthScopeDrive +// Fetches a GTLDriveCommentReply. ++ (id)queryForRepliesUpdateWithObject:(GTLDriveCommentReply *)object + fileId:(NSString *)fileId + commentId:(NSString *)commentId + replyId:(NSString *)replyId; + +#pragma mark - +#pragma mark "revisions" methods +// These create a GTLQueryDrive object. + +// Method: drive.revisions.delete +// Removes a revision. +// Required: +// fileId: The ID of the file. +// revisionId: The ID of the revision. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile ++ (id)queryForRevisionsDeleteWithFileId:(NSString *)fileId + revisionId:(NSString *)revisionId; + +// Method: drive.revisions.get +// Gets a specific revision. +// Required: +// fileId: The ID of the file. +// revisionId: The ID of the revision. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveRevision. ++ (id)queryForRevisionsGetWithFileId:(NSString *)fileId + revisionId:(NSString *)revisionId; + +// Method: drive.revisions.list +// Lists a file's revisions. +// Required: +// fileId: The ID of the file. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// kGTLAuthScopeDriveMetadataReadonly +// kGTLAuthScopeDriveReadonly +// Fetches a GTLDriveRevisionList. ++ (id)queryForRevisionsListWithFileId:(NSString *)fileId; + +// Method: drive.revisions.patch +// Updates a revision. This method supports patch semantics. +// Required: +// fileId: The ID for the file. +// revisionId: The ID for the revision. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDriveRevision. ++ (id)queryForRevisionsPatchWithObject:(GTLDriveRevision *)object + fileId:(NSString *)fileId + revisionId:(NSString *)revisionId; + +// Method: drive.revisions.update +// Updates a revision. +// Required: +// fileId: The ID for the file. +// revisionId: The ID for the revision. +// Authorization scope(s): +// kGTLAuthScopeDrive +// kGTLAuthScopeDriveFile +// Fetches a GTLDriveRevision. ++ (id)queryForRevisionsUpdateWithObject:(GTLDriveRevision *)object + fileId:(NSString *)fileId + revisionId:(NSString *)revisionId; + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLQueryDrive.m b/GTL/Source/Services/Drive/Generated/GTLQueryDrive.m new file mode 100644 index 0000000..77fd0ed --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLQueryDrive.m @@ -0,0 +1,615 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryDrive.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLQueryDrive (46 custom class methods, 32 custom properties) + +#import "GTLQueryDrive.h" + +#import "GTLDriveAbout.h" +#import "GTLDriveApp.h" +#import "GTLDriveAppList.h" +#import "GTLDriveChange.h" +#import "GTLDriveChangeList.h" +#import "GTLDriveChildList.h" +#import "GTLDriveChildReference.h" +#import "GTLDriveComment.h" +#import "GTLDriveCommentList.h" +#import "GTLDriveCommentReply.h" +#import "GTLDriveCommentReplyList.h" +#import "GTLDriveFile.h" +#import "GTLDriveFileList.h" +#import "GTLDriveParentList.h" +#import "GTLDriveParentReference.h" +#import "GTLDrivePermission.h" +#import "GTLDrivePermissionList.h" +#import "GTLDriveRevision.h" +#import "GTLDriveRevisionList.h" + +@implementation GTLQueryDrive + +@dynamic appId, changeId, childId, commentId, convert, fields, fileId, folderId, + includeDeleted, includeSubscribed, maxChangeIdCount, maxResults, + newRevision, ocr, ocrLanguage, pageToken, parentId, permissionId, + pinned, projection, q, replyId, revisionId, sendNotificationEmails, + setModifiedDate, sourceLanguage, startChangeId, targetLanguage, + timedTextLanguage, timedTextTrackName, updatedMin, updateViewedDate; + +#pragma mark - +#pragma mark "about" methods +// These create a GTLQueryDrive object. + ++ (id)queryForAboutGet { + NSString *methodName = @"drive.about.get"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLDriveAbout class]; + return query; +} + +#pragma mark - +#pragma mark "apps" methods +// These create a GTLQueryDrive object. + ++ (id)queryForAppsGetWithAppId:(NSString *)appId { + NSString *methodName = @"drive.apps.get"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.appId = appId; + query.expectedObjectClass = [GTLDriveApp class]; + return query; +} + ++ (id)queryForAppsList { + NSString *methodName = @"drive.apps.list"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLDriveAppList class]; + return query; +} + +#pragma mark - +#pragma mark "changes" methods +// These create a GTLQueryDrive object. + ++ (id)queryForChangesGetWithChangeId:(NSString *)changeId { + NSString *methodName = @"drive.changes.get"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.changeId = changeId; + query.expectedObjectClass = [GTLDriveChange class]; + return query; +} + ++ (id)queryForChangesList { + NSString *methodName = @"drive.changes.list"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLDriveChangeList class]; + return query; +} + +#pragma mark - +#pragma mark "children" methods +// These create a GTLQueryDrive object. + ++ (id)queryForChildrenDeleteWithFolderId:(NSString *)folderId + childId:(NSString *)childId { + NSString *methodName = @"drive.children.delete"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.folderId = folderId; + query.childId = childId; + return query; +} + ++ (id)queryForChildrenGetWithFolderId:(NSString *)folderId + childId:(NSString *)childId { + NSString *methodName = @"drive.children.get"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.folderId = folderId; + query.childId = childId; + query.expectedObjectClass = [GTLDriveChildReference class]; + return query; +} + ++ (id)queryForChildrenInsertWithObject:(GTLDriveChildReference *)object + folderId:(NSString *)folderId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.children.insert"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.folderId = folderId; + query.expectedObjectClass = [GTLDriveChildReference class]; + return query; +} + ++ (id)queryForChildrenListWithFolderId:(NSString *)folderId { + NSString *methodName = @"drive.children.list"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.folderId = folderId; + query.expectedObjectClass = [GTLDriveChildList class]; + return query; +} + +#pragma mark - +#pragma mark "comments" methods +// These create a GTLQueryDrive object. + ++ (id)queryForCommentsDeleteWithFileId:(NSString *)fileId + commentId:(NSString *)commentId { + NSString *methodName = @"drive.comments.delete"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.commentId = commentId; + return query; +} + ++ (id)queryForCommentsGetWithFileId:(NSString *)fileId + commentId:(NSString *)commentId { + NSString *methodName = @"drive.comments.get"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.commentId = commentId; + query.expectedObjectClass = [GTLDriveComment class]; + return query; +} + ++ (id)queryForCommentsInsertWithObject:(GTLDriveComment *)object + fileId:(NSString *)fileId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.comments.insert"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.expectedObjectClass = [GTLDriveComment class]; + return query; +} + ++ (id)queryForCommentsListWithFileId:(NSString *)fileId { + NSString *methodName = @"drive.comments.list"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.expectedObjectClass = [GTLDriveCommentList class]; + return query; +} + ++ (id)queryForCommentsPatchWithObject:(GTLDriveComment *)object + fileId:(NSString *)fileId + commentId:(NSString *)commentId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.comments.patch"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.commentId = commentId; + query.expectedObjectClass = [GTLDriveComment class]; + return query; +} + ++ (id)queryForCommentsUpdateWithObject:(GTLDriveComment *)object + fileId:(NSString *)fileId + commentId:(NSString *)commentId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.comments.update"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.commentId = commentId; + query.expectedObjectClass = [GTLDriveComment class]; + return query; +} + +#pragma mark - +#pragma mark "files" methods +// These create a GTLQueryDrive object. + ++ (id)queryForFilesCopyWithObject:(GTLDriveFile *)object + fileId:(NSString *)fileId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.files.copy"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.expectedObjectClass = [GTLDriveFile class]; + return query; +} + ++ (id)queryForFilesDeleteWithFileId:(NSString *)fileId { + NSString *methodName = @"drive.files.delete"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + return query; +} + ++ (id)queryForFilesGetWithFileId:(NSString *)fileId { + NSString *methodName = @"drive.files.get"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.expectedObjectClass = [GTLDriveFile class]; + return query; +} + ++ (id)queryForFilesInsertWithObject:(GTLDriveFile *)object + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.files.insert"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.uploadParameters = uploadParametersOrNil; + query.expectedObjectClass = [GTLDriveFile class]; + return query; +} + ++ (id)queryForFilesList { + NSString *methodName = @"drive.files.list"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLDriveFileList class]; + return query; +} + ++ (id)queryForFilesPatchWithObject:(GTLDriveFile *)object + fileId:(NSString *)fileId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.files.patch"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.expectedObjectClass = [GTLDriveFile class]; + return query; +} + ++ (id)queryForFilesTouchWithFileId:(NSString *)fileId { + NSString *methodName = @"drive.files.touch"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.expectedObjectClass = [GTLDriveFile class]; + return query; +} + ++ (id)queryForFilesTrashWithFileId:(NSString *)fileId { + NSString *methodName = @"drive.files.trash"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.expectedObjectClass = [GTLDriveFile class]; + return query; +} + ++ (id)queryForFilesUntrashWithFileId:(NSString *)fileId { + NSString *methodName = @"drive.files.untrash"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.expectedObjectClass = [GTLDriveFile class]; + return query; +} + ++ (id)queryForFilesUpdateWithObject:(GTLDriveFile *)object + fileId:(NSString *)fileId + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.files.update"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.uploadParameters = uploadParametersOrNil; + query.expectedObjectClass = [GTLDriveFile class]; + return query; +} + +#pragma mark - +#pragma mark "parents" methods +// These create a GTLQueryDrive object. + ++ (id)queryForParentsDeleteWithFileId:(NSString *)fileId + parentId:(NSString *)parentId { + NSString *methodName = @"drive.parents.delete"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.parentId = parentId; + return query; +} + ++ (id)queryForParentsGetWithFileId:(NSString *)fileId + parentId:(NSString *)parentId { + NSString *methodName = @"drive.parents.get"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.parentId = parentId; + query.expectedObjectClass = [GTLDriveParentReference class]; + return query; +} + ++ (id)queryForParentsInsertWithObject:(GTLDriveParentReference *)object + fileId:(NSString *)fileId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.parents.insert"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.expectedObjectClass = [GTLDriveParentReference class]; + return query; +} + ++ (id)queryForParentsListWithFileId:(NSString *)fileId { + NSString *methodName = @"drive.parents.list"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.expectedObjectClass = [GTLDriveParentList class]; + return query; +} + +#pragma mark - +#pragma mark "permissions" methods +// These create a GTLQueryDrive object. + ++ (id)queryForPermissionsDeleteWithFileId:(NSString *)fileId + permissionId:(NSString *)permissionId { + NSString *methodName = @"drive.permissions.delete"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.permissionId = permissionId; + return query; +} + ++ (id)queryForPermissionsGetWithFileId:(NSString *)fileId + permissionId:(NSString *)permissionId { + NSString *methodName = @"drive.permissions.get"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.permissionId = permissionId; + query.expectedObjectClass = [GTLDrivePermission class]; + return query; +} + ++ (id)queryForPermissionsInsertWithObject:(GTLDrivePermission *)object + fileId:(NSString *)fileId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.permissions.insert"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.expectedObjectClass = [GTLDrivePermission class]; + return query; +} + ++ (id)queryForPermissionsListWithFileId:(NSString *)fileId { + NSString *methodName = @"drive.permissions.list"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.expectedObjectClass = [GTLDrivePermissionList class]; + return query; +} + ++ (id)queryForPermissionsPatchWithObject:(GTLDrivePermission *)object + fileId:(NSString *)fileId + permissionId:(NSString *)permissionId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.permissions.patch"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.permissionId = permissionId; + query.expectedObjectClass = [GTLDrivePermission class]; + return query; +} + ++ (id)queryForPermissionsUpdateWithObject:(GTLDrivePermission *)object + fileId:(NSString *)fileId + permissionId:(NSString *)permissionId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.permissions.update"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.permissionId = permissionId; + query.expectedObjectClass = [GTLDrivePermission class]; + return query; +} + +#pragma mark - +#pragma mark "replies" methods +// These create a GTLQueryDrive object. + ++ (id)queryForRepliesDeleteWithFileId:(NSString *)fileId + commentId:(NSString *)commentId + replyId:(NSString *)replyId { + NSString *methodName = @"drive.replies.delete"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.commentId = commentId; + query.replyId = replyId; + return query; +} + ++ (id)queryForRepliesGetWithFileId:(NSString *)fileId + commentId:(NSString *)commentId + replyId:(NSString *)replyId { + NSString *methodName = @"drive.replies.get"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.commentId = commentId; + query.replyId = replyId; + query.expectedObjectClass = [GTLDriveCommentReply class]; + return query; +} + ++ (id)queryForRepliesInsertWithObject:(GTLDriveCommentReply *)object + fileId:(NSString *)fileId + commentId:(NSString *)commentId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.replies.insert"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.commentId = commentId; + query.expectedObjectClass = [GTLDriveCommentReply class]; + return query; +} + ++ (id)queryForRepliesListWithFileId:(NSString *)fileId + commentId:(NSString *)commentId { + NSString *methodName = @"drive.replies.list"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.commentId = commentId; + query.expectedObjectClass = [GTLDriveCommentReplyList class]; + return query; +} + ++ (id)queryForRepliesPatchWithObject:(GTLDriveCommentReply *)object + fileId:(NSString *)fileId + commentId:(NSString *)commentId + replyId:(NSString *)replyId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.replies.patch"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.commentId = commentId; + query.replyId = replyId; + query.expectedObjectClass = [GTLDriveCommentReply class]; + return query; +} + ++ (id)queryForRepliesUpdateWithObject:(GTLDriveCommentReply *)object + fileId:(NSString *)fileId + commentId:(NSString *)commentId + replyId:(NSString *)replyId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.replies.update"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.commentId = commentId; + query.replyId = replyId; + query.expectedObjectClass = [GTLDriveCommentReply class]; + return query; +} + +#pragma mark - +#pragma mark "revisions" methods +// These create a GTLQueryDrive object. + ++ (id)queryForRevisionsDeleteWithFileId:(NSString *)fileId + revisionId:(NSString *)revisionId { + NSString *methodName = @"drive.revisions.delete"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.revisionId = revisionId; + return query; +} + ++ (id)queryForRevisionsGetWithFileId:(NSString *)fileId + revisionId:(NSString *)revisionId { + NSString *methodName = @"drive.revisions.get"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.revisionId = revisionId; + query.expectedObjectClass = [GTLDriveRevision class]; + return query; +} + ++ (id)queryForRevisionsListWithFileId:(NSString *)fileId { + NSString *methodName = @"drive.revisions.list"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.fileId = fileId; + query.expectedObjectClass = [GTLDriveRevisionList class]; + return query; +} + ++ (id)queryForRevisionsPatchWithObject:(GTLDriveRevision *)object + fileId:(NSString *)fileId + revisionId:(NSString *)revisionId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.revisions.patch"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.revisionId = revisionId; + query.expectedObjectClass = [GTLDriveRevision class]; + return query; +} + ++ (id)queryForRevisionsUpdateWithObject:(GTLDriveRevision *)object + fileId:(NSString *)fileId + revisionId:(NSString *)revisionId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"drive.revisions.update"; + GTLQueryDrive *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.fileId = fileId; + query.revisionId = revisionId; + query.expectedObjectClass = [GTLDriveRevision class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLServiceDrive.h b/GTL/Source/Services/Drive/Generated/GTLServiceDrive.h new file mode 100644 index 0000000..d81141d --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLServiceDrive.h @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceDrive.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLServiceDrive (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceDrive : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryDrive.h. The query can the be sent with GTLService's execute methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Drive/Generated/GTLServiceDrive.m b/GTL/Source/Services/Drive/Generated/GTLServiceDrive.m new file mode 100644 index 0000000..d8a840f --- /dev/null +++ b/GTL/Source/Services/Drive/Generated/GTLServiceDrive.m @@ -0,0 +1,81 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceDrive.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Drive API (drive/v2) +// Description: +// The API to interact with Drive. +// Documentation: +// https://developers.google.com/drive/ +// Classes: +// GTLServiceDrive (0 custom class methods, 0 custom properties) + +#import "GTLDrive.h" + +@implementation GTLServiceDrive + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryDrive class], + [GTLDriveAbout class], + [GTLDriveApp class], + [GTLDriveAppList class], + [GTLDriveChange class], + [GTLDriveChangeList class], + [GTLDriveChildList class], + [GTLDriveChildReference class], + [GTLDriveComment class], + [GTLDriveCommentList class], + [GTLDriveCommentReply class], + [GTLDriveCommentReplyList class], + [GTLDriveFile class], + [GTLDriveFileList class], + [GTLDriveParentList class], + [GTLDriveParentReference class], + [GTLDrivePermission class], + [GTLDrivePermissionList class], + [GTLDriveRevision class], + [GTLDriveRevisionList class], + [GTLDriveUser class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v2"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + self.rpcUploadURL = [NSURL URLWithString:@"https://www.googleapis.com/upload/rpc?uploadType=resumable&prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Groupssettings/.svn/all-wcprops b/GTL/Source/Services/Groupssettings/.svn/all-wcprops new file mode 100644 index 0000000..b3d06f3 --- /dev/null +++ b/GTL/Source/Services/Groupssettings/.svn/all-wcprops @@ -0,0 +1,5 @@ +K 25 +svn:wc:ra_dav:version-url +V 54 +/svn/!svn/ver/225/trunk/Source/Services/Groupssettings +END diff --git a/GTL/Source/Services/Groupssettings/.svn/entries b/GTL/Source/Services/Groupssettings/.svn/entries new file mode 100644 index 0000000..d10f527 --- /dev/null +++ b/GTL/Source/Services/Groupssettings/.svn/entries @@ -0,0 +1,31 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Groupssettings +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +Generated +dir + diff --git a/GTL/Source/Services/Groupssettings/Generated/.svn/all-wcprops b/GTL/Source/Services/Groupssettings/Generated/.svn/all-wcprops new file mode 100644 index 0000000..a8b20cf --- /dev/null +++ b/GTL/Source/Services/Groupssettings/Generated/.svn/all-wcprops @@ -0,0 +1,65 @@ +K 25 +svn:wc:ra_dav:version-url +V 64 +/svn/!svn/ver/225/trunk/Source/Services/Groupssettings/Generated +END +GTLGroupssettingsConstants.m +K 25 +svn:wc:ra_dav:version-url +V 93 +/svn/!svn/ver/194/trunk/Source/Services/Groupssettings/Generated/GTLGroupssettingsConstants.m +END +GTLGroupssettingsGroups.m +K 25 +svn:wc:ra_dav:version-url +V 90 +/svn/!svn/ver/208/trunk/Source/Services/Groupssettings/Generated/GTLGroupssettingsGroups.m +END +GTLServiceGroupssettings.m +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/194/trunk/Source/Services/Groupssettings/Generated/GTLServiceGroupssettings.m +END +GTLQueryGroupssettings.h +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/194/trunk/Source/Services/Groupssettings/Generated/GTLQueryGroupssettings.h +END +GTLGroupssettings_Sources.m +K 25 +svn:wc:ra_dav:version-url +V 92 +/svn/!svn/ver/225/trunk/Source/Services/Groupssettings/Generated/GTLGroupssettings_Sources.m +END +GTLQueryGroupssettings.m +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/194/trunk/Source/Services/Groupssettings/Generated/GTLQueryGroupssettings.m +END +GTLGroupssettingsConstants.h +K 25 +svn:wc:ra_dav:version-url +V 93 +/svn/!svn/ver/194/trunk/Source/Services/Groupssettings/Generated/GTLGroupssettingsConstants.h +END +GTLGroupssettings.h +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/!svn/ver/194/trunk/Source/Services/Groupssettings/Generated/GTLGroupssettings.h +END +GTLGroupssettingsGroups.h +K 25 +svn:wc:ra_dav:version-url +V 90 +/svn/!svn/ver/208/trunk/Source/Services/Groupssettings/Generated/GTLGroupssettingsGroups.h +END +GTLServiceGroupssettings.h +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/194/trunk/Source/Services/Groupssettings/Generated/GTLServiceGroupssettings.h +END diff --git a/GTL/Source/Services/Groupssettings/Generated/.svn/entries b/GTL/Source/Services/Groupssettings/Generated/.svn/entries new file mode 100644 index 0000000..987cf57 --- /dev/null +++ b/GTL/Source/Services/Groupssettings/Generated/.svn/entries @@ -0,0 +1,368 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Groupssettings/Generated +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +GTLGroupssettingsConstants.m +file + + + + +2012-12-09T08:42:31.000000Z +c39daa47e5202ba4bc84a0c1c8df225d +2012-07-28T01:02:22.137373Z +194 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1209 + +GTLGroupssettingsGroups.m +file + + + + +2012-12-09T08:42:31.000000Z +ca1507b758a9e4badc62862a51c804ae +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2136 + +GTLServiceGroupssettings.m +file + + + + +2012-12-09T08:42:31.000000Z +d6a3e249d90147c4682303d9f82e4d1c +2012-07-28T01:02:22.137373Z +194 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1970 + +GTLQueryGroupssettings.h +file + + + + +2012-12-09T08:42:31.000000Z +e36e576ced20dac6e0b24028e3dba5f6 +2012-07-28T01:02:22.137373Z +194 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2738 + +GTLGroupssettings_Sources.m +file + + + + +2012-12-09T08:42:31.000000Z +2d74da320672f5634667277c76fe73e1 +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1283 + +GTLQueryGroupssettings.m +file + + + + +2012-12-09T08:42:31.000000Z +0e1d1eb92723171df7b0bd7ac595d51b +2012-07-28T01:02:22.137373Z +194 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2765 + +GTLGroupssettingsConstants.h +file + + + + +2012-12-09T08:42:31.000000Z +1e70358075e40f5bac088f7d52fbda76 +2012-07-28T01:02:22.137373Z +194 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1366 + +GTLGroupssettings.h +file + + + + +2012-12-09T08:42:31.000000Z +850580472e506fe5e492790d93b8358b +2012-07-28T01:02:22.137373Z +194 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1164 + +GTLGroupssettingsGroups.h +file + + + + +2012-12-09T08:42:31.000000Z +977f5c8d9a8e7842ab7ff5f1b11e0d31 +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4592 + +GTLServiceGroupssettings.h +file + + + + +2012-12-09T08:42:31.000000Z +6ab01ad5ec917fe8ef95fd91b42862db +2012-07-28T01:02:22.137373Z +194 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2181 + diff --git a/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLGroupssettings.h.svn-base b/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLGroupssettings.h.svn-base new file mode 100644 index 0000000..03ead80 --- /dev/null +++ b/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLGroupssettings.h.svn-base @@ -0,0 +1,34 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLGroupssettings.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Groups Settings API (groupssettings/v1) +// Description: +// Lets you manage permission levels and related settings of a group. +// Documentation: +// https://developers.google.com/google-apps/groups-settings/get_started + +#import "GTLGroupssettingsConstants.h" + +#import "GTLGroupssettingsGroups.h" + +#import "GTLQueryGroupssettings.h" +#import "GTLServiceGroupssettings.h" diff --git a/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLGroupssettingsConstants.h.svn-base b/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLGroupssettingsConstants.h.svn-base new file mode 100644 index 0000000..83cec40 --- /dev/null +++ b/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLGroupssettingsConstants.h.svn-base @@ -0,0 +1,39 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLGroupssettingsConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Groups Settings API (groupssettings/v1) +// Description: +// Lets you manage permission levels and related settings of a group. +// Documentation: +// https://developers.google.com/google-apps/groups-settings/get_started + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// View and manage the settings of a Google Apps Group +GTL_EXTERN NSString * const kGTLAuthScopeGroupssettingsAppsGroupsSettings; // "https://www.googleapis.com/auth/apps.groups.settings" diff --git a/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLGroupssettingsConstants.m.svn-base b/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLGroupssettingsConstants.m.svn-base new file mode 100644 index 0000000..b2cb63b --- /dev/null +++ b/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLGroupssettingsConstants.m.svn-base @@ -0,0 +1,32 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLGroupssettingsConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Groups Settings API (groupssettings/v1) +// Description: +// Lets you manage permission levels and related settings of a group. +// Documentation: +// https://developers.google.com/google-apps/groups-settings/get_started + +#import "GTLGroupssettingsConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeGroupssettingsAppsGroupsSettings = @"https://www.googleapis.com/auth/apps.groups.settings"; diff --git a/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLGroupssettingsGroups.h.svn-base b/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLGroupssettingsGroups.h.svn-base new file mode 100644 index 0000000..c7e31bc --- /dev/null +++ b/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLGroupssettingsGroups.h.svn-base @@ -0,0 +1,136 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLGroupssettingsGroups.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Groups Settings API (groupssettings/v1) +// Description: +// Lets you manage permission levels and related settings of a group. +// Documentation: +// https://developers.google.com/google-apps/groups-settings/get_started +// Classes: +// GTLGroupssettingsGroups (0 custom class methods, 26 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLGroupssettingsGroups +// + +// JSON template for Group resource + +@interface GTLGroupssettingsGroups : GTLObject + +// Are external members allowed to join the group. +@property (copy) NSString *allowExternalMembers; + +// Is google allowed to contact admins. +@property (copy) NSString *allowGoogleCommunication; + +// If posting from web is allowed. +@property (copy) NSString *allowWebPosting; + +// If the group is archive only +@property (copy) NSString *archiveOnly; + +// Default email to which reply to any message should go. +@property (copy) NSString *customReplyTo; + +// Default message deny notification message +@property (copy) NSString *defaultMessageDenyNotificationText; + +// Description of the group +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Email id of the group +@property (copy) NSString *email; + +// If this groups should be included in global address list or not. +@property (copy) NSString *includeInGlobalAddressList; + +// If the contents of the group are archived. +@property (copy) NSString *isArchived; + +// The type of the resource. +@property (copy) NSString *kind; + +// Maximum message size allowed. +@property (retain) NSNumber *maxMessageBytes; // intValue + +// Can members post using the group email address. +@property (copy) NSString *membersCanPostAsTheGroup; + +// Default message display font. Possible values are: DEFAULT_FONT +// FIXED_WIDTH_FONT +@property (copy) NSString *messageDisplayFont; + +// Moderation level for messages. Possible values are: MODERATE_ALL_MESSAGES +// MODERATE_NON_MEMBERS MODERATE_NEW_MEMBERS MODERATE_NONE +@property (copy) NSString *messageModerationLevel; + +// Name of the Group +@property (copy) NSString *name; + +// Primary language for the group. +@property (copy) NSString *primaryLanguage; + +// Whome should the default reply to a message go to. Possible values are: +// REPLY_TO_CUSTOM REPLY_TO_SENDER REPLY_TO_LIST REPLY_TO_OWNER REPLY_TO_IGNORE +// REPLY_TO_MANAGERS +@property (copy) NSString *replyTo; + +// Should the member be notified if his message is denied by owner. +@property (copy) NSString *sendMessageDenyNotification; + +// Is the group listed in groups directory +@property (copy) NSString *showInGroupDirectory; + +// Moderation level for messages detected as spam. Possible values are: ALLOW +// MODERATE SILENTLY_MODERATE REJECT +@property (copy) NSString *spamModerationLevel; + +// Permissions to invite members. Possbile values are: ALL_MEMBERS_CAN_INVITE +// ALL_MANAGERS_CAN_INVITE +@property (copy) NSString *whoCanInvite; + +// Permissions to join the group. Possible values are: ANYONE_CAN_JOIN +// ALL_IN_DOMAIN_CAN_JOIN INVITED_CAN_JOIN CAN_REQUEST_TO_JOIN +@property (copy) NSString *whoCanJoin; + +// Permissions to post messages to the group. Possible values are: NONE_CAN_POST +// ALL_MANAGERS_CAN_POST ALL_MEMBERS_CAN_POST ALL_IN_DOMAIN_CAN_POST +// ANYONE_CAN_POST +@property (copy) NSString *whoCanPostMessage; + +// Permissions to view group. Possbile values are: ANYONE_CAN_VIEW +// ALL_IN_DOMAIN_CAN_VIEW ALL_MEMBERS_CAN_VIEW ALL_MANAGERS_CAN_VIEW +@property (copy) NSString *whoCanViewGroup; + +// Permissions to view membership. Possbile values are: ALL_IN_DOMAIN_CAN_VIEW +// ALL_MEMBERS_CAN_VIEW ALL_MANAGERS_CAN_VIEW +@property (copy) NSString *whoCanViewMembership; + +@end diff --git a/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLGroupssettingsGroups.m.svn-base b/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLGroupssettingsGroups.m.svn-base new file mode 100644 index 0000000..eb48922 --- /dev/null +++ b/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLGroupssettingsGroups.m.svn-base @@ -0,0 +1,59 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLGroupssettingsGroups.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Groups Settings API (groupssettings/v1) +// Description: +// Lets you manage permission levels and related settings of a group. +// Documentation: +// https://developers.google.com/google-apps/groups-settings/get_started +// Classes: +// GTLGroupssettingsGroups (0 custom class methods, 26 custom properties) + +#import "GTLGroupssettingsGroups.h" + +// ---------------------------------------------------------------------------- +// +// GTLGroupssettingsGroups +// + +@implementation GTLGroupssettingsGroups +@dynamic allowExternalMembers, allowGoogleCommunication, allowWebPosting, + archiveOnly, customReplyTo, defaultMessageDenyNotificationText, + descriptionProperty, email, includeInGlobalAddressList, isArchived, + kind, maxMessageBytes, membersCanPostAsTheGroup, messageDisplayFont, + messageModerationLevel, name, primaryLanguage, replyTo, + sendMessageDenyNotification, showInGroupDirectory, spamModerationLevel, + whoCanInvite, whoCanJoin, whoCanPostMessage, whoCanViewGroup, + whoCanViewMembership; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"groupsSettings#groups"]; +} + +@end diff --git a/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLGroupssettings_Sources.m.svn-base b/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLGroupssettings_Sources.m.svn-base new file mode 100644 index 0000000..3ce17ee --- /dev/null +++ b/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLGroupssettings_Sources.m.svn-base @@ -0,0 +1,37 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLGroupssettings_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Groups Settings API (groupssettings/v1) +// Description: +// Lets you manage permission levels and related settings of a group. +// Documentation: +// https://developers.google.com/google-apps/groups-settings/get_started + +#import "GTLGroupssettingsConstants.m" + +#import "GTLGroupssettingsGroups.m" + +#import "GTLQueryGroupssettings.m" +#import "GTLServiceGroupssettings.m" diff --git a/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLQueryGroupssettings.h.svn-base b/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLQueryGroupssettings.h.svn-base new file mode 100644 index 0000000..9a2c811 --- /dev/null +++ b/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLQueryGroupssettings.h.svn-base @@ -0,0 +1,86 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryGroupssettings.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Groups Settings API (groupssettings/v1) +// Description: +// Lets you manage permission levels and related settings of a group. +// Documentation: +// https://developers.google.com/google-apps/groups-settings/get_started +// Classes: +// GTLQueryGroupssettings (3 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLGroupssettingsGroups; + +@interface GTLQueryGroupssettings : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *groupUniqueId; + +#pragma mark - +#pragma mark "groups" methods +// These create a GTLQueryGroupssettings object. + +// Method: groupsSettings.groups.get +// Gets one resource by id. +// Required: +// groupUniqueId: The resource ID +// Authorization scope(s): +// kGTLAuthScopeGroupssettingsAppsGroupsSettings +// Fetches a GTLGroupssettingsGroups. ++ (id)queryForGroupsGetWithGroupUniqueId:(NSString *)groupUniqueId; + +// Method: groupsSettings.groups.patch +// Updates an existing resource. This method supports patch semantics. +// Required: +// groupUniqueId: The resource ID +// Authorization scope(s): +// kGTLAuthScopeGroupssettingsAppsGroupsSettings +// Fetches a GTLGroupssettingsGroups. ++ (id)queryForGroupsPatchWithObject:(GTLGroupssettingsGroups *)object + groupUniqueId:(NSString *)groupUniqueId; + +// Method: groupsSettings.groups.update +// Updates an existing resource. +// Required: +// groupUniqueId: The resource ID +// Authorization scope(s): +// kGTLAuthScopeGroupssettingsAppsGroupsSettings +// Fetches a GTLGroupssettingsGroups. ++ (id)queryForGroupsUpdateWithObject:(GTLGroupssettingsGroups *)object + groupUniqueId:(NSString *)groupUniqueId; + +@end diff --git a/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLQueryGroupssettings.m.svn-base b/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLQueryGroupssettings.m.svn-base new file mode 100644 index 0000000..d5ea952 --- /dev/null +++ b/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLQueryGroupssettings.m.svn-base @@ -0,0 +1,79 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryGroupssettings.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Groups Settings API (groupssettings/v1) +// Description: +// Lets you manage permission levels and related settings of a group. +// Documentation: +// https://developers.google.com/google-apps/groups-settings/get_started +// Classes: +// GTLQueryGroupssettings (3 custom class methods, 2 custom properties) + +#import "GTLQueryGroupssettings.h" + +#import "GTLGroupssettingsGroups.h" + +@implementation GTLQueryGroupssettings + +@dynamic fields, groupUniqueId; + +#pragma mark - +#pragma mark "groups" methods +// These create a GTLQueryGroupssettings object. + ++ (id)queryForGroupsGetWithGroupUniqueId:(NSString *)groupUniqueId { + NSString *methodName = @"groupsSettings.groups.get"; + GTLQueryGroupssettings *query = [self queryWithMethodName:methodName]; + query.groupUniqueId = groupUniqueId; + query.expectedObjectClass = [GTLGroupssettingsGroups class]; + return query; +} + ++ (id)queryForGroupsPatchWithObject:(GTLGroupssettingsGroups *)object + groupUniqueId:(NSString *)groupUniqueId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"groupsSettings.groups.patch"; + GTLQueryGroupssettings *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.groupUniqueId = groupUniqueId; + query.expectedObjectClass = [GTLGroupssettingsGroups class]; + return query; +} + ++ (id)queryForGroupsUpdateWithObject:(GTLGroupssettingsGroups *)object + groupUniqueId:(NSString *)groupUniqueId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"groupsSettings.groups.update"; + GTLQueryGroupssettings *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.groupUniqueId = groupUniqueId; + query.expectedObjectClass = [GTLGroupssettingsGroups class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLServiceGroupssettings.h.svn-base b/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLServiceGroupssettings.h.svn-base new file mode 100644 index 0000000..fd6568a --- /dev/null +++ b/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLServiceGroupssettings.h.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceGroupssettings.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Groups Settings API (groupssettings/v1) +// Description: +// Lets you manage permission levels and related settings of a group. +// Documentation: +// https://developers.google.com/google-apps/groups-settings/get_started +// Classes: +// GTLServiceGroupssettings (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceGroupssettings : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryGroupssettings.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLServiceGroupssettings.m.svn-base b/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLServiceGroupssettings.m.svn-base new file mode 100644 index 0000000..424a123 --- /dev/null +++ b/GTL/Source/Services/Groupssettings/Generated/.svn/text-base/GTLServiceGroupssettings.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceGroupssettings.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Groups Settings API (groupssettings/v1) +// Description: +// Lets you manage permission levels and related settings of a group. +// Documentation: +// https://developers.google.com/google-apps/groups-settings/get_started +// Classes: +// GTLServiceGroupssettings (0 custom class methods, 0 custom properties) + +#import "GTLGroupssettings.h" + +@implementation GTLServiceGroupssettings + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryGroupssettings class], + [GTLGroupssettingsGroups class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v1"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Groupssettings/Generated/GTLGroupssettings.h b/GTL/Source/Services/Groupssettings/Generated/GTLGroupssettings.h new file mode 100644 index 0000000..03ead80 --- /dev/null +++ b/GTL/Source/Services/Groupssettings/Generated/GTLGroupssettings.h @@ -0,0 +1,34 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLGroupssettings.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Groups Settings API (groupssettings/v1) +// Description: +// Lets you manage permission levels and related settings of a group. +// Documentation: +// https://developers.google.com/google-apps/groups-settings/get_started + +#import "GTLGroupssettingsConstants.h" + +#import "GTLGroupssettingsGroups.h" + +#import "GTLQueryGroupssettings.h" +#import "GTLServiceGroupssettings.h" diff --git a/GTL/Source/Services/Groupssettings/Generated/GTLGroupssettingsConstants.h b/GTL/Source/Services/Groupssettings/Generated/GTLGroupssettingsConstants.h new file mode 100644 index 0000000..83cec40 --- /dev/null +++ b/GTL/Source/Services/Groupssettings/Generated/GTLGroupssettingsConstants.h @@ -0,0 +1,39 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLGroupssettingsConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Groups Settings API (groupssettings/v1) +// Description: +// Lets you manage permission levels and related settings of a group. +// Documentation: +// https://developers.google.com/google-apps/groups-settings/get_started + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// View and manage the settings of a Google Apps Group +GTL_EXTERN NSString * const kGTLAuthScopeGroupssettingsAppsGroupsSettings; // "https://www.googleapis.com/auth/apps.groups.settings" diff --git a/GTL/Source/Services/Groupssettings/Generated/GTLGroupssettingsConstants.m b/GTL/Source/Services/Groupssettings/Generated/GTLGroupssettingsConstants.m new file mode 100644 index 0000000..b2cb63b --- /dev/null +++ b/GTL/Source/Services/Groupssettings/Generated/GTLGroupssettingsConstants.m @@ -0,0 +1,32 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLGroupssettingsConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Groups Settings API (groupssettings/v1) +// Description: +// Lets you manage permission levels and related settings of a group. +// Documentation: +// https://developers.google.com/google-apps/groups-settings/get_started + +#import "GTLGroupssettingsConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeGroupssettingsAppsGroupsSettings = @"https://www.googleapis.com/auth/apps.groups.settings"; diff --git a/GTL/Source/Services/Groupssettings/Generated/GTLGroupssettingsGroups.h b/GTL/Source/Services/Groupssettings/Generated/GTLGroupssettingsGroups.h new file mode 100644 index 0000000..c7e31bc --- /dev/null +++ b/GTL/Source/Services/Groupssettings/Generated/GTLGroupssettingsGroups.h @@ -0,0 +1,136 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLGroupssettingsGroups.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Groups Settings API (groupssettings/v1) +// Description: +// Lets you manage permission levels and related settings of a group. +// Documentation: +// https://developers.google.com/google-apps/groups-settings/get_started +// Classes: +// GTLGroupssettingsGroups (0 custom class methods, 26 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLGroupssettingsGroups +// + +// JSON template for Group resource + +@interface GTLGroupssettingsGroups : GTLObject + +// Are external members allowed to join the group. +@property (copy) NSString *allowExternalMembers; + +// Is google allowed to contact admins. +@property (copy) NSString *allowGoogleCommunication; + +// If posting from web is allowed. +@property (copy) NSString *allowWebPosting; + +// If the group is archive only +@property (copy) NSString *archiveOnly; + +// Default email to which reply to any message should go. +@property (copy) NSString *customReplyTo; + +// Default message deny notification message +@property (copy) NSString *defaultMessageDenyNotificationText; + +// Description of the group +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Email id of the group +@property (copy) NSString *email; + +// If this groups should be included in global address list or not. +@property (copy) NSString *includeInGlobalAddressList; + +// If the contents of the group are archived. +@property (copy) NSString *isArchived; + +// The type of the resource. +@property (copy) NSString *kind; + +// Maximum message size allowed. +@property (retain) NSNumber *maxMessageBytes; // intValue + +// Can members post using the group email address. +@property (copy) NSString *membersCanPostAsTheGroup; + +// Default message display font. Possible values are: DEFAULT_FONT +// FIXED_WIDTH_FONT +@property (copy) NSString *messageDisplayFont; + +// Moderation level for messages. Possible values are: MODERATE_ALL_MESSAGES +// MODERATE_NON_MEMBERS MODERATE_NEW_MEMBERS MODERATE_NONE +@property (copy) NSString *messageModerationLevel; + +// Name of the Group +@property (copy) NSString *name; + +// Primary language for the group. +@property (copy) NSString *primaryLanguage; + +// Whome should the default reply to a message go to. Possible values are: +// REPLY_TO_CUSTOM REPLY_TO_SENDER REPLY_TO_LIST REPLY_TO_OWNER REPLY_TO_IGNORE +// REPLY_TO_MANAGERS +@property (copy) NSString *replyTo; + +// Should the member be notified if his message is denied by owner. +@property (copy) NSString *sendMessageDenyNotification; + +// Is the group listed in groups directory +@property (copy) NSString *showInGroupDirectory; + +// Moderation level for messages detected as spam. Possible values are: ALLOW +// MODERATE SILENTLY_MODERATE REJECT +@property (copy) NSString *spamModerationLevel; + +// Permissions to invite members. Possbile values are: ALL_MEMBERS_CAN_INVITE +// ALL_MANAGERS_CAN_INVITE +@property (copy) NSString *whoCanInvite; + +// Permissions to join the group. Possible values are: ANYONE_CAN_JOIN +// ALL_IN_DOMAIN_CAN_JOIN INVITED_CAN_JOIN CAN_REQUEST_TO_JOIN +@property (copy) NSString *whoCanJoin; + +// Permissions to post messages to the group. Possible values are: NONE_CAN_POST +// ALL_MANAGERS_CAN_POST ALL_MEMBERS_CAN_POST ALL_IN_DOMAIN_CAN_POST +// ANYONE_CAN_POST +@property (copy) NSString *whoCanPostMessage; + +// Permissions to view group. Possbile values are: ANYONE_CAN_VIEW +// ALL_IN_DOMAIN_CAN_VIEW ALL_MEMBERS_CAN_VIEW ALL_MANAGERS_CAN_VIEW +@property (copy) NSString *whoCanViewGroup; + +// Permissions to view membership. Possbile values are: ALL_IN_DOMAIN_CAN_VIEW +// ALL_MEMBERS_CAN_VIEW ALL_MANAGERS_CAN_VIEW +@property (copy) NSString *whoCanViewMembership; + +@end diff --git a/GTL/Source/Services/Groupssettings/Generated/GTLGroupssettingsGroups.m b/GTL/Source/Services/Groupssettings/Generated/GTLGroupssettingsGroups.m new file mode 100644 index 0000000..eb48922 --- /dev/null +++ b/GTL/Source/Services/Groupssettings/Generated/GTLGroupssettingsGroups.m @@ -0,0 +1,59 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLGroupssettingsGroups.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Groups Settings API (groupssettings/v1) +// Description: +// Lets you manage permission levels and related settings of a group. +// Documentation: +// https://developers.google.com/google-apps/groups-settings/get_started +// Classes: +// GTLGroupssettingsGroups (0 custom class methods, 26 custom properties) + +#import "GTLGroupssettingsGroups.h" + +// ---------------------------------------------------------------------------- +// +// GTLGroupssettingsGroups +// + +@implementation GTLGroupssettingsGroups +@dynamic allowExternalMembers, allowGoogleCommunication, allowWebPosting, + archiveOnly, customReplyTo, defaultMessageDenyNotificationText, + descriptionProperty, email, includeInGlobalAddressList, isArchived, + kind, maxMessageBytes, membersCanPostAsTheGroup, messageDisplayFont, + messageModerationLevel, name, primaryLanguage, replyTo, + sendMessageDenyNotification, showInGroupDirectory, spamModerationLevel, + whoCanInvite, whoCanJoin, whoCanPostMessage, whoCanViewGroup, + whoCanViewMembership; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"groupsSettings#groups"]; +} + +@end diff --git a/GTL/Source/Services/Groupssettings/Generated/GTLGroupssettings_Sources.m b/GTL/Source/Services/Groupssettings/Generated/GTLGroupssettings_Sources.m new file mode 100644 index 0000000..3ce17ee --- /dev/null +++ b/GTL/Source/Services/Groupssettings/Generated/GTLGroupssettings_Sources.m @@ -0,0 +1,37 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLGroupssettings_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Groups Settings API (groupssettings/v1) +// Description: +// Lets you manage permission levels and related settings of a group. +// Documentation: +// https://developers.google.com/google-apps/groups-settings/get_started + +#import "GTLGroupssettingsConstants.m" + +#import "GTLGroupssettingsGroups.m" + +#import "GTLQueryGroupssettings.m" +#import "GTLServiceGroupssettings.m" diff --git a/GTL/Source/Services/Groupssettings/Generated/GTLQueryGroupssettings.h b/GTL/Source/Services/Groupssettings/Generated/GTLQueryGroupssettings.h new file mode 100644 index 0000000..9a2c811 --- /dev/null +++ b/GTL/Source/Services/Groupssettings/Generated/GTLQueryGroupssettings.h @@ -0,0 +1,86 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryGroupssettings.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Groups Settings API (groupssettings/v1) +// Description: +// Lets you manage permission levels and related settings of a group. +// Documentation: +// https://developers.google.com/google-apps/groups-settings/get_started +// Classes: +// GTLQueryGroupssettings (3 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLGroupssettingsGroups; + +@interface GTLQueryGroupssettings : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *groupUniqueId; + +#pragma mark - +#pragma mark "groups" methods +// These create a GTLQueryGroupssettings object. + +// Method: groupsSettings.groups.get +// Gets one resource by id. +// Required: +// groupUniqueId: The resource ID +// Authorization scope(s): +// kGTLAuthScopeGroupssettingsAppsGroupsSettings +// Fetches a GTLGroupssettingsGroups. ++ (id)queryForGroupsGetWithGroupUniqueId:(NSString *)groupUniqueId; + +// Method: groupsSettings.groups.patch +// Updates an existing resource. This method supports patch semantics. +// Required: +// groupUniqueId: The resource ID +// Authorization scope(s): +// kGTLAuthScopeGroupssettingsAppsGroupsSettings +// Fetches a GTLGroupssettingsGroups. ++ (id)queryForGroupsPatchWithObject:(GTLGroupssettingsGroups *)object + groupUniqueId:(NSString *)groupUniqueId; + +// Method: groupsSettings.groups.update +// Updates an existing resource. +// Required: +// groupUniqueId: The resource ID +// Authorization scope(s): +// kGTLAuthScopeGroupssettingsAppsGroupsSettings +// Fetches a GTLGroupssettingsGroups. ++ (id)queryForGroupsUpdateWithObject:(GTLGroupssettingsGroups *)object + groupUniqueId:(NSString *)groupUniqueId; + +@end diff --git a/GTL/Source/Services/Groupssettings/Generated/GTLQueryGroupssettings.m b/GTL/Source/Services/Groupssettings/Generated/GTLQueryGroupssettings.m new file mode 100644 index 0000000..d5ea952 --- /dev/null +++ b/GTL/Source/Services/Groupssettings/Generated/GTLQueryGroupssettings.m @@ -0,0 +1,79 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryGroupssettings.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Groups Settings API (groupssettings/v1) +// Description: +// Lets you manage permission levels and related settings of a group. +// Documentation: +// https://developers.google.com/google-apps/groups-settings/get_started +// Classes: +// GTLQueryGroupssettings (3 custom class methods, 2 custom properties) + +#import "GTLQueryGroupssettings.h" + +#import "GTLGroupssettingsGroups.h" + +@implementation GTLQueryGroupssettings + +@dynamic fields, groupUniqueId; + +#pragma mark - +#pragma mark "groups" methods +// These create a GTLQueryGroupssettings object. + ++ (id)queryForGroupsGetWithGroupUniqueId:(NSString *)groupUniqueId { + NSString *methodName = @"groupsSettings.groups.get"; + GTLQueryGroupssettings *query = [self queryWithMethodName:methodName]; + query.groupUniqueId = groupUniqueId; + query.expectedObjectClass = [GTLGroupssettingsGroups class]; + return query; +} + ++ (id)queryForGroupsPatchWithObject:(GTLGroupssettingsGroups *)object + groupUniqueId:(NSString *)groupUniqueId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"groupsSettings.groups.patch"; + GTLQueryGroupssettings *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.groupUniqueId = groupUniqueId; + query.expectedObjectClass = [GTLGroupssettingsGroups class]; + return query; +} + ++ (id)queryForGroupsUpdateWithObject:(GTLGroupssettingsGroups *)object + groupUniqueId:(NSString *)groupUniqueId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"groupsSettings.groups.update"; + GTLQueryGroupssettings *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.groupUniqueId = groupUniqueId; + query.expectedObjectClass = [GTLGroupssettingsGroups class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Groupssettings/Generated/GTLServiceGroupssettings.h b/GTL/Source/Services/Groupssettings/Generated/GTLServiceGroupssettings.h new file mode 100644 index 0000000..fd6568a --- /dev/null +++ b/GTL/Source/Services/Groupssettings/Generated/GTLServiceGroupssettings.h @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceGroupssettings.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Groups Settings API (groupssettings/v1) +// Description: +// Lets you manage permission levels and related settings of a group. +// Documentation: +// https://developers.google.com/google-apps/groups-settings/get_started +// Classes: +// GTLServiceGroupssettings (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceGroupssettings : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryGroupssettings.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Groupssettings/Generated/GTLServiceGroupssettings.m b/GTL/Source/Services/Groupssettings/Generated/GTLServiceGroupssettings.m new file mode 100644 index 0000000..424a123 --- /dev/null +++ b/GTL/Source/Services/Groupssettings/Generated/GTLServiceGroupssettings.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceGroupssettings.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Groups Settings API (groupssettings/v1) +// Description: +// Lets you manage permission levels and related settings of a group. +// Documentation: +// https://developers.google.com/google-apps/groups-settings/get_started +// Classes: +// GTLServiceGroupssettings (0 custom class methods, 0 custom properties) + +#import "GTLGroupssettings.h" + +@implementation GTLServiceGroupssettings + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryGroupssettings class], + [GTLGroupssettingsGroups class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v1"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Latitude/.svn/all-wcprops b/GTL/Source/Services/Latitude/.svn/all-wcprops new file mode 100644 index 0000000..a648123 --- /dev/null +++ b/GTL/Source/Services/Latitude/.svn/all-wcprops @@ -0,0 +1,5 @@ +K 25 +svn:wc:ra_dav:version-url +V 48 +/svn/!svn/ver/225/trunk/Source/Services/Latitude +END diff --git a/GTL/Source/Services/Latitude/.svn/entries b/GTL/Source/Services/Latitude/.svn/entries new file mode 100644 index 0000000..b23661d --- /dev/null +++ b/GTL/Source/Services/Latitude/.svn/entries @@ -0,0 +1,31 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Latitude +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +Generated +dir + diff --git a/GTL/Source/Services/Latitude/Generated/.svn/all-wcprops b/GTL/Source/Services/Latitude/Generated/.svn/all-wcprops new file mode 100644 index 0000000..25fbe05 --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/.svn/all-wcprops @@ -0,0 +1,77 @@ +K 25 +svn:wc:ra_dav:version-url +V 58 +/svn/!svn/ver/225/trunk/Source/Services/Latitude/Generated +END +GTLLatitude_Sources.m +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/225/trunk/Source/Services/Latitude/Generated/GTLLatitude_Sources.m +END +GTLLatitudeLocation.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/189/trunk/Source/Services/Latitude/Generated/GTLLatitudeLocation.h +END +GTLQueryLatitude.m +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/189/trunk/Source/Services/Latitude/Generated/GTLQueryLatitude.m +END +GTLLatitudeConstants.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/189/trunk/Source/Services/Latitude/Generated/GTLLatitudeConstants.h +END +GTLLatitudeLocationFeed.h +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/!svn/ver/189/trunk/Source/Services/Latitude/Generated/GTLLatitudeLocationFeed.h +END +GTLLatitudeLocation.m +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/189/trunk/Source/Services/Latitude/Generated/GTLLatitudeLocation.m +END +GTLLatitude.h +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/189/trunk/Source/Services/Latitude/Generated/GTLLatitude.h +END +GTLServiceLatitude.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/189/trunk/Source/Services/Latitude/Generated/GTLServiceLatitude.h +END +GTLLatitudeConstants.m +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/189/trunk/Source/Services/Latitude/Generated/GTLLatitudeConstants.m +END +GTLLatitudeLocationFeed.m +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/!svn/ver/189/trunk/Source/Services/Latitude/Generated/GTLLatitudeLocationFeed.m +END +GTLServiceLatitude.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/189/trunk/Source/Services/Latitude/Generated/GTLServiceLatitude.m +END +GTLQueryLatitude.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/189/trunk/Source/Services/Latitude/Generated/GTLQueryLatitude.h +END diff --git a/GTL/Source/Services/Latitude/Generated/.svn/entries b/GTL/Source/Services/Latitude/Generated/.svn/entries new file mode 100644 index 0000000..1969d44 --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/.svn/entries @@ -0,0 +1,436 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Latitude/Generated +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +GTLLatitude_Sources.m +file + + + + +2012-12-09T08:42:33.000000Z +6b626e44c6a98105ba05378fbe22c583 +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1284 + +GTLLatitudeLocation.h +file + + + + +2012-12-09T08:42:33.000000Z +8bce4b45955f63f9955466f29dc6191c +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2734 + +GTLQueryLatitude.m +file + + + + +2012-12-09T08:42:33.000000Z +97c496736255f25546bd44f792f8bf96 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3786 + +GTLLatitudeConstants.h +file + + + + +2012-12-09T08:42:33.000000Z +c96fb4164ef2d2b66d8132ab593ad0b2 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1986 + +GTLLatitudeLocationFeed.h +file + + + + +2012-12-09T08:42:33.000000Z +c624c66896a5287c52d80c10796ce4df +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1644 + +GTLLatitudeLocation.m +file + + + + +2012-12-09T08:42:33.000000Z +3fbe8aa01625a132613ff4e0ad593e31 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1481 + +GTLLatitude.h +file + + + + +2012-12-09T08:42:33.000000Z +93ec909ca6b50dbf3dc78da24cfd4901 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1165 + +GTLServiceLatitude.h +file + + + + +2012-12-09T08:42:33.000000Z +2a8ff83d3653886c106cbcefa67ab1c5 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2150 + +GTLLatitudeConstants.m +file + + + + +2012-12-09T08:42:33.000000Z +976cddc89d42838ca129d3b5e836f547 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1628 + +GTLLatitudeLocationFeed.m +file + + + + +2012-12-09T08:42:33.000000Z +b1db7350d451a57f5feb7215285d2bf6 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1635 + +GTLServiceLatitude.m +file + + + + +2012-12-09T08:42:33.000000Z +1c592005433d52b16cae209d47cc30e6 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2116 + +GTLQueryLatitude.h +file + + + + +2012-12-09T08:42:33.000000Z +7718f2fe4f07e5738d81c2c5e7093f06 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +5100 + diff --git a/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLLatitude.h.svn-base b/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLLatitude.h.svn-base new file mode 100644 index 0000000..2ae6bb3 --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLLatitude.h.svn-base @@ -0,0 +1,36 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLatitude.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Latitude API (latitude/v1) +// Description: +// Lets you read and update your current location and work with your location +// history +// Documentation: +// https://developers.google.com/latitude/v1/using + +#import "GTLLatitudeConstants.h" + +#import "GTLLatitudeLocation.h" +#import "GTLLatitudeLocationFeed.h" + +#import "GTLQueryLatitude.h" +#import "GTLServiceLatitude.h" diff --git a/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLLatitudeConstants.h.svn-base b/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLLatitudeConstants.h.svn-base new file mode 100644 index 0000000..0741516 --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLLatitudeConstants.h.svn-base @@ -0,0 +1,50 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLatitudeConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Latitude API (latitude/v1) +// Description: +// Lets you read and update your current location and work with your location +// history +// Documentation: +// https://developers.google.com/latitude/v1/using + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// Manage your best-available location and location history +GTL_EXTERN NSString * const kGTLAuthScopeLatitudeAllBest; // "https://www.googleapis.com/auth/latitude.all.best" +// Manage your city-level location and location history +GTL_EXTERN NSString * const kGTLAuthScopeLatitudeAllCity; // "https://www.googleapis.com/auth/latitude.all.city" +// Manage your best-available location +GTL_EXTERN NSString * const kGTLAuthScopeLatitudeCurrentBest; // "https://www.googleapis.com/auth/latitude.current.best" +// Manage your city-level location +GTL_EXTERN NSString * const kGTLAuthScopeLatitudeCurrentCity; // "https://www.googleapis.com/auth/latitude.current.city" + +// Granularity +GTL_EXTERN NSString * const kGTLLatitudeGranularityBest; // "best" +GTL_EXTERN NSString * const kGTLLatitudeGranularityCity; // "city" diff --git a/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLLatitudeConstants.m.svn-base b/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLLatitudeConstants.m.svn-base new file mode 100644 index 0000000..c2f14a2 --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLLatitudeConstants.m.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLatitudeConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Latitude API (latitude/v1) +// Description: +// Lets you read and update your current location and work with your location +// history +// Documentation: +// https://developers.google.com/latitude/v1/using + +#import "GTLLatitudeConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeLatitudeAllBest = @"https://www.googleapis.com/auth/latitude.all.best"; +NSString * const kGTLAuthScopeLatitudeAllCity = @"https://www.googleapis.com/auth/latitude.all.city"; +NSString * const kGTLAuthScopeLatitudeCurrentBest = @"https://www.googleapis.com/auth/latitude.current.best"; +NSString * const kGTLAuthScopeLatitudeCurrentCity = @"https://www.googleapis.com/auth/latitude.current.city"; + +// Granularity +NSString * const kGTLLatitudeGranularityBest = @"best"; +NSString * const kGTLLatitudeGranularityCity = @"city"; diff --git a/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLLatitudeLocation.h.svn-base b/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLLatitudeLocation.h.svn-base new file mode 100644 index 0000000..78a711a --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLLatitudeLocation.h.svn-base @@ -0,0 +1,84 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLatitudeLocation.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Latitude API (latitude/v1) +// Description: +// Lets you read and update your current location and work with your location +// history +// Documentation: +// https://developers.google.com/latitude/v1/using +// Classes: +// GTLLatitudeLocation (0 custom class methods, 10 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLLatitudeLocation +// + +// A Location resource identifies a user's position at a particular time. It may +// include metadata about the user's position, such as a venue if the location +// was recorded at the time of a check-in. + +@interface GTLLatitudeLocation : GTLObject + +// Accuracy of the latitude and longitude coordinates, in non-negative meters. +// Optional. +@property (retain) id accuracy; + +// Unique ID of the Buzz message that corresponds to the check-in associated +// with this location. Available only for check-in locations. Optional. +@property (retain) id activityId; + +// Altitude of the location, in meters. Optional. +@property (retain) id altitude; + +// Accuracy of the altitude value, in meters. Optional. +@property (retain) id altitudeAccuracy; + +// Direction of travel of the user when this location was recorded. In degrees, +// clockwise relative to true north. Optional. +@property (retain) id heading; + +// Kind of this item. +@property (copy) NSString *kind; + +// Latitude of the location, in decimal degrees. +@property (retain) id latitude; + +// Longitude of the location, in decimal degrees. +@property (retain) id longitude; + +// Ground speed of the user at the time this location was recorded, in meters +// per second. Non-negative. Optional. +@property (retain) id speed; + +// Timestamp of the Location Resource, in milliseconds since the epoch (UTC). +// This is also the Location Resource's unique id. +@property (retain) id timestampMs; + +@end diff --git a/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLLatitudeLocation.m.svn-base b/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLLatitudeLocation.m.svn-base new file mode 100644 index 0000000..15de86c --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLLatitudeLocation.m.svn-base @@ -0,0 +1,47 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLatitudeLocation.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Latitude API (latitude/v1) +// Description: +// Lets you read and update your current location and work with your location +// history +// Documentation: +// https://developers.google.com/latitude/v1/using +// Classes: +// GTLLatitudeLocation (0 custom class methods, 10 custom properties) + +#import "GTLLatitudeLocation.h" + +// ---------------------------------------------------------------------------- +// +// GTLLatitudeLocation +// + +@implementation GTLLatitudeLocation +@dynamic accuracy, activityId, altitude, altitudeAccuracy, heading, kind, + latitude, longitude, speed, timestampMs; + ++ (void)load { + [self registerObjectClassForKind:@"latitude#location"]; +} + +@end diff --git a/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLLatitudeLocationFeed.h.svn-base b/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLLatitudeLocationFeed.h.svn-base new file mode 100644 index 0000000..789c1a2 --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLLatitudeLocationFeed.h.svn-base @@ -0,0 +1,51 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLatitudeLocationFeed.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Latitude API (latitude/v1) +// Description: +// Lets you read and update your current location and work with your location +// history +// Documentation: +// https://developers.google.com/latitude/v1/using +// Classes: +// GTLLatitudeLocationFeed (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLLatitudeLocation; + +// ---------------------------------------------------------------------------- +// +// GTLLatitudeLocationFeed +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLLatitudeLocationFeed : GTLCollectionObject +@property (retain) NSArray *items; // of GTLLatitudeLocation +@property (copy) NSString *kind; +@end diff --git a/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLLatitudeLocationFeed.m.svn-base b/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLLatitudeLocationFeed.m.svn-base new file mode 100644 index 0000000..21c8c9b --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLLatitudeLocationFeed.m.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLatitudeLocationFeed.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Latitude API (latitude/v1) +// Description: +// Lets you read and update your current location and work with your location +// history +// Documentation: +// https://developers.google.com/latitude/v1/using +// Classes: +// GTLLatitudeLocationFeed (0 custom class methods, 2 custom properties) + +#import "GTLLatitudeLocationFeed.h" + +#import "GTLLatitudeLocation.h" + +// ---------------------------------------------------------------------------- +// +// GTLLatitudeLocationFeed +// + +@implementation GTLLatitudeLocationFeed +@dynamic items, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLLatitudeLocation class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"latitude#locationFeed"]; +} + +@end diff --git a/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLLatitude_Sources.m.svn-base b/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLLatitude_Sources.m.svn-base new file mode 100644 index 0000000..01b4ad5 --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLLatitude_Sources.m.svn-base @@ -0,0 +1,39 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLatitude_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Latitude API (latitude/v1) +// Description: +// Lets you read and update your current location and work with your location +// history +// Documentation: +// https://developers.google.com/latitude/v1/using + +#import "GTLLatitudeConstants.m" + +#import "GTLLatitudeLocation.m" +#import "GTLLatitudeLocationFeed.m" + +#import "GTLQueryLatitude.m" +#import "GTLServiceLatitude.m" diff --git a/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLQueryLatitude.h.svn-base b/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLQueryLatitude.h.svn-base new file mode 100644 index 0000000..86e71ab --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLQueryLatitude.h.svn-base @@ -0,0 +1,148 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryLatitude.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Latitude API (latitude/v1) +// Description: +// Lets you read and update your current location and work with your location +// history +// Documentation: +// https://developers.google.com/latitude/v1/using +// Classes: +// GTLQueryLatitude (7 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLLatitudeLocation; + +@interface GTLQueryLatitude : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *granularity; +@property (copy) NSString *locationId; +@property (copy) NSString *maxResults; +@property (copy) NSString *maxTime; +@property (copy) NSString *minTime; + +#pragma mark - +#pragma mark "currentLocation" methods +// These create a GTLQueryLatitude object. + +// Method: latitude.currentLocation.delete +// Deletes the authenticated user's current location. +// Authorization scope(s): +// kGTLAuthScopeLatitudeAllBest +// kGTLAuthScopeLatitudeAllCity +// kGTLAuthScopeLatitudeCurrentBest +// kGTLAuthScopeLatitudeCurrentCity ++ (id)queryForCurrentLocationDelete; + +// Method: latitude.currentLocation.get +// Returns the authenticated user's current location. +// Optional: +// granularity: Granularity of the requested location. (Default +// kGTLLatitudeGranularityCity) +// kGTLLatitudeGranularityBest: Request best available granularity. +// kGTLLatitudeGranularityCity: Request city-level granularty. +// Authorization scope(s): +// kGTLAuthScopeLatitudeAllBest +// kGTLAuthScopeLatitudeAllCity +// kGTLAuthScopeLatitudeCurrentBest +// kGTLAuthScopeLatitudeCurrentCity +// Fetches a GTLLatitudeLocation. ++ (id)queryForCurrentLocationGet; + +// Method: latitude.currentLocation.insert +// Updates or creates the user's current location. +// Authorization scope(s): +// kGTLAuthScopeLatitudeAllBest +// kGTLAuthScopeLatitudeAllCity +// kGTLAuthScopeLatitudeCurrentBest +// kGTLAuthScopeLatitudeCurrentCity +// Fetches a GTLLatitudeLocation. ++ (id)queryForCurrentLocationInsertWithObject:(GTLLatitudeLocation *)object; + +#pragma mark - +#pragma mark "location" methods +// These create a GTLQueryLatitude object. + +// Method: latitude.location.delete +// Deletes a location from the user's location history. +// Required: +// locationId: Timestamp of the location to delete (ms since epoch). +// Authorization scope(s): +// kGTLAuthScopeLatitudeAllBest +// kGTLAuthScopeLatitudeAllCity ++ (id)queryForLocationDeleteWithLocationId:(NSString *)locationId; + +// Method: latitude.location.get +// Reads a location from the user's location history. +// Required: +// locationId: Timestamp of the location to read (ms since epoch). +// Optional: +// granularity: Granularity of the location to return. (Default +// kGTLLatitudeGranularityCity) +// kGTLLatitudeGranularityBest: Request best available granularity. +// kGTLLatitudeGranularityCity: Request city-level granularty. +// Authorization scope(s): +// kGTLAuthScopeLatitudeAllBest +// kGTLAuthScopeLatitudeAllCity +// Fetches a GTLLatitudeLocation. ++ (id)queryForLocationGetWithLocationId:(NSString *)locationId; + +// Method: latitude.location.insert +// Inserts or updates a location in the user's location history. +// Authorization scope(s): +// kGTLAuthScopeLatitudeAllBest +// kGTLAuthScopeLatitudeAllCity +// Fetches a GTLLatitudeLocation. ++ (id)queryForLocationInsertWithObject:(GTLLatitudeLocation *)object; + +// Method: latitude.location.list +// Lists the user's location history. +// Optional: +// granularity: Granularity of the requested locations. (Default +// kGTLLatitudeGranularityCity) +// kGTLLatitudeGranularityBest: Request best available granularity. +// kGTLLatitudeGranularityCity: Request city-level granularty. +// maxResults: Maximum number of locations to return. +// maxTime: Maximum timestamp of locations to return (ms since epoch). +// minTime: Minimum timestamp of locations to return (ms since epoch). +// Authorization scope(s): +// kGTLAuthScopeLatitudeAllBest +// kGTLAuthScopeLatitudeAllCity +// Fetches a GTLLatitudeLocationFeed. ++ (id)queryForLocationList; + +@end diff --git a/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLQueryLatitude.m.svn-base b/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLQueryLatitude.m.svn-base new file mode 100644 index 0000000..7807793 --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLQueryLatitude.m.svn-base @@ -0,0 +1,118 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryLatitude.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Latitude API (latitude/v1) +// Description: +// Lets you read and update your current location and work with your location +// history +// Documentation: +// https://developers.google.com/latitude/v1/using +// Classes: +// GTLQueryLatitude (7 custom class methods, 6 custom properties) + +#import "GTLQueryLatitude.h" + +#import "GTLLatitudeLocation.h" +#import "GTLLatitudeLocationFeed.h" + +@implementation GTLQueryLatitude + +@dynamic fields, granularity, locationId, maxResults, maxTime, minTime; + ++ (NSDictionary *)parameterNameMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"max-results", @"maxResults", + @"max-time", @"maxTime", + @"min-time", @"minTime", + nil]; + return map; +} + +#pragma mark - +#pragma mark "currentLocation" methods +// These create a GTLQueryLatitude object. + ++ (id)queryForCurrentLocationDelete { + NSString *methodName = @"latitude.currentLocation.delete"; + GTLQueryLatitude *query = [self queryWithMethodName:methodName]; + return query; +} + ++ (id)queryForCurrentLocationGet { + NSString *methodName = @"latitude.currentLocation.get"; + GTLQueryLatitude *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLLatitudeLocation class]; + return query; +} + ++ (id)queryForCurrentLocationInsertWithObject:(GTLLatitudeLocation *)object { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"latitude.currentLocation.insert"; + GTLQueryLatitude *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.expectedObjectClass = [GTLLatitudeLocation class]; + return query; +} + +#pragma mark - +#pragma mark "location" methods +// These create a GTLQueryLatitude object. + ++ (id)queryForLocationDeleteWithLocationId:(NSString *)locationId { + NSString *methodName = @"latitude.location.delete"; + GTLQueryLatitude *query = [self queryWithMethodName:methodName]; + query.locationId = locationId; + return query; +} + ++ (id)queryForLocationGetWithLocationId:(NSString *)locationId { + NSString *methodName = @"latitude.location.get"; + GTLQueryLatitude *query = [self queryWithMethodName:methodName]; + query.locationId = locationId; + query.expectedObjectClass = [GTLLatitudeLocation class]; + return query; +} + ++ (id)queryForLocationInsertWithObject:(GTLLatitudeLocation *)object { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"latitude.location.insert"; + GTLQueryLatitude *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.expectedObjectClass = [GTLLatitudeLocation class]; + return query; +} + ++ (id)queryForLocationList { + NSString *methodName = @"latitude.location.list"; + GTLQueryLatitude *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLLatitudeLocationFeed class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLServiceLatitude.h.svn-base b/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLServiceLatitude.h.svn-base new file mode 100644 index 0000000..fe0fe92 --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLServiceLatitude.h.svn-base @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceLatitude.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Latitude API (latitude/v1) +// Description: +// Lets you read and update your current location and work with your location +// history +// Documentation: +// https://developers.google.com/latitude/v1/using +// Classes: +// GTLServiceLatitude (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceLatitude : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryLatitude.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLServiceLatitude.m.svn-base b/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLServiceLatitude.m.svn-base new file mode 100644 index 0000000..c07ef70 --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/.svn/text-base/GTLServiceLatitude.m.svn-base @@ -0,0 +1,67 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceLatitude.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Latitude API (latitude/v1) +// Description: +// Lets you read and update your current location and work with your location +// history +// Documentation: +// https://developers.google.com/latitude/v1/using +// Classes: +// GTLServiceLatitude (0 custom class methods, 0 custom properties) + +#import "GTLLatitude.h" + +@implementation GTLServiceLatitude + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryLatitude class], + [GTLLatitudeLocation class], + [GTLLatitudeLocationFeed class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v1"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + + // If REST queries are made, this service uses the 'data' wrapper on + // results. + self.isRESTDataWrapperRequired = YES; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Latitude/Generated/GTLLatitude.h b/GTL/Source/Services/Latitude/Generated/GTLLatitude.h new file mode 100644 index 0000000..2ae6bb3 --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/GTLLatitude.h @@ -0,0 +1,36 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLatitude.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Latitude API (latitude/v1) +// Description: +// Lets you read and update your current location and work with your location +// history +// Documentation: +// https://developers.google.com/latitude/v1/using + +#import "GTLLatitudeConstants.h" + +#import "GTLLatitudeLocation.h" +#import "GTLLatitudeLocationFeed.h" + +#import "GTLQueryLatitude.h" +#import "GTLServiceLatitude.h" diff --git a/GTL/Source/Services/Latitude/Generated/GTLLatitudeConstants.h b/GTL/Source/Services/Latitude/Generated/GTLLatitudeConstants.h new file mode 100644 index 0000000..0741516 --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/GTLLatitudeConstants.h @@ -0,0 +1,50 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLatitudeConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Latitude API (latitude/v1) +// Description: +// Lets you read and update your current location and work with your location +// history +// Documentation: +// https://developers.google.com/latitude/v1/using + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// Manage your best-available location and location history +GTL_EXTERN NSString * const kGTLAuthScopeLatitudeAllBest; // "https://www.googleapis.com/auth/latitude.all.best" +// Manage your city-level location and location history +GTL_EXTERN NSString * const kGTLAuthScopeLatitudeAllCity; // "https://www.googleapis.com/auth/latitude.all.city" +// Manage your best-available location +GTL_EXTERN NSString * const kGTLAuthScopeLatitudeCurrentBest; // "https://www.googleapis.com/auth/latitude.current.best" +// Manage your city-level location +GTL_EXTERN NSString * const kGTLAuthScopeLatitudeCurrentCity; // "https://www.googleapis.com/auth/latitude.current.city" + +// Granularity +GTL_EXTERN NSString * const kGTLLatitudeGranularityBest; // "best" +GTL_EXTERN NSString * const kGTLLatitudeGranularityCity; // "city" diff --git a/GTL/Source/Services/Latitude/Generated/GTLLatitudeConstants.m b/GTL/Source/Services/Latitude/Generated/GTLLatitudeConstants.m new file mode 100644 index 0000000..c2f14a2 --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/GTLLatitudeConstants.m @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLatitudeConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Latitude API (latitude/v1) +// Description: +// Lets you read and update your current location and work with your location +// history +// Documentation: +// https://developers.google.com/latitude/v1/using + +#import "GTLLatitudeConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeLatitudeAllBest = @"https://www.googleapis.com/auth/latitude.all.best"; +NSString * const kGTLAuthScopeLatitudeAllCity = @"https://www.googleapis.com/auth/latitude.all.city"; +NSString * const kGTLAuthScopeLatitudeCurrentBest = @"https://www.googleapis.com/auth/latitude.current.best"; +NSString * const kGTLAuthScopeLatitudeCurrentCity = @"https://www.googleapis.com/auth/latitude.current.city"; + +// Granularity +NSString * const kGTLLatitudeGranularityBest = @"best"; +NSString * const kGTLLatitudeGranularityCity = @"city"; diff --git a/GTL/Source/Services/Latitude/Generated/GTLLatitudeLocation.h b/GTL/Source/Services/Latitude/Generated/GTLLatitudeLocation.h new file mode 100644 index 0000000..78a711a --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/GTLLatitudeLocation.h @@ -0,0 +1,84 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLatitudeLocation.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Latitude API (latitude/v1) +// Description: +// Lets you read and update your current location and work with your location +// history +// Documentation: +// https://developers.google.com/latitude/v1/using +// Classes: +// GTLLatitudeLocation (0 custom class methods, 10 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLLatitudeLocation +// + +// A Location resource identifies a user's position at a particular time. It may +// include metadata about the user's position, such as a venue if the location +// was recorded at the time of a check-in. + +@interface GTLLatitudeLocation : GTLObject + +// Accuracy of the latitude and longitude coordinates, in non-negative meters. +// Optional. +@property (retain) id accuracy; + +// Unique ID of the Buzz message that corresponds to the check-in associated +// with this location. Available only for check-in locations. Optional. +@property (retain) id activityId; + +// Altitude of the location, in meters. Optional. +@property (retain) id altitude; + +// Accuracy of the altitude value, in meters. Optional. +@property (retain) id altitudeAccuracy; + +// Direction of travel of the user when this location was recorded. In degrees, +// clockwise relative to true north. Optional. +@property (retain) id heading; + +// Kind of this item. +@property (copy) NSString *kind; + +// Latitude of the location, in decimal degrees. +@property (retain) id latitude; + +// Longitude of the location, in decimal degrees. +@property (retain) id longitude; + +// Ground speed of the user at the time this location was recorded, in meters +// per second. Non-negative. Optional. +@property (retain) id speed; + +// Timestamp of the Location Resource, in milliseconds since the epoch (UTC). +// This is also the Location Resource's unique id. +@property (retain) id timestampMs; + +@end diff --git a/GTL/Source/Services/Latitude/Generated/GTLLatitudeLocation.m b/GTL/Source/Services/Latitude/Generated/GTLLatitudeLocation.m new file mode 100644 index 0000000..15de86c --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/GTLLatitudeLocation.m @@ -0,0 +1,47 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLatitudeLocation.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Latitude API (latitude/v1) +// Description: +// Lets you read and update your current location and work with your location +// history +// Documentation: +// https://developers.google.com/latitude/v1/using +// Classes: +// GTLLatitudeLocation (0 custom class methods, 10 custom properties) + +#import "GTLLatitudeLocation.h" + +// ---------------------------------------------------------------------------- +// +// GTLLatitudeLocation +// + +@implementation GTLLatitudeLocation +@dynamic accuracy, activityId, altitude, altitudeAccuracy, heading, kind, + latitude, longitude, speed, timestampMs; + ++ (void)load { + [self registerObjectClassForKind:@"latitude#location"]; +} + +@end diff --git a/GTL/Source/Services/Latitude/Generated/GTLLatitudeLocationFeed.h b/GTL/Source/Services/Latitude/Generated/GTLLatitudeLocationFeed.h new file mode 100644 index 0000000..789c1a2 --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/GTLLatitudeLocationFeed.h @@ -0,0 +1,51 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLatitudeLocationFeed.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Latitude API (latitude/v1) +// Description: +// Lets you read and update your current location and work with your location +// history +// Documentation: +// https://developers.google.com/latitude/v1/using +// Classes: +// GTLLatitudeLocationFeed (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLLatitudeLocation; + +// ---------------------------------------------------------------------------- +// +// GTLLatitudeLocationFeed +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLLatitudeLocationFeed : GTLCollectionObject +@property (retain) NSArray *items; // of GTLLatitudeLocation +@property (copy) NSString *kind; +@end diff --git a/GTL/Source/Services/Latitude/Generated/GTLLatitudeLocationFeed.m b/GTL/Source/Services/Latitude/Generated/GTLLatitudeLocationFeed.m new file mode 100644 index 0000000..21c8c9b --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/GTLLatitudeLocationFeed.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLatitudeLocationFeed.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Latitude API (latitude/v1) +// Description: +// Lets you read and update your current location and work with your location +// history +// Documentation: +// https://developers.google.com/latitude/v1/using +// Classes: +// GTLLatitudeLocationFeed (0 custom class methods, 2 custom properties) + +#import "GTLLatitudeLocationFeed.h" + +#import "GTLLatitudeLocation.h" + +// ---------------------------------------------------------------------------- +// +// GTLLatitudeLocationFeed +// + +@implementation GTLLatitudeLocationFeed +@dynamic items, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLLatitudeLocation class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"latitude#locationFeed"]; +} + +@end diff --git a/GTL/Source/Services/Latitude/Generated/GTLLatitude_Sources.m b/GTL/Source/Services/Latitude/Generated/GTLLatitude_Sources.m new file mode 100644 index 0000000..01b4ad5 --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/GTLLatitude_Sources.m @@ -0,0 +1,39 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLatitude_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Latitude API (latitude/v1) +// Description: +// Lets you read and update your current location and work with your location +// history +// Documentation: +// https://developers.google.com/latitude/v1/using + +#import "GTLLatitudeConstants.m" + +#import "GTLLatitudeLocation.m" +#import "GTLLatitudeLocationFeed.m" + +#import "GTLQueryLatitude.m" +#import "GTLServiceLatitude.m" diff --git a/GTL/Source/Services/Latitude/Generated/GTLQueryLatitude.h b/GTL/Source/Services/Latitude/Generated/GTLQueryLatitude.h new file mode 100644 index 0000000..86e71ab --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/GTLQueryLatitude.h @@ -0,0 +1,148 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryLatitude.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Latitude API (latitude/v1) +// Description: +// Lets you read and update your current location and work with your location +// history +// Documentation: +// https://developers.google.com/latitude/v1/using +// Classes: +// GTLQueryLatitude (7 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLLatitudeLocation; + +@interface GTLQueryLatitude : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *granularity; +@property (copy) NSString *locationId; +@property (copy) NSString *maxResults; +@property (copy) NSString *maxTime; +@property (copy) NSString *minTime; + +#pragma mark - +#pragma mark "currentLocation" methods +// These create a GTLQueryLatitude object. + +// Method: latitude.currentLocation.delete +// Deletes the authenticated user's current location. +// Authorization scope(s): +// kGTLAuthScopeLatitudeAllBest +// kGTLAuthScopeLatitudeAllCity +// kGTLAuthScopeLatitudeCurrentBest +// kGTLAuthScopeLatitudeCurrentCity ++ (id)queryForCurrentLocationDelete; + +// Method: latitude.currentLocation.get +// Returns the authenticated user's current location. +// Optional: +// granularity: Granularity of the requested location. (Default +// kGTLLatitudeGranularityCity) +// kGTLLatitudeGranularityBest: Request best available granularity. +// kGTLLatitudeGranularityCity: Request city-level granularty. +// Authorization scope(s): +// kGTLAuthScopeLatitudeAllBest +// kGTLAuthScopeLatitudeAllCity +// kGTLAuthScopeLatitudeCurrentBest +// kGTLAuthScopeLatitudeCurrentCity +// Fetches a GTLLatitudeLocation. ++ (id)queryForCurrentLocationGet; + +// Method: latitude.currentLocation.insert +// Updates or creates the user's current location. +// Authorization scope(s): +// kGTLAuthScopeLatitudeAllBest +// kGTLAuthScopeLatitudeAllCity +// kGTLAuthScopeLatitudeCurrentBest +// kGTLAuthScopeLatitudeCurrentCity +// Fetches a GTLLatitudeLocation. ++ (id)queryForCurrentLocationInsertWithObject:(GTLLatitudeLocation *)object; + +#pragma mark - +#pragma mark "location" methods +// These create a GTLQueryLatitude object. + +// Method: latitude.location.delete +// Deletes a location from the user's location history. +// Required: +// locationId: Timestamp of the location to delete (ms since epoch). +// Authorization scope(s): +// kGTLAuthScopeLatitudeAllBest +// kGTLAuthScopeLatitudeAllCity ++ (id)queryForLocationDeleteWithLocationId:(NSString *)locationId; + +// Method: latitude.location.get +// Reads a location from the user's location history. +// Required: +// locationId: Timestamp of the location to read (ms since epoch). +// Optional: +// granularity: Granularity of the location to return. (Default +// kGTLLatitudeGranularityCity) +// kGTLLatitudeGranularityBest: Request best available granularity. +// kGTLLatitudeGranularityCity: Request city-level granularty. +// Authorization scope(s): +// kGTLAuthScopeLatitudeAllBest +// kGTLAuthScopeLatitudeAllCity +// Fetches a GTLLatitudeLocation. ++ (id)queryForLocationGetWithLocationId:(NSString *)locationId; + +// Method: latitude.location.insert +// Inserts or updates a location in the user's location history. +// Authorization scope(s): +// kGTLAuthScopeLatitudeAllBest +// kGTLAuthScopeLatitudeAllCity +// Fetches a GTLLatitudeLocation. ++ (id)queryForLocationInsertWithObject:(GTLLatitudeLocation *)object; + +// Method: latitude.location.list +// Lists the user's location history. +// Optional: +// granularity: Granularity of the requested locations. (Default +// kGTLLatitudeGranularityCity) +// kGTLLatitudeGranularityBest: Request best available granularity. +// kGTLLatitudeGranularityCity: Request city-level granularty. +// maxResults: Maximum number of locations to return. +// maxTime: Maximum timestamp of locations to return (ms since epoch). +// minTime: Minimum timestamp of locations to return (ms since epoch). +// Authorization scope(s): +// kGTLAuthScopeLatitudeAllBest +// kGTLAuthScopeLatitudeAllCity +// Fetches a GTLLatitudeLocationFeed. ++ (id)queryForLocationList; + +@end diff --git a/GTL/Source/Services/Latitude/Generated/GTLQueryLatitude.m b/GTL/Source/Services/Latitude/Generated/GTLQueryLatitude.m new file mode 100644 index 0000000..7807793 --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/GTLQueryLatitude.m @@ -0,0 +1,118 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryLatitude.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Latitude API (latitude/v1) +// Description: +// Lets you read and update your current location and work with your location +// history +// Documentation: +// https://developers.google.com/latitude/v1/using +// Classes: +// GTLQueryLatitude (7 custom class methods, 6 custom properties) + +#import "GTLQueryLatitude.h" + +#import "GTLLatitudeLocation.h" +#import "GTLLatitudeLocationFeed.h" + +@implementation GTLQueryLatitude + +@dynamic fields, granularity, locationId, maxResults, maxTime, minTime; + ++ (NSDictionary *)parameterNameMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"max-results", @"maxResults", + @"max-time", @"maxTime", + @"min-time", @"minTime", + nil]; + return map; +} + +#pragma mark - +#pragma mark "currentLocation" methods +// These create a GTLQueryLatitude object. + ++ (id)queryForCurrentLocationDelete { + NSString *methodName = @"latitude.currentLocation.delete"; + GTLQueryLatitude *query = [self queryWithMethodName:methodName]; + return query; +} + ++ (id)queryForCurrentLocationGet { + NSString *methodName = @"latitude.currentLocation.get"; + GTLQueryLatitude *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLLatitudeLocation class]; + return query; +} + ++ (id)queryForCurrentLocationInsertWithObject:(GTLLatitudeLocation *)object { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"latitude.currentLocation.insert"; + GTLQueryLatitude *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.expectedObjectClass = [GTLLatitudeLocation class]; + return query; +} + +#pragma mark - +#pragma mark "location" methods +// These create a GTLQueryLatitude object. + ++ (id)queryForLocationDeleteWithLocationId:(NSString *)locationId { + NSString *methodName = @"latitude.location.delete"; + GTLQueryLatitude *query = [self queryWithMethodName:methodName]; + query.locationId = locationId; + return query; +} + ++ (id)queryForLocationGetWithLocationId:(NSString *)locationId { + NSString *methodName = @"latitude.location.get"; + GTLQueryLatitude *query = [self queryWithMethodName:methodName]; + query.locationId = locationId; + query.expectedObjectClass = [GTLLatitudeLocation class]; + return query; +} + ++ (id)queryForLocationInsertWithObject:(GTLLatitudeLocation *)object { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"latitude.location.insert"; + GTLQueryLatitude *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.expectedObjectClass = [GTLLatitudeLocation class]; + return query; +} + ++ (id)queryForLocationList { + NSString *methodName = @"latitude.location.list"; + GTLQueryLatitude *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLLatitudeLocationFeed class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Latitude/Generated/GTLServiceLatitude.h b/GTL/Source/Services/Latitude/Generated/GTLServiceLatitude.h new file mode 100644 index 0000000..fe0fe92 --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/GTLServiceLatitude.h @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceLatitude.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Latitude API (latitude/v1) +// Description: +// Lets you read and update your current location and work with your location +// history +// Documentation: +// https://developers.google.com/latitude/v1/using +// Classes: +// GTLServiceLatitude (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceLatitude : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryLatitude.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Latitude/Generated/GTLServiceLatitude.m b/GTL/Source/Services/Latitude/Generated/GTLServiceLatitude.m new file mode 100644 index 0000000..c07ef70 --- /dev/null +++ b/GTL/Source/Services/Latitude/Generated/GTLServiceLatitude.m @@ -0,0 +1,67 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceLatitude.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google Latitude API (latitude/v1) +// Description: +// Lets you read and update your current location and work with your location +// history +// Documentation: +// https://developers.google.com/latitude/v1/using +// Classes: +// GTLServiceLatitude (0 custom class methods, 0 custom properties) + +#import "GTLLatitude.h" + +@implementation GTLServiceLatitude + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryLatitude class], + [GTLLatitudeLocation class], + [GTLLatitudeLocationFeed class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v1"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + + // If REST queries are made, this service uses the 'data' wrapper on + // results. + self.isRESTDataWrapperRequired = YES; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Licensing/.svn/all-wcprops b/GTL/Source/Services/Licensing/.svn/all-wcprops new file mode 100644 index 0000000..72c3e94 --- /dev/null +++ b/GTL/Source/Services/Licensing/.svn/all-wcprops @@ -0,0 +1,5 @@ +K 25 +svn:wc:ra_dav:version-url +V 49 +/svn/!svn/ver/225/trunk/Source/Services/Licensing +END diff --git a/GTL/Source/Services/Licensing/.svn/entries b/GTL/Source/Services/Licensing/.svn/entries new file mode 100644 index 0000000..a02df2f --- /dev/null +++ b/GTL/Source/Services/Licensing/.svn/entries @@ -0,0 +1,31 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Licensing +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +Generated +dir + diff --git a/GTL/Source/Services/Licensing/Generated/.svn/all-wcprops b/GTL/Source/Services/Licensing/Generated/.svn/all-wcprops new file mode 100644 index 0000000..c8e18a2 --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/.svn/all-wcprops @@ -0,0 +1,77 @@ +K 25 +svn:wc:ra_dav:version-url +V 59 +/svn/!svn/ver/225/trunk/Source/Services/Licensing/Generated +END +GTLLicensingLicenseAssignmentList.h +K 25 +svn:wc:ra_dav:version-url +V 95 +/svn/!svn/ver/204/trunk/Source/Services/Licensing/Generated/GTLLicensingLicenseAssignmentList.h +END +GTLLicensing_Sources.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/225/trunk/Source/Services/Licensing/Generated/GTLLicensing_Sources.m +END +GTLQueryLicensing.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/204/trunk/Source/Services/Licensing/Generated/GTLQueryLicensing.m +END +GTLLicensingLicenseAssignment.h +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/204/trunk/Source/Services/Licensing/Generated/GTLLicensingLicenseAssignment.h +END +GTLLicensingLicenseAssignmentList.m +K 25 +svn:wc:ra_dav:version-url +V 95 +/svn/!svn/ver/204/trunk/Source/Services/Licensing/Generated/GTLLicensingLicenseAssignmentList.m +END +GTLLicensing.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/204/trunk/Source/Services/Licensing/Generated/GTLLicensing.h +END +GTLLicensingLicenseAssignmentInsert.h +K 25 +svn:wc:ra_dav:version-url +V 97 +/svn/!svn/ver/204/trunk/Source/Services/Licensing/Generated/GTLLicensingLicenseAssignmentInsert.h +END +GTLLicensingLicenseAssignment.m +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/204/trunk/Source/Services/Licensing/Generated/GTLLicensingLicenseAssignment.m +END +GTLServiceLicensing.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/204/trunk/Source/Services/Licensing/Generated/GTLServiceLicensing.h +END +GTLServiceLicensing.m +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/204/trunk/Source/Services/Licensing/Generated/GTLServiceLicensing.m +END +GTLLicensingLicenseAssignmentInsert.m +K 25 +svn:wc:ra_dav:version-url +V 97 +/svn/!svn/ver/204/trunk/Source/Services/Licensing/Generated/GTLLicensingLicenseAssignmentInsert.m +END +GTLQueryLicensing.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/204/trunk/Source/Services/Licensing/Generated/GTLQueryLicensing.h +END diff --git a/GTL/Source/Services/Licensing/Generated/.svn/entries b/GTL/Source/Services/Licensing/Generated/.svn/entries new file mode 100644 index 0000000..75667b9 --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/.svn/entries @@ -0,0 +1,436 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Licensing/Generated +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +GTLLicensingLicenseAssignmentList.h +file + + + + +2012-12-09T08:42:33.000000Z +c3d02110b56a372158ffed07c89ee9b9 +2012-08-23T07:04:51.325588Z +204 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2130 + +GTLLicensing_Sources.m +file + + + + +2012-12-09T08:42:33.000000Z +3a875d46202aac2ebaa3f479cf949b77 +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1308 + +GTLQueryLicensing.m +file + + + + +2012-12-09T08:42:33.000000Z +03978721d197c60829742d3918b5b282 +2012-08-23T07:04:51.325588Z +204 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +5653 + +GTLLicensingLicenseAssignment.h +file + + + + +2012-12-09T08:42:33.000000Z +7e3260e73a62b0580f1eda54e9cf2128 +2012-08-23T07:04:51.325588Z +204 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1818 + +GTLLicensingLicenseAssignmentList.m +file + + + + +2012-12-09T08:42:33.000000Z +6ca7562f07b7efa1c5dc0a75c42918f5 +2012-08-23T07:04:51.325588Z +204 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1899 + +GTLLicensing.h +file + + + + +2012-12-09T08:42:33.000000Z +efbc724057118c18d7c2201b5b46d4c3 +2012-08-23T07:04:51.325588Z +204 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1189 + +GTLLicensingLicenseAssignmentInsert.h +file + + + + +2012-12-09T08:42:33.000000Z +04a8e00eaf22ae901711d15d5abb8a89 +2012-08-23T07:04:51.325588Z +204 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1508 + +GTLLicensingLicenseAssignment.m +file + + + + +2012-12-09T08:42:33.000000Z +a3b410c10a9fdfaac8388464ca95f08c +2012-08-23T07:04:51.325588Z +204 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1461 + +GTLServiceLicensing.h +file + + + + +2012-12-09T08:42:33.000000Z +b18232a720c1d3cebdaa6c0a1b0be010 +2012-08-23T07:04:51.325588Z +204 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2141 + +GTLServiceLicensing.m +file + + + + +2012-12-09T08:42:33.000000Z +01c365b8fe6c0d87ca3067ce58b21ba1 +2012-08-23T07:04:51.325588Z +204 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2063 + +GTLLicensingLicenseAssignmentInsert.m +file + + + + +2012-12-09T08:42:33.000000Z +f0eefea00d5b145a56ff0b02f2f326f5 +2012-08-23T07:04:51.325588Z +204 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1363 + +GTLQueryLicensing.h +file + + + + +2012-12-09T08:42:33.000000Z +676e5ff05ee05326f9e617051d8691cd +2012-08-23T07:04:51.325588Z +204 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +5937 + diff --git a/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLLicensing.h.svn-base b/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLLicensing.h.svn-base new file mode 100644 index 0000000..dd05289 --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLLicensing.h.svn-base @@ -0,0 +1,34 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLicensing.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Enterprise License Manager API (licensing/v1) +// Description: +// Licensing API to view and manage license for your domain. +// Documentation: +// https://developers.google.com/google-apps/licensing/ + +#import "GTLLicensingLicenseAssignment.h" +#import "GTLLicensingLicenseAssignmentInsert.h" +#import "GTLLicensingLicenseAssignmentList.h" + +#import "GTLQueryLicensing.h" +#import "GTLServiceLicensing.h" diff --git a/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLLicensingLicenseAssignment.h.svn-base b/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLLicensingLicenseAssignment.h.svn-base new file mode 100644 index 0000000..b1b18dc --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLLicensingLicenseAssignment.h.svn-base @@ -0,0 +1,64 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLicensingLicenseAssignment.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Enterprise License Manager API (licensing/v1) +// Description: +// Licensing API to view and manage license for your domain. +// Documentation: +// https://developers.google.com/google-apps/licensing/ +// Classes: +// GTLLicensingLicenseAssignment (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLLicensingLicenseAssignment +// + +// Template for LiscenseAssignment Resource + +@interface GTLLicensingLicenseAssignment : GTLObject + +// ETag of the resource. +@property (copy) NSString *etags; + +// Identifies the resource as a LicenseAssignment. +@property (copy) NSString *kind; + +// Name of the product. +@property (copy) NSString *productId; + +// Link to this page. +@property (copy) NSString *selfLink; + +// Name of the sku of the product. +@property (copy) NSString *skuId; + +// Email id of the user. +@property (copy) NSString *userId; + +@end diff --git a/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLLicensingLicenseAssignment.m.svn-base b/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLLicensingLicenseAssignment.m.svn-base new file mode 100644 index 0000000..7f4746a --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLLicensingLicenseAssignment.m.svn-base @@ -0,0 +1,45 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLicensingLicenseAssignment.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Enterprise License Manager API (licensing/v1) +// Description: +// Licensing API to view and manage license for your domain. +// Documentation: +// https://developers.google.com/google-apps/licensing/ +// Classes: +// GTLLicensingLicenseAssignment (0 custom class methods, 6 custom properties) + +#import "GTLLicensingLicenseAssignment.h" + +// ---------------------------------------------------------------------------- +// +// GTLLicensingLicenseAssignment +// + +@implementation GTLLicensingLicenseAssignment +@dynamic etags, kind, productId, selfLink, skuId, userId; + ++ (void)load { + [self registerObjectClassForKind:@"licensing#licenseAssignment"]; +} + +@end diff --git a/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLLicensingLicenseAssignmentInsert.h.svn-base b/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLLicensingLicenseAssignmentInsert.h.svn-base new file mode 100644 index 0000000..0d2c3d7 --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLLicensingLicenseAssignmentInsert.h.svn-base @@ -0,0 +1,49 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLicensingLicenseAssignmentInsert.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Enterprise License Manager API (licensing/v1) +// Description: +// Licensing API to view and manage license for your domain. +// Documentation: +// https://developers.google.com/google-apps/licensing/ +// Classes: +// GTLLicensingLicenseAssignmentInsert (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLLicensingLicenseAssignmentInsert +// + +// Template for LicenseAssignment Insert request + +@interface GTLLicensingLicenseAssignmentInsert : GTLObject + +// Email id of the user +@property (copy) NSString *userId; + +@end diff --git a/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLLicensingLicenseAssignmentInsert.m.svn-base b/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLLicensingLicenseAssignmentInsert.m.svn-base new file mode 100644 index 0000000..5321a8f --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLLicensingLicenseAssignmentInsert.m.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLicensingLicenseAssignmentInsert.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Enterprise License Manager API (licensing/v1) +// Description: +// Licensing API to view and manage license for your domain. +// Documentation: +// https://developers.google.com/google-apps/licensing/ +// Classes: +// GTLLicensingLicenseAssignmentInsert (0 custom class methods, 1 custom properties) + +#import "GTLLicensingLicenseAssignmentInsert.h" + +// ---------------------------------------------------------------------------- +// +// GTLLicensingLicenseAssignmentInsert +// + +@implementation GTLLicensingLicenseAssignmentInsert +@dynamic userId; +@end diff --git a/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLLicensingLicenseAssignmentList.h.svn-base b/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLLicensingLicenseAssignmentList.h.svn-base new file mode 100644 index 0000000..e096606 --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLLicensingLicenseAssignmentList.h.svn-base @@ -0,0 +1,64 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLicensingLicenseAssignmentList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Enterprise License Manager API (licensing/v1) +// Description: +// Licensing API to view and manage license for your domain. +// Documentation: +// https://developers.google.com/google-apps/licensing/ +// Classes: +// GTLLicensingLicenseAssignmentList (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLLicensingLicenseAssignment; + +// ---------------------------------------------------------------------------- +// +// GTLLicensingLicenseAssignmentList +// + +// LicesnseAssignment List for a given product/sku for a customer. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLLicensingLicenseAssignmentList : GTLCollectionObject + +// ETag of the resource. +@property (copy) NSString *ETag; + +// The LicenseAssignments in this page of results. +@property (retain) NSArray *items; // of GTLLicensingLicenseAssignment + +// Identifies the resource as a collection of LicenseAssignments. +@property (copy) NSString *kind; + +// The continuation token, used to page through large result sets. Provide this +// value in a subsequent request to return the next page of results. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLLicensingLicenseAssignmentList.m.svn-base b/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLLicensingLicenseAssignmentList.m.svn-base new file mode 100644 index 0000000..2e065b3 --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLLicensingLicenseAssignmentList.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLicensingLicenseAssignmentList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Enterprise License Manager API (licensing/v1) +// Description: +// Licensing API to view and manage license for your domain. +// Documentation: +// https://developers.google.com/google-apps/licensing/ +// Classes: +// GTLLicensingLicenseAssignmentList (0 custom class methods, 4 custom properties) + +#import "GTLLicensingLicenseAssignmentList.h" + +#import "GTLLicensingLicenseAssignment.h" + +// ---------------------------------------------------------------------------- +// +// GTLLicensingLicenseAssignmentList +// + +@implementation GTLLicensingLicenseAssignmentList +@dynamic ETag, items, kind, nextPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLLicensingLicenseAssignment class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"licensing#licenseAssignmentList"]; +} + +@end diff --git a/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLLicensing_Sources.m.svn-base b/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLLicensing_Sources.m.svn-base new file mode 100644 index 0000000..0d655f2 --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLLicensing_Sources.m.svn-base @@ -0,0 +1,37 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLicensing_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Enterprise License Manager API (licensing/v1) +// Description: +// Licensing API to view and manage license for your domain. +// Documentation: +// https://developers.google.com/google-apps/licensing/ + +#import "GTLLicensingLicenseAssignment.m" +#import "GTLLicensingLicenseAssignmentInsert.m" +#import "GTLLicensingLicenseAssignmentList.m" + +#import "GTLQueryLicensing.m" +#import "GTLServiceLicensing.m" diff --git a/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLQueryLicensing.h.svn-base b/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLQueryLicensing.h.svn-base new file mode 100644 index 0000000..61fb46c --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLQueryLicensing.h.svn-base @@ -0,0 +1,150 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryLicensing.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Enterprise License Manager API (licensing/v1) +// Description: +// Licensing API to view and manage license for your domain. +// Documentation: +// https://developers.google.com/google-apps/licensing/ +// Classes: +// GTLQueryLicensing (7 custom class methods, 7 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLLicensingLicenseAssignment; +@class GTLLicensingLicenseAssignmentInsert; + +@interface GTLQueryLicensing : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *customerId; +@property (assign) NSUInteger maxResults; +@property (copy) NSString *pageToken; +@property (copy) NSString *productId; +@property (copy) NSString *skuId; +@property (copy) NSString *userId; + +#pragma mark - +#pragma mark "licenseAssignments" methods +// These create a GTLQueryLicensing object. + +// Method: licensing.licenseAssignments.delete +// Revoke License. +// Required: +// productId: Name for product +// skuId: Name for sku +// userId: email id or unique Id of the user ++ (id)queryForLicenseAssignmentsDeleteWithProductId:(NSString *)productId + skuId:(NSString *)skuId + userId:(NSString *)userId; + +// Method: licensing.licenseAssignments.get +// Get license assignment of a particular product and sku for a user +// Required: +// productId: Name for product +// skuId: Name for sku +// userId: email id or unique Id of the user +// Fetches a GTLLicensingLicenseAssignment. ++ (id)queryForLicenseAssignmentsGetWithProductId:(NSString *)productId + skuId:(NSString *)skuId + userId:(NSString *)userId; + +// Method: licensing.licenseAssignments.insert +// Assign License. +// Required: +// productId: Name for product +// skuId: Name for sku +// Fetches a GTLLicensingLicenseAssignment. ++ (id)queryForLicenseAssignmentsInsertWithObject:(GTLLicensingLicenseAssignmentInsert *)object + productId:(NSString *)productId + skuId:(NSString *)skuId; + +// Method: licensing.licenseAssignments.listForProduct +// List license assignments for given product of the customer. +// Required: +// productId: Name for product +// customerId: CustomerId represents the customer for whom licenseassignments +// are queried +// Optional: +// maxResults: Maximum number of campaigns to return at one time. Must be +// positive. Optional. Default value is 100. (1..1000, default 100) +// pageToken: Token to fetch the next page.Optional. By default server will +// return first page +// Fetches a GTLLicensingLicenseAssignmentList. ++ (id)queryForLicenseAssignmentsListForProductWithProductId:(NSString *)productId + customerId:(NSString *)customerId; + +// Method: licensing.licenseAssignments.listForProductAndSku +// List license assignments for given product and sku of the customer. +// Required: +// productId: Name for product +// skuId: Name for sku +// customerId: CustomerId represents the customer for whom licenseassignments +// are queried +// Optional: +// maxResults: Maximum number of campaigns to return at one time. Must be +// positive. Optional. Default value is 100. (1..1000, default 100) +// pageToken: Token to fetch the next page.Optional. By default server will +// return first page +// Fetches a GTLLicensingLicenseAssignmentList. ++ (id)queryForLicenseAssignmentsListForProductAndSkuWithProductId:(NSString *)productId + skuId:(NSString *)skuId + customerId:(NSString *)customerId; + +// Method: licensing.licenseAssignments.patch +// Assign License. This method supports patch semantics. +// Required: +// productId: Name for product +// skuId: Name for sku for which license would be revoked +// userId: email id or unique Id of the user +// Fetches a GTLLicensingLicenseAssignment. ++ (id)queryForLicenseAssignmentsPatchWithObject:(GTLLicensingLicenseAssignment *)object + productId:(NSString *)productId + skuId:(NSString *)skuId + userId:(NSString *)userId; + +// Method: licensing.licenseAssignments.update +// Assign License. +// Required: +// productId: Name for product +// skuId: Name for sku for which license would be revoked +// userId: email id or unique Id of the user +// Fetches a GTLLicensingLicenseAssignment. ++ (id)queryForLicenseAssignmentsUpdateWithObject:(GTLLicensingLicenseAssignment *)object + productId:(NSString *)productId + skuId:(NSString *)skuId + userId:(NSString *)userId; + +@end diff --git a/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLQueryLicensing.m.svn-base b/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLQueryLicensing.m.svn-base new file mode 100644 index 0000000..72aed56 --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLQueryLicensing.m.svn-base @@ -0,0 +1,142 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryLicensing.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Enterprise License Manager API (licensing/v1) +// Description: +// Licensing API to view and manage license for your domain. +// Documentation: +// https://developers.google.com/google-apps/licensing/ +// Classes: +// GTLQueryLicensing (7 custom class methods, 7 custom properties) + +#import "GTLQueryLicensing.h" + +#import "GTLLicensingLicenseAssignment.h" +#import "GTLLicensingLicenseAssignmentInsert.h" +#import "GTLLicensingLicenseAssignmentList.h" + +@implementation GTLQueryLicensing + +@dynamic customerId, fields, maxResults, pageToken, productId, skuId, userId; + +#pragma mark - +#pragma mark "licenseAssignments" methods +// These create a GTLQueryLicensing object. + ++ (id)queryForLicenseAssignmentsDeleteWithProductId:(NSString *)productId + skuId:(NSString *)skuId + userId:(NSString *)userId { + NSString *methodName = @"licensing.licenseAssignments.delete"; + GTLQueryLicensing *query = [self queryWithMethodName:methodName]; + query.productId = productId; + query.skuId = skuId; + query.userId = userId; + return query; +} + ++ (id)queryForLicenseAssignmentsGetWithProductId:(NSString *)productId + skuId:(NSString *)skuId + userId:(NSString *)userId { + NSString *methodName = @"licensing.licenseAssignments.get"; + GTLQueryLicensing *query = [self queryWithMethodName:methodName]; + query.productId = productId; + query.skuId = skuId; + query.userId = userId; + query.expectedObjectClass = [GTLLicensingLicenseAssignment class]; + return query; +} + ++ (id)queryForLicenseAssignmentsInsertWithObject:(GTLLicensingLicenseAssignmentInsert *)object + productId:(NSString *)productId + skuId:(NSString *)skuId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"licensing.licenseAssignments.insert"; + GTLQueryLicensing *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.productId = productId; + query.skuId = skuId; + query.expectedObjectClass = [GTLLicensingLicenseAssignment class]; + return query; +} + ++ (id)queryForLicenseAssignmentsListForProductWithProductId:(NSString *)productId + customerId:(NSString *)customerId { + NSString *methodName = @"licensing.licenseAssignments.listForProduct"; + GTLQueryLicensing *query = [self queryWithMethodName:methodName]; + query.productId = productId; + query.customerId = customerId; + query.expectedObjectClass = [GTLLicensingLicenseAssignmentList class]; + return query; +} + ++ (id)queryForLicenseAssignmentsListForProductAndSkuWithProductId:(NSString *)productId + skuId:(NSString *)skuId + customerId:(NSString *)customerId { + NSString *methodName = @"licensing.licenseAssignments.listForProductAndSku"; + GTLQueryLicensing *query = [self queryWithMethodName:methodName]; + query.productId = productId; + query.skuId = skuId; + query.customerId = customerId; + query.expectedObjectClass = [GTLLicensingLicenseAssignmentList class]; + return query; +} + ++ (id)queryForLicenseAssignmentsPatchWithObject:(GTLLicensingLicenseAssignment *)object + productId:(NSString *)productId + skuId:(NSString *)skuId + userId:(NSString *)userId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"licensing.licenseAssignments.patch"; + GTLQueryLicensing *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.productId = productId; + query.skuId = skuId; + query.userId = userId; + query.expectedObjectClass = [GTLLicensingLicenseAssignment class]; + return query; +} + ++ (id)queryForLicenseAssignmentsUpdateWithObject:(GTLLicensingLicenseAssignment *)object + productId:(NSString *)productId + skuId:(NSString *)skuId + userId:(NSString *)userId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"licensing.licenseAssignments.update"; + GTLQueryLicensing *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.productId = productId; + query.skuId = skuId; + query.userId = userId; + query.expectedObjectClass = [GTLLicensingLicenseAssignment class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLServiceLicensing.h.svn-base b/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLServiceLicensing.h.svn-base new file mode 100644 index 0000000..2523853 --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLServiceLicensing.h.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceLicensing.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Enterprise License Manager API (licensing/v1) +// Description: +// Licensing API to view and manage license for your domain. +// Documentation: +// https://developers.google.com/google-apps/licensing/ +// Classes: +// GTLServiceLicensing (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceLicensing : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryLicensing.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLServiceLicensing.m.svn-base b/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLServiceLicensing.m.svn-base new file mode 100644 index 0000000..3888e8e --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/.svn/text-base/GTLServiceLicensing.m.svn-base @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceLicensing.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Enterprise License Manager API (licensing/v1) +// Description: +// Licensing API to view and manage license for your domain. +// Documentation: +// https://developers.google.com/google-apps/licensing/ +// Classes: +// GTLServiceLicensing (0 custom class methods, 0 custom properties) + +#import "GTLLicensing.h" + +@implementation GTLServiceLicensing + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryLicensing class], + [GTLLicensingLicenseAssignment class], + [GTLLicensingLicenseAssignmentInsert class], + [GTLLicensingLicenseAssignmentList class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v1"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Licensing/Generated/GTLLicensing.h b/GTL/Source/Services/Licensing/Generated/GTLLicensing.h new file mode 100644 index 0000000..dd05289 --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/GTLLicensing.h @@ -0,0 +1,34 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLicensing.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Enterprise License Manager API (licensing/v1) +// Description: +// Licensing API to view and manage license for your domain. +// Documentation: +// https://developers.google.com/google-apps/licensing/ + +#import "GTLLicensingLicenseAssignment.h" +#import "GTLLicensingLicenseAssignmentInsert.h" +#import "GTLLicensingLicenseAssignmentList.h" + +#import "GTLQueryLicensing.h" +#import "GTLServiceLicensing.h" diff --git a/GTL/Source/Services/Licensing/Generated/GTLLicensingLicenseAssignment.h b/GTL/Source/Services/Licensing/Generated/GTLLicensingLicenseAssignment.h new file mode 100644 index 0000000..b1b18dc --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/GTLLicensingLicenseAssignment.h @@ -0,0 +1,64 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLicensingLicenseAssignment.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Enterprise License Manager API (licensing/v1) +// Description: +// Licensing API to view and manage license for your domain. +// Documentation: +// https://developers.google.com/google-apps/licensing/ +// Classes: +// GTLLicensingLicenseAssignment (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLLicensingLicenseAssignment +// + +// Template for LiscenseAssignment Resource + +@interface GTLLicensingLicenseAssignment : GTLObject + +// ETag of the resource. +@property (copy) NSString *etags; + +// Identifies the resource as a LicenseAssignment. +@property (copy) NSString *kind; + +// Name of the product. +@property (copy) NSString *productId; + +// Link to this page. +@property (copy) NSString *selfLink; + +// Name of the sku of the product. +@property (copy) NSString *skuId; + +// Email id of the user. +@property (copy) NSString *userId; + +@end diff --git a/GTL/Source/Services/Licensing/Generated/GTLLicensingLicenseAssignment.m b/GTL/Source/Services/Licensing/Generated/GTLLicensingLicenseAssignment.m new file mode 100644 index 0000000..7f4746a --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/GTLLicensingLicenseAssignment.m @@ -0,0 +1,45 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLicensingLicenseAssignment.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Enterprise License Manager API (licensing/v1) +// Description: +// Licensing API to view and manage license for your domain. +// Documentation: +// https://developers.google.com/google-apps/licensing/ +// Classes: +// GTLLicensingLicenseAssignment (0 custom class methods, 6 custom properties) + +#import "GTLLicensingLicenseAssignment.h" + +// ---------------------------------------------------------------------------- +// +// GTLLicensingLicenseAssignment +// + +@implementation GTLLicensingLicenseAssignment +@dynamic etags, kind, productId, selfLink, skuId, userId; + ++ (void)load { + [self registerObjectClassForKind:@"licensing#licenseAssignment"]; +} + +@end diff --git a/GTL/Source/Services/Licensing/Generated/GTLLicensingLicenseAssignmentInsert.h b/GTL/Source/Services/Licensing/Generated/GTLLicensingLicenseAssignmentInsert.h new file mode 100644 index 0000000..0d2c3d7 --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/GTLLicensingLicenseAssignmentInsert.h @@ -0,0 +1,49 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLicensingLicenseAssignmentInsert.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Enterprise License Manager API (licensing/v1) +// Description: +// Licensing API to view and manage license for your domain. +// Documentation: +// https://developers.google.com/google-apps/licensing/ +// Classes: +// GTLLicensingLicenseAssignmentInsert (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLLicensingLicenseAssignmentInsert +// + +// Template for LicenseAssignment Insert request + +@interface GTLLicensingLicenseAssignmentInsert : GTLObject + +// Email id of the user +@property (copy) NSString *userId; + +@end diff --git a/GTL/Source/Services/Licensing/Generated/GTLLicensingLicenseAssignmentInsert.m b/GTL/Source/Services/Licensing/Generated/GTLLicensingLicenseAssignmentInsert.m new file mode 100644 index 0000000..5321a8f --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/GTLLicensingLicenseAssignmentInsert.m @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLicensingLicenseAssignmentInsert.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Enterprise License Manager API (licensing/v1) +// Description: +// Licensing API to view and manage license for your domain. +// Documentation: +// https://developers.google.com/google-apps/licensing/ +// Classes: +// GTLLicensingLicenseAssignmentInsert (0 custom class methods, 1 custom properties) + +#import "GTLLicensingLicenseAssignmentInsert.h" + +// ---------------------------------------------------------------------------- +// +// GTLLicensingLicenseAssignmentInsert +// + +@implementation GTLLicensingLicenseAssignmentInsert +@dynamic userId; +@end diff --git a/GTL/Source/Services/Licensing/Generated/GTLLicensingLicenseAssignmentList.h b/GTL/Source/Services/Licensing/Generated/GTLLicensingLicenseAssignmentList.h new file mode 100644 index 0000000..e096606 --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/GTLLicensingLicenseAssignmentList.h @@ -0,0 +1,64 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLicensingLicenseAssignmentList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Enterprise License Manager API (licensing/v1) +// Description: +// Licensing API to view and manage license for your domain. +// Documentation: +// https://developers.google.com/google-apps/licensing/ +// Classes: +// GTLLicensingLicenseAssignmentList (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLLicensingLicenseAssignment; + +// ---------------------------------------------------------------------------- +// +// GTLLicensingLicenseAssignmentList +// + +// LicesnseAssignment List for a given product/sku for a customer. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLLicensingLicenseAssignmentList : GTLCollectionObject + +// ETag of the resource. +@property (copy) NSString *ETag; + +// The LicenseAssignments in this page of results. +@property (retain) NSArray *items; // of GTLLicensingLicenseAssignment + +// Identifies the resource as a collection of LicenseAssignments. +@property (copy) NSString *kind; + +// The continuation token, used to page through large result sets. Provide this +// value in a subsequent request to return the next page of results. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/Licensing/Generated/GTLLicensingLicenseAssignmentList.m b/GTL/Source/Services/Licensing/Generated/GTLLicensingLicenseAssignmentList.m new file mode 100644 index 0000000..2e065b3 --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/GTLLicensingLicenseAssignmentList.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLicensingLicenseAssignmentList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Enterprise License Manager API (licensing/v1) +// Description: +// Licensing API to view and manage license for your domain. +// Documentation: +// https://developers.google.com/google-apps/licensing/ +// Classes: +// GTLLicensingLicenseAssignmentList (0 custom class methods, 4 custom properties) + +#import "GTLLicensingLicenseAssignmentList.h" + +#import "GTLLicensingLicenseAssignment.h" + +// ---------------------------------------------------------------------------- +// +// GTLLicensingLicenseAssignmentList +// + +@implementation GTLLicensingLicenseAssignmentList +@dynamic ETag, items, kind, nextPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLLicensingLicenseAssignment class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"licensing#licenseAssignmentList"]; +} + +@end diff --git a/GTL/Source/Services/Licensing/Generated/GTLLicensing_Sources.m b/GTL/Source/Services/Licensing/Generated/GTLLicensing_Sources.m new file mode 100644 index 0000000..0d655f2 --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/GTLLicensing_Sources.m @@ -0,0 +1,37 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLLicensing_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Enterprise License Manager API (licensing/v1) +// Description: +// Licensing API to view and manage license for your domain. +// Documentation: +// https://developers.google.com/google-apps/licensing/ + +#import "GTLLicensingLicenseAssignment.m" +#import "GTLLicensingLicenseAssignmentInsert.m" +#import "GTLLicensingLicenseAssignmentList.m" + +#import "GTLQueryLicensing.m" +#import "GTLServiceLicensing.m" diff --git a/GTL/Source/Services/Licensing/Generated/GTLQueryLicensing.h b/GTL/Source/Services/Licensing/Generated/GTLQueryLicensing.h new file mode 100644 index 0000000..61fb46c --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/GTLQueryLicensing.h @@ -0,0 +1,150 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryLicensing.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Enterprise License Manager API (licensing/v1) +// Description: +// Licensing API to view and manage license for your domain. +// Documentation: +// https://developers.google.com/google-apps/licensing/ +// Classes: +// GTLQueryLicensing (7 custom class methods, 7 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLLicensingLicenseAssignment; +@class GTLLicensingLicenseAssignmentInsert; + +@interface GTLQueryLicensing : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *customerId; +@property (assign) NSUInteger maxResults; +@property (copy) NSString *pageToken; +@property (copy) NSString *productId; +@property (copy) NSString *skuId; +@property (copy) NSString *userId; + +#pragma mark - +#pragma mark "licenseAssignments" methods +// These create a GTLQueryLicensing object. + +// Method: licensing.licenseAssignments.delete +// Revoke License. +// Required: +// productId: Name for product +// skuId: Name for sku +// userId: email id or unique Id of the user ++ (id)queryForLicenseAssignmentsDeleteWithProductId:(NSString *)productId + skuId:(NSString *)skuId + userId:(NSString *)userId; + +// Method: licensing.licenseAssignments.get +// Get license assignment of a particular product and sku for a user +// Required: +// productId: Name for product +// skuId: Name for sku +// userId: email id or unique Id of the user +// Fetches a GTLLicensingLicenseAssignment. ++ (id)queryForLicenseAssignmentsGetWithProductId:(NSString *)productId + skuId:(NSString *)skuId + userId:(NSString *)userId; + +// Method: licensing.licenseAssignments.insert +// Assign License. +// Required: +// productId: Name for product +// skuId: Name for sku +// Fetches a GTLLicensingLicenseAssignment. ++ (id)queryForLicenseAssignmentsInsertWithObject:(GTLLicensingLicenseAssignmentInsert *)object + productId:(NSString *)productId + skuId:(NSString *)skuId; + +// Method: licensing.licenseAssignments.listForProduct +// List license assignments for given product of the customer. +// Required: +// productId: Name for product +// customerId: CustomerId represents the customer for whom licenseassignments +// are queried +// Optional: +// maxResults: Maximum number of campaigns to return at one time. Must be +// positive. Optional. Default value is 100. (1..1000, default 100) +// pageToken: Token to fetch the next page.Optional. By default server will +// return first page +// Fetches a GTLLicensingLicenseAssignmentList. ++ (id)queryForLicenseAssignmentsListForProductWithProductId:(NSString *)productId + customerId:(NSString *)customerId; + +// Method: licensing.licenseAssignments.listForProductAndSku +// List license assignments for given product and sku of the customer. +// Required: +// productId: Name for product +// skuId: Name for sku +// customerId: CustomerId represents the customer for whom licenseassignments +// are queried +// Optional: +// maxResults: Maximum number of campaigns to return at one time. Must be +// positive. Optional. Default value is 100. (1..1000, default 100) +// pageToken: Token to fetch the next page.Optional. By default server will +// return first page +// Fetches a GTLLicensingLicenseAssignmentList. ++ (id)queryForLicenseAssignmentsListForProductAndSkuWithProductId:(NSString *)productId + skuId:(NSString *)skuId + customerId:(NSString *)customerId; + +// Method: licensing.licenseAssignments.patch +// Assign License. This method supports patch semantics. +// Required: +// productId: Name for product +// skuId: Name for sku for which license would be revoked +// userId: email id or unique Id of the user +// Fetches a GTLLicensingLicenseAssignment. ++ (id)queryForLicenseAssignmentsPatchWithObject:(GTLLicensingLicenseAssignment *)object + productId:(NSString *)productId + skuId:(NSString *)skuId + userId:(NSString *)userId; + +// Method: licensing.licenseAssignments.update +// Assign License. +// Required: +// productId: Name for product +// skuId: Name for sku for which license would be revoked +// userId: email id or unique Id of the user +// Fetches a GTLLicensingLicenseAssignment. ++ (id)queryForLicenseAssignmentsUpdateWithObject:(GTLLicensingLicenseAssignment *)object + productId:(NSString *)productId + skuId:(NSString *)skuId + userId:(NSString *)userId; + +@end diff --git a/GTL/Source/Services/Licensing/Generated/GTLQueryLicensing.m b/GTL/Source/Services/Licensing/Generated/GTLQueryLicensing.m new file mode 100644 index 0000000..72aed56 --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/GTLQueryLicensing.m @@ -0,0 +1,142 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryLicensing.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Enterprise License Manager API (licensing/v1) +// Description: +// Licensing API to view and manage license for your domain. +// Documentation: +// https://developers.google.com/google-apps/licensing/ +// Classes: +// GTLQueryLicensing (7 custom class methods, 7 custom properties) + +#import "GTLQueryLicensing.h" + +#import "GTLLicensingLicenseAssignment.h" +#import "GTLLicensingLicenseAssignmentInsert.h" +#import "GTLLicensingLicenseAssignmentList.h" + +@implementation GTLQueryLicensing + +@dynamic customerId, fields, maxResults, pageToken, productId, skuId, userId; + +#pragma mark - +#pragma mark "licenseAssignments" methods +// These create a GTLQueryLicensing object. + ++ (id)queryForLicenseAssignmentsDeleteWithProductId:(NSString *)productId + skuId:(NSString *)skuId + userId:(NSString *)userId { + NSString *methodName = @"licensing.licenseAssignments.delete"; + GTLQueryLicensing *query = [self queryWithMethodName:methodName]; + query.productId = productId; + query.skuId = skuId; + query.userId = userId; + return query; +} + ++ (id)queryForLicenseAssignmentsGetWithProductId:(NSString *)productId + skuId:(NSString *)skuId + userId:(NSString *)userId { + NSString *methodName = @"licensing.licenseAssignments.get"; + GTLQueryLicensing *query = [self queryWithMethodName:methodName]; + query.productId = productId; + query.skuId = skuId; + query.userId = userId; + query.expectedObjectClass = [GTLLicensingLicenseAssignment class]; + return query; +} + ++ (id)queryForLicenseAssignmentsInsertWithObject:(GTLLicensingLicenseAssignmentInsert *)object + productId:(NSString *)productId + skuId:(NSString *)skuId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"licensing.licenseAssignments.insert"; + GTLQueryLicensing *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.productId = productId; + query.skuId = skuId; + query.expectedObjectClass = [GTLLicensingLicenseAssignment class]; + return query; +} + ++ (id)queryForLicenseAssignmentsListForProductWithProductId:(NSString *)productId + customerId:(NSString *)customerId { + NSString *methodName = @"licensing.licenseAssignments.listForProduct"; + GTLQueryLicensing *query = [self queryWithMethodName:methodName]; + query.productId = productId; + query.customerId = customerId; + query.expectedObjectClass = [GTLLicensingLicenseAssignmentList class]; + return query; +} + ++ (id)queryForLicenseAssignmentsListForProductAndSkuWithProductId:(NSString *)productId + skuId:(NSString *)skuId + customerId:(NSString *)customerId { + NSString *methodName = @"licensing.licenseAssignments.listForProductAndSku"; + GTLQueryLicensing *query = [self queryWithMethodName:methodName]; + query.productId = productId; + query.skuId = skuId; + query.customerId = customerId; + query.expectedObjectClass = [GTLLicensingLicenseAssignmentList class]; + return query; +} + ++ (id)queryForLicenseAssignmentsPatchWithObject:(GTLLicensingLicenseAssignment *)object + productId:(NSString *)productId + skuId:(NSString *)skuId + userId:(NSString *)userId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"licensing.licenseAssignments.patch"; + GTLQueryLicensing *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.productId = productId; + query.skuId = skuId; + query.userId = userId; + query.expectedObjectClass = [GTLLicensingLicenseAssignment class]; + return query; +} + ++ (id)queryForLicenseAssignmentsUpdateWithObject:(GTLLicensingLicenseAssignment *)object + productId:(NSString *)productId + skuId:(NSString *)skuId + userId:(NSString *)userId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"licensing.licenseAssignments.update"; + GTLQueryLicensing *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.productId = productId; + query.skuId = skuId; + query.userId = userId; + query.expectedObjectClass = [GTLLicensingLicenseAssignment class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Licensing/Generated/GTLServiceLicensing.h b/GTL/Source/Services/Licensing/Generated/GTLServiceLicensing.h new file mode 100644 index 0000000..2523853 --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/GTLServiceLicensing.h @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceLicensing.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Enterprise License Manager API (licensing/v1) +// Description: +// Licensing API to view and manage license for your domain. +// Documentation: +// https://developers.google.com/google-apps/licensing/ +// Classes: +// GTLServiceLicensing (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceLicensing : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryLicensing.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Licensing/Generated/GTLServiceLicensing.m b/GTL/Source/Services/Licensing/Generated/GTLServiceLicensing.m new file mode 100644 index 0000000..3888e8e --- /dev/null +++ b/GTL/Source/Services/Licensing/Generated/GTLServiceLicensing.m @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceLicensing.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Enterprise License Manager API (licensing/v1) +// Description: +// Licensing API to view and manage license for your domain. +// Documentation: +// https://developers.google.com/google-apps/licensing/ +// Classes: +// GTLServiceLicensing (0 custom class methods, 0 custom properties) + +#import "GTLLicensing.h" + +@implementation GTLServiceLicensing + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryLicensing class], + [GTLLicensingLicenseAssignment class], + [GTLLicensingLicenseAssignmentInsert class], + [GTLLicensingLicenseAssignmentList class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v1"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Orkut/.svn/all-wcprops b/GTL/Source/Services/Orkut/.svn/all-wcprops new file mode 100644 index 0000000..0cb627e --- /dev/null +++ b/GTL/Source/Services/Orkut/.svn/all-wcprops @@ -0,0 +1,5 @@ +K 25 +svn:wc:ra_dav:version-url +V 45 +/svn/!svn/ver/225/trunk/Source/Services/Orkut +END diff --git a/GTL/Source/Services/Orkut/.svn/entries b/GTL/Source/Services/Orkut/.svn/entries new file mode 100644 index 0000000..912b3b0 --- /dev/null +++ b/GTL/Source/Services/Orkut/.svn/entries @@ -0,0 +1,31 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Orkut +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +Generated +dir + diff --git a/GTL/Source/Services/Orkut/Generated/.svn/all-wcprops b/GTL/Source/Services/Orkut/Generated/.svn/all-wcprops new file mode 100644 index 0000000..891e065 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/all-wcprops @@ -0,0 +1,401 @@ +K 25 +svn:wc:ra_dav:version-url +V 55 +/svn/!svn/ver/225/trunk/Source/Services/Orkut/Generated +END +GTLOrkutActivityList.m +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/82/trunk/Source/Services/Orkut/Generated/GTLOrkutActivityList.m +END +GTLOrkutCommunityPollCommentList.m +K 25 +svn:wc:ra_dav:version-url +V 90 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityPollCommentList.m +END +GTLOrkutLinkResource.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/124/trunk/Source/Services/Orkut/Generated/GTLOrkutLinkResource.h +END +GTLOrkutLinkResource.m +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/82/trunk/Source/Services/Orkut/Generated/GTLOrkutLinkResource.m +END +GTLOrkutCommunitypolloptionResource.h +K 25 +svn:wc:ra_dav:version-url +V 93 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunitypolloptionResource.h +END +GTLOrkutActivityobjectsResource.h +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/138/trunk/Source/Services/Orkut/Generated/GTLOrkutActivityobjectsResource.h +END +GTLOrkut.h +K 25 +svn:wc:ra_dav:version-url +V 66 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkut.h +END +GTLOrkutCommunitypolloptionResource.m +K 25 +svn:wc:ra_dav:version-url +V 93 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunitypolloptionResource.m +END +GTLOrkutActivityobjectsResource.m +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/138/trunk/Source/Services/Orkut/Generated/GTLOrkutActivityobjectsResource.m +END +GTLOrkutCommunity.h +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/145/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunity.h +END +GTLOrkutCommunity.m +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunity.m +END +GTLOrkutCommunityMessage.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityMessage.h +END +GTLOrkutActivitypersonResource.h +K 25 +svn:wc:ra_dav:version-url +V 88 +/svn/!svn/ver/124/trunk/Source/Services/Orkut/Generated/GTLOrkutActivitypersonResource.h +END +GTLOrkutBadgeList.h +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/124/trunk/Source/Services/Orkut/Generated/GTLOrkutBadgeList.h +END +GTLOrkutCommunityMessage.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityMessage.m +END +GTLOrkutCommunityMembers.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityMembers.h +END +GTLOrkutActivitypersonResource.m +K 25 +svn:wc:ra_dav:version-url +V 87 +/svn/!svn/ver/82/trunk/Source/Services/Orkut/Generated/GTLOrkutActivitypersonResource.m +END +GTLServiceOrkut.h +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/82/trunk/Source/Services/Orkut/Generated/GTLServiceOrkut.h +END +GTLOrkutCounters.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/124/trunk/Source/Services/Orkut/Generated/GTLOrkutCounters.h +END +GTLOrkutComment.h +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/!svn/ver/124/trunk/Source/Services/Orkut/Generated/GTLOrkutComment.h +END +GTLOrkutBadgeList.m +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/82/trunk/Source/Services/Orkut/Generated/GTLOrkutBadgeList.m +END +GTLOrkutCommunityMembers.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityMembers.m +END +GTLServiceOrkut.m +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLServiceOrkut.m +END +GTLQueryOrkut.h +K 25 +svn:wc:ra_dav:version-url +V 71 +/svn/!svn/ver/147/trunk/Source/Services/Orkut/Generated/GTLQueryOrkut.h +END +GTLOrkutComment.m +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/82/trunk/Source/Services/Orkut/Generated/GTLOrkutComment.m +END +GTLOrkutCounters.m +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/!svn/ver/82/trunk/Source/Services/Orkut/Generated/GTLOrkutCounters.m +END +GTLOrkutAuthorResource.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/145/trunk/Source/Services/Orkut/Generated/GTLOrkutAuthorResource.h +END +GTLQueryOrkut.m +K 25 +svn:wc:ra_dav:version-url +V 71 +/svn/!svn/ver/138/trunk/Source/Services/Orkut/Generated/GTLQueryOrkut.m +END +GTLOrkutCommunityPoll.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityPoll.h +END +GTLOrkutAuthorResource.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/82/trunk/Source/Services/Orkut/Generated/GTLOrkutAuthorResource.m +END +GTLOrkutCommunityPoll.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityPoll.m +END +GTLOrkutCommunityTopic.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityTopic.h +END +GTLOrkutCommunityTopic.m +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityTopic.m +END +GTLOrkutActivity.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/124/trunk/Source/Services/Orkut/Generated/GTLOrkutActivity.h +END +GTLOrkutCommunityPollComment.h +K 25 +svn:wc:ra_dav:version-url +V 86 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityPollComment.h +END +GTLOrkutAcl.h +K 25 +svn:wc:ra_dav:version-url +V 69 +/svn/!svn/ver/124/trunk/Source/Services/Orkut/Generated/GTLOrkutAcl.h +END +GTLOrkutActivity.m +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/!svn/ver/82/trunk/Source/Services/Orkut/Generated/GTLOrkutActivity.m +END +GTLOrkutCommunityPollComment.m +K 25 +svn:wc:ra_dav:version-url +V 86 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityPollComment.m +END +GTLOrkutAcl.m +K 25 +svn:wc:ra_dav:version-url +V 68 +/svn/!svn/ver/82/trunk/Source/Services/Orkut/Generated/GTLOrkutAcl.m +END +GTLOrkutCommunityPollVote.h +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityPollVote.h +END +GTLOrkutCommunityPollVote.m +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityPollVote.m +END +GTLOrkutCommunityList.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityList.h +END +GTLOrkutCommunityMessageList.h +K 25 +svn:wc:ra_dav:version-url +V 86 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityMessageList.h +END +GTLOrkutCommunityList.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityList.m +END +GTLOrkutCounterResource.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/138/trunk/Source/Services/Orkut/Generated/GTLOrkutCounterResource.h +END +GTLOrkutVisibility.h +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/124/trunk/Source/Services/Orkut/Generated/GTLOrkutVisibility.h +END +GTLOrkutCommunityMessageList.m +K 25 +svn:wc:ra_dav:version-url +V 86 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityMessageList.m +END +GTLOrkutCommunityMembersList.h +K 25 +svn:wc:ra_dav:version-url +V 86 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityMembersList.h +END +GTLOrkutVisibility.m +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/82/trunk/Source/Services/Orkut/Generated/GTLOrkutVisibility.m +END +GTLOrkutCounterResource.m +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/82/trunk/Source/Services/Orkut/Generated/GTLOrkutCounterResource.m +END +GTLOrkutCommentList.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/124/trunk/Source/Services/Orkut/Generated/GTLOrkutCommentList.h +END +GTLOrkutCommunityMembersList.m +K 25 +svn:wc:ra_dav:version-url +V 86 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityMembersList.m +END +GTLOrkutBadge.h +K 25 +svn:wc:ra_dav:version-url +V 71 +/svn/!svn/ver/124/trunk/Source/Services/Orkut/Generated/GTLOrkutBadge.h +END +GTLOrkutCommentList.m +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/82/trunk/Source/Services/Orkut/Generated/GTLOrkutCommentList.m +END +GTLOrkutCommunityMembershipStatus.h +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityMembershipStatus.h +END +GTLOrkutCommunityPollList.h +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityPollList.h +END +GTLOrkutBadge.m +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/82/trunk/Source/Services/Orkut/Generated/GTLOrkutBadge.m +END +GTLOrkutCommunityMembershipStatus.m +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityMembershipStatus.m +END +GTLOrkutConstants.h +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutConstants.h +END +GTLOrkutCommunityPollList.m +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityPollList.m +END +GTLOrkutCommunityTopicList.h +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityTopicList.h +END +GTLOrkutConstants.m +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutConstants.m +END +GTLOrkutCommunityTopicList.m +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityTopicList.m +END +GTLOrkut_Sources.m +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/225/trunk/Source/Services/Orkut/Generated/GTLOrkut_Sources.m +END +GTLOrkutActivityList.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/124/trunk/Source/Services/Orkut/Generated/GTLOrkutActivityList.h +END +GTLOrkutCommunityPollCommentList.h +K 25 +svn:wc:ra_dav:version-url +V 90 +/svn/!svn/ver/135/trunk/Source/Services/Orkut/Generated/GTLOrkutCommunityPollCommentList.h +END diff --git a/GTL/Source/Services/Orkut/Generated/.svn/entries b/GTL/Source/Services/Orkut/Generated/.svn/entries new file mode 100644 index 0000000..a29921f --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/entries @@ -0,0 +1,2272 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Orkut/Generated +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +GTLOrkutActivityList.m +file + + + + +2012-12-09T08:42:32.000000Z +6c0ff9dab352708a05a189743b7d9ca1 +2011-10-19T01:21:41.718771Z +82 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1619 + +GTLOrkutCommunityPollCommentList.m +file + + + + +2012-12-09T08:42:32.000000Z +4ae3f28e2a94930464c80c7e8e344491 +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1770 + +GTLOrkutLinkResource.h +file + + + + +2012-12-09T08:42:32.000000Z +bce27c5a6e02feb0353f286be543c20f +2011-12-12T22:00:16.502331Z +124 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1658 + +GTLOrkutLinkResource.m +file + + + + +2012-12-09T08:42:32.000000Z +6c6dad8eaceac154b2ae8a829b4435b4 +2011-10-19T01:21:41.718771Z +82 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1310 + +GTLOrkutCommunitypolloptionResource.h +file + + + + +2012-12-09T08:42:32.000000Z +92062b01ce628ffa3f01ba6ef245325a +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2319 + +GTLOrkutActivityobjectsResource.h +file + + + + +2012-12-09T08:42:32.000000Z +4fe9665179981398ca3e1e9e1386d7f4 +2012-02-10T20:32:19.422566Z +138 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2457 + +GTLOrkut.h +file + + + + +2012-12-09T08:42:32.000000Z +edc3f7b884050d8167979fe5033127ed +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2115 + +GTLOrkutCommunitypolloptionResource.m +file + + + + +2012-12-09T08:42:32.000000Z +6ab776c9fa599b4c43509c71137ab7b7 +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1916 + +GTLOrkutActivityobjectsResource.m +file + + + + +2012-12-09T08:42:32.000000Z +80163c7dfc0eccec21106785a3293c2f +2012-02-10T20:32:19.422566Z +138 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1902 + +GTLOrkutCommunity.h +file + + + + +2012-12-09T08:42:32.000000Z +6491a19b0179901a0c9a749066221420 +2012-03-14T22:24:58.651006Z +145 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2870 + +GTLOrkutCommunity.m +file + + + + +2012-12-09T08:42:32.000000Z +b9aef22de173ed3bc129481814a1e942 +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2236 + +GTLOrkutCommunityMessage.h +file + + + + +2012-12-09T08:42:32.000000Z +82b606910e3d69a9c80851c0eb21ba7f +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2363 + +GTLOrkutActivitypersonResource.h +file + + + + +2012-12-09T08:42:32.000000Z +2af79d7c29dfc08efa39d2b3324624eb +2011-12-12T22:00:16.502331Z +124 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3127 + +GTLOrkutBadgeList.h +file + + + + +2012-12-09T08:42:32.000000Z +feba91e2663ece3e00a9467f62baab25 +2011-12-12T22:00:16.502331Z +124 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1713 + +GTLOrkutCommunityMessage.m +file + + + + +2012-12-09T08:42:32.000000Z +844b6a4224139023fe2f934276afb81c +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1905 + +GTLOrkutCommunityMembers.h +file + + + + +2012-12-09T08:42:32.000000Z +6fc6d7117d5529dd85c63b3d803741b1 +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1775 + +GTLOrkutActivitypersonResource.m +file + + + + +2012-12-09T08:42:32.000000Z +281021458522917c2ef8fa3deebd4594 +2011-10-19T01:21:41.718771Z +82 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2156 + +GTLServiceOrkut.h +file + + + + +2012-12-09T08:42:32.000000Z +cca129f8ed48e0a5e3076518fcc9f8c5 +2011-10-19T01:21:41.718771Z +82 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2128 + +GTLOrkutCounters.h +file + + + + +2012-12-09T08:42:32.000000Z +9c41d3ef67540340b8568a639a11de78 +2011-12-12T22:00:16.502331Z +124 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1732 + +GTLOrkutComment.h +file + + + + +2012-12-09T08:42:32.000000Z +43914661c72978a47277fd2453049762 +2011-12-12T22:00:16.502331Z +124 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2859 + +GTLOrkutBadgeList.m +file + + + + +2012-12-09T08:42:32.000000Z +0afafdaeb18f2a45d67fc7cc7fe02fa6 +2011-10-19T01:21:41.718771Z +82 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1580 + +GTLOrkutCommunityMembers.m +file + + + + +2012-12-09T08:42:32.000000Z +93dc18ae83fa9131f7d18cebe614baaa +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1519 + +GTLServiceOrkut.m +file + + + + +2012-12-09T08:42:32.000000Z +b20c52a28823e4edd04cf4b581da7990 +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3444 + +GTLQueryOrkut.h +file + + + + +2012-12-09T08:42:32.000000Z +e263dcbd287dd31294f7c25fc6ba40c4 +2012-03-14T22:29:03.081629Z +147 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +21801 + +GTLOrkutComment.m +file + + + + +2012-12-09T08:42:32.000000Z +003db73d233d79f0d05bc27d50b3a396 +2011-10-19T01:21:41.718771Z +82 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2119 + +GTLOrkutCounters.m +file + + + + +2012-12-09T08:42:32.000000Z +17e05b61e15c2469e900f55c65e605e1 +2011-10-19T01:21:41.718771Z +82 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1594 + +GTLOrkutAuthorResource.h +file + + + + +2012-12-09T08:42:32.000000Z +557f5ae0de3d4f939d2282377b819fd1 +2012-03-14T22:24:58.651006Z +145 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2231 + +GTLQueryOrkut.m +file + + + + +2012-12-09T08:42:32.000000Z +d341ea92a5d50cccb4c4cb8ef5918cee +2012-02-10T20:32:19.422566Z +138 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +17213 + +GTLOrkutCommunityPoll.h +file + + + + +2012-12-09T08:42:32.000000Z +cd8cb53120a4656558a9709ab7b9a821 +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4992 + +GTLOrkutAuthorResource.m +file + + + + +2012-12-09T08:42:32.000000Z +69c35359ed8aec57d18d919a1eeafc4e +2011-10-19T01:21:41.718771Z +82 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1778 + +GTLOrkutCommunityPoll.m +file + + + + +2012-12-09T08:42:32.000000Z +79622d1cfb7db82cc51d93eb99421bae +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2584 + +GTLOrkutCommunityTopic.h +file + + + + +2012-12-09T08:42:32.000000Z +85d69053d128667fe65e8ea4c99a39ec +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2547 + +GTLOrkutCommunityTopic.m +file + + + + +2012-12-09T08:42:32.000000Z +630e595683035c132589736f1542e4a0 +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2031 + +GTLOrkutActivity.h +file + + + + +2012-12-09T08:42:32.000000Z +01c101ae2b34f1315a39793519ad41f1 +2011-12-12T22:00:16.502331Z +124 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4636 + +GTLOrkutCommunityPollComment.h +file + + + + +2012-12-09T08:42:32.000000Z +b711f0a3f936676e6a06e9b27a7818de +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1943 + +GTLOrkutAcl.h +file + + + + +2012-12-09T08:42:32.000000Z +9a8cf04733e2f780dfbd3496abc37774 +2011-12-12T22:00:16.502331Z +124 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2566 + +GTLOrkutActivity.m +file + + + + +2012-12-09T08:42:32.000000Z +e92b1b37c38be3efec4a026f2d1f3c77 +2011-10-19T01:21:41.718771Z +82 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2957 + +GTLOrkutCommunityPollComment.m +file + + + + +2012-12-09T08:42:32.000000Z +3141381ff932bfd5c9e67b570c14b2b4 +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1671 + +GTLOrkutAcl.m +file + + + + +2012-12-09T08:42:32.000000Z +90fb71441781157af176aaa748891842 +2011-10-19T01:21:41.718771Z +82 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2199 + +GTLOrkutCommunityPollVote.h +file + + + + +2012-12-09T08:42:32.000000Z +87fd41ca1c73c0845bd9485431ecd8bb +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1702 + +GTLOrkutCommunityPollVote.m +file + + + + +2012-12-09T08:42:32.000000Z +c63f972a14e35a984f90b43de492d176 +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1619 + +GTLOrkutCommunityList.h +file + + + + +2012-12-09T08:42:32.000000Z +592cdac859e1fe095568b19f65c83549 +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1754 + +GTLOrkutCommunityMessageList.h +file + + + + +2012-12-09T08:42:32.000000Z +2f2cacbbaf3d2e9623412df6c8ab7fa6 +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2455 + +GTLOrkutCommunityList.m +file + + + + +2012-12-09T08:42:32.000000Z +b8d1e7eb57ef121ae0ad68051838b0ca +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1612 + +GTLOrkutCounterResource.h +file + + + + +2012-12-09T08:42:32.000000Z +f30e20896fcdf0412d0f585608e36686 +2012-02-10T20:32:19.422566Z +138 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1868 + +GTLOrkutVisibility.h +file + + + + +2012-12-09T08:42:32.000000Z +6c0c1bd75423281f625d9081d298f990 +2011-12-12T22:00:16.502331Z +124 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1739 + +GTLOrkutCommunityMessageList.m +file + + + + +2012-12-09T08:42:32.000000Z +ecb1209385b61a562568b9c681724c09 +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1738 + +GTLOrkutCommunityMembersList.h +file + + + + +2012-12-09T08:42:32.000000Z +71b921f40544360ebb64c0f4432e8f39 +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2411 + +GTLOrkutVisibility.m +file + + + + +2012-12-09T08:42:32.000000Z +5e3bcafd04419d2756c75b54aaa8b287 +2011-10-19T01:21:41.718771Z +82 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1612 + +GTLOrkutCounterResource.m +file + + + + +2012-12-09T08:42:32.000000Z +770f3e956fd9b02e9e5c18ddcce7f2c3 +2011-10-19T01:21:41.718771Z +82 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1354 + +GTLOrkutCommentList.h +file + + + + +2012-12-09T08:42:32.000000Z +eccbf78689b6dceeff56483df0fcffbe +2011-12-12T22:00:16.502331Z +124 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2074 + +GTLOrkutCommunityMembersList.m +file + + + + +2012-12-09T08:42:32.000000Z +7000077964f5b34385855df4868a6788 +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1738 + +GTLOrkutBadge.h +file + + + + +2012-12-09T08:42:32.000000Z +2aabf490c8d4ee09ea60105ca34bbac6 +2011-12-12T22:00:16.502331Z +124 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2259 + +GTLOrkutCommentList.m +file + + + + +2012-12-09T08:42:32.000000Z +b8177602b6d2a2e7da0e03808ee1068c +2011-10-19T01:21:41.718771Z +82 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1630 + +GTLOrkutCommunityMembershipStatus.h +file + + + + +2012-12-09T08:42:32.000000Z +85ae14d35981a5558d55f0348f29875b +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2647 + +GTLOrkutCommunityPollList.h +file + + + + +2012-12-09T08:42:32.000000Z +350e368f73ec79edacbed3c6382d26a6 +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2426 + +GTLOrkutBadge.m +file + + + + +2012-12-09T08:42:32.000000Z +1ab7158301410b4625448e96f36d1a4f +2011-10-19T01:21:41.718771Z +82 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1663 + +GTLOrkutCommunityMembershipStatus.m +file + + + + +2012-12-09T08:42:32.000000Z +b0e6517648de846fd22609c4b906119e +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1603 + +GTLOrkutConstants.h +file + + + + +2012-12-09T08:42:32.000000Z +da4651330ee09863b034ed6325e2dece +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1924 + +GTLOrkutCommunityPollList.m +file + + + + +2012-12-09T08:42:32.000000Z +8d71d54fff893606229762778d9590b7 +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1714 + +GTLOrkutCommunityTopicList.h +file + + + + +2012-12-09T08:42:32.000000Z +5f35354c297f35733ce3bdd6a3d0ca24 +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2425 + +GTLOrkutConstants.m +file + + + + +2012-12-09T08:42:32.000000Z +65bfe5c3b5b60fca482c03f0fc982b8a +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1663 + +GTLOrkutCommunityTopicList.m +file + + + + +2012-12-09T08:42:32.000000Z +92f14c66b5d861a1b5ed38bc380ed24f +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1722 + +GTLOrkut_Sources.m +file + + + + +2012-12-09T08:42:32.000000Z +eb40890affedfbb51637ecee636d52ab +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2234 + +GTLOrkutActivityList.h +file + + + + +2012-12-09T08:42:32.000000Z +0988edbe1eeb25254da9ead9f24ae459 +2011-12-12T22:00:16.502331Z +124 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1913 + +GTLOrkutCommunityPollCommentList.h +file + + + + +2012-12-09T08:42:32.000000Z +7310d9c59fcfe93907ea9d0aab4450c8 +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2523 + diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkut.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkut.h.svn-base new file mode 100644 index 0000000..daff43c --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkut.h.svn-base @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkut.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html + +#import "GTLOrkutConstants.h" + +#import "GTLOrkutAcl.h" +#import "GTLOrkutActivity.h" +#import "GTLOrkutActivityList.h" +#import "GTLOrkutActivityobjectsResource.h" +#import "GTLOrkutActivitypersonResource.h" +#import "GTLOrkutAuthorResource.h" +#import "GTLOrkutBadge.h" +#import "GTLOrkutBadgeList.h" +#import "GTLOrkutComment.h" +#import "GTLOrkutCommentList.h" +#import "GTLOrkutCommunity.h" +#import "GTLOrkutCommunityList.h" +#import "GTLOrkutCommunityMembers.h" +#import "GTLOrkutCommunityMembershipStatus.h" +#import "GTLOrkutCommunityMembersList.h" +#import "GTLOrkutCommunityMessage.h" +#import "GTLOrkutCommunityMessageList.h" +#import "GTLOrkutCommunityPoll.h" +#import "GTLOrkutCommunityPollComment.h" +#import "GTLOrkutCommunityPollCommentList.h" +#import "GTLOrkutCommunityPollList.h" +#import "GTLOrkutCommunitypolloptionResource.h" +#import "GTLOrkutCommunityPollVote.h" +#import "GTLOrkutCommunityTopic.h" +#import "GTLOrkutCommunityTopicList.h" +#import "GTLOrkutCounterResource.h" +#import "GTLOrkutCounters.h" +#import "GTLOrkutLinkResource.h" +#import "GTLOrkutVisibility.h" + +#import "GTLQueryOrkut.h" +#import "GTLServiceOrkut.h" diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutAcl.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutAcl.h.svn-base new file mode 100644 index 0000000..cdb5d20 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutAcl.h.svn-base @@ -0,0 +1,82 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutAcl.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutAcl (0 custom class methods, 4 custom properties) +// GTLOrkutAclItemsItem (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutAclItemsItem; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutAcl +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutAcl : GTLCollectionObject + +// Human readable description of the access granted. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The list of ACL entries. +@property (retain) NSArray *items; // of GTLOrkutAclItemsItem + +// Identifies this resource as an access control list. Value: "orkut#acl" +@property (copy) NSString *kind; + +// The total count of participants of the parent resource. +@property (retain) NSNumber *totalParticipants; // intValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutAclItemsItem +// + +@interface GTLOrkutAclItemsItem : GTLObject + +// The ID of the entity. For entities of type "person" or "circle", this is the +// ID of the resource. For other types, this will be unset. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The type of entity to whom access is granted. +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutAcl.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutAcl.m.svn-base new file mode 100644 index 0000000..6e7e39e --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutAcl.m.svn-base @@ -0,0 +1,79 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutAcl.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutAcl (0 custom class methods, 4 custom properties) +// GTLOrkutAclItemsItem (0 custom class methods, 2 custom properties) + +#import "GTLOrkutAcl.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutAcl +// + +@implementation GTLOrkutAcl +@dynamic descriptionProperty, items, kind, totalParticipants; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutAclItemsItem class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#acl"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutAclItemsItem +// + +@implementation GTLOrkutAclItemsItem +@dynamic identifier, type; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutActivity.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutActivity.h.svn-base new file mode 100644 index 0000000..c12cffc --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutActivity.h.svn-base @@ -0,0 +1,144 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutActivity.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutActivity (0 custom class methods, 10 custom properties) +// GTLOrkutActivityObject (0 custom class methods, 4 custom properties) +// GTLOrkutActivityObjectReplies (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutAcl; +@class GTLOrkutActivityObject; +@class GTLOrkutActivityObjectReplies; +@class GTLOrkutActivityobjectsResource; +@class GTLOrkutAuthorResource; +@class GTLOrkutComment; +@class GTLOrkutLinkResource; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivity +// + +@interface GTLOrkutActivity : GTLObject + +// Identifies who has access to see this activity. +@property (retain) GTLOrkutAcl *access; + +// The person who performed the activity. +@property (retain) GTLOrkutAuthorResource *actor; + +// The ID for the activity. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The kind of activity. Always orkut#activity. +@property (copy) NSString *kind; + +// Links to resources related to this activity. +@property (retain) NSArray *links; // of GTLOrkutLinkResource + +// The activity's object. +@property (retain) GTLOrkutActivityObject *object; + +// The time at which the activity was initially published. +@property (retain) GTLDateTime *published; + +// Title of the activity. +@property (copy) NSString *title; + +// The time at which the activity was last updated. +@property (retain) GTLDateTime *updated; + +// This activity's verb, indicating what action was performed. Possible values +// are: +// - add - User added new content to profile or album, e.g. video, photo. +// - post - User publish content to the stream, e.g. status, scrap. +// - update - User commented on an activity. +// - make-friend - User added a new friend. +// - birthday - User has a birthday. +@property (copy) NSString *verb; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivityObject +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutActivityObject : GTLCollectionObject + +// The HTML-formatted content, suitable for display. When updating an activity's +// content, post the changes to this property, using the value of +// originalContent as a starting point. If the update is successful, the server +// adds HTML formatting and responds with this formatted content. +@property (copy) NSString *content; + +// The list of additional items. +@property (retain) NSArray *items; // of GTLOrkutActivityobjectsResource + +// The type of the object affected by the activity. Clients can use this +// information to style the rendered activity object differently depending on +// the content. +@property (copy) NSString *objectType; + +// Comments in reply to this activity. +@property (retain) GTLOrkutActivityObjectReplies *replies; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivityObjectReplies +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutActivityObjectReplies : GTLCollectionObject + +// The list of comments. +@property (retain) NSArray *items; // of GTLOrkutComment + +// Total number of comments. +@property (retain) NSNumber *totalItems; // unsignedLongLongValue + +// URL for the collection of comments in reply to this activity. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutActivity.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutActivity.m.svn-base new file mode 100644 index 0000000..2e879fd --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutActivity.m.svn-base @@ -0,0 +1,105 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutActivity.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutActivity (0 custom class methods, 10 custom properties) +// GTLOrkutActivityObject (0 custom class methods, 4 custom properties) +// GTLOrkutActivityObjectReplies (0 custom class methods, 3 custom properties) + +#import "GTLOrkutActivity.h" + +#import "GTLOrkutAcl.h" +#import "GTLOrkutActivityobjectsResource.h" +#import "GTLOrkutAuthorResource.h" +#import "GTLOrkutComment.h" +#import "GTLOrkutLinkResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivity +// + +@implementation GTLOrkutActivity +@dynamic access, actor, identifier, kind, links, object, published, title, + updated, verb; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutLinkResource class] + forKey:@"links"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#activity"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivityObject +// + +@implementation GTLOrkutActivityObject +@dynamic content, items, objectType, replies; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutActivityobjectsResource class] + forKey:@"items"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivityObjectReplies +// + +@implementation GTLOrkutActivityObjectReplies +@dynamic items, totalItems, url; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutComment class] + forKey:@"items"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutActivityList.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutActivityList.h.svn-base new file mode 100644 index 0000000..8f97c1a --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutActivityList.h.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutActivityList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutActivityList (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutActivity; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivityList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutActivityList : GTLCollectionObject + +// List of activities retrieved. +@property (retain) NSArray *items; // of GTLOrkutActivity + +// Identifies this resource as a collection of activities. Value: +// "orkut#activityList" +@property (copy) NSString *kind; + +// The value of pageToken query parameter in activities.list request to get the +// next page, if there are more to retrieve. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutActivityList.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutActivityList.m.svn-base new file mode 100644 index 0000000..58ab60f --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutActivityList.m.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutActivityList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutActivityList (0 custom class methods, 3 custom properties) + +#import "GTLOrkutActivityList.h" + +#import "GTLOrkutActivity.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivityList +// + +@implementation GTLOrkutActivityList +@dynamic items, kind, nextPageToken; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutActivity class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#activityList"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutActivityobjectsResource.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutActivityobjectsResource.h.svn-base new file mode 100644 index 0000000..15c3bd2 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutActivityobjectsResource.h.svn-base @@ -0,0 +1,74 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutActivityobjectsResource.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutActivityobjectsResource (0 custom class methods, 7 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutActivitypersonResource; +@class GTLOrkutCommunity; +@class GTLOrkutLinkResource; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivityobjectsResource +// + +@interface GTLOrkutActivityobjectsResource : GTLObject + +// The community which is related with this activity, e.g. a joined community. +@property (retain) GTLOrkutCommunity *community; + +// The HTML-formatted content, suitable for display. When updating an activity's +// content, post the changes to this property, using the value of +// originalContent as a starting point. If the update is successful, the server +// adds HTML formatting and responds with this formatted content. +@property (copy) NSString *content; + +// The title of the object. +@property (copy) NSString *displayName; + +// The ID for the object. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Links to other resources related to this object. +@property (retain) NSArray *links; // of GTLOrkutLinkResource + +// The object type. +@property (copy) NSString *objectType; + +// The person who is related with this activity, e.g. an Added User. +@property (retain) GTLOrkutActivitypersonResource *person; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutActivityobjectsResource.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutActivityobjectsResource.m.svn-base new file mode 100644 index 0000000..1385b54 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutActivityobjectsResource.m.svn-base @@ -0,0 +1,60 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutActivityobjectsResource.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutActivityobjectsResource (0 custom class methods, 7 custom properties) + +#import "GTLOrkutActivityobjectsResource.h" + +#import "GTLOrkutActivitypersonResource.h" +#import "GTLOrkutCommunity.h" +#import "GTLOrkutLinkResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivityobjectsResource +// + +@implementation GTLOrkutActivityobjectsResource +@dynamic community, content, displayName, identifier, links, objectType, person; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutLinkResource class] + forKey:@"links"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutActivitypersonResource.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutActivitypersonResource.h.svn-base new file mode 100644 index 0000000..1b4b440 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutActivitypersonResource.h.svn-base @@ -0,0 +1,100 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutActivitypersonResource.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutActivitypersonResource (0 custom class methods, 6 custom properties) +// GTLOrkutActivitypersonResourceImage (0 custom class methods, 1 custom properties) +// GTLOrkutActivitypersonResourceName (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutActivitypersonResourceImage; +@class GTLOrkutActivitypersonResourceName; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivitypersonResource +// + +@interface GTLOrkutActivitypersonResource : GTLObject + +// The person's date of birth, represented as YYYY-MM-DD. +@property (copy) NSString *birthday; + +// The person's gender. Values include "male", "female", and "other". +@property (copy) NSString *gender; + +// The person's opensocial ID. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The person's profile photo. This is adapted from Google+ and was originaly +// introduced as extra OpenSocial convenience fields. +@property (retain) GTLOrkutActivitypersonResourceImage *image; + +// An object that encapsulates the individual components of a person's name. +@property (retain) GTLOrkutActivitypersonResourceName *name; + +// The person's profile url. This is adapted from Google+ and was originaly +// introduced as extra OpenSocial convenience fields. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivitypersonResourceImage +// + +@interface GTLOrkutActivitypersonResourceImage : GTLObject + +// The URL of the person's profile photo. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivitypersonResourceName +// + +@interface GTLOrkutActivitypersonResourceName : GTLObject + +// The family name (last name) of this person. +@property (copy) NSString *familyName; + +// The given name (first name) of this person. +@property (copy) NSString *givenName; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutActivitypersonResource.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutActivitypersonResource.m.svn-base new file mode 100644 index 0000000..a267928 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutActivitypersonResource.m.svn-base @@ -0,0 +1,71 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutActivitypersonResource.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutActivitypersonResource (0 custom class methods, 6 custom properties) +// GTLOrkutActivitypersonResourceImage (0 custom class methods, 1 custom properties) +// GTLOrkutActivitypersonResourceName (0 custom class methods, 2 custom properties) + +#import "GTLOrkutActivitypersonResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivitypersonResource +// + +@implementation GTLOrkutActivitypersonResource +@dynamic birthday, gender, identifier, image, name, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivitypersonResourceImage +// + +@implementation GTLOrkutActivitypersonResourceImage +@dynamic url; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivitypersonResourceName +// + +@implementation GTLOrkutActivitypersonResourceName +@dynamic familyName, givenName; +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutAuthorResource.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutAuthorResource.h.svn-base new file mode 100644 index 0000000..8fb58f9 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutAuthorResource.h.svn-base @@ -0,0 +1,75 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutAuthorResource.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutAuthorResource (0 custom class methods, 4 custom properties) +// GTLOrkutAuthorResourceImage (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutAuthorResourceImage; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutAuthorResource +// + +@interface GTLOrkutAuthorResource : GTLObject + +// The name of the author, suitable for display. +@property (copy) NSString *displayName; + +// Unique identifier of the person who posted the comment. This is the person's +// OpenSocial ID. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Image data about the author. +@property (retain) GTLOrkutAuthorResourceImage *image; + +// The URL of the author who posted the comment [not yet implemented] +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutAuthorResourceImage +// + +@interface GTLOrkutAuthorResourceImage : GTLObject + +// A URL that points to a thumbnail photo of the author. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutAuthorResource.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutAuthorResource.m.svn-base new file mode 100644 index 0000000..6ec5abf --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutAuthorResource.m.svn-base @@ -0,0 +1,60 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutAuthorResource.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutAuthorResource (0 custom class methods, 4 custom properties) +// GTLOrkutAuthorResourceImage (0 custom class methods, 1 custom properties) + +#import "GTLOrkutAuthorResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutAuthorResource +// + +@implementation GTLOrkutAuthorResource +@dynamic displayName, identifier, image, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutAuthorResourceImage +// + +@implementation GTLOrkutAuthorResourceImage +@dynamic url; +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutBadge.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutBadge.h.svn-base new file mode 100644 index 0000000..7305d98 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutBadge.h.svn-base @@ -0,0 +1,74 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutBadge.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutBadge (0 custom class methods, 9 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLOrkutBadge +// + +@interface GTLOrkutBadge : GTLObject + +// The URL for the 64x64 badge logo. +@property (copy) NSString *badgeLargeLogo; + +// The URL for the 24x24 badge logo. +@property (copy) NSString *badgeSmallLogo; + +// The name of the badge, suitable for display. +@property (copy) NSString *caption; + +// The description for the badge, suitable for display. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The unique ID for the badge. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +// Identifies this resource as a badge. Value: "orkut#badge" +@property (copy) NSString *kind; + +// The URL for the 32x32 badge sponsor logo. +@property (copy) NSString *sponsorLogo; + +// The name of the badge sponsor, suitable for display. +@property (copy) NSString *sponsorName; + +// The URL for the badge sponsor. +@property (copy) NSString *sponsorUrl; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutBadge.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutBadge.m.svn-base new file mode 100644 index 0000000..c7f71d1 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutBadge.m.svn-base @@ -0,0 +1,56 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutBadge.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutBadge (0 custom class methods, 9 custom properties) + +#import "GTLOrkutBadge.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutBadge +// + +@implementation GTLOrkutBadge +@dynamic badgeLargeLogo, badgeSmallLogo, caption, descriptionProperty, + identifier, kind, sponsorLogo, sponsorName, sponsorUrl; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#badge"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutBadgeList.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutBadgeList.h.svn-base new file mode 100644 index 0000000..e930742 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutBadgeList.h.svn-base @@ -0,0 +1,56 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutBadgeList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutBadgeList (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutBadge; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutBadgeList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutBadgeList : GTLCollectionObject + +// List of badges retrieved. +@property (retain) NSArray *items; // of GTLOrkutBadge + +// Identifies this resource as a collection of badges. Value: "orkut#badgeList" +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutBadgeList.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutBadgeList.m.svn-base new file mode 100644 index 0000000..779b1a6 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutBadgeList.m.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutBadgeList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutBadgeList (0 custom class methods, 2 custom properties) + +#import "GTLOrkutBadgeList.h" + +#import "GTLOrkutBadge.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutBadgeList +// + +@implementation GTLOrkutBadgeList +@dynamic items, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutBadge class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#badgeList"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutComment.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutComment.h.svn-base new file mode 100644 index 0000000..9eccee6 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutComment.h.svn-base @@ -0,0 +1,95 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutComment.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutComment (0 custom class methods, 7 custom properties) +// GTLOrkutCommentInReplyTo (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutAuthorResource; +@class GTLOrkutCommentInReplyTo; +@class GTLOrkutLinkResource; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutComment +// + +@interface GTLOrkutComment : GTLObject + +// The person who posted the comment. +@property (retain) GTLOrkutAuthorResource *actor; + +// The content of the comment in text/html +@property (copy) NSString *content; + +// The unique ID for the comment. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Link to the original activity where this comment was posted. +@property (retain) GTLOrkutCommentInReplyTo *inReplyTo; + +// Identifies this resource as a comment. Value: "orkut#comment" +@property (copy) NSString *kind; + +// List of resources for the comment. +@property (retain) NSArray *links; // of GTLOrkutLinkResource + +// The time the comment was initially published, in RFC 3339 format. +@property (retain) GTLDateTime *published; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommentInReplyTo +// + +@interface GTLOrkutCommentInReplyTo : GTLObject + +// Link to the post on activity stream being commented. +@property (copy) NSString *href; + +// Unique identifier of the post on activity stream being commented. +@property (copy) NSString *ref; + +// Relationship between the comment and the post on activity stream being +// commented. Always inReplyTo. +@property (copy) NSString *rel; + +// Type of the post on activity stream being commented. Always text/html. +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutComment.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutComment.m.svn-base new file mode 100644 index 0000000..431fa07 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutComment.m.svn-base @@ -0,0 +1,74 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutComment.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutComment (0 custom class methods, 7 custom properties) +// GTLOrkutCommentInReplyTo (0 custom class methods, 4 custom properties) + +#import "GTLOrkutComment.h" + +#import "GTLOrkutAuthorResource.h" +#import "GTLOrkutLinkResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutComment +// + +@implementation GTLOrkutComment +@dynamic actor, content, identifier, inReplyTo, kind, links, published; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutLinkResource class] + forKey:@"links"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#comment"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommentInReplyTo +// + +@implementation GTLOrkutCommentInReplyTo +@dynamic href, ref, rel, type; +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommentList.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommentList.h.svn-base new file mode 100644 index 0000000..ee4d2f9 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommentList.h.svn-base @@ -0,0 +1,65 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommentList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommentList (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutComment; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommentList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutCommentList : GTLCollectionObject + +// List of comments retrieved. +@property (retain) NSArray *items; // of GTLOrkutComment + +// Identifies this resource as a collection of comments. Value: +// "orkut#commentList" +@property (copy) NSString *kind; + +// The value of pageToken query parameter in comments.list request to get the +// next page, if there are more to retrieve. +@property (copy) NSString *nextPageToken; + +// The value of pageToken query parameter in comments.list request to get the +// previous page, if there are more to retrieve. +@property (copy) NSString *previousPageToken; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommentList.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommentList.m.svn-base new file mode 100644 index 0000000..62dbdb7 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommentList.m.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommentList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommentList (0 custom class methods, 4 custom properties) + +#import "GTLOrkutCommentList.h" + +#import "GTLOrkutComment.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommentList +// + +@implementation GTLOrkutCommentList +@dynamic items, kind, nextPageToken, previousPageToken; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutComment class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#commentList"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunity.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunity.h.svn-base new file mode 100644 index 0000000..89163c6 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunity.h.svn-base @@ -0,0 +1,93 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunity.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunity (0 custom class methods, 14 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutAuthorResource; +@class GTLOrkutLinkResource; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunity +// + +@interface GTLOrkutCommunity : GTLObject + +// The category of the community. +@property (copy) NSString *category; + +// The co-owners of the community. +@property (retain) NSArray *coOwners; // of GTLOrkutAuthorResource + +// The time the community was created, in RFC 3339 format. +@property (retain) GTLDateTime *creationDate; + +// The description of the community. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The id of the community. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // intValue + +// Identifies this resource as a community. Value: "orkut#community" +@property (copy) NSString *kind; + +// The official language of the community. +@property (copy) NSString *language; + +// List of resources for the community. +@property (retain) NSArray *links; // of GTLOrkutLinkResource + +// The location of the community. +@property (copy) NSString *location; + +// The number of users who are part of the community. This number may be +// approximate, so do not rely on it for iteration. +@property (retain) NSNumber *memberCount; // intValue + +// The list of moderators of the community. +@property (retain) NSArray *moderators; // of GTLOrkutAuthorResource + +// The name of the community. +@property (copy) NSString *name; + +// The person who owns the community. +@property (retain) GTLOrkutAuthorResource *owner; + +// The photo of the community. +@property (copy) NSString *photoUrl; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunity.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunity.m.svn-base new file mode 100644 index 0000000..59119c6 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunity.m.svn-base @@ -0,0 +1,74 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunity.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunity (0 custom class methods, 14 custom properties) + +#import "GTLOrkutCommunity.h" + +#import "GTLOrkutAuthorResource.h" +#import "GTLOrkutLinkResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunity +// + +@implementation GTLOrkutCommunity +@dynamic category, coOwners, creationDate, descriptionProperty, identifier, + kind, language, links, location, memberCount, moderators, name, owner, + photoUrl; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"co_owners", @"coOwners", + @"creation_date", @"creationDate", + @"description", @"descriptionProperty", + @"id", @"identifier", + @"member_count", @"memberCount", + @"photo_url", @"photoUrl", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLOrkutAuthorResource class], @"co_owners", + [GTLOrkutLinkResource class], @"links", + [GTLOrkutAuthorResource class], @"moderators", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#community"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityList.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityList.h.svn-base new file mode 100644 index 0000000..41844fb --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityList.h.svn-base @@ -0,0 +1,57 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityList (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutCommunity; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutCommunityList : GTLCollectionObject + +// List of communities retrieved. +@property (retain) NSArray *items; // of GTLOrkutCommunity + +// Identifies this resource as a collection of communities. Value: +// "orkut#communityList" +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityList.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityList.m.svn-base new file mode 100644 index 0000000..f1c97d5 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityList.m.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityList (0 custom class methods, 2 custom properties) + +#import "GTLOrkutCommunityList.h" + +#import "GTLOrkutCommunity.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityList +// + +@implementation GTLOrkutCommunityList +@dynamic items, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutCommunity class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#communityList"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMembers.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMembers.h.svn-base new file mode 100644 index 0000000..495acc7 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMembers.h.svn-base @@ -0,0 +1,57 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityMembers.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityMembers (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutActivitypersonResource; +@class GTLOrkutCommunityMembershipStatus; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityMembers +// + +@interface GTLOrkutCommunityMembers : GTLObject + +// Status and permissions of the user related to the community. +@property (retain) GTLOrkutCommunityMembershipStatus *communityMembershipStatus; + +// Kind of this item. Always orkut#communityMembers. +@property (copy) NSString *kind; + +// Description of the community member. +@property (retain) GTLOrkutActivitypersonResource *person; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMembers.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMembers.m.svn-base new file mode 100644 index 0000000..d2cb77d --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMembers.m.svn-base @@ -0,0 +1,49 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityMembers.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityMembers (0 custom class methods, 3 custom properties) + +#import "GTLOrkutCommunityMembers.h" + +#import "GTLOrkutActivitypersonResource.h" +#import "GTLOrkutCommunityMembershipStatus.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityMembers +// + +@implementation GTLOrkutCommunityMembers +@dynamic communityMembershipStatus, kind, person; + ++ (void)load { + [self registerObjectClassForKind:@"orkut#communityMembers"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMembersList.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMembersList.h.svn-base new file mode 100644 index 0000000..1a7520a --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMembersList.h.svn-base @@ -0,0 +1,72 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityMembersList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityMembersList (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutCommunityMembers; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityMembersList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutCommunityMembersList : GTLCollectionObject + +// The value of pageToken query parameter in community_members.list request to +// get the first page. +@property (copy) NSString *firstPageToken; + +// List of community members retrieved. +@property (retain) NSArray *items; // of GTLOrkutCommunityMembers + +// Kind of this item. Always orkut#communityMembersList. +@property (copy) NSString *kind; + +// The value of pageToken query parameter in community_members.list request to +// get the last page. +@property (copy) NSString *lastPageToken; + +// The value of pageToken query parameter in community_members.list request to +// get the next page, if there are more to retrieve. +@property (copy) NSString *nextPageToken; + +// The value of pageToken query parameter in community_members.list request to +// get the previous page, if there are more to retrieve. +@property (copy) NSString *prevPageToken; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMembersList.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMembersList.m.svn-base new file mode 100644 index 0000000..364f275 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMembersList.m.svn-base @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityMembersList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityMembersList (0 custom class methods, 6 custom properties) + +#import "GTLOrkutCommunityMembersList.h" + +#import "GTLOrkutCommunityMembers.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityMembersList +// + +@implementation GTLOrkutCommunityMembersList +@dynamic firstPageToken, items, kind, lastPageToken, nextPageToken, + prevPageToken; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutCommunityMembers class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#communityMembersList"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMembershipStatus.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMembershipStatus.h.svn-base new file mode 100644 index 0000000..ebc41a0 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMembershipStatus.h.svn-base @@ -0,0 +1,78 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityMembershipStatus.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityMembershipStatus (0 custom class methods, 11 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityMembershipStatus +// + +@interface GTLOrkutCommunityMembershipStatus : GTLObject + +// Whether the user can create a poll in this community. +@property (retain) NSNumber *canCreatePoll; // boolValue + +// Whether the user can create a topic in this community. +@property (retain) NSNumber *canCreateTopic; // boolValue + +// Whether the user can perform a shout operation in this community. +@property (retain) NSNumber *canShout; // boolValue + +// Whether the session user is a community co-owner. +@property (retain) NSNumber *isCoOwner; // boolValue + +// Whether the user is following this community. +@property (retain) NSNumber *isFollowing; // boolValue + +// Whether the session user is a community moderator. +@property (retain) NSNumber *isModerator; // boolValue + +// Whether the session user is the community owner. +@property (retain) NSNumber *isOwner; // boolValue + +// Whether the restore operation is available for the community. +@property (retain) NSNumber *isRestoreAvailable; // boolValue + +// Whether the take-back operation is available for the community. +@property (retain) NSNumber *isTakebackAvailable; // boolValue + +// Kind of this item. Always orkut#communityMembershipStatus. +@property (copy) NSString *kind; + +// The status of the current link between the community and the user. +@property (copy) NSString *status; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMembershipStatus.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMembershipStatus.m.svn-base new file mode 100644 index 0000000..661d1c8 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMembershipStatus.m.svn-base @@ -0,0 +1,48 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityMembershipStatus.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityMembershipStatus (0 custom class methods, 11 custom properties) + +#import "GTLOrkutCommunityMembershipStatus.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityMembershipStatus +// + +@implementation GTLOrkutCommunityMembershipStatus +@dynamic canCreatePoll, canCreateTopic, canShout, isCoOwner, isFollowing, + isModerator, isOwner, isRestoreAvailable, isTakebackAvailable, kind, + status; + ++ (void)load { + [self registerObjectClassForKind:@"orkut#communityMembershipStatus"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMessage.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMessage.h.svn-base new file mode 100644 index 0000000..87f5b28 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMessage.h.svn-base @@ -0,0 +1,75 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityMessage.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityMessage (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutAuthorResource; +@class GTLOrkutLinkResource; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityMessage +// + +@interface GTLOrkutCommunityMessage : GTLObject + +// The timestamp of the date when the message was added, in RFC 3339 format. +@property (retain) GTLDateTime *addedDate; + +// The creator of the message. If ommited, the message is annonimous. +@property (retain) GTLOrkutAuthorResource *author; + +// The body of the message. +@property (copy) NSString *body; + +// The ID of the message. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +// Whether this post was marked as spam by the viewer, when he/she is not the +// community owner or one of its moderators. +@property (retain) NSNumber *isSpam; // boolValue + +// Identifies this resource as a community message. Value: +// "orkut#communityMessage" +@property (copy) NSString *kind; + +// List of resources for the community message. +@property (retain) NSArray *links; // of GTLOrkutLinkResource + +// The subject of the message. +@property (copy) NSString *subject; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMessage.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMessage.m.svn-base new file mode 100644 index 0000000..f6e9e50 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMessage.m.svn-base @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityMessage.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityMessage (0 custom class methods, 8 custom properties) + +#import "GTLOrkutCommunityMessage.h" + +#import "GTLOrkutAuthorResource.h" +#import "GTLOrkutLinkResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityMessage +// + +@implementation GTLOrkutCommunityMessage +@dynamic addedDate, author, body, identifier, isSpam, kind, links, subject; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutLinkResource class] + forKey:@"links"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#communityMessage"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMessageList.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMessageList.h.svn-base new file mode 100644 index 0000000..006a8c8 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMessageList.h.svn-base @@ -0,0 +1,73 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityMessageList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityMessageList (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutCommunityMessage; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityMessageList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutCommunityMessageList : GTLCollectionObject + +// The value of pageToken query parameter in community_messages.list request to +// get the first page. +@property (copy) NSString *firstPageToken; + +// List of messages retrieved. +@property (retain) NSArray *items; // of GTLOrkutCommunityMessage + +// Identifies this resource as a collection of community messages. Value: +// "orkut#communityMessageList" +@property (copy) NSString *kind; + +// The value of pageToken query parameter in community_messages.list request to +// get the last page. +@property (copy) NSString *lastPageToken; + +// The value of pageToken query parameter in community_messages.list request to +// get the next page, if there are more to retrieve. +@property (copy) NSString *nextPageToken; + +// The value of pageToken query parameter in community_messages.list request to +// get the previous page, if there are more to retrieve. +@property (copy) NSString *prevPageToken; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMessageList.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMessageList.m.svn-base new file mode 100644 index 0000000..808e282 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityMessageList.m.svn-base @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityMessageList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityMessageList (0 custom class methods, 6 custom properties) + +#import "GTLOrkutCommunityMessageList.h" + +#import "GTLOrkutCommunityMessage.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityMessageList +// + +@implementation GTLOrkutCommunityMessageList +@dynamic firstPageToken, items, kind, lastPageToken, nextPageToken, + prevPageToken; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutCommunityMessage class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#communityMessageList"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPoll.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPoll.h.svn-base new file mode 100644 index 0000000..ab69aa0 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPoll.h.svn-base @@ -0,0 +1,142 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityPoll.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityPoll (0 custom class methods, 22 custom properties) +// GTLOrkutCommunityPollImage (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutAuthorResource; +@class GTLOrkutCommunityPollImage; +@class GTLOrkutCommunitypolloptionResource; +@class GTLOrkutLinkResource; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityPoll +// + +@interface GTLOrkutCommunityPoll : GTLObject + +// The person who created the poll. +@property (retain) GTLOrkutAuthorResource *author; + +// The ID of the community. +@property (retain) NSNumber *communityId; // intValue + +// The date of creation of this poll +@property (retain) GTLDateTime *creationTime; + +// The poll description. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The ending date of this poll or empty if the poll doesn't have one. +@property (retain) GTLDateTime *endingTime; + +// Whether the user has voted on this poll. +@property (retain) NSNumber *hasVoted; // boolValue + +// The poll ID. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The image representing the poll. Field is omitted if no image exists. +@property (retain) GTLOrkutCommunityPollImage *image; + +// Whether the poll is not expired if there is an expiration date. A poll is +// open (that is, not closed for voting) if it either is not expired or doesn't +// have an expiration date at all. Note that just because a poll is open, it +// doesn't mean that the requester can vote on it. +@property (retain) NSNumber *isClosed; // boolValue + +// Whether this poll allows voting for more than one option. +@property (retain) NSNumber *isMultipleAnswers; // boolValue + +// Whether this poll is still opened for voting. A poll is open for voting if it +// is not closed, the user has not yet voted on it and the user has the +// permission to do so, which happens if he/she is either a community member or +// the poll is open for everybody. +@property (retain) NSNumber *isOpenForVoting; // boolValue + +// Whether this poll is restricted for members only. If a poll is open but the +// user can't vote on it, it's been restricted to members only. This information +// is important to tell this case apart from the one where the user can't vote +// simply because the poll is already closed. +@property (retain) NSNumber *isRestricted; // boolValue + +// Whether the user has marked this poll as spam. This only affects the poll for +// this user, not globally. +@property (retain) NSNumber *isSpam; // boolValue + +// If user has already voted, whether his vote is publicly visible. +@property (retain) NSNumber *isUsersVotePublic; // boolValue + +// Whether non-members of the community can vote on the poll. +@property (retain) NSNumber *isVotingAllowedForNonMembers; // boolValue + +// Identifies this resource as a community poll. Value: "orkut#communityPoll" +@property (copy) NSString *kind; + +// The date of the last update of this poll. +@property (retain) GTLDateTime *lastUpdate; + +// List of resources for the community poll. +@property (retain) NSArray *links; // of GTLOrkutLinkResource + +// List of options of this poll. +@property (retain) NSArray *options; // of GTLOrkutCommunitypolloptionResource + +// The poll question. +@property (copy) NSString *question; + +// The total number of votes this poll has received. +@property (retain) NSNumber *totalNumberOfVotes; // intValue + +// List of options the user has voted on, if there are any. +@property (retain) NSArray *votedOptions; // of NSNumber (intValue) + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityPollImage +// + +@interface GTLOrkutCommunityPollImage : GTLObject + +// A URL that points to an image of the poll. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPoll.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPoll.m.svn-base new file mode 100644 index 0000000..7dda5db --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPoll.m.svn-base @@ -0,0 +1,84 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityPoll.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityPoll (0 custom class methods, 22 custom properties) +// GTLOrkutCommunityPollImage (0 custom class methods, 1 custom properties) + +#import "GTLOrkutCommunityPoll.h" + +#import "GTLOrkutAuthorResource.h" +#import "GTLOrkutCommunitypolloptionResource.h" +#import "GTLOrkutLinkResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityPoll +// + +@implementation GTLOrkutCommunityPoll +@dynamic author, communityId, creationTime, descriptionProperty, endingTime, + hasVoted, identifier, image, isClosed, isMultipleAnswers, + isOpenForVoting, isRestricted, isSpam, isUsersVotePublic, + isVotingAllowedForNonMembers, kind, lastUpdate, links, options, + question, totalNumberOfVotes, votedOptions; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLOrkutLinkResource class], @"links", + [GTLOrkutCommunitypolloptionResource class], @"options", + [NSNumber class], @"votedOptions", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#communityPoll"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityPollImage +// + +@implementation GTLOrkutCommunityPollImage +@dynamic url; +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPollComment.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPollComment.h.svn-base new file mode 100644 index 0000000..59a5c0b --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPollComment.h.svn-base @@ -0,0 +1,64 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityPollComment.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityPollComment (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutAuthorResource; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityPollComment +// + +@interface GTLOrkutCommunityPollComment : GTLObject + +// The date when the message was added, in RFC 3339 format. +@property (retain) GTLDateTime *addedDate; + +// The creator of the comment. +@property (retain) GTLOrkutAuthorResource *author; + +// The body of the message. +@property (copy) NSString *body; + +// The ID of the comment. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // intValue + +// Identifies this resource as a community poll comment. Value: +// "orkut#communityPollComment" +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPollComment.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPollComment.m.svn-base new file mode 100644 index 0000000..4a9e8b9 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPollComment.m.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityPollComment.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityPollComment (0 custom class methods, 5 custom properties) + +#import "GTLOrkutCommunityPollComment.h" + +#import "GTLOrkutAuthorResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityPollComment +// + +@implementation GTLOrkutCommunityPollComment +@dynamic addedDate, author, body, identifier, kind; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#communityPollComment"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPollCommentList.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPollCommentList.h.svn-base new file mode 100644 index 0000000..91b4d9d --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPollCommentList.h.svn-base @@ -0,0 +1,73 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityPollCommentList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityPollCommentList (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutCommunityPollComment; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityPollCommentList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutCommunityPollCommentList : GTLCollectionObject + +// The value of pageToken query parameter in community_poll_comments.list +// request to get the first page. +@property (copy) NSString *firstPageToken; + +// List of community poll comments retrieved. +@property (retain) NSArray *items; // of GTLOrkutCommunityPollComment + +// Identifies this resource as a collection of community poll comments. Value: +// "orkut#CommunityPollCommentList" +@property (copy) NSString *kind; + +// The value of pageToken query parameter in community_poll_comments.list +// request to get the last page. +@property (copy) NSString *lastPageToken; + +// The value of pageToken query parameter in community_poll_comments.list +// request to get the next page, if there are more to retrieve. +@property (copy) NSString *nextPageToken; + +// The value of pageToken query parameter in community_poll_comments.list +// request to get the previous page, if there are more to retrieve. +@property (copy) NSString *prevPageToken; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPollCommentList.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPollCommentList.m.svn-base new file mode 100644 index 0000000..ef557f1 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPollCommentList.m.svn-base @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityPollCommentList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityPollCommentList (0 custom class methods, 6 custom properties) + +#import "GTLOrkutCommunityPollCommentList.h" + +#import "GTLOrkutCommunityPollComment.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityPollCommentList +// + +@implementation GTLOrkutCommunityPollCommentList +@dynamic firstPageToken, items, kind, lastPageToken, nextPageToken, + prevPageToken; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutCommunityPollComment class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#CommunityPollCommentList"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPollList.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPollList.h.svn-base new file mode 100644 index 0000000..2c0cd95 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPollList.h.svn-base @@ -0,0 +1,73 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityPollList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityPollList (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutCommunityPoll; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityPollList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutCommunityPollList : GTLCollectionObject + +// The value of pageToken query parameter in community_polls.list request to get +// the first page. +@property (copy) NSString *firstPageToken; + +// List of community polls retrieved. +@property (retain) NSArray *items; // of GTLOrkutCommunityPoll + +// Identifies this resource as a collection of community polls. Value: +// "orkut#communityPollList" +@property (copy) NSString *kind; + +// The value of pageToken query parameter in community_polls.list request to get +// the last page. +@property (copy) NSString *lastPageToken; + +// The value of pageToken query parameter in community_polls.list request to get +// the next page, if there are more to retrieve. +@property (copy) NSString *nextPageToken; + +// The value of pageToken query parameter in community_polls.list request to get +// the previous page, if there are more to retrieve. +@property (copy) NSString *prevPageToken; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPollList.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPollList.m.svn-base new file mode 100644 index 0000000..385ee18 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPollList.m.svn-base @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityPollList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityPollList (0 custom class methods, 6 custom properties) + +#import "GTLOrkutCommunityPollList.h" + +#import "GTLOrkutCommunityPoll.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityPollList +// + +@implementation GTLOrkutCommunityPollList +@dynamic firstPageToken, items, kind, lastPageToken, nextPageToken, + prevPageToken; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutCommunityPoll class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#communityPollList"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPollVote.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPollVote.h.svn-base new file mode 100644 index 0000000..ca55f92 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPollVote.h.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityPollVote.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityPollVote (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityPollVote +// + +@interface GTLOrkutCommunityPollVote : GTLObject + +// Whether this vote is visible to other users or not. +@property (retain) NSNumber *isVotevisible; // boolValue + +// Identifies this resource as a community poll vote. Value: +// "orkut#communityPollVote" +@property (copy) NSString *kind; + +// The ids of the voted options. +@property (retain) NSArray *optionIds; // of NSNumber (intValue) + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPollVote.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPollVote.m.svn-base new file mode 100644 index 0000000..0ae0ab8 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityPollVote.m.svn-base @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityPollVote.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityPollVote (0 custom class methods, 3 custom properties) + +#import "GTLOrkutCommunityPollVote.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityPollVote +// + +@implementation GTLOrkutCommunityPollVote +@dynamic isVotevisible, kind, optionIds; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSNumber class] + forKey:@"optionIds"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#communityPollVote"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityTopic.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityTopic.h.svn-base new file mode 100644 index 0000000..ea3951f --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityTopic.h.svn-base @@ -0,0 +1,83 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityTopic.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityTopic (0 custom class methods, 11 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutAuthorResource; +@class GTLOrkutCommunityMessage; +@class GTLOrkutLinkResource; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityTopic +// + +@interface GTLOrkutCommunityTopic : GTLObject + +// The creator of the topic. +@property (retain) GTLOrkutAuthorResource *author; + +// The body of the topic. +@property (copy) NSString *body; + +// The ID of the topic. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +// Whether the topic is closed for new messages. +@property (retain) NSNumber *isClosed; // boolValue + +// Identifies this resource as a community topic. Value: "orkut#communityTopic" +@property (copy) NSString *kind; + +// The timestamp of the last update, in RFC 3339 format. +@property (retain) GTLDateTime *lastUpdate; + +// Snippet of the last message posted on this topic. +@property (copy) NSString *latestMessageSnippet; + +// List of resources for the community. +@property (retain) NSArray *links; // of GTLOrkutLinkResource + +// Most recent messages. +@property (retain) NSArray *messages; // of GTLOrkutCommunityMessage + +// The total number of replies this topic has received. +@property (retain) NSNumber *numberOfReplies; // intValue + +// The title of the topic. +@property (copy) NSString *title; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityTopic.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityTopic.m.svn-base new file mode 100644 index 0000000..beb7fe4 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityTopic.m.svn-base @@ -0,0 +1,67 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityTopic.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityTopic (0 custom class methods, 11 custom properties) + +#import "GTLOrkutCommunityTopic.h" + +#import "GTLOrkutAuthorResource.h" +#import "GTLOrkutCommunityMessage.h" +#import "GTLOrkutLinkResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityTopic +// + +@implementation GTLOrkutCommunityTopic +@dynamic author, body, identifier, isClosed, kind, lastUpdate, + latestMessageSnippet, links, messages, numberOfReplies, title; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLOrkutLinkResource class], @"links", + [GTLOrkutCommunityMessage class], @"messages", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#communityTopic"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityTopicList.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityTopicList.h.svn-base new file mode 100644 index 0000000..a1898f8 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityTopicList.h.svn-base @@ -0,0 +1,73 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityTopicList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityTopicList (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutCommunityTopic; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityTopicList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutCommunityTopicList : GTLCollectionObject + +// The value of pageToken query parameter in community_topic.list request to get +// the first page. +@property (copy) NSString *firstPageToken; + +// List of topics retrieved. +@property (retain) NSArray *items; // of GTLOrkutCommunityTopic + +// Identifies this resource as a collection of community topics. Value: +// "orkut#communityTopicList" +@property (copy) NSString *kind; + +// The value of pageToken query parameter in community_topic.list request to get +// the last page. +@property (copy) NSString *lastPageToken; + +// The value of pageToken query parameter in community_topic.list request to get +// the next page, if there are more to retrieve. +@property (copy) NSString *nextPageToken; + +// The value of pageToken query parameter in community_topic.list request to get +// the previous page, if there are more to retrieve. +@property (copy) NSString *prevPageToken; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityTopicList.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityTopicList.m.svn-base new file mode 100644 index 0000000..de51ef7 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunityTopicList.m.svn-base @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityTopicList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityTopicList (0 custom class methods, 6 custom properties) + +#import "GTLOrkutCommunityTopicList.h" + +#import "GTLOrkutCommunityTopic.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityTopicList +// + +@implementation GTLOrkutCommunityTopicList +@dynamic firstPageToken, items, kind, lastPageToken, nextPageToken, + prevPageToken; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutCommunityTopic class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#communityTopicList"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunitypolloptionResource.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunitypolloptionResource.h.svn-base new file mode 100644 index 0000000..98ccbf3 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunitypolloptionResource.h.svn-base @@ -0,0 +1,74 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunitypolloptionResource.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunitypolloptionResource (0 custom class methods, 4 custom properties) +// GTLOrkutCommunitypolloptionResourceImage (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutCommunitypolloptionResourceImage; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunitypolloptionResource +// + +@interface GTLOrkutCommunitypolloptionResource : GTLObject + +// The option description. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Image data about the poll option. Field is omitted if no image exists. +@property (retain) GTLOrkutCommunitypolloptionResourceImage *image; + +// The total number of votes that this option received. +@property (retain) NSNumber *numberOfVotes; // intValue + +// The poll option ID +@property (retain) NSNumber *optionId; // intValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunitypolloptionResourceImage +// + +@interface GTLOrkutCommunitypolloptionResourceImage : GTLObject + +// A URL that points to an image of the poll question. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunitypolloptionResource.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunitypolloptionResource.m.svn-base new file mode 100644 index 0000000..be9397e --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCommunitypolloptionResource.m.svn-base @@ -0,0 +1,60 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunitypolloptionResource.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunitypolloptionResource (0 custom class methods, 4 custom properties) +// GTLOrkutCommunitypolloptionResourceImage (0 custom class methods, 1 custom properties) + +#import "GTLOrkutCommunitypolloptionResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunitypolloptionResource +// + +@implementation GTLOrkutCommunitypolloptionResource +@dynamic descriptionProperty, image, numberOfVotes, optionId; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunitypolloptionResourceImage +// + +@implementation GTLOrkutCommunitypolloptionResourceImage +@dynamic url; +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutConstants.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutConstants.h.svn-base new file mode 100644 index 0000000..8ab1061 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutConstants.h.svn-base @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// Manage your Orkut activity +GTL_EXTERN NSString * const kGTLAuthScopeOrkut; // "https://www.googleapis.com/auth/orkut" +// View your Orkut data +GTL_EXTERN NSString * const kGTLAuthScopeOrkutReadonly; // "https://www.googleapis.com/auth/orkut.readonly" + +// Collection +GTL_EXTERN NSString * const kGTLOrkutCollectionAll; // "all" +GTL_EXTERN NSString * const kGTLOrkutCollectionScraps; // "scraps" +GTL_EXTERN NSString * const kGTLOrkutCollectionStream; // "stream" + +// OrderBy +GTL_EXTERN NSString * const kGTLOrkutOrderByAscending; // "ascending" +GTL_EXTERN NSString * const kGTLOrkutOrderByDescending; // "descending" +GTL_EXTERN NSString * const kGTLOrkutOrderById; // "id" +GTL_EXTERN NSString * const kGTLOrkutOrderByRanked; // "ranked" diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutConstants.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutConstants.m.svn-base new file mode 100644 index 0000000..f63a6b2 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutConstants.m.svn-base @@ -0,0 +1,45 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html + +#import "GTLOrkutConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeOrkut = @"https://www.googleapis.com/auth/orkut"; +NSString * const kGTLAuthScopeOrkutReadonly = @"https://www.googleapis.com/auth/orkut.readonly"; + +// Collection +NSString * const kGTLOrkutCollectionAll = @"all"; +NSString * const kGTLOrkutCollectionScraps = @"scraps"; +NSString * const kGTLOrkutCollectionStream = @"stream"; + +// OrderBy +NSString * const kGTLOrkutOrderByAscending = @"ascending"; +NSString * const kGTLOrkutOrderByDescending = @"descending"; +NSString * const kGTLOrkutOrderById = @"id"; +NSString * const kGTLOrkutOrderByRanked = @"ranked"; diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCounterResource.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCounterResource.h.svn-base new file mode 100644 index 0000000..c56526f --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCounterResource.h.svn-base @@ -0,0 +1,60 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCounterResource.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCounterResource (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutLinkResource; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCounterResource +// + +@interface GTLOrkutCounterResource : GTLObject + +// Link to the collection being counted. +@property (retain) GTLOrkutLinkResource *link; + +// The name of the counted collection. Currently supported collections are: +// - scraps - The scraps of the user. +// - photos - The photos of the user. +// - videos - The videos of the user. +// - pendingTestimonials - The pending testimonials of the user. +@property (copy) NSString *name; + +// The number of resources on the counted collection. +@property (retain) NSNumber *total; // intValue + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCounterResource.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCounterResource.m.svn-base new file mode 100644 index 0000000..addab81 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCounterResource.m.svn-base @@ -0,0 +1,43 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCounterResource.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCounterResource (0 custom class methods, 3 custom properties) + +#import "GTLOrkutCounterResource.h" + +#import "GTLOrkutLinkResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCounterResource +// + +@implementation GTLOrkutCounterResource +@dynamic link, name, total; +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCounters.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCounters.h.svn-base new file mode 100644 index 0000000..90a590b --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCounters.h.svn-base @@ -0,0 +1,56 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCounters.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCounters (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutCounterResource; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCounters +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutCounters : GTLCollectionObject + +// List of counters retrieved. +@property (retain) NSArray *items; // of GTLOrkutCounterResource + +// Identifies this resource as a collection of counters. Value: "orkut#counters" +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCounters.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCounters.m.svn-base new file mode 100644 index 0000000..7cdc47f --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutCounters.m.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCounters.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCounters (0 custom class methods, 2 custom properties) + +#import "GTLOrkutCounters.h" + +#import "GTLOrkutCounterResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCounters +// + +@implementation GTLOrkutCounters +@dynamic items, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutCounterResource class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#counters"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutLinkResource.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutLinkResource.h.svn-base new file mode 100644 index 0000000..e5edb3f --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutLinkResource.h.svn-base @@ -0,0 +1,59 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutLinkResource.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutLinkResource (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLOrkutLinkResource +// + +// Links to resources related to the parent object. + +@interface GTLOrkutLinkResource : GTLObject + +// URL of the link. +@property (copy) NSString *href; + +// Relation between the resource and the parent object. +@property (copy) NSString *rel; + +// Title of the link. +@property (copy) NSString *title; + +// Media type of the link. +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutLinkResource.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutLinkResource.m.svn-base new file mode 100644 index 0000000..3d9443c --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutLinkResource.m.svn-base @@ -0,0 +1,41 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutLinkResource.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutLinkResource (0 custom class methods, 4 custom properties) + +#import "GTLOrkutLinkResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutLinkResource +// + +@implementation GTLOrkutLinkResource +@dynamic href, rel, title, type; +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutVisibility.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutVisibility.h.svn-base new file mode 100644 index 0000000..6a00ca4 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutVisibility.h.svn-base @@ -0,0 +1,58 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutVisibility.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutVisibility (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutLinkResource; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutVisibility +// + +@interface GTLOrkutVisibility : GTLObject + +// Identifies this resource as a visibility item. Value: "orkut#visibility" +@property (copy) NSString *kind; + +// List of resources for the visibility item. +@property (retain) NSArray *links; // of GTLOrkutLinkResource + +// The visibility of the resource. Possible values are: +// - default: not hidden by the user +// - hidden: hidden +@property (copy) NSString *visibility; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutVisibility.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutVisibility.m.svn-base new file mode 100644 index 0000000..1341434 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkutVisibility.m.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutVisibility.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutVisibility (0 custom class methods, 3 custom properties) + +#import "GTLOrkutVisibility.h" + +#import "GTLOrkutLinkResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutVisibility +// + +@implementation GTLOrkutVisibility +@dynamic kind, links, visibility; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutLinkResource class] + forKey:@"links"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#visibility"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkut_Sources.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkut_Sources.m.svn-base new file mode 100644 index 0000000..e0eda63 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLOrkut_Sources.m.svn-base @@ -0,0 +1,66 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkut_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html + +#import "GTLOrkutConstants.m" + +#import "GTLOrkutAcl.m" +#import "GTLOrkutActivity.m" +#import "GTLOrkutActivityList.m" +#import "GTLOrkutActivityobjectsResource.m" +#import "GTLOrkutActivitypersonResource.m" +#import "GTLOrkutAuthorResource.m" +#import "GTLOrkutBadge.m" +#import "GTLOrkutBadgeList.m" +#import "GTLOrkutComment.m" +#import "GTLOrkutCommentList.m" +#import "GTLOrkutCommunity.m" +#import "GTLOrkutCommunityList.m" +#import "GTLOrkutCommunityMembers.m" +#import "GTLOrkutCommunityMembershipStatus.m" +#import "GTLOrkutCommunityMembersList.m" +#import "GTLOrkutCommunityMessage.m" +#import "GTLOrkutCommunityMessageList.m" +#import "GTLOrkutCommunityPoll.m" +#import "GTLOrkutCommunityPollComment.m" +#import "GTLOrkutCommunityPollCommentList.m" +#import "GTLOrkutCommunityPollList.m" +#import "GTLOrkutCommunitypolloptionResource.m" +#import "GTLOrkutCommunityPollVote.m" +#import "GTLOrkutCommunityTopic.m" +#import "GTLOrkutCommunityTopicList.m" +#import "GTLOrkutCounterResource.m" +#import "GTLOrkutCounters.m" +#import "GTLOrkutLinkResource.m" +#import "GTLOrkutVisibility.m" + +#import "GTLQueryOrkut.m" +#import "GTLServiceOrkut.m" diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLQueryOrkut.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLQueryOrkut.h.svn-base new file mode 100644 index 0000000..400030d --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLQueryOrkut.h.svn-base @@ -0,0 +1,597 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryOrkut.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLQueryOrkut (35 custom class methods, 16 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLOrkutActivity; +@class GTLOrkutComment; +@class GTLOrkutCommunityMessage; +@class GTLOrkutCommunityPollComment; +@class GTLOrkutCommunityPollVote; +@class GTLOrkutCommunityTopic; +@class GTLOrkutVisibility; + +@interface GTLQueryOrkut : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *activityId; +@property (assign) long long badgeId; +@property (copy) NSString *collection; +@property (copy) NSString *commentId; +@property (assign) NSInteger communityId; +@property (assign) BOOL friendsOnly; +@property (copy) NSString *hl; +@property (assign) BOOL isShout; +@property (assign) NSUInteger maxResults; +@property (assign) long long messageId; +@property (copy) NSString *orderBy; +@property (copy) NSString *pageToken; +@property (copy) NSString *pollId; +@property (assign) long long topicId; +@property (copy) NSString *userId; + +#pragma mark - +#pragma mark "acl" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.acl.delete +// Excludes an element from the ACL of the activity. +// Required: +// activityId: ID of the activity. +// userId: ID of the user to be removed from the activity. +// Authorization scope(s): +// kGTLAuthScopeOrkut ++ (id)queryForAclDeleteWithActivityId:(NSString *)activityId + userId:(NSString *)userId; + +#pragma mark - +#pragma mark "activities" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.activities.delete +// Deletes an existing activity, if the access controls allow it. +// Required: +// activityId: ID of the activity to remove. +// Authorization scope(s): +// kGTLAuthScopeOrkut ++ (id)queryForActivitiesDeleteWithActivityId:(NSString *)activityId; + +// Method: orkut.activities.list +// Retrieves a list of activities. +// Required: +// userId: The ID of the user whose activities will be listed. Can be me to +// refer to the viewer (i.e. the authenticated user). +// collection: The collection of activities to list. +// kGTLOrkutCollectionAll: All activities created by the specified user +// that the authenticated user is authorized to view. +// kGTLOrkutCollectionScraps: The specified user's scrapbook. +// kGTLOrkutCollectionStream: The specified user's stream feed, intended +// for consumption. This includes activities posted by people that the +// user is following, and activities in which the user has been +// mentioned. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// maxResults: The maximum number of activities to include in the response. +// (1..100) +// pageToken: A continuation token that allows pagination. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutActivityList. ++ (id)queryForActivitiesListWithUserId:(NSString *)userId + collection:(NSString *)collection; + +#pragma mark - +#pragma mark "activityVisibility" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.activityVisibility.get +// Gets the visibility of an existing activity. +// Required: +// activityId: ID of the activity to get the visibility. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutVisibility. ++ (id)queryForActivityVisibilityGetWithActivityId:(NSString *)activityId; + +// Method: orkut.activityVisibility.patch +// Updates the visibility of an existing activity. This method supports patch +// semantics. +// Required: +// activityId: ID of the activity. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// Fetches a GTLOrkutVisibility. ++ (id)queryForActivityVisibilityPatchWithObject:(GTLOrkutVisibility *)object + activityId:(NSString *)activityId; + +// Method: orkut.activityVisibility.update +// Updates the visibility of an existing activity. +// Required: +// activityId: ID of the activity. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// Fetches a GTLOrkutVisibility. ++ (id)queryForActivityVisibilityUpdateWithObject:(GTLOrkutVisibility *)object + activityId:(NSString *)activityId; + +#pragma mark - +#pragma mark "badges" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.badges.get +// Retrieves a badge from a user. +// Required: +// userId: The ID of the user whose badges will be listed. Can be me to refer +// to caller. +// badgeId: The ID of the badge that will be retrieved. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutBadge. ++ (id)queryForBadgesGetWithUserId:(NSString *)userId + badgeId:(long long)badgeId; + +// Method: orkut.badges.list +// Retrieves the list of visible badges of a user. +// Required: +// userId: The id of the user whose badges will be listed. Can be me to refer +// to caller. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutBadgeList. ++ (id)queryForBadgesListWithUserId:(NSString *)userId; + +#pragma mark - +#pragma mark "comments" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.comments.delete +// Deletes an existing comment. +// Required: +// commentId: ID of the comment to remove. +// Authorization scope(s): +// kGTLAuthScopeOrkut ++ (id)queryForCommentsDeleteWithCommentId:(NSString *)commentId; + +// Method: orkut.comments.get +// Retrieves an existing comment. +// Required: +// commentId: ID of the comment to get. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutComment. ++ (id)queryForCommentsGetWithCommentId:(NSString *)commentId; + +// Method: orkut.comments.insert +// Inserts a new comment to an activity. +// Required: +// activityId: The ID of the activity to contain the new comment. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// Fetches a GTLOrkutComment. ++ (id)queryForCommentsInsertWithObject:(GTLOrkutComment *)object + activityId:(NSString *)activityId; + +// Method: orkut.comments.list +// Retrieves a list of comments, possibly filtered. +// Required: +// activityId: The ID of the activity containing the comments. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// maxResults: The maximum number of activities to include in the response. +// orderBy: Sort search results. (Default "DESCENDING_SORT") +// kGTLOrkutOrderByAscending: Use ascending sort order. +// kGTLOrkutOrderByDescending: Use descending sort order. +// pageToken: A continuation token that allows pagination. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCommentList. ++ (id)queryForCommentsListWithActivityId:(NSString *)activityId; + +#pragma mark - +#pragma mark "communities" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.communities.get +// Retrieves the basic information (aka. profile) of a community. +// Required: +// communityId: The ID of the community to get. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCommunity. ++ (id)queryForCommunitiesGetWithCommunityId:(NSInteger)communityId; + +// Method: orkut.communities.list +// Retrieves the list of communities the current user is a member of. +// Required: +// userId: The ID of the user whose communities will be listed. Can be me to +// refer to caller. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// maxResults: The maximum number of communities to include in the response. +// orderBy: How to order the communities by. +// kGTLOrkutOrderById: Returns the communities sorted by a fixed, natural +// order. +// kGTLOrkutOrderByRanked: Returns the communities ranked accordingly to +// how they are displayed on the orkut web application. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCommunityList. ++ (id)queryForCommunitiesListWithUserId:(NSString *)userId; + +#pragma mark - +#pragma mark "communityFollow" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.communityFollow.delete +// Removes a user from the followers of a community. +// Required: +// communityId: ID of the community. +// userId: ID of the user. +// Authorization scope(s): +// kGTLAuthScopeOrkut ++ (id)queryForCommunityFollowDeleteWithCommunityId:(NSInteger)communityId + userId:(NSString *)userId; + +// Method: orkut.communityFollow.insert +// Adds a user as a follower of a community. +// Required: +// communityId: ID of the community. +// userId: ID of the user. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// Fetches a GTLOrkutCommunityMembers. ++ (id)queryForCommunityFollowInsertWithCommunityId:(NSInteger)communityId + userId:(NSString *)userId; + +#pragma mark - +#pragma mark "communityMembers" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.communityMembers.delete +// Makes the user leave a community. +// Required: +// communityId: ID of the community. +// userId: ID of the user. +// Authorization scope(s): +// kGTLAuthScopeOrkut ++ (id)queryForCommunityMembersDeleteWithCommunityId:(NSInteger)communityId + userId:(NSString *)userId; + +// Method: orkut.communityMembers.get +// Retrieves the relationship between a user and a community. +// Required: +// communityId: ID of the community. +// userId: ID of the user. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCommunityMembers. ++ (id)queryForCommunityMembersGetWithCommunityId:(NSInteger)communityId + userId:(NSString *)userId; + +// Method: orkut.communityMembers.insert +// Makes the user join a community. +// Required: +// communityId: ID of the community. +// userId: ID of the user. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// Fetches a GTLOrkutCommunityMembers. ++ (id)queryForCommunityMembersInsertWithCommunityId:(NSInteger)communityId + userId:(NSString *)userId; + +// Method: orkut.communityMembers.list +// Lists members of a community. Use the pagination tokens to retrieve the full +// list; do not rely on the member count available in the community profile +// information to know when to stop iterating, as that count may be approximate. +// Required: +// communityId: The ID of the community whose members will be listed. +// Optional: +// friendsOnly: Whether to list only community members who are friends of the +// user. +// hl: Specifies the interface language (host language) of your user +// interface. +// maxResults: The maximum number of members to include in the response. +// pageToken: A continuation token that allows pagination. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCommunityMembersList. ++ (id)queryForCommunityMembersListWithCommunityId:(NSInteger)communityId; + +#pragma mark - +#pragma mark "communityMessages" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.communityMessages.delete +// Moves a message of the community to the trash folder. +// Required: +// communityId: The ID of the community whose message will be moved to the +// trash folder. +// topicId: The ID of the topic whose message will be moved to the trash +// folder. +// messageId: The ID of the message to be moved to the trash folder. +// Authorization scope(s): +// kGTLAuthScopeOrkut ++ (id)queryForCommunityMessagesDeleteWithCommunityId:(NSInteger)communityId + topicId:(long long)topicId + messageId:(long long)messageId; + +// Method: orkut.communityMessages.insert +// Adds a message to a given community topic. +// Required: +// communityId: The ID of the community the message should be added to. +// topicId: The ID of the topic the message should be added to. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// Fetches a GTLOrkutCommunityMessage. ++ (id)queryForCommunityMessagesInsertWithObject:(GTLOrkutCommunityMessage *)object + communityId:(NSInteger)communityId + topicId:(long long)topicId; + +// Method: orkut.communityMessages.list +// Retrieves the messages of a topic of a community. +// Required: +// communityId: The ID of the community which messages will be listed. +// topicId: The ID of the topic which messages will be listed. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// maxResults: The maximum number of messages to include in the response. +// (1..100) +// pageToken: A continuation token that allows pagination. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCommunityMessageList. ++ (id)queryForCommunityMessagesListWithCommunityId:(NSInteger)communityId + topicId:(long long)topicId; + +#pragma mark - +#pragma mark "communityPollComments" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.communityPollComments.insert +// Adds a comment on a community poll. +// Required: +// communityId: The ID of the community whose poll is being commented. +// pollId: The ID of the poll being commented. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// Fetches a GTLOrkutCommunityPollComment. ++ (id)queryForCommunityPollCommentsInsertWithObject:(GTLOrkutCommunityPollComment *)object + communityId:(NSInteger)communityId + pollId:(NSString *)pollId; + +// Method: orkut.communityPollComments.list +// Retrieves the comments of a community poll. +// Required: +// communityId: The ID of the community whose poll is having its comments +// listed. +// pollId: The ID of the community whose polls will be listed. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// maxResults: The maximum number of comments to include in the response. +// pageToken: A continuation token that allows pagination. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCommunityPollCommentList. ++ (id)queryForCommunityPollCommentsListWithCommunityId:(NSInteger)communityId + pollId:(NSString *)pollId; + +#pragma mark - +#pragma mark "communityPolls" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.communityPolls.get +// Retrieves one specific poll of a community. +// Required: +// communityId: The ID of the community for whose poll will be retrieved. +// pollId: The ID of the poll to get. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCommunityPoll. ++ (id)queryForCommunityPollsGetWithCommunityId:(NSInteger)communityId + pollId:(NSString *)pollId; + +// Method: orkut.communityPolls.list +// Retrieves the polls of a community. +// Required: +// communityId: The ID of the community which polls will be listed. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// maxResults: The maximum number of polls to include in the response. +// pageToken: A continuation token that allows pagination. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCommunityPollList. ++ (id)queryForCommunityPollsListWithCommunityId:(NSInteger)communityId; + +#pragma mark - +#pragma mark "communityPollVotes" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.communityPollVotes.insert +// Votes on a community poll. +// Required: +// communityId: The ID of the community whose poll is being voted. +// pollId: The ID of the poll being voted. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// Fetches a GTLOrkutCommunityPollVote. ++ (id)queryForCommunityPollVotesInsertWithObject:(GTLOrkutCommunityPollVote *)object + communityId:(NSInteger)communityId + pollId:(NSString *)pollId; + +#pragma mark - +#pragma mark "communityRelated" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.communityRelated.list +// Retrieves the communities related to another one. +// Required: +// communityId: The ID of the community whose related communities will be +// listed. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCommunityList. ++ (id)queryForCommunityRelatedListWithCommunityId:(NSInteger)communityId; + +#pragma mark - +#pragma mark "communityTopics" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.communityTopics.delete +// Moves a topic of the community to the trash folder. +// Required: +// communityId: The ID of the community whose topic will be moved to the trash +// folder. +// topicId: The ID of the topic to be moved to the trash folder. +// Authorization scope(s): +// kGTLAuthScopeOrkut ++ (id)queryForCommunityTopicsDeleteWithCommunityId:(NSInteger)communityId + topicId:(long long)topicId; + +// Method: orkut.communityTopics.get +// Retrieves a topic of a community. +// Required: +// communityId: The ID of the community whose topic will be retrieved. +// topicId: The ID of the topic to get. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCommunityTopic. ++ (id)queryForCommunityTopicsGetWithCommunityId:(NSInteger)communityId + topicId:(long long)topicId; + +// Method: orkut.communityTopics.insert +// Adds a topic to a given community. +// Required: +// communityId: The ID of the community the topic should be added to. +// Optional: +// isShout: Whether this topic is a shout. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// Fetches a GTLOrkutCommunityTopic. ++ (id)queryForCommunityTopicsInsertWithObject:(GTLOrkutCommunityTopic *)object + communityId:(NSInteger)communityId; + +// Method: orkut.communityTopics.list +// Retrieves the topics of a community. +// Required: +// communityId: The ID of the community which topics will be listed. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// maxResults: The maximum number of topics to include in the response. +// (1..100) +// pageToken: A continuation token that allows pagination. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCommunityTopicList. ++ (id)queryForCommunityTopicsListWithCommunityId:(NSInteger)communityId; + +#pragma mark - +#pragma mark "counters" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.counters.list +// Retrieves the counters of a user. +// Required: +// userId: The ID of the user whose counters will be listed. Can be me to +// refer to caller. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCounters. ++ (id)queryForCountersListWithUserId:(NSString *)userId; + +#pragma mark - +#pragma mark "scraps" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.scraps.insert +// Creates a new scrap. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// Fetches a GTLOrkutActivity. ++ (id)queryForScrapsInsertWithObject:(GTLOrkutActivity *)object; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLQueryOrkut.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLQueryOrkut.m.svn-base new file mode 100644 index 0000000..e43d006 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLQueryOrkut.m.svn-base @@ -0,0 +1,481 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryOrkut.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLQueryOrkut (35 custom class methods, 16 custom properties) + +#import "GTLQueryOrkut.h" + +#import "GTLOrkutActivity.h" +#import "GTLOrkutActivityList.h" +#import "GTLOrkutBadge.h" +#import "GTLOrkutBadgeList.h" +#import "GTLOrkutComment.h" +#import "GTLOrkutCommentList.h" +#import "GTLOrkutCommunity.h" +#import "GTLOrkutCommunityList.h" +#import "GTLOrkutCommunityMembers.h" +#import "GTLOrkutCommunityMembersList.h" +#import "GTLOrkutCommunityMessage.h" +#import "GTLOrkutCommunityMessageList.h" +#import "GTLOrkutCommunityPoll.h" +#import "GTLOrkutCommunityPollComment.h" +#import "GTLOrkutCommunityPollCommentList.h" +#import "GTLOrkutCommunityPollList.h" +#import "GTLOrkutCommunityPollVote.h" +#import "GTLOrkutCommunityTopic.h" +#import "GTLOrkutCommunityTopicList.h" +#import "GTLOrkutCounters.h" +#import "GTLOrkutVisibility.h" + +@implementation GTLQueryOrkut + +@dynamic activityId, badgeId, collection, commentId, communityId, fields, + friendsOnly, hl, isShout, maxResults, messageId, orderBy, pageToken, + pollId, topicId, userId; + +#pragma mark - +#pragma mark "acl" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForAclDeleteWithActivityId:(NSString *)activityId + userId:(NSString *)userId { + NSString *methodName = @"orkut.acl.delete"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.activityId = activityId; + query.userId = userId; + return query; +} + +#pragma mark - +#pragma mark "activities" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForActivitiesDeleteWithActivityId:(NSString *)activityId { + NSString *methodName = @"orkut.activities.delete"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.activityId = activityId; + return query; +} + ++ (id)queryForActivitiesListWithUserId:(NSString *)userId + collection:(NSString *)collection { + NSString *methodName = @"orkut.activities.list"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.userId = userId; + query.collection = collection; + query.expectedObjectClass = [GTLOrkutActivityList class]; + return query; +} + +#pragma mark - +#pragma mark "activityVisibility" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForActivityVisibilityGetWithActivityId:(NSString *)activityId { + NSString *methodName = @"orkut.activityVisibility.get"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.activityId = activityId; + query.expectedObjectClass = [GTLOrkutVisibility class]; + return query; +} + ++ (id)queryForActivityVisibilityPatchWithObject:(GTLOrkutVisibility *)object + activityId:(NSString *)activityId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"orkut.activityVisibility.patch"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.activityId = activityId; + query.expectedObjectClass = [GTLOrkutVisibility class]; + return query; +} + ++ (id)queryForActivityVisibilityUpdateWithObject:(GTLOrkutVisibility *)object + activityId:(NSString *)activityId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"orkut.activityVisibility.update"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.activityId = activityId; + query.expectedObjectClass = [GTLOrkutVisibility class]; + return query; +} + +#pragma mark - +#pragma mark "badges" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForBadgesGetWithUserId:(NSString *)userId + badgeId:(long long)badgeId { + NSString *methodName = @"orkut.badges.get"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.userId = userId; + query.badgeId = badgeId; + query.expectedObjectClass = [GTLOrkutBadge class]; + return query; +} + ++ (id)queryForBadgesListWithUserId:(NSString *)userId { + NSString *methodName = @"orkut.badges.list"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.userId = userId; + query.expectedObjectClass = [GTLOrkutBadgeList class]; + return query; +} + +#pragma mark - +#pragma mark "comments" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForCommentsDeleteWithCommentId:(NSString *)commentId { + NSString *methodName = @"orkut.comments.delete"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.commentId = commentId; + return query; +} + ++ (id)queryForCommentsGetWithCommentId:(NSString *)commentId { + NSString *methodName = @"orkut.comments.get"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.commentId = commentId; + query.expectedObjectClass = [GTLOrkutComment class]; + return query; +} + ++ (id)queryForCommentsInsertWithObject:(GTLOrkutComment *)object + activityId:(NSString *)activityId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"orkut.comments.insert"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.activityId = activityId; + query.expectedObjectClass = [GTLOrkutComment class]; + return query; +} + ++ (id)queryForCommentsListWithActivityId:(NSString *)activityId { + NSString *methodName = @"orkut.comments.list"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.activityId = activityId; + query.expectedObjectClass = [GTLOrkutCommentList class]; + return query; +} + +#pragma mark - +#pragma mark "communities" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForCommunitiesGetWithCommunityId:(NSInteger)communityId { + NSString *methodName = @"orkut.communities.get"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.expectedObjectClass = [GTLOrkutCommunity class]; + return query; +} + ++ (id)queryForCommunitiesListWithUserId:(NSString *)userId { + NSString *methodName = @"orkut.communities.list"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.userId = userId; + query.expectedObjectClass = [GTLOrkutCommunityList class]; + return query; +} + +#pragma mark - +#pragma mark "communityFollow" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForCommunityFollowDeleteWithCommunityId:(NSInteger)communityId + userId:(NSString *)userId { + NSString *methodName = @"orkut.communityFollow.delete"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.userId = userId; + return query; +} + ++ (id)queryForCommunityFollowInsertWithCommunityId:(NSInteger)communityId + userId:(NSString *)userId { + NSString *methodName = @"orkut.communityFollow.insert"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.userId = userId; + query.expectedObjectClass = [GTLOrkutCommunityMembers class]; + return query; +} + +#pragma mark - +#pragma mark "communityMembers" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForCommunityMembersDeleteWithCommunityId:(NSInteger)communityId + userId:(NSString *)userId { + NSString *methodName = @"orkut.communityMembers.delete"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.userId = userId; + return query; +} + ++ (id)queryForCommunityMembersGetWithCommunityId:(NSInteger)communityId + userId:(NSString *)userId { + NSString *methodName = @"orkut.communityMembers.get"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.userId = userId; + query.expectedObjectClass = [GTLOrkutCommunityMembers class]; + return query; +} + ++ (id)queryForCommunityMembersInsertWithCommunityId:(NSInteger)communityId + userId:(NSString *)userId { + NSString *methodName = @"orkut.communityMembers.insert"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.userId = userId; + query.expectedObjectClass = [GTLOrkutCommunityMembers class]; + return query; +} + ++ (id)queryForCommunityMembersListWithCommunityId:(NSInteger)communityId { + NSString *methodName = @"orkut.communityMembers.list"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.expectedObjectClass = [GTLOrkutCommunityMembersList class]; + return query; +} + +#pragma mark - +#pragma mark "communityMessages" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForCommunityMessagesDeleteWithCommunityId:(NSInteger)communityId + topicId:(long long)topicId + messageId:(long long)messageId { + NSString *methodName = @"orkut.communityMessages.delete"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.topicId = topicId; + query.messageId = messageId; + return query; +} + ++ (id)queryForCommunityMessagesInsertWithObject:(GTLOrkutCommunityMessage *)object + communityId:(NSInteger)communityId + topicId:(long long)topicId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"orkut.communityMessages.insert"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.communityId = communityId; + query.topicId = topicId; + query.expectedObjectClass = [GTLOrkutCommunityMessage class]; + return query; +} + ++ (id)queryForCommunityMessagesListWithCommunityId:(NSInteger)communityId + topicId:(long long)topicId { + NSString *methodName = @"orkut.communityMessages.list"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.topicId = topicId; + query.expectedObjectClass = [GTLOrkutCommunityMessageList class]; + return query; +} + +#pragma mark - +#pragma mark "communityPollComments" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForCommunityPollCommentsInsertWithObject:(GTLOrkutCommunityPollComment *)object + communityId:(NSInteger)communityId + pollId:(NSString *)pollId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"orkut.communityPollComments.insert"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.communityId = communityId; + query.pollId = pollId; + query.expectedObjectClass = [GTLOrkutCommunityPollComment class]; + return query; +} + ++ (id)queryForCommunityPollCommentsListWithCommunityId:(NSInteger)communityId + pollId:(NSString *)pollId { + NSString *methodName = @"orkut.communityPollComments.list"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.pollId = pollId; + query.expectedObjectClass = [GTLOrkutCommunityPollCommentList class]; + return query; +} + +#pragma mark - +#pragma mark "communityPolls" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForCommunityPollsGetWithCommunityId:(NSInteger)communityId + pollId:(NSString *)pollId { + NSString *methodName = @"orkut.communityPolls.get"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.pollId = pollId; + query.expectedObjectClass = [GTLOrkutCommunityPoll class]; + return query; +} + ++ (id)queryForCommunityPollsListWithCommunityId:(NSInteger)communityId { + NSString *methodName = @"orkut.communityPolls.list"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.expectedObjectClass = [GTLOrkutCommunityPollList class]; + return query; +} + +#pragma mark - +#pragma mark "communityPollVotes" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForCommunityPollVotesInsertWithObject:(GTLOrkutCommunityPollVote *)object + communityId:(NSInteger)communityId + pollId:(NSString *)pollId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"orkut.communityPollVotes.insert"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.communityId = communityId; + query.pollId = pollId; + query.expectedObjectClass = [GTLOrkutCommunityPollVote class]; + return query; +} + +#pragma mark - +#pragma mark "communityRelated" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForCommunityRelatedListWithCommunityId:(NSInteger)communityId { + NSString *methodName = @"orkut.communityRelated.list"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.expectedObjectClass = [GTLOrkutCommunityList class]; + return query; +} + +#pragma mark - +#pragma mark "communityTopics" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForCommunityTopicsDeleteWithCommunityId:(NSInteger)communityId + topicId:(long long)topicId { + NSString *methodName = @"orkut.communityTopics.delete"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.topicId = topicId; + return query; +} + ++ (id)queryForCommunityTopicsGetWithCommunityId:(NSInteger)communityId + topicId:(long long)topicId { + NSString *methodName = @"orkut.communityTopics.get"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.topicId = topicId; + query.expectedObjectClass = [GTLOrkutCommunityTopic class]; + return query; +} + ++ (id)queryForCommunityTopicsInsertWithObject:(GTLOrkutCommunityTopic *)object + communityId:(NSInteger)communityId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"orkut.communityTopics.insert"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.communityId = communityId; + query.expectedObjectClass = [GTLOrkutCommunityTopic class]; + return query; +} + ++ (id)queryForCommunityTopicsListWithCommunityId:(NSInteger)communityId { + NSString *methodName = @"orkut.communityTopics.list"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.expectedObjectClass = [GTLOrkutCommunityTopicList class]; + return query; +} + +#pragma mark - +#pragma mark "counters" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForCountersListWithUserId:(NSString *)userId { + NSString *methodName = @"orkut.counters.list"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.userId = userId; + query.expectedObjectClass = [GTLOrkutCounters class]; + return query; +} + +#pragma mark - +#pragma mark "scraps" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForScrapsInsertWithObject:(GTLOrkutActivity *)object { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"orkut.scraps.insert"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.expectedObjectClass = [GTLOrkutActivity class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLServiceOrkut.h.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLServiceOrkut.h.svn-base new file mode 100644 index 0000000..0c1bb1d --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLServiceOrkut.h.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceOrkut.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLServiceOrkut (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceOrkut : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryOrkut.h. The query can the be sent with GTLService's execute methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLServiceOrkut.m.svn-base b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLServiceOrkut.m.svn-base new file mode 100644 index 0000000..8a793f3 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/.svn/text-base/GTLServiceOrkut.m.svn-base @@ -0,0 +1,90 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceOrkut.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLServiceOrkut (0 custom class methods, 0 custom properties) + +#import "GTLOrkut.h" + +@implementation GTLServiceOrkut + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryOrkut class], + [GTLOrkutAcl class], + [GTLOrkutActivity class], + [GTLOrkutActivityList class], + [GTLOrkutActivityobjectsResource class], + [GTLOrkutActivitypersonResource class], + [GTLOrkutAuthorResource class], + [GTLOrkutBadge class], + [GTLOrkutBadgeList class], + [GTLOrkutComment class], + [GTLOrkutCommentList class], + [GTLOrkutCommunity class], + [GTLOrkutCommunityList class], + [GTLOrkutCommunityMembers class], + [GTLOrkutCommunityMembershipStatus class], + [GTLOrkutCommunityMembersList class], + [GTLOrkutCommunityMessage class], + [GTLOrkutCommunityMessageList class], + [GTLOrkutCommunityPoll class], + [GTLOrkutCommunityPollComment class], + [GTLOrkutCommunityPollCommentList class], + [GTLOrkutCommunityPollList class], + [GTLOrkutCommunitypolloptionResource class], + [GTLOrkutCommunityPollVote class], + [GTLOrkutCommunityTopic class], + [GTLOrkutCommunityTopicList class], + [GTLOrkutCounterResource class], + [GTLOrkutCounters class], + [GTLOrkutLinkResource class], + [GTLOrkutVisibility class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v2"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkut.h b/GTL/Source/Services/Orkut/Generated/GTLOrkut.h new file mode 100644 index 0000000..daff43c --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkut.h @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkut.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html + +#import "GTLOrkutConstants.h" + +#import "GTLOrkutAcl.h" +#import "GTLOrkutActivity.h" +#import "GTLOrkutActivityList.h" +#import "GTLOrkutActivityobjectsResource.h" +#import "GTLOrkutActivitypersonResource.h" +#import "GTLOrkutAuthorResource.h" +#import "GTLOrkutBadge.h" +#import "GTLOrkutBadgeList.h" +#import "GTLOrkutComment.h" +#import "GTLOrkutCommentList.h" +#import "GTLOrkutCommunity.h" +#import "GTLOrkutCommunityList.h" +#import "GTLOrkutCommunityMembers.h" +#import "GTLOrkutCommunityMembershipStatus.h" +#import "GTLOrkutCommunityMembersList.h" +#import "GTLOrkutCommunityMessage.h" +#import "GTLOrkutCommunityMessageList.h" +#import "GTLOrkutCommunityPoll.h" +#import "GTLOrkutCommunityPollComment.h" +#import "GTLOrkutCommunityPollCommentList.h" +#import "GTLOrkutCommunityPollList.h" +#import "GTLOrkutCommunitypolloptionResource.h" +#import "GTLOrkutCommunityPollVote.h" +#import "GTLOrkutCommunityTopic.h" +#import "GTLOrkutCommunityTopicList.h" +#import "GTLOrkutCounterResource.h" +#import "GTLOrkutCounters.h" +#import "GTLOrkutLinkResource.h" +#import "GTLOrkutVisibility.h" + +#import "GTLQueryOrkut.h" +#import "GTLServiceOrkut.h" diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutAcl.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutAcl.h new file mode 100644 index 0000000..cdb5d20 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutAcl.h @@ -0,0 +1,82 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutAcl.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutAcl (0 custom class methods, 4 custom properties) +// GTLOrkutAclItemsItem (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutAclItemsItem; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutAcl +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutAcl : GTLCollectionObject + +// Human readable description of the access granted. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The list of ACL entries. +@property (retain) NSArray *items; // of GTLOrkutAclItemsItem + +// Identifies this resource as an access control list. Value: "orkut#acl" +@property (copy) NSString *kind; + +// The total count of participants of the parent resource. +@property (retain) NSNumber *totalParticipants; // intValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutAclItemsItem +// + +@interface GTLOrkutAclItemsItem : GTLObject + +// The ID of the entity. For entities of type "person" or "circle", this is the +// ID of the resource. For other types, this will be unset. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The type of entity to whom access is granted. +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutAcl.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutAcl.m new file mode 100644 index 0000000..6e7e39e --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutAcl.m @@ -0,0 +1,79 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutAcl.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutAcl (0 custom class methods, 4 custom properties) +// GTLOrkutAclItemsItem (0 custom class methods, 2 custom properties) + +#import "GTLOrkutAcl.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutAcl +// + +@implementation GTLOrkutAcl +@dynamic descriptionProperty, items, kind, totalParticipants; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutAclItemsItem class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#acl"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutAclItemsItem +// + +@implementation GTLOrkutAclItemsItem +@dynamic identifier, type; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutActivity.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutActivity.h new file mode 100644 index 0000000..c12cffc --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutActivity.h @@ -0,0 +1,144 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutActivity.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutActivity (0 custom class methods, 10 custom properties) +// GTLOrkutActivityObject (0 custom class methods, 4 custom properties) +// GTLOrkutActivityObjectReplies (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutAcl; +@class GTLOrkutActivityObject; +@class GTLOrkutActivityObjectReplies; +@class GTLOrkutActivityobjectsResource; +@class GTLOrkutAuthorResource; +@class GTLOrkutComment; +@class GTLOrkutLinkResource; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivity +// + +@interface GTLOrkutActivity : GTLObject + +// Identifies who has access to see this activity. +@property (retain) GTLOrkutAcl *access; + +// The person who performed the activity. +@property (retain) GTLOrkutAuthorResource *actor; + +// The ID for the activity. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The kind of activity. Always orkut#activity. +@property (copy) NSString *kind; + +// Links to resources related to this activity. +@property (retain) NSArray *links; // of GTLOrkutLinkResource + +// The activity's object. +@property (retain) GTLOrkutActivityObject *object; + +// The time at which the activity was initially published. +@property (retain) GTLDateTime *published; + +// Title of the activity. +@property (copy) NSString *title; + +// The time at which the activity was last updated. +@property (retain) GTLDateTime *updated; + +// This activity's verb, indicating what action was performed. Possible values +// are: +// - add - User added new content to profile or album, e.g. video, photo. +// - post - User publish content to the stream, e.g. status, scrap. +// - update - User commented on an activity. +// - make-friend - User added a new friend. +// - birthday - User has a birthday. +@property (copy) NSString *verb; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivityObject +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutActivityObject : GTLCollectionObject + +// The HTML-formatted content, suitable for display. When updating an activity's +// content, post the changes to this property, using the value of +// originalContent as a starting point. If the update is successful, the server +// adds HTML formatting and responds with this formatted content. +@property (copy) NSString *content; + +// The list of additional items. +@property (retain) NSArray *items; // of GTLOrkutActivityobjectsResource + +// The type of the object affected by the activity. Clients can use this +// information to style the rendered activity object differently depending on +// the content. +@property (copy) NSString *objectType; + +// Comments in reply to this activity. +@property (retain) GTLOrkutActivityObjectReplies *replies; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivityObjectReplies +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutActivityObjectReplies : GTLCollectionObject + +// The list of comments. +@property (retain) NSArray *items; // of GTLOrkutComment + +// Total number of comments. +@property (retain) NSNumber *totalItems; // unsignedLongLongValue + +// URL for the collection of comments in reply to this activity. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutActivity.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutActivity.m new file mode 100644 index 0000000..2e879fd --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutActivity.m @@ -0,0 +1,105 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutActivity.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutActivity (0 custom class methods, 10 custom properties) +// GTLOrkutActivityObject (0 custom class methods, 4 custom properties) +// GTLOrkutActivityObjectReplies (0 custom class methods, 3 custom properties) + +#import "GTLOrkutActivity.h" + +#import "GTLOrkutAcl.h" +#import "GTLOrkutActivityobjectsResource.h" +#import "GTLOrkutAuthorResource.h" +#import "GTLOrkutComment.h" +#import "GTLOrkutLinkResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivity +// + +@implementation GTLOrkutActivity +@dynamic access, actor, identifier, kind, links, object, published, title, + updated, verb; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutLinkResource class] + forKey:@"links"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#activity"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivityObject +// + +@implementation GTLOrkutActivityObject +@dynamic content, items, objectType, replies; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutActivityobjectsResource class] + forKey:@"items"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivityObjectReplies +// + +@implementation GTLOrkutActivityObjectReplies +@dynamic items, totalItems, url; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutComment class] + forKey:@"items"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutActivityList.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutActivityList.h new file mode 100644 index 0000000..8f97c1a --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutActivityList.h @@ -0,0 +1,61 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutActivityList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutActivityList (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutActivity; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivityList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutActivityList : GTLCollectionObject + +// List of activities retrieved. +@property (retain) NSArray *items; // of GTLOrkutActivity + +// Identifies this resource as a collection of activities. Value: +// "orkut#activityList" +@property (copy) NSString *kind; + +// The value of pageToken query parameter in activities.list request to get the +// next page, if there are more to retrieve. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutActivityList.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutActivityList.m new file mode 100644 index 0000000..58ab60f --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutActivityList.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutActivityList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutActivityList (0 custom class methods, 3 custom properties) + +#import "GTLOrkutActivityList.h" + +#import "GTLOrkutActivity.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivityList +// + +@implementation GTLOrkutActivityList +@dynamic items, kind, nextPageToken; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutActivity class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#activityList"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutActivityobjectsResource.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutActivityobjectsResource.h new file mode 100644 index 0000000..15c3bd2 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutActivityobjectsResource.h @@ -0,0 +1,74 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutActivityobjectsResource.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutActivityobjectsResource (0 custom class methods, 7 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutActivitypersonResource; +@class GTLOrkutCommunity; +@class GTLOrkutLinkResource; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivityobjectsResource +// + +@interface GTLOrkutActivityobjectsResource : GTLObject + +// The community which is related with this activity, e.g. a joined community. +@property (retain) GTLOrkutCommunity *community; + +// The HTML-formatted content, suitable for display. When updating an activity's +// content, post the changes to this property, using the value of +// originalContent as a starting point. If the update is successful, the server +// adds HTML formatting and responds with this formatted content. +@property (copy) NSString *content; + +// The title of the object. +@property (copy) NSString *displayName; + +// The ID for the object. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Links to other resources related to this object. +@property (retain) NSArray *links; // of GTLOrkutLinkResource + +// The object type. +@property (copy) NSString *objectType; + +// The person who is related with this activity, e.g. an Added User. +@property (retain) GTLOrkutActivitypersonResource *person; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutActivityobjectsResource.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutActivityobjectsResource.m new file mode 100644 index 0000000..1385b54 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutActivityobjectsResource.m @@ -0,0 +1,60 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutActivityobjectsResource.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutActivityobjectsResource (0 custom class methods, 7 custom properties) + +#import "GTLOrkutActivityobjectsResource.h" + +#import "GTLOrkutActivitypersonResource.h" +#import "GTLOrkutCommunity.h" +#import "GTLOrkutLinkResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivityobjectsResource +// + +@implementation GTLOrkutActivityobjectsResource +@dynamic community, content, displayName, identifier, links, objectType, person; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutLinkResource class] + forKey:@"links"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutActivitypersonResource.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutActivitypersonResource.h new file mode 100644 index 0000000..1b4b440 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutActivitypersonResource.h @@ -0,0 +1,100 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutActivitypersonResource.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutActivitypersonResource (0 custom class methods, 6 custom properties) +// GTLOrkutActivitypersonResourceImage (0 custom class methods, 1 custom properties) +// GTLOrkutActivitypersonResourceName (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutActivitypersonResourceImage; +@class GTLOrkutActivitypersonResourceName; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivitypersonResource +// + +@interface GTLOrkutActivitypersonResource : GTLObject + +// The person's date of birth, represented as YYYY-MM-DD. +@property (copy) NSString *birthday; + +// The person's gender. Values include "male", "female", and "other". +@property (copy) NSString *gender; + +// The person's opensocial ID. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The person's profile photo. This is adapted from Google+ and was originaly +// introduced as extra OpenSocial convenience fields. +@property (retain) GTLOrkutActivitypersonResourceImage *image; + +// An object that encapsulates the individual components of a person's name. +@property (retain) GTLOrkutActivitypersonResourceName *name; + +// The person's profile url. This is adapted from Google+ and was originaly +// introduced as extra OpenSocial convenience fields. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivitypersonResourceImage +// + +@interface GTLOrkutActivitypersonResourceImage : GTLObject + +// The URL of the person's profile photo. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivitypersonResourceName +// + +@interface GTLOrkutActivitypersonResourceName : GTLObject + +// The family name (last name) of this person. +@property (copy) NSString *familyName; + +// The given name (first name) of this person. +@property (copy) NSString *givenName; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutActivitypersonResource.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutActivitypersonResource.m new file mode 100644 index 0000000..a267928 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutActivitypersonResource.m @@ -0,0 +1,71 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutActivitypersonResource.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutActivitypersonResource (0 custom class methods, 6 custom properties) +// GTLOrkutActivitypersonResourceImage (0 custom class methods, 1 custom properties) +// GTLOrkutActivitypersonResourceName (0 custom class methods, 2 custom properties) + +#import "GTLOrkutActivitypersonResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivitypersonResource +// + +@implementation GTLOrkutActivitypersonResource +@dynamic birthday, gender, identifier, image, name, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivitypersonResourceImage +// + +@implementation GTLOrkutActivitypersonResourceImage +@dynamic url; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutActivitypersonResourceName +// + +@implementation GTLOrkutActivitypersonResourceName +@dynamic familyName, givenName; +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutAuthorResource.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutAuthorResource.h new file mode 100644 index 0000000..8fb58f9 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutAuthorResource.h @@ -0,0 +1,75 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutAuthorResource.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutAuthorResource (0 custom class methods, 4 custom properties) +// GTLOrkutAuthorResourceImage (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutAuthorResourceImage; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutAuthorResource +// + +@interface GTLOrkutAuthorResource : GTLObject + +// The name of the author, suitable for display. +@property (copy) NSString *displayName; + +// Unique identifier of the person who posted the comment. This is the person's +// OpenSocial ID. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Image data about the author. +@property (retain) GTLOrkutAuthorResourceImage *image; + +// The URL of the author who posted the comment [not yet implemented] +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutAuthorResourceImage +// + +@interface GTLOrkutAuthorResourceImage : GTLObject + +// A URL that points to a thumbnail photo of the author. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutAuthorResource.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutAuthorResource.m new file mode 100644 index 0000000..6ec5abf --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutAuthorResource.m @@ -0,0 +1,60 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutAuthorResource.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutAuthorResource (0 custom class methods, 4 custom properties) +// GTLOrkutAuthorResourceImage (0 custom class methods, 1 custom properties) + +#import "GTLOrkutAuthorResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutAuthorResource +// + +@implementation GTLOrkutAuthorResource +@dynamic displayName, identifier, image, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutAuthorResourceImage +// + +@implementation GTLOrkutAuthorResourceImage +@dynamic url; +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutBadge.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutBadge.h new file mode 100644 index 0000000..7305d98 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutBadge.h @@ -0,0 +1,74 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutBadge.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutBadge (0 custom class methods, 9 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLOrkutBadge +// + +@interface GTLOrkutBadge : GTLObject + +// The URL for the 64x64 badge logo. +@property (copy) NSString *badgeLargeLogo; + +// The URL for the 24x24 badge logo. +@property (copy) NSString *badgeSmallLogo; + +// The name of the badge, suitable for display. +@property (copy) NSString *caption; + +// The description for the badge, suitable for display. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The unique ID for the badge. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +// Identifies this resource as a badge. Value: "orkut#badge" +@property (copy) NSString *kind; + +// The URL for the 32x32 badge sponsor logo. +@property (copy) NSString *sponsorLogo; + +// The name of the badge sponsor, suitable for display. +@property (copy) NSString *sponsorName; + +// The URL for the badge sponsor. +@property (copy) NSString *sponsorUrl; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutBadge.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutBadge.m new file mode 100644 index 0000000..c7f71d1 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutBadge.m @@ -0,0 +1,56 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutBadge.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutBadge (0 custom class methods, 9 custom properties) + +#import "GTLOrkutBadge.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutBadge +// + +@implementation GTLOrkutBadge +@dynamic badgeLargeLogo, badgeSmallLogo, caption, descriptionProperty, + identifier, kind, sponsorLogo, sponsorName, sponsorUrl; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#badge"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutBadgeList.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutBadgeList.h new file mode 100644 index 0000000..e930742 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutBadgeList.h @@ -0,0 +1,56 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutBadgeList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutBadgeList (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutBadge; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutBadgeList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutBadgeList : GTLCollectionObject + +// List of badges retrieved. +@property (retain) NSArray *items; // of GTLOrkutBadge + +// Identifies this resource as a collection of badges. Value: "orkut#badgeList" +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutBadgeList.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutBadgeList.m new file mode 100644 index 0000000..779b1a6 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutBadgeList.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutBadgeList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutBadgeList (0 custom class methods, 2 custom properties) + +#import "GTLOrkutBadgeList.h" + +#import "GTLOrkutBadge.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutBadgeList +// + +@implementation GTLOrkutBadgeList +@dynamic items, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutBadge class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#badgeList"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutComment.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutComment.h new file mode 100644 index 0000000..9eccee6 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutComment.h @@ -0,0 +1,95 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutComment.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutComment (0 custom class methods, 7 custom properties) +// GTLOrkutCommentInReplyTo (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutAuthorResource; +@class GTLOrkutCommentInReplyTo; +@class GTLOrkutLinkResource; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutComment +// + +@interface GTLOrkutComment : GTLObject + +// The person who posted the comment. +@property (retain) GTLOrkutAuthorResource *actor; + +// The content of the comment in text/html +@property (copy) NSString *content; + +// The unique ID for the comment. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Link to the original activity where this comment was posted. +@property (retain) GTLOrkutCommentInReplyTo *inReplyTo; + +// Identifies this resource as a comment. Value: "orkut#comment" +@property (copy) NSString *kind; + +// List of resources for the comment. +@property (retain) NSArray *links; // of GTLOrkutLinkResource + +// The time the comment was initially published, in RFC 3339 format. +@property (retain) GTLDateTime *published; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommentInReplyTo +// + +@interface GTLOrkutCommentInReplyTo : GTLObject + +// Link to the post on activity stream being commented. +@property (copy) NSString *href; + +// Unique identifier of the post on activity stream being commented. +@property (copy) NSString *ref; + +// Relationship between the comment and the post on activity stream being +// commented. Always inReplyTo. +@property (copy) NSString *rel; + +// Type of the post on activity stream being commented. Always text/html. +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutComment.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutComment.m new file mode 100644 index 0000000..431fa07 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutComment.m @@ -0,0 +1,74 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutComment.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutComment (0 custom class methods, 7 custom properties) +// GTLOrkutCommentInReplyTo (0 custom class methods, 4 custom properties) + +#import "GTLOrkutComment.h" + +#import "GTLOrkutAuthorResource.h" +#import "GTLOrkutLinkResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutComment +// + +@implementation GTLOrkutComment +@dynamic actor, content, identifier, inReplyTo, kind, links, published; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutLinkResource class] + forKey:@"links"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#comment"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommentInReplyTo +// + +@implementation GTLOrkutCommentInReplyTo +@dynamic href, ref, rel, type; +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommentList.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommentList.h new file mode 100644 index 0000000..ee4d2f9 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommentList.h @@ -0,0 +1,65 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommentList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommentList (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutComment; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommentList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutCommentList : GTLCollectionObject + +// List of comments retrieved. +@property (retain) NSArray *items; // of GTLOrkutComment + +// Identifies this resource as a collection of comments. Value: +// "orkut#commentList" +@property (copy) NSString *kind; + +// The value of pageToken query parameter in comments.list request to get the +// next page, if there are more to retrieve. +@property (copy) NSString *nextPageToken; + +// The value of pageToken query parameter in comments.list request to get the +// previous page, if there are more to retrieve. +@property (copy) NSString *previousPageToken; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommentList.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommentList.m new file mode 100644 index 0000000..62dbdb7 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommentList.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommentList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommentList (0 custom class methods, 4 custom properties) + +#import "GTLOrkutCommentList.h" + +#import "GTLOrkutComment.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommentList +// + +@implementation GTLOrkutCommentList +@dynamic items, kind, nextPageToken, previousPageToken; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutComment class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#commentList"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunity.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunity.h new file mode 100644 index 0000000..89163c6 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunity.h @@ -0,0 +1,93 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunity.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunity (0 custom class methods, 14 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutAuthorResource; +@class GTLOrkutLinkResource; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunity +// + +@interface GTLOrkutCommunity : GTLObject + +// The category of the community. +@property (copy) NSString *category; + +// The co-owners of the community. +@property (retain) NSArray *coOwners; // of GTLOrkutAuthorResource + +// The time the community was created, in RFC 3339 format. +@property (retain) GTLDateTime *creationDate; + +// The description of the community. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The id of the community. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // intValue + +// Identifies this resource as a community. Value: "orkut#community" +@property (copy) NSString *kind; + +// The official language of the community. +@property (copy) NSString *language; + +// List of resources for the community. +@property (retain) NSArray *links; // of GTLOrkutLinkResource + +// The location of the community. +@property (copy) NSString *location; + +// The number of users who are part of the community. This number may be +// approximate, so do not rely on it for iteration. +@property (retain) NSNumber *memberCount; // intValue + +// The list of moderators of the community. +@property (retain) NSArray *moderators; // of GTLOrkutAuthorResource + +// The name of the community. +@property (copy) NSString *name; + +// The person who owns the community. +@property (retain) GTLOrkutAuthorResource *owner; + +// The photo of the community. +@property (copy) NSString *photoUrl; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunity.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunity.m new file mode 100644 index 0000000..59119c6 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunity.m @@ -0,0 +1,74 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunity.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunity (0 custom class methods, 14 custom properties) + +#import "GTLOrkutCommunity.h" + +#import "GTLOrkutAuthorResource.h" +#import "GTLOrkutLinkResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunity +// + +@implementation GTLOrkutCommunity +@dynamic category, coOwners, creationDate, descriptionProperty, identifier, + kind, language, links, location, memberCount, moderators, name, owner, + photoUrl; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"co_owners", @"coOwners", + @"creation_date", @"creationDate", + @"description", @"descriptionProperty", + @"id", @"identifier", + @"member_count", @"memberCount", + @"photo_url", @"photoUrl", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLOrkutAuthorResource class], @"co_owners", + [GTLOrkutLinkResource class], @"links", + [GTLOrkutAuthorResource class], @"moderators", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#community"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityList.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityList.h new file mode 100644 index 0000000..41844fb --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityList.h @@ -0,0 +1,57 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityList (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutCommunity; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutCommunityList : GTLCollectionObject + +// List of communities retrieved. +@property (retain) NSArray *items; // of GTLOrkutCommunity + +// Identifies this resource as a collection of communities. Value: +// "orkut#communityList" +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityList.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityList.m new file mode 100644 index 0000000..f1c97d5 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityList.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityList (0 custom class methods, 2 custom properties) + +#import "GTLOrkutCommunityList.h" + +#import "GTLOrkutCommunity.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityList +// + +@implementation GTLOrkutCommunityList +@dynamic items, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutCommunity class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#communityList"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMembers.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMembers.h new file mode 100644 index 0000000..495acc7 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMembers.h @@ -0,0 +1,57 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityMembers.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityMembers (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutActivitypersonResource; +@class GTLOrkutCommunityMembershipStatus; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityMembers +// + +@interface GTLOrkutCommunityMembers : GTLObject + +// Status and permissions of the user related to the community. +@property (retain) GTLOrkutCommunityMembershipStatus *communityMembershipStatus; + +// Kind of this item. Always orkut#communityMembers. +@property (copy) NSString *kind; + +// Description of the community member. +@property (retain) GTLOrkutActivitypersonResource *person; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMembers.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMembers.m new file mode 100644 index 0000000..d2cb77d --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMembers.m @@ -0,0 +1,49 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityMembers.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityMembers (0 custom class methods, 3 custom properties) + +#import "GTLOrkutCommunityMembers.h" + +#import "GTLOrkutActivitypersonResource.h" +#import "GTLOrkutCommunityMembershipStatus.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityMembers +// + +@implementation GTLOrkutCommunityMembers +@dynamic communityMembershipStatus, kind, person; + ++ (void)load { + [self registerObjectClassForKind:@"orkut#communityMembers"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMembersList.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMembersList.h new file mode 100644 index 0000000..1a7520a --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMembersList.h @@ -0,0 +1,72 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityMembersList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityMembersList (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutCommunityMembers; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityMembersList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutCommunityMembersList : GTLCollectionObject + +// The value of pageToken query parameter in community_members.list request to +// get the first page. +@property (copy) NSString *firstPageToken; + +// List of community members retrieved. +@property (retain) NSArray *items; // of GTLOrkutCommunityMembers + +// Kind of this item. Always orkut#communityMembersList. +@property (copy) NSString *kind; + +// The value of pageToken query parameter in community_members.list request to +// get the last page. +@property (copy) NSString *lastPageToken; + +// The value of pageToken query parameter in community_members.list request to +// get the next page, if there are more to retrieve. +@property (copy) NSString *nextPageToken; + +// The value of pageToken query parameter in community_members.list request to +// get the previous page, if there are more to retrieve. +@property (copy) NSString *prevPageToken; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMembersList.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMembersList.m new file mode 100644 index 0000000..364f275 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMembersList.m @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityMembersList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityMembersList (0 custom class methods, 6 custom properties) + +#import "GTLOrkutCommunityMembersList.h" + +#import "GTLOrkutCommunityMembers.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityMembersList +// + +@implementation GTLOrkutCommunityMembersList +@dynamic firstPageToken, items, kind, lastPageToken, nextPageToken, + prevPageToken; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutCommunityMembers class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#communityMembersList"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMembershipStatus.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMembershipStatus.h new file mode 100644 index 0000000..ebc41a0 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMembershipStatus.h @@ -0,0 +1,78 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityMembershipStatus.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityMembershipStatus (0 custom class methods, 11 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityMembershipStatus +// + +@interface GTLOrkutCommunityMembershipStatus : GTLObject + +// Whether the user can create a poll in this community. +@property (retain) NSNumber *canCreatePoll; // boolValue + +// Whether the user can create a topic in this community. +@property (retain) NSNumber *canCreateTopic; // boolValue + +// Whether the user can perform a shout operation in this community. +@property (retain) NSNumber *canShout; // boolValue + +// Whether the session user is a community co-owner. +@property (retain) NSNumber *isCoOwner; // boolValue + +// Whether the user is following this community. +@property (retain) NSNumber *isFollowing; // boolValue + +// Whether the session user is a community moderator. +@property (retain) NSNumber *isModerator; // boolValue + +// Whether the session user is the community owner. +@property (retain) NSNumber *isOwner; // boolValue + +// Whether the restore operation is available for the community. +@property (retain) NSNumber *isRestoreAvailable; // boolValue + +// Whether the take-back operation is available for the community. +@property (retain) NSNumber *isTakebackAvailable; // boolValue + +// Kind of this item. Always orkut#communityMembershipStatus. +@property (copy) NSString *kind; + +// The status of the current link between the community and the user. +@property (copy) NSString *status; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMembershipStatus.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMembershipStatus.m new file mode 100644 index 0000000..661d1c8 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMembershipStatus.m @@ -0,0 +1,48 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityMembershipStatus.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityMembershipStatus (0 custom class methods, 11 custom properties) + +#import "GTLOrkutCommunityMembershipStatus.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityMembershipStatus +// + +@implementation GTLOrkutCommunityMembershipStatus +@dynamic canCreatePoll, canCreateTopic, canShout, isCoOwner, isFollowing, + isModerator, isOwner, isRestoreAvailable, isTakebackAvailable, kind, + status; + ++ (void)load { + [self registerObjectClassForKind:@"orkut#communityMembershipStatus"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMessage.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMessage.h new file mode 100644 index 0000000..87f5b28 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMessage.h @@ -0,0 +1,75 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityMessage.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityMessage (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutAuthorResource; +@class GTLOrkutLinkResource; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityMessage +// + +@interface GTLOrkutCommunityMessage : GTLObject + +// The timestamp of the date when the message was added, in RFC 3339 format. +@property (retain) GTLDateTime *addedDate; + +// The creator of the message. If ommited, the message is annonimous. +@property (retain) GTLOrkutAuthorResource *author; + +// The body of the message. +@property (copy) NSString *body; + +// The ID of the message. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +// Whether this post was marked as spam by the viewer, when he/she is not the +// community owner or one of its moderators. +@property (retain) NSNumber *isSpam; // boolValue + +// Identifies this resource as a community message. Value: +// "orkut#communityMessage" +@property (copy) NSString *kind; + +// List of resources for the community message. +@property (retain) NSArray *links; // of GTLOrkutLinkResource + +// The subject of the message. +@property (copy) NSString *subject; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMessage.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMessage.m new file mode 100644 index 0000000..f6e9e50 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMessage.m @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityMessage.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityMessage (0 custom class methods, 8 custom properties) + +#import "GTLOrkutCommunityMessage.h" + +#import "GTLOrkutAuthorResource.h" +#import "GTLOrkutLinkResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityMessage +// + +@implementation GTLOrkutCommunityMessage +@dynamic addedDate, author, body, identifier, isSpam, kind, links, subject; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutLinkResource class] + forKey:@"links"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#communityMessage"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMessageList.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMessageList.h new file mode 100644 index 0000000..006a8c8 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMessageList.h @@ -0,0 +1,73 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityMessageList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityMessageList (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutCommunityMessage; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityMessageList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutCommunityMessageList : GTLCollectionObject + +// The value of pageToken query parameter in community_messages.list request to +// get the first page. +@property (copy) NSString *firstPageToken; + +// List of messages retrieved. +@property (retain) NSArray *items; // of GTLOrkutCommunityMessage + +// Identifies this resource as a collection of community messages. Value: +// "orkut#communityMessageList" +@property (copy) NSString *kind; + +// The value of pageToken query parameter in community_messages.list request to +// get the last page. +@property (copy) NSString *lastPageToken; + +// The value of pageToken query parameter in community_messages.list request to +// get the next page, if there are more to retrieve. +@property (copy) NSString *nextPageToken; + +// The value of pageToken query parameter in community_messages.list request to +// get the previous page, if there are more to retrieve. +@property (copy) NSString *prevPageToken; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMessageList.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMessageList.m new file mode 100644 index 0000000..808e282 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityMessageList.m @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityMessageList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityMessageList (0 custom class methods, 6 custom properties) + +#import "GTLOrkutCommunityMessageList.h" + +#import "GTLOrkutCommunityMessage.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityMessageList +// + +@implementation GTLOrkutCommunityMessageList +@dynamic firstPageToken, items, kind, lastPageToken, nextPageToken, + prevPageToken; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutCommunityMessage class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#communityMessageList"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPoll.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPoll.h new file mode 100644 index 0000000..ab69aa0 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPoll.h @@ -0,0 +1,142 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityPoll.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityPoll (0 custom class methods, 22 custom properties) +// GTLOrkutCommunityPollImage (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutAuthorResource; +@class GTLOrkutCommunityPollImage; +@class GTLOrkutCommunitypolloptionResource; +@class GTLOrkutLinkResource; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityPoll +// + +@interface GTLOrkutCommunityPoll : GTLObject + +// The person who created the poll. +@property (retain) GTLOrkutAuthorResource *author; + +// The ID of the community. +@property (retain) NSNumber *communityId; // intValue + +// The date of creation of this poll +@property (retain) GTLDateTime *creationTime; + +// The poll description. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The ending date of this poll or empty if the poll doesn't have one. +@property (retain) GTLDateTime *endingTime; + +// Whether the user has voted on this poll. +@property (retain) NSNumber *hasVoted; // boolValue + +// The poll ID. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The image representing the poll. Field is omitted if no image exists. +@property (retain) GTLOrkutCommunityPollImage *image; + +// Whether the poll is not expired if there is an expiration date. A poll is +// open (that is, not closed for voting) if it either is not expired or doesn't +// have an expiration date at all. Note that just because a poll is open, it +// doesn't mean that the requester can vote on it. +@property (retain) NSNumber *isClosed; // boolValue + +// Whether this poll allows voting for more than one option. +@property (retain) NSNumber *isMultipleAnswers; // boolValue + +// Whether this poll is still opened for voting. A poll is open for voting if it +// is not closed, the user has not yet voted on it and the user has the +// permission to do so, which happens if he/she is either a community member or +// the poll is open for everybody. +@property (retain) NSNumber *isOpenForVoting; // boolValue + +// Whether this poll is restricted for members only. If a poll is open but the +// user can't vote on it, it's been restricted to members only. This information +// is important to tell this case apart from the one where the user can't vote +// simply because the poll is already closed. +@property (retain) NSNumber *isRestricted; // boolValue + +// Whether the user has marked this poll as spam. This only affects the poll for +// this user, not globally. +@property (retain) NSNumber *isSpam; // boolValue + +// If user has already voted, whether his vote is publicly visible. +@property (retain) NSNumber *isUsersVotePublic; // boolValue + +// Whether non-members of the community can vote on the poll. +@property (retain) NSNumber *isVotingAllowedForNonMembers; // boolValue + +// Identifies this resource as a community poll. Value: "orkut#communityPoll" +@property (copy) NSString *kind; + +// The date of the last update of this poll. +@property (retain) GTLDateTime *lastUpdate; + +// List of resources for the community poll. +@property (retain) NSArray *links; // of GTLOrkutLinkResource + +// List of options of this poll. +@property (retain) NSArray *options; // of GTLOrkutCommunitypolloptionResource + +// The poll question. +@property (copy) NSString *question; + +// The total number of votes this poll has received. +@property (retain) NSNumber *totalNumberOfVotes; // intValue + +// List of options the user has voted on, if there are any. +@property (retain) NSArray *votedOptions; // of NSNumber (intValue) + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityPollImage +// + +@interface GTLOrkutCommunityPollImage : GTLObject + +// A URL that points to an image of the poll. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPoll.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPoll.m new file mode 100644 index 0000000..7dda5db --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPoll.m @@ -0,0 +1,84 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityPoll.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityPoll (0 custom class methods, 22 custom properties) +// GTLOrkutCommunityPollImage (0 custom class methods, 1 custom properties) + +#import "GTLOrkutCommunityPoll.h" + +#import "GTLOrkutAuthorResource.h" +#import "GTLOrkutCommunitypolloptionResource.h" +#import "GTLOrkutLinkResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityPoll +// + +@implementation GTLOrkutCommunityPoll +@dynamic author, communityId, creationTime, descriptionProperty, endingTime, + hasVoted, identifier, image, isClosed, isMultipleAnswers, + isOpenForVoting, isRestricted, isSpam, isUsersVotePublic, + isVotingAllowedForNonMembers, kind, lastUpdate, links, options, + question, totalNumberOfVotes, votedOptions; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"description", @"descriptionProperty", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLOrkutLinkResource class], @"links", + [GTLOrkutCommunitypolloptionResource class], @"options", + [NSNumber class], @"votedOptions", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#communityPoll"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityPollImage +// + +@implementation GTLOrkutCommunityPollImage +@dynamic url; +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPollComment.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPollComment.h new file mode 100644 index 0000000..59a5c0b --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPollComment.h @@ -0,0 +1,64 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityPollComment.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityPollComment (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutAuthorResource; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityPollComment +// + +@interface GTLOrkutCommunityPollComment : GTLObject + +// The date when the message was added, in RFC 3339 format. +@property (retain) GTLDateTime *addedDate; + +// The creator of the comment. +@property (retain) GTLOrkutAuthorResource *author; + +// The body of the message. +@property (copy) NSString *body; + +// The ID of the comment. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // intValue + +// Identifies this resource as a community poll comment. Value: +// "orkut#communityPollComment" +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPollComment.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPollComment.m new file mode 100644 index 0000000..4a9e8b9 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPollComment.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityPollComment.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityPollComment (0 custom class methods, 5 custom properties) + +#import "GTLOrkutCommunityPollComment.h" + +#import "GTLOrkutAuthorResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityPollComment +// + +@implementation GTLOrkutCommunityPollComment +@dynamic addedDate, author, body, identifier, kind; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#communityPollComment"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPollCommentList.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPollCommentList.h new file mode 100644 index 0000000..91b4d9d --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPollCommentList.h @@ -0,0 +1,73 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityPollCommentList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityPollCommentList (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutCommunityPollComment; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityPollCommentList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutCommunityPollCommentList : GTLCollectionObject + +// The value of pageToken query parameter in community_poll_comments.list +// request to get the first page. +@property (copy) NSString *firstPageToken; + +// List of community poll comments retrieved. +@property (retain) NSArray *items; // of GTLOrkutCommunityPollComment + +// Identifies this resource as a collection of community poll comments. Value: +// "orkut#CommunityPollCommentList" +@property (copy) NSString *kind; + +// The value of pageToken query parameter in community_poll_comments.list +// request to get the last page. +@property (copy) NSString *lastPageToken; + +// The value of pageToken query parameter in community_poll_comments.list +// request to get the next page, if there are more to retrieve. +@property (copy) NSString *nextPageToken; + +// The value of pageToken query parameter in community_poll_comments.list +// request to get the previous page, if there are more to retrieve. +@property (copy) NSString *prevPageToken; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPollCommentList.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPollCommentList.m new file mode 100644 index 0000000..ef557f1 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPollCommentList.m @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityPollCommentList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityPollCommentList (0 custom class methods, 6 custom properties) + +#import "GTLOrkutCommunityPollCommentList.h" + +#import "GTLOrkutCommunityPollComment.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityPollCommentList +// + +@implementation GTLOrkutCommunityPollCommentList +@dynamic firstPageToken, items, kind, lastPageToken, nextPageToken, + prevPageToken; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutCommunityPollComment class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#CommunityPollCommentList"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPollList.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPollList.h new file mode 100644 index 0000000..2c0cd95 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPollList.h @@ -0,0 +1,73 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityPollList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityPollList (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutCommunityPoll; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityPollList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutCommunityPollList : GTLCollectionObject + +// The value of pageToken query parameter in community_polls.list request to get +// the first page. +@property (copy) NSString *firstPageToken; + +// List of community polls retrieved. +@property (retain) NSArray *items; // of GTLOrkutCommunityPoll + +// Identifies this resource as a collection of community polls. Value: +// "orkut#communityPollList" +@property (copy) NSString *kind; + +// The value of pageToken query parameter in community_polls.list request to get +// the last page. +@property (copy) NSString *lastPageToken; + +// The value of pageToken query parameter in community_polls.list request to get +// the next page, if there are more to retrieve. +@property (copy) NSString *nextPageToken; + +// The value of pageToken query parameter in community_polls.list request to get +// the previous page, if there are more to retrieve. +@property (copy) NSString *prevPageToken; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPollList.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPollList.m new file mode 100644 index 0000000..385ee18 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPollList.m @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityPollList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityPollList (0 custom class methods, 6 custom properties) + +#import "GTLOrkutCommunityPollList.h" + +#import "GTLOrkutCommunityPoll.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityPollList +// + +@implementation GTLOrkutCommunityPollList +@dynamic firstPageToken, items, kind, lastPageToken, nextPageToken, + prevPageToken; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutCommunityPoll class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#communityPollList"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPollVote.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPollVote.h new file mode 100644 index 0000000..ca55f92 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPollVote.h @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityPollVote.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityPollVote (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityPollVote +// + +@interface GTLOrkutCommunityPollVote : GTLObject + +// Whether this vote is visible to other users or not. +@property (retain) NSNumber *isVotevisible; // boolValue + +// Identifies this resource as a community poll vote. Value: +// "orkut#communityPollVote" +@property (copy) NSString *kind; + +// The ids of the voted options. +@property (retain) NSArray *optionIds; // of NSNumber (intValue) + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPollVote.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPollVote.m new file mode 100644 index 0000000..0ae0ab8 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityPollVote.m @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityPollVote.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityPollVote (0 custom class methods, 3 custom properties) + +#import "GTLOrkutCommunityPollVote.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityPollVote +// + +@implementation GTLOrkutCommunityPollVote +@dynamic isVotevisible, kind, optionIds; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSNumber class] + forKey:@"optionIds"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#communityPollVote"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityTopic.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityTopic.h new file mode 100644 index 0000000..ea3951f --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityTopic.h @@ -0,0 +1,83 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityTopic.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityTopic (0 custom class methods, 11 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutAuthorResource; +@class GTLOrkutCommunityMessage; +@class GTLOrkutLinkResource; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityTopic +// + +@interface GTLOrkutCommunityTopic : GTLObject + +// The creator of the topic. +@property (retain) GTLOrkutAuthorResource *author; + +// The body of the topic. +@property (copy) NSString *body; + +// The ID of the topic. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) NSNumber *identifier; // longLongValue + +// Whether the topic is closed for new messages. +@property (retain) NSNumber *isClosed; // boolValue + +// Identifies this resource as a community topic. Value: "orkut#communityTopic" +@property (copy) NSString *kind; + +// The timestamp of the last update, in RFC 3339 format. +@property (retain) GTLDateTime *lastUpdate; + +// Snippet of the last message posted on this topic. +@property (copy) NSString *latestMessageSnippet; + +// List of resources for the community. +@property (retain) NSArray *links; // of GTLOrkutLinkResource + +// Most recent messages. +@property (retain) NSArray *messages; // of GTLOrkutCommunityMessage + +// The total number of replies this topic has received. +@property (retain) NSNumber *numberOfReplies; // intValue + +// The title of the topic. +@property (copy) NSString *title; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityTopic.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityTopic.m new file mode 100644 index 0000000..beb7fe4 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityTopic.m @@ -0,0 +1,67 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityTopic.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityTopic (0 custom class methods, 11 custom properties) + +#import "GTLOrkutCommunityTopic.h" + +#import "GTLOrkutAuthorResource.h" +#import "GTLOrkutCommunityMessage.h" +#import "GTLOrkutLinkResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityTopic +// + +@implementation GTLOrkutCommunityTopic +@dynamic author, body, identifier, isClosed, kind, lastUpdate, + latestMessageSnippet, links, messages, numberOfReplies, title; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLOrkutLinkResource class], @"links", + [GTLOrkutCommunityMessage class], @"messages", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#communityTopic"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityTopicList.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityTopicList.h new file mode 100644 index 0000000..a1898f8 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityTopicList.h @@ -0,0 +1,73 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityTopicList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityTopicList (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutCommunityTopic; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityTopicList +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutCommunityTopicList : GTLCollectionObject + +// The value of pageToken query parameter in community_topic.list request to get +// the first page. +@property (copy) NSString *firstPageToken; + +// List of topics retrieved. +@property (retain) NSArray *items; // of GTLOrkutCommunityTopic + +// Identifies this resource as a collection of community topics. Value: +// "orkut#communityTopicList" +@property (copy) NSString *kind; + +// The value of pageToken query parameter in community_topic.list request to get +// the last page. +@property (copy) NSString *lastPageToken; + +// The value of pageToken query parameter in community_topic.list request to get +// the next page, if there are more to retrieve. +@property (copy) NSString *nextPageToken; + +// The value of pageToken query parameter in community_topic.list request to get +// the previous page, if there are more to retrieve. +@property (copy) NSString *prevPageToken; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityTopicList.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityTopicList.m new file mode 100644 index 0000000..de51ef7 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunityTopicList.m @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunityTopicList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunityTopicList (0 custom class methods, 6 custom properties) + +#import "GTLOrkutCommunityTopicList.h" + +#import "GTLOrkutCommunityTopic.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunityTopicList +// + +@implementation GTLOrkutCommunityTopicList +@dynamic firstPageToken, items, kind, lastPageToken, nextPageToken, + prevPageToken; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutCommunityTopic class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#communityTopicList"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunitypolloptionResource.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunitypolloptionResource.h new file mode 100644 index 0000000..98ccbf3 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunitypolloptionResource.h @@ -0,0 +1,74 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunitypolloptionResource.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunitypolloptionResource (0 custom class methods, 4 custom properties) +// GTLOrkutCommunitypolloptionResourceImage (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutCommunitypolloptionResourceImage; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunitypolloptionResource +// + +@interface GTLOrkutCommunitypolloptionResource : GTLObject + +// The option description. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Image data about the poll option. Field is omitted if no image exists. +@property (retain) GTLOrkutCommunitypolloptionResourceImage *image; + +// The total number of votes that this option received. +@property (retain) NSNumber *numberOfVotes; // intValue + +// The poll option ID +@property (retain) NSNumber *optionId; // intValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunitypolloptionResourceImage +// + +@interface GTLOrkutCommunitypolloptionResourceImage : GTLObject + +// A URL that points to an image of the poll question. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunitypolloptionResource.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunitypolloptionResource.m new file mode 100644 index 0000000..be9397e --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCommunitypolloptionResource.m @@ -0,0 +1,60 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCommunitypolloptionResource.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCommunitypolloptionResource (0 custom class methods, 4 custom properties) +// GTLOrkutCommunitypolloptionResourceImage (0 custom class methods, 1 custom properties) + +#import "GTLOrkutCommunitypolloptionResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunitypolloptionResource +// + +@implementation GTLOrkutCommunitypolloptionResource +@dynamic descriptionProperty, image, numberOfVotes, optionId; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCommunitypolloptionResourceImage +// + +@implementation GTLOrkutCommunitypolloptionResourceImage +@dynamic url; +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutConstants.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutConstants.h new file mode 100644 index 0000000..8ab1061 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutConstants.h @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// Manage your Orkut activity +GTL_EXTERN NSString * const kGTLAuthScopeOrkut; // "https://www.googleapis.com/auth/orkut" +// View your Orkut data +GTL_EXTERN NSString * const kGTLAuthScopeOrkutReadonly; // "https://www.googleapis.com/auth/orkut.readonly" + +// Collection +GTL_EXTERN NSString * const kGTLOrkutCollectionAll; // "all" +GTL_EXTERN NSString * const kGTLOrkutCollectionScraps; // "scraps" +GTL_EXTERN NSString * const kGTLOrkutCollectionStream; // "stream" + +// OrderBy +GTL_EXTERN NSString * const kGTLOrkutOrderByAscending; // "ascending" +GTL_EXTERN NSString * const kGTLOrkutOrderByDescending; // "descending" +GTL_EXTERN NSString * const kGTLOrkutOrderById; // "id" +GTL_EXTERN NSString * const kGTLOrkutOrderByRanked; // "ranked" diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutConstants.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutConstants.m new file mode 100644 index 0000000..f63a6b2 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutConstants.m @@ -0,0 +1,45 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html + +#import "GTLOrkutConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeOrkut = @"https://www.googleapis.com/auth/orkut"; +NSString * const kGTLAuthScopeOrkutReadonly = @"https://www.googleapis.com/auth/orkut.readonly"; + +// Collection +NSString * const kGTLOrkutCollectionAll = @"all"; +NSString * const kGTLOrkutCollectionScraps = @"scraps"; +NSString * const kGTLOrkutCollectionStream = @"stream"; + +// OrderBy +NSString * const kGTLOrkutOrderByAscending = @"ascending"; +NSString * const kGTLOrkutOrderByDescending = @"descending"; +NSString * const kGTLOrkutOrderById = @"id"; +NSString * const kGTLOrkutOrderByRanked = @"ranked"; diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCounterResource.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutCounterResource.h new file mode 100644 index 0000000..c56526f --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCounterResource.h @@ -0,0 +1,60 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCounterResource.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCounterResource (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutLinkResource; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCounterResource +// + +@interface GTLOrkutCounterResource : GTLObject + +// Link to the collection being counted. +@property (retain) GTLOrkutLinkResource *link; + +// The name of the counted collection. Currently supported collections are: +// - scraps - The scraps of the user. +// - photos - The photos of the user. +// - videos - The videos of the user. +// - pendingTestimonials - The pending testimonials of the user. +@property (copy) NSString *name; + +// The number of resources on the counted collection. +@property (retain) NSNumber *total; // intValue + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCounterResource.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutCounterResource.m new file mode 100644 index 0000000..addab81 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCounterResource.m @@ -0,0 +1,43 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCounterResource.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCounterResource (0 custom class methods, 3 custom properties) + +#import "GTLOrkutCounterResource.h" + +#import "GTLOrkutLinkResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCounterResource +// + +@implementation GTLOrkutCounterResource +@dynamic link, name, total; +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCounters.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutCounters.h new file mode 100644 index 0000000..90a590b --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCounters.h @@ -0,0 +1,56 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCounters.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCounters (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutCounterResource; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCounters +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLOrkutCounters : GTLCollectionObject + +// List of counters retrieved. +@property (retain) NSArray *items; // of GTLOrkutCounterResource + +// Identifies this resource as a collection of counters. Value: "orkut#counters" +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutCounters.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutCounters.m new file mode 100644 index 0000000..7cdc47f --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutCounters.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutCounters.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutCounters (0 custom class methods, 2 custom properties) + +#import "GTLOrkutCounters.h" + +#import "GTLOrkutCounterResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutCounters +// + +@implementation GTLOrkutCounters +@dynamic items, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutCounterResource class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#counters"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutLinkResource.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutLinkResource.h new file mode 100644 index 0000000..e5edb3f --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutLinkResource.h @@ -0,0 +1,59 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutLinkResource.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutLinkResource (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLOrkutLinkResource +// + +// Links to resources related to the parent object. + +@interface GTLOrkutLinkResource : GTLObject + +// URL of the link. +@property (copy) NSString *href; + +// Relation between the resource and the parent object. +@property (copy) NSString *rel; + +// Title of the link. +@property (copy) NSString *title; + +// Media type of the link. +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutLinkResource.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutLinkResource.m new file mode 100644 index 0000000..3d9443c --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutLinkResource.m @@ -0,0 +1,41 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutLinkResource.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutLinkResource (0 custom class methods, 4 custom properties) + +#import "GTLOrkutLinkResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutLinkResource +// + +@implementation GTLOrkutLinkResource +@dynamic href, rel, title, type; +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutVisibility.h b/GTL/Source/Services/Orkut/Generated/GTLOrkutVisibility.h new file mode 100644 index 0000000..6a00ca4 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutVisibility.h @@ -0,0 +1,58 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutVisibility.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutVisibility (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLOrkutLinkResource; + +// ---------------------------------------------------------------------------- +// +// GTLOrkutVisibility +// + +@interface GTLOrkutVisibility : GTLObject + +// Identifies this resource as a visibility item. Value: "orkut#visibility" +@property (copy) NSString *kind; + +// List of resources for the visibility item. +@property (retain) NSArray *links; // of GTLOrkutLinkResource + +// The visibility of the resource. Possible values are: +// - default: not hidden by the user +// - hidden: hidden +@property (copy) NSString *visibility; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkutVisibility.m b/GTL/Source/Services/Orkut/Generated/GTLOrkutVisibility.m new file mode 100644 index 0000000..1341434 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkutVisibility.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkutVisibility.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLOrkutVisibility (0 custom class methods, 3 custom properties) + +#import "GTLOrkutVisibility.h" + +#import "GTLOrkutLinkResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLOrkutVisibility +// + +@implementation GTLOrkutVisibility +@dynamic kind, links, visibility; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLOrkutLinkResource class] + forKey:@"links"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"orkut#visibility"]; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLOrkut_Sources.m b/GTL/Source/Services/Orkut/Generated/GTLOrkut_Sources.m new file mode 100644 index 0000000..e0eda63 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLOrkut_Sources.m @@ -0,0 +1,66 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLOrkut_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html + +#import "GTLOrkutConstants.m" + +#import "GTLOrkutAcl.m" +#import "GTLOrkutActivity.m" +#import "GTLOrkutActivityList.m" +#import "GTLOrkutActivityobjectsResource.m" +#import "GTLOrkutActivitypersonResource.m" +#import "GTLOrkutAuthorResource.m" +#import "GTLOrkutBadge.m" +#import "GTLOrkutBadgeList.m" +#import "GTLOrkutComment.m" +#import "GTLOrkutCommentList.m" +#import "GTLOrkutCommunity.m" +#import "GTLOrkutCommunityList.m" +#import "GTLOrkutCommunityMembers.m" +#import "GTLOrkutCommunityMembershipStatus.m" +#import "GTLOrkutCommunityMembersList.m" +#import "GTLOrkutCommunityMessage.m" +#import "GTLOrkutCommunityMessageList.m" +#import "GTLOrkutCommunityPoll.m" +#import "GTLOrkutCommunityPollComment.m" +#import "GTLOrkutCommunityPollCommentList.m" +#import "GTLOrkutCommunityPollList.m" +#import "GTLOrkutCommunitypolloptionResource.m" +#import "GTLOrkutCommunityPollVote.m" +#import "GTLOrkutCommunityTopic.m" +#import "GTLOrkutCommunityTopicList.m" +#import "GTLOrkutCounterResource.m" +#import "GTLOrkutCounters.m" +#import "GTLOrkutLinkResource.m" +#import "GTLOrkutVisibility.m" + +#import "GTLQueryOrkut.m" +#import "GTLServiceOrkut.m" diff --git a/GTL/Source/Services/Orkut/Generated/GTLQueryOrkut.h b/GTL/Source/Services/Orkut/Generated/GTLQueryOrkut.h new file mode 100644 index 0000000..400030d --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLQueryOrkut.h @@ -0,0 +1,597 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryOrkut.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLQueryOrkut (35 custom class methods, 16 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLOrkutActivity; +@class GTLOrkutComment; +@class GTLOrkutCommunityMessage; +@class GTLOrkutCommunityPollComment; +@class GTLOrkutCommunityPollVote; +@class GTLOrkutCommunityTopic; +@class GTLOrkutVisibility; + +@interface GTLQueryOrkut : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *activityId; +@property (assign) long long badgeId; +@property (copy) NSString *collection; +@property (copy) NSString *commentId; +@property (assign) NSInteger communityId; +@property (assign) BOOL friendsOnly; +@property (copy) NSString *hl; +@property (assign) BOOL isShout; +@property (assign) NSUInteger maxResults; +@property (assign) long long messageId; +@property (copy) NSString *orderBy; +@property (copy) NSString *pageToken; +@property (copy) NSString *pollId; +@property (assign) long long topicId; +@property (copy) NSString *userId; + +#pragma mark - +#pragma mark "acl" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.acl.delete +// Excludes an element from the ACL of the activity. +// Required: +// activityId: ID of the activity. +// userId: ID of the user to be removed from the activity. +// Authorization scope(s): +// kGTLAuthScopeOrkut ++ (id)queryForAclDeleteWithActivityId:(NSString *)activityId + userId:(NSString *)userId; + +#pragma mark - +#pragma mark "activities" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.activities.delete +// Deletes an existing activity, if the access controls allow it. +// Required: +// activityId: ID of the activity to remove. +// Authorization scope(s): +// kGTLAuthScopeOrkut ++ (id)queryForActivitiesDeleteWithActivityId:(NSString *)activityId; + +// Method: orkut.activities.list +// Retrieves a list of activities. +// Required: +// userId: The ID of the user whose activities will be listed. Can be me to +// refer to the viewer (i.e. the authenticated user). +// collection: The collection of activities to list. +// kGTLOrkutCollectionAll: All activities created by the specified user +// that the authenticated user is authorized to view. +// kGTLOrkutCollectionScraps: The specified user's scrapbook. +// kGTLOrkutCollectionStream: The specified user's stream feed, intended +// for consumption. This includes activities posted by people that the +// user is following, and activities in which the user has been +// mentioned. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// maxResults: The maximum number of activities to include in the response. +// (1..100) +// pageToken: A continuation token that allows pagination. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutActivityList. ++ (id)queryForActivitiesListWithUserId:(NSString *)userId + collection:(NSString *)collection; + +#pragma mark - +#pragma mark "activityVisibility" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.activityVisibility.get +// Gets the visibility of an existing activity. +// Required: +// activityId: ID of the activity to get the visibility. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutVisibility. ++ (id)queryForActivityVisibilityGetWithActivityId:(NSString *)activityId; + +// Method: orkut.activityVisibility.patch +// Updates the visibility of an existing activity. This method supports patch +// semantics. +// Required: +// activityId: ID of the activity. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// Fetches a GTLOrkutVisibility. ++ (id)queryForActivityVisibilityPatchWithObject:(GTLOrkutVisibility *)object + activityId:(NSString *)activityId; + +// Method: orkut.activityVisibility.update +// Updates the visibility of an existing activity. +// Required: +// activityId: ID of the activity. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// Fetches a GTLOrkutVisibility. ++ (id)queryForActivityVisibilityUpdateWithObject:(GTLOrkutVisibility *)object + activityId:(NSString *)activityId; + +#pragma mark - +#pragma mark "badges" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.badges.get +// Retrieves a badge from a user. +// Required: +// userId: The ID of the user whose badges will be listed. Can be me to refer +// to caller. +// badgeId: The ID of the badge that will be retrieved. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutBadge. ++ (id)queryForBadgesGetWithUserId:(NSString *)userId + badgeId:(long long)badgeId; + +// Method: orkut.badges.list +// Retrieves the list of visible badges of a user. +// Required: +// userId: The id of the user whose badges will be listed. Can be me to refer +// to caller. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutBadgeList. ++ (id)queryForBadgesListWithUserId:(NSString *)userId; + +#pragma mark - +#pragma mark "comments" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.comments.delete +// Deletes an existing comment. +// Required: +// commentId: ID of the comment to remove. +// Authorization scope(s): +// kGTLAuthScopeOrkut ++ (id)queryForCommentsDeleteWithCommentId:(NSString *)commentId; + +// Method: orkut.comments.get +// Retrieves an existing comment. +// Required: +// commentId: ID of the comment to get. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutComment. ++ (id)queryForCommentsGetWithCommentId:(NSString *)commentId; + +// Method: orkut.comments.insert +// Inserts a new comment to an activity. +// Required: +// activityId: The ID of the activity to contain the new comment. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// Fetches a GTLOrkutComment. ++ (id)queryForCommentsInsertWithObject:(GTLOrkutComment *)object + activityId:(NSString *)activityId; + +// Method: orkut.comments.list +// Retrieves a list of comments, possibly filtered. +// Required: +// activityId: The ID of the activity containing the comments. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// maxResults: The maximum number of activities to include in the response. +// orderBy: Sort search results. (Default "DESCENDING_SORT") +// kGTLOrkutOrderByAscending: Use ascending sort order. +// kGTLOrkutOrderByDescending: Use descending sort order. +// pageToken: A continuation token that allows pagination. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCommentList. ++ (id)queryForCommentsListWithActivityId:(NSString *)activityId; + +#pragma mark - +#pragma mark "communities" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.communities.get +// Retrieves the basic information (aka. profile) of a community. +// Required: +// communityId: The ID of the community to get. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCommunity. ++ (id)queryForCommunitiesGetWithCommunityId:(NSInteger)communityId; + +// Method: orkut.communities.list +// Retrieves the list of communities the current user is a member of. +// Required: +// userId: The ID of the user whose communities will be listed. Can be me to +// refer to caller. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// maxResults: The maximum number of communities to include in the response. +// orderBy: How to order the communities by. +// kGTLOrkutOrderById: Returns the communities sorted by a fixed, natural +// order. +// kGTLOrkutOrderByRanked: Returns the communities ranked accordingly to +// how they are displayed on the orkut web application. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCommunityList. ++ (id)queryForCommunitiesListWithUserId:(NSString *)userId; + +#pragma mark - +#pragma mark "communityFollow" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.communityFollow.delete +// Removes a user from the followers of a community. +// Required: +// communityId: ID of the community. +// userId: ID of the user. +// Authorization scope(s): +// kGTLAuthScopeOrkut ++ (id)queryForCommunityFollowDeleteWithCommunityId:(NSInteger)communityId + userId:(NSString *)userId; + +// Method: orkut.communityFollow.insert +// Adds a user as a follower of a community. +// Required: +// communityId: ID of the community. +// userId: ID of the user. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// Fetches a GTLOrkutCommunityMembers. ++ (id)queryForCommunityFollowInsertWithCommunityId:(NSInteger)communityId + userId:(NSString *)userId; + +#pragma mark - +#pragma mark "communityMembers" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.communityMembers.delete +// Makes the user leave a community. +// Required: +// communityId: ID of the community. +// userId: ID of the user. +// Authorization scope(s): +// kGTLAuthScopeOrkut ++ (id)queryForCommunityMembersDeleteWithCommunityId:(NSInteger)communityId + userId:(NSString *)userId; + +// Method: orkut.communityMembers.get +// Retrieves the relationship between a user and a community. +// Required: +// communityId: ID of the community. +// userId: ID of the user. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCommunityMembers. ++ (id)queryForCommunityMembersGetWithCommunityId:(NSInteger)communityId + userId:(NSString *)userId; + +// Method: orkut.communityMembers.insert +// Makes the user join a community. +// Required: +// communityId: ID of the community. +// userId: ID of the user. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// Fetches a GTLOrkutCommunityMembers. ++ (id)queryForCommunityMembersInsertWithCommunityId:(NSInteger)communityId + userId:(NSString *)userId; + +// Method: orkut.communityMembers.list +// Lists members of a community. Use the pagination tokens to retrieve the full +// list; do not rely on the member count available in the community profile +// information to know when to stop iterating, as that count may be approximate. +// Required: +// communityId: The ID of the community whose members will be listed. +// Optional: +// friendsOnly: Whether to list only community members who are friends of the +// user. +// hl: Specifies the interface language (host language) of your user +// interface. +// maxResults: The maximum number of members to include in the response. +// pageToken: A continuation token that allows pagination. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCommunityMembersList. ++ (id)queryForCommunityMembersListWithCommunityId:(NSInteger)communityId; + +#pragma mark - +#pragma mark "communityMessages" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.communityMessages.delete +// Moves a message of the community to the trash folder. +// Required: +// communityId: The ID of the community whose message will be moved to the +// trash folder. +// topicId: The ID of the topic whose message will be moved to the trash +// folder. +// messageId: The ID of the message to be moved to the trash folder. +// Authorization scope(s): +// kGTLAuthScopeOrkut ++ (id)queryForCommunityMessagesDeleteWithCommunityId:(NSInteger)communityId + topicId:(long long)topicId + messageId:(long long)messageId; + +// Method: orkut.communityMessages.insert +// Adds a message to a given community topic. +// Required: +// communityId: The ID of the community the message should be added to. +// topicId: The ID of the topic the message should be added to. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// Fetches a GTLOrkutCommunityMessage. ++ (id)queryForCommunityMessagesInsertWithObject:(GTLOrkutCommunityMessage *)object + communityId:(NSInteger)communityId + topicId:(long long)topicId; + +// Method: orkut.communityMessages.list +// Retrieves the messages of a topic of a community. +// Required: +// communityId: The ID of the community which messages will be listed. +// topicId: The ID of the topic which messages will be listed. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// maxResults: The maximum number of messages to include in the response. +// (1..100) +// pageToken: A continuation token that allows pagination. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCommunityMessageList. ++ (id)queryForCommunityMessagesListWithCommunityId:(NSInteger)communityId + topicId:(long long)topicId; + +#pragma mark - +#pragma mark "communityPollComments" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.communityPollComments.insert +// Adds a comment on a community poll. +// Required: +// communityId: The ID of the community whose poll is being commented. +// pollId: The ID of the poll being commented. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// Fetches a GTLOrkutCommunityPollComment. ++ (id)queryForCommunityPollCommentsInsertWithObject:(GTLOrkutCommunityPollComment *)object + communityId:(NSInteger)communityId + pollId:(NSString *)pollId; + +// Method: orkut.communityPollComments.list +// Retrieves the comments of a community poll. +// Required: +// communityId: The ID of the community whose poll is having its comments +// listed. +// pollId: The ID of the community whose polls will be listed. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// maxResults: The maximum number of comments to include in the response. +// pageToken: A continuation token that allows pagination. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCommunityPollCommentList. ++ (id)queryForCommunityPollCommentsListWithCommunityId:(NSInteger)communityId + pollId:(NSString *)pollId; + +#pragma mark - +#pragma mark "communityPolls" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.communityPolls.get +// Retrieves one specific poll of a community. +// Required: +// communityId: The ID of the community for whose poll will be retrieved. +// pollId: The ID of the poll to get. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCommunityPoll. ++ (id)queryForCommunityPollsGetWithCommunityId:(NSInteger)communityId + pollId:(NSString *)pollId; + +// Method: orkut.communityPolls.list +// Retrieves the polls of a community. +// Required: +// communityId: The ID of the community which polls will be listed. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// maxResults: The maximum number of polls to include in the response. +// pageToken: A continuation token that allows pagination. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCommunityPollList. ++ (id)queryForCommunityPollsListWithCommunityId:(NSInteger)communityId; + +#pragma mark - +#pragma mark "communityPollVotes" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.communityPollVotes.insert +// Votes on a community poll. +// Required: +// communityId: The ID of the community whose poll is being voted. +// pollId: The ID of the poll being voted. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// Fetches a GTLOrkutCommunityPollVote. ++ (id)queryForCommunityPollVotesInsertWithObject:(GTLOrkutCommunityPollVote *)object + communityId:(NSInteger)communityId + pollId:(NSString *)pollId; + +#pragma mark - +#pragma mark "communityRelated" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.communityRelated.list +// Retrieves the communities related to another one. +// Required: +// communityId: The ID of the community whose related communities will be +// listed. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCommunityList. ++ (id)queryForCommunityRelatedListWithCommunityId:(NSInteger)communityId; + +#pragma mark - +#pragma mark "communityTopics" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.communityTopics.delete +// Moves a topic of the community to the trash folder. +// Required: +// communityId: The ID of the community whose topic will be moved to the trash +// folder. +// topicId: The ID of the topic to be moved to the trash folder. +// Authorization scope(s): +// kGTLAuthScopeOrkut ++ (id)queryForCommunityTopicsDeleteWithCommunityId:(NSInteger)communityId + topicId:(long long)topicId; + +// Method: orkut.communityTopics.get +// Retrieves a topic of a community. +// Required: +// communityId: The ID of the community whose topic will be retrieved. +// topicId: The ID of the topic to get. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCommunityTopic. ++ (id)queryForCommunityTopicsGetWithCommunityId:(NSInteger)communityId + topicId:(long long)topicId; + +// Method: orkut.communityTopics.insert +// Adds a topic to a given community. +// Required: +// communityId: The ID of the community the topic should be added to. +// Optional: +// isShout: Whether this topic is a shout. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// Fetches a GTLOrkutCommunityTopic. ++ (id)queryForCommunityTopicsInsertWithObject:(GTLOrkutCommunityTopic *)object + communityId:(NSInteger)communityId; + +// Method: orkut.communityTopics.list +// Retrieves the topics of a community. +// Required: +// communityId: The ID of the community which topics will be listed. +// Optional: +// hl: Specifies the interface language (host language) of your user +// interface. +// maxResults: The maximum number of topics to include in the response. +// (1..100) +// pageToken: A continuation token that allows pagination. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCommunityTopicList. ++ (id)queryForCommunityTopicsListWithCommunityId:(NSInteger)communityId; + +#pragma mark - +#pragma mark "counters" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.counters.list +// Retrieves the counters of a user. +// Required: +// userId: The ID of the user whose counters will be listed. Can be me to +// refer to caller. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// kGTLAuthScopeOrkutReadonly +// Fetches a GTLOrkutCounters. ++ (id)queryForCountersListWithUserId:(NSString *)userId; + +#pragma mark - +#pragma mark "scraps" methods +// These create a GTLQueryOrkut object. + +// Method: orkut.scraps.insert +// Creates a new scrap. +// Authorization scope(s): +// kGTLAuthScopeOrkut +// Fetches a GTLOrkutActivity. ++ (id)queryForScrapsInsertWithObject:(GTLOrkutActivity *)object; + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLQueryOrkut.m b/GTL/Source/Services/Orkut/Generated/GTLQueryOrkut.m new file mode 100644 index 0000000..e43d006 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLQueryOrkut.m @@ -0,0 +1,481 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryOrkut.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLQueryOrkut (35 custom class methods, 16 custom properties) + +#import "GTLQueryOrkut.h" + +#import "GTLOrkutActivity.h" +#import "GTLOrkutActivityList.h" +#import "GTLOrkutBadge.h" +#import "GTLOrkutBadgeList.h" +#import "GTLOrkutComment.h" +#import "GTLOrkutCommentList.h" +#import "GTLOrkutCommunity.h" +#import "GTLOrkutCommunityList.h" +#import "GTLOrkutCommunityMembers.h" +#import "GTLOrkutCommunityMembersList.h" +#import "GTLOrkutCommunityMessage.h" +#import "GTLOrkutCommunityMessageList.h" +#import "GTLOrkutCommunityPoll.h" +#import "GTLOrkutCommunityPollComment.h" +#import "GTLOrkutCommunityPollCommentList.h" +#import "GTLOrkutCommunityPollList.h" +#import "GTLOrkutCommunityPollVote.h" +#import "GTLOrkutCommunityTopic.h" +#import "GTLOrkutCommunityTopicList.h" +#import "GTLOrkutCounters.h" +#import "GTLOrkutVisibility.h" + +@implementation GTLQueryOrkut + +@dynamic activityId, badgeId, collection, commentId, communityId, fields, + friendsOnly, hl, isShout, maxResults, messageId, orderBy, pageToken, + pollId, topicId, userId; + +#pragma mark - +#pragma mark "acl" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForAclDeleteWithActivityId:(NSString *)activityId + userId:(NSString *)userId { + NSString *methodName = @"orkut.acl.delete"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.activityId = activityId; + query.userId = userId; + return query; +} + +#pragma mark - +#pragma mark "activities" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForActivitiesDeleteWithActivityId:(NSString *)activityId { + NSString *methodName = @"orkut.activities.delete"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.activityId = activityId; + return query; +} + ++ (id)queryForActivitiesListWithUserId:(NSString *)userId + collection:(NSString *)collection { + NSString *methodName = @"orkut.activities.list"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.userId = userId; + query.collection = collection; + query.expectedObjectClass = [GTLOrkutActivityList class]; + return query; +} + +#pragma mark - +#pragma mark "activityVisibility" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForActivityVisibilityGetWithActivityId:(NSString *)activityId { + NSString *methodName = @"orkut.activityVisibility.get"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.activityId = activityId; + query.expectedObjectClass = [GTLOrkutVisibility class]; + return query; +} + ++ (id)queryForActivityVisibilityPatchWithObject:(GTLOrkutVisibility *)object + activityId:(NSString *)activityId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"orkut.activityVisibility.patch"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.activityId = activityId; + query.expectedObjectClass = [GTLOrkutVisibility class]; + return query; +} + ++ (id)queryForActivityVisibilityUpdateWithObject:(GTLOrkutVisibility *)object + activityId:(NSString *)activityId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"orkut.activityVisibility.update"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.activityId = activityId; + query.expectedObjectClass = [GTLOrkutVisibility class]; + return query; +} + +#pragma mark - +#pragma mark "badges" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForBadgesGetWithUserId:(NSString *)userId + badgeId:(long long)badgeId { + NSString *methodName = @"orkut.badges.get"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.userId = userId; + query.badgeId = badgeId; + query.expectedObjectClass = [GTLOrkutBadge class]; + return query; +} + ++ (id)queryForBadgesListWithUserId:(NSString *)userId { + NSString *methodName = @"orkut.badges.list"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.userId = userId; + query.expectedObjectClass = [GTLOrkutBadgeList class]; + return query; +} + +#pragma mark - +#pragma mark "comments" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForCommentsDeleteWithCommentId:(NSString *)commentId { + NSString *methodName = @"orkut.comments.delete"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.commentId = commentId; + return query; +} + ++ (id)queryForCommentsGetWithCommentId:(NSString *)commentId { + NSString *methodName = @"orkut.comments.get"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.commentId = commentId; + query.expectedObjectClass = [GTLOrkutComment class]; + return query; +} + ++ (id)queryForCommentsInsertWithObject:(GTLOrkutComment *)object + activityId:(NSString *)activityId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"orkut.comments.insert"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.activityId = activityId; + query.expectedObjectClass = [GTLOrkutComment class]; + return query; +} + ++ (id)queryForCommentsListWithActivityId:(NSString *)activityId { + NSString *methodName = @"orkut.comments.list"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.activityId = activityId; + query.expectedObjectClass = [GTLOrkutCommentList class]; + return query; +} + +#pragma mark - +#pragma mark "communities" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForCommunitiesGetWithCommunityId:(NSInteger)communityId { + NSString *methodName = @"orkut.communities.get"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.expectedObjectClass = [GTLOrkutCommunity class]; + return query; +} + ++ (id)queryForCommunitiesListWithUserId:(NSString *)userId { + NSString *methodName = @"orkut.communities.list"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.userId = userId; + query.expectedObjectClass = [GTLOrkutCommunityList class]; + return query; +} + +#pragma mark - +#pragma mark "communityFollow" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForCommunityFollowDeleteWithCommunityId:(NSInteger)communityId + userId:(NSString *)userId { + NSString *methodName = @"orkut.communityFollow.delete"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.userId = userId; + return query; +} + ++ (id)queryForCommunityFollowInsertWithCommunityId:(NSInteger)communityId + userId:(NSString *)userId { + NSString *methodName = @"orkut.communityFollow.insert"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.userId = userId; + query.expectedObjectClass = [GTLOrkutCommunityMembers class]; + return query; +} + +#pragma mark - +#pragma mark "communityMembers" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForCommunityMembersDeleteWithCommunityId:(NSInteger)communityId + userId:(NSString *)userId { + NSString *methodName = @"orkut.communityMembers.delete"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.userId = userId; + return query; +} + ++ (id)queryForCommunityMembersGetWithCommunityId:(NSInteger)communityId + userId:(NSString *)userId { + NSString *methodName = @"orkut.communityMembers.get"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.userId = userId; + query.expectedObjectClass = [GTLOrkutCommunityMembers class]; + return query; +} + ++ (id)queryForCommunityMembersInsertWithCommunityId:(NSInteger)communityId + userId:(NSString *)userId { + NSString *methodName = @"orkut.communityMembers.insert"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.userId = userId; + query.expectedObjectClass = [GTLOrkutCommunityMembers class]; + return query; +} + ++ (id)queryForCommunityMembersListWithCommunityId:(NSInteger)communityId { + NSString *methodName = @"orkut.communityMembers.list"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.expectedObjectClass = [GTLOrkutCommunityMembersList class]; + return query; +} + +#pragma mark - +#pragma mark "communityMessages" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForCommunityMessagesDeleteWithCommunityId:(NSInteger)communityId + topicId:(long long)topicId + messageId:(long long)messageId { + NSString *methodName = @"orkut.communityMessages.delete"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.topicId = topicId; + query.messageId = messageId; + return query; +} + ++ (id)queryForCommunityMessagesInsertWithObject:(GTLOrkutCommunityMessage *)object + communityId:(NSInteger)communityId + topicId:(long long)topicId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"orkut.communityMessages.insert"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.communityId = communityId; + query.topicId = topicId; + query.expectedObjectClass = [GTLOrkutCommunityMessage class]; + return query; +} + ++ (id)queryForCommunityMessagesListWithCommunityId:(NSInteger)communityId + topicId:(long long)topicId { + NSString *methodName = @"orkut.communityMessages.list"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.topicId = topicId; + query.expectedObjectClass = [GTLOrkutCommunityMessageList class]; + return query; +} + +#pragma mark - +#pragma mark "communityPollComments" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForCommunityPollCommentsInsertWithObject:(GTLOrkutCommunityPollComment *)object + communityId:(NSInteger)communityId + pollId:(NSString *)pollId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"orkut.communityPollComments.insert"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.communityId = communityId; + query.pollId = pollId; + query.expectedObjectClass = [GTLOrkutCommunityPollComment class]; + return query; +} + ++ (id)queryForCommunityPollCommentsListWithCommunityId:(NSInteger)communityId + pollId:(NSString *)pollId { + NSString *methodName = @"orkut.communityPollComments.list"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.pollId = pollId; + query.expectedObjectClass = [GTLOrkutCommunityPollCommentList class]; + return query; +} + +#pragma mark - +#pragma mark "communityPolls" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForCommunityPollsGetWithCommunityId:(NSInteger)communityId + pollId:(NSString *)pollId { + NSString *methodName = @"orkut.communityPolls.get"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.pollId = pollId; + query.expectedObjectClass = [GTLOrkutCommunityPoll class]; + return query; +} + ++ (id)queryForCommunityPollsListWithCommunityId:(NSInteger)communityId { + NSString *methodName = @"orkut.communityPolls.list"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.expectedObjectClass = [GTLOrkutCommunityPollList class]; + return query; +} + +#pragma mark - +#pragma mark "communityPollVotes" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForCommunityPollVotesInsertWithObject:(GTLOrkutCommunityPollVote *)object + communityId:(NSInteger)communityId + pollId:(NSString *)pollId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"orkut.communityPollVotes.insert"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.communityId = communityId; + query.pollId = pollId; + query.expectedObjectClass = [GTLOrkutCommunityPollVote class]; + return query; +} + +#pragma mark - +#pragma mark "communityRelated" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForCommunityRelatedListWithCommunityId:(NSInteger)communityId { + NSString *methodName = @"orkut.communityRelated.list"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.expectedObjectClass = [GTLOrkutCommunityList class]; + return query; +} + +#pragma mark - +#pragma mark "communityTopics" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForCommunityTopicsDeleteWithCommunityId:(NSInteger)communityId + topicId:(long long)topicId { + NSString *methodName = @"orkut.communityTopics.delete"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.topicId = topicId; + return query; +} + ++ (id)queryForCommunityTopicsGetWithCommunityId:(NSInteger)communityId + topicId:(long long)topicId { + NSString *methodName = @"orkut.communityTopics.get"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.topicId = topicId; + query.expectedObjectClass = [GTLOrkutCommunityTopic class]; + return query; +} + ++ (id)queryForCommunityTopicsInsertWithObject:(GTLOrkutCommunityTopic *)object + communityId:(NSInteger)communityId { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"orkut.communityTopics.insert"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.communityId = communityId; + query.expectedObjectClass = [GTLOrkutCommunityTopic class]; + return query; +} + ++ (id)queryForCommunityTopicsListWithCommunityId:(NSInteger)communityId { + NSString *methodName = @"orkut.communityTopics.list"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.communityId = communityId; + query.expectedObjectClass = [GTLOrkutCommunityTopicList class]; + return query; +} + +#pragma mark - +#pragma mark "counters" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForCountersListWithUserId:(NSString *)userId { + NSString *methodName = @"orkut.counters.list"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.userId = userId; + query.expectedObjectClass = [GTLOrkutCounters class]; + return query; +} + +#pragma mark - +#pragma mark "scraps" methods +// These create a GTLQueryOrkut object. + ++ (id)queryForScrapsInsertWithObject:(GTLOrkutActivity *)object { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"orkut.scraps.insert"; + GTLQueryOrkut *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.expectedObjectClass = [GTLOrkutActivity class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLServiceOrkut.h b/GTL/Source/Services/Orkut/Generated/GTLServiceOrkut.h new file mode 100644 index 0000000..0c1bb1d --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLServiceOrkut.h @@ -0,0 +1,62 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceOrkut.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLServiceOrkut (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceOrkut : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryOrkut.h. The query can the be sent with GTLService's execute methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Orkut/Generated/GTLServiceOrkut.m b/GTL/Source/Services/Orkut/Generated/GTLServiceOrkut.m new file mode 100644 index 0000000..8a793f3 --- /dev/null +++ b/GTL/Source/Services/Orkut/Generated/GTLServiceOrkut.m @@ -0,0 +1,90 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceOrkut.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Orkut API (orkut/v2) +// Description: +// Lets you manage activities, comments and badges in Orkut. More stuff coming +// in time. +// Documentation: +// http://code.google.com/apis/orkut/v2/reference.html +// Classes: +// GTLServiceOrkut (0 custom class methods, 0 custom properties) + +#import "GTLOrkut.h" + +@implementation GTLServiceOrkut + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryOrkut class], + [GTLOrkutAcl class], + [GTLOrkutActivity class], + [GTLOrkutActivityList class], + [GTLOrkutActivityobjectsResource class], + [GTLOrkutActivitypersonResource class], + [GTLOrkutAuthorResource class], + [GTLOrkutBadge class], + [GTLOrkutBadgeList class], + [GTLOrkutComment class], + [GTLOrkutCommentList class], + [GTLOrkutCommunity class], + [GTLOrkutCommunityList class], + [GTLOrkutCommunityMembers class], + [GTLOrkutCommunityMembershipStatus class], + [GTLOrkutCommunityMembersList class], + [GTLOrkutCommunityMessage class], + [GTLOrkutCommunityMessageList class], + [GTLOrkutCommunityPoll class], + [GTLOrkutCommunityPollComment class], + [GTLOrkutCommunityPollCommentList class], + [GTLOrkutCommunityPollList class], + [GTLOrkutCommunitypolloptionResource class], + [GTLOrkutCommunityPollVote class], + [GTLOrkutCommunityTopic class], + [GTLOrkutCommunityTopicList class], + [GTLOrkutCounterResource class], + [GTLOrkutCounters class], + [GTLOrkutLinkResource class], + [GTLOrkutVisibility class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v2"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Plus/.svn/all-wcprops b/GTL/Source/Services/Plus/.svn/all-wcprops new file mode 100644 index 0000000..034fd15 --- /dev/null +++ b/GTL/Source/Services/Plus/.svn/all-wcprops @@ -0,0 +1,5 @@ +K 25 +svn:wc:ra_dav:version-url +V 44 +/svn/!svn/ver/248/trunk/Source/Services/Plus +END diff --git a/GTL/Source/Services/Plus/.svn/entries b/GTL/Source/Services/Plus/.svn/entries new file mode 100644 index 0000000..9b59250 --- /dev/null +++ b/GTL/Source/Services/Plus/.svn/entries @@ -0,0 +1,31 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Plus +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-12-06T21:11:28.758294Z +248 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +Generated +dir + diff --git a/GTL/Source/Services/Plus/Generated/.svn/all-wcprops b/GTL/Source/Services/Plus/Generated/.svn/all-wcprops new file mode 100644 index 0000000..a70e708 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/all-wcprops @@ -0,0 +1,149 @@ +K 25 +svn:wc:ra_dav:version-url +V 54 +/svn/!svn/ver/248/trunk/Source/Services/Plus/Generated +END +GTLPlus.h +K 25 +svn:wc:ra_dav:version-url +V 64 +/svn/!svn/ver/189/trunk/Source/Services/Plus/Generated/GTLPlus.h +END +GTLPlusActivityFeed.h +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/221/trunk/Source/Services/Plus/Generated/GTLPlusActivityFeed.h +END +GTLPlusConstants.m +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/!svn/ver/237/trunk/Source/Services/Plus/Generated/GTLPlusConstants.m +END +GTLPlusActivityFeed.m +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/189/trunk/Source/Services/Plus/Generated/GTLPlusActivityFeed.m +END +GTLPlusCommentFeed.h +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/221/trunk/Source/Services/Plus/Generated/GTLPlusCommentFeed.h +END +GTLPlus_Sources.m +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/225/trunk/Source/Services/Plus/Generated/GTLPlus_Sources.m +END +GTLPlusAclentryResource.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/241/trunk/Source/Services/Plus/Generated/GTLPlusAclentryResource.h +END +GTLPlusCommentFeed.m +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/189/trunk/Source/Services/Plus/Generated/GTLPlusCommentFeed.m +END +GTLPlusActivity.h +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/248/trunk/Source/Services/Plus/Generated/GTLPlusActivity.h +END +GTLPlusAclentryResource.m +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/241/trunk/Source/Services/Plus/Generated/GTLPlusAclentryResource.m +END +GTLPlusAcl.h +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/189/trunk/Source/Services/Plus/Generated/GTLPlusAcl.h +END +GTLServicePlus.h +K 25 +svn:wc:ra_dav:version-url +V 71 +/svn/!svn/ver/189/trunk/Source/Services/Plus/Generated/GTLServicePlus.h +END +GTLPlusActivity.m +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/241/trunk/Source/Services/Plus/Generated/GTLPlusActivity.m +END +GTLPlusComment.h +K 25 +svn:wc:ra_dav:version-url +V 71 +/svn/!svn/ver/241/trunk/Source/Services/Plus/Generated/GTLPlusComment.h +END +GTLPlusAcl.m +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/189/trunk/Source/Services/Plus/Generated/GTLPlusAcl.m +END +GTLServicePlus.m +K 25 +svn:wc:ra_dav:version-url +V 71 +/svn/!svn/ver/189/trunk/Source/Services/Plus/Generated/GTLServicePlus.m +END +GTLQueryPlus.h +K 25 +svn:wc:ra_dav:version-url +V 69 +/svn/!svn/ver/241/trunk/Source/Services/Plus/Generated/GTLQueryPlus.h +END +GTLPlusPerson.h +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/246/trunk/Source/Services/Plus/Generated/GTLPlusPerson.h +END +GTLPlusComment.m +K 25 +svn:wc:ra_dav:version-url +V 71 +/svn/!svn/ver/241/trunk/Source/Services/Plus/Generated/GTLPlusComment.m +END +GTLPlusPeopleFeed.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/241/trunk/Source/Services/Plus/Generated/GTLPlusPeopleFeed.h +END +GTLQueryPlus.m +K 25 +svn:wc:ra_dav:version-url +V 69 +/svn/!svn/ver/215/trunk/Source/Services/Plus/Generated/GTLQueryPlus.m +END +GTLPlusPerson.m +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/243/trunk/Source/Services/Plus/Generated/GTLPlusPerson.m +END +GTLPlusConstants.h +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/!svn/ver/237/trunk/Source/Services/Plus/Generated/GTLPlusConstants.h +END +GTLPlusPeopleFeed.m +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/241/trunk/Source/Services/Plus/Generated/GTLPlusPeopleFeed.m +END diff --git a/GTL/Source/Services/Plus/Generated/.svn/entries b/GTL/Source/Services/Plus/Generated/.svn/entries new file mode 100644 index 0000000..dc8034e --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/entries @@ -0,0 +1,844 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Plus/Generated +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-12-06T21:11:28.758294Z +248 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +GTLPlus.h +file + + + + +2012-12-09T08:42:30.000000Z +9d220c1c087c32b18a01c538fd7ecf3c +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1279 + +GTLPlusActivityFeed.h +file + + + + +2012-12-09T08:42:30.000000Z +c1f5db580bfb9d214c188a05799f1d5a +2012-09-29T05:24:46.279154Z +221 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2548 + +GTLPlusConstants.m +file + + + + +2012-12-09T08:42:30.000000Z +4543f17604461d942f6336fa6a414a78 +2012-10-23T20:22:06.494543Z +237 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1554 + +GTLPlusActivityFeed.m +file + + + + +2012-12-09T08:42:30.000000Z +bee0580c3d05b468c4aac467265d72b2 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1838 + +GTLPlusCommentFeed.h +file + + + + +2012-12-09T08:42:30.000000Z +9d566c5bf4a3fff8b370f3a0bf37c489 +2012-09-29T05:24:46.279154Z +221 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +2458 + +GTLPlus_Sources.m +file + + + + +2012-12-09T08:42:30.000000Z +49f060f385b6c824edcf856efbbf8ec0 +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1398 + +GTLPlusAclentryResource.h +file + + + + +2012-12-09T08:42:30.000000Z +bfef81d09a07151a1bc6a6971b5f5879 +2012-11-06T21:10:03.064870Z +241 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2123 + +GTLPlusCommentFeed.m +file + + + + +2012-12-09T08:42:30.000000Z +30bf97a22204cededc3f5c3e968be487 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1811 + +GTLPlusActivity.h +file + + + + +2012-12-09T08:42:30.000000Z +37949caf0a4dcc278f00a02ef2f6334a +2012-12-06T21:11:28.758294Z +248 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +14777 + +GTLPlusAclentryResource.m +file + + + + +2012-12-09T08:42:30.000000Z +af18fe3b35273e0add8c08adcedfde6a +2012-11-06T21:10:03.064870Z +241 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1485 + +GTLPlusAcl.h +file + + + + +2012-12-09T08:42:30.000000Z +87403595bddf0008c944cbe5ad1cc028 +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1866 + +GTLServicePlus.h +file + + + + +2012-12-09T08:42:30.000000Z +a0faab2c45d2e061422138de732421be +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2096 + +GTLPlusActivity.m +file + + + + +2012-12-09T08:42:30.000000Z +4d2c98157b0a909f410f87379df9c488 +2012-11-06T21:10:03.064870Z +241 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +8040 + +GTLPlusComment.h +file + + + + +2012-12-09T08:42:30.000000Z +36144a1d120bbbbe4fd3838411827a11 +2012-11-06T21:10:03.064870Z +241 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +5281 + +GTLPlusAcl.m +file + + + + +2012-12-09T08:42:30.000000Z +593b9499c12b56f8cf5d32ad1c3704cc +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1749 + +GTLServicePlus.m +file + + + + +2012-12-09T08:42:30.000000Z +0e7006540bf7d91a9488bd4dc8096a2e +2012-07-11T20:51:19.273386Z +189 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2208 + +GTLQueryPlus.h +file + + + + +2012-12-09T08:42:30.000000Z +162eb10a537075f5e974f6360906660f +2012-11-06T21:10:03.064870Z +241 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +8227 + +GTLPlusPerson.h +file + + + + +2012-12-09T08:42:30.000000Z +329eff11ebd6a7d9479e022819c5610f +2012-11-30T19:06:28.039519Z +246 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +10960 + +GTLPlusComment.m +file + + + + +2012-12-09T08:42:30.000000Z +2267cd83243bd3ca21b016fbff681a9c +2012-11-06T21:10:03.064870Z +241 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +3511 + +GTLPlusPeopleFeed.h +file + + + + +2012-12-09T08:42:30.000000Z +0fcd517816839ec98ef19e6e41dc9851 +2012-11-06T21:10:03.064870Z +241 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +2489 + +GTLQueryPlus.m +file + + + + +2012-12-09T08:42:30.000000Z +ad0b984ad6101fc0fe38b759acb8c758 +2012-09-18T19:17:24.206336Z +215 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4126 + +GTLPlusPerson.m +file + + + + +2012-12-09T08:42:30.000000Z +d6d5b930bb328ebdd09d52f9eb123565 +2012-11-14T23:46:14.437398Z +243 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4905 + +GTLPlusConstants.h +file + + + + +2012-12-09T08:42:30.000000Z +9992f389d16cc42165261fb682ffb026 +2012-10-23T20:22:06.494543Z +237 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1780 + +GTLPlusPeopleFeed.m +file + + + + +2012-12-09T08:42:30.000000Z +444ed1c0a2cb573b9448e70a35bfeb5a +2012-11-06T21:10:03.064870Z +241 +grobbins@google.com +has-props + + + + + + + + + + + + + + + + + + + + +1778 + diff --git a/GTL/Source/Services/Plus/Generated/.svn/prop-base/GTLPlusComment.h.svn-base b/GTL/Source/Services/Plus/Generated/.svn/prop-base/GTLPlusComment.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/prop-base/GTLPlusComment.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Plus/Generated/.svn/prop-base/GTLPlusComment.m.svn-base b/GTL/Source/Services/Plus/Generated/.svn/prop-base/GTLPlusComment.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/prop-base/GTLPlusComment.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Plus/Generated/.svn/prop-base/GTLPlusCommentFeed.h.svn-base b/GTL/Source/Services/Plus/Generated/.svn/prop-base/GTLPlusCommentFeed.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/prop-base/GTLPlusCommentFeed.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Plus/Generated/.svn/prop-base/GTLPlusCommentFeed.m.svn-base b/GTL/Source/Services/Plus/Generated/.svn/prop-base/GTLPlusCommentFeed.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/prop-base/GTLPlusCommentFeed.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Plus/Generated/.svn/prop-base/GTLPlusPeopleFeed.h.svn-base b/GTL/Source/Services/Plus/Generated/.svn/prop-base/GTLPlusPeopleFeed.h.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/prop-base/GTLPlusPeopleFeed.h.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Plus/Generated/.svn/prop-base/GTLPlusPeopleFeed.m.svn-base b/GTL/Source/Services/Plus/Generated/.svn/prop-base/GTLPlusPeopleFeed.m.svn-base new file mode 100644 index 0000000..abd5821 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/prop-base/GTLPlusPeopleFeed.m.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 2 +LF +END diff --git a/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlus.h.svn-base b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlus.h.svn-base new file mode 100644 index 0000000..020e214 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlus.h.svn-base @@ -0,0 +1,41 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlus.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ + +#import "GTLPlusConstants.h" + +#import "GTLPlusAcl.h" +#import "GTLPlusAclentryResource.h" +#import "GTLPlusActivity.h" +#import "GTLPlusActivityFeed.h" +#import "GTLPlusComment.h" +#import "GTLPlusCommentFeed.h" +#import "GTLPlusPeopleFeed.h" +#import "GTLPlusPerson.h" + +#import "GTLQueryPlus.h" +#import "GTLServicePlus.h" diff --git a/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusAcl.h.svn-base b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusAcl.h.svn-base new file mode 100644 index 0000000..36be975 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusAcl.h.svn-base @@ -0,0 +1,60 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusAcl.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusAcl (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLPlusAclentryResource; + +// ---------------------------------------------------------------------------- +// +// GTLPlusAcl +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLPlusAcl : GTLCollectionObject + +// Description of the access granted, suitable for display. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The list of access entries. +@property (retain) NSArray *items; // of GTLPlusAclentryResource + +// Identifies this resource as a collection of access controls. Value: +// "plus#acl". +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusAcl.m.svn-base b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusAcl.m.svn-base new file mode 100644 index 0000000..f463ec8 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusAcl.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusAcl.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusAcl (0 custom class methods, 3 custom properties) + +#import "GTLPlusAcl.h" + +#import "GTLPlusAclentryResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLPlusAcl +// + +@implementation GTLPlusAcl +@dynamic descriptionProperty, items, kind; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLPlusAclentryResource class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"plus#acl"]; +} + +@end diff --git a/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusAclentryResource.h.svn-base b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusAclentryResource.h.svn-base new file mode 100644 index 0000000..bd5e5f3 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusAclentryResource.h.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusAclentryResource.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusAclentryResource (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLPlusAclentryResource +// + +@interface GTLPlusAclentryResource : GTLObject + +// A descriptive name for this entry. Suitable for display. +@property (copy) NSString *displayName; + +// The ID of the entry. For entries of type "person" or "circle", this is the ID +// of the resource. For other types, this property is not set. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The type of entry describing to whom access is granted. Possible values are: +// - "person" - Access to an individual. +// - "circle" - Access to members of a circle. +// - "myCircles" - Access to members of all the person's circles. +// - "extendedCircles" - Access to members of everyone in a person's circles, +// plus all of the people in their circles. +// - "public" - Access to anyone on the web. +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusAclentryResource.m.svn-base b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusAclentryResource.m.svn-base new file mode 100644 index 0000000..79a1486 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusAclentryResource.m.svn-base @@ -0,0 +1,48 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusAclentryResource.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusAclentryResource (0 custom class methods, 3 custom properties) + +#import "GTLPlusAclentryResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLPlusAclentryResource +// + +@implementation GTLPlusAclentryResource +@dynamic displayName, identifier, type; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusActivity.h.svn-base b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusActivity.h.svn-base new file mode 100644 index 0000000..c59dcdb --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusActivity.h.svn-base @@ -0,0 +1,489 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusActivity.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusActivity (0 custom class methods, 19 custom properties) +// GTLPlusActivityActor (0 custom class methods, 5 custom properties) +// GTLPlusActivityObject (0 custom class methods, 10 custom properties) +// GTLPlusActivityProvider (0 custom class methods, 1 custom properties) +// GTLPlusActivityActorImage (0 custom class methods, 1 custom properties) +// GTLPlusActivityActorName (0 custom class methods, 2 custom properties) +// GTLPlusActivityObjectActor (0 custom class methods, 4 custom properties) +// GTLPlusActivityObjectAttachmentsItem (0 custom class methods, 9 custom properties) +// GTLPlusActivityObjectPlusoners (0 custom class methods, 2 custom properties) +// GTLPlusActivityObjectReplies (0 custom class methods, 2 custom properties) +// GTLPlusActivityObjectResharers (0 custom class methods, 2 custom properties) +// GTLPlusActivityObjectActorImage (0 custom class methods, 1 custom properties) +// GTLPlusActivityObjectAttachmentsItemEmbed (0 custom class methods, 2 custom properties) +// GTLPlusActivityObjectAttachmentsItemFullImage (0 custom class methods, 4 custom properties) +// GTLPlusActivityObjectAttachmentsItemImage (0 custom class methods, 4 custom properties) +// GTLPlusActivityObjectAttachmentsItemThumbnailsItem (0 custom class methods, 3 custom properties) +// GTLPlusActivityObjectAttachmentsItemThumbnailsItemImage (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLPlusAcl; +@class GTLPlusActivityActor; +@class GTLPlusActivityActorImage; +@class GTLPlusActivityActorName; +@class GTLPlusActivityObject; +@class GTLPlusActivityObjectActor; +@class GTLPlusActivityObjectActorImage; +@class GTLPlusActivityObjectAttachmentsItem; +@class GTLPlusActivityObjectAttachmentsItemEmbed; +@class GTLPlusActivityObjectAttachmentsItemFullImage; +@class GTLPlusActivityObjectAttachmentsItemImage; +@class GTLPlusActivityObjectAttachmentsItemThumbnailsItem; +@class GTLPlusActivityObjectAttachmentsItemThumbnailsItemImage; +@class GTLPlusActivityObjectPlusoners; +@class GTLPlusActivityObjectReplies; +@class GTLPlusActivityObjectResharers; +@class GTLPlusActivityProvider; + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivity +// + +@interface GTLPlusActivity : GTLObject + +// Identifies who has access to see this activity. +@property (retain) GTLPlusAcl *access; + +// The person who performed this activity. +@property (retain) GTLPlusActivityActor *actor; + +// Street address where this activity occurred. +@property (copy) NSString *address; + +// Additional content added by the person who shared this activity, applicable +// only when resharing an activity. +@property (copy) NSString *annotation; + +// If this activity is a crosspost from another system, this property specifies +// the ID of the original activity. +@property (copy) NSString *crosspostSource; + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// Latitude and longitude where this activity occurred. Format is latitude +// followed by longitude, space separated. +@property (copy) NSString *geocode; + +// The ID of this activity. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Identifies this resource as an activity. Value: "plus#activity". +@property (copy) NSString *kind; + +// The object of this activity. +@property (retain) GTLPlusActivityObject *object; + +// ID of the place where this activity occurred. +@property (copy) NSString *placeId; + +// Name of the place where this activity occurred. +@property (copy) NSString *placeName; + +// The service provider that initially published this activity. +@property (retain) GTLPlusActivityProvider *provider; + +// The time at which this activity was initially published. Formatted as an RFC +// 3339 timestamp. +@property (retain) GTLDateTime *published; + +// Radius, in meters, of the region where this activity occurred, centered at +// the latitude and longitude identified in geocode. +@property (copy) NSString *radius; + +// Title of this activity. +@property (copy) NSString *title; + +// The time at which this activity was last updated. Formatted as an RFC 3339 +// timestamp. +@property (retain) GTLDateTime *updated; + +// The link to this activity. +@property (copy) NSString *url; + +// This activity's verb, indicating what action was performed. Possible values +// are: +// - "checkin" - Check in to a location. +// - "post" - Publish content to the stream. +// - "share" - Reshare an activity. +@property (copy) NSString *verb; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityActor +// + +@interface GTLPlusActivityActor : GTLObject + +// The name of the actor, suitable for display. +@property (copy) NSString *displayName; + +// The ID of the actor's person resource. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The image representation of the actor. +@property (retain) GTLPlusActivityActorImage *image; + +// An object representation of the individual components of name. +@property (retain) GTLPlusActivityActorName *name; + +// The link to the actor's Google profile. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObject +// + +@interface GTLPlusActivityObject : GTLObject + +// If this activity's object is itself another activity (for example, when a +// person reshares an activity), this property specifies the original activity's +// actor. +@property (retain) GTLPlusActivityObjectActor *actor; + +// The media objects attached to this activity. +@property (retain) NSArray *attachments; // of GTLPlusActivityObjectAttachmentsItem + +// The HTML-formatted content, suitable for display. +@property (copy) NSString *content; + +// The ID of the object. When resharing an activity, this is the ID of the +// activity being reshared. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The type of the object. Possible values are: +// - "note" - Textual content. +// - "activity" - A Google+ activity. +@property (copy) NSString *objectType; + +// The content (text) as provided by the author, stored without any HTML +// formatting. When creating or updating an activity, this value must be +// supplied as plain text in the request. +@property (copy) NSString *originalContent; + +// People who +1'd this activity. +@property (retain) GTLPlusActivityObjectPlusoners *plusoners; + +// Comments in reply to this activity. +@property (retain) GTLPlusActivityObjectReplies *replies; + +// People who reshared this activity. +@property (retain) GTLPlusActivityObjectResharers *resharers; + +// The URL that points to the linked resource. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityProvider +// + +@interface GTLPlusActivityProvider : GTLObject + +// Name of the service provider. +@property (copy) NSString *title; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityActorImage +// + +@interface GTLPlusActivityActorImage : GTLObject + +// The URL of the actor's profile photo. To re-size the image and crop it to a +// square, append the query string ?sz=x, where x is the dimension in pixels of +// each side. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityActorName +// + +@interface GTLPlusActivityActorName : GTLObject + +// The family name (last name) of the actor. +@property (copy) NSString *familyName; + +// The given name (first name) of the actor. +@property (copy) NSString *givenName; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectActor +// + +@interface GTLPlusActivityObjectActor : GTLObject + +// The original actor's name, suitable for display. +@property (copy) NSString *displayName; + +// ID of the original actor. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The image representation of the original actor. +@property (retain) GTLPlusActivityObjectActorImage *image; + +// A link to the original actor's Google profile. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectAttachmentsItem +// + +@interface GTLPlusActivityObjectAttachmentsItem : GTLObject + +// If the attachment is an article, this property contains a snippet of text +// from the article. It can also include descriptions for other types. +@property (copy) NSString *content; + +// The title of the attachment (such as a photo caption or an article title). +@property (copy) NSString *displayName; + +// If the attachment is a video, the embeddable link. +@property (retain) GTLPlusActivityObjectAttachmentsItemEmbed *embed; + +// The full image URL for photo attachments. +@property (retain) GTLPlusActivityObjectAttachmentsItemFullImage *fullImage; + +// The ID of the attachment. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The preview image for photos or videos. +@property (retain) GTLPlusActivityObjectAttachmentsItemImage *image; + +@property (copy) NSString *objectType; + +// If the attachment is an album, potential additional thumbnails from the +// album. +@property (retain) NSArray *thumbnails; // of GTLPlusActivityObjectAttachmentsItemThumbnailsItem + +// The link to the attachment, should be of type text/html. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectPlusoners +// + +@interface GTLPlusActivityObjectPlusoners : GTLObject + +// The URL for the collection of people who +1'd this activity. +@property (copy) NSString *selfLink; + +// Total number of people who +1'd this activity. +@property (retain) NSNumber *totalItems; // unsignedIntValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectReplies +// + +@interface GTLPlusActivityObjectReplies : GTLObject + +// The URL for the collection of comments in reply to this activity. +@property (copy) NSString *selfLink; + +// Total number of comments on this activity. +@property (retain) NSNumber *totalItems; // unsignedIntValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectResharers +// + +@interface GTLPlusActivityObjectResharers : GTLObject + +// The URL for the collection of resharers. +@property (copy) NSString *selfLink; + +// Total number of people who reshared this activity. +@property (retain) NSNumber *totalItems; // unsignedIntValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectActorImage +// + +@interface GTLPlusActivityObjectActorImage : GTLObject + +// A URL that points to a thumbnail photo of the original actor. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectAttachmentsItemEmbed +// + +@interface GTLPlusActivityObjectAttachmentsItemEmbed : GTLObject + +// Media type of the link. +@property (copy) NSString *type; + +// URL of the link. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectAttachmentsItemFullImage +// + +@interface GTLPlusActivityObjectAttachmentsItemFullImage : GTLObject + +// The height, in pixels, of the linked resource. +@property (retain) NSNumber *height; // unsignedIntValue + +// Media type of the link. +@property (copy) NSString *type; + +// URL to the image. +@property (copy) NSString *url; + +// The width, in pixels, of the linked resource. +@property (retain) NSNumber *width; // unsignedIntValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectAttachmentsItemImage +// + +@interface GTLPlusActivityObjectAttachmentsItemImage : GTLObject + +// The height, in pixels, of the linked resource. +@property (retain) NSNumber *height; // unsignedIntValue + +// Media type of the link. +@property (copy) NSString *type; + +// Image url. +@property (copy) NSString *url; + +// The width, in pixels, of the linked resource. +@property (retain) NSNumber *width; // unsignedIntValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectAttachmentsItemThumbnailsItem +// + +@interface GTLPlusActivityObjectAttachmentsItemThumbnailsItem : GTLObject + +// Potential name of the thumbnail. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Image resource. +@property (retain) GTLPlusActivityObjectAttachmentsItemThumbnailsItemImage *image; + +// URL to the webpage containing the image. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectAttachmentsItemThumbnailsItemImage +// + +@interface GTLPlusActivityObjectAttachmentsItemThumbnailsItemImage : GTLObject + +// The height, in pixels, of the linked resource. +@property (retain) NSNumber *height; // unsignedIntValue + +// Media type of the link. +@property (copy) NSString *type; + +// Image url. +@property (copy) NSString *url; + +// The width, in pixels, of the linked resource. +@property (retain) NSNumber *width; // unsignedIntValue + +@end diff --git a/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusActivity.m.svn-base b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusActivity.m.svn-base new file mode 100644 index 0000000..7df94af --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusActivity.m.svn-base @@ -0,0 +1,290 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusActivity.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusActivity (0 custom class methods, 19 custom properties) +// GTLPlusActivityActor (0 custom class methods, 5 custom properties) +// GTLPlusActivityObject (0 custom class methods, 10 custom properties) +// GTLPlusActivityProvider (0 custom class methods, 1 custom properties) +// GTLPlusActivityActorImage (0 custom class methods, 1 custom properties) +// GTLPlusActivityActorName (0 custom class methods, 2 custom properties) +// GTLPlusActivityObjectActor (0 custom class methods, 4 custom properties) +// GTLPlusActivityObjectAttachmentsItem (0 custom class methods, 9 custom properties) +// GTLPlusActivityObjectPlusoners (0 custom class methods, 2 custom properties) +// GTLPlusActivityObjectReplies (0 custom class methods, 2 custom properties) +// GTLPlusActivityObjectResharers (0 custom class methods, 2 custom properties) +// GTLPlusActivityObjectActorImage (0 custom class methods, 1 custom properties) +// GTLPlusActivityObjectAttachmentsItemEmbed (0 custom class methods, 2 custom properties) +// GTLPlusActivityObjectAttachmentsItemFullImage (0 custom class methods, 4 custom properties) +// GTLPlusActivityObjectAttachmentsItemImage (0 custom class methods, 4 custom properties) +// GTLPlusActivityObjectAttachmentsItemThumbnailsItem (0 custom class methods, 3 custom properties) +// GTLPlusActivityObjectAttachmentsItemThumbnailsItemImage (0 custom class methods, 4 custom properties) + +#import "GTLPlusActivity.h" + +#import "GTLPlusAcl.h" + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivity +// + +@implementation GTLPlusActivity +@dynamic access, actor, address, annotation, crosspostSource, ETag, geocode, + identifier, kind, object, placeId, placeName, provider, published, + radius, title, updated, url, verb; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"plus#activity"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityActor +// + +@implementation GTLPlusActivityActor +@dynamic displayName, identifier, image, name, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObject +// + +@implementation GTLPlusActivityObject +@dynamic actor, attachments, content, identifier, objectType, originalContent, + plusoners, replies, resharers, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLPlusActivityObjectAttachmentsItem class] + forKey:@"attachments"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityProvider +// + +@implementation GTLPlusActivityProvider +@dynamic title; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityActorImage +// + +@implementation GTLPlusActivityActorImage +@dynamic url; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityActorName +// + +@implementation GTLPlusActivityActorName +@dynamic familyName, givenName; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectActor +// + +@implementation GTLPlusActivityObjectActor +@dynamic displayName, identifier, image, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectAttachmentsItem +// + +@implementation GTLPlusActivityObjectAttachmentsItem +@dynamic content, displayName, embed, fullImage, identifier, image, objectType, + thumbnails, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLPlusActivityObjectAttachmentsItemThumbnailsItem class] + forKey:@"thumbnails"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectPlusoners +// + +@implementation GTLPlusActivityObjectPlusoners +@dynamic selfLink, totalItems; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectReplies +// + +@implementation GTLPlusActivityObjectReplies +@dynamic selfLink, totalItems; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectResharers +// + +@implementation GTLPlusActivityObjectResharers +@dynamic selfLink, totalItems; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectActorImage +// + +@implementation GTLPlusActivityObjectActorImage +@dynamic url; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectAttachmentsItemEmbed +// + +@implementation GTLPlusActivityObjectAttachmentsItemEmbed +@dynamic type, url; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectAttachmentsItemFullImage +// + +@implementation GTLPlusActivityObjectAttachmentsItemFullImage +@dynamic height, type, url, width; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectAttachmentsItemImage +// + +@implementation GTLPlusActivityObjectAttachmentsItemImage +@dynamic height, type, url, width; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectAttachmentsItemThumbnailsItem +// + +@implementation GTLPlusActivityObjectAttachmentsItemThumbnailsItem +@dynamic descriptionProperty, image, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectAttachmentsItemThumbnailsItemImage +// + +@implementation GTLPlusActivityObjectAttachmentsItemThumbnailsItemImage +@dynamic height, type, url, width; +@end diff --git a/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusActivityFeed.h.svn-base b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusActivityFeed.h.svn-base new file mode 100644 index 0000000..f78a2a9 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusActivityFeed.h.svn-base @@ -0,0 +1,81 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusActivityFeed.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusActivityFeed (0 custom class methods, 9 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLPlusActivity; + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityFeed +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLPlusActivityFeed : GTLCollectionObject + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// The ID of this collection of activities. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The activities in this page of results. +@property (retain) NSArray *items; // of GTLPlusActivity + +// Identifies this resource as a collection of activities. Value: +// "plus#activityFeed". +@property (copy) NSString *kind; + +// Link to the next page of activities. +@property (copy) NSString *nextLink; + +// The continuation token, which is used to page through large result sets. +// Provide this value in a subsequent request to return the next page of +// results. +@property (copy) NSString *nextPageToken; + +// Link to this activity resource. +@property (copy) NSString *selfLink; + +// The title of this collection of activities. +@property (copy) NSString *title; + +// The time at which this collection of activities was last updated. Formatted +// as an RFC 3339 timestamp. +@property (retain) GTLDateTime *updated; + +@end diff --git a/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusActivityFeed.m.svn-base b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusActivityFeed.m.svn-base new file mode 100644 index 0000000..118f2c6 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusActivityFeed.m.svn-base @@ -0,0 +1,64 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusActivityFeed.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusActivityFeed (0 custom class methods, 9 custom properties) + +#import "GTLPlusActivityFeed.h" + +#import "GTLPlusActivity.h" + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityFeed +// + +@implementation GTLPlusActivityFeed +@dynamic ETag, identifier, items, kind, nextLink, nextPageToken, selfLink, + title, updated; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLPlusActivity class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"plus#activityFeed"]; +} + +@end diff --git a/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusComment.h.svn-base b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusComment.h.svn-base new file mode 100644 index 0000000..850e68b --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusComment.h.svn-base @@ -0,0 +1,183 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusComment.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusComment (0 custom class methods, 11 custom properties) +// GTLPlusCommentActor (0 custom class methods, 4 custom properties) +// GTLPlusCommentInReplyToItem (0 custom class methods, 2 custom properties) +// GTLPlusCommentObject (0 custom class methods, 3 custom properties) +// GTLPlusCommentPlusoners (0 custom class methods, 1 custom properties) +// GTLPlusCommentActorImage (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLPlusCommentActor; +@class GTLPlusCommentActorImage; +@class GTLPlusCommentInReplyToItem; +@class GTLPlusCommentObject; +@class GTLPlusCommentPlusoners; + +// ---------------------------------------------------------------------------- +// +// GTLPlusComment +// + +@interface GTLPlusComment : GTLObject + +// The person who posted this comment. +@property (retain) GTLPlusCommentActor *actor; + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// The ID of this comment. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The activity this comment replied to. +@property (retain) NSArray *inReplyTo; // of GTLPlusCommentInReplyToItem + +// Identifies this resource as a comment. Value: "plus#comment". +@property (copy) NSString *kind; + +// The object of this comment. +@property (retain) GTLPlusCommentObject *object; + +// People who +1'd this comment. +@property (retain) GTLPlusCommentPlusoners *plusoners; + +// The time at which this comment was initially published. Formatted as an RFC +// 3339 timestamp. +@property (retain) GTLDateTime *published; + +// Link to this comment resource. +@property (copy) NSString *selfLink; + +// The time at which this comment was last updated. Formatted as an RFC 3339 +// timestamp. +@property (retain) GTLDateTime *updated; + +// This comment's verb, indicating what action was performed. Possible values +// are: +// - "post" - Publish content to the stream. +@property (copy) NSString *verb; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusCommentActor +// + +@interface GTLPlusCommentActor : GTLObject + +// The name of this actor, suitable for display. +@property (copy) NSString *displayName; + +// The ID of the actor. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The image representation of this actor. +@property (retain) GTLPlusCommentActorImage *image; + +// A link to the person resource for this actor. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusCommentInReplyToItem +// + +@interface GTLPlusCommentInReplyToItem : GTLObject + +// The ID of the activity. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The URL of the activity. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusCommentObject +// + +@interface GTLPlusCommentObject : GTLObject + +// The HTML-formatted content, suitable for display. +@property (copy) NSString *content; + +// The object type of this comment. Possible values are: +// - "comment" - A comment in reply to an activity. +@property (copy) NSString *objectType; + +// The content (text) as provided by the author, stored without any HTML +// formatting. When creating or updating a comment, this value must be supplied +// as plain text in the request. +@property (copy) NSString *originalContent; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusCommentPlusoners +// + +@interface GTLPlusCommentPlusoners : GTLObject + +// Total number of people who +1'd this comment. +@property (retain) NSNumber *totalItems; // unsignedIntValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusCommentActorImage +// + +@interface GTLPlusCommentActorImage : GTLObject + +// The URL of the actor's profile photo. To re-size the image and crop it to a +// square, append the query string ?sz=x, where x is the dimension in pixels of +// each side. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusComment.m.svn-base b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusComment.m.svn-base new file mode 100644 index 0000000..554407e --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusComment.m.svn-base @@ -0,0 +1,133 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusComment.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusComment (0 custom class methods, 11 custom properties) +// GTLPlusCommentActor (0 custom class methods, 4 custom properties) +// GTLPlusCommentInReplyToItem (0 custom class methods, 2 custom properties) +// GTLPlusCommentObject (0 custom class methods, 3 custom properties) +// GTLPlusCommentPlusoners (0 custom class methods, 1 custom properties) +// GTLPlusCommentActorImage (0 custom class methods, 1 custom properties) + +#import "GTLPlusComment.h" + +// ---------------------------------------------------------------------------- +// +// GTLPlusComment +// + +@implementation GTLPlusComment +@dynamic actor, ETag, identifier, inReplyTo, kind, object, plusoners, published, + selfLink, updated, verb; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLPlusCommentInReplyToItem class] + forKey:@"inReplyTo"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"plus#comment"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusCommentActor +// + +@implementation GTLPlusCommentActor +@dynamic displayName, identifier, image, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusCommentInReplyToItem +// + +@implementation GTLPlusCommentInReplyToItem +@dynamic identifier, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusCommentObject +// + +@implementation GTLPlusCommentObject +@dynamic content, objectType, originalContent; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusCommentPlusoners +// + +@implementation GTLPlusCommentPlusoners +@dynamic totalItems; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusCommentActorImage +// + +@implementation GTLPlusCommentActorImage +@dynamic url; +@end diff --git a/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusCommentFeed.h.svn-base b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusCommentFeed.h.svn-base new file mode 100644 index 0000000..e02dbfe --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusCommentFeed.h.svn-base @@ -0,0 +1,78 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusCommentFeed.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusCommentFeed (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLPlusComment; + +// ---------------------------------------------------------------------------- +// +// GTLPlusCommentFeed +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLPlusCommentFeed : GTLCollectionObject + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// The ID of this collection of comments. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The comments in this page of results. +@property (retain) NSArray *items; // of GTLPlusComment + +// Identifies this resource as a collection of comments. Value: +// "plus#commentFeed". +@property (copy) NSString *kind; + +// Link to the next page of activities. +@property (copy) NSString *nextLink; + +// The continuation token, which is used to page through large result sets. +// Provide this value in a subsequent request to return the next page of +// results. +@property (copy) NSString *nextPageToken; + +// The title of this collection of comments. +@property (copy) NSString *title; + +// The time at which this collection of comments was last updated. Formatted as +// an RFC 3339 timestamp. +@property (retain) GTLDateTime *updated; + +@end diff --git a/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusCommentFeed.m.svn-base b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusCommentFeed.m.svn-base new file mode 100644 index 0000000..5cb685c --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusCommentFeed.m.svn-base @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusCommentFeed.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusCommentFeed (0 custom class methods, 8 custom properties) + +#import "GTLPlusCommentFeed.h" + +#import "GTLPlusComment.h" + +// ---------------------------------------------------------------------------- +// +// GTLPlusCommentFeed +// + +@implementation GTLPlusCommentFeed +@dynamic ETag, identifier, items, kind, nextLink, nextPageToken, title, updated; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLPlusComment class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"plus#commentFeed"]; +} + +@end diff --git a/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusConstants.h.svn-base b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusConstants.h.svn-base new file mode 100644 index 0000000..9ca8f62 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusConstants.h.svn-base @@ -0,0 +1,52 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// Know who you are on Google +GTL_EXTERN NSString * const kGTLAuthScopePlusMe; // "https://www.googleapis.com/auth/plus.me" + +// Collection +GTL_EXTERN NSString * const kGTLPlusCollectionPlusoners; // "plusoners" +GTL_EXTERN NSString * const kGTLPlusCollectionPublic; // "public" +GTL_EXTERN NSString * const kGTLPlusCollectionResharers; // "resharers" + +// OrderBy +GTL_EXTERN NSString * const kGTLPlusOrderByBest; // "best" +GTL_EXTERN NSString * const kGTLPlusOrderByRecent; // "recent" + +// SortOrder +GTL_EXTERN NSString * const kGTLPlusSortOrderAscending; // "ascending" +GTL_EXTERN NSString * const kGTLPlusSortOrderDescending; // "descending" diff --git a/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusConstants.m.svn-base b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusConstants.m.svn-base new file mode 100644 index 0000000..52073b9 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusConstants.m.svn-base @@ -0,0 +1,45 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ + +#import "GTLPlusConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopePlusMe = @"https://www.googleapis.com/auth/plus.me"; + +// Collection +NSString * const kGTLPlusCollectionPlusoners = @"plusoners"; +NSString * const kGTLPlusCollectionPublic = @"public"; +NSString * const kGTLPlusCollectionResharers = @"resharers"; + +// OrderBy +NSString * const kGTLPlusOrderByBest = @"best"; +NSString * const kGTLPlusOrderByRecent = @"recent"; + +// SortOrder +NSString * const kGTLPlusSortOrderAscending = @"ascending"; +NSString * const kGTLPlusSortOrderDescending = @"descending"; diff --git a/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusPeopleFeed.h.svn-base b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusPeopleFeed.h.svn-base new file mode 100644 index 0000000..4bd8e6b --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusPeopleFeed.h.svn-base @@ -0,0 +1,76 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusPeopleFeed.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusPeopleFeed (0 custom class methods, 7 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLPlusPerson; + +// ---------------------------------------------------------------------------- +// +// GTLPlusPeopleFeed +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLPlusPeopleFeed : GTLCollectionObject + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// The people in this page of results. Each item includes the id, displayName, +// image, and url for the person. To retrieve additional profile data, see the +// people.get method. +@property (retain) NSArray *items; // of GTLPlusPerson + +// Identifies this resource as a collection of people. Value: "plus#peopleFeed". +@property (copy) NSString *kind; + +// The continuation token, which is used to page through large result sets. +// Provide this value in a subsequent request to return the next page of +// results. +@property (copy) NSString *nextPageToken; + +// Link to this resource. +@property (copy) NSString *selfLink; + +// The title of this collection of people. +@property (copy) NSString *title; + +// The total number of people available in this list. The number of people in a +// response might be smaller due to paging. This might not be set for all +// collections. +@property (retain) NSNumber *totalItems; // intValue + +@end diff --git a/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusPeopleFeed.m.svn-base b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusPeopleFeed.m.svn-base new file mode 100644 index 0000000..cffc3db --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusPeopleFeed.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusPeopleFeed.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusPeopleFeed (0 custom class methods, 7 custom properties) + +#import "GTLPlusPeopleFeed.h" + +#import "GTLPlusPerson.h" + +// ---------------------------------------------------------------------------- +// +// GTLPlusPeopleFeed +// + +@implementation GTLPlusPeopleFeed +@dynamic ETag, items, kind, nextPageToken, selfLink, title, totalItems; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLPlusPerson class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"plus#peopleFeed"]; +} + +@end diff --git a/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusPerson.h.svn-base b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusPerson.h.svn-base new file mode 100644 index 0000000..84ed1a4 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusPerson.h.svn-base @@ -0,0 +1,361 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusPerson.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusPerson (0 custom class methods, 25 custom properties) +// GTLPlusPersonCover (0 custom class methods, 3 custom properties) +// GTLPlusPersonEmailsItem (0 custom class methods, 3 custom properties) +// GTLPlusPersonImage (0 custom class methods, 1 custom properties) +// GTLPlusPersonName (0 custom class methods, 6 custom properties) +// GTLPlusPersonOrganizationsItem (0 custom class methods, 9 custom properties) +// GTLPlusPersonPlacesLivedItem (0 custom class methods, 2 custom properties) +// GTLPlusPersonUrlsItem (0 custom class methods, 3 custom properties) +// GTLPlusPersonCoverCoverInfo (0 custom class methods, 2 custom properties) +// GTLPlusPersonCoverCoverPhoto (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLPlusPersonCover; +@class GTLPlusPersonCoverCoverInfo; +@class GTLPlusPersonCoverCoverPhoto; +@class GTLPlusPersonEmailsItem; +@class GTLPlusPersonImage; +@class GTLPlusPersonName; +@class GTLPlusPersonOrganizationsItem; +@class GTLPlusPersonPlacesLivedItem; +@class GTLPlusPersonUrlsItem; + +// ---------------------------------------------------------------------------- +// +// GTLPlusPerson +// + +@interface GTLPlusPerson : GTLObject + +// A short biography for this person. +@property (copy) NSString *aboutMe; + +// The person's date of birth, represented as YYYY-MM-DD. +@property (copy) NSString *birthday; + +// If a Google+ Page and for followers who are visible, the number of people who +// have added this page to a circle. +@property (retain) NSNumber *circledByCount; // intValue + +// The cover photo content. +@property (retain) GTLPlusPersonCover *cover; + +// The current location for this person. +@property (copy) NSString *currentLocation; + +// The name of this person, suitable for display. +@property (copy) NSString *displayName; + +// A list of email addresses for this person. +@property (retain) NSArray *emails; // of GTLPlusPersonEmailsItem + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// The person's gender. Possible values are: +// - "male" - Male gender. +// - "female" - Female gender. +// - "other" - Other. +@property (copy) NSString *gender; + +// If "true", indicates that the person has installed the app that is making the +// request and has chosen to expose this install state to the caller. A value of +// "false" indicates that the install state cannot be determined (it is either +// not installed or the person has chosen to keep this information private). +@property (retain) NSNumber *hasApp; // boolValue + +// The ID of this person. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The representation of the person's profile photo. +@property (retain) GTLPlusPersonImage *image; + +// Whether this user has signed up for Google+. +@property (retain) NSNumber *isPlusUser; // boolValue + +// Identifies this resource as a person. Value: "plus#person". +@property (copy) NSString *kind; + +// An object representation of the individual components of a person's name. +@property (retain) GTLPlusPersonName *name; + +// The nickname of this person. +@property (copy) NSString *nickname; + +// Type of person within Google+. Possible values are: +// - "person" - represents an actual person. +// - "page" - represents a page. +@property (copy) NSString *objectType; + +// A list of current or past organizations with which this person is associated. +@property (retain) NSArray *organizations; // of GTLPlusPersonOrganizationsItem + +// A list of places where this person has lived. +@property (retain) NSArray *placesLived; // of GTLPlusPersonPlacesLivedItem + +// If a Google+ Page, the number of people who have +1'ed this page. +@property (retain) NSNumber *plusOneCount; // intValue + +// The person's relationship status. Possible values are: +// - "single" - Person is single. +// - "in_a_relationship" - Person is in a relationship. +// - "engaged" - Person is engaged. +// - "married" - Person is married. +// - "its_complicated" - The relationship is complicated. +// - "open_relationship" - Person is in an open relationship. +// - "widowed" - Person is widowed. +// - "in_domestic_partnership" - Person is in a domestic partnership. +// - "in_civil_union" - Person is in a civil union. +@property (copy) NSString *relationshipStatus; + +// The brief description (tagline) of this person. +@property (copy) NSString *tagline; + +// The URL of this person's profile. +@property (copy) NSString *url; + +// A list of URLs for this person. +@property (retain) NSArray *urls; // of GTLPlusPersonUrlsItem + +// If a Google+ Page, whether it has been verified. +@property (retain) NSNumber *verified; // boolValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonCover +// + +@interface GTLPlusPersonCover : GTLObject + +// Extra information about the cover photo. +@property (retain) GTLPlusPersonCoverCoverInfo *coverInfo; + +// The person's primary cover image. +@property (retain) GTLPlusPersonCoverCoverPhoto *coverPhoto; + +// The layout of the cover art. Possible values are: +// - "banner" - One large image banner. +@property (copy) NSString *layout; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonEmailsItem +// + +@interface GTLPlusPersonEmailsItem : GTLObject + +// If "true", indicates this email address is the person's primary one. +@property (retain) NSNumber *primary; // boolValue + +// The type of address. Possible values are: +// - "home" - Home email address. +// - "work" - Work email address. +// - "other" - Other. +@property (copy) NSString *type; + +// The email address. +@property (copy) NSString *value; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonImage +// + +@interface GTLPlusPersonImage : GTLObject + +// The URL of the person's profile photo. To re-size the image and crop it to a +// square, append the query string ?sz=x, where x is the dimension in pixels of +// each side. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonName +// + +@interface GTLPlusPersonName : GTLObject + +// The family name (last name) of this person. +@property (copy) NSString *familyName; + +// The full name of this person, including middle names, suffixes, etc. +@property (copy) NSString *formatted; + +// The given name (first name) of this person. +@property (copy) NSString *givenName; + +// The honorific prefixes (such as "Dr." or "Mrs.") for this person. +@property (copy) NSString *honorificPrefix; + +// The honorific suffixes (such as "Jr.") for this person. +@property (copy) NSString *honorificSuffix; + +// The middle name of this person. +@property (copy) NSString *middleName; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonOrganizationsItem +// + +@interface GTLPlusPersonOrganizationsItem : GTLObject + +// The department within the organization. Deprecated. +@property (copy) NSString *department; + +// A short description of the person's role in this organization. Deprecated. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The date the person left this organization. +@property (copy) NSString *endDate; + +// The location of this organization. Deprecated. +@property (copy) NSString *location; + +// The name of the organization. +@property (copy) NSString *name; + +// If "true", indicates this organization is the person's primary one (typically +// interpreted as current one). +@property (retain) NSNumber *primary; // boolValue + +// The date the person joined this organization. +@property (copy) NSString *startDate; + +// The person's job title or role within the organization. +@property (copy) NSString *title; + +// The type of organization. Possible values are: +// - "work" - Work. +// - "school" - School. +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonPlacesLivedItem +// + +@interface GTLPlusPersonPlacesLivedItem : GTLObject + +// If "true", this place of residence is this person's primary residence. +@property (retain) NSNumber *primary; // boolValue + +// A place where this person has lived. For example: "Seattle, WA", "Near +// Toronto". +@property (copy) NSString *value; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonUrlsItem +// + +@interface GTLPlusPersonUrlsItem : GTLObject + +// If "true", this URL is the person's primary URL. +@property (retain) NSNumber *primary; // boolValue + +// The type of URL. Possible values are: +// - "home" - URL for home. +// - "work" - URL for work. +// - "blog" - URL for blog. +// - "profile" - URL for profile. +// - "other" - Other. +@property (copy) NSString *type; + +// The URL value. +@property (copy) NSString *value; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonCoverCoverInfo +// + +@interface GTLPlusPersonCoverCoverInfo : GTLObject + +// The difference between the left position of the image cover and the actual +// displayed cover image. Only valid for BANNER layout. +@property (retain) NSNumber *leftImageOffset; // intValue + +// The difference between the top position of the image cover and the actual +// displayed cover image. Only valid for BANNER layout. +@property (retain) NSNumber *topImageOffset; // intValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonCoverCoverPhoto +// + +@interface GTLPlusPersonCoverCoverPhoto : GTLObject + +// The height to the image. +@property (retain) NSNumber *height; // intValue + +// The url to the image. +@property (copy) NSString *url; + +// The width to the image. +@property (retain) NSNumber *width; // intValue + +@end diff --git a/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusPerson.m.svn-base b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusPerson.m.svn-base new file mode 100644 index 0000000..871f000 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlusPerson.m.svn-base @@ -0,0 +1,177 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusPerson.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusPerson (0 custom class methods, 25 custom properties) +// GTLPlusPersonCover (0 custom class methods, 3 custom properties) +// GTLPlusPersonEmailsItem (0 custom class methods, 3 custom properties) +// GTLPlusPersonImage (0 custom class methods, 1 custom properties) +// GTLPlusPersonName (0 custom class methods, 6 custom properties) +// GTLPlusPersonOrganizationsItem (0 custom class methods, 9 custom properties) +// GTLPlusPersonPlacesLivedItem (0 custom class methods, 2 custom properties) +// GTLPlusPersonUrlsItem (0 custom class methods, 3 custom properties) +// GTLPlusPersonCoverCoverInfo (0 custom class methods, 2 custom properties) +// GTLPlusPersonCoverCoverPhoto (0 custom class methods, 3 custom properties) + +#import "GTLPlusPerson.h" + +// ---------------------------------------------------------------------------- +// +// GTLPlusPerson +// + +@implementation GTLPlusPerson +@dynamic aboutMe, birthday, circledByCount, cover, currentLocation, displayName, + emails, ETag, gender, hasApp, identifier, image, isPlusUser, kind, + name, nickname, objectType, organizations, placesLived, plusOneCount, + relationshipStatus, tagline, url, urls, verified; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLPlusPersonEmailsItem class], @"emails", + [GTLPlusPersonOrganizationsItem class], @"organizations", + [GTLPlusPersonPlacesLivedItem class], @"placesLived", + [GTLPlusPersonUrlsItem class], @"urls", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"plus#person"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonCover +// + +@implementation GTLPlusPersonCover +@dynamic coverInfo, coverPhoto, layout; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonEmailsItem +// + +@implementation GTLPlusPersonEmailsItem +@dynamic primary, type, value; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonImage +// + +@implementation GTLPlusPersonImage +@dynamic url; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonName +// + +@implementation GTLPlusPersonName +@dynamic familyName, formatted, givenName, honorificPrefix, honorificSuffix, + middleName; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonOrganizationsItem +// + +@implementation GTLPlusPersonOrganizationsItem +@dynamic department, descriptionProperty, endDate, location, name, primary, + startDate, title, type; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonPlacesLivedItem +// + +@implementation GTLPlusPersonPlacesLivedItem +@dynamic primary, value; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonUrlsItem +// + +@implementation GTLPlusPersonUrlsItem +@dynamic primary, type, value; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonCoverCoverInfo +// + +@implementation GTLPlusPersonCoverCoverInfo +@dynamic leftImageOffset, topImageOffset; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonCoverCoverPhoto +// + +@implementation GTLPlusPersonCoverCoverPhoto +@dynamic height, url, width; +@end diff --git a/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlus_Sources.m.svn-base b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlus_Sources.m.svn-base new file mode 100644 index 0000000..7b054c2 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLPlus_Sources.m.svn-base @@ -0,0 +1,44 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlus_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ + +#import "GTLPlusConstants.m" + +#import "GTLPlusAcl.m" +#import "GTLPlusAclentryResource.m" +#import "GTLPlusActivity.m" +#import "GTLPlusActivityFeed.m" +#import "GTLPlusComment.m" +#import "GTLPlusCommentFeed.m" +#import "GTLPlusPeopleFeed.m" +#import "GTLPlusPerson.m" + +#import "GTLQueryPlus.m" +#import "GTLServicePlus.m" diff --git a/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLQueryPlus.h.svn-base b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLQueryPlus.h.svn-base new file mode 100644 index 0000000..d1e0bb2 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLQueryPlus.h.svn-base @@ -0,0 +1,208 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryPlus.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLQueryPlus (8 custom class methods, 11 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@interface GTLQueryPlus : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *activityId; +@property (copy) NSString *collection; +@property (copy) NSString *commentId; +@property (copy) NSString *language; +@property (assign) NSUInteger maxResults; +@property (copy) NSString *orderBy; +@property (copy) NSString *pageToken; +@property (copy) NSString *query; +@property (copy) NSString *sortOrder; +@property (copy) NSString *userId; + +#pragma mark - +#pragma mark "activities" methods +// These create a GTLQueryPlus object. + +// Method: plus.activities.get +// Get an activity. +// Required: +// activityId: The ID of the activity to get. +// Authorization scope(s): +// kGTLAuthScopePlusMe +// Fetches a GTLPlusActivity. ++ (id)queryForActivitiesGetWithActivityId:(NSString *)activityId; + +// Method: plus.activities.list +// List all of the activities in the specified collection for a particular user. +// Required: +// userId: The ID of the user to get activities for. The special value "me" +// can be used to indicate the authenticated user. +// collection: The collection of activities to list. +// kGTLPlusCollectionPublic: All public activities created by the specified +// user. +// Optional: +// maxResults: The maximum number of activities to include in the response, +// which is used for paging. For any response, the actual number returned +// might be less than the specified maxResults. (1..100, default 20) +// pageToken: The continuation token, which is used to page through large +// result sets. To get the next page of results, set this parameter to the +// value of "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopePlusMe +// Fetches a GTLPlusActivityFeed. ++ (id)queryForActivitiesListWithUserId:(NSString *)userId + collection:(NSString *)collection; + +// Method: plus.activities.search +// Search public activities. +// Required: +// query: Full-text search query string. +// Optional: +// language: Specify the preferred language to search with. See search +// language codes for available values. (Default en-US) +// maxResults: The maximum number of activities to include in the response, +// which is used for paging. For any response, the actual number returned +// might be less than the specified maxResults. (1..20, default 10) +// orderBy: Specifies how to order search results. (Default +// kGTLPlusOrderByRecent) +// kGTLPlusOrderByBest: Sort activities by relevance to the user, most +// relevant first. +// kGTLPlusOrderByRecent: Sort activities by published date, most recent +// first. +// pageToken: The continuation token, which is used to page through large +// result sets. To get the next page of results, set this parameter to the +// value of "nextPageToken" from the previous response. This token can be of +// any length. +// Authorization scope(s): +// kGTLAuthScopePlusMe +// Fetches a GTLPlusActivityFeed. ++ (id)queryForActivitiesSearchWithQuery:(NSString *)query; + +#pragma mark - +#pragma mark "comments" methods +// These create a GTLQueryPlus object. + +// Method: plus.comments.get +// Get a comment. +// Required: +// commentId: The ID of the comment to get. +// Authorization scope(s): +// kGTLAuthScopePlusMe +// Fetches a GTLPlusComment. ++ (id)queryForCommentsGetWithCommentId:(NSString *)commentId; + +// Method: plus.comments.list +// List all of the comments for an activity. +// Required: +// activityId: The ID of the activity to get comments for. +// Optional: +// maxResults: The maximum number of comments to include in the response, +// which is used for paging. For any response, the actual number returned +// might be less than the specified maxResults. (0..500, default 20) +// pageToken: The continuation token, which is used to page through large +// result sets. To get the next page of results, set this parameter to the +// value of "nextPageToken" from the previous response. +// sortOrder: The order in which to sort the list of comments. (Default +// kGTLPlusSortOrderAscending) +// kGTLPlusSortOrderAscending: Sort oldest comments first. +// kGTLPlusSortOrderDescending: Sort newest comments first. +// Authorization scope(s): +// kGTLAuthScopePlusMe +// Fetches a GTLPlusCommentFeed. ++ (id)queryForCommentsListWithActivityId:(NSString *)activityId; + +#pragma mark - +#pragma mark "people" methods +// These create a GTLQueryPlus object. + +// Method: plus.people.get +// Get a person's profile. +// Required: +// userId: The ID of the person to get the profile for. The special value "me" +// can be used to indicate the authenticated user. +// Authorization scope(s): +// kGTLAuthScopePlusMe +// Fetches a GTLPlusPerson. ++ (id)queryForPeopleGetWithUserId:(NSString *)userId; + +// Method: plus.people.listByActivity +// List all of the people in the specified collection for a particular activity. +// Required: +// activityId: The ID of the activity to get the list of people for. +// collection: The collection of people to list. +// kGTLPlusCollectionPlusoners: List all people who have +1'd this +// activity. +// kGTLPlusCollectionResharers: List all people who have reshared this +// activity. +// Optional: +// maxResults: The maximum number of people to include in the response, which +// is used for paging. For any response, the actual number returned might be +// less than the specified maxResults. (1..100, default 20) +// pageToken: The continuation token, which is used to page through large +// result sets. To get the next page of results, set this parameter to the +// value of "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopePlusMe +// Fetches a GTLPlusPeopleFeed. ++ (id)queryForPeopleListByActivityWithActivityId:(NSString *)activityId + collection:(NSString *)collection; + +// Method: plus.people.search +// Search all public profiles. +// Required: +// query: Specify a query string for full text search of public text in all +// profiles. +// Optional: +// language: Specify the preferred language to search with. See search +// language codes for available values. (Default en-US) +// maxResults: The maximum number of people to include in the response, which +// is used for paging. For any response, the actual number returned might be +// less than the specified maxResults. (1..20, default 10) +// pageToken: The continuation token, which is used to page through large +// result sets. To get the next page of results, set this parameter to the +// value of "nextPageToken" from the previous response. This token can be of +// any length. +// Authorization scope(s): +// kGTLAuthScopePlusMe +// Fetches a GTLPlusPeopleFeed. ++ (id)queryForPeopleSearchWithQuery:(NSString *)query; + +@end diff --git a/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLQueryPlus.m.svn-base b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLQueryPlus.m.svn-base new file mode 100644 index 0000000..07c06ed --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLQueryPlus.m.svn-base @@ -0,0 +1,125 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryPlus.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLQueryPlus (8 custom class methods, 11 custom properties) + +#import "GTLQueryPlus.h" + +#import "GTLPlusActivity.h" +#import "GTLPlusActivityFeed.h" +#import "GTLPlusComment.h" +#import "GTLPlusCommentFeed.h" +#import "GTLPlusPeopleFeed.h" +#import "GTLPlusPerson.h" + +@implementation GTLQueryPlus + +@dynamic activityId, collection, commentId, fields, language, maxResults, + orderBy, pageToken, query, sortOrder, userId; + +#pragma mark - +#pragma mark "activities" methods +// These create a GTLQueryPlus object. + ++ (id)queryForActivitiesGetWithActivityId:(NSString *)activityId { + NSString *methodName = @"plus.activities.get"; + GTLQueryPlus *query = [self queryWithMethodName:methodName]; + query.activityId = activityId; + query.expectedObjectClass = [GTLPlusActivity class]; + return query; +} + ++ (id)queryForActivitiesListWithUserId:(NSString *)userId + collection:(NSString *)collection { + NSString *methodName = @"plus.activities.list"; + GTLQueryPlus *query = [self queryWithMethodName:methodName]; + query.userId = userId; + query.collection = collection; + query.expectedObjectClass = [GTLPlusActivityFeed class]; + return query; +} + ++ (id)queryForActivitiesSearchWithQuery:(NSString *)query_param { + NSString *methodName = @"plus.activities.search"; + GTLQueryPlus *query = [self queryWithMethodName:methodName]; + query.query = query_param; + query.expectedObjectClass = [GTLPlusActivityFeed class]; + return query; +} + +#pragma mark - +#pragma mark "comments" methods +// These create a GTLQueryPlus object. + ++ (id)queryForCommentsGetWithCommentId:(NSString *)commentId { + NSString *methodName = @"plus.comments.get"; + GTLQueryPlus *query = [self queryWithMethodName:methodName]; + query.commentId = commentId; + query.expectedObjectClass = [GTLPlusComment class]; + return query; +} + ++ (id)queryForCommentsListWithActivityId:(NSString *)activityId { + NSString *methodName = @"plus.comments.list"; + GTLQueryPlus *query = [self queryWithMethodName:methodName]; + query.activityId = activityId; + query.expectedObjectClass = [GTLPlusCommentFeed class]; + return query; +} + +#pragma mark - +#pragma mark "people" methods +// These create a GTLQueryPlus object. + ++ (id)queryForPeopleGetWithUserId:(NSString *)userId { + NSString *methodName = @"plus.people.get"; + GTLQueryPlus *query = [self queryWithMethodName:methodName]; + query.userId = userId; + query.expectedObjectClass = [GTLPlusPerson class]; + return query; +} + ++ (id)queryForPeopleListByActivityWithActivityId:(NSString *)activityId + collection:(NSString *)collection { + NSString *methodName = @"plus.people.listByActivity"; + GTLQueryPlus *query = [self queryWithMethodName:methodName]; + query.activityId = activityId; + query.collection = collection; + query.expectedObjectClass = [GTLPlusPeopleFeed class]; + return query; +} + ++ (id)queryForPeopleSearchWithQuery:(NSString *)query_param { + NSString *methodName = @"plus.people.search"; + GTLQueryPlus *query = [self queryWithMethodName:methodName]; + query.query = query_param; + query.expectedObjectClass = [GTLPlusPeopleFeed class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLServicePlus.h.svn-base b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLServicePlus.h.svn-base new file mode 100644 index 0000000..f9d87ce --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLServicePlus.h.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServicePlus.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLServicePlus (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServicePlus : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryPlus.h. The query can the be sent with GTLService's execute methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLServicePlus.m.svn-base b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLServicePlus.m.svn-base new file mode 100644 index 0000000..0be455d --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/.svn/text-base/GTLServicePlus.m.svn-base @@ -0,0 +1,68 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServicePlus.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLServicePlus (0 custom class methods, 0 custom properties) + +#import "GTLPlus.h" + +@implementation GTLServicePlus + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryPlus class], + [GTLPlusAcl class], + [GTLPlusAclentryResource class], + [GTLPlusActivity class], + [GTLPlusActivityFeed class], + [GTLPlusComment class], + [GTLPlusCommentFeed class], + [GTLPlusPeopleFeed class], + [GTLPlusPerson class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v1"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Plus/Generated/GTLPlus.h b/GTL/Source/Services/Plus/Generated/GTLPlus.h new file mode 100644 index 0000000..020e214 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/GTLPlus.h @@ -0,0 +1,41 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlus.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ + +#import "GTLPlusConstants.h" + +#import "GTLPlusAcl.h" +#import "GTLPlusAclentryResource.h" +#import "GTLPlusActivity.h" +#import "GTLPlusActivityFeed.h" +#import "GTLPlusComment.h" +#import "GTLPlusCommentFeed.h" +#import "GTLPlusPeopleFeed.h" +#import "GTLPlusPerson.h" + +#import "GTLQueryPlus.h" +#import "GTLServicePlus.h" diff --git a/GTL/Source/Services/Plus/Generated/GTLPlusAcl.h b/GTL/Source/Services/Plus/Generated/GTLPlusAcl.h new file mode 100644 index 0000000..36be975 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/GTLPlusAcl.h @@ -0,0 +1,60 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusAcl.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusAcl (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLPlusAclentryResource; + +// ---------------------------------------------------------------------------- +// +// GTLPlusAcl +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLPlusAcl : GTLCollectionObject + +// Description of the access granted, suitable for display. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The list of access entries. +@property (retain) NSArray *items; // of GTLPlusAclentryResource + +// Identifies this resource as a collection of access controls. Value: +// "plus#acl". +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Plus/Generated/GTLPlusAcl.m b/GTL/Source/Services/Plus/Generated/GTLPlusAcl.m new file mode 100644 index 0000000..f463ec8 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/GTLPlusAcl.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusAcl.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusAcl (0 custom class methods, 3 custom properties) + +#import "GTLPlusAcl.h" + +#import "GTLPlusAclentryResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLPlusAcl +// + +@implementation GTLPlusAcl +@dynamic descriptionProperty, items, kind; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLPlusAclentryResource class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"plus#acl"]; +} + +@end diff --git a/GTL/Source/Services/Plus/Generated/GTLPlusAclentryResource.h b/GTL/Source/Services/Plus/Generated/GTLPlusAclentryResource.h new file mode 100644 index 0000000..bd5e5f3 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/GTLPlusAclentryResource.h @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusAclentryResource.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusAclentryResource (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLPlusAclentryResource +// + +@interface GTLPlusAclentryResource : GTLObject + +// A descriptive name for this entry. Suitable for display. +@property (copy) NSString *displayName; + +// The ID of the entry. For entries of type "person" or "circle", this is the ID +// of the resource. For other types, this property is not set. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The type of entry describing to whom access is granted. Possible values are: +// - "person" - Access to an individual. +// - "circle" - Access to members of a circle. +// - "myCircles" - Access to members of all the person's circles. +// - "extendedCircles" - Access to members of everyone in a person's circles, +// plus all of the people in their circles. +// - "public" - Access to anyone on the web. +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/Plus/Generated/GTLPlusAclentryResource.m b/GTL/Source/Services/Plus/Generated/GTLPlusAclentryResource.m new file mode 100644 index 0000000..79a1486 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/GTLPlusAclentryResource.m @@ -0,0 +1,48 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusAclentryResource.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusAclentryResource (0 custom class methods, 3 custom properties) + +#import "GTLPlusAclentryResource.h" + +// ---------------------------------------------------------------------------- +// +// GTLPlusAclentryResource +// + +@implementation GTLPlusAclentryResource +@dynamic displayName, identifier, type; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Plus/Generated/GTLPlusActivity.h b/GTL/Source/Services/Plus/Generated/GTLPlusActivity.h new file mode 100644 index 0000000..c59dcdb --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/GTLPlusActivity.h @@ -0,0 +1,489 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusActivity.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusActivity (0 custom class methods, 19 custom properties) +// GTLPlusActivityActor (0 custom class methods, 5 custom properties) +// GTLPlusActivityObject (0 custom class methods, 10 custom properties) +// GTLPlusActivityProvider (0 custom class methods, 1 custom properties) +// GTLPlusActivityActorImage (0 custom class methods, 1 custom properties) +// GTLPlusActivityActorName (0 custom class methods, 2 custom properties) +// GTLPlusActivityObjectActor (0 custom class methods, 4 custom properties) +// GTLPlusActivityObjectAttachmentsItem (0 custom class methods, 9 custom properties) +// GTLPlusActivityObjectPlusoners (0 custom class methods, 2 custom properties) +// GTLPlusActivityObjectReplies (0 custom class methods, 2 custom properties) +// GTLPlusActivityObjectResharers (0 custom class methods, 2 custom properties) +// GTLPlusActivityObjectActorImage (0 custom class methods, 1 custom properties) +// GTLPlusActivityObjectAttachmentsItemEmbed (0 custom class methods, 2 custom properties) +// GTLPlusActivityObjectAttachmentsItemFullImage (0 custom class methods, 4 custom properties) +// GTLPlusActivityObjectAttachmentsItemImage (0 custom class methods, 4 custom properties) +// GTLPlusActivityObjectAttachmentsItemThumbnailsItem (0 custom class methods, 3 custom properties) +// GTLPlusActivityObjectAttachmentsItemThumbnailsItemImage (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLPlusAcl; +@class GTLPlusActivityActor; +@class GTLPlusActivityActorImage; +@class GTLPlusActivityActorName; +@class GTLPlusActivityObject; +@class GTLPlusActivityObjectActor; +@class GTLPlusActivityObjectActorImage; +@class GTLPlusActivityObjectAttachmentsItem; +@class GTLPlusActivityObjectAttachmentsItemEmbed; +@class GTLPlusActivityObjectAttachmentsItemFullImage; +@class GTLPlusActivityObjectAttachmentsItemImage; +@class GTLPlusActivityObjectAttachmentsItemThumbnailsItem; +@class GTLPlusActivityObjectAttachmentsItemThumbnailsItemImage; +@class GTLPlusActivityObjectPlusoners; +@class GTLPlusActivityObjectReplies; +@class GTLPlusActivityObjectResharers; +@class GTLPlusActivityProvider; + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivity +// + +@interface GTLPlusActivity : GTLObject + +// Identifies who has access to see this activity. +@property (retain) GTLPlusAcl *access; + +// The person who performed this activity. +@property (retain) GTLPlusActivityActor *actor; + +// Street address where this activity occurred. +@property (copy) NSString *address; + +// Additional content added by the person who shared this activity, applicable +// only when resharing an activity. +@property (copy) NSString *annotation; + +// If this activity is a crosspost from another system, this property specifies +// the ID of the original activity. +@property (copy) NSString *crosspostSource; + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// Latitude and longitude where this activity occurred. Format is latitude +// followed by longitude, space separated. +@property (copy) NSString *geocode; + +// The ID of this activity. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Identifies this resource as an activity. Value: "plus#activity". +@property (copy) NSString *kind; + +// The object of this activity. +@property (retain) GTLPlusActivityObject *object; + +// ID of the place where this activity occurred. +@property (copy) NSString *placeId; + +// Name of the place where this activity occurred. +@property (copy) NSString *placeName; + +// The service provider that initially published this activity. +@property (retain) GTLPlusActivityProvider *provider; + +// The time at which this activity was initially published. Formatted as an RFC +// 3339 timestamp. +@property (retain) GTLDateTime *published; + +// Radius, in meters, of the region where this activity occurred, centered at +// the latitude and longitude identified in geocode. +@property (copy) NSString *radius; + +// Title of this activity. +@property (copy) NSString *title; + +// The time at which this activity was last updated. Formatted as an RFC 3339 +// timestamp. +@property (retain) GTLDateTime *updated; + +// The link to this activity. +@property (copy) NSString *url; + +// This activity's verb, indicating what action was performed. Possible values +// are: +// - "checkin" - Check in to a location. +// - "post" - Publish content to the stream. +// - "share" - Reshare an activity. +@property (copy) NSString *verb; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityActor +// + +@interface GTLPlusActivityActor : GTLObject + +// The name of the actor, suitable for display. +@property (copy) NSString *displayName; + +// The ID of the actor's person resource. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The image representation of the actor. +@property (retain) GTLPlusActivityActorImage *image; + +// An object representation of the individual components of name. +@property (retain) GTLPlusActivityActorName *name; + +// The link to the actor's Google profile. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObject +// + +@interface GTLPlusActivityObject : GTLObject + +// If this activity's object is itself another activity (for example, when a +// person reshares an activity), this property specifies the original activity's +// actor. +@property (retain) GTLPlusActivityObjectActor *actor; + +// The media objects attached to this activity. +@property (retain) NSArray *attachments; // of GTLPlusActivityObjectAttachmentsItem + +// The HTML-formatted content, suitable for display. +@property (copy) NSString *content; + +// The ID of the object. When resharing an activity, this is the ID of the +// activity being reshared. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The type of the object. Possible values are: +// - "note" - Textual content. +// - "activity" - A Google+ activity. +@property (copy) NSString *objectType; + +// The content (text) as provided by the author, stored without any HTML +// formatting. When creating or updating an activity, this value must be +// supplied as plain text in the request. +@property (copy) NSString *originalContent; + +// People who +1'd this activity. +@property (retain) GTLPlusActivityObjectPlusoners *plusoners; + +// Comments in reply to this activity. +@property (retain) GTLPlusActivityObjectReplies *replies; + +// People who reshared this activity. +@property (retain) GTLPlusActivityObjectResharers *resharers; + +// The URL that points to the linked resource. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityProvider +// + +@interface GTLPlusActivityProvider : GTLObject + +// Name of the service provider. +@property (copy) NSString *title; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityActorImage +// + +@interface GTLPlusActivityActorImage : GTLObject + +// The URL of the actor's profile photo. To re-size the image and crop it to a +// square, append the query string ?sz=x, where x is the dimension in pixels of +// each side. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityActorName +// + +@interface GTLPlusActivityActorName : GTLObject + +// The family name (last name) of the actor. +@property (copy) NSString *familyName; + +// The given name (first name) of the actor. +@property (copy) NSString *givenName; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectActor +// + +@interface GTLPlusActivityObjectActor : GTLObject + +// The original actor's name, suitable for display. +@property (copy) NSString *displayName; + +// ID of the original actor. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The image representation of the original actor. +@property (retain) GTLPlusActivityObjectActorImage *image; + +// A link to the original actor's Google profile. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectAttachmentsItem +// + +@interface GTLPlusActivityObjectAttachmentsItem : GTLObject + +// If the attachment is an article, this property contains a snippet of text +// from the article. It can also include descriptions for other types. +@property (copy) NSString *content; + +// The title of the attachment (such as a photo caption or an article title). +@property (copy) NSString *displayName; + +// If the attachment is a video, the embeddable link. +@property (retain) GTLPlusActivityObjectAttachmentsItemEmbed *embed; + +// The full image URL for photo attachments. +@property (retain) GTLPlusActivityObjectAttachmentsItemFullImage *fullImage; + +// The ID of the attachment. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The preview image for photos or videos. +@property (retain) GTLPlusActivityObjectAttachmentsItemImage *image; + +@property (copy) NSString *objectType; + +// If the attachment is an album, potential additional thumbnails from the +// album. +@property (retain) NSArray *thumbnails; // of GTLPlusActivityObjectAttachmentsItemThumbnailsItem + +// The link to the attachment, should be of type text/html. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectPlusoners +// + +@interface GTLPlusActivityObjectPlusoners : GTLObject + +// The URL for the collection of people who +1'd this activity. +@property (copy) NSString *selfLink; + +// Total number of people who +1'd this activity. +@property (retain) NSNumber *totalItems; // unsignedIntValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectReplies +// + +@interface GTLPlusActivityObjectReplies : GTLObject + +// The URL for the collection of comments in reply to this activity. +@property (copy) NSString *selfLink; + +// Total number of comments on this activity. +@property (retain) NSNumber *totalItems; // unsignedIntValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectResharers +// + +@interface GTLPlusActivityObjectResharers : GTLObject + +// The URL for the collection of resharers. +@property (copy) NSString *selfLink; + +// Total number of people who reshared this activity. +@property (retain) NSNumber *totalItems; // unsignedIntValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectActorImage +// + +@interface GTLPlusActivityObjectActorImage : GTLObject + +// A URL that points to a thumbnail photo of the original actor. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectAttachmentsItemEmbed +// + +@interface GTLPlusActivityObjectAttachmentsItemEmbed : GTLObject + +// Media type of the link. +@property (copy) NSString *type; + +// URL of the link. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectAttachmentsItemFullImage +// + +@interface GTLPlusActivityObjectAttachmentsItemFullImage : GTLObject + +// The height, in pixels, of the linked resource. +@property (retain) NSNumber *height; // unsignedIntValue + +// Media type of the link. +@property (copy) NSString *type; + +// URL to the image. +@property (copy) NSString *url; + +// The width, in pixels, of the linked resource. +@property (retain) NSNumber *width; // unsignedIntValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectAttachmentsItemImage +// + +@interface GTLPlusActivityObjectAttachmentsItemImage : GTLObject + +// The height, in pixels, of the linked resource. +@property (retain) NSNumber *height; // unsignedIntValue + +// Media type of the link. +@property (copy) NSString *type; + +// Image url. +@property (copy) NSString *url; + +// The width, in pixels, of the linked resource. +@property (retain) NSNumber *width; // unsignedIntValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectAttachmentsItemThumbnailsItem +// + +@interface GTLPlusActivityObjectAttachmentsItemThumbnailsItem : GTLObject + +// Potential name of the thumbnail. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Image resource. +@property (retain) GTLPlusActivityObjectAttachmentsItemThumbnailsItemImage *image; + +// URL to the webpage containing the image. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectAttachmentsItemThumbnailsItemImage +// + +@interface GTLPlusActivityObjectAttachmentsItemThumbnailsItemImage : GTLObject + +// The height, in pixels, of the linked resource. +@property (retain) NSNumber *height; // unsignedIntValue + +// Media type of the link. +@property (copy) NSString *type; + +// Image url. +@property (copy) NSString *url; + +// The width, in pixels, of the linked resource. +@property (retain) NSNumber *width; // unsignedIntValue + +@end diff --git a/GTL/Source/Services/Plus/Generated/GTLPlusActivity.m b/GTL/Source/Services/Plus/Generated/GTLPlusActivity.m new file mode 100644 index 0000000..7df94af --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/GTLPlusActivity.m @@ -0,0 +1,290 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusActivity.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusActivity (0 custom class methods, 19 custom properties) +// GTLPlusActivityActor (0 custom class methods, 5 custom properties) +// GTLPlusActivityObject (0 custom class methods, 10 custom properties) +// GTLPlusActivityProvider (0 custom class methods, 1 custom properties) +// GTLPlusActivityActorImage (0 custom class methods, 1 custom properties) +// GTLPlusActivityActorName (0 custom class methods, 2 custom properties) +// GTLPlusActivityObjectActor (0 custom class methods, 4 custom properties) +// GTLPlusActivityObjectAttachmentsItem (0 custom class methods, 9 custom properties) +// GTLPlusActivityObjectPlusoners (0 custom class methods, 2 custom properties) +// GTLPlusActivityObjectReplies (0 custom class methods, 2 custom properties) +// GTLPlusActivityObjectResharers (0 custom class methods, 2 custom properties) +// GTLPlusActivityObjectActorImage (0 custom class methods, 1 custom properties) +// GTLPlusActivityObjectAttachmentsItemEmbed (0 custom class methods, 2 custom properties) +// GTLPlusActivityObjectAttachmentsItemFullImage (0 custom class methods, 4 custom properties) +// GTLPlusActivityObjectAttachmentsItemImage (0 custom class methods, 4 custom properties) +// GTLPlusActivityObjectAttachmentsItemThumbnailsItem (0 custom class methods, 3 custom properties) +// GTLPlusActivityObjectAttachmentsItemThumbnailsItemImage (0 custom class methods, 4 custom properties) + +#import "GTLPlusActivity.h" + +#import "GTLPlusAcl.h" + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivity +// + +@implementation GTLPlusActivity +@dynamic access, actor, address, annotation, crosspostSource, ETag, geocode, + identifier, kind, object, placeId, placeName, provider, published, + radius, title, updated, url, verb; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"plus#activity"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityActor +// + +@implementation GTLPlusActivityActor +@dynamic displayName, identifier, image, name, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObject +// + +@implementation GTLPlusActivityObject +@dynamic actor, attachments, content, identifier, objectType, originalContent, + plusoners, replies, resharers, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLPlusActivityObjectAttachmentsItem class] + forKey:@"attachments"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityProvider +// + +@implementation GTLPlusActivityProvider +@dynamic title; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityActorImage +// + +@implementation GTLPlusActivityActorImage +@dynamic url; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityActorName +// + +@implementation GTLPlusActivityActorName +@dynamic familyName, givenName; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectActor +// + +@implementation GTLPlusActivityObjectActor +@dynamic displayName, identifier, image, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectAttachmentsItem +// + +@implementation GTLPlusActivityObjectAttachmentsItem +@dynamic content, displayName, embed, fullImage, identifier, image, objectType, + thumbnails, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLPlusActivityObjectAttachmentsItemThumbnailsItem class] + forKey:@"thumbnails"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectPlusoners +// + +@implementation GTLPlusActivityObjectPlusoners +@dynamic selfLink, totalItems; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectReplies +// + +@implementation GTLPlusActivityObjectReplies +@dynamic selfLink, totalItems; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectResharers +// + +@implementation GTLPlusActivityObjectResharers +@dynamic selfLink, totalItems; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectActorImage +// + +@implementation GTLPlusActivityObjectActorImage +@dynamic url; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectAttachmentsItemEmbed +// + +@implementation GTLPlusActivityObjectAttachmentsItemEmbed +@dynamic type, url; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectAttachmentsItemFullImage +// + +@implementation GTLPlusActivityObjectAttachmentsItemFullImage +@dynamic height, type, url, width; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectAttachmentsItemImage +// + +@implementation GTLPlusActivityObjectAttachmentsItemImage +@dynamic height, type, url, width; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectAttachmentsItemThumbnailsItem +// + +@implementation GTLPlusActivityObjectAttachmentsItemThumbnailsItem +@dynamic descriptionProperty, image, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityObjectAttachmentsItemThumbnailsItemImage +// + +@implementation GTLPlusActivityObjectAttachmentsItemThumbnailsItemImage +@dynamic height, type, url, width; +@end diff --git a/GTL/Source/Services/Plus/Generated/GTLPlusActivityFeed.h b/GTL/Source/Services/Plus/Generated/GTLPlusActivityFeed.h new file mode 100644 index 0000000..f78a2a9 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/GTLPlusActivityFeed.h @@ -0,0 +1,81 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusActivityFeed.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusActivityFeed (0 custom class methods, 9 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLPlusActivity; + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityFeed +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLPlusActivityFeed : GTLCollectionObject + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// The ID of this collection of activities. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The activities in this page of results. +@property (retain) NSArray *items; // of GTLPlusActivity + +// Identifies this resource as a collection of activities. Value: +// "plus#activityFeed". +@property (copy) NSString *kind; + +// Link to the next page of activities. +@property (copy) NSString *nextLink; + +// The continuation token, which is used to page through large result sets. +// Provide this value in a subsequent request to return the next page of +// results. +@property (copy) NSString *nextPageToken; + +// Link to this activity resource. +@property (copy) NSString *selfLink; + +// The title of this collection of activities. +@property (copy) NSString *title; + +// The time at which this collection of activities was last updated. Formatted +// as an RFC 3339 timestamp. +@property (retain) GTLDateTime *updated; + +@end diff --git a/GTL/Source/Services/Plus/Generated/GTLPlusActivityFeed.m b/GTL/Source/Services/Plus/Generated/GTLPlusActivityFeed.m new file mode 100644 index 0000000..118f2c6 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/GTLPlusActivityFeed.m @@ -0,0 +1,64 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusActivityFeed.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusActivityFeed (0 custom class methods, 9 custom properties) + +#import "GTLPlusActivityFeed.h" + +#import "GTLPlusActivity.h" + +// ---------------------------------------------------------------------------- +// +// GTLPlusActivityFeed +// + +@implementation GTLPlusActivityFeed +@dynamic ETag, identifier, items, kind, nextLink, nextPageToken, selfLink, + title, updated; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLPlusActivity class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"plus#activityFeed"]; +} + +@end diff --git a/GTL/Source/Services/Plus/Generated/GTLPlusComment.h b/GTL/Source/Services/Plus/Generated/GTLPlusComment.h new file mode 100644 index 0000000..850e68b --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/GTLPlusComment.h @@ -0,0 +1,183 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusComment.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusComment (0 custom class methods, 11 custom properties) +// GTLPlusCommentActor (0 custom class methods, 4 custom properties) +// GTLPlusCommentInReplyToItem (0 custom class methods, 2 custom properties) +// GTLPlusCommentObject (0 custom class methods, 3 custom properties) +// GTLPlusCommentPlusoners (0 custom class methods, 1 custom properties) +// GTLPlusCommentActorImage (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLPlusCommentActor; +@class GTLPlusCommentActorImage; +@class GTLPlusCommentInReplyToItem; +@class GTLPlusCommentObject; +@class GTLPlusCommentPlusoners; + +// ---------------------------------------------------------------------------- +// +// GTLPlusComment +// + +@interface GTLPlusComment : GTLObject + +// The person who posted this comment. +@property (retain) GTLPlusCommentActor *actor; + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// The ID of this comment. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The activity this comment replied to. +@property (retain) NSArray *inReplyTo; // of GTLPlusCommentInReplyToItem + +// Identifies this resource as a comment. Value: "plus#comment". +@property (copy) NSString *kind; + +// The object of this comment. +@property (retain) GTLPlusCommentObject *object; + +// People who +1'd this comment. +@property (retain) GTLPlusCommentPlusoners *plusoners; + +// The time at which this comment was initially published. Formatted as an RFC +// 3339 timestamp. +@property (retain) GTLDateTime *published; + +// Link to this comment resource. +@property (copy) NSString *selfLink; + +// The time at which this comment was last updated. Formatted as an RFC 3339 +// timestamp. +@property (retain) GTLDateTime *updated; + +// This comment's verb, indicating what action was performed. Possible values +// are: +// - "post" - Publish content to the stream. +@property (copy) NSString *verb; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusCommentActor +// + +@interface GTLPlusCommentActor : GTLObject + +// The name of this actor, suitable for display. +@property (copy) NSString *displayName; + +// The ID of the actor. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The image representation of this actor. +@property (retain) GTLPlusCommentActorImage *image; + +// A link to the person resource for this actor. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusCommentInReplyToItem +// + +@interface GTLPlusCommentInReplyToItem : GTLObject + +// The ID of the activity. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The URL of the activity. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusCommentObject +// + +@interface GTLPlusCommentObject : GTLObject + +// The HTML-formatted content, suitable for display. +@property (copy) NSString *content; + +// The object type of this comment. Possible values are: +// - "comment" - A comment in reply to an activity. +@property (copy) NSString *objectType; + +// The content (text) as provided by the author, stored without any HTML +// formatting. When creating or updating a comment, this value must be supplied +// as plain text in the request. +@property (copy) NSString *originalContent; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusCommentPlusoners +// + +@interface GTLPlusCommentPlusoners : GTLObject + +// Total number of people who +1'd this comment. +@property (retain) NSNumber *totalItems; // unsignedIntValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusCommentActorImage +// + +@interface GTLPlusCommentActorImage : GTLObject + +// The URL of the actor's profile photo. To re-size the image and crop it to a +// square, append the query string ?sz=x, where x is the dimension in pixels of +// each side. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/Plus/Generated/GTLPlusComment.m b/GTL/Source/Services/Plus/Generated/GTLPlusComment.m new file mode 100644 index 0000000..554407e --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/GTLPlusComment.m @@ -0,0 +1,133 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusComment.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusComment (0 custom class methods, 11 custom properties) +// GTLPlusCommentActor (0 custom class methods, 4 custom properties) +// GTLPlusCommentInReplyToItem (0 custom class methods, 2 custom properties) +// GTLPlusCommentObject (0 custom class methods, 3 custom properties) +// GTLPlusCommentPlusoners (0 custom class methods, 1 custom properties) +// GTLPlusCommentActorImage (0 custom class methods, 1 custom properties) + +#import "GTLPlusComment.h" + +// ---------------------------------------------------------------------------- +// +// GTLPlusComment +// + +@implementation GTLPlusComment +@dynamic actor, ETag, identifier, inReplyTo, kind, object, plusoners, published, + selfLink, updated, verb; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLPlusCommentInReplyToItem class] + forKey:@"inReplyTo"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"plus#comment"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusCommentActor +// + +@implementation GTLPlusCommentActor +@dynamic displayName, identifier, image, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusCommentInReplyToItem +// + +@implementation GTLPlusCommentInReplyToItem +@dynamic identifier, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusCommentObject +// + +@implementation GTLPlusCommentObject +@dynamic content, objectType, originalContent; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusCommentPlusoners +// + +@implementation GTLPlusCommentPlusoners +@dynamic totalItems; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusCommentActorImage +// + +@implementation GTLPlusCommentActorImage +@dynamic url; +@end diff --git a/GTL/Source/Services/Plus/Generated/GTLPlusCommentFeed.h b/GTL/Source/Services/Plus/Generated/GTLPlusCommentFeed.h new file mode 100644 index 0000000..e02dbfe --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/GTLPlusCommentFeed.h @@ -0,0 +1,78 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusCommentFeed.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusCommentFeed (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLPlusComment; + +// ---------------------------------------------------------------------------- +// +// GTLPlusCommentFeed +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLPlusCommentFeed : GTLCollectionObject + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// The ID of this collection of comments. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The comments in this page of results. +@property (retain) NSArray *items; // of GTLPlusComment + +// Identifies this resource as a collection of comments. Value: +// "plus#commentFeed". +@property (copy) NSString *kind; + +// Link to the next page of activities. +@property (copy) NSString *nextLink; + +// The continuation token, which is used to page through large result sets. +// Provide this value in a subsequent request to return the next page of +// results. +@property (copy) NSString *nextPageToken; + +// The title of this collection of comments. +@property (copy) NSString *title; + +// The time at which this collection of comments was last updated. Formatted as +// an RFC 3339 timestamp. +@property (retain) GTLDateTime *updated; + +@end diff --git a/GTL/Source/Services/Plus/Generated/GTLPlusCommentFeed.m b/GTL/Source/Services/Plus/Generated/GTLPlusCommentFeed.m new file mode 100644 index 0000000..5cb685c --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/GTLPlusCommentFeed.m @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusCommentFeed.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusCommentFeed (0 custom class methods, 8 custom properties) + +#import "GTLPlusCommentFeed.h" + +#import "GTLPlusComment.h" + +// ---------------------------------------------------------------------------- +// +// GTLPlusCommentFeed +// + +@implementation GTLPlusCommentFeed +@dynamic ETag, identifier, items, kind, nextLink, nextPageToken, title, updated; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLPlusComment class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"plus#commentFeed"]; +} + +@end diff --git a/GTL/Source/Services/Plus/Generated/GTLPlusConstants.h b/GTL/Source/Services/Plus/Generated/GTLPlusConstants.h new file mode 100644 index 0000000..9ca8f62 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/GTLPlusConstants.h @@ -0,0 +1,52 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// Know who you are on Google +GTL_EXTERN NSString * const kGTLAuthScopePlusMe; // "https://www.googleapis.com/auth/plus.me" + +// Collection +GTL_EXTERN NSString * const kGTLPlusCollectionPlusoners; // "plusoners" +GTL_EXTERN NSString * const kGTLPlusCollectionPublic; // "public" +GTL_EXTERN NSString * const kGTLPlusCollectionResharers; // "resharers" + +// OrderBy +GTL_EXTERN NSString * const kGTLPlusOrderByBest; // "best" +GTL_EXTERN NSString * const kGTLPlusOrderByRecent; // "recent" + +// SortOrder +GTL_EXTERN NSString * const kGTLPlusSortOrderAscending; // "ascending" +GTL_EXTERN NSString * const kGTLPlusSortOrderDescending; // "descending" diff --git a/GTL/Source/Services/Plus/Generated/GTLPlusConstants.m b/GTL/Source/Services/Plus/Generated/GTLPlusConstants.m new file mode 100644 index 0000000..52073b9 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/GTLPlusConstants.m @@ -0,0 +1,45 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ + +#import "GTLPlusConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopePlusMe = @"https://www.googleapis.com/auth/plus.me"; + +// Collection +NSString * const kGTLPlusCollectionPlusoners = @"plusoners"; +NSString * const kGTLPlusCollectionPublic = @"public"; +NSString * const kGTLPlusCollectionResharers = @"resharers"; + +// OrderBy +NSString * const kGTLPlusOrderByBest = @"best"; +NSString * const kGTLPlusOrderByRecent = @"recent"; + +// SortOrder +NSString * const kGTLPlusSortOrderAscending = @"ascending"; +NSString * const kGTLPlusSortOrderDescending = @"descending"; diff --git a/GTL/Source/Services/Plus/Generated/GTLPlusPeopleFeed.h b/GTL/Source/Services/Plus/Generated/GTLPlusPeopleFeed.h new file mode 100644 index 0000000..4bd8e6b --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/GTLPlusPeopleFeed.h @@ -0,0 +1,76 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusPeopleFeed.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusPeopleFeed (0 custom class methods, 7 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLPlusPerson; + +// ---------------------------------------------------------------------------- +// +// GTLPlusPeopleFeed +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLPlusPeopleFeed : GTLCollectionObject + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// The people in this page of results. Each item includes the id, displayName, +// image, and url for the person. To retrieve additional profile data, see the +// people.get method. +@property (retain) NSArray *items; // of GTLPlusPerson + +// Identifies this resource as a collection of people. Value: "plus#peopleFeed". +@property (copy) NSString *kind; + +// The continuation token, which is used to page through large result sets. +// Provide this value in a subsequent request to return the next page of +// results. +@property (copy) NSString *nextPageToken; + +// Link to this resource. +@property (copy) NSString *selfLink; + +// The title of this collection of people. +@property (copy) NSString *title; + +// The total number of people available in this list. The number of people in a +// response might be smaller due to paging. This might not be set for all +// collections. +@property (retain) NSNumber *totalItems; // intValue + +@end diff --git a/GTL/Source/Services/Plus/Generated/GTLPlusPeopleFeed.m b/GTL/Source/Services/Plus/Generated/GTLPlusPeopleFeed.m new file mode 100644 index 0000000..cffc3db --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/GTLPlusPeopleFeed.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusPeopleFeed.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusPeopleFeed (0 custom class methods, 7 custom properties) + +#import "GTLPlusPeopleFeed.h" + +#import "GTLPlusPerson.h" + +// ---------------------------------------------------------------------------- +// +// GTLPlusPeopleFeed +// + +@implementation GTLPlusPeopleFeed +@dynamic ETag, items, kind, nextPageToken, selfLink, title, totalItems; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLPlusPerson class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"plus#peopleFeed"]; +} + +@end diff --git a/GTL/Source/Services/Plus/Generated/GTLPlusPerson.h b/GTL/Source/Services/Plus/Generated/GTLPlusPerson.h new file mode 100644 index 0000000..84ed1a4 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/GTLPlusPerson.h @@ -0,0 +1,361 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusPerson.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusPerson (0 custom class methods, 25 custom properties) +// GTLPlusPersonCover (0 custom class methods, 3 custom properties) +// GTLPlusPersonEmailsItem (0 custom class methods, 3 custom properties) +// GTLPlusPersonImage (0 custom class methods, 1 custom properties) +// GTLPlusPersonName (0 custom class methods, 6 custom properties) +// GTLPlusPersonOrganizationsItem (0 custom class methods, 9 custom properties) +// GTLPlusPersonPlacesLivedItem (0 custom class methods, 2 custom properties) +// GTLPlusPersonUrlsItem (0 custom class methods, 3 custom properties) +// GTLPlusPersonCoverCoverInfo (0 custom class methods, 2 custom properties) +// GTLPlusPersonCoverCoverPhoto (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLPlusPersonCover; +@class GTLPlusPersonCoverCoverInfo; +@class GTLPlusPersonCoverCoverPhoto; +@class GTLPlusPersonEmailsItem; +@class GTLPlusPersonImage; +@class GTLPlusPersonName; +@class GTLPlusPersonOrganizationsItem; +@class GTLPlusPersonPlacesLivedItem; +@class GTLPlusPersonUrlsItem; + +// ---------------------------------------------------------------------------- +// +// GTLPlusPerson +// + +@interface GTLPlusPerson : GTLObject + +// A short biography for this person. +@property (copy) NSString *aboutMe; + +// The person's date of birth, represented as YYYY-MM-DD. +@property (copy) NSString *birthday; + +// If a Google+ Page and for followers who are visible, the number of people who +// have added this page to a circle. +@property (retain) NSNumber *circledByCount; // intValue + +// The cover photo content. +@property (retain) GTLPlusPersonCover *cover; + +// The current location for this person. +@property (copy) NSString *currentLocation; + +// The name of this person, suitable for display. +@property (copy) NSString *displayName; + +// A list of email addresses for this person. +@property (retain) NSArray *emails; // of GTLPlusPersonEmailsItem + +// ETag of this response for caching purposes. +@property (copy) NSString *ETag; + +// The person's gender. Possible values are: +// - "male" - Male gender. +// - "female" - Female gender. +// - "other" - Other. +@property (copy) NSString *gender; + +// If "true", indicates that the person has installed the app that is making the +// request and has chosen to expose this install state to the caller. A value of +// "false" indicates that the install state cannot be determined (it is either +// not installed or the person has chosen to keep this information private). +@property (retain) NSNumber *hasApp; // boolValue + +// The ID of this person. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The representation of the person's profile photo. +@property (retain) GTLPlusPersonImage *image; + +// Whether this user has signed up for Google+. +@property (retain) NSNumber *isPlusUser; // boolValue + +// Identifies this resource as a person. Value: "plus#person". +@property (copy) NSString *kind; + +// An object representation of the individual components of a person's name. +@property (retain) GTLPlusPersonName *name; + +// The nickname of this person. +@property (copy) NSString *nickname; + +// Type of person within Google+. Possible values are: +// - "person" - represents an actual person. +// - "page" - represents a page. +@property (copy) NSString *objectType; + +// A list of current or past organizations with which this person is associated. +@property (retain) NSArray *organizations; // of GTLPlusPersonOrganizationsItem + +// A list of places where this person has lived. +@property (retain) NSArray *placesLived; // of GTLPlusPersonPlacesLivedItem + +// If a Google+ Page, the number of people who have +1'ed this page. +@property (retain) NSNumber *plusOneCount; // intValue + +// The person's relationship status. Possible values are: +// - "single" - Person is single. +// - "in_a_relationship" - Person is in a relationship. +// - "engaged" - Person is engaged. +// - "married" - Person is married. +// - "its_complicated" - The relationship is complicated. +// - "open_relationship" - Person is in an open relationship. +// - "widowed" - Person is widowed. +// - "in_domestic_partnership" - Person is in a domestic partnership. +// - "in_civil_union" - Person is in a civil union. +@property (copy) NSString *relationshipStatus; + +// The brief description (tagline) of this person. +@property (copy) NSString *tagline; + +// The URL of this person's profile. +@property (copy) NSString *url; + +// A list of URLs for this person. +@property (retain) NSArray *urls; // of GTLPlusPersonUrlsItem + +// If a Google+ Page, whether it has been verified. +@property (retain) NSNumber *verified; // boolValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonCover +// + +@interface GTLPlusPersonCover : GTLObject + +// Extra information about the cover photo. +@property (retain) GTLPlusPersonCoverCoverInfo *coverInfo; + +// The person's primary cover image. +@property (retain) GTLPlusPersonCoverCoverPhoto *coverPhoto; + +// The layout of the cover art. Possible values are: +// - "banner" - One large image banner. +@property (copy) NSString *layout; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonEmailsItem +// + +@interface GTLPlusPersonEmailsItem : GTLObject + +// If "true", indicates this email address is the person's primary one. +@property (retain) NSNumber *primary; // boolValue + +// The type of address. Possible values are: +// - "home" - Home email address. +// - "work" - Work email address. +// - "other" - Other. +@property (copy) NSString *type; + +// The email address. +@property (copy) NSString *value; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonImage +// + +@interface GTLPlusPersonImage : GTLObject + +// The URL of the person's profile photo. To re-size the image and crop it to a +// square, append the query string ?sz=x, where x is the dimension in pixels of +// each side. +@property (copy) NSString *url; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonName +// + +@interface GTLPlusPersonName : GTLObject + +// The family name (last name) of this person. +@property (copy) NSString *familyName; + +// The full name of this person, including middle names, suffixes, etc. +@property (copy) NSString *formatted; + +// The given name (first name) of this person. +@property (copy) NSString *givenName; + +// The honorific prefixes (such as "Dr." or "Mrs.") for this person. +@property (copy) NSString *honorificPrefix; + +// The honorific suffixes (such as "Jr.") for this person. +@property (copy) NSString *honorificSuffix; + +// The middle name of this person. +@property (copy) NSString *middleName; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonOrganizationsItem +// + +@interface GTLPlusPersonOrganizationsItem : GTLObject + +// The department within the organization. Deprecated. +@property (copy) NSString *department; + +// A short description of the person's role in this organization. Deprecated. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The date the person left this organization. +@property (copy) NSString *endDate; + +// The location of this organization. Deprecated. +@property (copy) NSString *location; + +// The name of the organization. +@property (copy) NSString *name; + +// If "true", indicates this organization is the person's primary one (typically +// interpreted as current one). +@property (retain) NSNumber *primary; // boolValue + +// The date the person joined this organization. +@property (copy) NSString *startDate; + +// The person's job title or role within the organization. +@property (copy) NSString *title; + +// The type of organization. Possible values are: +// - "work" - Work. +// - "school" - School. +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonPlacesLivedItem +// + +@interface GTLPlusPersonPlacesLivedItem : GTLObject + +// If "true", this place of residence is this person's primary residence. +@property (retain) NSNumber *primary; // boolValue + +// A place where this person has lived. For example: "Seattle, WA", "Near +// Toronto". +@property (copy) NSString *value; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonUrlsItem +// + +@interface GTLPlusPersonUrlsItem : GTLObject + +// If "true", this URL is the person's primary URL. +@property (retain) NSNumber *primary; // boolValue + +// The type of URL. Possible values are: +// - "home" - URL for home. +// - "work" - URL for work. +// - "blog" - URL for blog. +// - "profile" - URL for profile. +// - "other" - Other. +@property (copy) NSString *type; + +// The URL value. +@property (copy) NSString *value; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonCoverCoverInfo +// + +@interface GTLPlusPersonCoverCoverInfo : GTLObject + +// The difference between the left position of the image cover and the actual +// displayed cover image. Only valid for BANNER layout. +@property (retain) NSNumber *leftImageOffset; // intValue + +// The difference between the top position of the image cover and the actual +// displayed cover image. Only valid for BANNER layout. +@property (retain) NSNumber *topImageOffset; // intValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonCoverCoverPhoto +// + +@interface GTLPlusPersonCoverCoverPhoto : GTLObject + +// The height to the image. +@property (retain) NSNumber *height; // intValue + +// The url to the image. +@property (copy) NSString *url; + +// The width to the image. +@property (retain) NSNumber *width; // intValue + +@end diff --git a/GTL/Source/Services/Plus/Generated/GTLPlusPerson.m b/GTL/Source/Services/Plus/Generated/GTLPlusPerson.m new file mode 100644 index 0000000..871f000 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/GTLPlusPerson.m @@ -0,0 +1,177 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlusPerson.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLPlusPerson (0 custom class methods, 25 custom properties) +// GTLPlusPersonCover (0 custom class methods, 3 custom properties) +// GTLPlusPersonEmailsItem (0 custom class methods, 3 custom properties) +// GTLPlusPersonImage (0 custom class methods, 1 custom properties) +// GTLPlusPersonName (0 custom class methods, 6 custom properties) +// GTLPlusPersonOrganizationsItem (0 custom class methods, 9 custom properties) +// GTLPlusPersonPlacesLivedItem (0 custom class methods, 2 custom properties) +// GTLPlusPersonUrlsItem (0 custom class methods, 3 custom properties) +// GTLPlusPersonCoverCoverInfo (0 custom class methods, 2 custom properties) +// GTLPlusPersonCoverCoverPhoto (0 custom class methods, 3 custom properties) + +#import "GTLPlusPerson.h" + +// ---------------------------------------------------------------------------- +// +// GTLPlusPerson +// + +@implementation GTLPlusPerson +@dynamic aboutMe, birthday, circledByCount, cover, currentLocation, displayName, + emails, ETag, gender, hasApp, identifier, image, isPlusUser, kind, + name, nickname, objectType, organizations, placesLived, plusOneCount, + relationshipStatus, tagline, url, urls, verified; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLPlusPersonEmailsItem class], @"emails", + [GTLPlusPersonOrganizationsItem class], @"organizations", + [GTLPlusPersonPlacesLivedItem class], @"placesLived", + [GTLPlusPersonUrlsItem class], @"urls", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"plus#person"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonCover +// + +@implementation GTLPlusPersonCover +@dynamic coverInfo, coverPhoto, layout; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonEmailsItem +// + +@implementation GTLPlusPersonEmailsItem +@dynamic primary, type, value; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonImage +// + +@implementation GTLPlusPersonImage +@dynamic url; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonName +// + +@implementation GTLPlusPersonName +@dynamic familyName, formatted, givenName, honorificPrefix, honorificSuffix, + middleName; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonOrganizationsItem +// + +@implementation GTLPlusPersonOrganizationsItem +@dynamic department, descriptionProperty, endDate, location, name, primary, + startDate, title, type; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonPlacesLivedItem +// + +@implementation GTLPlusPersonPlacesLivedItem +@dynamic primary, value; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonUrlsItem +// + +@implementation GTLPlusPersonUrlsItem +@dynamic primary, type, value; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonCoverCoverInfo +// + +@implementation GTLPlusPersonCoverCoverInfo +@dynamic leftImageOffset, topImageOffset; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLPlusPersonCoverCoverPhoto +// + +@implementation GTLPlusPersonCoverCoverPhoto +@dynamic height, url, width; +@end diff --git a/GTL/Source/Services/Plus/Generated/GTLPlus_Sources.m b/GTL/Source/Services/Plus/Generated/GTLPlus_Sources.m new file mode 100644 index 0000000..7b054c2 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/GTLPlus_Sources.m @@ -0,0 +1,44 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLPlus_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ + +#import "GTLPlusConstants.m" + +#import "GTLPlusAcl.m" +#import "GTLPlusAclentryResource.m" +#import "GTLPlusActivity.m" +#import "GTLPlusActivityFeed.m" +#import "GTLPlusComment.m" +#import "GTLPlusCommentFeed.m" +#import "GTLPlusPeopleFeed.m" +#import "GTLPlusPerson.m" + +#import "GTLQueryPlus.m" +#import "GTLServicePlus.m" diff --git a/GTL/Source/Services/Plus/Generated/GTLQueryPlus.h b/GTL/Source/Services/Plus/Generated/GTLQueryPlus.h new file mode 100644 index 0000000..d1e0bb2 --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/GTLQueryPlus.h @@ -0,0 +1,208 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryPlus.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLQueryPlus (8 custom class methods, 11 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@interface GTLQueryPlus : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *activityId; +@property (copy) NSString *collection; +@property (copy) NSString *commentId; +@property (copy) NSString *language; +@property (assign) NSUInteger maxResults; +@property (copy) NSString *orderBy; +@property (copy) NSString *pageToken; +@property (copy) NSString *query; +@property (copy) NSString *sortOrder; +@property (copy) NSString *userId; + +#pragma mark - +#pragma mark "activities" methods +// These create a GTLQueryPlus object. + +// Method: plus.activities.get +// Get an activity. +// Required: +// activityId: The ID of the activity to get. +// Authorization scope(s): +// kGTLAuthScopePlusMe +// Fetches a GTLPlusActivity. ++ (id)queryForActivitiesGetWithActivityId:(NSString *)activityId; + +// Method: plus.activities.list +// List all of the activities in the specified collection for a particular user. +// Required: +// userId: The ID of the user to get activities for. The special value "me" +// can be used to indicate the authenticated user. +// collection: The collection of activities to list. +// kGTLPlusCollectionPublic: All public activities created by the specified +// user. +// Optional: +// maxResults: The maximum number of activities to include in the response, +// which is used for paging. For any response, the actual number returned +// might be less than the specified maxResults. (1..100, default 20) +// pageToken: The continuation token, which is used to page through large +// result sets. To get the next page of results, set this parameter to the +// value of "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopePlusMe +// Fetches a GTLPlusActivityFeed. ++ (id)queryForActivitiesListWithUserId:(NSString *)userId + collection:(NSString *)collection; + +// Method: plus.activities.search +// Search public activities. +// Required: +// query: Full-text search query string. +// Optional: +// language: Specify the preferred language to search with. See search +// language codes for available values. (Default en-US) +// maxResults: The maximum number of activities to include in the response, +// which is used for paging. For any response, the actual number returned +// might be less than the specified maxResults. (1..20, default 10) +// orderBy: Specifies how to order search results. (Default +// kGTLPlusOrderByRecent) +// kGTLPlusOrderByBest: Sort activities by relevance to the user, most +// relevant first. +// kGTLPlusOrderByRecent: Sort activities by published date, most recent +// first. +// pageToken: The continuation token, which is used to page through large +// result sets. To get the next page of results, set this parameter to the +// value of "nextPageToken" from the previous response. This token can be of +// any length. +// Authorization scope(s): +// kGTLAuthScopePlusMe +// Fetches a GTLPlusActivityFeed. ++ (id)queryForActivitiesSearchWithQuery:(NSString *)query; + +#pragma mark - +#pragma mark "comments" methods +// These create a GTLQueryPlus object. + +// Method: plus.comments.get +// Get a comment. +// Required: +// commentId: The ID of the comment to get. +// Authorization scope(s): +// kGTLAuthScopePlusMe +// Fetches a GTLPlusComment. ++ (id)queryForCommentsGetWithCommentId:(NSString *)commentId; + +// Method: plus.comments.list +// List all of the comments for an activity. +// Required: +// activityId: The ID of the activity to get comments for. +// Optional: +// maxResults: The maximum number of comments to include in the response, +// which is used for paging. For any response, the actual number returned +// might be less than the specified maxResults. (0..500, default 20) +// pageToken: The continuation token, which is used to page through large +// result sets. To get the next page of results, set this parameter to the +// value of "nextPageToken" from the previous response. +// sortOrder: The order in which to sort the list of comments. (Default +// kGTLPlusSortOrderAscending) +// kGTLPlusSortOrderAscending: Sort oldest comments first. +// kGTLPlusSortOrderDescending: Sort newest comments first. +// Authorization scope(s): +// kGTLAuthScopePlusMe +// Fetches a GTLPlusCommentFeed. ++ (id)queryForCommentsListWithActivityId:(NSString *)activityId; + +#pragma mark - +#pragma mark "people" methods +// These create a GTLQueryPlus object. + +// Method: plus.people.get +// Get a person's profile. +// Required: +// userId: The ID of the person to get the profile for. The special value "me" +// can be used to indicate the authenticated user. +// Authorization scope(s): +// kGTLAuthScopePlusMe +// Fetches a GTLPlusPerson. ++ (id)queryForPeopleGetWithUserId:(NSString *)userId; + +// Method: plus.people.listByActivity +// List all of the people in the specified collection for a particular activity. +// Required: +// activityId: The ID of the activity to get the list of people for. +// collection: The collection of people to list. +// kGTLPlusCollectionPlusoners: List all people who have +1'd this +// activity. +// kGTLPlusCollectionResharers: List all people who have reshared this +// activity. +// Optional: +// maxResults: The maximum number of people to include in the response, which +// is used for paging. For any response, the actual number returned might be +// less than the specified maxResults. (1..100, default 20) +// pageToken: The continuation token, which is used to page through large +// result sets. To get the next page of results, set this parameter to the +// value of "nextPageToken" from the previous response. +// Authorization scope(s): +// kGTLAuthScopePlusMe +// Fetches a GTLPlusPeopleFeed. ++ (id)queryForPeopleListByActivityWithActivityId:(NSString *)activityId + collection:(NSString *)collection; + +// Method: plus.people.search +// Search all public profiles. +// Required: +// query: Specify a query string for full text search of public text in all +// profiles. +// Optional: +// language: Specify the preferred language to search with. See search +// language codes for available values. (Default en-US) +// maxResults: The maximum number of people to include in the response, which +// is used for paging. For any response, the actual number returned might be +// less than the specified maxResults. (1..20, default 10) +// pageToken: The continuation token, which is used to page through large +// result sets. To get the next page of results, set this parameter to the +// value of "nextPageToken" from the previous response. This token can be of +// any length. +// Authorization scope(s): +// kGTLAuthScopePlusMe +// Fetches a GTLPlusPeopleFeed. ++ (id)queryForPeopleSearchWithQuery:(NSString *)query; + +@end diff --git a/GTL/Source/Services/Plus/Generated/GTLQueryPlus.m b/GTL/Source/Services/Plus/Generated/GTLQueryPlus.m new file mode 100644 index 0000000..07c06ed --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/GTLQueryPlus.m @@ -0,0 +1,125 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryPlus.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLQueryPlus (8 custom class methods, 11 custom properties) + +#import "GTLQueryPlus.h" + +#import "GTLPlusActivity.h" +#import "GTLPlusActivityFeed.h" +#import "GTLPlusComment.h" +#import "GTLPlusCommentFeed.h" +#import "GTLPlusPeopleFeed.h" +#import "GTLPlusPerson.h" + +@implementation GTLQueryPlus + +@dynamic activityId, collection, commentId, fields, language, maxResults, + orderBy, pageToken, query, sortOrder, userId; + +#pragma mark - +#pragma mark "activities" methods +// These create a GTLQueryPlus object. + ++ (id)queryForActivitiesGetWithActivityId:(NSString *)activityId { + NSString *methodName = @"plus.activities.get"; + GTLQueryPlus *query = [self queryWithMethodName:methodName]; + query.activityId = activityId; + query.expectedObjectClass = [GTLPlusActivity class]; + return query; +} + ++ (id)queryForActivitiesListWithUserId:(NSString *)userId + collection:(NSString *)collection { + NSString *methodName = @"plus.activities.list"; + GTLQueryPlus *query = [self queryWithMethodName:methodName]; + query.userId = userId; + query.collection = collection; + query.expectedObjectClass = [GTLPlusActivityFeed class]; + return query; +} + ++ (id)queryForActivitiesSearchWithQuery:(NSString *)query_param { + NSString *methodName = @"plus.activities.search"; + GTLQueryPlus *query = [self queryWithMethodName:methodName]; + query.query = query_param; + query.expectedObjectClass = [GTLPlusActivityFeed class]; + return query; +} + +#pragma mark - +#pragma mark "comments" methods +// These create a GTLQueryPlus object. + ++ (id)queryForCommentsGetWithCommentId:(NSString *)commentId { + NSString *methodName = @"plus.comments.get"; + GTLQueryPlus *query = [self queryWithMethodName:methodName]; + query.commentId = commentId; + query.expectedObjectClass = [GTLPlusComment class]; + return query; +} + ++ (id)queryForCommentsListWithActivityId:(NSString *)activityId { + NSString *methodName = @"plus.comments.list"; + GTLQueryPlus *query = [self queryWithMethodName:methodName]; + query.activityId = activityId; + query.expectedObjectClass = [GTLPlusCommentFeed class]; + return query; +} + +#pragma mark - +#pragma mark "people" methods +// These create a GTLQueryPlus object. + ++ (id)queryForPeopleGetWithUserId:(NSString *)userId { + NSString *methodName = @"plus.people.get"; + GTLQueryPlus *query = [self queryWithMethodName:methodName]; + query.userId = userId; + query.expectedObjectClass = [GTLPlusPerson class]; + return query; +} + ++ (id)queryForPeopleListByActivityWithActivityId:(NSString *)activityId + collection:(NSString *)collection { + NSString *methodName = @"plus.people.listByActivity"; + GTLQueryPlus *query = [self queryWithMethodName:methodName]; + query.activityId = activityId; + query.collection = collection; + query.expectedObjectClass = [GTLPlusPeopleFeed class]; + return query; +} + ++ (id)queryForPeopleSearchWithQuery:(NSString *)query_param { + NSString *methodName = @"plus.people.search"; + GTLQueryPlus *query = [self queryWithMethodName:methodName]; + query.query = query_param; + query.expectedObjectClass = [GTLPlusPeopleFeed class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Plus/Generated/GTLServicePlus.h b/GTL/Source/Services/Plus/Generated/GTLServicePlus.h new file mode 100644 index 0000000..f9d87ce --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/GTLServicePlus.h @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServicePlus.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLServicePlus (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServicePlus : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryPlus.h. The query can the be sent with GTLService's execute methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Plus/Generated/GTLServicePlus.m b/GTL/Source/Services/Plus/Generated/GTLServicePlus.m new file mode 100644 index 0000000..0be455d --- /dev/null +++ b/GTL/Source/Services/Plus/Generated/GTLServicePlus.m @@ -0,0 +1,68 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServicePlus.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Google+ API (plus/v1) +// Description: +// The Google+ API enables developers to build on top of the Google+ platform. +// Documentation: +// https://developers.google.com/+/api/ +// Classes: +// GTLServicePlus (0 custom class methods, 0 custom properties) + +#import "GTLPlus.h" + +@implementation GTLServicePlus + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryPlus class], + [GTLPlusAcl class], + [GTLPlusAclentryResource class], + [GTLPlusActivity class], + [GTLPlusActivityFeed class], + [GTLPlusComment class], + [GTLPlusCommentFeed class], + [GTLPlusPeopleFeed class], + [GTLPlusPerson class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v1"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Shopping/.svn/all-wcprops b/GTL/Source/Services/Shopping/.svn/all-wcprops new file mode 100644 index 0000000..cbf396a --- /dev/null +++ b/GTL/Source/Services/Shopping/.svn/all-wcprops @@ -0,0 +1,5 @@ +K 25 +svn:wc:ra_dav:version-url +V 48 +/svn/!svn/ver/247/trunk/Source/Services/Shopping +END diff --git a/GTL/Source/Services/Shopping/.svn/entries b/GTL/Source/Services/Shopping/.svn/entries new file mode 100644 index 0000000..fdd7e66 --- /dev/null +++ b/GTL/Source/Services/Shopping/.svn/entries @@ -0,0 +1,31 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Shopping +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-12-06T21:08:58.644964Z +247 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +Generated +dir + diff --git a/GTL/Source/Services/Shopping/Generated/.svn/all-wcprops b/GTL/Source/Services/Shopping/Generated/.svn/all-wcprops new file mode 100644 index 0000000..0d58967 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/.svn/all-wcprops @@ -0,0 +1,137 @@ +K 25 +svn:wc:ra_dav:version-url +V 58 +/svn/!svn/ver/247/trunk/Source/Services/Shopping/Generated +END +GTLQueryShopping.m +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/247/trunk/Source/Services/Shopping/Generated/GTLQueryShopping.m +END +GTLShoppingConstants.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/208/trunk/Source/Services/Shopping/Generated/GTLShoppingConstants.h +END +GTLShoppingModelDebug.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/208/trunk/Source/Services/Shopping/Generated/GTLShoppingModelDebug.m +END +GTLShoppingModelRecommendations.m +K 25 +svn:wc:ra_dav:version-url +V 92 +/svn/!svn/ver/208/trunk/Source/Services/Shopping/Generated/GTLShoppingModelRecommendations.m +END +GTLShopping.h +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/247/trunk/Source/Services/Shopping/Generated/GTLShopping.h +END +GTLShoppingProduct.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/232/trunk/Source/Services/Shopping/Generated/GTLShoppingProduct.h +END +GTLShoppingConstants.m +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/208/trunk/Source/Services/Shopping/Generated/GTLShoppingConstants.m +END +GTLShoppingProduct.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/208/trunk/Source/Services/Shopping/Generated/GTLShoppingProduct.m +END +GTLShoppingModelExtras.h +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/247/trunk/Source/Services/Shopping/Generated/GTLShoppingModelExtras.h +END +GTLShopping_Sources.m +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/247/trunk/Source/Services/Shopping/Generated/GTLShopping_Sources.m +END +GTLShoppingModelExtras.m +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/247/trunk/Source/Services/Shopping/Generated/GTLShoppingModelExtras.m +END +GTLShoppingModelCategory.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/!svn/ver/208/trunk/Source/Services/Shopping/Generated/GTLShoppingModelCategory.h +END +GTLServiceShopping.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/208/trunk/Source/Services/Shopping/Generated/GTLServiceShopping.h +END +GTLShoppingModelProduct.h +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/!svn/ver/208/trunk/Source/Services/Shopping/Generated/GTLShoppingModelProduct.h +END +GTLShoppingProducts.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/247/trunk/Source/Services/Shopping/Generated/GTLShoppingProducts.h +END +GTLShoppingModelCategory.m +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/!svn/ver/208/trunk/Source/Services/Shopping/Generated/GTLShoppingModelCategory.m +END +GTLServiceShopping.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/247/trunk/Source/Services/Shopping/Generated/GTLServiceShopping.m +END +GTLQueryShopping.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/247/trunk/Source/Services/Shopping/Generated/GTLQueryShopping.h +END +GTLShoppingModelProduct.m +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/!svn/ver/208/trunk/Source/Services/Shopping/Generated/GTLShoppingModelProduct.m +END +GTLShoppingModelDebug.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/208/trunk/Source/Services/Shopping/Generated/GTLShoppingModelDebug.h +END +GTLShoppingModelRecommendations.h +K 25 +svn:wc:ra_dav:version-url +V 92 +/svn/!svn/ver/208/trunk/Source/Services/Shopping/Generated/GTLShoppingModelRecommendations.h +END +GTLShoppingProducts.m +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/247/trunk/Source/Services/Shopping/Generated/GTLShoppingProducts.m +END diff --git a/GTL/Source/Services/Shopping/Generated/.svn/entries b/GTL/Source/Services/Shopping/Generated/.svn/entries new file mode 100644 index 0000000..48e5ead --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/.svn/entries @@ -0,0 +1,776 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Shopping/Generated +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-12-06T21:08:58.644964Z +247 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +GTLQueryShopping.m +file + + + + +2012-12-09T08:42:31.000000Z +1fe55dd108f6b2138c10d0216fd1c53a +2012-12-06T21:08:58.644964Z +247 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +6402 + +GTLShoppingConstants.h +file + + + + +2012-12-09T08:42:31.000000Z +abf81532b9e296501b724038197f63d3 +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1270 + +GTLShoppingModelDebug.m +file + + + + +2012-12-09T08:42:31.000000Z +72ef3977d3ab255d4c3f2e56d2d1dc29 +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1999 + +GTLShoppingModelRecommendations.m +file + + + + +2012-12-09T08:42:31.000000Z +8d280f26b0e8e54362ad27bdd5b7a08e +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1973 + +GTLShopping.h +file + + + + +2012-12-09T08:42:31.000000Z +68594f1bb16f2d99017e905386b99c36 +2012-12-06T21:08:58.644964Z +247 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1314 + +GTLShoppingProduct.h +file + + + + +2012-12-09T08:42:31.000000Z +e7170ae0c6677e4957ff271594c3226f +2012-10-10T23:54:01.384347Z +232 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2259 + +GTLShoppingConstants.m +file + + + + +2012-12-09T08:42:31.000000Z +19d4f60c3280ac0caf31a57ccce97388 +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1136 + +GTLShoppingProduct.m +file + + + + +2012-12-09T08:42:31.000000Z +9f54a1338228f23fe399c8d160dbbac3 +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2017 + +GTLShoppingModelExtras.h +file + + + + +2012-12-09T08:42:31.000000Z +f6763534183c93ca2a52ec143a70016c +2012-12-06T21:08:58.644964Z +247 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2294 + +GTLShopping_Sources.m +file + + + + +2012-12-09T08:42:31.000000Z +e50bbc6f3388bb7484f205d72f14a0da +2012-12-06T21:08:58.644964Z +247 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1433 + +GTLShoppingModelExtras.m +file + + + + +2012-12-09T08:42:31.000000Z +1c3492bd82264911b1c296072245d603 +2012-12-06T21:08:58.644964Z +247 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2169 + +GTLShoppingModelCategory.h +file + + + + +2012-12-09T08:42:31.000000Z +41bd64dccdf719900d2098ed2f3369da +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1681 + +GTLServiceShopping.h +file + + + + +2012-12-09T08:42:31.000000Z +496416eb2bb16f268eb7c5b74f16cda3 +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2118 + +GTLShoppingModelProduct.h +file + + + + +2012-12-09T08:42:31.000000Z +3df6d615fcd20724421514fc12e426f1 +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +9822 + +GTLShoppingModelCategory.m +file + + + + +2012-12-09T08:42:31.000000Z +1d959c1e27927aa96fbb1d50e7e0cb65 +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1690 + +GTLShoppingProducts.h +file + + + + +2012-12-09T08:42:31.000000Z +d2c40781bb8b0def684f577851288117 +2012-12-06T21:08:58.644964Z +247 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +8694 + +GTLServiceShopping.m +file + + + + +2012-12-09T08:42:31.000000Z +bb037913d393f4382a321aeb753ba363 +2012-12-06T21:08:58.644964Z +247 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2228 + +GTLQueryShopping.h +file + + + + +2012-12-09T08:42:31.000000Z +b039aeb49abf3bb3bd85c7dff8679107 +2012-12-06T21:08:58.644964Z +247 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +14186 + +GTLShoppingModelProduct.m +file + + + + +2012-12-09T08:42:31.000000Z +a16dbc85601184dce2949c35c423a602 +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +5180 + +GTLShoppingModelDebug.h +file + + + + +2012-12-09T08:42:31.000000Z +fa46f9081460d66bcb2c024e3c8965fd +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2583 + +GTLShoppingModelRecommendations.h +file + + + + +2012-12-09T08:42:31.000000Z +f0f9887bb44c6a7b8ed8a644f9cb179f +2012-09-10T19:55:26.341403Z +208 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2287 + +GTLShoppingProducts.m +file + + + + +2012-12-09T08:42:31.000000Z +bbb40266ac53f6cd285d263e622f7a1f +2012-12-06T21:08:58.644964Z +247 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +5242 + diff --git a/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLQueryShopping.h.svn-base b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLQueryShopping.h.svn-base new file mode 100644 index 0000000..e3d1a28 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLQueryShopping.h.svn-base @@ -0,0 +1,423 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryShopping.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLQueryShopping (2 custom class methods, 35 custom properties) +// GTLShoppingProductsGetCategories (0 custom class methods, 3 custom properties) +// GTLShoppingProductsGetPlusOne (0 custom class methods, 3 custom properties) +// GTLShoppingProductsGetRecommendations (0 custom class methods, 3 custom properties) +// GTLShoppingProductsListCategories (0 custom class methods, 3 custom properties) +// GTLShoppingProductsListCategoryRecommendations (0 custom class methods, 4 custom properties) +// GTLShoppingProductsListExtras (0 custom class methods, 2 custom properties) +// GTLShoppingProductsListFacets (0 custom class methods, 5 custom properties) +// GTLShoppingProductsListPlusOne (0 custom class methods, 3 custom properties) +// GTLShoppingProductsListPromotions (0 custom class methods, 2 custom properties) +// GTLShoppingProductsListRedirects (0 custom class methods, 2 custom properties) +// GTLShoppingProductsListRelatedQueries (0 custom class methods, 2 custom properties) +// GTLShoppingProductsListSpelling (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLShoppingProductsGetCategories; +@class GTLShoppingProductsGetPlusOne; +@class GTLShoppingProductsGetRecommendations; +@class GTLShoppingProductsListCategories; +@class GTLShoppingProductsListCategoryRecommendations; +@class GTLShoppingProductsListExtras; +@class GTLShoppingProductsListFacets; +@class GTLShoppingProductsListPlusOne; +@class GTLShoppingProductsListPromotions; +@class GTLShoppingProductsListRedirects; +@class GTLShoppingProductsListRelatedQueries; +@class GTLShoppingProductsListSpelling; + +@interface GTLQueryShopping : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (assign) NSUInteger accountId; +@property (copy) NSString *attributeFilter; +@property (copy) NSString *availability; +@property (copy) NSString *boostBy; +// "categories" has different types for some query methods; see the +// documentation for the right type for each query method. +@property (retain) id categories; +@property (retain) GTLShoppingProductsListCategoryRecommendations *categoryRecommendations; +@property (copy) NSString *channels; +@property (assign) BOOL clickTracking; +@property (copy) NSString *country; +@property (copy) NSString *crowdBy; +@property (copy) NSString *currency; +@property (retain) GTLShoppingProductsListExtras *extras; +@property (retain) GTLShoppingProductsListFacets *facets; +@property (copy) NSString *language; +@property (copy) NSString *location; +@property (assign) NSUInteger maxResults; +@property (assign) NSInteger maxVariants; +// "plusOne" has different types for some query methods; see the documentation +// for the right type for each query method. +@property (retain) id plusOne; +@property (copy) NSString *productId; +@property (copy) NSString *productIdType; +@property (retain) GTLShoppingProductsListPromotions *promotions; +@property (copy) NSString *q; +@property (copy) NSString *rankBy; +@property (retain) GTLShoppingProductsGetRecommendations *recommendations; +@property (retain) GTLShoppingProductsListRedirects *redirects; +@property (retain) GTLShoppingProductsListRelatedQueries *relatedQueries; +@property (copy) NSString *restrictBy; +@property (assign) BOOL safe; +@property (copy) NSString *source; +@property (retain) GTLShoppingProductsListSpelling *spelling; +@property (assign) NSUInteger startIndex; +@property (copy) NSString *taxonomy; +@property (copy) NSString *thumbnails; +@property (copy) NSString *useCase; + +#pragma mark - +#pragma mark "products" methods +// These create a GTLQueryShopping object. + +// Method: shopping.products.get +// Returns a single product +// Required: +// source: Query source +// accountId: Merchant center account id +// productIdType: Type of productId +// productId: Id of product +// Optional: +// attributeFilter: Comma separated list of attributes to return +// categories: For this method, "categories" should be of type +// GTLShoppingProductsGetCategories. +// location: Location used to determine tax and shipping +// plusOne: For this method, "plusOne" should be of type +// GTLShoppingProductsGetPlusOne. +// recommendations: GTLShoppingProductsGetRecommendations +// taxonomy: Merchant taxonomy +// thumbnails: Thumbnail specification +// Authorization scope(s): +// kGTLAuthScopeShoppingShoppingapi +// Fetches a GTLShoppingProduct. ++ (id)queryForProductsGetWithSource:(NSString *)source + accountId:(NSUInteger)accountId + productIdType:(NSString *)productIdType + productId:(NSString *)productId; + +// Method: shopping.products.list +// Returns a list of products and content modules +// Required: +// source: Query source +// Optional: +// attributeFilter: Comma separated list of attributes to return +// availability: Comma separated list of availabilities (outOfStock, limited, +// inStock, backOrder, preOrder, onDisplayToOrder) to return +// boostBy: Boosting specification +// categories: For this method, "categories" should be of type +// GTLShoppingProductsListCategories. +// categoryRecommendations: GTLShoppingProductsListCategoryRecommendations +// channels: Channels specification +// clickTracking: Whether to add a click tracking parameter to offer URLs +// country: Country restriction (ISO 3166) +// crowdBy: Crowding specification +// currency: Currency restriction (ISO 4217) +// extras: GTLShoppingProductsListExtras +// facets: GTLShoppingProductsListFacets +// language: Language restriction (BCP 47) +// location: Location used to determine tax and shipping +// maxResults: Maximum number of results to return +// maxVariants: Maximum number of variant results to return per result +// plusOne: For this method, "plusOne" should be of type +// GTLShoppingProductsListPlusOne. +// promotions: GTLShoppingProductsListPromotions +// q: Search query +// rankBy: Ranking specification +// redirects: GTLShoppingProductsListRedirects +// relatedQueries: GTLShoppingProductsListRelatedQueries +// restrictBy: Restriction specification +// safe: Whether safe search is enabled. Default: true +// spelling: GTLShoppingProductsListSpelling +// startIndex: Index (1-based) of first product to return +// taxonomy: Taxonomy name +// thumbnails: Image thumbnails specification +// useCase: One of CommerceSearchUseCase, ShoppingApiUseCase +// Authorization scope(s): +// kGTLAuthScopeShoppingShoppingapi +// Fetches a GTLShoppingProducts. ++ (id)queryForProductsListWithSource:(NSString *)source; + +@end + +#pragma mark - +#pragma mark method parameter objects +// These object are used only to pass a collection of parameters to a +// method as a single item. + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsGetCategories +// + +// Used for 'categories' parameter on 'shopping.products.get'. + +@interface GTLShoppingProductsGetCategories : GTLObject + +// Whether to return category information +@property (retain) NSNumber *enabled; // boolValue + +// Category specification +@property (copy) NSString *include; + +// This parameter is currently ignored +@property (retain) NSNumber *useGcsConfig; // boolValue + +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsGetPlusOne +// + +// Used for 'plusOne' parameter on 'shopping.products.get'. + +@interface GTLShoppingProductsGetPlusOne : GTLObject + +// Whether to return +1 button code +@property (retain) NSNumber *enabled; // boolValue + +// +1 button rendering styles +@property (copy) NSString *styles; + +// Whether to use +1 button styles configured in the GCS account +@property (retain) NSNumber *useGcsConfig; // boolValue + +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsGetRecommendations +// + +// Used for 'recommendations' parameter on 'shopping.products.get'. + +@interface GTLShoppingProductsGetRecommendations : GTLObject + +// Whether to return recommendation information +@property (retain) NSNumber *enabled; // boolValue + +// Recommendation specification +@property (copy) NSString *include; + +// This parameter is currently ignored +@property (retain) NSNumber *useGcsConfig; // boolValue + +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListCategories +// + +// Used for 'categories' parameter on 'shopping.products.list'. + +@interface GTLShoppingProductsListCategories : GTLObject + +// Whether to return category information +@property (retain) NSNumber *enabled; // boolValue + +// Category specification +@property (copy) NSString *include; + +// This parameter is currently ignored +@property (retain) NSNumber *useGcsConfig; // boolValue + +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListCategoryRecommendations +// + +// Used for 'categoryRecommendations' parameter on 'shopping.products.list'. + +@interface GTLShoppingProductsListCategoryRecommendations : GTLObject + +// Category for which to retrieve recommendations +@property (copy) NSString *category; + +// Whether to return category recommendation information +@property (retain) NSNumber *enabled; // boolValue + +// Category recommendation specification +@property (copy) NSString *include; + +// This parameter is currently ignored +@property (retain) NSNumber *useGcsConfig; // boolValue + +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListExtras +// + +// Used for 'extras' parameter on 'shopping.products.list'. + +@interface GTLShoppingProductsListExtras : GTLObject + +// Whether to return extra information. +@property (retain) NSNumber *enabled; // boolValue + +// What extra information to return. +@property (copy) NSString *info; + +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListFacets +// + +// Used for 'facets' parameter on 'shopping.products.list'. + +@interface GTLShoppingProductsListFacets : GTLObject + +// Facets to discover +@property (copy) NSString *discover; + +// Whether to return facet information +@property (retain) NSNumber *enabled; // boolValue + +// Facets to include (applies when useGcsConfig == false) +@property (copy) NSString *include; + +// Return empty facet buckets. +@property (retain) NSNumber *includeEmptyBuckets; // boolValue + +// Whether to return facet information as configured in the GCS account +@property (retain) NSNumber *useGcsConfig; // boolValue + +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListPlusOne +// + +// Used for 'plusOne' parameter on 'shopping.products.list'. + +@interface GTLShoppingProductsListPlusOne : GTLObject + +// Whether to return +1 button code +@property (retain) NSNumber *enabled; // boolValue + +// +1 button rendering styles +@property (copy) NSString *styles; + +// Whether to use +1 button styles configured in the GCS account +@property (retain) NSNumber *useGcsConfig; // boolValue + +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListPromotions +// + +// Used for 'promotions' parameter on 'shopping.products.list'. + +@interface GTLShoppingProductsListPromotions : GTLObject + +// Whether to return promotion information +@property (retain) NSNumber *enabled; // boolValue + +// Whether to return promotion information as configured in the GCS account +@property (retain) NSNumber *useGcsConfig; // boolValue + +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListRedirects +// + +// Used for 'redirects' parameter on 'shopping.products.list'. + +@interface GTLShoppingProductsListRedirects : GTLObject + +// Whether to return redirect information +@property (retain) NSNumber *enabled; // boolValue + +// Whether to return redirect information as configured in the GCS account +@property (retain) NSNumber *useGcsConfig; // boolValue + +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListRelatedQueries +// + +// Used for 'relatedQueries' parameter on 'shopping.products.list'. + +@interface GTLShoppingProductsListRelatedQueries : GTLObject + +// Whether to return related queries +@property (retain) NSNumber *enabled; // boolValue + +// This parameter is currently ignored +@property (retain) NSNumber *useGcsConfig; // boolValue + +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListSpelling +// + +// Used for 'spelling' parameter on 'shopping.products.list'. + +@interface GTLShoppingProductsListSpelling : GTLObject + +// Whether to return spelling suggestions +@property (retain) NSNumber *enabled; // boolValue + +// This parameter is currently ignored +@property (retain) NSNumber *useGcsConfig; // boolValue + +@end diff --git a/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLQueryShopping.m.svn-base b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLQueryShopping.m.svn-base new file mode 100644 index 0000000..612b1a7 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLQueryShopping.m.svn-base @@ -0,0 +1,196 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryShopping.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLQueryShopping (2 custom class methods, 35 custom properties) +// GTLShoppingProductsGetCategories (0 custom class methods, 3 custom properties) +// GTLShoppingProductsGetPlusOne (0 custom class methods, 3 custom properties) +// GTLShoppingProductsGetRecommendations (0 custom class methods, 3 custom properties) +// GTLShoppingProductsListCategories (0 custom class methods, 3 custom properties) +// GTLShoppingProductsListCategoryRecommendations (0 custom class methods, 4 custom properties) +// GTLShoppingProductsListExtras (0 custom class methods, 2 custom properties) +// GTLShoppingProductsListFacets (0 custom class methods, 5 custom properties) +// GTLShoppingProductsListPlusOne (0 custom class methods, 3 custom properties) +// GTLShoppingProductsListPromotions (0 custom class methods, 2 custom properties) +// GTLShoppingProductsListRedirects (0 custom class methods, 2 custom properties) +// GTLShoppingProductsListRelatedQueries (0 custom class methods, 2 custom properties) +// GTLShoppingProductsListSpelling (0 custom class methods, 2 custom properties) + +#import "GTLQueryShopping.h" + +#import "GTLShoppingProduct.h" +#import "GTLShoppingProducts.h" + +@implementation GTLQueryShopping + +@dynamic accountId, attributeFilter, availability, boostBy, categories, + categoryRecommendations, channels, clickTracking, country, crowdBy, + currency, extras, facets, fields, language, location, maxResults, + maxVariants, plusOne, productId, productIdType, promotions, q, rankBy, + recommendations, redirects, relatedQueries, restrictBy, safe, source, + spelling, startIndex, taxonomy, thumbnails, useCase; + +#pragma mark - +#pragma mark "products" methods +// These create a GTLQueryShopping object. + ++ (id)queryForProductsGetWithSource:(NSString *)source + accountId:(NSUInteger)accountId + productIdType:(NSString *)productIdType + productId:(NSString *)productId { + NSString *methodName = @"shopping.products.get"; + GTLQueryShopping *query = [self queryWithMethodName:methodName]; + query.source = source; + query.accountId = accountId; + query.productIdType = productIdType; + query.productId = productId; + query.expectedObjectClass = [GTLShoppingProduct class]; + return query; +} + ++ (id)queryForProductsListWithSource:(NSString *)source { + NSString *methodName = @"shopping.products.list"; + GTLQueryShopping *query = [self queryWithMethodName:methodName]; + query.source = source; + query.expectedObjectClass = [GTLShoppingProducts class]; + return query; +} + +@end + +#pragma mark - +#pragma mark method parameter objects +// These object are used only to pass a collection of parameters to a +// method as a single item. + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsGetCategories +// + +@implementation GTLShoppingProductsGetCategories +@dynamic enabled, include, useGcsConfig; +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsGetPlusOne +// + +@implementation GTLShoppingProductsGetPlusOne +@dynamic enabled, styles, useGcsConfig; +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsGetRecommendations +// + +@implementation GTLShoppingProductsGetRecommendations +@dynamic enabled, include, useGcsConfig; +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListCategories +// + +@implementation GTLShoppingProductsListCategories +@dynamic enabled, include, useGcsConfig; +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListCategoryRecommendations +// + +@implementation GTLShoppingProductsListCategoryRecommendations +@dynamic category, enabled, include, useGcsConfig; +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListExtras +// + +@implementation GTLShoppingProductsListExtras +@dynamic enabled, info; +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListFacets +// + +@implementation GTLShoppingProductsListFacets +@dynamic discover, enabled, include, includeEmptyBuckets, useGcsConfig; +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListPlusOne +// + +@implementation GTLShoppingProductsListPlusOne +@dynamic enabled, styles, useGcsConfig; +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListPromotions +// + +@implementation GTLShoppingProductsListPromotions +@dynamic enabled, useGcsConfig; +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListRedirects +// + +@implementation GTLShoppingProductsListRedirects +@dynamic enabled, useGcsConfig; +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListRelatedQueries +// + +@implementation GTLShoppingProductsListRelatedQueries +@dynamic enabled, useGcsConfig; +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListSpelling +// + +@implementation GTLShoppingProductsListSpelling +@dynamic enabled, useGcsConfig; +@end diff --git a/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLServiceShopping.h.svn-base b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLServiceShopping.h.svn-base new file mode 100644 index 0000000..d7e3132 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLServiceShopping.h.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceShopping.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLServiceShopping (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceShopping : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryShopping.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLServiceShopping.m.svn-base b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLServiceShopping.m.svn-base new file mode 100644 index 0000000..f14a1d9 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLServiceShopping.m.svn-base @@ -0,0 +1,67 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceShopping.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLServiceShopping (0 custom class methods, 0 custom properties) + +#import "GTLShopping.h" + +@implementation GTLServiceShopping + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryShopping class], + [GTLShoppingModelCategory class], + [GTLShoppingModelDebug class], + [GTLShoppingModelExtras class], + [GTLShoppingModelProduct class], + [GTLShoppingModelRecommendations class], + [GTLShoppingProduct class], + [GTLShoppingProducts class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v1"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShopping.h.svn-base b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShopping.h.svn-base new file mode 100644 index 0000000..d7c93b8 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShopping.h.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShopping.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started + +#import "GTLShoppingConstants.h" + +#import "GTLShoppingModelCategory.h" +#import "GTLShoppingModelDebug.h" +#import "GTLShoppingModelExtras.h" +#import "GTLShoppingModelProduct.h" +#import "GTLShoppingModelRecommendations.h" +#import "GTLShoppingProduct.h" +#import "GTLShoppingProducts.h" + +#import "GTLQueryShopping.h" +#import "GTLServiceShopping.h" diff --git a/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingConstants.h.svn-base b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingConstants.h.svn-base new file mode 100644 index 0000000..110a33d --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingConstants.h.svn-base @@ -0,0 +1,39 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// View your product data +GTL_EXTERN NSString * const kGTLAuthScopeShoppingShoppingapi; // "https://www.googleapis.com/auth/shoppingapi" diff --git a/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingConstants.m.svn-base b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingConstants.m.svn-base new file mode 100644 index 0000000..1562fa9 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingConstants.m.svn-base @@ -0,0 +1,32 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started + +#import "GTLShoppingConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeShoppingShoppingapi = @"https://www.googleapis.com/auth/shoppingapi"; diff --git a/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelCategory.h.svn-base b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelCategory.h.svn-base new file mode 100644 index 0000000..ac6ba66 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelCategory.h.svn-base @@ -0,0 +1,57 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingModelCategory.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingModelCategory (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelCategory +// + +@interface GTLShoppingModelCategory : GTLObject + +// Id of category. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Ids of the parents of the category. +@property (retain) NSArray *parents; // of NSString + +// Short name of category. +@property (copy) NSString *shortName; + +// URL of category. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelCategory.m.svn-base b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelCategory.m.svn-base new file mode 100644 index 0000000..10e97df --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelCategory.m.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingModelCategory.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingModelCategory (0 custom class methods, 4 custom properties) + +#import "GTLShoppingModelCategory.h" + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelCategory +// + +@implementation GTLShoppingModelCategory +@dynamic identifier, parents, shortName, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"parents"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelDebug.h.svn-base b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelDebug.h.svn-base new file mode 100644 index 0000000..7011854 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelDebug.h.svn-base @@ -0,0 +1,96 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingModelDebug.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingModelDebug (0 custom class methods, 9 custom properties) +// GTLShoppingModelDebugBackendTimesItem (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLShoppingModelDebugBackendTimesItem; + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelDebug +// + +@interface GTLShoppingModelDebug : GTLObject + +// Google internal +@property (retain) NSArray *backendTimes; // of GTLShoppingModelDebugBackendTimesItem + +// Google internal. +@property (retain) NSNumber *elapsedMillis; // longLongValue + +// Google internal. +@property (copy) NSString *facetsRequest; + +// Google internal. +@property (copy) NSString *facetsResponse; + +// Google internal. +@property (copy) NSString *rdcResponse; + +// Google internal. +@property (copy) NSString *recommendedItemsRequest; + +// Google internal. +@property (copy) NSString *recommendedItemsResponse; + +// Google internal. +@property (copy) NSString *searchRequest; + +// Google internal. +@property (copy) NSString *searchResponse; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelDebugBackendTimesItem +// + +@interface GTLShoppingModelDebugBackendTimesItem : GTLObject + +// Google internal +@property (retain) NSNumber *elapsedMillis; // longLongValue + +// Google internal +@property (copy) NSString *hostName; + +// Google internal +@property (copy) NSString *name; + +// Google internal +@property (retain) NSNumber *serverMillis; // longLongValue + +@end diff --git a/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelDebug.m.svn-base b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelDebug.m.svn-base new file mode 100644 index 0000000..f159b15 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelDebug.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingModelDebug.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingModelDebug (0 custom class methods, 9 custom properties) +// GTLShoppingModelDebugBackendTimesItem (0 custom class methods, 4 custom properties) + +#import "GTLShoppingModelDebug.h" + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelDebug +// + +@implementation GTLShoppingModelDebug +@dynamic backendTimes, elapsedMillis, facetsRequest, facetsResponse, + rdcResponse, recommendedItemsRequest, recommendedItemsResponse, + searchRequest, searchResponse; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLShoppingModelDebugBackendTimesItem class] + forKey:@"backendTimes"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelDebugBackendTimesItem +// + +@implementation GTLShoppingModelDebugBackendTimesItem +@dynamic elapsedMillis, hostName, name, serverMillis; +@end diff --git a/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelExtras.h.svn-base b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelExtras.h.svn-base new file mode 100644 index 0000000..b8dadc6 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelExtras.h.svn-base @@ -0,0 +1,73 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingModelExtras.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingModelExtras (0 custom class methods, 2 custom properties) +// GTLShoppingModelExtrasFacetRulesItem (0 custom class methods, 1 custom properties) +// GTLShoppingModelExtrasRankingRulesItem (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLShoppingModelExtrasFacetRulesItem; +@class GTLShoppingModelExtrasRankingRulesItem; + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelExtras +// + +@interface GTLShoppingModelExtras : GTLObject +@property (retain) NSArray *facetRules; // of GTLShoppingModelExtrasFacetRulesItem + +// Names of boost (ranking) rules applicable to this search. +@property (retain) NSArray *rankingRules; // of GTLShoppingModelExtrasRankingRulesItem + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelExtrasFacetRulesItem +// + +@interface GTLShoppingModelExtrasFacetRulesItem : GTLObject +@property (copy) NSString *name; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelExtrasRankingRulesItem +// + +@interface GTLShoppingModelExtrasRankingRulesItem : GTLObject +@property (copy) NSString *name; +@end diff --git a/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelExtras.m.svn-base b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelExtras.m.svn-base new file mode 100644 index 0000000..7266c25 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelExtras.m.svn-base @@ -0,0 +1,72 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingModelExtras.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingModelExtras (0 custom class methods, 2 custom properties) +// GTLShoppingModelExtrasFacetRulesItem (0 custom class methods, 1 custom properties) +// GTLShoppingModelExtrasRankingRulesItem (0 custom class methods, 1 custom properties) + +#import "GTLShoppingModelExtras.h" + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelExtras +// + +@implementation GTLShoppingModelExtras +@dynamic facetRules, rankingRules; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLShoppingModelExtrasFacetRulesItem class], @"facetRules", + [GTLShoppingModelExtrasRankingRulesItem class], @"rankingRules", + nil]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelExtrasFacetRulesItem +// + +@implementation GTLShoppingModelExtrasFacetRulesItem +@dynamic name; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelExtrasRankingRulesItem +// + +@implementation GTLShoppingModelExtrasRankingRulesItem +@dynamic name; +@end diff --git a/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelProduct.h.svn-base b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelProduct.h.svn-base new file mode 100644 index 0000000..9e2fae8 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelProduct.h.svn-base @@ -0,0 +1,335 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingModelProduct.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingModelProduct (0 custom class methods, 35 custom properties) +// GTLShoppingModelProductAttributesItem (0 custom class methods, 5 custom properties) +// GTLShoppingModelProductAuthor (0 custom class methods, 2 custom properties) +// GTLShoppingModelProductImagesItem (0 custom class methods, 3 custom properties) +// GTLShoppingModelProductInternal4Item (0 custom class methods, 2 custom properties) +// GTLShoppingModelProductInventoriesItem (0 custom class methods, 15 custom properties) +// GTLShoppingModelProductVariantsItem (0 custom class methods, 1 custom properties) +// GTLShoppingModelProductImagesItemThumbnailsItem (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLShoppingModelProduct; +@class GTLShoppingModelProductAttributesItem; +@class GTLShoppingModelProductAuthor; +@class GTLShoppingModelProductImagesItem; +@class GTLShoppingModelProductImagesItemThumbnailsItem; +@class GTLShoppingModelProductInternal4Item; +@class GTLShoppingModelProductInventoriesItem; +@class GTLShoppingModelProductVariantsItem; + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProduct +// + +@interface GTLShoppingModelProduct : GTLObject + +// Attributes of product (available only with a cx source). +@property (retain) NSArray *attributes; // of GTLShoppingModelProductAttributesItem + +// Author of product. +@property (retain) GTLShoppingModelProductAuthor *author; + +// Brand of product. +@property (copy) NSString *brand; + +// Categories of product according to the selected taxonomy, omitted if no +// taxonomy is selected. +@property (retain) NSArray *categories; // of NSString + +// Condition of product (one of: new, refurbished, used). +@property (copy) NSString *condition; + +// ISO 3166 code of target country of product. +@property (copy) NSString *country; + +// RFC 3339 formatted creation time and date of product. +@property (retain) GTLDateTime *creationTime; + +// Description of product. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Google id of product. +@property (retain) NSNumber *googleId; // unsignedLongLongValue + +// The first GTIN of the product. Deprecated in favor of "gtins". +@property (copy) NSString *gtin; + +// List of all the product's GTINs (in GTIN-14 format). +@property (retain) NSArray *gtins; // of NSString + +// Images of product. +@property (retain) NSArray *images; // of GTLShoppingModelProductImagesItem + +// Google Internal. +@property (retain) NSArray *internal1; // of NSString + +// Google Internal. +@property (retain) NSArray *internal10; // of NSString + +// Google Internal. +@property (copy) NSString *internal12; + +// Google Internal. +@property (retain) NSNumber *internal13; // doubleValue + +// Google Internal. +@property (retain) NSNumber *internal14; // doubleValue + +// Google Internal. +@property (retain) NSNumber *internal15; // doubleValue + +// Google Internal. +@property (copy) NSString *internal3; + +// Google Internal. +@property (retain) NSArray *internal4; // of GTLShoppingModelProductInternal4Item + +// Google Internal. +@property (copy) NSString *internal6; + +// Google Internal. +@property (retain) NSNumber *internal7; // boolValue + +// Google Internal. +@property (retain) NSArray *internal8; // of NSString + +// Inventories of product. +@property (retain) NSArray *inventories; // of GTLShoppingModelProductInventoriesItem + +// BCP 47 language tag of language of product. +@property (copy) NSString *language; + +// Link to product. +@property (copy) NSString *link; + +// RFC 3339 formatted modification time and date of product. +@property (retain) GTLDateTime *modificationTime; + +// List of all the product's MPNs. +@property (retain) NSArray *mpns; // of NSString + +// Code to add to the page to render the +1 content. +@property (copy) NSString *plusOne; + +// Merchant-provided id of product (available only with a cx source). +@property (copy) NSString *providedId; + +// Whether this product matched the user query. Only set for the variant offers +// (if any) attached to a product offer. +@property (retain) NSNumber *queryMatched; // boolValue + +// Google Internal +@property (retain) NSNumber *score; // floatValue + +// Title of product. +@property (copy) NSString *title; + +// The number of variant offers returned that matched the query. +@property (retain) NSNumber *totalMatchingVariants; // intValue + +// A list of variant offers associated with this product. +@property (retain) NSArray *variants; // of GTLShoppingModelProductVariantsItem + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductAttributesItem +// + +@interface GTLShoppingModelProductAttributesItem : GTLObject + +// Display Name of prodct attribute. +@property (copy) NSString *displayName; + +// Name of product attribute. +@property (copy) NSString *name; + +// Type of product attribute (one of: text, bool, int, float, dateRange, url). +@property (copy) NSString *type; + +// Unit of product attribute. +@property (copy) NSString *unit; + +// Value of product attribute. +@property (retain) id value; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductAuthor +// + +@interface GTLShoppingModelProductAuthor : GTLObject + +// Account id of product author. +@property (retain) NSNumber *accountId; // unsignedLongLongValue + +// Name of product author. +@property (copy) NSString *name; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductImagesItem +// + +@interface GTLShoppingModelProductImagesItem : GTLObject + +// Link to product image. +@property (copy) NSString *link; + +@property (copy) NSString *status; + +// Thumbnails of product image. +@property (retain) NSArray *thumbnails; // of GTLShoppingModelProductImagesItemThumbnailsItem + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductInternal4Item +// + +@interface GTLShoppingModelProductInternal4Item : GTLObject + +// Google Internal. +@property (retain) NSNumber *confidence; // doubleValue + +// Google Internal. +@property (retain) NSNumber *node; // intValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductInventoriesItem +// + +@interface GTLShoppingModelProductInventoriesItem : GTLObject + +// Availability of product inventory. +@property (copy) NSString *availability; + +// Channel of product inventory (one of: online, local). +@property (copy) NSString *channel; + +// Currency of product inventory (an ISO 4217 alphabetic code). +@property (copy) NSString *currency; + +// Distance of product inventory. +@property (retain) NSNumber *distance; // floatValue + +// Distance unit of product inventory. +@property (copy) NSString *distanceUnit; + +// Number of months for installment price. +@property (retain) NSNumber *installmentMonths; // intValue + +// Installment price of product inventory. +@property (retain) NSNumber *installmentPrice; // floatValue + +// Original price of product inventory. Only returned for products that are on +// sale. +@property (retain) NSNumber *originalPrice; // floatValue + +// Price of product inventory. +@property (retain) NSNumber *price; // floatValue + +// Sale end date. +@property (retain) GTLDateTime *saleEndDate; + +// Sale price of product inventory. +@property (retain) NSNumber *salePrice; // floatValue + +// Sale start date. +@property (retain) GTLDateTime *saleStartDate; + +// Shipping cost of product inventory. +@property (retain) NSNumber *shipping; // floatValue + +// Store ID of product inventory. +@property (copy) NSString *storeId; + +// Tax of product inventory. +@property (retain) NSNumber *tax; // floatValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductVariantsItem +// + +@interface GTLShoppingModelProductVariantsItem : GTLObject + +// The detailed offer data for a particular variant offer. +@property (retain) GTLShoppingModelProduct *variant; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductImagesItemThumbnailsItem +// + +@interface GTLShoppingModelProductImagesItemThumbnailsItem : GTLObject + +// Content of thumbnail (only available for the first thumbnail of the top +// results if SAYT is enabled). +@property (copy) NSString *content; + +// Height of thumbnail (omitted if not specified in the request). +@property (retain) NSNumber *height; // intValue + +// Link to thumbnail. +@property (copy) NSString *link; + +// Width of thumbnail (omitted if not specified in the request). +@property (retain) NSNumber *width; // intValue + +@end diff --git a/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelProduct.m.svn-base b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelProduct.m.svn-base new file mode 100644 index 0000000..13fd780 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelProduct.m.svn-base @@ -0,0 +1,158 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingModelProduct.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingModelProduct (0 custom class methods, 35 custom properties) +// GTLShoppingModelProductAttributesItem (0 custom class methods, 5 custom properties) +// GTLShoppingModelProductAuthor (0 custom class methods, 2 custom properties) +// GTLShoppingModelProductImagesItem (0 custom class methods, 3 custom properties) +// GTLShoppingModelProductInternal4Item (0 custom class methods, 2 custom properties) +// GTLShoppingModelProductInventoriesItem (0 custom class methods, 15 custom properties) +// GTLShoppingModelProductVariantsItem (0 custom class methods, 1 custom properties) +// GTLShoppingModelProductImagesItemThumbnailsItem (0 custom class methods, 4 custom properties) + +#import "GTLShoppingModelProduct.h" + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProduct +// + +@implementation GTLShoppingModelProduct +@dynamic attributes, author, brand, categories, condition, country, + creationTime, descriptionProperty, googleId, gtin, gtins, images, + internal1, internal10, internal12, internal13, internal14, internal15, + internal3, internal4, internal6, internal7, internal8, inventories, + language, link, modificationTime, mpns, plusOne, providedId, + queryMatched, score, title, totalMatchingVariants, variants; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLShoppingModelProductAttributesItem class], @"attributes", + [NSString class], @"categories", + [NSString class], @"gtins", + [GTLShoppingModelProductImagesItem class], @"images", + [NSString class], @"internal1", + [NSString class], @"internal10", + [GTLShoppingModelProductInternal4Item class], @"internal4", + [NSString class], @"internal8", + [GTLShoppingModelProductInventoriesItem class], @"inventories", + [NSString class], @"mpns", + [GTLShoppingModelProductVariantsItem class], @"variants", + nil]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductAttributesItem +// + +@implementation GTLShoppingModelProductAttributesItem +@dynamic displayName, name, type, unit, value; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductAuthor +// + +@implementation GTLShoppingModelProductAuthor +@dynamic accountId, name; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductImagesItem +// + +@implementation GTLShoppingModelProductImagesItem +@dynamic link, status, thumbnails; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLShoppingModelProductImagesItemThumbnailsItem class] + forKey:@"thumbnails"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductInternal4Item +// + +@implementation GTLShoppingModelProductInternal4Item +@dynamic confidence, node; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductInventoriesItem +// + +@implementation GTLShoppingModelProductInventoriesItem +@dynamic availability, channel, currency, distance, distanceUnit, + installmentMonths, installmentPrice, originalPrice, price, saleEndDate, + salePrice, saleStartDate, shipping, storeId, tax; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductVariantsItem +// + +@implementation GTLShoppingModelProductVariantsItem +@dynamic variant; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductImagesItemThumbnailsItem +// + +@implementation GTLShoppingModelProductImagesItemThumbnailsItem +@dynamic content, height, link, width; +@end diff --git a/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelRecommendations.h.svn-base b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelRecommendations.h.svn-base new file mode 100644 index 0000000..cf0f37f --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelRecommendations.h.svn-base @@ -0,0 +1,70 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingModelRecommendations.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingModelRecommendations (0 custom class methods, 2 custom properties) +// GTLShoppingModelRecommendationsRecommendationListItem (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLShoppingModelProduct; +@class GTLShoppingModelRecommendationsRecommendationListItem; + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelRecommendations +// + +@interface GTLShoppingModelRecommendations : GTLObject + +// List of recommendations. +@property (retain) NSArray *recommendationList; // of GTLShoppingModelRecommendationsRecommendationListItem + +// Type of recommendation list (for offer-based recommendations, one of: all, +// purchaseToPurchase, visitToVisit, visitToPurchase, relatedItems; for +// category-based recommendations, one of: all, categoryMostVisited, +// categoryBestSeller). +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelRecommendationsRecommendationListItem +// + +@interface GTLShoppingModelRecommendationsRecommendationListItem : GTLObject + +// Recommended product. +@property (retain) GTLShoppingModelProduct *product; + +@end diff --git a/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelRecommendations.m.svn-base b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelRecommendations.m.svn-base new file mode 100644 index 0000000..1afa6eb --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingModelRecommendations.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingModelRecommendations.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingModelRecommendations (0 custom class methods, 2 custom properties) +// GTLShoppingModelRecommendationsRecommendationListItem (0 custom class methods, 1 custom properties) + +#import "GTLShoppingModelRecommendations.h" + +#import "GTLShoppingModelProduct.h" + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelRecommendations +// + +@implementation GTLShoppingModelRecommendations +@dynamic recommendationList, type; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLShoppingModelRecommendationsRecommendationListItem class] + forKey:@"recommendationList"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelRecommendationsRecommendationListItem +// + +@implementation GTLShoppingModelRecommendationsRecommendationListItem +@dynamic product; +@end diff --git a/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingProduct.h.svn-base b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingProduct.h.svn-base new file mode 100644 index 0000000..fbca7af --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingProduct.h.svn-base @@ -0,0 +1,75 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingProduct.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingProduct (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLShoppingModelCategory; +@class GTLShoppingModelDebug; +@class GTLShoppingModelProduct; +@class GTLShoppingModelRecommendations; + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProduct +// + +@interface GTLShoppingProduct : GTLObject + +// List of categories for product. +@property (retain) NSArray *categories; // of GTLShoppingModelCategory + +// Google internal. +@property (retain) GTLShoppingModelDebug *debug; + +// Id of product. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The kind of item, always shopping#product. +@property (copy) NSString *kind; + +// Product. +@property (retain) GTLShoppingModelProduct *product; + +// Recommendations for product. +@property (retain) NSArray *recommendations; // of GTLShoppingModelRecommendations + +// Unique identifier for this request. +@property (copy) NSString *requestId; + +// Self link of product when generated for a lookup request. Self link of +// product when generated for a search request. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingProduct.m.svn-base b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingProduct.m.svn-base new file mode 100644 index 0000000..c0bdbad --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingProduct.m.svn-base @@ -0,0 +1,67 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingProduct.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingProduct (0 custom class methods, 8 custom properties) + +#import "GTLShoppingProduct.h" + +#import "GTLShoppingModelCategory.h" +#import "GTLShoppingModelDebug.h" +#import "GTLShoppingModelProduct.h" +#import "GTLShoppingModelRecommendations.h" + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProduct +// + +@implementation GTLShoppingProduct +@dynamic categories, debug, identifier, kind, product, recommendations, + requestId, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLShoppingModelCategory class], @"categories", + [GTLShoppingModelRecommendations class], @"recommendations", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"shopping#product"]; +} + +@end diff --git a/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingProducts.h.svn-base b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingProducts.h.svn-base new file mode 100644 index 0000000..ca4f617 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingProducts.h.svn-base @@ -0,0 +1,295 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingProducts.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingProducts (0 custom class methods, 22 custom properties) +// GTLShoppingProductsFacetsItem (0 custom class methods, 7 custom properties) +// GTLShoppingProductsPromotionsItem (0 custom class methods, 8 custom properties) +// GTLShoppingProductsSpelling (0 custom class methods, 1 custom properties) +// GTLShoppingProductsStoresItem (0 custom class methods, 7 custom properties) +// GTLShoppingProductsFacetsItemBucketsItem (0 custom class methods, 6 custom properties) +// GTLShoppingProductsPromotionsItemCustomFieldsItem (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLShoppingModelCategory; +@class GTLShoppingModelDebug; +@class GTLShoppingModelExtras; +@class GTLShoppingModelProduct; +@class GTLShoppingModelRecommendations; +@class GTLShoppingProduct; +@class GTLShoppingProductsFacetsItem; +@class GTLShoppingProductsFacetsItemBucketsItem; +@class GTLShoppingProductsPromotionsItem; +@class GTLShoppingProductsPromotionsItemCustomFieldsItem; +@class GTLShoppingProductsSpelling; +@class GTLShoppingProductsStoresItem; + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProducts +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLShoppingProducts : GTLCollectionObject + +// List of categories. +@property (retain) NSArray *categories; // of GTLShoppingModelCategory + +// Recommendations for category. +@property (retain) NSArray *categoryRecommendations; // of GTLShoppingModelRecommendations + +// Current item count. +@property (retain) NSNumber *currentItemCount; // intValue + +// Google internal. +@property (retain) GTLShoppingModelDebug *debug; + +// Etag of feed. +@property (copy) NSString *ETag; + +// List of extras. +@property (retain) GTLShoppingModelExtras *extras; + +// List of facets. +@property (retain) NSArray *facets; // of GTLShoppingProductsFacetsItem + +// Id of feed. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// List of returned products. +@property (retain) NSArray *items; // of GTLShoppingProduct + +// Number of items per page of results. +@property (retain) NSNumber *itemsPerPage; // intValue + +// The fixed string "shopping#products". The kind of feed returned. +@property (copy) NSString *kind; + +// Next link of feed. +@property (copy) NSString *nextLink; + +// Previous link of feed. +@property (copy) NSString *previousLink; + +// List of promotions. +@property (retain) NSArray *promotions; // of GTLShoppingProductsPromotionsItem + +// Redirects. +@property (retain) NSArray *redirects; // of NSString + +// Related queries. +@property (retain) NSArray *relatedQueries; // of NSString + +// Unique identifier for this request. +@property (copy) NSString *requestId; + +// Self link of feed. +@property (copy) NSString *selfLink; + +// Spelling. +@property (retain) GTLShoppingProductsSpelling *spelling; + +// 1-based index of the first item in the search results. +@property (retain) NSNumber *startIndex; // intValue + +// List of returned stores. +@property (retain) NSArray *stores; // of GTLShoppingProductsStoresItem + +// Total number of search results. +@property (retain) NSNumber *totalItems; // intValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsFacetsItem +// + +@interface GTLShoppingProductsFacetsItem : GTLObject + +// List of Buckets within facet. +@property (retain) NSArray *buckets; // of GTLShoppingProductsFacetsItemBucketsItem + +// Number of products matching the query that have a value for the facet's +// property or attribute. +@property (retain) NSNumber *count; // intValue + +// Display name of facet. +@property (copy) NSString *displayName; + +// Name of the facet's attribute (omitted for property facets). +@property (copy) NSString *name; + +// Property of facet (omitted for attribute facets). +@property (copy) NSString *property; + +// Type of facet's attribute (omitted for property facets, one of: text, bool, +// int, float). +@property (copy) NSString *type; + +// Unit of the facet's property or attribute (omitted if the facet's property or +// attribute has no unit). +@property (copy) NSString *unit; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsPromotionsItem +// + +@interface GTLShoppingProductsPromotionsItem : GTLObject + +// List of custom fields of promotion. +@property (retain) NSArray *customFields; // of GTLShoppingProductsPromotionsItemCustomFieldsItem + +// Custom HTML of promotion (omitted if type is not custom). +@property (copy) NSString *customHtml; + +// Description of promotion (omitted if type is not standard). +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Link to promotion (omitted if type is not standard). +@property (copy) NSString *destLink; + +// Link to promotion image (omitted if type is not standard). +@property (copy) NSString *imageLink; + +// Name of promotion (omitted if type is not standard). +@property (copy) NSString *name; + +// Product of promotion (omitted if type is not product). +@property (retain) GTLShoppingModelProduct *product; + +// Type of promotion (one of: standard, product, custom). +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsSpelling +// + +@interface GTLShoppingProductsSpelling : GTLObject + +// Suggestion for spelling. +@property (copy) NSString *suggestion; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsStoresItem +// + +@interface GTLShoppingProductsStoresItem : GTLObject + +// Address of store. +@property (copy) NSString *address; + +// Location of store. +@property (copy) NSString *location; + +// Name of merchant. +@property (copy) NSString *name; + +// Merchant-supplied store code. +@property (copy) NSString *storeCode; + +// Id of store. +@property (copy) NSString *storeId; + +// Name of store. +@property (copy) NSString *storeName; + +// Telephone number of store. +@property (copy) NSString *telephone; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsFacetsItemBucketsItem +// + +@interface GTLShoppingProductsFacetsItemBucketsItem : GTLObject + +// Number of products matching the query that have a value for the facet's +// property or attribute that matches the bucket. +@property (retain) NSNumber *count; // intValue + +// Upper bound of the bucket (omitted for value buckets or if the range has no +// upper bound). +@property (retain) id max; + +// Whether the upper bound of the bucket is exclusive (omitted for value buckets +// or if the range has no upper bound). +@property (retain) NSNumber *maxExclusive; // boolValue + +// Lower bound of the bucket (omitted for value buckets or if the range has no +// lower bound). +@property (retain) id min; + +// Whether the lower bound of the bucket is exclusive (omitted for value buckets +// or if the range has no lower bound). +@property (retain) NSNumber *minExclusive; // boolValue + +// Value of the bucket (omitted for range buckets). +@property (retain) id value; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsPromotionsItemCustomFieldsItem +// + +@interface GTLShoppingProductsPromotionsItemCustomFieldsItem : GTLObject + +// Name of field. +@property (copy) NSString *name; + +// Value of field. +@property (copy) NSString *value; + +@end diff --git a/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingProducts.m.svn-base b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingProducts.m.svn-base new file mode 100644 index 0000000..367569f --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShoppingProducts.m.svn-base @@ -0,0 +1,169 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingProducts.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingProducts (0 custom class methods, 22 custom properties) +// GTLShoppingProductsFacetsItem (0 custom class methods, 7 custom properties) +// GTLShoppingProductsPromotionsItem (0 custom class methods, 8 custom properties) +// GTLShoppingProductsSpelling (0 custom class methods, 1 custom properties) +// GTLShoppingProductsStoresItem (0 custom class methods, 7 custom properties) +// GTLShoppingProductsFacetsItemBucketsItem (0 custom class methods, 6 custom properties) +// GTLShoppingProductsPromotionsItemCustomFieldsItem (0 custom class methods, 2 custom properties) + +#import "GTLShoppingProducts.h" + +#import "GTLShoppingModelCategory.h" +#import "GTLShoppingModelDebug.h" +#import "GTLShoppingModelExtras.h" +#import "GTLShoppingModelProduct.h" +#import "GTLShoppingModelRecommendations.h" +#import "GTLShoppingProduct.h" + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProducts +// + +@implementation GTLShoppingProducts +@dynamic categories, categoryRecommendations, currentItemCount, debug, ETag, + extras, facets, identifier, items, itemsPerPage, kind, nextLink, + previousLink, promotions, redirects, relatedQueries, requestId, + selfLink, spelling, startIndex, stores, totalItems; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLShoppingModelCategory class], @"categories", + [GTLShoppingModelRecommendations class], @"categoryRecommendations", + [GTLShoppingProductsFacetsItem class], @"facets", + [GTLShoppingProduct class], @"items", + [GTLShoppingProductsPromotionsItem class], @"promotions", + [NSString class], @"redirects", + [NSString class], @"relatedQueries", + [GTLShoppingProductsStoresItem class], @"stores", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"shopping#products"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsFacetsItem +// + +@implementation GTLShoppingProductsFacetsItem +@dynamic buckets, count, displayName, name, property, type, unit; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLShoppingProductsFacetsItemBucketsItem class] + forKey:@"buckets"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsPromotionsItem +// + +@implementation GTLShoppingProductsPromotionsItem +@dynamic customFields, customHtml, descriptionProperty, destLink, imageLink, + name, product, type; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLShoppingProductsPromotionsItemCustomFieldsItem class] + forKey:@"customFields"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsSpelling +// + +@implementation GTLShoppingProductsSpelling +@dynamic suggestion; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsStoresItem +// + +@implementation GTLShoppingProductsStoresItem +@dynamic address, location, name, storeCode, storeId, storeName, telephone; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsFacetsItemBucketsItem +// + +@implementation GTLShoppingProductsFacetsItemBucketsItem +@dynamic count, max, maxExclusive, min, minExclusive, value; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsPromotionsItemCustomFieldsItem +// + +@implementation GTLShoppingProductsPromotionsItemCustomFieldsItem +@dynamic name, value; +@end diff --git a/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShopping_Sources.m.svn-base b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShopping_Sources.m.svn-base new file mode 100644 index 0000000..acdfec8 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/.svn/text-base/GTLShopping_Sources.m.svn-base @@ -0,0 +1,43 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShopping_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started + +#import "GTLShoppingConstants.m" + +#import "GTLShoppingModelCategory.m" +#import "GTLShoppingModelDebug.m" +#import "GTLShoppingModelExtras.m" +#import "GTLShoppingModelProduct.m" +#import "GTLShoppingModelRecommendations.m" +#import "GTLShoppingProduct.m" +#import "GTLShoppingProducts.m" + +#import "GTLQueryShopping.m" +#import "GTLServiceShopping.m" diff --git a/GTL/Source/Services/Shopping/Generated/GTLQueryShopping.h b/GTL/Source/Services/Shopping/Generated/GTLQueryShopping.h new file mode 100644 index 0000000..e3d1a28 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/GTLQueryShopping.h @@ -0,0 +1,423 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryShopping.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLQueryShopping (2 custom class methods, 35 custom properties) +// GTLShoppingProductsGetCategories (0 custom class methods, 3 custom properties) +// GTLShoppingProductsGetPlusOne (0 custom class methods, 3 custom properties) +// GTLShoppingProductsGetRecommendations (0 custom class methods, 3 custom properties) +// GTLShoppingProductsListCategories (0 custom class methods, 3 custom properties) +// GTLShoppingProductsListCategoryRecommendations (0 custom class methods, 4 custom properties) +// GTLShoppingProductsListExtras (0 custom class methods, 2 custom properties) +// GTLShoppingProductsListFacets (0 custom class methods, 5 custom properties) +// GTLShoppingProductsListPlusOne (0 custom class methods, 3 custom properties) +// GTLShoppingProductsListPromotions (0 custom class methods, 2 custom properties) +// GTLShoppingProductsListRedirects (0 custom class methods, 2 custom properties) +// GTLShoppingProductsListRelatedQueries (0 custom class methods, 2 custom properties) +// GTLShoppingProductsListSpelling (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLShoppingProductsGetCategories; +@class GTLShoppingProductsGetPlusOne; +@class GTLShoppingProductsGetRecommendations; +@class GTLShoppingProductsListCategories; +@class GTLShoppingProductsListCategoryRecommendations; +@class GTLShoppingProductsListExtras; +@class GTLShoppingProductsListFacets; +@class GTLShoppingProductsListPlusOne; +@class GTLShoppingProductsListPromotions; +@class GTLShoppingProductsListRedirects; +@class GTLShoppingProductsListRelatedQueries; +@class GTLShoppingProductsListSpelling; + +@interface GTLQueryShopping : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (assign) NSUInteger accountId; +@property (copy) NSString *attributeFilter; +@property (copy) NSString *availability; +@property (copy) NSString *boostBy; +// "categories" has different types for some query methods; see the +// documentation for the right type for each query method. +@property (retain) id categories; +@property (retain) GTLShoppingProductsListCategoryRecommendations *categoryRecommendations; +@property (copy) NSString *channels; +@property (assign) BOOL clickTracking; +@property (copy) NSString *country; +@property (copy) NSString *crowdBy; +@property (copy) NSString *currency; +@property (retain) GTLShoppingProductsListExtras *extras; +@property (retain) GTLShoppingProductsListFacets *facets; +@property (copy) NSString *language; +@property (copy) NSString *location; +@property (assign) NSUInteger maxResults; +@property (assign) NSInteger maxVariants; +// "plusOne" has different types for some query methods; see the documentation +// for the right type for each query method. +@property (retain) id plusOne; +@property (copy) NSString *productId; +@property (copy) NSString *productIdType; +@property (retain) GTLShoppingProductsListPromotions *promotions; +@property (copy) NSString *q; +@property (copy) NSString *rankBy; +@property (retain) GTLShoppingProductsGetRecommendations *recommendations; +@property (retain) GTLShoppingProductsListRedirects *redirects; +@property (retain) GTLShoppingProductsListRelatedQueries *relatedQueries; +@property (copy) NSString *restrictBy; +@property (assign) BOOL safe; +@property (copy) NSString *source; +@property (retain) GTLShoppingProductsListSpelling *spelling; +@property (assign) NSUInteger startIndex; +@property (copy) NSString *taxonomy; +@property (copy) NSString *thumbnails; +@property (copy) NSString *useCase; + +#pragma mark - +#pragma mark "products" methods +// These create a GTLQueryShopping object. + +// Method: shopping.products.get +// Returns a single product +// Required: +// source: Query source +// accountId: Merchant center account id +// productIdType: Type of productId +// productId: Id of product +// Optional: +// attributeFilter: Comma separated list of attributes to return +// categories: For this method, "categories" should be of type +// GTLShoppingProductsGetCategories. +// location: Location used to determine tax and shipping +// plusOne: For this method, "plusOne" should be of type +// GTLShoppingProductsGetPlusOne. +// recommendations: GTLShoppingProductsGetRecommendations +// taxonomy: Merchant taxonomy +// thumbnails: Thumbnail specification +// Authorization scope(s): +// kGTLAuthScopeShoppingShoppingapi +// Fetches a GTLShoppingProduct. ++ (id)queryForProductsGetWithSource:(NSString *)source + accountId:(NSUInteger)accountId + productIdType:(NSString *)productIdType + productId:(NSString *)productId; + +// Method: shopping.products.list +// Returns a list of products and content modules +// Required: +// source: Query source +// Optional: +// attributeFilter: Comma separated list of attributes to return +// availability: Comma separated list of availabilities (outOfStock, limited, +// inStock, backOrder, preOrder, onDisplayToOrder) to return +// boostBy: Boosting specification +// categories: For this method, "categories" should be of type +// GTLShoppingProductsListCategories. +// categoryRecommendations: GTLShoppingProductsListCategoryRecommendations +// channels: Channels specification +// clickTracking: Whether to add a click tracking parameter to offer URLs +// country: Country restriction (ISO 3166) +// crowdBy: Crowding specification +// currency: Currency restriction (ISO 4217) +// extras: GTLShoppingProductsListExtras +// facets: GTLShoppingProductsListFacets +// language: Language restriction (BCP 47) +// location: Location used to determine tax and shipping +// maxResults: Maximum number of results to return +// maxVariants: Maximum number of variant results to return per result +// plusOne: For this method, "plusOne" should be of type +// GTLShoppingProductsListPlusOne. +// promotions: GTLShoppingProductsListPromotions +// q: Search query +// rankBy: Ranking specification +// redirects: GTLShoppingProductsListRedirects +// relatedQueries: GTLShoppingProductsListRelatedQueries +// restrictBy: Restriction specification +// safe: Whether safe search is enabled. Default: true +// spelling: GTLShoppingProductsListSpelling +// startIndex: Index (1-based) of first product to return +// taxonomy: Taxonomy name +// thumbnails: Image thumbnails specification +// useCase: One of CommerceSearchUseCase, ShoppingApiUseCase +// Authorization scope(s): +// kGTLAuthScopeShoppingShoppingapi +// Fetches a GTLShoppingProducts. ++ (id)queryForProductsListWithSource:(NSString *)source; + +@end + +#pragma mark - +#pragma mark method parameter objects +// These object are used only to pass a collection of parameters to a +// method as a single item. + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsGetCategories +// + +// Used for 'categories' parameter on 'shopping.products.get'. + +@interface GTLShoppingProductsGetCategories : GTLObject + +// Whether to return category information +@property (retain) NSNumber *enabled; // boolValue + +// Category specification +@property (copy) NSString *include; + +// This parameter is currently ignored +@property (retain) NSNumber *useGcsConfig; // boolValue + +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsGetPlusOne +// + +// Used for 'plusOne' parameter on 'shopping.products.get'. + +@interface GTLShoppingProductsGetPlusOne : GTLObject + +// Whether to return +1 button code +@property (retain) NSNumber *enabled; // boolValue + +// +1 button rendering styles +@property (copy) NSString *styles; + +// Whether to use +1 button styles configured in the GCS account +@property (retain) NSNumber *useGcsConfig; // boolValue + +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsGetRecommendations +// + +// Used for 'recommendations' parameter on 'shopping.products.get'. + +@interface GTLShoppingProductsGetRecommendations : GTLObject + +// Whether to return recommendation information +@property (retain) NSNumber *enabled; // boolValue + +// Recommendation specification +@property (copy) NSString *include; + +// This parameter is currently ignored +@property (retain) NSNumber *useGcsConfig; // boolValue + +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListCategories +// + +// Used for 'categories' parameter on 'shopping.products.list'. + +@interface GTLShoppingProductsListCategories : GTLObject + +// Whether to return category information +@property (retain) NSNumber *enabled; // boolValue + +// Category specification +@property (copy) NSString *include; + +// This parameter is currently ignored +@property (retain) NSNumber *useGcsConfig; // boolValue + +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListCategoryRecommendations +// + +// Used for 'categoryRecommendations' parameter on 'shopping.products.list'. + +@interface GTLShoppingProductsListCategoryRecommendations : GTLObject + +// Category for which to retrieve recommendations +@property (copy) NSString *category; + +// Whether to return category recommendation information +@property (retain) NSNumber *enabled; // boolValue + +// Category recommendation specification +@property (copy) NSString *include; + +// This parameter is currently ignored +@property (retain) NSNumber *useGcsConfig; // boolValue + +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListExtras +// + +// Used for 'extras' parameter on 'shopping.products.list'. + +@interface GTLShoppingProductsListExtras : GTLObject + +// Whether to return extra information. +@property (retain) NSNumber *enabled; // boolValue + +// What extra information to return. +@property (copy) NSString *info; + +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListFacets +// + +// Used for 'facets' parameter on 'shopping.products.list'. + +@interface GTLShoppingProductsListFacets : GTLObject + +// Facets to discover +@property (copy) NSString *discover; + +// Whether to return facet information +@property (retain) NSNumber *enabled; // boolValue + +// Facets to include (applies when useGcsConfig == false) +@property (copy) NSString *include; + +// Return empty facet buckets. +@property (retain) NSNumber *includeEmptyBuckets; // boolValue + +// Whether to return facet information as configured in the GCS account +@property (retain) NSNumber *useGcsConfig; // boolValue + +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListPlusOne +// + +// Used for 'plusOne' parameter on 'shopping.products.list'. + +@interface GTLShoppingProductsListPlusOne : GTLObject + +// Whether to return +1 button code +@property (retain) NSNumber *enabled; // boolValue + +// +1 button rendering styles +@property (copy) NSString *styles; + +// Whether to use +1 button styles configured in the GCS account +@property (retain) NSNumber *useGcsConfig; // boolValue + +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListPromotions +// + +// Used for 'promotions' parameter on 'shopping.products.list'. + +@interface GTLShoppingProductsListPromotions : GTLObject + +// Whether to return promotion information +@property (retain) NSNumber *enabled; // boolValue + +// Whether to return promotion information as configured in the GCS account +@property (retain) NSNumber *useGcsConfig; // boolValue + +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListRedirects +// + +// Used for 'redirects' parameter on 'shopping.products.list'. + +@interface GTLShoppingProductsListRedirects : GTLObject + +// Whether to return redirect information +@property (retain) NSNumber *enabled; // boolValue + +// Whether to return redirect information as configured in the GCS account +@property (retain) NSNumber *useGcsConfig; // boolValue + +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListRelatedQueries +// + +// Used for 'relatedQueries' parameter on 'shopping.products.list'. + +@interface GTLShoppingProductsListRelatedQueries : GTLObject + +// Whether to return related queries +@property (retain) NSNumber *enabled; // boolValue + +// This parameter is currently ignored +@property (retain) NSNumber *useGcsConfig; // boolValue + +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListSpelling +// + +// Used for 'spelling' parameter on 'shopping.products.list'. + +@interface GTLShoppingProductsListSpelling : GTLObject + +// Whether to return spelling suggestions +@property (retain) NSNumber *enabled; // boolValue + +// This parameter is currently ignored +@property (retain) NSNumber *useGcsConfig; // boolValue + +@end diff --git a/GTL/Source/Services/Shopping/Generated/GTLQueryShopping.m b/GTL/Source/Services/Shopping/Generated/GTLQueryShopping.m new file mode 100644 index 0000000..612b1a7 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/GTLQueryShopping.m @@ -0,0 +1,196 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryShopping.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLQueryShopping (2 custom class methods, 35 custom properties) +// GTLShoppingProductsGetCategories (0 custom class methods, 3 custom properties) +// GTLShoppingProductsGetPlusOne (0 custom class methods, 3 custom properties) +// GTLShoppingProductsGetRecommendations (0 custom class methods, 3 custom properties) +// GTLShoppingProductsListCategories (0 custom class methods, 3 custom properties) +// GTLShoppingProductsListCategoryRecommendations (0 custom class methods, 4 custom properties) +// GTLShoppingProductsListExtras (0 custom class methods, 2 custom properties) +// GTLShoppingProductsListFacets (0 custom class methods, 5 custom properties) +// GTLShoppingProductsListPlusOne (0 custom class methods, 3 custom properties) +// GTLShoppingProductsListPromotions (0 custom class methods, 2 custom properties) +// GTLShoppingProductsListRedirects (0 custom class methods, 2 custom properties) +// GTLShoppingProductsListRelatedQueries (0 custom class methods, 2 custom properties) +// GTLShoppingProductsListSpelling (0 custom class methods, 2 custom properties) + +#import "GTLQueryShopping.h" + +#import "GTLShoppingProduct.h" +#import "GTLShoppingProducts.h" + +@implementation GTLQueryShopping + +@dynamic accountId, attributeFilter, availability, boostBy, categories, + categoryRecommendations, channels, clickTracking, country, crowdBy, + currency, extras, facets, fields, language, location, maxResults, + maxVariants, plusOne, productId, productIdType, promotions, q, rankBy, + recommendations, redirects, relatedQueries, restrictBy, safe, source, + spelling, startIndex, taxonomy, thumbnails, useCase; + +#pragma mark - +#pragma mark "products" methods +// These create a GTLQueryShopping object. + ++ (id)queryForProductsGetWithSource:(NSString *)source + accountId:(NSUInteger)accountId + productIdType:(NSString *)productIdType + productId:(NSString *)productId { + NSString *methodName = @"shopping.products.get"; + GTLQueryShopping *query = [self queryWithMethodName:methodName]; + query.source = source; + query.accountId = accountId; + query.productIdType = productIdType; + query.productId = productId; + query.expectedObjectClass = [GTLShoppingProduct class]; + return query; +} + ++ (id)queryForProductsListWithSource:(NSString *)source { + NSString *methodName = @"shopping.products.list"; + GTLQueryShopping *query = [self queryWithMethodName:methodName]; + query.source = source; + query.expectedObjectClass = [GTLShoppingProducts class]; + return query; +} + +@end + +#pragma mark - +#pragma mark method parameter objects +// These object are used only to pass a collection of parameters to a +// method as a single item. + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsGetCategories +// + +@implementation GTLShoppingProductsGetCategories +@dynamic enabled, include, useGcsConfig; +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsGetPlusOne +// + +@implementation GTLShoppingProductsGetPlusOne +@dynamic enabled, styles, useGcsConfig; +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsGetRecommendations +// + +@implementation GTLShoppingProductsGetRecommendations +@dynamic enabled, include, useGcsConfig; +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListCategories +// + +@implementation GTLShoppingProductsListCategories +@dynamic enabled, include, useGcsConfig; +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListCategoryRecommendations +// + +@implementation GTLShoppingProductsListCategoryRecommendations +@dynamic category, enabled, include, useGcsConfig; +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListExtras +// + +@implementation GTLShoppingProductsListExtras +@dynamic enabled, info; +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListFacets +// + +@implementation GTLShoppingProductsListFacets +@dynamic discover, enabled, include, includeEmptyBuckets, useGcsConfig; +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListPlusOne +// + +@implementation GTLShoppingProductsListPlusOne +@dynamic enabled, styles, useGcsConfig; +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListPromotions +// + +@implementation GTLShoppingProductsListPromotions +@dynamic enabled, useGcsConfig; +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListRedirects +// + +@implementation GTLShoppingProductsListRedirects +@dynamic enabled, useGcsConfig; +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListRelatedQueries +// + +@implementation GTLShoppingProductsListRelatedQueries +@dynamic enabled, useGcsConfig; +@end + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsListSpelling +// + +@implementation GTLShoppingProductsListSpelling +@dynamic enabled, useGcsConfig; +@end diff --git a/GTL/Source/Services/Shopping/Generated/GTLServiceShopping.h b/GTL/Source/Services/Shopping/Generated/GTLServiceShopping.h new file mode 100644 index 0000000..d7e3132 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/GTLServiceShopping.h @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceShopping.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLServiceShopping (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceShopping : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryShopping.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Shopping/Generated/GTLServiceShopping.m b/GTL/Source/Services/Shopping/Generated/GTLServiceShopping.m new file mode 100644 index 0000000..f14a1d9 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/GTLServiceShopping.m @@ -0,0 +1,67 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceShopping.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLServiceShopping (0 custom class methods, 0 custom properties) + +#import "GTLShopping.h" + +@implementation GTLServiceShopping + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryShopping class], + [GTLShoppingModelCategory class], + [GTLShoppingModelDebug class], + [GTLShoppingModelExtras class], + [GTLShoppingModelProduct class], + [GTLShoppingModelRecommendations class], + [GTLShoppingProduct class], + [GTLShoppingProducts class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v1"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Shopping/Generated/GTLShopping.h b/GTL/Source/Services/Shopping/Generated/GTLShopping.h new file mode 100644 index 0000000..d7c93b8 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/GTLShopping.h @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShopping.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started + +#import "GTLShoppingConstants.h" + +#import "GTLShoppingModelCategory.h" +#import "GTLShoppingModelDebug.h" +#import "GTLShoppingModelExtras.h" +#import "GTLShoppingModelProduct.h" +#import "GTLShoppingModelRecommendations.h" +#import "GTLShoppingProduct.h" +#import "GTLShoppingProducts.h" + +#import "GTLQueryShopping.h" +#import "GTLServiceShopping.h" diff --git a/GTL/Source/Services/Shopping/Generated/GTLShoppingConstants.h b/GTL/Source/Services/Shopping/Generated/GTLShoppingConstants.h new file mode 100644 index 0000000..110a33d --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/GTLShoppingConstants.h @@ -0,0 +1,39 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// View your product data +GTL_EXTERN NSString * const kGTLAuthScopeShoppingShoppingapi; // "https://www.googleapis.com/auth/shoppingapi" diff --git a/GTL/Source/Services/Shopping/Generated/GTLShoppingConstants.m b/GTL/Source/Services/Shopping/Generated/GTLShoppingConstants.m new file mode 100644 index 0000000..1562fa9 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/GTLShoppingConstants.m @@ -0,0 +1,32 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started + +#import "GTLShoppingConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeShoppingShoppingapi = @"https://www.googleapis.com/auth/shoppingapi"; diff --git a/GTL/Source/Services/Shopping/Generated/GTLShoppingModelCategory.h b/GTL/Source/Services/Shopping/Generated/GTLShoppingModelCategory.h new file mode 100644 index 0000000..ac6ba66 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/GTLShoppingModelCategory.h @@ -0,0 +1,57 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingModelCategory.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingModelCategory (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelCategory +// + +@interface GTLShoppingModelCategory : GTLObject + +// Id of category. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Ids of the parents of the category. +@property (retain) NSArray *parents; // of NSString + +// Short name of category. +@property (copy) NSString *shortName; + +// URL of category. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/Shopping/Generated/GTLShoppingModelCategory.m b/GTL/Source/Services/Shopping/Generated/GTLShoppingModelCategory.m new file mode 100644 index 0000000..10e97df --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/GTLShoppingModelCategory.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingModelCategory.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingModelCategory (0 custom class methods, 4 custom properties) + +#import "GTLShoppingModelCategory.h" + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelCategory +// + +@implementation GTLShoppingModelCategory +@dynamic identifier, parents, shortName, url; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"parents"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Shopping/Generated/GTLShoppingModelDebug.h b/GTL/Source/Services/Shopping/Generated/GTLShoppingModelDebug.h new file mode 100644 index 0000000..7011854 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/GTLShoppingModelDebug.h @@ -0,0 +1,96 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingModelDebug.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingModelDebug (0 custom class methods, 9 custom properties) +// GTLShoppingModelDebugBackendTimesItem (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLShoppingModelDebugBackendTimesItem; + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelDebug +// + +@interface GTLShoppingModelDebug : GTLObject + +// Google internal +@property (retain) NSArray *backendTimes; // of GTLShoppingModelDebugBackendTimesItem + +// Google internal. +@property (retain) NSNumber *elapsedMillis; // longLongValue + +// Google internal. +@property (copy) NSString *facetsRequest; + +// Google internal. +@property (copy) NSString *facetsResponse; + +// Google internal. +@property (copy) NSString *rdcResponse; + +// Google internal. +@property (copy) NSString *recommendedItemsRequest; + +// Google internal. +@property (copy) NSString *recommendedItemsResponse; + +// Google internal. +@property (copy) NSString *searchRequest; + +// Google internal. +@property (copy) NSString *searchResponse; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelDebugBackendTimesItem +// + +@interface GTLShoppingModelDebugBackendTimesItem : GTLObject + +// Google internal +@property (retain) NSNumber *elapsedMillis; // longLongValue + +// Google internal +@property (copy) NSString *hostName; + +// Google internal +@property (copy) NSString *name; + +// Google internal +@property (retain) NSNumber *serverMillis; // longLongValue + +@end diff --git a/GTL/Source/Services/Shopping/Generated/GTLShoppingModelDebug.m b/GTL/Source/Services/Shopping/Generated/GTLShoppingModelDebug.m new file mode 100644 index 0000000..f159b15 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/GTLShoppingModelDebug.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingModelDebug.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingModelDebug (0 custom class methods, 9 custom properties) +// GTLShoppingModelDebugBackendTimesItem (0 custom class methods, 4 custom properties) + +#import "GTLShoppingModelDebug.h" + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelDebug +// + +@implementation GTLShoppingModelDebug +@dynamic backendTimes, elapsedMillis, facetsRequest, facetsResponse, + rdcResponse, recommendedItemsRequest, recommendedItemsResponse, + searchRequest, searchResponse; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLShoppingModelDebugBackendTimesItem class] + forKey:@"backendTimes"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelDebugBackendTimesItem +// + +@implementation GTLShoppingModelDebugBackendTimesItem +@dynamic elapsedMillis, hostName, name, serverMillis; +@end diff --git a/GTL/Source/Services/Shopping/Generated/GTLShoppingModelExtras.h b/GTL/Source/Services/Shopping/Generated/GTLShoppingModelExtras.h new file mode 100644 index 0000000..b8dadc6 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/GTLShoppingModelExtras.h @@ -0,0 +1,73 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingModelExtras.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingModelExtras (0 custom class methods, 2 custom properties) +// GTLShoppingModelExtrasFacetRulesItem (0 custom class methods, 1 custom properties) +// GTLShoppingModelExtrasRankingRulesItem (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLShoppingModelExtrasFacetRulesItem; +@class GTLShoppingModelExtrasRankingRulesItem; + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelExtras +// + +@interface GTLShoppingModelExtras : GTLObject +@property (retain) NSArray *facetRules; // of GTLShoppingModelExtrasFacetRulesItem + +// Names of boost (ranking) rules applicable to this search. +@property (retain) NSArray *rankingRules; // of GTLShoppingModelExtrasRankingRulesItem + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelExtrasFacetRulesItem +// + +@interface GTLShoppingModelExtrasFacetRulesItem : GTLObject +@property (copy) NSString *name; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelExtrasRankingRulesItem +// + +@interface GTLShoppingModelExtrasRankingRulesItem : GTLObject +@property (copy) NSString *name; +@end diff --git a/GTL/Source/Services/Shopping/Generated/GTLShoppingModelExtras.m b/GTL/Source/Services/Shopping/Generated/GTLShoppingModelExtras.m new file mode 100644 index 0000000..7266c25 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/GTLShoppingModelExtras.m @@ -0,0 +1,72 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingModelExtras.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingModelExtras (0 custom class methods, 2 custom properties) +// GTLShoppingModelExtrasFacetRulesItem (0 custom class methods, 1 custom properties) +// GTLShoppingModelExtrasRankingRulesItem (0 custom class methods, 1 custom properties) + +#import "GTLShoppingModelExtras.h" + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelExtras +// + +@implementation GTLShoppingModelExtras +@dynamic facetRules, rankingRules; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLShoppingModelExtrasFacetRulesItem class], @"facetRules", + [GTLShoppingModelExtrasRankingRulesItem class], @"rankingRules", + nil]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelExtrasFacetRulesItem +// + +@implementation GTLShoppingModelExtrasFacetRulesItem +@dynamic name; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelExtrasRankingRulesItem +// + +@implementation GTLShoppingModelExtrasRankingRulesItem +@dynamic name; +@end diff --git a/GTL/Source/Services/Shopping/Generated/GTLShoppingModelProduct.h b/GTL/Source/Services/Shopping/Generated/GTLShoppingModelProduct.h new file mode 100644 index 0000000..9e2fae8 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/GTLShoppingModelProduct.h @@ -0,0 +1,335 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingModelProduct.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingModelProduct (0 custom class methods, 35 custom properties) +// GTLShoppingModelProductAttributesItem (0 custom class methods, 5 custom properties) +// GTLShoppingModelProductAuthor (0 custom class methods, 2 custom properties) +// GTLShoppingModelProductImagesItem (0 custom class methods, 3 custom properties) +// GTLShoppingModelProductInternal4Item (0 custom class methods, 2 custom properties) +// GTLShoppingModelProductInventoriesItem (0 custom class methods, 15 custom properties) +// GTLShoppingModelProductVariantsItem (0 custom class methods, 1 custom properties) +// GTLShoppingModelProductImagesItemThumbnailsItem (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLShoppingModelProduct; +@class GTLShoppingModelProductAttributesItem; +@class GTLShoppingModelProductAuthor; +@class GTLShoppingModelProductImagesItem; +@class GTLShoppingModelProductImagesItemThumbnailsItem; +@class GTLShoppingModelProductInternal4Item; +@class GTLShoppingModelProductInventoriesItem; +@class GTLShoppingModelProductVariantsItem; + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProduct +// + +@interface GTLShoppingModelProduct : GTLObject + +// Attributes of product (available only with a cx source). +@property (retain) NSArray *attributes; // of GTLShoppingModelProductAttributesItem + +// Author of product. +@property (retain) GTLShoppingModelProductAuthor *author; + +// Brand of product. +@property (copy) NSString *brand; + +// Categories of product according to the selected taxonomy, omitted if no +// taxonomy is selected. +@property (retain) NSArray *categories; // of NSString + +// Condition of product (one of: new, refurbished, used). +@property (copy) NSString *condition; + +// ISO 3166 code of target country of product. +@property (copy) NSString *country; + +// RFC 3339 formatted creation time and date of product. +@property (retain) GTLDateTime *creationTime; + +// Description of product. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Google id of product. +@property (retain) NSNumber *googleId; // unsignedLongLongValue + +// The first GTIN of the product. Deprecated in favor of "gtins". +@property (copy) NSString *gtin; + +// List of all the product's GTINs (in GTIN-14 format). +@property (retain) NSArray *gtins; // of NSString + +// Images of product. +@property (retain) NSArray *images; // of GTLShoppingModelProductImagesItem + +// Google Internal. +@property (retain) NSArray *internal1; // of NSString + +// Google Internal. +@property (retain) NSArray *internal10; // of NSString + +// Google Internal. +@property (copy) NSString *internal12; + +// Google Internal. +@property (retain) NSNumber *internal13; // doubleValue + +// Google Internal. +@property (retain) NSNumber *internal14; // doubleValue + +// Google Internal. +@property (retain) NSNumber *internal15; // doubleValue + +// Google Internal. +@property (copy) NSString *internal3; + +// Google Internal. +@property (retain) NSArray *internal4; // of GTLShoppingModelProductInternal4Item + +// Google Internal. +@property (copy) NSString *internal6; + +// Google Internal. +@property (retain) NSNumber *internal7; // boolValue + +// Google Internal. +@property (retain) NSArray *internal8; // of NSString + +// Inventories of product. +@property (retain) NSArray *inventories; // of GTLShoppingModelProductInventoriesItem + +// BCP 47 language tag of language of product. +@property (copy) NSString *language; + +// Link to product. +@property (copy) NSString *link; + +// RFC 3339 formatted modification time and date of product. +@property (retain) GTLDateTime *modificationTime; + +// List of all the product's MPNs. +@property (retain) NSArray *mpns; // of NSString + +// Code to add to the page to render the +1 content. +@property (copy) NSString *plusOne; + +// Merchant-provided id of product (available only with a cx source). +@property (copy) NSString *providedId; + +// Whether this product matched the user query. Only set for the variant offers +// (if any) attached to a product offer. +@property (retain) NSNumber *queryMatched; // boolValue + +// Google Internal +@property (retain) NSNumber *score; // floatValue + +// Title of product. +@property (copy) NSString *title; + +// The number of variant offers returned that matched the query. +@property (retain) NSNumber *totalMatchingVariants; // intValue + +// A list of variant offers associated with this product. +@property (retain) NSArray *variants; // of GTLShoppingModelProductVariantsItem + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductAttributesItem +// + +@interface GTLShoppingModelProductAttributesItem : GTLObject + +// Display Name of prodct attribute. +@property (copy) NSString *displayName; + +// Name of product attribute. +@property (copy) NSString *name; + +// Type of product attribute (one of: text, bool, int, float, dateRange, url). +@property (copy) NSString *type; + +// Unit of product attribute. +@property (copy) NSString *unit; + +// Value of product attribute. +@property (retain) id value; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductAuthor +// + +@interface GTLShoppingModelProductAuthor : GTLObject + +// Account id of product author. +@property (retain) NSNumber *accountId; // unsignedLongLongValue + +// Name of product author. +@property (copy) NSString *name; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductImagesItem +// + +@interface GTLShoppingModelProductImagesItem : GTLObject + +// Link to product image. +@property (copy) NSString *link; + +@property (copy) NSString *status; + +// Thumbnails of product image. +@property (retain) NSArray *thumbnails; // of GTLShoppingModelProductImagesItemThumbnailsItem + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductInternal4Item +// + +@interface GTLShoppingModelProductInternal4Item : GTLObject + +// Google Internal. +@property (retain) NSNumber *confidence; // doubleValue + +// Google Internal. +@property (retain) NSNumber *node; // intValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductInventoriesItem +// + +@interface GTLShoppingModelProductInventoriesItem : GTLObject + +// Availability of product inventory. +@property (copy) NSString *availability; + +// Channel of product inventory (one of: online, local). +@property (copy) NSString *channel; + +// Currency of product inventory (an ISO 4217 alphabetic code). +@property (copy) NSString *currency; + +// Distance of product inventory. +@property (retain) NSNumber *distance; // floatValue + +// Distance unit of product inventory. +@property (copy) NSString *distanceUnit; + +// Number of months for installment price. +@property (retain) NSNumber *installmentMonths; // intValue + +// Installment price of product inventory. +@property (retain) NSNumber *installmentPrice; // floatValue + +// Original price of product inventory. Only returned for products that are on +// sale. +@property (retain) NSNumber *originalPrice; // floatValue + +// Price of product inventory. +@property (retain) NSNumber *price; // floatValue + +// Sale end date. +@property (retain) GTLDateTime *saleEndDate; + +// Sale price of product inventory. +@property (retain) NSNumber *salePrice; // floatValue + +// Sale start date. +@property (retain) GTLDateTime *saleStartDate; + +// Shipping cost of product inventory. +@property (retain) NSNumber *shipping; // floatValue + +// Store ID of product inventory. +@property (copy) NSString *storeId; + +// Tax of product inventory. +@property (retain) NSNumber *tax; // floatValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductVariantsItem +// + +@interface GTLShoppingModelProductVariantsItem : GTLObject + +// The detailed offer data for a particular variant offer. +@property (retain) GTLShoppingModelProduct *variant; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductImagesItemThumbnailsItem +// + +@interface GTLShoppingModelProductImagesItemThumbnailsItem : GTLObject + +// Content of thumbnail (only available for the first thumbnail of the top +// results if SAYT is enabled). +@property (copy) NSString *content; + +// Height of thumbnail (omitted if not specified in the request). +@property (retain) NSNumber *height; // intValue + +// Link to thumbnail. +@property (copy) NSString *link; + +// Width of thumbnail (omitted if not specified in the request). +@property (retain) NSNumber *width; // intValue + +@end diff --git a/GTL/Source/Services/Shopping/Generated/GTLShoppingModelProduct.m b/GTL/Source/Services/Shopping/Generated/GTLShoppingModelProduct.m new file mode 100644 index 0000000..13fd780 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/GTLShoppingModelProduct.m @@ -0,0 +1,158 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingModelProduct.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingModelProduct (0 custom class methods, 35 custom properties) +// GTLShoppingModelProductAttributesItem (0 custom class methods, 5 custom properties) +// GTLShoppingModelProductAuthor (0 custom class methods, 2 custom properties) +// GTLShoppingModelProductImagesItem (0 custom class methods, 3 custom properties) +// GTLShoppingModelProductInternal4Item (0 custom class methods, 2 custom properties) +// GTLShoppingModelProductInventoriesItem (0 custom class methods, 15 custom properties) +// GTLShoppingModelProductVariantsItem (0 custom class methods, 1 custom properties) +// GTLShoppingModelProductImagesItemThumbnailsItem (0 custom class methods, 4 custom properties) + +#import "GTLShoppingModelProduct.h" + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProduct +// + +@implementation GTLShoppingModelProduct +@dynamic attributes, author, brand, categories, condition, country, + creationTime, descriptionProperty, googleId, gtin, gtins, images, + internal1, internal10, internal12, internal13, internal14, internal15, + internal3, internal4, internal6, internal7, internal8, inventories, + language, link, modificationTime, mpns, plusOne, providedId, + queryMatched, score, title, totalMatchingVariants, variants; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLShoppingModelProductAttributesItem class], @"attributes", + [NSString class], @"categories", + [NSString class], @"gtins", + [GTLShoppingModelProductImagesItem class], @"images", + [NSString class], @"internal1", + [NSString class], @"internal10", + [GTLShoppingModelProductInternal4Item class], @"internal4", + [NSString class], @"internal8", + [GTLShoppingModelProductInventoriesItem class], @"inventories", + [NSString class], @"mpns", + [GTLShoppingModelProductVariantsItem class], @"variants", + nil]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductAttributesItem +// + +@implementation GTLShoppingModelProductAttributesItem +@dynamic displayName, name, type, unit, value; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductAuthor +// + +@implementation GTLShoppingModelProductAuthor +@dynamic accountId, name; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductImagesItem +// + +@implementation GTLShoppingModelProductImagesItem +@dynamic link, status, thumbnails; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLShoppingModelProductImagesItemThumbnailsItem class] + forKey:@"thumbnails"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductInternal4Item +// + +@implementation GTLShoppingModelProductInternal4Item +@dynamic confidence, node; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductInventoriesItem +// + +@implementation GTLShoppingModelProductInventoriesItem +@dynamic availability, channel, currency, distance, distanceUnit, + installmentMonths, installmentPrice, originalPrice, price, saleEndDate, + salePrice, saleStartDate, shipping, storeId, tax; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductVariantsItem +// + +@implementation GTLShoppingModelProductVariantsItem +@dynamic variant; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelProductImagesItemThumbnailsItem +// + +@implementation GTLShoppingModelProductImagesItemThumbnailsItem +@dynamic content, height, link, width; +@end diff --git a/GTL/Source/Services/Shopping/Generated/GTLShoppingModelRecommendations.h b/GTL/Source/Services/Shopping/Generated/GTLShoppingModelRecommendations.h new file mode 100644 index 0000000..cf0f37f --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/GTLShoppingModelRecommendations.h @@ -0,0 +1,70 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingModelRecommendations.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingModelRecommendations (0 custom class methods, 2 custom properties) +// GTLShoppingModelRecommendationsRecommendationListItem (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLShoppingModelProduct; +@class GTLShoppingModelRecommendationsRecommendationListItem; + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelRecommendations +// + +@interface GTLShoppingModelRecommendations : GTLObject + +// List of recommendations. +@property (retain) NSArray *recommendationList; // of GTLShoppingModelRecommendationsRecommendationListItem + +// Type of recommendation list (for offer-based recommendations, one of: all, +// purchaseToPurchase, visitToVisit, visitToPurchase, relatedItems; for +// category-based recommendations, one of: all, categoryMostVisited, +// categoryBestSeller). +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelRecommendationsRecommendationListItem +// + +@interface GTLShoppingModelRecommendationsRecommendationListItem : GTLObject + +// Recommended product. +@property (retain) GTLShoppingModelProduct *product; + +@end diff --git a/GTL/Source/Services/Shopping/Generated/GTLShoppingModelRecommendations.m b/GTL/Source/Services/Shopping/Generated/GTLShoppingModelRecommendations.m new file mode 100644 index 0000000..1afa6eb --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/GTLShoppingModelRecommendations.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingModelRecommendations.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingModelRecommendations (0 custom class methods, 2 custom properties) +// GTLShoppingModelRecommendationsRecommendationListItem (0 custom class methods, 1 custom properties) + +#import "GTLShoppingModelRecommendations.h" + +#import "GTLShoppingModelProduct.h" + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelRecommendations +// + +@implementation GTLShoppingModelRecommendations +@dynamic recommendationList, type; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLShoppingModelRecommendationsRecommendationListItem class] + forKey:@"recommendationList"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingModelRecommendationsRecommendationListItem +// + +@implementation GTLShoppingModelRecommendationsRecommendationListItem +@dynamic product; +@end diff --git a/GTL/Source/Services/Shopping/Generated/GTLShoppingProduct.h b/GTL/Source/Services/Shopping/Generated/GTLShoppingProduct.h new file mode 100644 index 0000000..fbca7af --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/GTLShoppingProduct.h @@ -0,0 +1,75 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingProduct.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingProduct (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLShoppingModelCategory; +@class GTLShoppingModelDebug; +@class GTLShoppingModelProduct; +@class GTLShoppingModelRecommendations; + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProduct +// + +@interface GTLShoppingProduct : GTLObject + +// List of categories for product. +@property (retain) NSArray *categories; // of GTLShoppingModelCategory + +// Google internal. +@property (retain) GTLShoppingModelDebug *debug; + +// Id of product. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The kind of item, always shopping#product. +@property (copy) NSString *kind; + +// Product. +@property (retain) GTLShoppingModelProduct *product; + +// Recommendations for product. +@property (retain) NSArray *recommendations; // of GTLShoppingModelRecommendations + +// Unique identifier for this request. +@property (copy) NSString *requestId; + +// Self link of product when generated for a lookup request. Self link of +// product when generated for a search request. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Shopping/Generated/GTLShoppingProduct.m b/GTL/Source/Services/Shopping/Generated/GTLShoppingProduct.m new file mode 100644 index 0000000..c0bdbad --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/GTLShoppingProduct.m @@ -0,0 +1,67 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingProduct.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingProduct (0 custom class methods, 8 custom properties) + +#import "GTLShoppingProduct.h" + +#import "GTLShoppingModelCategory.h" +#import "GTLShoppingModelDebug.h" +#import "GTLShoppingModelProduct.h" +#import "GTLShoppingModelRecommendations.h" + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProduct +// + +@implementation GTLShoppingProduct +@dynamic categories, debug, identifier, kind, product, recommendations, + requestId, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLShoppingModelCategory class], @"categories", + [GTLShoppingModelRecommendations class], @"recommendations", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"shopping#product"]; +} + +@end diff --git a/GTL/Source/Services/Shopping/Generated/GTLShoppingProducts.h b/GTL/Source/Services/Shopping/Generated/GTLShoppingProducts.h new file mode 100644 index 0000000..ca4f617 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/GTLShoppingProducts.h @@ -0,0 +1,295 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingProducts.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingProducts (0 custom class methods, 22 custom properties) +// GTLShoppingProductsFacetsItem (0 custom class methods, 7 custom properties) +// GTLShoppingProductsPromotionsItem (0 custom class methods, 8 custom properties) +// GTLShoppingProductsSpelling (0 custom class methods, 1 custom properties) +// GTLShoppingProductsStoresItem (0 custom class methods, 7 custom properties) +// GTLShoppingProductsFacetsItemBucketsItem (0 custom class methods, 6 custom properties) +// GTLShoppingProductsPromotionsItemCustomFieldsItem (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLShoppingModelCategory; +@class GTLShoppingModelDebug; +@class GTLShoppingModelExtras; +@class GTLShoppingModelProduct; +@class GTLShoppingModelRecommendations; +@class GTLShoppingProduct; +@class GTLShoppingProductsFacetsItem; +@class GTLShoppingProductsFacetsItemBucketsItem; +@class GTLShoppingProductsPromotionsItem; +@class GTLShoppingProductsPromotionsItemCustomFieldsItem; +@class GTLShoppingProductsSpelling; +@class GTLShoppingProductsStoresItem; + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProducts +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLShoppingProducts : GTLCollectionObject + +// List of categories. +@property (retain) NSArray *categories; // of GTLShoppingModelCategory + +// Recommendations for category. +@property (retain) NSArray *categoryRecommendations; // of GTLShoppingModelRecommendations + +// Current item count. +@property (retain) NSNumber *currentItemCount; // intValue + +// Google internal. +@property (retain) GTLShoppingModelDebug *debug; + +// Etag of feed. +@property (copy) NSString *ETag; + +// List of extras. +@property (retain) GTLShoppingModelExtras *extras; + +// List of facets. +@property (retain) NSArray *facets; // of GTLShoppingProductsFacetsItem + +// Id of feed. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// List of returned products. +@property (retain) NSArray *items; // of GTLShoppingProduct + +// Number of items per page of results. +@property (retain) NSNumber *itemsPerPage; // intValue + +// The fixed string "shopping#products". The kind of feed returned. +@property (copy) NSString *kind; + +// Next link of feed. +@property (copy) NSString *nextLink; + +// Previous link of feed. +@property (copy) NSString *previousLink; + +// List of promotions. +@property (retain) NSArray *promotions; // of GTLShoppingProductsPromotionsItem + +// Redirects. +@property (retain) NSArray *redirects; // of NSString + +// Related queries. +@property (retain) NSArray *relatedQueries; // of NSString + +// Unique identifier for this request. +@property (copy) NSString *requestId; + +// Self link of feed. +@property (copy) NSString *selfLink; + +// Spelling. +@property (retain) GTLShoppingProductsSpelling *spelling; + +// 1-based index of the first item in the search results. +@property (retain) NSNumber *startIndex; // intValue + +// List of returned stores. +@property (retain) NSArray *stores; // of GTLShoppingProductsStoresItem + +// Total number of search results. +@property (retain) NSNumber *totalItems; // intValue + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsFacetsItem +// + +@interface GTLShoppingProductsFacetsItem : GTLObject + +// List of Buckets within facet. +@property (retain) NSArray *buckets; // of GTLShoppingProductsFacetsItemBucketsItem + +// Number of products matching the query that have a value for the facet's +// property or attribute. +@property (retain) NSNumber *count; // intValue + +// Display name of facet. +@property (copy) NSString *displayName; + +// Name of the facet's attribute (omitted for property facets). +@property (copy) NSString *name; + +// Property of facet (omitted for attribute facets). +@property (copy) NSString *property; + +// Type of facet's attribute (omitted for property facets, one of: text, bool, +// int, float). +@property (copy) NSString *type; + +// Unit of the facet's property or attribute (omitted if the facet's property or +// attribute has no unit). +@property (copy) NSString *unit; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsPromotionsItem +// + +@interface GTLShoppingProductsPromotionsItem : GTLObject + +// List of custom fields of promotion. +@property (retain) NSArray *customFields; // of GTLShoppingProductsPromotionsItemCustomFieldsItem + +// Custom HTML of promotion (omitted if type is not custom). +@property (copy) NSString *customHtml; + +// Description of promotion (omitted if type is not standard). +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// Link to promotion (omitted if type is not standard). +@property (copy) NSString *destLink; + +// Link to promotion image (omitted if type is not standard). +@property (copy) NSString *imageLink; + +// Name of promotion (omitted if type is not standard). +@property (copy) NSString *name; + +// Product of promotion (omitted if type is not product). +@property (retain) GTLShoppingModelProduct *product; + +// Type of promotion (one of: standard, product, custom). +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsSpelling +// + +@interface GTLShoppingProductsSpelling : GTLObject + +// Suggestion for spelling. +@property (copy) NSString *suggestion; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsStoresItem +// + +@interface GTLShoppingProductsStoresItem : GTLObject + +// Address of store. +@property (copy) NSString *address; + +// Location of store. +@property (copy) NSString *location; + +// Name of merchant. +@property (copy) NSString *name; + +// Merchant-supplied store code. +@property (copy) NSString *storeCode; + +// Id of store. +@property (copy) NSString *storeId; + +// Name of store. +@property (copy) NSString *storeName; + +// Telephone number of store. +@property (copy) NSString *telephone; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsFacetsItemBucketsItem +// + +@interface GTLShoppingProductsFacetsItemBucketsItem : GTLObject + +// Number of products matching the query that have a value for the facet's +// property or attribute that matches the bucket. +@property (retain) NSNumber *count; // intValue + +// Upper bound of the bucket (omitted for value buckets or if the range has no +// upper bound). +@property (retain) id max; + +// Whether the upper bound of the bucket is exclusive (omitted for value buckets +// or if the range has no upper bound). +@property (retain) NSNumber *maxExclusive; // boolValue + +// Lower bound of the bucket (omitted for value buckets or if the range has no +// lower bound). +@property (retain) id min; + +// Whether the lower bound of the bucket is exclusive (omitted for value buckets +// or if the range has no lower bound). +@property (retain) NSNumber *minExclusive; // boolValue + +// Value of the bucket (omitted for range buckets). +@property (retain) id value; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsPromotionsItemCustomFieldsItem +// + +@interface GTLShoppingProductsPromotionsItemCustomFieldsItem : GTLObject + +// Name of field. +@property (copy) NSString *name; + +// Value of field. +@property (copy) NSString *value; + +@end diff --git a/GTL/Source/Services/Shopping/Generated/GTLShoppingProducts.m b/GTL/Source/Services/Shopping/Generated/GTLShoppingProducts.m new file mode 100644 index 0000000..367569f --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/GTLShoppingProducts.m @@ -0,0 +1,169 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShoppingProducts.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started +// Classes: +// GTLShoppingProducts (0 custom class methods, 22 custom properties) +// GTLShoppingProductsFacetsItem (0 custom class methods, 7 custom properties) +// GTLShoppingProductsPromotionsItem (0 custom class methods, 8 custom properties) +// GTLShoppingProductsSpelling (0 custom class methods, 1 custom properties) +// GTLShoppingProductsStoresItem (0 custom class methods, 7 custom properties) +// GTLShoppingProductsFacetsItemBucketsItem (0 custom class methods, 6 custom properties) +// GTLShoppingProductsPromotionsItemCustomFieldsItem (0 custom class methods, 2 custom properties) + +#import "GTLShoppingProducts.h" + +#import "GTLShoppingModelCategory.h" +#import "GTLShoppingModelDebug.h" +#import "GTLShoppingModelExtras.h" +#import "GTLShoppingModelProduct.h" +#import "GTLShoppingModelRecommendations.h" +#import "GTLShoppingProduct.h" + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProducts +// + +@implementation GTLShoppingProducts +@dynamic categories, categoryRecommendations, currentItemCount, debug, ETag, + extras, facets, identifier, items, itemsPerPage, kind, nextLink, + previousLink, promotions, redirects, relatedQueries, requestId, + selfLink, spelling, startIndex, stores, totalItems; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLShoppingModelCategory class], @"categories", + [GTLShoppingModelRecommendations class], @"categoryRecommendations", + [GTLShoppingProductsFacetsItem class], @"facets", + [GTLShoppingProduct class], @"items", + [GTLShoppingProductsPromotionsItem class], @"promotions", + [NSString class], @"redirects", + [NSString class], @"relatedQueries", + [GTLShoppingProductsStoresItem class], @"stores", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"shopping#products"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsFacetsItem +// + +@implementation GTLShoppingProductsFacetsItem +@dynamic buckets, count, displayName, name, property, type, unit; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLShoppingProductsFacetsItemBucketsItem class] + forKey:@"buckets"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsPromotionsItem +// + +@implementation GTLShoppingProductsPromotionsItem +@dynamic customFields, customHtml, descriptionProperty, destLink, imageLink, + name, product, type; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLShoppingProductsPromotionsItemCustomFieldsItem class] + forKey:@"customFields"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsSpelling +// + +@implementation GTLShoppingProductsSpelling +@dynamic suggestion; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsStoresItem +// + +@implementation GTLShoppingProductsStoresItem +@dynamic address, location, name, storeCode, storeId, storeName, telephone; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsFacetsItemBucketsItem +// + +@implementation GTLShoppingProductsFacetsItemBucketsItem +@dynamic count, max, maxExclusive, min, minExclusive, value; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLShoppingProductsPromotionsItemCustomFieldsItem +// + +@implementation GTLShoppingProductsPromotionsItemCustomFieldsItem +@dynamic name, value; +@end diff --git a/GTL/Source/Services/Shopping/Generated/GTLShopping_Sources.m b/GTL/Source/Services/Shopping/Generated/GTLShopping_Sources.m new file mode 100644 index 0000000..acdfec8 --- /dev/null +++ b/GTL/Source/Services/Shopping/Generated/GTLShopping_Sources.m @@ -0,0 +1,43 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLShopping_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Search API For Shopping (shopping/v1) +// Description: +// Lets you search over product data. +// Documentation: +// https://developers.google.com/shopping-search/v1/getting_started + +#import "GTLShoppingConstants.m" + +#import "GTLShoppingModelCategory.m" +#import "GTLShoppingModelDebug.m" +#import "GTLShoppingModelExtras.m" +#import "GTLShoppingModelProduct.m" +#import "GTLShoppingModelRecommendations.m" +#import "GTLShoppingProduct.m" +#import "GTLShoppingProducts.m" + +#import "GTLQueryShopping.m" +#import "GTLServiceShopping.m" diff --git a/GTL/Source/Services/Storage/.svn/all-wcprops b/GTL/Source/Services/Storage/.svn/all-wcprops new file mode 100644 index 0000000..9d964f9 --- /dev/null +++ b/GTL/Source/Services/Storage/.svn/all-wcprops @@ -0,0 +1,5 @@ +K 25 +svn:wc:ra_dav:version-url +V 47 +/svn/!svn/ver/225/trunk/Source/Services/Storage +END diff --git a/GTL/Source/Services/Storage/.svn/entries b/GTL/Source/Services/Storage/.svn/entries new file mode 100644 index 0000000..3a3bea8 --- /dev/null +++ b/GTL/Source/Services/Storage/.svn/entries @@ -0,0 +1,31 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Storage +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +Generated +dir + diff --git a/GTL/Source/Services/Storage/Generated/.svn/all-wcprops b/GTL/Source/Services/Storage/Generated/.svn/all-wcprops new file mode 100644 index 0000000..8d08dcd --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/all-wcprops @@ -0,0 +1,149 @@ +K 25 +svn:wc:ra_dav:version-url +V 57 +/svn/!svn/ver/225/trunk/Source/Services/Storage/Generated +END +GTLStorageObjects.m +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/203/trunk/Source/Services/Storage/Generated/GTLStorageObjects.m +END +GTLStorageObjectAccessControl.m +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/203/trunk/Source/Services/Storage/Generated/GTLStorageObjectAccessControl.m +END +GTLStorageBucketAccessControl.h +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/203/trunk/Source/Services/Storage/Generated/GTLStorageBucketAccessControl.h +END +GTLServiceStorage.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/203/trunk/Source/Services/Storage/Generated/GTLServiceStorage.h +END +GTLStorageBuckets.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/203/trunk/Source/Services/Storage/Generated/GTLStorageBuckets.h +END +GTLQueryStorage.h +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/203/trunk/Source/Services/Storage/Generated/GTLQueryStorage.h +END +GTLServiceStorage.m +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/203/trunk/Source/Services/Storage/Generated/GTLServiceStorage.m +END +GTLStorageBucketAccessControl.m +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/203/trunk/Source/Services/Storage/Generated/GTLStorageBucketAccessControl.m +END +GTLStorageBuckets.m +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/203/trunk/Source/Services/Storage/Generated/GTLStorageBuckets.m +END +GTLStorageObject.h +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/203/trunk/Source/Services/Storage/Generated/GTLStorageObject.h +END +GTLQueryStorage.m +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/203/trunk/Source/Services/Storage/Generated/GTLQueryStorage.m +END +GTLStorageObject.m +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/203/trunk/Source/Services/Storage/Generated/GTLStorageObject.m +END +GTLStorageConstants.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/203/trunk/Source/Services/Storage/Generated/GTLStorageConstants.h +END +GTLStorageObjectAccessControls.h +K 25 +svn:wc:ra_dav:version-url +V 90 +/svn/!svn/ver/203/trunk/Source/Services/Storage/Generated/GTLStorageObjectAccessControls.h +END +GTLStorageBucket.h +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/203/trunk/Source/Services/Storage/Generated/GTLStorageBucket.h +END +GTLStorage.h +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/203/trunk/Source/Services/Storage/Generated/GTLStorage.h +END +GTLStorageConstants.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/203/trunk/Source/Services/Storage/Generated/GTLStorageConstants.m +END +GTLStorageObjectAccessControls.m +K 25 +svn:wc:ra_dav:version-url +V 90 +/svn/!svn/ver/203/trunk/Source/Services/Storage/Generated/GTLStorageObjectAccessControls.m +END +GTLStorageBucket.m +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/!svn/ver/203/trunk/Source/Services/Storage/Generated/GTLStorageBucket.m +END +GTLStorageBucketAccessControls.h +K 25 +svn:wc:ra_dav:version-url +V 90 +/svn/!svn/ver/203/trunk/Source/Services/Storage/Generated/GTLStorageBucketAccessControls.h +END +GTLStorage_Sources.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/225/trunk/Source/Services/Storage/Generated/GTLStorage_Sources.m +END +GTLStorageBucketAccessControls.m +K 25 +svn:wc:ra_dav:version-url +V 90 +/svn/!svn/ver/203/trunk/Source/Services/Storage/Generated/GTLStorageBucketAccessControls.m +END +GTLStorageObjects.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/203/trunk/Source/Services/Storage/Generated/GTLStorageObjects.h +END +GTLStorageObjectAccessControl.h +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/203/trunk/Source/Services/Storage/Generated/GTLStorageObjectAccessControl.h +END diff --git a/GTL/Source/Services/Storage/Generated/.svn/entries b/GTL/Source/Services/Storage/Generated/.svn/entries new file mode 100644 index 0000000..633bff7 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/entries @@ -0,0 +1,844 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Storage/Generated +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +GTLStorageObjects.m +file + + + + +2012-12-09T08:42:31.000000Z +61832d3c7bc628bfe3c58c8bf6befbdb +2012-08-23T07:03:03.735750Z +203 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1633 + +GTLStorageObjectAccessControl.m +file + + + + +2012-12-09T08:42:31.000000Z +6d8c2680c7ca6c6db63fc6a68944b021 +2012-08-23T07:03:03.735750Z +203 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1688 + +GTLStorageBucketAccessControl.h +file + + + + +2012-12-09T08:42:31.000000Z +e4493af10e83d3322210921512e404e1 +2012-08-23T07:03:03.735750Z +203 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2421 + +GTLServiceStorage.h +file + + + + +2012-12-09T08:42:31.000000Z +c128e0351372e712d14616a48dda812c +2012-08-23T07:03:03.735750Z +203 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2136 + +GTLStorageBuckets.h +file + + + + +2012-12-09T08:42:31.000000Z +feec10af779566bbd17c8b6abae55e39 +2012-08-23T07:03:03.735750Z +203 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1930 + +GTLQueryStorage.h +file + + + + +2012-12-09T08:42:31.000000Z +a5241d35231f84f73fc4e7ab13c350a7 +2012-08-23T07:03:03.735750Z +203 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +17590 + +GTLServiceStorage.m +file + + + + +2012-12-09T08:42:31.000000Z +d0670e7c116a745aef4ba90c2ac4d251 +2012-08-23T07:03:03.735750Z +203 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2435 + +GTLStorageBucketAccessControl.m +file + + + + +2012-12-09T08:42:31.000000Z +d955d2283c555da97c5e412cbbea1a0b +2012-08-23T07:03:03.735750Z +203 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1679 + +GTLStorageBuckets.m +file + + + + +2012-12-09T08:42:31.000000Z +b9465468a63851bc726bcd85bb419398 +2012-08-23T07:03:03.735750Z +203 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1598 + +GTLStorageObject.h +file + + + + +2012-12-09T08:42:31.000000Z +698f6eeecfb69a1193c61a05d143ee1d +2012-08-23T07:03:03.735750Z +203 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4924 + +GTLQueryStorage.m +file + + + + +2012-12-09T08:42:31.000000Z +d96bdba2461d144b2dfb14f94514564b +2012-08-23T07:03:03.735750Z +203 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +13639 + +GTLStorageObject.m +file + + + + +2012-12-09T08:42:31.000000Z +1d7fdb364383b31a2e8421c1f7c81e75 +2012-08-23T07:03:03.735750Z +203 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2994 + +GTLStorageConstants.h +file + + + + +2012-12-09T08:42:31.000000Z +63a9632968db113c87343f009df518d1 +2012-08-23T07:03:03.735750Z +203 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1839 + +GTLStorageObjectAccessControls.h +file + + + + +2012-12-09T08:42:31.000000Z +e1c74c4df5e32d5196c2e05abbff2ba9 +2012-08-23T07:03:03.735750Z +203 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1856 + +GTLStorageBucket.h +file + + + + +2012-12-09T08:42:31.000000Z +46ebb57159dac93fe881fbe7b4016e1b +2012-08-23T07:03:03.735750Z +203 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3563 + +GTLStorage.h +file + + + + +2012-12-09T08:42:31.000000Z +cfc58570e974a90f0d78813acd519c16 +2012-08-23T07:03:03.735750Z +203 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1371 + +GTLStorageConstants.m +file + + + + +2012-12-09T08:42:31.000000Z +ac05794b82d53aab1a36c7df3dc8d362 +2012-08-23T07:03:03.735750Z +203 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1541 + +GTLStorageObjectAccessControls.m +file + + + + +2012-12-09T08:42:31.000000Z +7a0adfb9bf23a88e350c9ea50d296171 +2012-08-23T07:03:03.735750Z +203 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1687 + +GTLStorageBucket.m +file + + + + +2012-12-09T08:42:31.000000Z +ea970ac9fd835275d189cdb11ef050a0 +2012-08-23T07:03:03.735750Z +203 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2511 + +GTLStorageBucketAccessControls.h +file + + + + +2012-12-09T08:42:31.000000Z +79d98c2312a9cdf482c8d5b1552bdf3f +2012-08-23T07:03:03.735750Z +203 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1856 + +GTLStorage_Sources.m +file + + + + +2012-12-09T08:42:31.000000Z +0f8bde931d7b8e9218ef3ad414eff797 +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1490 + +GTLStorageBucketAccessControls.m +file + + + + +2012-12-09T08:42:31.000000Z +c14df023d58464a519bb7f641db6323e +2012-08-23T07:03:03.735750Z +203 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1687 + +GTLStorageObjects.h +file + + + + +2012-12-09T08:42:31.000000Z +8c87d390d67ffa4d3d537f21f301626a +2012-08-23T07:03:03.735750Z +203 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2092 + +GTLStorageObjectAccessControl.h +file + + + + +2012-12-09T08:42:31.000000Z +f75a40a09d27a747c026df9dabe39115 +2012-08-23T07:03:03.735750Z +203 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2476 + diff --git a/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLQueryStorage.h.svn-base b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLQueryStorage.h.svn-base new file mode 100644 index 0000000..8d99104 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLQueryStorage.h.svn-base @@ -0,0 +1,427 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryStorage.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLQueryStorage (24 custom class methods, 11 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLStorageBucket; +@class GTLStorageBucketAccessControl; +@class GTLStorageObject; +@class GTLStorageObjectAccessControl; + +@interface GTLQueryStorage : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *bucket; +@property (copy) NSString *delimiter; +@property (copy) NSString *entity; +@property (assign) NSUInteger maxResults; +@property (copy) NSString *name; +@property (copy) NSString *object; +@property (copy) NSString *pageToken; +@property (copy) NSString *prefix; +@property (assign) unsigned long long projectId; +@property (copy) NSString *projection; + +#pragma mark - +#pragma mark "bucketAccessControls" methods +// These create a GTLQueryStorage object. + +// Method: storage.bucketAccessControls.delete +// Deletes the ACL entry for the specified entity on the specified bucket. +// Required: +// bucket: Name of a bucket. +// entity: The entity holding the permission. Can be user-userId, +// group-groupId, allUsers, or allAuthenticatedUsers. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl ++ (id)queryForBucketAccessControlsDeleteWithBucket:(NSString *)bucket + entity:(NSString *)entity; + +// Method: storage.bucketAccessControls.get +// Returns the ACL entry for the specified entity on the specified bucket. +// Required: +// bucket: Name of a bucket. +// entity: The entity holding the permission. Can be user-userId, +// group-groupId, allUsers, or allAuthenticatedUsers. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// Fetches a GTLStorageBucketAccessControl. ++ (id)queryForBucketAccessControlsGetWithBucket:(NSString *)bucket + entity:(NSString *)entity; + +// Method: storage.bucketAccessControls.insert +// Creates a new ACL entry on the specified bucket. +// Required: +// bucket: Name of a bucket. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// Fetches a GTLStorageBucketAccessControl. ++ (id)queryForBucketAccessControlsInsertWithObject:(GTLStorageBucketAccessControl *)object + bucket:(NSString *)bucket; + +// Method: storage.bucketAccessControls.list +// Retrieves ACL entries on the specified bucket. +// Required: +// bucket: Name of a bucket. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// Fetches a GTLStorageBucketAccessControls. ++ (id)queryForBucketAccessControlsListWithBucket:(NSString *)bucket; + +// Method: storage.bucketAccessControls.patch +// Updates an ACL entry on the specified bucket. This method supports patch +// semantics. +// Required: +// bucket: Name of a bucket. +// entity: The entity holding the permission. Can be user-userId, +// group-groupId, allUsers, or allAuthenticatedUsers. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// Fetches a GTLStorageBucketAccessControl. ++ (id)queryForBucketAccessControlsPatchWithObject:(GTLStorageBucketAccessControl *)object + bucket:(NSString *)bucket + entity:(NSString *)entity; + +// Method: storage.bucketAccessControls.update +// Updates an ACL entry on the specified bucket. +// Required: +// bucket: Name of a bucket. +// entity: The entity holding the permission. Can be user-userId, +// group-groupId, allUsers, or allAuthenticatedUsers. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// Fetches a GTLStorageBucketAccessControl. ++ (id)queryForBucketAccessControlsUpdateWithObject:(GTLStorageBucketAccessControl *)object + bucket:(NSString *)bucket + entity:(NSString *)entity; + +#pragma mark - +#pragma mark "buckets" methods +// These create a GTLQueryStorage object. + +// Method: storage.buckets.delete +// Deletes an empty bucket. +// Required: +// bucket: Name of a bucket. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// kGTLAuthScopeStorageDevstorageReadWrite ++ (id)queryForBucketsDeleteWithBucket:(NSString *)bucket; + +// Method: storage.buckets.get +// Returns metadata for the specified bucket. +// Required: +// bucket: Name of a bucket. +// Optional: +// projection: Set of properties to return. Defaults to no_acl. +// kGTLStorageProjectionFull: Include all properties. +// kGTLStorageProjectionNoAcl: Omit acl and defaultObjectAcl properties. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// kGTLAuthScopeStorageDevstorageReadOnly +// kGTLAuthScopeStorageDevstorageReadWrite +// Fetches a GTLStorageBucket. ++ (id)queryForBucketsGetWithBucket:(NSString *)bucket; + +// Method: storage.buckets.insert +// Creates a new bucket. +// Optional: +// projection: Set of properties to return. Defaults to no_acl, unless the +// bucket resource specifies acl or defaultObjectAcl properties, when it +// defaults to full. +// kGTLStorageProjectionFull: Include all properties. +// kGTLStorageProjectionNoAcl: Omit acl and defaultObjectAcl properties. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// kGTLAuthScopeStorageDevstorageReadWrite +// Fetches a GTLStorageBucket. ++ (id)queryForBucketsInsertWithObject:(GTLStorageBucket *)object; + +// Method: storage.buckets.list +// Retrieves a list of buckets for a given project. +// Required: +// projectId: A valid API project identifier. +// Optional: +// maxResults: Maximum number of buckets to return. +// pageToken: A previously-returned page token representing part of the larger +// set of results to view. +// projection: Set of properties to return. Defaults to no_acl. +// kGTLStorageProjectionFull: Include all properties. +// kGTLStorageProjectionNoAcl: Omit acl and defaultObjectAcl properties. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// kGTLAuthScopeStorageDevstorageReadOnly +// kGTLAuthScopeStorageDevstorageReadWrite +// Fetches a GTLStorageBuckets. ++ (id)queryForBucketsListWithProjectId:(unsigned long long)projectId; + +// Method: storage.buckets.patch +// Updates a bucket. This method supports patch semantics. +// Required: +// bucket: Name of a bucket. +// Optional: +// projection: Set of properties to return. Defaults to full. +// kGTLStorageProjectionFull: Include all properties. +// kGTLStorageProjectionNoAcl: Omit acl and defaultObjectAcl properties. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// kGTLAuthScopeStorageDevstorageReadWrite +// Fetches a GTLStorageBucket. ++ (id)queryForBucketsPatchWithObject:(GTLStorageBucket *)object + bucket:(NSString *)bucket; + +// Method: storage.buckets.update +// Updates a bucket. +// Required: +// bucket: Name of a bucket. +// Optional: +// projection: Set of properties to return. Defaults to full. +// kGTLStorageProjectionFull: Include all properties. +// kGTLStorageProjectionNoAcl: Omit acl and defaultObjectAcl properties. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// kGTLAuthScopeStorageDevstorageReadWrite +// Fetches a GTLStorageBucket. ++ (id)queryForBucketsUpdateWithObject:(GTLStorageBucket *)object + bucket:(NSString *)bucket; + +#pragma mark - +#pragma mark "objectAccessControls" methods +// These create a GTLQueryStorage object. + +// Method: storage.objectAccessControls.delete +// Deletes the ACL entry for the specified entity on the specified object. +// Required: +// bucket: Name of a bucket. +// object: Name of the object. +// entity: The entity holding the permission. Can be user-userId, +// group-groupId, allUsers, or allAuthenticatedUsers. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl ++ (id)queryForObjectAccessControlsDeleteWithBucket:(NSString *)bucket + object:(NSString *)object + entity:(NSString *)entity; + +// Method: storage.objectAccessControls.get +// Returns the ACL entry for the specified entity on the specified object. +// Required: +// bucket: Name of a bucket. +// object: Name of the object. +// entity: The entity holding the permission. Can be user-userId, +// group-groupId, allUsers, or allAuthenticatedUsers. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// Fetches a GTLStorageObjectAccessControl. ++ (id)queryForObjectAccessControlsGetWithBucket:(NSString *)bucket + object:(NSString *)object + entity:(NSString *)entity; + +// Method: storage.objectAccessControls.insert +// Creates a new ACL entry on the specified object. +// Required: +// bucket: Name of a bucket. +// object: Name of the object. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// Fetches a GTLStorageObjectAccessControl. ++ (id)queryForObjectAccessControlsInsertWithObject:(GTLStorageObjectAccessControl *)object + bucket:(NSString *)bucket + object:(NSString *)object; + +// Method: storage.objectAccessControls.list +// Retrieves ACL entries on the specified object. +// Required: +// bucket: Name of a bucket. +// object: Name of the object. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// Fetches a GTLStorageObjectAccessControls. ++ (id)queryForObjectAccessControlsListWithBucket:(NSString *)bucket + object:(NSString *)object; + +// Method: storage.objectAccessControls.patch +// Updates an ACL entry on the specified object. This method supports patch +// semantics. +// Required: +// bucket: Name of a bucket. +// object: Name of the object. +// entity: The entity holding the permission. Can be user-userId, +// group-groupId, allUsers, or allAuthenticatedUsers. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// Fetches a GTLStorageObjectAccessControl. ++ (id)queryForObjectAccessControlsPatchWithObject:(GTLStorageObjectAccessControl *)object + bucket:(NSString *)bucket + object:(NSString *)object + entity:(NSString *)entity; + +// Method: storage.objectAccessControls.update +// Updates an ACL entry on the specified object. +// Required: +// bucket: Name of a bucket. +// object: Name of the object. +// entity: The entity holding the permission. Can be user-userId, +// group-groupId, allUsers, or allAuthenticatedUsers. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// Fetches a GTLStorageObjectAccessControl. ++ (id)queryForObjectAccessControlsUpdateWithObject:(GTLStorageObjectAccessControl *)object + bucket:(NSString *)bucket + object:(NSString *)object + entity:(NSString *)entity; + +#pragma mark - +#pragma mark "objects" methods +// These create a GTLQueryStorage object. + +// Method: storage.objects.delete +// Deletes data blobs and associated metadata. +// Required: +// bucket: Name of the bucket in which the object resides. +// object: Name of the object. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// kGTLAuthScopeStorageDevstorageReadWrite ++ (id)queryForObjectsDeleteWithBucket:(NSString *)bucket + object:(NSString *)object; + +// Method: storage.objects.get +// Retrieves objects or their associated metadata. +// Required: +// bucket: Name of the bucket in which the object resides. +// object: Name of the object. +// Optional: +// projection: Set of properties to return. Defaults to no_acl. +// kGTLStorageProjectionFull: Include all properties. +// kGTLStorageProjectionNoAcl: Omit the acl property. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// kGTLAuthScopeStorageDevstorageReadOnly +// kGTLAuthScopeStorageDevstorageReadWrite +// Fetches a GTLStorageObject. ++ (id)queryForObjectsGetWithBucket:(NSString *)bucket + object:(NSString *)object; + +// Method: storage.objects.insert +// Stores new data blobs and associated metadata. +// Required: +// bucket: Name of the bucket in which to store the new object. Overrides the +// provided object metadata's bucket value, if any. +// Optional: +// name: Name of the object. Required when the object metadata is not +// otherwise provided. Overrides the object metadata's name value, if any. +// projection: Set of properties to return. Defaults to no_acl, unless the +// object resource specifies the acl property, when it defaults to full. +// kGTLStorageProjectionFull: Include all properties. +// kGTLStorageProjectionNoAcl: Omit the acl property. +// Upload Parameters: +// Accepted MIME type(s): */* +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// kGTLAuthScopeStorageDevstorageReadWrite +// Fetches a GTLStorageObject. ++ (id)queryForObjectsInsertWithObject:(GTLStorageObject *)object + bucket:(NSString *)bucket + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil; + +// Method: storage.objects.list +// Retrieves a list of objects matching the criteria. +// Required: +// bucket: Name of the bucket in which to look for objects. +// Optional: +// delimiter: Returns results in a directory-like mode. items will contain +// only objects whose names, aside from the prefix, do not contain +// delimiter. Objects whose names, aside from the prefix, contain delimiter +// will have their name, truncated after the delimiter, returned in +// prefixes. Duplicate prefixes are omitted. +// maxResults: Maximum number of items plus prefixes to return. As duplicate +// prefixes are omitted, fewer total results may be returned than requested. +// pageToken: A previously-returned page token representing part of the larger +// set of results to view. +// prefix: Filter results to objects whose names begin with this prefix. +// projection: Set of properties to return. Defaults to no_acl. +// kGTLStorageProjectionFull: Include all properties. +// kGTLStorageProjectionNoAcl: Omit the acl property. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// kGTLAuthScopeStorageDevstorageReadOnly +// kGTLAuthScopeStorageDevstorageReadWrite +// Fetches a GTLStorageObjects. ++ (id)queryForObjectsListWithBucket:(NSString *)bucket; + +// Method: storage.objects.patch +// Updates a data blob's associated metadata. This method supports patch +// semantics. +// Required: +// bucket: Name of the bucket in which the object resides. +// object: Name of the object. +// Optional: +// projection: Set of properties to return. Defaults to full. +// kGTLStorageProjectionFull: Include all properties. +// kGTLStorageProjectionNoAcl: Omit the acl property. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// kGTLAuthScopeStorageDevstorageReadWrite +// Fetches a GTLStorageObject. ++ (id)queryForObjectsPatchWithObject:(GTLStorageObject *)object + bucket:(NSString *)bucket + object:(NSString *)object; + +// Method: storage.objects.update +// Updates a data blob's associated metadata. +// Required: +// bucket: Name of the bucket in which the object resides. +// object: Name of the object. +// Optional: +// projection: Set of properties to return. Defaults to full. +// kGTLStorageProjectionFull: Include all properties. +// kGTLStorageProjectionNoAcl: Omit the acl property. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// kGTLAuthScopeStorageDevstorageReadWrite +// Fetches a GTLStorageObject. ++ (id)queryForObjectsUpdateWithObject:(GTLStorageObject *)object + bucket:(NSString *)bucket + object:(NSString *)object; + +@end diff --git a/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLQueryStorage.m.svn-base b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLQueryStorage.m.svn-base new file mode 100644 index 0000000..373c8fe --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLQueryStorage.m.svn-base @@ -0,0 +1,366 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryStorage.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLQueryStorage (24 custom class methods, 11 custom properties) + +#import "GTLQueryStorage.h" + +#import "GTLStorageBucket.h" +#import "GTLStorageBucketAccessControl.h" +#import "GTLStorageBucketAccessControls.h" +#import "GTLStorageBuckets.h" +#import "GTLStorageObject.h" +#import "GTLStorageObjectAccessControl.h" +#import "GTLStorageObjectAccessControls.h" +#import "GTLStorageObjects.h" + +@implementation GTLQueryStorage + +@dynamic bucket, delimiter, entity, fields, maxResults, name, object, pageToken, + prefix, projectId, projection; + ++ (NSDictionary *)parameterNameMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"max-results" + forKey:@"maxResults"]; + return map; +} + +#pragma mark - +#pragma mark "bucketAccessControls" methods +// These create a GTLQueryStorage object. + ++ (id)queryForBucketAccessControlsDeleteWithBucket:(NSString *)bucket + entity:(NSString *)entity { + NSString *methodName = @"storage.bucketAccessControls.delete"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bucket = bucket; + query.entity = entity; + return query; +} + ++ (id)queryForBucketAccessControlsGetWithBucket:(NSString *)bucket + entity:(NSString *)entity { + NSString *methodName = @"storage.bucketAccessControls.get"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bucket = bucket; + query.entity = entity; + query.expectedObjectClass = [GTLStorageBucketAccessControl class]; + return query; +} + ++ (id)queryForBucketAccessControlsInsertWithObject:(GTLStorageBucketAccessControl *)object + bucket:(NSString *)bucket { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"storage.bucketAccessControls.insert"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.bucket = bucket; + query.expectedObjectClass = [GTLStorageBucketAccessControl class]; + return query; +} + ++ (id)queryForBucketAccessControlsListWithBucket:(NSString *)bucket { + NSString *methodName = @"storage.bucketAccessControls.list"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bucket = bucket; + query.expectedObjectClass = [GTLStorageBucketAccessControls class]; + return query; +} + ++ (id)queryForBucketAccessControlsPatchWithObject:(GTLStorageBucketAccessControl *)object + bucket:(NSString *)bucket + entity:(NSString *)entity { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"storage.bucketAccessControls.patch"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.bucket = bucket; + query.entity = entity; + query.expectedObjectClass = [GTLStorageBucketAccessControl class]; + return query; +} + ++ (id)queryForBucketAccessControlsUpdateWithObject:(GTLStorageBucketAccessControl *)object + bucket:(NSString *)bucket + entity:(NSString *)entity { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"storage.bucketAccessControls.update"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.bucket = bucket; + query.entity = entity; + query.expectedObjectClass = [GTLStorageBucketAccessControl class]; + return query; +} + +#pragma mark - +#pragma mark "buckets" methods +// These create a GTLQueryStorage object. + ++ (id)queryForBucketsDeleteWithBucket:(NSString *)bucket { + NSString *methodName = @"storage.buckets.delete"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bucket = bucket; + return query; +} + ++ (id)queryForBucketsGetWithBucket:(NSString *)bucket { + NSString *methodName = @"storage.buckets.get"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bucket = bucket; + query.expectedObjectClass = [GTLStorageBucket class]; + return query; +} + ++ (id)queryForBucketsInsertWithObject:(GTLStorageBucket *)object { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"storage.buckets.insert"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.expectedObjectClass = [GTLStorageBucket class]; + return query; +} + ++ (id)queryForBucketsListWithProjectId:(unsigned long long)projectId { + NSString *methodName = @"storage.buckets.list"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.projectId = projectId; + query.expectedObjectClass = [GTLStorageBuckets class]; + return query; +} + ++ (id)queryForBucketsPatchWithObject:(GTLStorageBucket *)object + bucket:(NSString *)bucket { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"storage.buckets.patch"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.bucket = bucket; + query.expectedObjectClass = [GTLStorageBucket class]; + return query; +} + ++ (id)queryForBucketsUpdateWithObject:(GTLStorageBucket *)object + bucket:(NSString *)bucket { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"storage.buckets.update"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.bucket = bucket; + query.expectedObjectClass = [GTLStorageBucket class]; + return query; +} + +#pragma mark - +#pragma mark "objectAccessControls" methods +// These create a GTLQueryStorage object. + ++ (id)queryForObjectAccessControlsDeleteWithBucket:(NSString *)bucket + object:(NSString *)object_param + entity:(NSString *)entity { + NSString *methodName = @"storage.objectAccessControls.delete"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bucket = bucket; + query.object = object_param; + query.entity = entity; + return query; +} + ++ (id)queryForObjectAccessControlsGetWithBucket:(NSString *)bucket + object:(NSString *)object_param + entity:(NSString *)entity { + NSString *methodName = @"storage.objectAccessControls.get"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bucket = bucket; + query.object = object_param; + query.entity = entity; + query.expectedObjectClass = [GTLStorageObjectAccessControl class]; + return query; +} + ++ (id)queryForObjectAccessControlsInsertWithObject:(GTLStorageObjectAccessControl *)object + bucket:(NSString *)bucket + object:(NSString *)object_param { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"storage.objectAccessControls.insert"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.bucket = bucket; + query.object = object_param; + query.expectedObjectClass = [GTLStorageObjectAccessControl class]; + return query; +} + ++ (id)queryForObjectAccessControlsListWithBucket:(NSString *)bucket + object:(NSString *)object_param { + NSString *methodName = @"storage.objectAccessControls.list"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bucket = bucket; + query.object = object_param; + query.expectedObjectClass = [GTLStorageObjectAccessControls class]; + return query; +} + ++ (id)queryForObjectAccessControlsPatchWithObject:(GTLStorageObjectAccessControl *)object + bucket:(NSString *)bucket + object:(NSString *)object_param + entity:(NSString *)entity { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"storage.objectAccessControls.patch"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.bucket = bucket; + query.object = object_param; + query.entity = entity; + query.expectedObjectClass = [GTLStorageObjectAccessControl class]; + return query; +} + ++ (id)queryForObjectAccessControlsUpdateWithObject:(GTLStorageObjectAccessControl *)object + bucket:(NSString *)bucket + object:(NSString *)object_param + entity:(NSString *)entity { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"storage.objectAccessControls.update"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.bucket = bucket; + query.object = object_param; + query.entity = entity; + query.expectedObjectClass = [GTLStorageObjectAccessControl class]; + return query; +} + +#pragma mark - +#pragma mark "objects" methods +// These create a GTLQueryStorage object. + ++ (id)queryForObjectsDeleteWithBucket:(NSString *)bucket + object:(NSString *)object_param { + NSString *methodName = @"storage.objects.delete"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bucket = bucket; + query.object = object_param; + return query; +} + ++ (id)queryForObjectsGetWithBucket:(NSString *)bucket + object:(NSString *)object_param { + NSString *methodName = @"storage.objects.get"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bucket = bucket; + query.object = object_param; + query.expectedObjectClass = [GTLStorageObject class]; + return query; +} + ++ (id)queryForObjectsInsertWithObject:(GTLStorageObject *)object + bucket:(NSString *)bucket + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"storage.objects.insert"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.bucket = bucket; + query.uploadParameters = uploadParametersOrNil; + query.expectedObjectClass = [GTLStorageObject class]; + return query; +} + ++ (id)queryForObjectsListWithBucket:(NSString *)bucket { + NSString *methodName = @"storage.objects.list"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bucket = bucket; + query.expectedObjectClass = [GTLStorageObjects class]; + return query; +} + ++ (id)queryForObjectsPatchWithObject:(GTLStorageObject *)object + bucket:(NSString *)bucket + object:(NSString *)object_param { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"storage.objects.patch"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.bucket = bucket; + query.object = object_param; + query.expectedObjectClass = [GTLStorageObject class]; + return query; +} + ++ (id)queryForObjectsUpdateWithObject:(GTLStorageObject *)object + bucket:(NSString *)bucket + object:(NSString *)object_param { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"storage.objects.update"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.bucket = bucket; + query.object = object_param; + query.expectedObjectClass = [GTLStorageObject class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLServiceStorage.h.svn-base b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLServiceStorage.h.svn-base new file mode 100644 index 0000000..75ce204 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLServiceStorage.h.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceStorage.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLServiceStorage (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceStorage : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryStorage.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLServiceStorage.m.svn-base b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLServiceStorage.m.svn-base new file mode 100644 index 0000000..7c51c7b --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLServiceStorage.m.svn-base @@ -0,0 +1,69 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceStorage.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLServiceStorage (0 custom class methods, 0 custom properties) + +#import "GTLStorage.h" + +@implementation GTLServiceStorage + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryStorage class], + [GTLStorageBucket class], + [GTLStorageBucketAccessControl class], + [GTLStorageBucketAccessControls class], + [GTLStorageBuckets class], + [GTLStorageObject class], + [GTLStorageObjectAccessControl class], + [GTLStorageObjectAccessControls class], + [GTLStorageObjects class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v1beta1"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + self.rpcUploadURL = [NSURL URLWithString:@"https://www.googleapis.com/upload/rpc?uploadType=resumable&prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorage.h.svn-base b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorage.h.svn-base new file mode 100644 index 0000000..d23afe5 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorage.h.svn-base @@ -0,0 +1,41 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorage.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ + +#import "GTLStorageConstants.h" + +#import "GTLStorageBucket.h" +#import "GTLStorageBucketAccessControl.h" +#import "GTLStorageBucketAccessControls.h" +#import "GTLStorageBuckets.h" +#import "GTLStorageObject.h" +#import "GTLStorageObjectAccessControl.h" +#import "GTLStorageObjectAccessControls.h" +#import "GTLStorageObjects.h" + +#import "GTLQueryStorage.h" +#import "GTLServiceStorage.h" diff --git a/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageBucket.h.svn-base b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageBucket.h.svn-base new file mode 100644 index 0000000..e0874a6 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageBucket.h.svn-base @@ -0,0 +1,118 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageBucket.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageBucket (0 custom class methods, 10 custom properties) +// GTLStorageBucketOwner (0 custom class methods, 2 custom properties) +// GTLStorageBucketWebsite (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLStorageBucketAccessControl; +@class GTLStorageBucketOwner; +@class GTLStorageBucketWebsite; +@class GTLStorageObjectAccessControl; + +// ---------------------------------------------------------------------------- +// +// GTLStorageBucket +// + +// A bucket. + +@interface GTLStorageBucket : GTLObject + +// Access controls on the bucket. +@property (retain) NSArray *acl; // of GTLStorageBucketAccessControl + +// Default access controls to apply to new objects when no ACL is provided. +@property (retain) NSArray *defaultObjectAcl; // of GTLStorageObjectAccessControl + +// The name of the bucket. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The kind of item this is. For buckets, this is always storage#bucket. +@property (copy) NSString *kind; + +// The location of the bucket. Object data for objects in the bucket resides in +// physical storage in this location. Can be US or EU. Defaults to US. +@property (copy) NSString *location; + +// The owner of the bucket. This will always be the project team's owner group. +@property (retain) GTLStorageBucketOwner *owner; + +// The project the bucket belongs to. +@property (retain) NSNumber *projectId; // unsignedLongLongValue + +// The URI of this bucket. +@property (copy) NSString *selfLink; + +// Creation time of the bucket in RFC 3339 format. +@property (retain) GTLDateTime *timeCreated; + +// The bucket's website configuration. +@property (retain) GTLStorageBucketWebsite *website; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLStorageBucketOwner +// + +@interface GTLStorageBucketOwner : GTLObject + +// The entity, in the form group-groupId. +@property (copy) NSString *entity; + +// The ID for the entity. +@property (copy) NSString *entityId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLStorageBucketWebsite +// + +@interface GTLStorageBucketWebsite : GTLObject + +// Behaves as the bucket's directory index where missing objects are treated as +// potential directories. +@property (copy) NSString *mainPageSuffix; + +// The custom object to return when a requested resource is not found. +@property (copy) NSString *notFoundPage; + +@end diff --git a/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageBucket.m.svn-base b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageBucket.m.svn-base new file mode 100644 index 0000000..eec2455 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageBucket.m.svn-base @@ -0,0 +1,87 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageBucket.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageBucket (0 custom class methods, 10 custom properties) +// GTLStorageBucketOwner (0 custom class methods, 2 custom properties) +// GTLStorageBucketWebsite (0 custom class methods, 2 custom properties) + +#import "GTLStorageBucket.h" + +#import "GTLStorageBucketAccessControl.h" +#import "GTLStorageObjectAccessControl.h" + +// ---------------------------------------------------------------------------- +// +// GTLStorageBucket +// + +@implementation GTLStorageBucket +@dynamic acl, defaultObjectAcl, identifier, kind, location, owner, projectId, + selfLink, timeCreated, website; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLStorageBucketAccessControl class], @"acl", + [GTLStorageObjectAccessControl class], @"defaultObjectAcl", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"storage#bucket"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLStorageBucketOwner +// + +@implementation GTLStorageBucketOwner +@dynamic entity, entityId; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLStorageBucketWebsite +// + +@implementation GTLStorageBucketWebsite +@dynamic mainPageSuffix, notFoundPage; +@end diff --git a/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageBucketAccessControl.h.svn-base b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageBucketAccessControl.h.svn-base new file mode 100644 index 0000000..18193a4 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageBucketAccessControl.h.svn-base @@ -0,0 +1,81 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageBucketAccessControl.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageBucketAccessControl (0 custom class methods, 9 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLStorageBucketAccessControl +// + +// An access-control entry. + +@interface GTLStorageBucketAccessControl : GTLObject + +// The name of the bucket. +@property (copy) NSString *bucket; + +// The domain associated with the entity, if any. +@property (copy) NSString *domain; + +// The email address associated with the entity, if any. +@property (copy) NSString *email; + +// The entity holding the permission, in one of the following forms: +// - user-userId +// - user-email +// - group-groupId +// - group-email +// - allUsers +// - allAuthenticatedUsers +@property (copy) NSString *entity; + +// The ID for the entity, if any. +@property (copy) NSString *entityId; + +// The ID of the access-control entry. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The kind of item this is. For bucket access control entries, this is always +// storage#bucketAccessControl. +@property (copy) NSString *kind; + +// The access permission for the entity. Can be READER, WRITER, or OWNER. +@property (copy) NSString *role; + +// The link to this access-control entry. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageBucketAccessControl.m.svn-base b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageBucketAccessControl.m.svn-base new file mode 100644 index 0000000..d655275 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageBucketAccessControl.m.svn-base @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageBucketAccessControl.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageBucketAccessControl (0 custom class methods, 9 custom properties) + +#import "GTLStorageBucketAccessControl.h" + +// ---------------------------------------------------------------------------- +// +// GTLStorageBucketAccessControl +// + +@implementation GTLStorageBucketAccessControl +@dynamic bucket, domain, email, entity, entityId, identifier, kind, role, + selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"storage#bucketAccessControl"]; +} + +@end diff --git a/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageBucketAccessControls.h.svn-base b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageBucketAccessControls.h.svn-base new file mode 100644 index 0000000..bc48d4a --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageBucketAccessControls.h.svn-base @@ -0,0 +1,58 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageBucketAccessControls.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageBucketAccessControls (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLStorageBucketAccessControl; + +// ---------------------------------------------------------------------------- +// +// GTLStorageBucketAccessControls +// + +// An access-control list. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLStorageBucketAccessControls : GTLCollectionObject + +// The list of items. +@property (retain) NSArray *items; // of GTLStorageBucketAccessControl + +// The kind of item this is. For lists of bucket access control entries, this is +// always storage#bucketAccessControls. +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageBucketAccessControls.m.svn-base b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageBucketAccessControls.m.svn-base new file mode 100644 index 0000000..3d87a5b --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageBucketAccessControls.m.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageBucketAccessControls.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageBucketAccessControls (0 custom class methods, 2 custom properties) + +#import "GTLStorageBucketAccessControls.h" + +#import "GTLStorageBucketAccessControl.h" + +// ---------------------------------------------------------------------------- +// +// GTLStorageBucketAccessControls +// + +@implementation GTLStorageBucketAccessControls +@dynamic items, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLStorageBucketAccessControl class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"storage#bucketAccessControls"]; +} + +@end diff --git a/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageBuckets.h.svn-base b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageBuckets.h.svn-base new file mode 100644 index 0000000..1501b2e --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageBuckets.h.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageBuckets.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageBuckets (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLStorageBucket; + +// ---------------------------------------------------------------------------- +// +// GTLStorageBuckets +// + +// A list of buckets. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLStorageBuckets : GTLCollectionObject + +// The list of items. +@property (retain) NSArray *items; // of GTLStorageBucket + +// The kind of item this is. For lists of buckets, this is always +// storage#buckets. +@property (copy) NSString *kind; + +// The continuation token, used to page through large result sets. Provide this +// value in a subsequent request to return the next page of results. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageBuckets.m.svn-base b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageBuckets.m.svn-base new file mode 100644 index 0000000..2680f42 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageBuckets.m.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageBuckets.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageBuckets (0 custom class methods, 3 custom properties) + +#import "GTLStorageBuckets.h" + +#import "GTLStorageBucket.h" + +// ---------------------------------------------------------------------------- +// +// GTLStorageBuckets +// + +@implementation GTLStorageBuckets +@dynamic items, kind, nextPageToken; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLStorageBucket class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"storage#buckets"]; +} + +@end diff --git a/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageConstants.h.svn-base b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageConstants.h.svn-base new file mode 100644 index 0000000..78eae87 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageConstants.h.svn-base @@ -0,0 +1,47 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// Manage your data and permissions in Google Cloud Storage +GTL_EXTERN NSString * const kGTLAuthScopeStorageDevstorageFullControl; // "https://www.googleapis.com/auth/devstorage.full_control" +// View your data in Google Cloud Storage +GTL_EXTERN NSString * const kGTLAuthScopeStorageDevstorageReadOnly; // "https://www.googleapis.com/auth/devstorage.read_only" +// Manage your data in Google Cloud Storage +GTL_EXTERN NSString * const kGTLAuthScopeStorageDevstorageReadWrite; // "https://www.googleapis.com/auth/devstorage.read_write" + +// Projection +GTL_EXTERN NSString * const kGTLStorageProjectionFull; // "full" +GTL_EXTERN NSString * const kGTLStorageProjectionNoAcl; // "no_acl" diff --git a/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageConstants.m.svn-base b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageConstants.m.svn-base new file mode 100644 index 0000000..44082e3 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageConstants.m.svn-base @@ -0,0 +1,38 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ + +#import "GTLStorageConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeStorageDevstorageFullControl = @"https://www.googleapis.com/auth/devstorage.full_control"; +NSString * const kGTLAuthScopeStorageDevstorageReadOnly = @"https://www.googleapis.com/auth/devstorage.read_only"; +NSString * const kGTLAuthScopeStorageDevstorageReadWrite = @"https://www.googleapis.com/auth/devstorage.read_write"; + +// Projection +NSString * const kGTLStorageProjectionFull = @"full"; +NSString * const kGTLStorageProjectionNoAcl = @"no_acl"; diff --git a/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageObject.h.svn-base b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageObject.h.svn-base new file mode 100644 index 0000000..21e7901 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageObject.h.svn-base @@ -0,0 +1,160 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageObject.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageObject (0 custom class methods, 13 custom properties) +// GTLStorageObjectMedia (0 custom class methods, 7 custom properties) +// GTLStorageObjectMetadata (0 custom class methods, 0 custom properties) +// GTLStorageObjectOwner (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLStorageObjectAccessControl; +@class GTLStorageObjectMedia; +@class GTLStorageObjectMetadata; +@class GTLStorageObjectOwner; + +// ---------------------------------------------------------------------------- +// +// GTLStorageObject +// + +// An object. + +@interface GTLStorageObject : GTLObject + +// Access controls on the object. +@property (retain) NSArray *acl; // of GTLStorageObjectAccessControl + +// The bucket containing this object. +@property (copy) NSString *bucket; + +// Cache-Control directive for the object data. +@property (copy) NSString *cacheControl; + +// Content-Disposition of the object data. +@property (copy) NSString *contentDisposition; + +// Content-Encoding of the object data. +@property (copy) NSString *contentEncoding; + +// Content-Language of the object data. +@property (copy) NSString *contentLanguage; + +// The ID of the object. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The kind of item this is. For objects, this is always storage#object. +@property (copy) NSString *kind; + +// Object media data. Provided on your behalf when uploading raw media or +// multipart/related with an auxiliary media part. +@property (retain) GTLStorageObjectMedia *media; + +// User-provided metadata, in key/value pairs. +@property (retain) GTLStorageObjectMetadata *metadata; + +// The name of this object. Required if not specified by URL parameter. +@property (copy) NSString *name; + +// The owner of the object. This will always be the uploader of the object. +@property (retain) GTLStorageObjectOwner *owner; + +// The link to this object. +@property (copy) NSString *selfLink; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLStorageObjectMedia +// + +@interface GTLStorageObjectMedia : GTLObject + +// Hash algorithm used. Currently only MD5 is supported. Required if a hash is +// provided. +@property (copy) NSString *algorithm; + +// Content-Type of the object data. +@property (copy) NSString *contentType; + +// URL-safe Base64-encoded data. This property can be used to insert objects +// under 64KB in size, and will only be returned in response to the get method +// for objects so created. When this resource is returned in response to the +// list method, this property is omitted. +@property (copy) NSString *data; // GTLBase64 can encode/decode (probably web-safe format) + +// Hash of the data. Required if a hash algorithm is provided. +// Remapped to 'hashProperty' to avoid NSObject's 'hash'. +@property (copy) NSString *hashProperty; + +// Content-Length of the data in bytes. +@property (retain) NSNumber *length; // longLongValue + +// Media download link. +@property (copy) NSString *link; + +// Creation time of the data in RFC 3339 format. +@property (retain) GTLDateTime *timeCreated; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLStorageObjectMetadata +// + +@interface GTLStorageObjectMetadata : GTLObject +// This object is documented as having more properties that are NSString. Use +// -additionalJSONKeys and -additionalPropertyForName: to get the list of +// properties and then fetch them; or -additionalProperties to fetch them all at +// once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLStorageObjectOwner +// + +@interface GTLStorageObjectOwner : GTLObject + +// The entity, in the form user-userId. +@property (copy) NSString *entity; + +// The ID for the entity. +@property (copy) NSString *entityId; + +@end diff --git a/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageObject.m.svn-base b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageObject.m.svn-base new file mode 100644 index 0000000..a73c2b3 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageObject.m.svn-base @@ -0,0 +1,108 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageObject.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageObject (0 custom class methods, 13 custom properties) +// GTLStorageObjectMedia (0 custom class methods, 7 custom properties) +// GTLStorageObjectMetadata (0 custom class methods, 0 custom properties) +// GTLStorageObjectOwner (0 custom class methods, 2 custom properties) + +#import "GTLStorageObject.h" + +#import "GTLStorageObjectAccessControl.h" + +// ---------------------------------------------------------------------------- +// +// GTLStorageObject +// + +@implementation GTLStorageObject +@dynamic acl, bucket, cacheControl, contentDisposition, contentEncoding, + contentLanguage, identifier, kind, media, metadata, name, owner, + selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLStorageObjectAccessControl class] + forKey:@"acl"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"storage#object"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLStorageObjectMedia +// + +@implementation GTLStorageObjectMedia +@dynamic algorithm, contentType, data, hashProperty, length, link, timeCreated; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"hash" + forKey:@"hashProperty"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLStorageObjectMetadata +// + +@implementation GTLStorageObjectMetadata + ++ (Class)classForAdditionalProperties { + return [NSString class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLStorageObjectOwner +// + +@implementation GTLStorageObjectOwner +@dynamic entity, entityId; +@end diff --git a/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageObjectAccessControl.h.svn-base b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageObjectAccessControl.h.svn-base new file mode 100644 index 0000000..00f41c3 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageObjectAccessControl.h.svn-base @@ -0,0 +1,84 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageObjectAccessControl.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageObjectAccessControl (0 custom class methods, 10 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLStorageObjectAccessControl +// + +// An access-control entry. + +@interface GTLStorageObjectAccessControl : GTLObject + +// The name of the bucket. +@property (copy) NSString *bucket; + +// The domain associated with the entity, if any. +@property (copy) NSString *domain; + +// The email address associated with the entity, if any. +@property (copy) NSString *email; + +// The entity holding the permission, in one of the following forms: +// - user-userId +// - user-email +// - group-groupId +// - group-email +// - allUsers +// - allAuthenticatedUsers +@property (copy) NSString *entity; + +// The ID for the entity, if any. +@property (copy) NSString *entityId; + +// The ID of the access-control entry. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The kind of item this is. For object access control entries, this is always +// storage#objectAccessControl. +@property (copy) NSString *kind; + +// The name of the object. +@property (copy) NSString *object; + +// The access permission for the entity. Can be READER or OWNER. +@property (copy) NSString *role; + +// The link to this access-control entry. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageObjectAccessControl.m.svn-base b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageObjectAccessControl.m.svn-base new file mode 100644 index 0000000..9cdb4be --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageObjectAccessControl.m.svn-base @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageObjectAccessControl.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageObjectAccessControl (0 custom class methods, 10 custom properties) + +#import "GTLStorageObjectAccessControl.h" + +// ---------------------------------------------------------------------------- +// +// GTLStorageObjectAccessControl +// + +@implementation GTLStorageObjectAccessControl +@dynamic bucket, domain, email, entity, entityId, identifier, kind, object, + role, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"storage#objectAccessControl"]; +} + +@end diff --git a/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageObjectAccessControls.h.svn-base b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageObjectAccessControls.h.svn-base new file mode 100644 index 0000000..d7badb1 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageObjectAccessControls.h.svn-base @@ -0,0 +1,58 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageObjectAccessControls.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageObjectAccessControls (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLStorageObjectAccessControl; + +// ---------------------------------------------------------------------------- +// +// GTLStorageObjectAccessControls +// + +// An access-control list. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLStorageObjectAccessControls : GTLCollectionObject + +// The list of items. +@property (retain) NSArray *items; // of GTLStorageObjectAccessControl + +// The kind of item this is. For lists of object access control entries, this is +// always storage#objectAccessControls. +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageObjectAccessControls.m.svn-base b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageObjectAccessControls.m.svn-base new file mode 100644 index 0000000..332f059 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageObjectAccessControls.m.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageObjectAccessControls.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageObjectAccessControls (0 custom class methods, 2 custom properties) + +#import "GTLStorageObjectAccessControls.h" + +#import "GTLStorageObjectAccessControl.h" + +// ---------------------------------------------------------------------------- +// +// GTLStorageObjectAccessControls +// + +@implementation GTLStorageObjectAccessControls +@dynamic items, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLStorageObjectAccessControl class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"storage#objectAccessControls"]; +} + +@end diff --git a/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageObjects.h.svn-base b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageObjects.h.svn-base new file mode 100644 index 0000000..3fe0f5e --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageObjects.h.svn-base @@ -0,0 +1,66 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageObjects.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageObjects (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLStorageObject; + +// ---------------------------------------------------------------------------- +// +// GTLStorageObjects +// + +// A list of objects. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLStorageObjects : GTLCollectionObject + +// The list of items. +@property (retain) NSArray *items; // of GTLStorageObject + +// The kind of item this is. For lists of objects, this is always +// storage#objects. +@property (copy) NSString *kind; + +// The continuation token, used to page through large result sets. Provide this +// value in a subsequent request to return the next page of results. +@property (copy) NSString *nextPageToken; + +// The list of prefixes of objects matching-but-not-listed up to and including +// the requested delimiter. +@property (retain) NSArray *prefixes; // of NSString + +@end diff --git a/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageObjects.m.svn-base b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageObjects.m.svn-base new file mode 100644 index 0000000..5092976 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorageObjects.m.svn-base @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageObjects.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageObjects (0 custom class methods, 4 custom properties) + +#import "GTLStorageObjects.h" + +#import "GTLStorageObject.h" + +// ---------------------------------------------------------------------------- +// +// GTLStorageObjects +// + +@implementation GTLStorageObjects +@dynamic items, kind, nextPageToken, prefixes; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLStorageObject class], @"items", + [NSString class], @"prefixes", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"storage#objects"]; +} + +@end diff --git a/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorage_Sources.m.svn-base b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorage_Sources.m.svn-base new file mode 100644 index 0000000..d5ad592 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/.svn/text-base/GTLStorage_Sources.m.svn-base @@ -0,0 +1,44 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorage_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ + +#import "GTLStorageConstants.m" + +#import "GTLStorageBucket.m" +#import "GTLStorageBucketAccessControl.m" +#import "GTLStorageBucketAccessControls.m" +#import "GTLStorageBuckets.m" +#import "GTLStorageObject.m" +#import "GTLStorageObjectAccessControl.m" +#import "GTLStorageObjectAccessControls.m" +#import "GTLStorageObjects.m" + +#import "GTLQueryStorage.m" +#import "GTLServiceStorage.m" diff --git a/GTL/Source/Services/Storage/Generated/GTLQueryStorage.h b/GTL/Source/Services/Storage/Generated/GTLQueryStorage.h new file mode 100644 index 0000000..8d99104 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/GTLQueryStorage.h @@ -0,0 +1,427 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryStorage.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLQueryStorage (24 custom class methods, 11 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLStorageBucket; +@class GTLStorageBucketAccessControl; +@class GTLStorageObject; +@class GTLStorageObjectAccessControl; + +@interface GTLQueryStorage : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *bucket; +@property (copy) NSString *delimiter; +@property (copy) NSString *entity; +@property (assign) NSUInteger maxResults; +@property (copy) NSString *name; +@property (copy) NSString *object; +@property (copy) NSString *pageToken; +@property (copy) NSString *prefix; +@property (assign) unsigned long long projectId; +@property (copy) NSString *projection; + +#pragma mark - +#pragma mark "bucketAccessControls" methods +// These create a GTLQueryStorage object. + +// Method: storage.bucketAccessControls.delete +// Deletes the ACL entry for the specified entity on the specified bucket. +// Required: +// bucket: Name of a bucket. +// entity: The entity holding the permission. Can be user-userId, +// group-groupId, allUsers, or allAuthenticatedUsers. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl ++ (id)queryForBucketAccessControlsDeleteWithBucket:(NSString *)bucket + entity:(NSString *)entity; + +// Method: storage.bucketAccessControls.get +// Returns the ACL entry for the specified entity on the specified bucket. +// Required: +// bucket: Name of a bucket. +// entity: The entity holding the permission. Can be user-userId, +// group-groupId, allUsers, or allAuthenticatedUsers. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// Fetches a GTLStorageBucketAccessControl. ++ (id)queryForBucketAccessControlsGetWithBucket:(NSString *)bucket + entity:(NSString *)entity; + +// Method: storage.bucketAccessControls.insert +// Creates a new ACL entry on the specified bucket. +// Required: +// bucket: Name of a bucket. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// Fetches a GTLStorageBucketAccessControl. ++ (id)queryForBucketAccessControlsInsertWithObject:(GTLStorageBucketAccessControl *)object + bucket:(NSString *)bucket; + +// Method: storage.bucketAccessControls.list +// Retrieves ACL entries on the specified bucket. +// Required: +// bucket: Name of a bucket. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// Fetches a GTLStorageBucketAccessControls. ++ (id)queryForBucketAccessControlsListWithBucket:(NSString *)bucket; + +// Method: storage.bucketAccessControls.patch +// Updates an ACL entry on the specified bucket. This method supports patch +// semantics. +// Required: +// bucket: Name of a bucket. +// entity: The entity holding the permission. Can be user-userId, +// group-groupId, allUsers, or allAuthenticatedUsers. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// Fetches a GTLStorageBucketAccessControl. ++ (id)queryForBucketAccessControlsPatchWithObject:(GTLStorageBucketAccessControl *)object + bucket:(NSString *)bucket + entity:(NSString *)entity; + +// Method: storage.bucketAccessControls.update +// Updates an ACL entry on the specified bucket. +// Required: +// bucket: Name of a bucket. +// entity: The entity holding the permission. Can be user-userId, +// group-groupId, allUsers, or allAuthenticatedUsers. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// Fetches a GTLStorageBucketAccessControl. ++ (id)queryForBucketAccessControlsUpdateWithObject:(GTLStorageBucketAccessControl *)object + bucket:(NSString *)bucket + entity:(NSString *)entity; + +#pragma mark - +#pragma mark "buckets" methods +// These create a GTLQueryStorage object. + +// Method: storage.buckets.delete +// Deletes an empty bucket. +// Required: +// bucket: Name of a bucket. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// kGTLAuthScopeStorageDevstorageReadWrite ++ (id)queryForBucketsDeleteWithBucket:(NSString *)bucket; + +// Method: storage.buckets.get +// Returns metadata for the specified bucket. +// Required: +// bucket: Name of a bucket. +// Optional: +// projection: Set of properties to return. Defaults to no_acl. +// kGTLStorageProjectionFull: Include all properties. +// kGTLStorageProjectionNoAcl: Omit acl and defaultObjectAcl properties. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// kGTLAuthScopeStorageDevstorageReadOnly +// kGTLAuthScopeStorageDevstorageReadWrite +// Fetches a GTLStorageBucket. ++ (id)queryForBucketsGetWithBucket:(NSString *)bucket; + +// Method: storage.buckets.insert +// Creates a new bucket. +// Optional: +// projection: Set of properties to return. Defaults to no_acl, unless the +// bucket resource specifies acl or defaultObjectAcl properties, when it +// defaults to full. +// kGTLStorageProjectionFull: Include all properties. +// kGTLStorageProjectionNoAcl: Omit acl and defaultObjectAcl properties. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// kGTLAuthScopeStorageDevstorageReadWrite +// Fetches a GTLStorageBucket. ++ (id)queryForBucketsInsertWithObject:(GTLStorageBucket *)object; + +// Method: storage.buckets.list +// Retrieves a list of buckets for a given project. +// Required: +// projectId: A valid API project identifier. +// Optional: +// maxResults: Maximum number of buckets to return. +// pageToken: A previously-returned page token representing part of the larger +// set of results to view. +// projection: Set of properties to return. Defaults to no_acl. +// kGTLStorageProjectionFull: Include all properties. +// kGTLStorageProjectionNoAcl: Omit acl and defaultObjectAcl properties. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// kGTLAuthScopeStorageDevstorageReadOnly +// kGTLAuthScopeStorageDevstorageReadWrite +// Fetches a GTLStorageBuckets. ++ (id)queryForBucketsListWithProjectId:(unsigned long long)projectId; + +// Method: storage.buckets.patch +// Updates a bucket. This method supports patch semantics. +// Required: +// bucket: Name of a bucket. +// Optional: +// projection: Set of properties to return. Defaults to full. +// kGTLStorageProjectionFull: Include all properties. +// kGTLStorageProjectionNoAcl: Omit acl and defaultObjectAcl properties. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// kGTLAuthScopeStorageDevstorageReadWrite +// Fetches a GTLStorageBucket. ++ (id)queryForBucketsPatchWithObject:(GTLStorageBucket *)object + bucket:(NSString *)bucket; + +// Method: storage.buckets.update +// Updates a bucket. +// Required: +// bucket: Name of a bucket. +// Optional: +// projection: Set of properties to return. Defaults to full. +// kGTLStorageProjectionFull: Include all properties. +// kGTLStorageProjectionNoAcl: Omit acl and defaultObjectAcl properties. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// kGTLAuthScopeStorageDevstorageReadWrite +// Fetches a GTLStorageBucket. ++ (id)queryForBucketsUpdateWithObject:(GTLStorageBucket *)object + bucket:(NSString *)bucket; + +#pragma mark - +#pragma mark "objectAccessControls" methods +// These create a GTLQueryStorage object. + +// Method: storage.objectAccessControls.delete +// Deletes the ACL entry for the specified entity on the specified object. +// Required: +// bucket: Name of a bucket. +// object: Name of the object. +// entity: The entity holding the permission. Can be user-userId, +// group-groupId, allUsers, or allAuthenticatedUsers. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl ++ (id)queryForObjectAccessControlsDeleteWithBucket:(NSString *)bucket + object:(NSString *)object + entity:(NSString *)entity; + +// Method: storage.objectAccessControls.get +// Returns the ACL entry for the specified entity on the specified object. +// Required: +// bucket: Name of a bucket. +// object: Name of the object. +// entity: The entity holding the permission. Can be user-userId, +// group-groupId, allUsers, or allAuthenticatedUsers. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// Fetches a GTLStorageObjectAccessControl. ++ (id)queryForObjectAccessControlsGetWithBucket:(NSString *)bucket + object:(NSString *)object + entity:(NSString *)entity; + +// Method: storage.objectAccessControls.insert +// Creates a new ACL entry on the specified object. +// Required: +// bucket: Name of a bucket. +// object: Name of the object. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// Fetches a GTLStorageObjectAccessControl. ++ (id)queryForObjectAccessControlsInsertWithObject:(GTLStorageObjectAccessControl *)object + bucket:(NSString *)bucket + object:(NSString *)object; + +// Method: storage.objectAccessControls.list +// Retrieves ACL entries on the specified object. +// Required: +// bucket: Name of a bucket. +// object: Name of the object. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// Fetches a GTLStorageObjectAccessControls. ++ (id)queryForObjectAccessControlsListWithBucket:(NSString *)bucket + object:(NSString *)object; + +// Method: storage.objectAccessControls.patch +// Updates an ACL entry on the specified object. This method supports patch +// semantics. +// Required: +// bucket: Name of a bucket. +// object: Name of the object. +// entity: The entity holding the permission. Can be user-userId, +// group-groupId, allUsers, or allAuthenticatedUsers. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// Fetches a GTLStorageObjectAccessControl. ++ (id)queryForObjectAccessControlsPatchWithObject:(GTLStorageObjectAccessControl *)object + bucket:(NSString *)bucket + object:(NSString *)object + entity:(NSString *)entity; + +// Method: storage.objectAccessControls.update +// Updates an ACL entry on the specified object. +// Required: +// bucket: Name of a bucket. +// object: Name of the object. +// entity: The entity holding the permission. Can be user-userId, +// group-groupId, allUsers, or allAuthenticatedUsers. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// Fetches a GTLStorageObjectAccessControl. ++ (id)queryForObjectAccessControlsUpdateWithObject:(GTLStorageObjectAccessControl *)object + bucket:(NSString *)bucket + object:(NSString *)object + entity:(NSString *)entity; + +#pragma mark - +#pragma mark "objects" methods +// These create a GTLQueryStorage object. + +// Method: storage.objects.delete +// Deletes data blobs and associated metadata. +// Required: +// bucket: Name of the bucket in which the object resides. +// object: Name of the object. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// kGTLAuthScopeStorageDevstorageReadWrite ++ (id)queryForObjectsDeleteWithBucket:(NSString *)bucket + object:(NSString *)object; + +// Method: storage.objects.get +// Retrieves objects or their associated metadata. +// Required: +// bucket: Name of the bucket in which the object resides. +// object: Name of the object. +// Optional: +// projection: Set of properties to return. Defaults to no_acl. +// kGTLStorageProjectionFull: Include all properties. +// kGTLStorageProjectionNoAcl: Omit the acl property. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// kGTLAuthScopeStorageDevstorageReadOnly +// kGTLAuthScopeStorageDevstorageReadWrite +// Fetches a GTLStorageObject. ++ (id)queryForObjectsGetWithBucket:(NSString *)bucket + object:(NSString *)object; + +// Method: storage.objects.insert +// Stores new data blobs and associated metadata. +// Required: +// bucket: Name of the bucket in which to store the new object. Overrides the +// provided object metadata's bucket value, if any. +// Optional: +// name: Name of the object. Required when the object metadata is not +// otherwise provided. Overrides the object metadata's name value, if any. +// projection: Set of properties to return. Defaults to no_acl, unless the +// object resource specifies the acl property, when it defaults to full. +// kGTLStorageProjectionFull: Include all properties. +// kGTLStorageProjectionNoAcl: Omit the acl property. +// Upload Parameters: +// Accepted MIME type(s): */* +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// kGTLAuthScopeStorageDevstorageReadWrite +// Fetches a GTLStorageObject. ++ (id)queryForObjectsInsertWithObject:(GTLStorageObject *)object + bucket:(NSString *)bucket + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil; + +// Method: storage.objects.list +// Retrieves a list of objects matching the criteria. +// Required: +// bucket: Name of the bucket in which to look for objects. +// Optional: +// delimiter: Returns results in a directory-like mode. items will contain +// only objects whose names, aside from the prefix, do not contain +// delimiter. Objects whose names, aside from the prefix, contain delimiter +// will have their name, truncated after the delimiter, returned in +// prefixes. Duplicate prefixes are omitted. +// maxResults: Maximum number of items plus prefixes to return. As duplicate +// prefixes are omitted, fewer total results may be returned than requested. +// pageToken: A previously-returned page token representing part of the larger +// set of results to view. +// prefix: Filter results to objects whose names begin with this prefix. +// projection: Set of properties to return. Defaults to no_acl. +// kGTLStorageProjectionFull: Include all properties. +// kGTLStorageProjectionNoAcl: Omit the acl property. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// kGTLAuthScopeStorageDevstorageReadOnly +// kGTLAuthScopeStorageDevstorageReadWrite +// Fetches a GTLStorageObjects. ++ (id)queryForObjectsListWithBucket:(NSString *)bucket; + +// Method: storage.objects.patch +// Updates a data blob's associated metadata. This method supports patch +// semantics. +// Required: +// bucket: Name of the bucket in which the object resides. +// object: Name of the object. +// Optional: +// projection: Set of properties to return. Defaults to full. +// kGTLStorageProjectionFull: Include all properties. +// kGTLStorageProjectionNoAcl: Omit the acl property. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// kGTLAuthScopeStorageDevstorageReadWrite +// Fetches a GTLStorageObject. ++ (id)queryForObjectsPatchWithObject:(GTLStorageObject *)object + bucket:(NSString *)bucket + object:(NSString *)object; + +// Method: storage.objects.update +// Updates a data blob's associated metadata. +// Required: +// bucket: Name of the bucket in which the object resides. +// object: Name of the object. +// Optional: +// projection: Set of properties to return. Defaults to full. +// kGTLStorageProjectionFull: Include all properties. +// kGTLStorageProjectionNoAcl: Omit the acl property. +// Authorization scope(s): +// kGTLAuthScopeStorageDevstorageFullControl +// kGTLAuthScopeStorageDevstorageReadWrite +// Fetches a GTLStorageObject. ++ (id)queryForObjectsUpdateWithObject:(GTLStorageObject *)object + bucket:(NSString *)bucket + object:(NSString *)object; + +@end diff --git a/GTL/Source/Services/Storage/Generated/GTLQueryStorage.m b/GTL/Source/Services/Storage/Generated/GTLQueryStorage.m new file mode 100644 index 0000000..373c8fe --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/GTLQueryStorage.m @@ -0,0 +1,366 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryStorage.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLQueryStorage (24 custom class methods, 11 custom properties) + +#import "GTLQueryStorage.h" + +#import "GTLStorageBucket.h" +#import "GTLStorageBucketAccessControl.h" +#import "GTLStorageBucketAccessControls.h" +#import "GTLStorageBuckets.h" +#import "GTLStorageObject.h" +#import "GTLStorageObjectAccessControl.h" +#import "GTLStorageObjectAccessControls.h" +#import "GTLStorageObjects.h" + +@implementation GTLQueryStorage + +@dynamic bucket, delimiter, entity, fields, maxResults, name, object, pageToken, + prefix, projectId, projection; + ++ (NSDictionary *)parameterNameMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"max-results" + forKey:@"maxResults"]; + return map; +} + +#pragma mark - +#pragma mark "bucketAccessControls" methods +// These create a GTLQueryStorage object. + ++ (id)queryForBucketAccessControlsDeleteWithBucket:(NSString *)bucket + entity:(NSString *)entity { + NSString *methodName = @"storage.bucketAccessControls.delete"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bucket = bucket; + query.entity = entity; + return query; +} + ++ (id)queryForBucketAccessControlsGetWithBucket:(NSString *)bucket + entity:(NSString *)entity { + NSString *methodName = @"storage.bucketAccessControls.get"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bucket = bucket; + query.entity = entity; + query.expectedObjectClass = [GTLStorageBucketAccessControl class]; + return query; +} + ++ (id)queryForBucketAccessControlsInsertWithObject:(GTLStorageBucketAccessControl *)object + bucket:(NSString *)bucket { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"storage.bucketAccessControls.insert"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.bucket = bucket; + query.expectedObjectClass = [GTLStorageBucketAccessControl class]; + return query; +} + ++ (id)queryForBucketAccessControlsListWithBucket:(NSString *)bucket { + NSString *methodName = @"storage.bucketAccessControls.list"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bucket = bucket; + query.expectedObjectClass = [GTLStorageBucketAccessControls class]; + return query; +} + ++ (id)queryForBucketAccessControlsPatchWithObject:(GTLStorageBucketAccessControl *)object + bucket:(NSString *)bucket + entity:(NSString *)entity { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"storage.bucketAccessControls.patch"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.bucket = bucket; + query.entity = entity; + query.expectedObjectClass = [GTLStorageBucketAccessControl class]; + return query; +} + ++ (id)queryForBucketAccessControlsUpdateWithObject:(GTLStorageBucketAccessControl *)object + bucket:(NSString *)bucket + entity:(NSString *)entity { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"storage.bucketAccessControls.update"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.bucket = bucket; + query.entity = entity; + query.expectedObjectClass = [GTLStorageBucketAccessControl class]; + return query; +} + +#pragma mark - +#pragma mark "buckets" methods +// These create a GTLQueryStorage object. + ++ (id)queryForBucketsDeleteWithBucket:(NSString *)bucket { + NSString *methodName = @"storage.buckets.delete"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bucket = bucket; + return query; +} + ++ (id)queryForBucketsGetWithBucket:(NSString *)bucket { + NSString *methodName = @"storage.buckets.get"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bucket = bucket; + query.expectedObjectClass = [GTLStorageBucket class]; + return query; +} + ++ (id)queryForBucketsInsertWithObject:(GTLStorageBucket *)object { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"storage.buckets.insert"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.expectedObjectClass = [GTLStorageBucket class]; + return query; +} + ++ (id)queryForBucketsListWithProjectId:(unsigned long long)projectId { + NSString *methodName = @"storage.buckets.list"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.projectId = projectId; + query.expectedObjectClass = [GTLStorageBuckets class]; + return query; +} + ++ (id)queryForBucketsPatchWithObject:(GTLStorageBucket *)object + bucket:(NSString *)bucket { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"storage.buckets.patch"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.bucket = bucket; + query.expectedObjectClass = [GTLStorageBucket class]; + return query; +} + ++ (id)queryForBucketsUpdateWithObject:(GTLStorageBucket *)object + bucket:(NSString *)bucket { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"storage.buckets.update"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.bucket = bucket; + query.expectedObjectClass = [GTLStorageBucket class]; + return query; +} + +#pragma mark - +#pragma mark "objectAccessControls" methods +// These create a GTLQueryStorage object. + ++ (id)queryForObjectAccessControlsDeleteWithBucket:(NSString *)bucket + object:(NSString *)object_param + entity:(NSString *)entity { + NSString *methodName = @"storage.objectAccessControls.delete"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bucket = bucket; + query.object = object_param; + query.entity = entity; + return query; +} + ++ (id)queryForObjectAccessControlsGetWithBucket:(NSString *)bucket + object:(NSString *)object_param + entity:(NSString *)entity { + NSString *methodName = @"storage.objectAccessControls.get"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bucket = bucket; + query.object = object_param; + query.entity = entity; + query.expectedObjectClass = [GTLStorageObjectAccessControl class]; + return query; +} + ++ (id)queryForObjectAccessControlsInsertWithObject:(GTLStorageObjectAccessControl *)object + bucket:(NSString *)bucket + object:(NSString *)object_param { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"storage.objectAccessControls.insert"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.bucket = bucket; + query.object = object_param; + query.expectedObjectClass = [GTLStorageObjectAccessControl class]; + return query; +} + ++ (id)queryForObjectAccessControlsListWithBucket:(NSString *)bucket + object:(NSString *)object_param { + NSString *methodName = @"storage.objectAccessControls.list"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bucket = bucket; + query.object = object_param; + query.expectedObjectClass = [GTLStorageObjectAccessControls class]; + return query; +} + ++ (id)queryForObjectAccessControlsPatchWithObject:(GTLStorageObjectAccessControl *)object + bucket:(NSString *)bucket + object:(NSString *)object_param + entity:(NSString *)entity { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"storage.objectAccessControls.patch"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.bucket = bucket; + query.object = object_param; + query.entity = entity; + query.expectedObjectClass = [GTLStorageObjectAccessControl class]; + return query; +} + ++ (id)queryForObjectAccessControlsUpdateWithObject:(GTLStorageObjectAccessControl *)object + bucket:(NSString *)bucket + object:(NSString *)object_param + entity:(NSString *)entity { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"storage.objectAccessControls.update"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.bucket = bucket; + query.object = object_param; + query.entity = entity; + query.expectedObjectClass = [GTLStorageObjectAccessControl class]; + return query; +} + +#pragma mark - +#pragma mark "objects" methods +// These create a GTLQueryStorage object. + ++ (id)queryForObjectsDeleteWithBucket:(NSString *)bucket + object:(NSString *)object_param { + NSString *methodName = @"storage.objects.delete"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bucket = bucket; + query.object = object_param; + return query; +} + ++ (id)queryForObjectsGetWithBucket:(NSString *)bucket + object:(NSString *)object_param { + NSString *methodName = @"storage.objects.get"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bucket = bucket; + query.object = object_param; + query.expectedObjectClass = [GTLStorageObject class]; + return query; +} + ++ (id)queryForObjectsInsertWithObject:(GTLStorageObject *)object + bucket:(NSString *)bucket + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"storage.objects.insert"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.bucket = bucket; + query.uploadParameters = uploadParametersOrNil; + query.expectedObjectClass = [GTLStorageObject class]; + return query; +} + ++ (id)queryForObjectsListWithBucket:(NSString *)bucket { + NSString *methodName = @"storage.objects.list"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bucket = bucket; + query.expectedObjectClass = [GTLStorageObjects class]; + return query; +} + ++ (id)queryForObjectsPatchWithObject:(GTLStorageObject *)object + bucket:(NSString *)bucket + object:(NSString *)object_param { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"storage.objects.patch"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.bucket = bucket; + query.object = object_param; + query.expectedObjectClass = [GTLStorageObject class]; + return query; +} + ++ (id)queryForObjectsUpdateWithObject:(GTLStorageObject *)object + bucket:(NSString *)bucket + object:(NSString *)object_param { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"storage.objects.update"; + GTLQueryStorage *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.bucket = bucket; + query.object = object_param; + query.expectedObjectClass = [GTLStorageObject class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Storage/Generated/GTLServiceStorage.h b/GTL/Source/Services/Storage/Generated/GTLServiceStorage.h new file mode 100644 index 0000000..75ce204 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/GTLServiceStorage.h @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceStorage.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLServiceStorage (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceStorage : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryStorage.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Storage/Generated/GTLServiceStorage.m b/GTL/Source/Services/Storage/Generated/GTLServiceStorage.m new file mode 100644 index 0000000..7c51c7b --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/GTLServiceStorage.m @@ -0,0 +1,69 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceStorage.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLServiceStorage (0 custom class methods, 0 custom properties) + +#import "GTLStorage.h" + +@implementation GTLServiceStorage + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryStorage class], + [GTLStorageBucket class], + [GTLStorageBucketAccessControl class], + [GTLStorageBucketAccessControls class], + [GTLStorageBuckets class], + [GTLStorageObject class], + [GTLStorageObjectAccessControl class], + [GTLStorageObjectAccessControls class], + [GTLStorageObjects class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v1beta1"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + self.rpcUploadURL = [NSURL URLWithString:@"https://www.googleapis.com/upload/rpc?uploadType=resumable&prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Storage/Generated/GTLStorage.h b/GTL/Source/Services/Storage/Generated/GTLStorage.h new file mode 100644 index 0000000..d23afe5 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/GTLStorage.h @@ -0,0 +1,41 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorage.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ + +#import "GTLStorageConstants.h" + +#import "GTLStorageBucket.h" +#import "GTLStorageBucketAccessControl.h" +#import "GTLStorageBucketAccessControls.h" +#import "GTLStorageBuckets.h" +#import "GTLStorageObject.h" +#import "GTLStorageObjectAccessControl.h" +#import "GTLStorageObjectAccessControls.h" +#import "GTLStorageObjects.h" + +#import "GTLQueryStorage.h" +#import "GTLServiceStorage.h" diff --git a/GTL/Source/Services/Storage/Generated/GTLStorageBucket.h b/GTL/Source/Services/Storage/Generated/GTLStorageBucket.h new file mode 100644 index 0000000..e0874a6 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/GTLStorageBucket.h @@ -0,0 +1,118 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageBucket.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageBucket (0 custom class methods, 10 custom properties) +// GTLStorageBucketOwner (0 custom class methods, 2 custom properties) +// GTLStorageBucketWebsite (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLStorageBucketAccessControl; +@class GTLStorageBucketOwner; +@class GTLStorageBucketWebsite; +@class GTLStorageObjectAccessControl; + +// ---------------------------------------------------------------------------- +// +// GTLStorageBucket +// + +// A bucket. + +@interface GTLStorageBucket : GTLObject + +// Access controls on the bucket. +@property (retain) NSArray *acl; // of GTLStorageBucketAccessControl + +// Default access controls to apply to new objects when no ACL is provided. +@property (retain) NSArray *defaultObjectAcl; // of GTLStorageObjectAccessControl + +// The name of the bucket. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The kind of item this is. For buckets, this is always storage#bucket. +@property (copy) NSString *kind; + +// The location of the bucket. Object data for objects in the bucket resides in +// physical storage in this location. Can be US or EU. Defaults to US. +@property (copy) NSString *location; + +// The owner of the bucket. This will always be the project team's owner group. +@property (retain) GTLStorageBucketOwner *owner; + +// The project the bucket belongs to. +@property (retain) NSNumber *projectId; // unsignedLongLongValue + +// The URI of this bucket. +@property (copy) NSString *selfLink; + +// Creation time of the bucket in RFC 3339 format. +@property (retain) GTLDateTime *timeCreated; + +// The bucket's website configuration. +@property (retain) GTLStorageBucketWebsite *website; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLStorageBucketOwner +// + +@interface GTLStorageBucketOwner : GTLObject + +// The entity, in the form group-groupId. +@property (copy) NSString *entity; + +// The ID for the entity. +@property (copy) NSString *entityId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLStorageBucketWebsite +// + +@interface GTLStorageBucketWebsite : GTLObject + +// Behaves as the bucket's directory index where missing objects are treated as +// potential directories. +@property (copy) NSString *mainPageSuffix; + +// The custom object to return when a requested resource is not found. +@property (copy) NSString *notFoundPage; + +@end diff --git a/GTL/Source/Services/Storage/Generated/GTLStorageBucket.m b/GTL/Source/Services/Storage/Generated/GTLStorageBucket.m new file mode 100644 index 0000000..eec2455 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/GTLStorageBucket.m @@ -0,0 +1,87 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageBucket.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageBucket (0 custom class methods, 10 custom properties) +// GTLStorageBucketOwner (0 custom class methods, 2 custom properties) +// GTLStorageBucketWebsite (0 custom class methods, 2 custom properties) + +#import "GTLStorageBucket.h" + +#import "GTLStorageBucketAccessControl.h" +#import "GTLStorageObjectAccessControl.h" + +// ---------------------------------------------------------------------------- +// +// GTLStorageBucket +// + +@implementation GTLStorageBucket +@dynamic acl, defaultObjectAcl, identifier, kind, location, owner, projectId, + selfLink, timeCreated, website; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLStorageBucketAccessControl class], @"acl", + [GTLStorageObjectAccessControl class], @"defaultObjectAcl", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"storage#bucket"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLStorageBucketOwner +// + +@implementation GTLStorageBucketOwner +@dynamic entity, entityId; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLStorageBucketWebsite +// + +@implementation GTLStorageBucketWebsite +@dynamic mainPageSuffix, notFoundPage; +@end diff --git a/GTL/Source/Services/Storage/Generated/GTLStorageBucketAccessControl.h b/GTL/Source/Services/Storage/Generated/GTLStorageBucketAccessControl.h new file mode 100644 index 0000000..18193a4 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/GTLStorageBucketAccessControl.h @@ -0,0 +1,81 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageBucketAccessControl.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageBucketAccessControl (0 custom class methods, 9 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLStorageBucketAccessControl +// + +// An access-control entry. + +@interface GTLStorageBucketAccessControl : GTLObject + +// The name of the bucket. +@property (copy) NSString *bucket; + +// The domain associated with the entity, if any. +@property (copy) NSString *domain; + +// The email address associated with the entity, if any. +@property (copy) NSString *email; + +// The entity holding the permission, in one of the following forms: +// - user-userId +// - user-email +// - group-groupId +// - group-email +// - allUsers +// - allAuthenticatedUsers +@property (copy) NSString *entity; + +// The ID for the entity, if any. +@property (copy) NSString *entityId; + +// The ID of the access-control entry. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The kind of item this is. For bucket access control entries, this is always +// storage#bucketAccessControl. +@property (copy) NSString *kind; + +// The access permission for the entity. Can be READER, WRITER, or OWNER. +@property (copy) NSString *role; + +// The link to this access-control entry. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Storage/Generated/GTLStorageBucketAccessControl.m b/GTL/Source/Services/Storage/Generated/GTLStorageBucketAccessControl.m new file mode 100644 index 0000000..d655275 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/GTLStorageBucketAccessControl.m @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageBucketAccessControl.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageBucketAccessControl (0 custom class methods, 9 custom properties) + +#import "GTLStorageBucketAccessControl.h" + +// ---------------------------------------------------------------------------- +// +// GTLStorageBucketAccessControl +// + +@implementation GTLStorageBucketAccessControl +@dynamic bucket, domain, email, entity, entityId, identifier, kind, role, + selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"storage#bucketAccessControl"]; +} + +@end diff --git a/GTL/Source/Services/Storage/Generated/GTLStorageBucketAccessControls.h b/GTL/Source/Services/Storage/Generated/GTLStorageBucketAccessControls.h new file mode 100644 index 0000000..bc48d4a --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/GTLStorageBucketAccessControls.h @@ -0,0 +1,58 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageBucketAccessControls.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageBucketAccessControls (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLStorageBucketAccessControl; + +// ---------------------------------------------------------------------------- +// +// GTLStorageBucketAccessControls +// + +// An access-control list. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLStorageBucketAccessControls : GTLCollectionObject + +// The list of items. +@property (retain) NSArray *items; // of GTLStorageBucketAccessControl + +// The kind of item this is. For lists of bucket access control entries, this is +// always storage#bucketAccessControls. +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Storage/Generated/GTLStorageBucketAccessControls.m b/GTL/Source/Services/Storage/Generated/GTLStorageBucketAccessControls.m new file mode 100644 index 0000000..3d87a5b --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/GTLStorageBucketAccessControls.m @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageBucketAccessControls.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageBucketAccessControls (0 custom class methods, 2 custom properties) + +#import "GTLStorageBucketAccessControls.h" + +#import "GTLStorageBucketAccessControl.h" + +// ---------------------------------------------------------------------------- +// +// GTLStorageBucketAccessControls +// + +@implementation GTLStorageBucketAccessControls +@dynamic items, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLStorageBucketAccessControl class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"storage#bucketAccessControls"]; +} + +@end diff --git a/GTL/Source/Services/Storage/Generated/GTLStorageBuckets.h b/GTL/Source/Services/Storage/Generated/GTLStorageBuckets.h new file mode 100644 index 0000000..1501b2e --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/GTLStorageBuckets.h @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageBuckets.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageBuckets (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLStorageBucket; + +// ---------------------------------------------------------------------------- +// +// GTLStorageBuckets +// + +// A list of buckets. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLStorageBuckets : GTLCollectionObject + +// The list of items. +@property (retain) NSArray *items; // of GTLStorageBucket + +// The kind of item this is. For lists of buckets, this is always +// storage#buckets. +@property (copy) NSString *kind; + +// The continuation token, used to page through large result sets. Provide this +// value in a subsequent request to return the next page of results. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/Storage/Generated/GTLStorageBuckets.m b/GTL/Source/Services/Storage/Generated/GTLStorageBuckets.m new file mode 100644 index 0000000..2680f42 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/GTLStorageBuckets.m @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageBuckets.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageBuckets (0 custom class methods, 3 custom properties) + +#import "GTLStorageBuckets.h" + +#import "GTLStorageBucket.h" + +// ---------------------------------------------------------------------------- +// +// GTLStorageBuckets +// + +@implementation GTLStorageBuckets +@dynamic items, kind, nextPageToken; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLStorageBucket class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"storage#buckets"]; +} + +@end diff --git a/GTL/Source/Services/Storage/Generated/GTLStorageConstants.h b/GTL/Source/Services/Storage/Generated/GTLStorageConstants.h new file mode 100644 index 0000000..78eae87 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/GTLStorageConstants.h @@ -0,0 +1,47 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// Manage your data and permissions in Google Cloud Storage +GTL_EXTERN NSString * const kGTLAuthScopeStorageDevstorageFullControl; // "https://www.googleapis.com/auth/devstorage.full_control" +// View your data in Google Cloud Storage +GTL_EXTERN NSString * const kGTLAuthScopeStorageDevstorageReadOnly; // "https://www.googleapis.com/auth/devstorage.read_only" +// Manage your data in Google Cloud Storage +GTL_EXTERN NSString * const kGTLAuthScopeStorageDevstorageReadWrite; // "https://www.googleapis.com/auth/devstorage.read_write" + +// Projection +GTL_EXTERN NSString * const kGTLStorageProjectionFull; // "full" +GTL_EXTERN NSString * const kGTLStorageProjectionNoAcl; // "no_acl" diff --git a/GTL/Source/Services/Storage/Generated/GTLStorageConstants.m b/GTL/Source/Services/Storage/Generated/GTLStorageConstants.m new file mode 100644 index 0000000..44082e3 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/GTLStorageConstants.m @@ -0,0 +1,38 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ + +#import "GTLStorageConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeStorageDevstorageFullControl = @"https://www.googleapis.com/auth/devstorage.full_control"; +NSString * const kGTLAuthScopeStorageDevstorageReadOnly = @"https://www.googleapis.com/auth/devstorage.read_only"; +NSString * const kGTLAuthScopeStorageDevstorageReadWrite = @"https://www.googleapis.com/auth/devstorage.read_write"; + +// Projection +NSString * const kGTLStorageProjectionFull = @"full"; +NSString * const kGTLStorageProjectionNoAcl = @"no_acl"; diff --git a/GTL/Source/Services/Storage/Generated/GTLStorageObject.h b/GTL/Source/Services/Storage/Generated/GTLStorageObject.h new file mode 100644 index 0000000..21e7901 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/GTLStorageObject.h @@ -0,0 +1,160 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageObject.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageObject (0 custom class methods, 13 custom properties) +// GTLStorageObjectMedia (0 custom class methods, 7 custom properties) +// GTLStorageObjectMetadata (0 custom class methods, 0 custom properties) +// GTLStorageObjectOwner (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLStorageObjectAccessControl; +@class GTLStorageObjectMedia; +@class GTLStorageObjectMetadata; +@class GTLStorageObjectOwner; + +// ---------------------------------------------------------------------------- +// +// GTLStorageObject +// + +// An object. + +@interface GTLStorageObject : GTLObject + +// Access controls on the object. +@property (retain) NSArray *acl; // of GTLStorageObjectAccessControl + +// The bucket containing this object. +@property (copy) NSString *bucket; + +// Cache-Control directive for the object data. +@property (copy) NSString *cacheControl; + +// Content-Disposition of the object data. +@property (copy) NSString *contentDisposition; + +// Content-Encoding of the object data. +@property (copy) NSString *contentEncoding; + +// Content-Language of the object data. +@property (copy) NSString *contentLanguage; + +// The ID of the object. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The kind of item this is. For objects, this is always storage#object. +@property (copy) NSString *kind; + +// Object media data. Provided on your behalf when uploading raw media or +// multipart/related with an auxiliary media part. +@property (retain) GTLStorageObjectMedia *media; + +// User-provided metadata, in key/value pairs. +@property (retain) GTLStorageObjectMetadata *metadata; + +// The name of this object. Required if not specified by URL parameter. +@property (copy) NSString *name; + +// The owner of the object. This will always be the uploader of the object. +@property (retain) GTLStorageObjectOwner *owner; + +// The link to this object. +@property (copy) NSString *selfLink; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLStorageObjectMedia +// + +@interface GTLStorageObjectMedia : GTLObject + +// Hash algorithm used. Currently only MD5 is supported. Required if a hash is +// provided. +@property (copy) NSString *algorithm; + +// Content-Type of the object data. +@property (copy) NSString *contentType; + +// URL-safe Base64-encoded data. This property can be used to insert objects +// under 64KB in size, and will only be returned in response to the get method +// for objects so created. When this resource is returned in response to the +// list method, this property is omitted. +@property (copy) NSString *data; // GTLBase64 can encode/decode (probably web-safe format) + +// Hash of the data. Required if a hash algorithm is provided. +// Remapped to 'hashProperty' to avoid NSObject's 'hash'. +@property (copy) NSString *hashProperty; + +// Content-Length of the data in bytes. +@property (retain) NSNumber *length; // longLongValue + +// Media download link. +@property (copy) NSString *link; + +// Creation time of the data in RFC 3339 format. +@property (retain) GTLDateTime *timeCreated; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLStorageObjectMetadata +// + +@interface GTLStorageObjectMetadata : GTLObject +// This object is documented as having more properties that are NSString. Use +// -additionalJSONKeys and -additionalPropertyForName: to get the list of +// properties and then fetch them; or -additionalProperties to fetch them all at +// once. +@end + + +// ---------------------------------------------------------------------------- +// +// GTLStorageObjectOwner +// + +@interface GTLStorageObjectOwner : GTLObject + +// The entity, in the form user-userId. +@property (copy) NSString *entity; + +// The ID for the entity. +@property (copy) NSString *entityId; + +@end diff --git a/GTL/Source/Services/Storage/Generated/GTLStorageObject.m b/GTL/Source/Services/Storage/Generated/GTLStorageObject.m new file mode 100644 index 0000000..a73c2b3 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/GTLStorageObject.m @@ -0,0 +1,108 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageObject.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageObject (0 custom class methods, 13 custom properties) +// GTLStorageObjectMedia (0 custom class methods, 7 custom properties) +// GTLStorageObjectMetadata (0 custom class methods, 0 custom properties) +// GTLStorageObjectOwner (0 custom class methods, 2 custom properties) + +#import "GTLStorageObject.h" + +#import "GTLStorageObjectAccessControl.h" + +// ---------------------------------------------------------------------------- +// +// GTLStorageObject +// + +@implementation GTLStorageObject +@dynamic acl, bucket, cacheControl, contentDisposition, contentEncoding, + contentLanguage, identifier, kind, media, metadata, name, owner, + selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLStorageObjectAccessControl class] + forKey:@"acl"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"storage#object"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLStorageObjectMedia +// + +@implementation GTLStorageObjectMedia +@dynamic algorithm, contentType, data, hashProperty, length, link, timeCreated; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"hash" + forKey:@"hashProperty"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLStorageObjectMetadata +// + +@implementation GTLStorageObjectMetadata + ++ (Class)classForAdditionalProperties { + return [NSString class]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLStorageObjectOwner +// + +@implementation GTLStorageObjectOwner +@dynamic entity, entityId; +@end diff --git a/GTL/Source/Services/Storage/Generated/GTLStorageObjectAccessControl.h b/GTL/Source/Services/Storage/Generated/GTLStorageObjectAccessControl.h new file mode 100644 index 0000000..00f41c3 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/GTLStorageObjectAccessControl.h @@ -0,0 +1,84 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageObjectAccessControl.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageObjectAccessControl (0 custom class methods, 10 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLStorageObjectAccessControl +// + +// An access-control entry. + +@interface GTLStorageObjectAccessControl : GTLObject + +// The name of the bucket. +@property (copy) NSString *bucket; + +// The domain associated with the entity, if any. +@property (copy) NSString *domain; + +// The email address associated with the entity, if any. +@property (copy) NSString *email; + +// The entity holding the permission, in one of the following forms: +// - user-userId +// - user-email +// - group-groupId +// - group-email +// - allUsers +// - allAuthenticatedUsers +@property (copy) NSString *entity; + +// The ID for the entity, if any. +@property (copy) NSString *entityId; + +// The ID of the access-control entry. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The kind of item this is. For object access control entries, this is always +// storage#objectAccessControl. +@property (copy) NSString *kind; + +// The name of the object. +@property (copy) NSString *object; + +// The access permission for the entity. Can be READER or OWNER. +@property (copy) NSString *role; + +// The link to this access-control entry. +@property (copy) NSString *selfLink; + +@end diff --git a/GTL/Source/Services/Storage/Generated/GTLStorageObjectAccessControl.m b/GTL/Source/Services/Storage/Generated/GTLStorageObjectAccessControl.m new file mode 100644 index 0000000..9cdb4be --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/GTLStorageObjectAccessControl.m @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageObjectAccessControl.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageObjectAccessControl (0 custom class methods, 10 custom properties) + +#import "GTLStorageObjectAccessControl.h" + +// ---------------------------------------------------------------------------- +// +// GTLStorageObjectAccessControl +// + +@implementation GTLStorageObjectAccessControl +@dynamic bucket, domain, email, entity, entityId, identifier, kind, object, + role, selfLink; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"storage#objectAccessControl"]; +} + +@end diff --git a/GTL/Source/Services/Storage/Generated/GTLStorageObjectAccessControls.h b/GTL/Source/Services/Storage/Generated/GTLStorageObjectAccessControls.h new file mode 100644 index 0000000..d7badb1 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/GTLStorageObjectAccessControls.h @@ -0,0 +1,58 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageObjectAccessControls.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageObjectAccessControls (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLStorageObjectAccessControl; + +// ---------------------------------------------------------------------------- +// +// GTLStorageObjectAccessControls +// + +// An access-control list. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLStorageObjectAccessControls : GTLCollectionObject + +// The list of items. +@property (retain) NSArray *items; // of GTLStorageObjectAccessControl + +// The kind of item this is. For lists of object access control entries, this is +// always storage#objectAccessControls. +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/Storage/Generated/GTLStorageObjectAccessControls.m b/GTL/Source/Services/Storage/Generated/GTLStorageObjectAccessControls.m new file mode 100644 index 0000000..332f059 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/GTLStorageObjectAccessControls.m @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageObjectAccessControls.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageObjectAccessControls (0 custom class methods, 2 custom properties) + +#import "GTLStorageObjectAccessControls.h" + +#import "GTLStorageObjectAccessControl.h" + +// ---------------------------------------------------------------------------- +// +// GTLStorageObjectAccessControls +// + +@implementation GTLStorageObjectAccessControls +@dynamic items, kind; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLStorageObjectAccessControl class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"storage#objectAccessControls"]; +} + +@end diff --git a/GTL/Source/Services/Storage/Generated/GTLStorageObjects.h b/GTL/Source/Services/Storage/Generated/GTLStorageObjects.h new file mode 100644 index 0000000..3fe0f5e --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/GTLStorageObjects.h @@ -0,0 +1,66 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageObjects.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageObjects (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLStorageObject; + +// ---------------------------------------------------------------------------- +// +// GTLStorageObjects +// + +// A list of objects. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLStorageObjects : GTLCollectionObject + +// The list of items. +@property (retain) NSArray *items; // of GTLStorageObject + +// The kind of item this is. For lists of objects, this is always +// storage#objects. +@property (copy) NSString *kind; + +// The continuation token, used to page through large result sets. Provide this +// value in a subsequent request to return the next page of results. +@property (copy) NSString *nextPageToken; + +// The list of prefixes of objects matching-but-not-listed up to and including +// the requested delimiter. +@property (retain) NSArray *prefixes; // of NSString + +@end diff --git a/GTL/Source/Services/Storage/Generated/GTLStorageObjects.m b/GTL/Source/Services/Storage/Generated/GTLStorageObjects.m new file mode 100644 index 0000000..5092976 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/GTLStorageObjects.m @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorageObjects.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ +// Classes: +// GTLStorageObjects (0 custom class methods, 4 custom properties) + +#import "GTLStorageObjects.h" + +#import "GTLStorageObject.h" + +// ---------------------------------------------------------------------------- +// +// GTLStorageObjects +// + +@implementation GTLStorageObjects +@dynamic items, kind, nextPageToken, prefixes; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLStorageObject class], @"items", + [NSString class], @"prefixes", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"storage#objects"]; +} + +@end diff --git a/GTL/Source/Services/Storage/Generated/GTLStorage_Sources.m b/GTL/Source/Services/Storage/Generated/GTLStorage_Sources.m new file mode 100644 index 0000000..d5ad592 --- /dev/null +++ b/GTL/Source/Services/Storage/Generated/GTLStorage_Sources.m @@ -0,0 +1,44 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLStorage_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Cloud Storage API (storage/v1beta1) +// Description: +// Lets you store and retrieve potentially-large, immutable data objects. +// Documentation: +// https://developers.google.com/storage/docs/json_api/ + +#import "GTLStorageConstants.m" + +#import "GTLStorageBucket.m" +#import "GTLStorageBucketAccessControl.m" +#import "GTLStorageBucketAccessControls.m" +#import "GTLStorageBuckets.m" +#import "GTLStorageObject.m" +#import "GTLStorageObjectAccessControl.m" +#import "GTLStorageObjectAccessControls.m" +#import "GTLStorageObjects.m" + +#import "GTLQueryStorage.m" +#import "GTLServiceStorage.m" diff --git a/GTL/Source/Services/Tasks/.svn/all-wcprops b/GTL/Source/Services/Tasks/.svn/all-wcprops new file mode 100644 index 0000000..75f7f78 --- /dev/null +++ b/GTL/Source/Services/Tasks/.svn/all-wcprops @@ -0,0 +1,5 @@ +K 25 +svn:wc:ra_dav:version-url +V 45 +/svn/!svn/ver/225/trunk/Source/Services/Tasks +END diff --git a/GTL/Source/Services/Tasks/.svn/entries b/GTL/Source/Services/Tasks/.svn/entries new file mode 100644 index 0000000..8172245 --- /dev/null +++ b/GTL/Source/Services/Tasks/.svn/entries @@ -0,0 +1,31 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Tasks +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +Generated +dir + diff --git a/GTL/Source/Services/Tasks/Generated/.svn/all-wcprops b/GTL/Source/Services/Tasks/Generated/.svn/all-wcprops new file mode 100644 index 0000000..58f7263 --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/.svn/all-wcprops @@ -0,0 +1,101 @@ +K 25 +svn:wc:ra_dav:version-url +V 55 +/svn/!svn/ver/225/trunk/Source/Services/Tasks/Generated +END +GTLTasksConstants.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/14/trunk/Source/Services/Tasks/Generated/GTLTasksConstants.h +END +GTLTasks.h +K 25 +svn:wc:ra_dav:version-url +V 65 +/svn/!svn/ver/14/trunk/Source/Services/Tasks/Generated/GTLTasks.h +END +GTLTasksConstants.m +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/14/trunk/Source/Services/Tasks/Generated/GTLTasksConstants.m +END +GTLTasksTaskLists.h +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/124/trunk/Source/Services/Tasks/Generated/GTLTasksTaskLists.h +END +GTLTasksTasks.h +K 25 +svn:wc:ra_dav:version-url +V 71 +/svn/!svn/ver/124/trunk/Source/Services/Tasks/Generated/GTLTasksTasks.h +END +GTLTasksTaskLists.m +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/14/trunk/Source/Services/Tasks/Generated/GTLTasksTaskLists.m +END +GTLTasks_Sources.m +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/225/trunk/Source/Services/Tasks/Generated/GTLTasks_Sources.m +END +GTLTasksTasks.m +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/14/trunk/Source/Services/Tasks/Generated/GTLTasksTasks.m +END +GTLTasksTaskList.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/135/trunk/Source/Services/Tasks/Generated/GTLTasksTaskList.h +END +GTLServiceTasks.h +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/28/trunk/Source/Services/Tasks/Generated/GTLServiceTasks.h +END +GTLTasksTask.h +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/127/trunk/Source/Services/Tasks/Generated/GTLTasksTask.h +END +GTLTasksTaskList.m +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/135/trunk/Source/Services/Tasks/Generated/GTLTasksTaskList.m +END +GTLQueryTasks.h +K 25 +svn:wc:ra_dav:version-url +V 71 +/svn/!svn/ver/124/trunk/Source/Services/Tasks/Generated/GTLQueryTasks.h +END +GTLServiceTasks.m +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/!svn/ver/131/trunk/Source/Services/Tasks/Generated/GTLServiceTasks.m +END +GTLTasksTask.m +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/127/trunk/Source/Services/Tasks/Generated/GTLTasksTask.m +END +GTLQueryTasks.m +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/22/trunk/Source/Services/Tasks/Generated/GTLQueryTasks.m +END diff --git a/GTL/Source/Services/Tasks/Generated/.svn/entries b/GTL/Source/Services/Tasks/Generated/.svn/entries new file mode 100644 index 0000000..4657884 --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/.svn/entries @@ -0,0 +1,572 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Tasks/Generated +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +GTLTasksConstants.h +file + + + + +2012-12-09T08:42:31.000000Z +cee67ed7bf5a4a8915598e16add46080 +2011-06-24T20:24:16.908736Z +14 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1352 + +GTLTasks.h +file + + + + +2012-12-09T08:42:31.000000Z +2add0f8b53d78b2e35858ceafe811310 +2011-06-24T20:24:16.908736Z +14 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1137 + +GTLTasksConstants.m +file + + + + +2012-12-09T08:42:31.000000Z +9b8714691a2859fa008cb012b2f48936 +2011-06-24T20:24:16.908736Z +14 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1189 + +GTLTasksTaskLists.h +file + + + + +2012-12-09T08:42:31.000000Z +f06bb0c31913bb10a91e98841f11cf13 +2011-12-12T22:00:16.502331Z +124 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1816 + +GTLTasksTasks.h +file + + + + +2012-12-09T08:42:31.000000Z +71ecd2502d62ff60ba77d8a072815730 +2011-12-12T22:00:16.502331Z +124 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1770 + +GTLTasksTaskLists.m +file + + + + +2012-12-09T08:42:31.000000Z +6b89f6c486f4101b59e680428d58b19d +2011-06-24T20:24:16.908736Z +14 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1732 + +GTLTasks_Sources.m +file + + + + +2012-12-09T08:42:31.000000Z +d0aa10c7894b2fc4d37bd35960d2a1f0 +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1256 + +GTLTasksTasks.m +file + + + + +2012-12-09T08:42:31.000000Z +dd84c00942a95e9de35f595ced4b9bb2 +2011-06-24T20:24:16.908736Z +14 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1700 + +GTLTasksTaskList.h +file + + + + +2012-12-09T08:42:31.000000Z +3d936ba7c5c6b9093081da1b4d5836a9 +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1870 + +GTLServiceTasks.h +file + + + + +2012-12-09T08:42:31.000000Z +5878d1eab495a0a263030c99ef3833b5 +2011-08-23T19:12:40.725509Z +28 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2077 + +GTLTasksTask.h +file + + + + +2012-12-09T08:42:31.000000Z +3b375ac55603cbec736cff39651ece84 +2011-12-16T20:26:44.401897Z +127 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4024 + +GTLTasksTaskList.m +file + + + + +2012-12-09T08:42:31.000000Z +85f27d5667d3ee1539091ddc7ea0071d +2012-01-26T20:38:11.737015Z +135 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1531 + +GTLQueryTasks.h +file + + + + +2012-12-09T08:42:31.000000Z +52963a2782f70f6cf9349fb0c76626cb +2011-12-12T22:00:16.502331Z +124 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +9123 + +GTLServiceTasks.m +file + + + + +2012-12-09T08:42:31.000000Z +160052d0710c2c41838907e3e1a28d91 +2011-12-16T21:13:04.166932Z +131 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1991 + +GTLTasksTask.m +file + + + + +2012-12-09T08:42:31.000000Z +e59594318e7700a71c965016212dd09f +2011-12-16T20:26:44.401897Z +127 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2265 + +GTLQueryTasks.m +file + + + + +2012-12-09T08:42:31.000000Z +1aad278afa47cae8c52e17649357ed64 +2011-08-16T23:06:51.401103Z +22 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +6816 + diff --git a/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLQueryTasks.h.svn-base b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLQueryTasks.h.svn-base new file mode 100644 index 0000000..a7a8b9d --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLQueryTasks.h.svn-base @@ -0,0 +1,255 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryTasks.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html +// Classes: +// GTLQueryTasks (14 custom class methods, 15 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLTasksTask; +@class GTLTasksTaskList; + +@interface GTLQueryTasks : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *completedMax; +@property (copy) NSString *completedMin; +@property (copy) NSString *dueMax; +@property (copy) NSString *dueMin; +@property (assign) long long maxResults; +@property (copy) NSString *pageToken; +@property (copy) NSString *parent; +@property (copy) NSString *previous; +@property (assign) BOOL showCompleted; +@property (assign) BOOL showDeleted; +@property (assign) BOOL showHidden; +@property (copy) NSString *task; +@property (copy) NSString *tasklist; +@property (copy) NSString *updatedMin; + +#pragma mark - +#pragma mark "tasklists" methods +// These create a GTLQueryTasks object. + +// Method: tasks.tasklists.delete +// Deletes the authenticated user's specified task list. +// Required: +// tasklist: Task list identifier. +// Authorization scope(s): +// kGTLAuthScopeTasks ++ (id)queryForTasklistsDeleteWithTasklist:(NSString *)tasklist; + +// Method: tasks.tasklists.get +// Returns the authenticated user's specified task list. +// Required: +// tasklist: Task list identifier. +// Authorization scope(s): +// kGTLAuthScopeTasks +// kGTLAuthScopeTasksReadonly +// Fetches a GTLTasksTaskList. ++ (id)queryForTasklistsGetWithTasklist:(NSString *)tasklist; + +// Method: tasks.tasklists.insert +// Creates a new task list and adds it to the authenticated user's task lists. +// Authorization scope(s): +// kGTLAuthScopeTasks +// Fetches a GTLTasksTaskList. ++ (id)queryForTasklistsInsertWithObject:(GTLTasksTaskList *)object; + +// Method: tasks.tasklists.list +// Returns all the authenticated user's task lists. +// Optional: +// maxResults: Maximum number of task lists returned on one page. Optional. +// The default is 100. +// pageToken: Token specifying the result page to return. Optional. +// Authorization scope(s): +// kGTLAuthScopeTasks +// kGTLAuthScopeTasksReadonly +// Fetches a GTLTasksTaskLists. ++ (id)queryForTasklistsList; + +// Method: tasks.tasklists.patch +// Updates the authenticated user's specified task list. This method supports +// patch semantics. +// Required: +// tasklist: Task list identifier. +// Authorization scope(s): +// kGTLAuthScopeTasks +// Fetches a GTLTasksTaskList. ++ (id)queryForTasklistsPatchWithObject:(GTLTasksTaskList *)object + tasklist:(NSString *)tasklist; + +// Method: tasks.tasklists.update +// Updates the authenticated user's specified task list. +// Required: +// tasklist: Task list identifier. +// Authorization scope(s): +// kGTLAuthScopeTasks +// Fetches a GTLTasksTaskList. ++ (id)queryForTasklistsUpdateWithObject:(GTLTasksTaskList *)object + tasklist:(NSString *)tasklist; + +#pragma mark - +#pragma mark "tasks" methods +// These create a GTLQueryTasks object. + +// Method: tasks.tasks.clear +// Clears all completed tasks from the specified task list. The affected tasks +// will be marked as 'hidden' and no longer be returned by default when +// retrieving all tasks for a task list. +// Required: +// tasklist: Task list identifier. +// Authorization scope(s): +// kGTLAuthScopeTasks ++ (id)queryForTasksClearWithTasklist:(NSString *)tasklist; + +// Method: tasks.tasks.delete +// Deletes the specified task from the task list. +// Required: +// tasklist: Task list identifier. +// task: Task identifier. +// Authorization scope(s): +// kGTLAuthScopeTasks ++ (id)queryForTasksDeleteWithTasklist:(NSString *)tasklist + task:(NSString *)task; + +// Method: tasks.tasks.get +// Returns the specified task. +// Required: +// tasklist: Task list identifier. +// task: Task identifier. +// Authorization scope(s): +// kGTLAuthScopeTasks +// kGTLAuthScopeTasksReadonly +// Fetches a GTLTasksTask. ++ (id)queryForTasksGetWithTasklist:(NSString *)tasklist + task:(NSString *)task; + +// Method: tasks.tasks.insert +// Creates a new task on the specified task list. +// Required: +// tasklist: Task list identifier. +// Optional: +// parent: Parent task identifier. If the task is created at the top level, +// this parameter is omitted. Optional. +// previous: Previous sibling task identifier. If the task is created at the +// first position among its siblings, this parameter is omitted. Optional. +// Authorization scope(s): +// kGTLAuthScopeTasks +// Fetches a GTLTasksTask. ++ (id)queryForTasksInsertWithObject:(GTLTasksTask *)object + tasklist:(NSString *)tasklist; + +// Method: tasks.tasks.list +// Returns all tasks in the specified task list. +// Required: +// tasklist: Task list identifier. +// Optional: +// completedMax: Upper bound for a task's completion date (as a RFC 3339 +// timestamp) to filter by. Optional. The default is not to filter by +// completion date. +// completedMin: Lower bound for a task's completion date (as a RFC 3339 +// timestamp) to filter by. Optional. The default is not to filter by +// completion date. +// dueMax: Upper bound for a task's due date (as a RFC 3339 timestamp) to +// filter by. Optional. The default is not to filter by due date. +// dueMin: Lower bound for a task's due date (as a RFC 3339 timestamp) to +// filter by. Optional. The default is not to filter by due date. +// maxResults: Maximum number of task lists returned on one page. Optional. +// The default is 100. +// pageToken: Token specifying the result page to return. Optional. +// showCompleted: Flag indicating whether completed tasks are returned in the +// result. Optional. The default is True. +// showDeleted: Flag indicating whether deleted tasks are returned in the +// result. Optional. The default is False. +// showHidden: Flag indicating whether hidden tasks are returned in the +// result. Optional. The default is False. +// updatedMin: Lower bound for a task's last modification time (as a RFC 3339 +// timestamp) to filter by. Optional. The default is not to filter by last +// modification time. +// Authorization scope(s): +// kGTLAuthScopeTasks +// kGTLAuthScopeTasksReadonly +// Fetches a GTLTasksTasks. ++ (id)queryForTasksListWithTasklist:(NSString *)tasklist; + +// Method: tasks.tasks.move +// Moves the specified task to another position in the task list. This can +// include putting it as a child task under a new parent and/or move it to a +// different position among its sibling tasks. +// Required: +// tasklist: Task list identifier. +// task: Task identifier. +// Optional: +// parent: New parent task identifier. If the task is moved to the top level, +// this parameter is omitted. Optional. +// previous: New previous sibling task identifier. If the task is moved to the +// first position among its siblings, this parameter is omitted. Optional. +// Authorization scope(s): +// kGTLAuthScopeTasks +// Fetches a GTLTasksTask. ++ (id)queryForTasksMoveWithTasklist:(NSString *)tasklist + task:(NSString *)task; + +// Method: tasks.tasks.patch +// Updates the specified task. This method supports patch semantics. +// Required: +// tasklist: Task list identifier. +// task: Task identifier. +// Authorization scope(s): +// kGTLAuthScopeTasks +// Fetches a GTLTasksTask. ++ (id)queryForTasksPatchWithObject:(GTLTasksTask *)object + tasklist:(NSString *)tasklist + task:(NSString *)task; + +// Method: tasks.tasks.update +// Updates the specified task. +// Required: +// tasklist: Task list identifier. +// task: Task identifier. +// Authorization scope(s): +// kGTLAuthScopeTasks +// Fetches a GTLTasksTask. ++ (id)queryForTasksUpdateWithObject:(GTLTasksTask *)object + tasklist:(NSString *)tasklist + task:(NSString *)task; + +@end diff --git a/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLQueryTasks.m.svn-base b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLQueryTasks.m.svn-base new file mode 100644 index 0000000..9739d1b --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLQueryTasks.m.svn-base @@ -0,0 +1,204 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryTasks.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html +// Classes: +// GTLQueryTasks (14 custom class methods, 15 custom properties) + +#import "GTLQueryTasks.h" + +#import "GTLTasksTask.h" +#import "GTLTasksTaskList.h" +#import "GTLTasksTaskLists.h" +#import "GTLTasksTasks.h" + +@implementation GTLQueryTasks + +@dynamic completedMax, completedMin, dueMax, dueMin, fields, maxResults, + pageToken, parent, previous, showCompleted, showDeleted, showHidden, + task, tasklist, updatedMin; + +#pragma mark - +#pragma mark "tasklists" methods +// These create a GTLQueryTasks object. + ++ (id)queryForTasklistsDeleteWithTasklist:(NSString *)tasklist { + NSString *methodName = @"tasks.tasklists.delete"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.tasklist = tasklist; + return query; +} + ++ (id)queryForTasklistsGetWithTasklist:(NSString *)tasklist { + NSString *methodName = @"tasks.tasklists.get"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.tasklist = tasklist; + query.expectedObjectClass = [GTLTasksTaskList class]; + return query; +} + ++ (id)queryForTasklistsInsertWithObject:(GTLTasksTaskList *)object { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"tasks.tasklists.insert"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.expectedObjectClass = [GTLTasksTaskList class]; + return query; +} + ++ (id)queryForTasklistsList { + NSString *methodName = @"tasks.tasklists.list"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLTasksTaskLists class]; + return query; +} + ++ (id)queryForTasklistsPatchWithObject:(GTLTasksTaskList *)object + tasklist:(NSString *)tasklist { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"tasks.tasklists.patch"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.tasklist = tasklist; + query.expectedObjectClass = [GTLTasksTaskList class]; + return query; +} + ++ (id)queryForTasklistsUpdateWithObject:(GTLTasksTaskList *)object + tasklist:(NSString *)tasklist { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"tasks.tasklists.update"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.tasklist = tasklist; + query.expectedObjectClass = [GTLTasksTaskList class]; + return query; +} + +#pragma mark - +#pragma mark "tasks" methods +// These create a GTLQueryTasks object. + ++ (id)queryForTasksClearWithTasklist:(NSString *)tasklist { + NSString *methodName = @"tasks.tasks.clear"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.tasklist = tasklist; + return query; +} + ++ (id)queryForTasksDeleteWithTasklist:(NSString *)tasklist + task:(NSString *)task { + NSString *methodName = @"tasks.tasks.delete"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.tasklist = tasklist; + query.task = task; + return query; +} + ++ (id)queryForTasksGetWithTasklist:(NSString *)tasklist + task:(NSString *)task { + NSString *methodName = @"tasks.tasks.get"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.tasklist = tasklist; + query.task = task; + query.expectedObjectClass = [GTLTasksTask class]; + return query; +} + ++ (id)queryForTasksInsertWithObject:(GTLTasksTask *)object + tasklist:(NSString *)tasklist { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"tasks.tasks.insert"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.tasklist = tasklist; + query.expectedObjectClass = [GTLTasksTask class]; + return query; +} + ++ (id)queryForTasksListWithTasklist:(NSString *)tasklist { + NSString *methodName = @"tasks.tasks.list"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.tasklist = tasklist; + query.expectedObjectClass = [GTLTasksTasks class]; + return query; +} + ++ (id)queryForTasksMoveWithTasklist:(NSString *)tasklist + task:(NSString *)task { + NSString *methodName = @"tasks.tasks.move"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.tasklist = tasklist; + query.task = task; + query.expectedObjectClass = [GTLTasksTask class]; + return query; +} + ++ (id)queryForTasksPatchWithObject:(GTLTasksTask *)object + tasklist:(NSString *)tasklist + task:(NSString *)task { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"tasks.tasks.patch"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.tasklist = tasklist; + query.task = task; + query.expectedObjectClass = [GTLTasksTask class]; + return query; +} + ++ (id)queryForTasksUpdateWithObject:(GTLTasksTask *)object + tasklist:(NSString *)tasklist + task:(NSString *)task { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"tasks.tasks.update"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.tasklist = tasklist; + query.task = task; + query.expectedObjectClass = [GTLTasksTask class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLServiceTasks.h.svn-base b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLServiceTasks.h.svn-base new file mode 100644 index 0000000..8c0dbdf --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLServiceTasks.h.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceTasks.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html +// Classes: +// GTLServiceTasks (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceTasks : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryTasks.h. The query can the be sent with GTLService's execute methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLServiceTasks.m.svn-base b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLServiceTasks.m.svn-base new file mode 100644 index 0000000..49b3fd4 --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLServiceTasks.m.svn-base @@ -0,0 +1,64 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceTasks.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html +// Classes: +// GTLServiceTasks (0 custom class methods, 0 custom properties) + +#import "GTLTasks.h" + +@implementation GTLServiceTasks + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryTasks class], + [GTLTasksTask class], + [GTLTasksTaskList class], + [GTLTasksTaskLists class], + [GTLTasksTasks class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v1"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasks.h.svn-base b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasks.h.svn-base new file mode 100644 index 0000000..cd394f4 --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasks.h.svn-base @@ -0,0 +1,37 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLTasks.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html + +#import "GTLTasksConstants.h" + +#import "GTLTasksTask.h" +#import "GTLTasksTaskList.h" +#import "GTLTasksTaskLists.h" +#import "GTLTasksTasks.h" + +#import "GTLQueryTasks.h" +#import "GTLServiceTasks.h" diff --git a/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksConstants.h.svn-base b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksConstants.h.svn-base new file mode 100644 index 0000000..5b4f675 --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksConstants.h.svn-base @@ -0,0 +1,41 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLTasksConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// Manage your tasks +GTL_EXTERN NSString * const kGTLAuthScopeTasks; // "https://www.googleapis.com/auth/tasks" +// View your tasks +GTL_EXTERN NSString * const kGTLAuthScopeTasksReadonly; // "https://www.googleapis.com/auth/tasks.readonly" diff --git a/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksConstants.m.svn-base b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksConstants.m.svn-base new file mode 100644 index 0000000..a7e5f31 --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksConstants.m.svn-base @@ -0,0 +1,33 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLTasksConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html + +#import "GTLTasksConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeTasks = @"https://www.googleapis.com/auth/tasks"; +NSString * const kGTLAuthScopeTasksReadonly = @"https://www.googleapis.com/auth/tasks.readonly"; diff --git a/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksTask.h.svn-base b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksTask.h.svn-base new file mode 100644 index 0000000..39c7e0b --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksTask.h.svn-base @@ -0,0 +1,123 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLTasksTask.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html +// Classes: +// GTLTasksTask (0 custom class methods, 15 custom properties) +// GTLTasksTaskLinksItem (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLTasksTaskLinksItem; + +// ---------------------------------------------------------------------------- +// +// GTLTasksTask +// + +@interface GTLTasksTask : GTLObject + +// Completion date of the task (as a RFC 3339 timestamp). This field is omitted +// if the task has not been completed. +@property (retain) GTLDateTime *completed; + +// Flag indicating whether the task has been deleted. The default if False. +@property (retain) NSNumber *deleted; // boolValue + +// Due date of the task (as a RFC 3339 timestamp). Optional. +@property (retain) GTLDateTime *due; + +// ETag of the resource. +@property (copy) NSString *ETag; + +// Flag indicating whether the task is hidden. This is the case if the task had +// been marked completed when the task list was last cleared. The default is +// False. This field is read-only. +@property (retain) NSNumber *hidden; // boolValue + +// Task identifier. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Type of the resource. This is always "tasks#task". +@property (copy) NSString *kind; + +// Collection of links. This collection is read-only. +@property (retain) NSArray *links; // of GTLTasksTaskLinksItem + +// Notes describing the task. Optional. +@property (copy) NSString *notes; + +// Parent task identifier. This field is omitted if it is a top-level task. This +// field is read-only. Use the "move" method to move the task under a different +// parent or to the top level. +@property (copy) NSString *parent; + +// String indicating the position of the task among its sibling tasks under the +// same parent task or at the top level. If this string is greater than another +// task's corresponding position string according to lexicographical ordering, +// the task is positioned after the other task under the same parent task (or at +// the top level). This field is read-only. Use the "move" method to move the +// task to another position. +@property (copy) NSString *position; + +// URL pointing to this task. Used to retrieve, update, or delete this task. +@property (copy) NSString *selfLink; + +// Status of the task. This is either "needsAction" or "completed". +@property (copy) NSString *status; + +// Title of the task. +@property (copy) NSString *title; + +// Last modification time of the task (as a RFC 3339 timestamp). +@property (retain) GTLDateTime *updated; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLTasksTaskLinksItem +// + +@interface GTLTasksTaskLinksItem : GTLObject + +// The description. In HTML speak: Everything between and . +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The URL. +@property (copy) NSString *link; + +// Type of the link, e.g. "email". +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksTask.m.svn-base b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksTask.m.svn-base new file mode 100644 index 0000000..976fb24 --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksTask.m.svn-base @@ -0,0 +1,81 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLTasksTask.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html +// Classes: +// GTLTasksTask (0 custom class methods, 15 custom properties) +// GTLTasksTaskLinksItem (0 custom class methods, 3 custom properties) + +#import "GTLTasksTask.h" + +// ---------------------------------------------------------------------------- +// +// GTLTasksTask +// + +@implementation GTLTasksTask +@dynamic completed, deleted, due, ETag, hidden, identifier, kind, links, notes, + parent, position, selfLink, status, title, updated; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLTasksTaskLinksItem class] + forKey:@"links"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"tasks#task"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLTasksTaskLinksItem +// + +@implementation GTLTasksTaskLinksItem +@dynamic descriptionProperty, link, type; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksTaskList.h.svn-base b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksTaskList.h.svn-base new file mode 100644 index 0000000..b790a50 --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksTaskList.h.svn-base @@ -0,0 +1,64 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLTasksTaskList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html +// Classes: +// GTLTasksTaskList (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLTasksTaskList +// + +@interface GTLTasksTaskList : GTLObject + +// ETag of the resource. +@property (copy) NSString *ETag; + +// Task list identifier. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Type of the resource. This is always "tasks#taskList". +@property (copy) NSString *kind; + +// URL pointing to this task list. Used to retrieve, update, or delete this task +// list. +@property (copy) NSString *selfLink; + +// Title of the task list. +@property (copy) NSString *title; + +// Last modification time of the task list (as a RFC 3339 timestamp). +@property (retain) GTLDateTime *updated; + +@end diff --git a/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksTaskList.m.svn-base b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksTaskList.m.svn-base new file mode 100644 index 0000000..63b0ce7 --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksTaskList.m.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLTasksTaskList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html +// Classes: +// GTLTasksTaskList (0 custom class methods, 6 custom properties) + +#import "GTLTasksTaskList.h" + +// ---------------------------------------------------------------------------- +// +// GTLTasksTaskList +// + +@implementation GTLTasksTaskList +@dynamic ETag, identifier, kind, selfLink, title, updated; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"tasks#taskList"]; +} + +@end diff --git a/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksTaskLists.h.svn-base b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksTaskLists.h.svn-base new file mode 100644 index 0000000..aa8e907 --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksTaskLists.h.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLTasksTaskLists.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html +// Classes: +// GTLTasksTaskLists (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLTasksTaskList; + +// ---------------------------------------------------------------------------- +// +// GTLTasksTaskLists +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLTasksTaskLists : GTLCollectionObject + +// ETag of the resource. +@property (copy) NSString *ETag; + +// Collection of task lists. +@property (retain) NSArray *items; // of GTLTasksTaskList + +// Type of the resource. This is always "tasks#taskLists". +@property (copy) NSString *kind; + +// Token that can be used to request the next page of this result. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksTaskLists.m.svn-base b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksTaskLists.m.svn-base new file mode 100644 index 0000000..797cfbd --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksTaskLists.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLTasksTaskLists.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html +// Classes: +// GTLTasksTaskLists (0 custom class methods, 4 custom properties) + +#import "GTLTasksTaskLists.h" + +#import "GTLTasksTaskList.h" + +// ---------------------------------------------------------------------------- +// +// GTLTasksTaskLists +// + +@implementation GTLTasksTaskLists +@dynamic ETag, items, kind, nextPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLTasksTaskList class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"tasks#taskLists"]; +} + +@end diff --git a/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksTasks.h.svn-base b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksTasks.h.svn-base new file mode 100644 index 0000000..1ef5556 --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksTasks.h.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLTasksTasks.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html +// Classes: +// GTLTasksTasks (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLTasksTask; + +// ---------------------------------------------------------------------------- +// +// GTLTasksTasks +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLTasksTasks : GTLCollectionObject + +// ETag of the resource. +@property (copy) NSString *ETag; + +// Collection of tasks. +@property (retain) NSArray *items; // of GTLTasksTask + +// Type of the resource. This is always "tasks#tasks". +@property (copy) NSString *kind; + +// Token used to access the next page of this result. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksTasks.m.svn-base b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksTasks.m.svn-base new file mode 100644 index 0000000..fb518bf --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasksTasks.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLTasksTasks.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html +// Classes: +// GTLTasksTasks (0 custom class methods, 4 custom properties) + +#import "GTLTasksTasks.h" + +#import "GTLTasksTask.h" + +// ---------------------------------------------------------------------------- +// +// GTLTasksTasks +// + +@implementation GTLTasksTasks +@dynamic ETag, items, kind, nextPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLTasksTask class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"tasks#tasks"]; +} + +@end diff --git a/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasks_Sources.m.svn-base b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasks_Sources.m.svn-base new file mode 100644 index 0000000..ca95bd0 --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/.svn/text-base/GTLTasks_Sources.m.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLTasks_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html + +#import "GTLTasksConstants.m" + +#import "GTLTasksTask.m" +#import "GTLTasksTaskList.m" +#import "GTLTasksTaskLists.m" +#import "GTLTasksTasks.m" + +#import "GTLQueryTasks.m" +#import "GTLServiceTasks.m" diff --git a/GTL/Source/Services/Tasks/Generated/GTLQueryTasks.h b/GTL/Source/Services/Tasks/Generated/GTLQueryTasks.h new file mode 100644 index 0000000..a7a8b9d --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/GTLQueryTasks.h @@ -0,0 +1,255 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryTasks.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html +// Classes: +// GTLQueryTasks (14 custom class methods, 15 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLTasksTask; +@class GTLTasksTaskList; + +@interface GTLQueryTasks : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *completedMax; +@property (copy) NSString *completedMin; +@property (copy) NSString *dueMax; +@property (copy) NSString *dueMin; +@property (assign) long long maxResults; +@property (copy) NSString *pageToken; +@property (copy) NSString *parent; +@property (copy) NSString *previous; +@property (assign) BOOL showCompleted; +@property (assign) BOOL showDeleted; +@property (assign) BOOL showHidden; +@property (copy) NSString *task; +@property (copy) NSString *tasklist; +@property (copy) NSString *updatedMin; + +#pragma mark - +#pragma mark "tasklists" methods +// These create a GTLQueryTasks object. + +// Method: tasks.tasklists.delete +// Deletes the authenticated user's specified task list. +// Required: +// tasklist: Task list identifier. +// Authorization scope(s): +// kGTLAuthScopeTasks ++ (id)queryForTasklistsDeleteWithTasklist:(NSString *)tasklist; + +// Method: tasks.tasklists.get +// Returns the authenticated user's specified task list. +// Required: +// tasklist: Task list identifier. +// Authorization scope(s): +// kGTLAuthScopeTasks +// kGTLAuthScopeTasksReadonly +// Fetches a GTLTasksTaskList. ++ (id)queryForTasklistsGetWithTasklist:(NSString *)tasklist; + +// Method: tasks.tasklists.insert +// Creates a new task list and adds it to the authenticated user's task lists. +// Authorization scope(s): +// kGTLAuthScopeTasks +// Fetches a GTLTasksTaskList. ++ (id)queryForTasklistsInsertWithObject:(GTLTasksTaskList *)object; + +// Method: tasks.tasklists.list +// Returns all the authenticated user's task lists. +// Optional: +// maxResults: Maximum number of task lists returned on one page. Optional. +// The default is 100. +// pageToken: Token specifying the result page to return. Optional. +// Authorization scope(s): +// kGTLAuthScopeTasks +// kGTLAuthScopeTasksReadonly +// Fetches a GTLTasksTaskLists. ++ (id)queryForTasklistsList; + +// Method: tasks.tasklists.patch +// Updates the authenticated user's specified task list. This method supports +// patch semantics. +// Required: +// tasklist: Task list identifier. +// Authorization scope(s): +// kGTLAuthScopeTasks +// Fetches a GTLTasksTaskList. ++ (id)queryForTasklistsPatchWithObject:(GTLTasksTaskList *)object + tasklist:(NSString *)tasklist; + +// Method: tasks.tasklists.update +// Updates the authenticated user's specified task list. +// Required: +// tasklist: Task list identifier. +// Authorization scope(s): +// kGTLAuthScopeTasks +// Fetches a GTLTasksTaskList. ++ (id)queryForTasklistsUpdateWithObject:(GTLTasksTaskList *)object + tasklist:(NSString *)tasklist; + +#pragma mark - +#pragma mark "tasks" methods +// These create a GTLQueryTasks object. + +// Method: tasks.tasks.clear +// Clears all completed tasks from the specified task list. The affected tasks +// will be marked as 'hidden' and no longer be returned by default when +// retrieving all tasks for a task list. +// Required: +// tasklist: Task list identifier. +// Authorization scope(s): +// kGTLAuthScopeTasks ++ (id)queryForTasksClearWithTasklist:(NSString *)tasklist; + +// Method: tasks.tasks.delete +// Deletes the specified task from the task list. +// Required: +// tasklist: Task list identifier. +// task: Task identifier. +// Authorization scope(s): +// kGTLAuthScopeTasks ++ (id)queryForTasksDeleteWithTasklist:(NSString *)tasklist + task:(NSString *)task; + +// Method: tasks.tasks.get +// Returns the specified task. +// Required: +// tasklist: Task list identifier. +// task: Task identifier. +// Authorization scope(s): +// kGTLAuthScopeTasks +// kGTLAuthScopeTasksReadonly +// Fetches a GTLTasksTask. ++ (id)queryForTasksGetWithTasklist:(NSString *)tasklist + task:(NSString *)task; + +// Method: tasks.tasks.insert +// Creates a new task on the specified task list. +// Required: +// tasklist: Task list identifier. +// Optional: +// parent: Parent task identifier. If the task is created at the top level, +// this parameter is omitted. Optional. +// previous: Previous sibling task identifier. If the task is created at the +// first position among its siblings, this parameter is omitted. Optional. +// Authorization scope(s): +// kGTLAuthScopeTasks +// Fetches a GTLTasksTask. ++ (id)queryForTasksInsertWithObject:(GTLTasksTask *)object + tasklist:(NSString *)tasklist; + +// Method: tasks.tasks.list +// Returns all tasks in the specified task list. +// Required: +// tasklist: Task list identifier. +// Optional: +// completedMax: Upper bound for a task's completion date (as a RFC 3339 +// timestamp) to filter by. Optional. The default is not to filter by +// completion date. +// completedMin: Lower bound for a task's completion date (as a RFC 3339 +// timestamp) to filter by. Optional. The default is not to filter by +// completion date. +// dueMax: Upper bound for a task's due date (as a RFC 3339 timestamp) to +// filter by. Optional. The default is not to filter by due date. +// dueMin: Lower bound for a task's due date (as a RFC 3339 timestamp) to +// filter by. Optional. The default is not to filter by due date. +// maxResults: Maximum number of task lists returned on one page. Optional. +// The default is 100. +// pageToken: Token specifying the result page to return. Optional. +// showCompleted: Flag indicating whether completed tasks are returned in the +// result. Optional. The default is True. +// showDeleted: Flag indicating whether deleted tasks are returned in the +// result. Optional. The default is False. +// showHidden: Flag indicating whether hidden tasks are returned in the +// result. Optional. The default is False. +// updatedMin: Lower bound for a task's last modification time (as a RFC 3339 +// timestamp) to filter by. Optional. The default is not to filter by last +// modification time. +// Authorization scope(s): +// kGTLAuthScopeTasks +// kGTLAuthScopeTasksReadonly +// Fetches a GTLTasksTasks. ++ (id)queryForTasksListWithTasklist:(NSString *)tasklist; + +// Method: tasks.tasks.move +// Moves the specified task to another position in the task list. This can +// include putting it as a child task under a new parent and/or move it to a +// different position among its sibling tasks. +// Required: +// tasklist: Task list identifier. +// task: Task identifier. +// Optional: +// parent: New parent task identifier. If the task is moved to the top level, +// this parameter is omitted. Optional. +// previous: New previous sibling task identifier. If the task is moved to the +// first position among its siblings, this parameter is omitted. Optional. +// Authorization scope(s): +// kGTLAuthScopeTasks +// Fetches a GTLTasksTask. ++ (id)queryForTasksMoveWithTasklist:(NSString *)tasklist + task:(NSString *)task; + +// Method: tasks.tasks.patch +// Updates the specified task. This method supports patch semantics. +// Required: +// tasklist: Task list identifier. +// task: Task identifier. +// Authorization scope(s): +// kGTLAuthScopeTasks +// Fetches a GTLTasksTask. ++ (id)queryForTasksPatchWithObject:(GTLTasksTask *)object + tasklist:(NSString *)tasklist + task:(NSString *)task; + +// Method: tasks.tasks.update +// Updates the specified task. +// Required: +// tasklist: Task list identifier. +// task: Task identifier. +// Authorization scope(s): +// kGTLAuthScopeTasks +// Fetches a GTLTasksTask. ++ (id)queryForTasksUpdateWithObject:(GTLTasksTask *)object + tasklist:(NSString *)tasklist + task:(NSString *)task; + +@end diff --git a/GTL/Source/Services/Tasks/Generated/GTLQueryTasks.m b/GTL/Source/Services/Tasks/Generated/GTLQueryTasks.m new file mode 100644 index 0000000..9739d1b --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/GTLQueryTasks.m @@ -0,0 +1,204 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryTasks.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html +// Classes: +// GTLQueryTasks (14 custom class methods, 15 custom properties) + +#import "GTLQueryTasks.h" + +#import "GTLTasksTask.h" +#import "GTLTasksTaskList.h" +#import "GTLTasksTaskLists.h" +#import "GTLTasksTasks.h" + +@implementation GTLQueryTasks + +@dynamic completedMax, completedMin, dueMax, dueMin, fields, maxResults, + pageToken, parent, previous, showCompleted, showDeleted, showHidden, + task, tasklist, updatedMin; + +#pragma mark - +#pragma mark "tasklists" methods +// These create a GTLQueryTasks object. + ++ (id)queryForTasklistsDeleteWithTasklist:(NSString *)tasklist { + NSString *methodName = @"tasks.tasklists.delete"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.tasklist = tasklist; + return query; +} + ++ (id)queryForTasklistsGetWithTasklist:(NSString *)tasklist { + NSString *methodName = @"tasks.tasklists.get"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.tasklist = tasklist; + query.expectedObjectClass = [GTLTasksTaskList class]; + return query; +} + ++ (id)queryForTasklistsInsertWithObject:(GTLTasksTaskList *)object { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"tasks.tasklists.insert"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.expectedObjectClass = [GTLTasksTaskList class]; + return query; +} + ++ (id)queryForTasklistsList { + NSString *methodName = @"tasks.tasklists.list"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLTasksTaskLists class]; + return query; +} + ++ (id)queryForTasklistsPatchWithObject:(GTLTasksTaskList *)object + tasklist:(NSString *)tasklist { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"tasks.tasklists.patch"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.tasklist = tasklist; + query.expectedObjectClass = [GTLTasksTaskList class]; + return query; +} + ++ (id)queryForTasklistsUpdateWithObject:(GTLTasksTaskList *)object + tasklist:(NSString *)tasklist { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"tasks.tasklists.update"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.tasklist = tasklist; + query.expectedObjectClass = [GTLTasksTaskList class]; + return query; +} + +#pragma mark - +#pragma mark "tasks" methods +// These create a GTLQueryTasks object. + ++ (id)queryForTasksClearWithTasklist:(NSString *)tasklist { + NSString *methodName = @"tasks.tasks.clear"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.tasklist = tasklist; + return query; +} + ++ (id)queryForTasksDeleteWithTasklist:(NSString *)tasklist + task:(NSString *)task { + NSString *methodName = @"tasks.tasks.delete"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.tasklist = tasklist; + query.task = task; + return query; +} + ++ (id)queryForTasksGetWithTasklist:(NSString *)tasklist + task:(NSString *)task { + NSString *methodName = @"tasks.tasks.get"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.tasklist = tasklist; + query.task = task; + query.expectedObjectClass = [GTLTasksTask class]; + return query; +} + ++ (id)queryForTasksInsertWithObject:(GTLTasksTask *)object + tasklist:(NSString *)tasklist { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"tasks.tasks.insert"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.tasklist = tasklist; + query.expectedObjectClass = [GTLTasksTask class]; + return query; +} + ++ (id)queryForTasksListWithTasklist:(NSString *)tasklist { + NSString *methodName = @"tasks.tasks.list"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.tasklist = tasklist; + query.expectedObjectClass = [GTLTasksTasks class]; + return query; +} + ++ (id)queryForTasksMoveWithTasklist:(NSString *)tasklist + task:(NSString *)task { + NSString *methodName = @"tasks.tasks.move"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.tasklist = tasklist; + query.task = task; + query.expectedObjectClass = [GTLTasksTask class]; + return query; +} + ++ (id)queryForTasksPatchWithObject:(GTLTasksTask *)object + tasklist:(NSString *)tasklist + task:(NSString *)task { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"tasks.tasks.patch"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.tasklist = tasklist; + query.task = task; + query.expectedObjectClass = [GTLTasksTask class]; + return query; +} + ++ (id)queryForTasksUpdateWithObject:(GTLTasksTask *)object + tasklist:(NSString *)tasklist + task:(NSString *)task { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"tasks.tasks.update"; + GTLQueryTasks *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.tasklist = tasklist; + query.task = task; + query.expectedObjectClass = [GTLTasksTask class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Tasks/Generated/GTLServiceTasks.h b/GTL/Source/Services/Tasks/Generated/GTLServiceTasks.h new file mode 100644 index 0000000..8c0dbdf --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/GTLServiceTasks.h @@ -0,0 +1,61 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceTasks.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html +// Classes: +// GTLServiceTasks (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceTasks : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryTasks.h. The query can the be sent with GTLService's execute methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Tasks/Generated/GTLServiceTasks.m b/GTL/Source/Services/Tasks/Generated/GTLServiceTasks.m new file mode 100644 index 0000000..49b3fd4 --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/GTLServiceTasks.m @@ -0,0 +1,64 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceTasks.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html +// Classes: +// GTLServiceTasks (0 custom class methods, 0 custom properties) + +#import "GTLTasks.h" + +@implementation GTLServiceTasks + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryTasks class], + [GTLTasksTask class], + [GTLTasksTaskList class], + [GTLTasksTaskLists class], + [GTLTasksTasks class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v1"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Tasks/Generated/GTLTasks.h b/GTL/Source/Services/Tasks/Generated/GTLTasks.h new file mode 100644 index 0000000..cd394f4 --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/GTLTasks.h @@ -0,0 +1,37 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLTasks.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html + +#import "GTLTasksConstants.h" + +#import "GTLTasksTask.h" +#import "GTLTasksTaskList.h" +#import "GTLTasksTaskLists.h" +#import "GTLTasksTasks.h" + +#import "GTLQueryTasks.h" +#import "GTLServiceTasks.h" diff --git a/GTL/Source/Services/Tasks/Generated/GTLTasksConstants.h b/GTL/Source/Services/Tasks/Generated/GTLTasksConstants.h new file mode 100644 index 0000000..5b4f675 --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/GTLTasksConstants.h @@ -0,0 +1,41 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLTasksConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// Manage your tasks +GTL_EXTERN NSString * const kGTLAuthScopeTasks; // "https://www.googleapis.com/auth/tasks" +// View your tasks +GTL_EXTERN NSString * const kGTLAuthScopeTasksReadonly; // "https://www.googleapis.com/auth/tasks.readonly" diff --git a/GTL/Source/Services/Tasks/Generated/GTLTasksConstants.m b/GTL/Source/Services/Tasks/Generated/GTLTasksConstants.m new file mode 100644 index 0000000..a7e5f31 --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/GTLTasksConstants.m @@ -0,0 +1,33 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLTasksConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html + +#import "GTLTasksConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeTasks = @"https://www.googleapis.com/auth/tasks"; +NSString * const kGTLAuthScopeTasksReadonly = @"https://www.googleapis.com/auth/tasks.readonly"; diff --git a/GTL/Source/Services/Tasks/Generated/GTLTasksTask.h b/GTL/Source/Services/Tasks/Generated/GTLTasksTask.h new file mode 100644 index 0000000..39c7e0b --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/GTLTasksTask.h @@ -0,0 +1,123 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLTasksTask.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html +// Classes: +// GTLTasksTask (0 custom class methods, 15 custom properties) +// GTLTasksTaskLinksItem (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLTasksTaskLinksItem; + +// ---------------------------------------------------------------------------- +// +// GTLTasksTask +// + +@interface GTLTasksTask : GTLObject + +// Completion date of the task (as a RFC 3339 timestamp). This field is omitted +// if the task has not been completed. +@property (retain) GTLDateTime *completed; + +// Flag indicating whether the task has been deleted. The default if False. +@property (retain) NSNumber *deleted; // boolValue + +// Due date of the task (as a RFC 3339 timestamp). Optional. +@property (retain) GTLDateTime *due; + +// ETag of the resource. +@property (copy) NSString *ETag; + +// Flag indicating whether the task is hidden. This is the case if the task had +// been marked completed when the task list was last cleared. The default is +// False. This field is read-only. +@property (retain) NSNumber *hidden; // boolValue + +// Task identifier. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Type of the resource. This is always "tasks#task". +@property (copy) NSString *kind; + +// Collection of links. This collection is read-only. +@property (retain) NSArray *links; // of GTLTasksTaskLinksItem + +// Notes describing the task. Optional. +@property (copy) NSString *notes; + +// Parent task identifier. This field is omitted if it is a top-level task. This +// field is read-only. Use the "move" method to move the task under a different +// parent or to the top level. +@property (copy) NSString *parent; + +// String indicating the position of the task among its sibling tasks under the +// same parent task or at the top level. If this string is greater than another +// task's corresponding position string according to lexicographical ordering, +// the task is positioned after the other task under the same parent task (or at +// the top level). This field is read-only. Use the "move" method to move the +// task to another position. +@property (copy) NSString *position; + +// URL pointing to this task. Used to retrieve, update, or delete this task. +@property (copy) NSString *selfLink; + +// Status of the task. This is either "needsAction" or "completed". +@property (copy) NSString *status; + +// Title of the task. +@property (copy) NSString *title; + +// Last modification time of the task (as a RFC 3339 timestamp). +@property (retain) GTLDateTime *updated; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLTasksTaskLinksItem +// + +@interface GTLTasksTaskLinksItem : GTLObject + +// The description. In HTML speak: Everything between and . +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The URL. +@property (copy) NSString *link; + +// Type of the link, e.g. "email". +@property (copy) NSString *type; + +@end diff --git a/GTL/Source/Services/Tasks/Generated/GTLTasksTask.m b/GTL/Source/Services/Tasks/Generated/GTLTasksTask.m new file mode 100644 index 0000000..976fb24 --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/GTLTasksTask.m @@ -0,0 +1,81 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLTasksTask.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html +// Classes: +// GTLTasksTask (0 custom class methods, 15 custom properties) +// GTLTasksTaskLinksItem (0 custom class methods, 3 custom properties) + +#import "GTLTasksTask.h" + +// ---------------------------------------------------------------------------- +// +// GTLTasksTask +// + +@implementation GTLTasksTask +@dynamic completed, deleted, due, ETag, hidden, identifier, kind, links, notes, + parent, position, selfLink, status, title, updated; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLTasksTaskLinksItem class] + forKey:@"links"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"tasks#task"]; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLTasksTaskLinksItem +// + +@implementation GTLTasksTaskLinksItem +@dynamic descriptionProperty, link, type; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Tasks/Generated/GTLTasksTaskList.h b/GTL/Source/Services/Tasks/Generated/GTLTasksTaskList.h new file mode 100644 index 0000000..b790a50 --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/GTLTasksTaskList.h @@ -0,0 +1,64 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLTasksTaskList.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html +// Classes: +// GTLTasksTaskList (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLTasksTaskList +// + +@interface GTLTasksTaskList : GTLObject + +// ETag of the resource. +@property (copy) NSString *ETag; + +// Task list identifier. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// Type of the resource. This is always "tasks#taskList". +@property (copy) NSString *kind; + +// URL pointing to this task list. Used to retrieve, update, or delete this task +// list. +@property (copy) NSString *selfLink; + +// Title of the task list. +@property (copy) NSString *title; + +// Last modification time of the task list (as a RFC 3339 timestamp). +@property (retain) GTLDateTime *updated; + +@end diff --git a/GTL/Source/Services/Tasks/Generated/GTLTasksTaskList.m b/GTL/Source/Services/Tasks/Generated/GTLTasksTaskList.m new file mode 100644 index 0000000..63b0ce7 --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/GTLTasksTaskList.m @@ -0,0 +1,54 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLTasksTaskList.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html +// Classes: +// GTLTasksTaskList (0 custom class methods, 6 custom properties) + +#import "GTLTasksTaskList.h" + +// ---------------------------------------------------------------------------- +// +// GTLTasksTaskList +// + +@implementation GTLTasksTaskList +@dynamic ETag, identifier, kind, selfLink, title, updated; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"tasks#taskList"]; +} + +@end diff --git a/GTL/Source/Services/Tasks/Generated/GTLTasksTaskLists.h b/GTL/Source/Services/Tasks/Generated/GTLTasksTaskLists.h new file mode 100644 index 0000000..aa8e907 --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/GTLTasksTaskLists.h @@ -0,0 +1,61 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLTasksTaskLists.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html +// Classes: +// GTLTasksTaskLists (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLTasksTaskList; + +// ---------------------------------------------------------------------------- +// +// GTLTasksTaskLists +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLTasksTaskLists : GTLCollectionObject + +// ETag of the resource. +@property (copy) NSString *ETag; + +// Collection of task lists. +@property (retain) NSArray *items; // of GTLTasksTaskList + +// Type of the resource. This is always "tasks#taskLists". +@property (copy) NSString *kind; + +// Token that can be used to request the next page of this result. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/Tasks/Generated/GTLTasksTaskLists.m b/GTL/Source/Services/Tasks/Generated/GTLTasksTaskLists.m new file mode 100644 index 0000000..797cfbd --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/GTLTasksTaskLists.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLTasksTaskLists.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html +// Classes: +// GTLTasksTaskLists (0 custom class methods, 4 custom properties) + +#import "GTLTasksTaskLists.h" + +#import "GTLTasksTaskList.h" + +// ---------------------------------------------------------------------------- +// +// GTLTasksTaskLists +// + +@implementation GTLTasksTaskLists +@dynamic ETag, items, kind, nextPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLTasksTaskList class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"tasks#taskLists"]; +} + +@end diff --git a/GTL/Source/Services/Tasks/Generated/GTLTasksTasks.h b/GTL/Source/Services/Tasks/Generated/GTLTasksTasks.h new file mode 100644 index 0000000..1ef5556 --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/GTLTasksTasks.h @@ -0,0 +1,61 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLTasksTasks.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html +// Classes: +// GTLTasksTasks (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLTasksTask; + +// ---------------------------------------------------------------------------- +// +// GTLTasksTasks +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLTasksTasks : GTLCollectionObject + +// ETag of the resource. +@property (copy) NSString *ETag; + +// Collection of tasks. +@property (retain) NSArray *items; // of GTLTasksTask + +// Type of the resource. This is always "tasks#tasks". +@property (copy) NSString *kind; + +// Token used to access the next page of this result. +@property (copy) NSString *nextPageToken; + +@end diff --git a/GTL/Source/Services/Tasks/Generated/GTLTasksTasks.m b/GTL/Source/Services/Tasks/Generated/GTLTasksTasks.m new file mode 100644 index 0000000..fb518bf --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/GTLTasksTasks.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLTasksTasks.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html +// Classes: +// GTLTasksTasks (0 custom class methods, 4 custom properties) + +#import "GTLTasksTasks.h" + +#import "GTLTasksTask.h" + +// ---------------------------------------------------------------------------- +// +// GTLTasksTasks +// + +@implementation GTLTasksTasks +@dynamic ETag, items, kind, nextPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLTasksTask class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"tasks#tasks"]; +} + +@end diff --git a/GTL/Source/Services/Tasks/Generated/GTLTasks_Sources.m b/GTL/Source/Services/Tasks/Generated/GTLTasks_Sources.m new file mode 100644 index 0000000..ca95bd0 --- /dev/null +++ b/GTL/Source/Services/Tasks/Generated/GTLTasks_Sources.m @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLTasks_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// Tasks API (tasks/v1) +// Description: +// Lets you manage your tasks and task lists. +// Documentation: +// http://code.google.com/apis/tasks/v1/using.html + +#import "GTLTasksConstants.m" + +#import "GTLTasksTask.m" +#import "GTLTasksTaskList.m" +#import "GTLTasksTaskLists.m" +#import "GTLTasksTasks.m" + +#import "GTLQueryTasks.m" +#import "GTLServiceTasks.m" diff --git a/GTL/Source/Services/Urlshortener/.svn/all-wcprops b/GTL/Source/Services/Urlshortener/.svn/all-wcprops new file mode 100644 index 0000000..bb64c53 --- /dev/null +++ b/GTL/Source/Services/Urlshortener/.svn/all-wcprops @@ -0,0 +1,5 @@ +K 25 +svn:wc:ra_dav:version-url +V 52 +/svn/!svn/ver/225/trunk/Source/Services/Urlshortener +END diff --git a/GTL/Source/Services/Urlshortener/.svn/entries b/GTL/Source/Services/Urlshortener/.svn/entries new file mode 100644 index 0000000..348ef88 --- /dev/null +++ b/GTL/Source/Services/Urlshortener/.svn/entries @@ -0,0 +1,31 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Urlshortener +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +Generated +dir + diff --git a/GTL/Source/Services/Urlshortener/Generated/.svn/all-wcprops b/GTL/Source/Services/Urlshortener/Generated/.svn/all-wcprops new file mode 100644 index 0000000..cdaf9f6 --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/.svn/all-wcprops @@ -0,0 +1,113 @@ +K 25 +svn:wc:ra_dav:version-url +V 62 +/svn/!svn/ver/225/trunk/Source/Services/Urlshortener/Generated +END +GTLServiceUrlshortener.m +K 25 +svn:wc:ra_dav:version-url +V 87 +/svn/!svn/ver/131/trunk/Source/Services/Urlshortener/Generated/GTLServiceUrlshortener.m +END +GTLQueryUrlshortener.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/!svn/ver/124/trunk/Source/Services/Urlshortener/Generated/GTLQueryUrlshortener.h +END +GTLUrlshortenerAnalyticsSummary.h +K 25 +svn:wc:ra_dav:version-url +V 95 +/svn/!svn/ver/25/trunk/Source/Services/Urlshortener/Generated/GTLUrlshortenerAnalyticsSummary.h +END +GTLUrlshortenerAnalyticsSnapshot.h +K 25 +svn:wc:ra_dav:version-url +V 96 +/svn/!svn/ver/25/trunk/Source/Services/Urlshortener/Generated/GTLUrlshortenerAnalyticsSnapshot.h +END +GTLUrlshortenerUrl.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/25/trunk/Source/Services/Urlshortener/Generated/GTLUrlshortenerUrl.m +END +GTLUrlshortenerAnalyticsSummary.m +K 25 +svn:wc:ra_dav:version-url +V 95 +/svn/!svn/ver/25/trunk/Source/Services/Urlshortener/Generated/GTLUrlshortenerAnalyticsSummary.m +END +GTLQueryUrlshortener.m +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/!svn/ver/25/trunk/Source/Services/Urlshortener/Generated/GTLQueryUrlshortener.m +END +GTLUrlshortenerConstants.h +K 25 +svn:wc:ra_dav:version-url +V 88 +/svn/!svn/ver/25/trunk/Source/Services/Urlshortener/Generated/GTLUrlshortenerConstants.h +END +GTLUrlshortenerAnalyticsSnapshot.m +K 25 +svn:wc:ra_dav:version-url +V 96 +/svn/!svn/ver/25/trunk/Source/Services/Urlshortener/Generated/GTLUrlshortenerAnalyticsSnapshot.m +END +GTLUrlshortener.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/25/trunk/Source/Services/Urlshortener/Generated/GTLUrlshortener.h +END +GTLUrlshortenerStringCount.h +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/124/trunk/Source/Services/Urlshortener/Generated/GTLUrlshortenerStringCount.h +END +GTLUrlshortenerConstants.m +K 25 +svn:wc:ra_dav:version-url +V 88 +/svn/!svn/ver/25/trunk/Source/Services/Urlshortener/Generated/GTLUrlshortenerConstants.m +END +GTLUrlshortenerStringCount.m +K 25 +svn:wc:ra_dav:version-url +V 90 +/svn/!svn/ver/25/trunk/Source/Services/Urlshortener/Generated/GTLUrlshortenerStringCount.m +END +GTLUrlshortenerUrlHistory.h +K 25 +svn:wc:ra_dav:version-url +V 90 +/svn/!svn/ver/124/trunk/Source/Services/Urlshortener/Generated/GTLUrlshortenerUrlHistory.h +END +GTLUrlshortener_Sources.m +K 25 +svn:wc:ra_dav:version-url +V 88 +/svn/!svn/ver/225/trunk/Source/Services/Urlshortener/Generated/GTLUrlshortener_Sources.m +END +GTLUrlshortenerUrlHistory.m +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/25/trunk/Source/Services/Urlshortener/Generated/GTLUrlshortenerUrlHistory.m +END +GTLServiceUrlshortener.h +K 25 +svn:wc:ra_dav:version-url +V 86 +/svn/!svn/ver/28/trunk/Source/Services/Urlshortener/Generated/GTLServiceUrlshortener.h +END +GTLUrlshortenerUrl.h +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/124/trunk/Source/Services/Urlshortener/Generated/GTLUrlshortenerUrl.h +END diff --git a/GTL/Source/Services/Urlshortener/Generated/.svn/entries b/GTL/Source/Services/Urlshortener/Generated/.svn/entries new file mode 100644 index 0000000..5c52927 --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/.svn/entries @@ -0,0 +1,640 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/Urlshortener/Generated +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +GTLServiceUrlshortener.m +file + + + + +2012-12-09T08:42:31.000000Z +7f2acbb2cf1c9bee556c3e6488ccc417 +2011-12-16T21:13:04.166932Z +131 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2176 + +GTLQueryUrlshortener.h +file + + + + +2012-12-09T08:42:31.000000Z +45d064f3d63b3259943bd1d1ab1a0d29 +2011-12-12T22:00:16.502331Z +124 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3007 + +GTLUrlshortenerAnalyticsSummary.h +file + + + + +2012-12-09T08:42:31.000000Z +2bfad0f2f64b4572072829e42df053d5 +2011-08-17T00:31:36.392047Z +25 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1925 + +GTLUrlshortenerAnalyticsSnapshot.h +file + + + + +2012-12-09T08:42:31.000000Z +d55232adc4d117a61c1ec5de8f6902d6 +2011-08-17T00:31:36.392047Z +25 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2461 + +GTLUrlshortenerUrl.m +file + + + + +2012-12-09T08:42:31.000000Z +2b3b9b23c41b8ea291a647e994745b12 +2011-08-17T00:31:36.392047Z +25 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1625 + +GTLUrlshortenerAnalyticsSummary.m +file + + + + +2012-12-09T08:42:31.000000Z +42a8fd17827f4c880aa57be71bda215b +2011-08-17T00:31:36.392047Z +25 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1417 + +GTLQueryUrlshortener.m +file + + + + +2012-12-09T08:42:31.000000Z +bcb74608aceafd7db9d7d82667c2148c +2011-08-17T00:31:36.392047Z +25 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2495 + +GTLUrlshortenerConstants.h +file + + + + +2012-12-09T08:42:31.000000Z +65ce2b634ff6d514d2a498bb4f70c0d1 +2011-08-17T00:31:36.392047Z +25 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1579 + +GTLUrlshortenerAnalyticsSnapshot.m +file + + + + +2012-12-09T08:42:31.000000Z +80316c9d87e2ae39aad56a6486604128 +2011-08-17T00:31:36.392047Z +25 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1829 + +GTLUrlshortener.h +file + + + + +2012-12-09T08:42:31.000000Z +38d06ec5a2151ac88be419a55ef08f66 +2011-08-17T00:31:36.392047Z +25 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1296 + +GTLUrlshortenerStringCount.h +file + + + + +2012-12-09T08:42:31.000000Z +2629343d9865ca863ed2b614e78c6406 +2011-12-12T22:00:16.502331Z +124 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1679 + +GTLUrlshortenerConstants.m +file + + + + +2012-12-09T08:42:31.000000Z +141ad34c1067860b6d394861d7bf871b +2011-08-17T00:31:36.392047Z +25 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1422 + +GTLUrlshortenerStringCount.m +file + + + + +2012-12-09T08:42:31.000000Z +87cb5fd509b4a3a994ff194c70bc783e +2011-08-17T00:31:36.392047Z +25 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1509 + +GTLUrlshortenerUrlHistory.h +file + + + + +2012-12-09T08:42:31.000000Z +b767b38873f6ac7767f6cf29b6bd2cad +2011-12-12T22:00:16.502331Z +124 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2145 + +GTLUrlshortener_Sources.m +file + + + + +2012-12-09T08:42:31.000000Z +48c781ca8acd27a5586306724b72f1aa +2012-10-10T23:37:01.052376Z +225 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1415 + +GTLUrlshortenerUrlHistory.m +file + + + + +2012-12-09T08:42:31.000000Z +929dedfef6ed2fb1c690d2ba5fc563ff +2011-08-17T00:31:36.392047Z +25 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1672 + +GTLServiceUrlshortener.h +file + + + + +2012-12-09T08:42:31.000000Z +a791e611983e57e99436018cce0e2594 +2011-08-23T19:12:40.725509Z +28 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2152 + +GTLUrlshortenerUrl.h +file + + + + +2012-12-09T08:42:31.000000Z +251e5158508a4b330e467c8e19f8d246 +2011-12-12T22:00:16.502331Z +124 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2314 + diff --git a/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLQueryUrlshortener.h.svn-base b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLQueryUrlshortener.h.svn-base new file mode 100644 index 0000000..5acf1f9 --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLQueryUrlshortener.h.svn-base @@ -0,0 +1,93 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryUrlshortener.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLQueryUrlshortener (3 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLUrlshortenerUrl; + +@interface GTLQueryUrlshortener : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *projection; +@property (copy) NSString *shortUrl; +@property (copy) NSString *startToken; + +#pragma mark - +#pragma mark "url" methods +// These create a GTLQueryUrlshortener object. + +// Method: urlshortener.url.get +// Expands a short URL or gets creation time and analytics. +// Required: +// shortUrl: The short URL, including the protocol. +// Optional: +// projection: Additional information to return. +// kGTLUrlshortenerProjectionAnalyticsClicks: Returns only click counts. +// kGTLUrlshortenerProjectionAnalyticsTopStrings: Returns only top string +// counts. +// kGTLUrlshortenerProjectionFull: Returns the creation timestamp and all +// available analytics. +// Fetches a GTLUrlshortenerUrl. ++ (id)queryForUrlGetWithShortUrl:(NSString *)shortUrl; + +// Method: urlshortener.url.insert +// Creates a new short URL. +// Authorization scope(s): +// kGTLAuthScopeUrlshortener +// Fetches a GTLUrlshortenerUrl. ++ (id)queryForUrlInsertWithObject:(GTLUrlshortenerUrl *)object; + +// Method: urlshortener.url.list +// Retrieves a list of URLs shortened by a user. +// Optional: +// projection: Additional information to return. +// kGTLUrlshortenerProjectionAnalyticsClicks: Returns short URL click +// counts. +// kGTLUrlshortenerProjectionFull: Returns short URL click counts. +// startToken: Token for requesting successive pages of results. +// Authorization scope(s): +// kGTLAuthScopeUrlshortener +// Fetches a GTLUrlshortenerUrlHistory. ++ (id)queryForUrlList; + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLQueryUrlshortener.m.svn-base b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLQueryUrlshortener.m.svn-base new file mode 100644 index 0000000..400a4ad --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLQueryUrlshortener.m.svn-base @@ -0,0 +1,78 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryUrlshortener.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLQueryUrlshortener (3 custom class methods, 4 custom properties) + +#import "GTLQueryUrlshortener.h" + +#import "GTLUrlshortenerUrl.h" +#import "GTLUrlshortenerUrlHistory.h" + +@implementation GTLQueryUrlshortener + +@dynamic fields, projection, shortUrl, startToken; + ++ (NSDictionary *)parameterNameMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"start-token" + forKey:@"startToken"]; + return map; +} + +#pragma mark - +#pragma mark "url" methods +// These create a GTLQueryUrlshortener object. + ++ (id)queryForUrlGetWithShortUrl:(NSString *)shortUrl { + NSString *methodName = @"urlshortener.url.get"; + GTLQueryUrlshortener *query = [self queryWithMethodName:methodName]; + query.shortUrl = shortUrl; + query.expectedObjectClass = [GTLUrlshortenerUrl class]; + return query; +} + ++ (id)queryForUrlInsertWithObject:(GTLUrlshortenerUrl *)object { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"urlshortener.url.insert"; + GTLQueryUrlshortener *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.expectedObjectClass = [GTLUrlshortenerUrl class]; + return query; +} + ++ (id)queryForUrlList { + NSString *methodName = @"urlshortener.url.list"; + GTLQueryUrlshortener *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLUrlshortenerUrlHistory class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLServiceUrlshortener.h.svn-base b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLServiceUrlshortener.h.svn-base new file mode 100644 index 0000000..d862393 --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLServiceUrlshortener.h.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceUrlshortener.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLServiceUrlshortener (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceUrlshortener : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryUrlshortener.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLServiceUrlshortener.m.svn-base b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLServiceUrlshortener.m.svn-base new file mode 100644 index 0000000..a02e80b --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLServiceUrlshortener.m.svn-base @@ -0,0 +1,65 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceUrlshortener.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLServiceUrlshortener (0 custom class methods, 0 custom properties) + +#import "GTLUrlshortener.h" + +@implementation GTLServiceUrlshortener + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryUrlshortener class], + [GTLUrlshortenerAnalyticsSnapshot class], + [GTLUrlshortenerAnalyticsSummary class], + [GTLUrlshortenerStringCount class], + [GTLUrlshortenerUrl class], + [GTLUrlshortenerUrlHistory class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v1"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortener.h.svn-base b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortener.h.svn-base new file mode 100644 index 0000000..d3d314c --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortener.h.svn-base @@ -0,0 +1,38 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortener.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html + +#import "GTLUrlshortenerConstants.h" + +#import "GTLUrlshortenerAnalyticsSnapshot.h" +#import "GTLUrlshortenerAnalyticsSummary.h" +#import "GTLUrlshortenerStringCount.h" +#import "GTLUrlshortenerUrl.h" +#import "GTLUrlshortenerUrlHistory.h" + +#import "GTLQueryUrlshortener.h" +#import "GTLServiceUrlshortener.h" diff --git a/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerAnalyticsSnapshot.h.svn-base b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerAnalyticsSnapshot.h.svn-base new file mode 100644 index 0000000..c1e5956 --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerAnalyticsSnapshot.h.svn-base @@ -0,0 +1,68 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortenerAnalyticsSnapshot.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLUrlshortenerAnalyticsSnapshot (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLUrlshortenerStringCount; + +// ---------------------------------------------------------------------------- +// +// GTLUrlshortenerAnalyticsSnapshot +// + +@interface GTLUrlshortenerAnalyticsSnapshot : GTLObject + +// Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only +// present if this data is available. +@property (retain) NSArray *browsers; // of GTLUrlshortenerStringCount + +// Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by +// (descending) click counts. Only present if this data is available. +@property (retain) NSArray *countries; // of GTLUrlshortenerStringCount + +// Number of clicks on all goo.gl short URLs pointing to this long URL. +@property (retain) NSNumber *longUrlClicks; // longLongValue + +// Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. +// Only present if this data is available. +@property (retain) NSArray *platforms; // of GTLUrlshortenerStringCount + +// Top referring hosts, e.g. "www.google.com"; sorted by (descending) click +// counts. Only present if this data is available. +@property (retain) NSArray *referrers; // of GTLUrlshortenerStringCount + +// Number of clicks on this short URL. +@property (retain) NSNumber *shortUrlClicks; // longLongValue + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerAnalyticsSnapshot.m.svn-base b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerAnalyticsSnapshot.m.svn-base new file mode 100644 index 0000000..3166452 --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerAnalyticsSnapshot.m.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortenerAnalyticsSnapshot.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLUrlshortenerAnalyticsSnapshot (0 custom class methods, 6 custom properties) + +#import "GTLUrlshortenerAnalyticsSnapshot.h" + +#import "GTLUrlshortenerStringCount.h" + +// ---------------------------------------------------------------------------- +// +// GTLUrlshortenerAnalyticsSnapshot +// + +@implementation GTLUrlshortenerAnalyticsSnapshot +@dynamic browsers, countries, longUrlClicks, platforms, referrers, + shortUrlClicks; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLUrlshortenerStringCount class], @"browsers", + [GTLUrlshortenerStringCount class], @"countries", + [GTLUrlshortenerStringCount class], @"platforms", + [GTLUrlshortenerStringCount class], @"referrers", + nil]; + return map; +} + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerAnalyticsSummary.h.svn-base b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerAnalyticsSummary.h.svn-base new file mode 100644 index 0000000..80c03b4 --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerAnalyticsSummary.h.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortenerAnalyticsSummary.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLUrlshortenerAnalyticsSummary (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLUrlshortenerAnalyticsSnapshot; + +// ---------------------------------------------------------------------------- +// +// GTLUrlshortenerAnalyticsSummary +// + +@interface GTLUrlshortenerAnalyticsSummary : GTLObject + +// Click analytics over all time. +@property (retain) GTLUrlshortenerAnalyticsSnapshot *allTime; + +// Click analytics over the last day. +@property (retain) GTLUrlshortenerAnalyticsSnapshot *day; + +// Click analytics over the last month. +@property (retain) GTLUrlshortenerAnalyticsSnapshot *month; + +// Click analytics over the last two hours. +@property (retain) GTLUrlshortenerAnalyticsSnapshot *twoHours; + +// Click analytics over the last week. +@property (retain) GTLUrlshortenerAnalyticsSnapshot *week; + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerAnalyticsSummary.m.svn-base b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerAnalyticsSummary.m.svn-base new file mode 100644 index 0000000..15c83a9 --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerAnalyticsSummary.m.svn-base @@ -0,0 +1,42 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortenerAnalyticsSummary.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLUrlshortenerAnalyticsSummary (0 custom class methods, 5 custom properties) + +#import "GTLUrlshortenerAnalyticsSummary.h" + +#import "GTLUrlshortenerAnalyticsSnapshot.h" + +// ---------------------------------------------------------------------------- +// +// GTLUrlshortenerAnalyticsSummary +// + +@implementation GTLUrlshortenerAnalyticsSummary +@dynamic allTime, day, month, twoHours, week; +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerConstants.h.svn-base b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerConstants.h.svn-base new file mode 100644 index 0000000..7e657cb --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerConstants.h.svn-base @@ -0,0 +1,44 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortenerConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// Manage your goo.gl short URLs +GTL_EXTERN NSString * const kGTLAuthScopeUrlshortener; // "https://www.googleapis.com/auth/urlshortener" + +// Projection +GTL_EXTERN NSString * const kGTLUrlshortenerProjectionAnalyticsClicks; // "ANALYTICS_CLICKS" +GTL_EXTERN NSString * const kGTLUrlshortenerProjectionAnalyticsTopStrings; // "ANALYTICS_TOP_STRINGS" +GTL_EXTERN NSString * const kGTLUrlshortenerProjectionFull; // "FULL" diff --git a/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerConstants.m.svn-base b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerConstants.m.svn-base new file mode 100644 index 0000000..3a76fca --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerConstants.m.svn-base @@ -0,0 +1,37 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortenerConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html + +#import "GTLUrlshortenerConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeUrlshortener = @"https://www.googleapis.com/auth/urlshortener"; + +// Projection +NSString * const kGTLUrlshortenerProjectionAnalyticsClicks = @"ANALYTICS_CLICKS"; +NSString * const kGTLUrlshortenerProjectionAnalyticsTopStrings = @"ANALYTICS_TOP_STRINGS"; +NSString * const kGTLUrlshortenerProjectionFull = @"FULL"; diff --git a/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerStringCount.h.svn-base b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerStringCount.h.svn-base new file mode 100644 index 0000000..ae94cc9 --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerStringCount.h.svn-base @@ -0,0 +1,52 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortenerStringCount.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLUrlshortenerStringCount (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLUrlshortenerStringCount +// + +@interface GTLUrlshortenerStringCount : GTLObject + +// Number of clicks for this top entry, e.g. for this particular country or +// browser. +@property (retain) NSNumber *count; // longLongValue + +// Label assigned to this top entry, e.g. "US" or "Chrome". +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerStringCount.m.svn-base b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerStringCount.m.svn-base new file mode 100644 index 0000000..e1f4b5d --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerStringCount.m.svn-base @@ -0,0 +1,48 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortenerStringCount.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLUrlshortenerStringCount (0 custom class methods, 2 custom properties) + +#import "GTLUrlshortenerStringCount.h" + +// ---------------------------------------------------------------------------- +// +// GTLUrlshortenerStringCount +// + +@implementation GTLUrlshortenerStringCount +@dynamic count, identifier; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerUrl.h.svn-base b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerUrl.h.svn-base new file mode 100644 index 0000000..5eefdac --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerUrl.h.svn-base @@ -0,0 +1,70 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortenerUrl.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLUrlshortenerUrl (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLUrlshortenerAnalyticsSummary; + +// ---------------------------------------------------------------------------- +// +// GTLUrlshortenerUrl +// + +@interface GTLUrlshortenerUrl : GTLObject + +// A summary of the click analytics for the short and long URL. Might not be +// present if not requested or currently unavailable. +@property (retain) GTLUrlshortenerAnalyticsSummary *analytics; + +// Time the short URL was created; ISO 8601 representation using the +// yyyy-MM-dd'T'HH:mm:ss.SSSZZ format, e.g. "2010-10-14T19:01:24.944+00:00". +@property (copy) NSString *created; + +// Short URL, e.g. "http://goo.gl/l6MS". +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The fixed string "urlshortener#url". +@property (copy) NSString *kind; + +// Long URL, e.g. "http://www.google.com/". Might not be present if the status +// is "REMOVED". +@property (copy) NSString *longUrl; + +// Status of the target URL. Possible values: "OK", "MALWARE", "PHISHING", or +// "REMOVED". A URL might be marked "REMOVED" if it was flagged as spam, for +// example. +@property (copy) NSString *status; + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerUrl.m.svn-base b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerUrl.m.svn-base new file mode 100644 index 0000000..219f45b --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerUrl.m.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortenerUrl.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLUrlshortenerUrl (0 custom class methods, 6 custom properties) + +#import "GTLUrlshortenerUrl.h" + +#import "GTLUrlshortenerAnalyticsSummary.h" + +// ---------------------------------------------------------------------------- +// +// GTLUrlshortenerUrl +// + +@implementation GTLUrlshortenerUrl +@dynamic analytics, created, identifier, kind, longUrl, status; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"urlshortener#url"]; +} + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerUrlHistory.h.svn-base b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerUrlHistory.h.svn-base new file mode 100644 index 0000000..4b22fe0 --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerUrlHistory.h.svn-base @@ -0,0 +1,65 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortenerUrlHistory.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLUrlshortenerUrlHistory (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLUrlshortenerUrl; + +// ---------------------------------------------------------------------------- +// +// GTLUrlshortenerUrlHistory +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLUrlshortenerUrlHistory : GTLCollectionObject + +// A list of URL resources. +@property (retain) NSArray *items; // of GTLUrlshortenerUrl + +// Number of items returned with each full "page" of results. Note that the last +// page could have fewer items than the "itemsPerPage" value. +@property (retain) NSNumber *itemsPerPage; // intValue + +// The fixed string "urlshortener#urlHistory". +@property (copy) NSString *kind; + +// A token to provide to get the next page of results. +@property (copy) NSString *nextPageToken; + +// Total number of short URLs associated with this user (may be approximate). +@property (retain) NSNumber *totalItems; // intValue + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerUrlHistory.m.svn-base b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerUrlHistory.m.svn-base new file mode 100644 index 0000000..8153059 --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortenerUrlHistory.m.svn-base @@ -0,0 +1,54 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortenerUrlHistory.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLUrlshortenerUrlHistory (0 custom class methods, 5 custom properties) + +#import "GTLUrlshortenerUrlHistory.h" + +#import "GTLUrlshortenerUrl.h" + +// ---------------------------------------------------------------------------- +// +// GTLUrlshortenerUrlHistory +// + +@implementation GTLUrlshortenerUrlHistory +@dynamic items, itemsPerPage, kind, nextPageToken, totalItems; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLUrlshortenerUrl class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"urlshortener#urlHistory"]; +} + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortener_Sources.m.svn-base b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortener_Sources.m.svn-base new file mode 100644 index 0000000..47cfcc2 --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/.svn/text-base/GTLUrlshortener_Sources.m.svn-base @@ -0,0 +1,41 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortener_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html + +#import "GTLUrlshortenerConstants.m" + +#import "GTLUrlshortenerAnalyticsSnapshot.m" +#import "GTLUrlshortenerAnalyticsSummary.m" +#import "GTLUrlshortenerStringCount.m" +#import "GTLUrlshortenerUrl.m" +#import "GTLUrlshortenerUrlHistory.m" + +#import "GTLQueryUrlshortener.m" +#import "GTLServiceUrlshortener.m" diff --git a/GTL/Source/Services/Urlshortener/Generated/GTLQueryUrlshortener.h b/GTL/Source/Services/Urlshortener/Generated/GTLQueryUrlshortener.h new file mode 100644 index 0000000..5acf1f9 --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/GTLQueryUrlshortener.h @@ -0,0 +1,93 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryUrlshortener.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLQueryUrlshortener (3 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLUrlshortenerUrl; + +@interface GTLQueryUrlshortener : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *projection; +@property (copy) NSString *shortUrl; +@property (copy) NSString *startToken; + +#pragma mark - +#pragma mark "url" methods +// These create a GTLQueryUrlshortener object. + +// Method: urlshortener.url.get +// Expands a short URL or gets creation time and analytics. +// Required: +// shortUrl: The short URL, including the protocol. +// Optional: +// projection: Additional information to return. +// kGTLUrlshortenerProjectionAnalyticsClicks: Returns only click counts. +// kGTLUrlshortenerProjectionAnalyticsTopStrings: Returns only top string +// counts. +// kGTLUrlshortenerProjectionFull: Returns the creation timestamp and all +// available analytics. +// Fetches a GTLUrlshortenerUrl. ++ (id)queryForUrlGetWithShortUrl:(NSString *)shortUrl; + +// Method: urlshortener.url.insert +// Creates a new short URL. +// Authorization scope(s): +// kGTLAuthScopeUrlshortener +// Fetches a GTLUrlshortenerUrl. ++ (id)queryForUrlInsertWithObject:(GTLUrlshortenerUrl *)object; + +// Method: urlshortener.url.list +// Retrieves a list of URLs shortened by a user. +// Optional: +// projection: Additional information to return. +// kGTLUrlshortenerProjectionAnalyticsClicks: Returns short URL click +// counts. +// kGTLUrlshortenerProjectionFull: Returns short URL click counts. +// startToken: Token for requesting successive pages of results. +// Authorization scope(s): +// kGTLAuthScopeUrlshortener +// Fetches a GTLUrlshortenerUrlHistory. ++ (id)queryForUrlList; + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/GTLQueryUrlshortener.m b/GTL/Source/Services/Urlshortener/Generated/GTLQueryUrlshortener.m new file mode 100644 index 0000000..400a4ad --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/GTLQueryUrlshortener.m @@ -0,0 +1,78 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryUrlshortener.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLQueryUrlshortener (3 custom class methods, 4 custom properties) + +#import "GTLQueryUrlshortener.h" + +#import "GTLUrlshortenerUrl.h" +#import "GTLUrlshortenerUrlHistory.h" + +@implementation GTLQueryUrlshortener + +@dynamic fields, projection, shortUrl, startToken; + ++ (NSDictionary *)parameterNameMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"start-token" + forKey:@"startToken"]; + return map; +} + +#pragma mark - +#pragma mark "url" methods +// These create a GTLQueryUrlshortener object. + ++ (id)queryForUrlGetWithShortUrl:(NSString *)shortUrl { + NSString *methodName = @"urlshortener.url.get"; + GTLQueryUrlshortener *query = [self queryWithMethodName:methodName]; + query.shortUrl = shortUrl; + query.expectedObjectClass = [GTLUrlshortenerUrl class]; + return query; +} + ++ (id)queryForUrlInsertWithObject:(GTLUrlshortenerUrl *)object { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"urlshortener.url.insert"; + GTLQueryUrlshortener *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.expectedObjectClass = [GTLUrlshortenerUrl class]; + return query; +} + ++ (id)queryForUrlList { + NSString *methodName = @"urlshortener.url.list"; + GTLQueryUrlshortener *query = [self queryWithMethodName:methodName]; + query.expectedObjectClass = [GTLUrlshortenerUrlHistory class]; + return query; +} + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/GTLServiceUrlshortener.h b/GTL/Source/Services/Urlshortener/Generated/GTLServiceUrlshortener.h new file mode 100644 index 0000000..d862393 --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/GTLServiceUrlshortener.h @@ -0,0 +1,62 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceUrlshortener.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLServiceUrlshortener (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceUrlshortener : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryUrlshortener.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/GTLServiceUrlshortener.m b/GTL/Source/Services/Urlshortener/Generated/GTLServiceUrlshortener.m new file mode 100644 index 0000000..a02e80b --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/GTLServiceUrlshortener.m @@ -0,0 +1,65 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceUrlshortener.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLServiceUrlshortener (0 custom class methods, 0 custom properties) + +#import "GTLUrlshortener.h" + +@implementation GTLServiceUrlshortener + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryUrlshortener class], + [GTLUrlshortenerAnalyticsSnapshot class], + [GTLUrlshortenerAnalyticsSummary class], + [GTLUrlshortenerStringCount class], + [GTLUrlshortenerUrl class], + [GTLUrlshortenerUrlHistory class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v1"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortener.h b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortener.h new file mode 100644 index 0000000..d3d314c --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortener.h @@ -0,0 +1,38 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortener.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html + +#import "GTLUrlshortenerConstants.h" + +#import "GTLUrlshortenerAnalyticsSnapshot.h" +#import "GTLUrlshortenerAnalyticsSummary.h" +#import "GTLUrlshortenerStringCount.h" +#import "GTLUrlshortenerUrl.h" +#import "GTLUrlshortenerUrlHistory.h" + +#import "GTLQueryUrlshortener.h" +#import "GTLServiceUrlshortener.h" diff --git a/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerAnalyticsSnapshot.h b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerAnalyticsSnapshot.h new file mode 100644 index 0000000..c1e5956 --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerAnalyticsSnapshot.h @@ -0,0 +1,68 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortenerAnalyticsSnapshot.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLUrlshortenerAnalyticsSnapshot (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLUrlshortenerStringCount; + +// ---------------------------------------------------------------------------- +// +// GTLUrlshortenerAnalyticsSnapshot +// + +@interface GTLUrlshortenerAnalyticsSnapshot : GTLObject + +// Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only +// present if this data is available. +@property (retain) NSArray *browsers; // of GTLUrlshortenerStringCount + +// Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by +// (descending) click counts. Only present if this data is available. +@property (retain) NSArray *countries; // of GTLUrlshortenerStringCount + +// Number of clicks on all goo.gl short URLs pointing to this long URL. +@property (retain) NSNumber *longUrlClicks; // longLongValue + +// Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. +// Only present if this data is available. +@property (retain) NSArray *platforms; // of GTLUrlshortenerStringCount + +// Top referring hosts, e.g. "www.google.com"; sorted by (descending) click +// counts. Only present if this data is available. +@property (retain) NSArray *referrers; // of GTLUrlshortenerStringCount + +// Number of clicks on this short URL. +@property (retain) NSNumber *shortUrlClicks; // longLongValue + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerAnalyticsSnapshot.m b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerAnalyticsSnapshot.m new file mode 100644 index 0000000..3166452 --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerAnalyticsSnapshot.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortenerAnalyticsSnapshot.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLUrlshortenerAnalyticsSnapshot (0 custom class methods, 6 custom properties) + +#import "GTLUrlshortenerAnalyticsSnapshot.h" + +#import "GTLUrlshortenerStringCount.h" + +// ---------------------------------------------------------------------------- +// +// GTLUrlshortenerAnalyticsSnapshot +// + +@implementation GTLUrlshortenerAnalyticsSnapshot +@dynamic browsers, countries, longUrlClicks, platforms, referrers, + shortUrlClicks; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [GTLUrlshortenerStringCount class], @"browsers", + [GTLUrlshortenerStringCount class], @"countries", + [GTLUrlshortenerStringCount class], @"platforms", + [GTLUrlshortenerStringCount class], @"referrers", + nil]; + return map; +} + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerAnalyticsSummary.h b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerAnalyticsSummary.h new file mode 100644 index 0000000..80c03b4 --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerAnalyticsSummary.h @@ -0,0 +1,61 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortenerAnalyticsSummary.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLUrlshortenerAnalyticsSummary (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLUrlshortenerAnalyticsSnapshot; + +// ---------------------------------------------------------------------------- +// +// GTLUrlshortenerAnalyticsSummary +// + +@interface GTLUrlshortenerAnalyticsSummary : GTLObject + +// Click analytics over all time. +@property (retain) GTLUrlshortenerAnalyticsSnapshot *allTime; + +// Click analytics over the last day. +@property (retain) GTLUrlshortenerAnalyticsSnapshot *day; + +// Click analytics over the last month. +@property (retain) GTLUrlshortenerAnalyticsSnapshot *month; + +// Click analytics over the last two hours. +@property (retain) GTLUrlshortenerAnalyticsSnapshot *twoHours; + +// Click analytics over the last week. +@property (retain) GTLUrlshortenerAnalyticsSnapshot *week; + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerAnalyticsSummary.m b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerAnalyticsSummary.m new file mode 100644 index 0000000..15c83a9 --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerAnalyticsSummary.m @@ -0,0 +1,42 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortenerAnalyticsSummary.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLUrlshortenerAnalyticsSummary (0 custom class methods, 5 custom properties) + +#import "GTLUrlshortenerAnalyticsSummary.h" + +#import "GTLUrlshortenerAnalyticsSnapshot.h" + +// ---------------------------------------------------------------------------- +// +// GTLUrlshortenerAnalyticsSummary +// + +@implementation GTLUrlshortenerAnalyticsSummary +@dynamic allTime, day, month, twoHours, week; +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerConstants.h b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerConstants.h new file mode 100644 index 0000000..7e657cb --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerConstants.h @@ -0,0 +1,44 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortenerConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// Manage your goo.gl short URLs +GTL_EXTERN NSString * const kGTLAuthScopeUrlshortener; // "https://www.googleapis.com/auth/urlshortener" + +// Projection +GTL_EXTERN NSString * const kGTLUrlshortenerProjectionAnalyticsClicks; // "ANALYTICS_CLICKS" +GTL_EXTERN NSString * const kGTLUrlshortenerProjectionAnalyticsTopStrings; // "ANALYTICS_TOP_STRINGS" +GTL_EXTERN NSString * const kGTLUrlshortenerProjectionFull; // "FULL" diff --git a/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerConstants.m b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerConstants.m new file mode 100644 index 0000000..3a76fca --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerConstants.m @@ -0,0 +1,37 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortenerConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html + +#import "GTLUrlshortenerConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeUrlshortener = @"https://www.googleapis.com/auth/urlshortener"; + +// Projection +NSString * const kGTLUrlshortenerProjectionAnalyticsClicks = @"ANALYTICS_CLICKS"; +NSString * const kGTLUrlshortenerProjectionAnalyticsTopStrings = @"ANALYTICS_TOP_STRINGS"; +NSString * const kGTLUrlshortenerProjectionFull = @"FULL"; diff --git a/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerStringCount.h b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerStringCount.h new file mode 100644 index 0000000..ae94cc9 --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerStringCount.h @@ -0,0 +1,52 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortenerStringCount.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLUrlshortenerStringCount (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLUrlshortenerStringCount +// + +@interface GTLUrlshortenerStringCount : GTLObject + +// Number of clicks for this top entry, e.g. for this particular country or +// browser. +@property (retain) NSNumber *count; // longLongValue + +// Label assigned to this top entry, e.g. "US" or "Chrome". +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerStringCount.m b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerStringCount.m new file mode 100644 index 0000000..e1f4b5d --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerStringCount.m @@ -0,0 +1,48 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortenerStringCount.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLUrlshortenerStringCount (0 custom class methods, 2 custom properties) + +#import "GTLUrlshortenerStringCount.h" + +// ---------------------------------------------------------------------------- +// +// GTLUrlshortenerStringCount +// + +@implementation GTLUrlshortenerStringCount +@dynamic count, identifier; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerUrl.h b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerUrl.h new file mode 100644 index 0000000..5eefdac --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerUrl.h @@ -0,0 +1,70 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortenerUrl.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLUrlshortenerUrl (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLUrlshortenerAnalyticsSummary; + +// ---------------------------------------------------------------------------- +// +// GTLUrlshortenerUrl +// + +@interface GTLUrlshortenerUrl : GTLObject + +// A summary of the click analytics for the short and long URL. Might not be +// present if not requested or currently unavailable. +@property (retain) GTLUrlshortenerAnalyticsSummary *analytics; + +// Time the short URL was created; ISO 8601 representation using the +// yyyy-MM-dd'T'HH:mm:ss.SSSZZ format, e.g. "2010-10-14T19:01:24.944+00:00". +@property (copy) NSString *created; + +// Short URL, e.g. "http://goo.gl/l6MS". +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The fixed string "urlshortener#url". +@property (copy) NSString *kind; + +// Long URL, e.g. "http://www.google.com/". Might not be present if the status +// is "REMOVED". +@property (copy) NSString *longUrl; + +// Status of the target URL. Possible values: "OK", "MALWARE", "PHISHING", or +// "REMOVED". A URL might be marked "REMOVED" if it was flagged as spam, for +// example. +@property (copy) NSString *status; + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerUrl.m b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerUrl.m new file mode 100644 index 0000000..219f45b --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerUrl.m @@ -0,0 +1,54 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortenerUrl.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLUrlshortenerUrl (0 custom class methods, 6 custom properties) + +#import "GTLUrlshortenerUrl.h" + +#import "GTLUrlshortenerAnalyticsSummary.h" + +// ---------------------------------------------------------------------------- +// +// GTLUrlshortenerUrl +// + +@implementation GTLUrlshortenerUrl +@dynamic analytics, created, identifier, kind, longUrl, status; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"urlshortener#url"]; +} + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerUrlHistory.h b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerUrlHistory.h new file mode 100644 index 0000000..4b22fe0 --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerUrlHistory.h @@ -0,0 +1,65 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortenerUrlHistory.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLUrlshortenerUrlHistory (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLUrlshortenerUrl; + +// ---------------------------------------------------------------------------- +// +// GTLUrlshortenerUrlHistory +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLUrlshortenerUrlHistory : GTLCollectionObject + +// A list of URL resources. +@property (retain) NSArray *items; // of GTLUrlshortenerUrl + +// Number of items returned with each full "page" of results. Note that the last +// page could have fewer items than the "itemsPerPage" value. +@property (retain) NSNumber *itemsPerPage; // intValue + +// The fixed string "urlshortener#urlHistory". +@property (copy) NSString *kind; + +// A token to provide to get the next page of results. +@property (copy) NSString *nextPageToken; + +// Total number of short URLs associated with this user (may be approximate). +@property (retain) NSNumber *totalItems; // intValue + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerUrlHistory.m b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerUrlHistory.m new file mode 100644 index 0000000..8153059 --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortenerUrlHistory.m @@ -0,0 +1,54 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortenerUrlHistory.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html +// Classes: +// GTLUrlshortenerUrlHistory (0 custom class methods, 5 custom properties) + +#import "GTLUrlshortenerUrlHistory.h" + +#import "GTLUrlshortenerUrl.h" + +// ---------------------------------------------------------------------------- +// +// GTLUrlshortenerUrlHistory +// + +@implementation GTLUrlshortenerUrlHistory +@dynamic items, itemsPerPage, kind, nextPageToken, totalItems; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLUrlshortenerUrl class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"urlshortener#urlHistory"]; +} + +@end diff --git a/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortener_Sources.m b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortener_Sources.m new file mode 100644 index 0000000..47cfcc2 --- /dev/null +++ b/GTL/Source/Services/Urlshortener/Generated/GTLUrlshortener_Sources.m @@ -0,0 +1,41 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLUrlshortener_Sources.m +// +// This file can be compiled into projects to avoid adding the individual +// source files for this service. +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// URL Shortener API (urlshortener/v1) +// Description: +// Lets you create, inspect, and manage goo.gl short URLs +// Documentation: +// http://code.google.com/apis/urlshortener/v1/getting_started.html + +#import "GTLUrlshortenerConstants.m" + +#import "GTLUrlshortenerAnalyticsSnapshot.m" +#import "GTLUrlshortenerAnalyticsSummary.m" +#import "GTLUrlshortenerStringCount.m" +#import "GTLUrlshortenerUrl.m" +#import "GTLUrlshortenerUrlHistory.m" + +#import "GTLQueryUrlshortener.m" +#import "GTLServiceUrlshortener.m" diff --git a/GTL/Source/Services/YouTube/.svn/all-wcprops b/GTL/Source/Services/YouTube/.svn/all-wcprops new file mode 100644 index 0000000..fc11929 --- /dev/null +++ b/GTL/Source/Services/YouTube/.svn/all-wcprops @@ -0,0 +1,5 @@ +K 25 +svn:wc:ra_dav:version-url +V 47 +/svn/!svn/ver/245/trunk/Source/Services/YouTube +END diff --git a/GTL/Source/Services/YouTube/.svn/entries b/GTL/Source/Services/YouTube/.svn/entries new file mode 100644 index 0000000..85162d6 --- /dev/null +++ b/GTL/Source/Services/YouTube/.svn/entries @@ -0,0 +1,31 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/YouTube +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-11-29T22:37:59.091835Z +245 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +Generated +dir + diff --git a/GTL/Source/Services/YouTube/Generated/.svn/all-wcprops b/GTL/Source/Services/YouTube/Generated/.svn/all-wcprops new file mode 100644 index 0000000..8c50202 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/all-wcprops @@ -0,0 +1,593 @@ +K 25 +svn:wc:ra_dav:version-url +V 57 +/svn/!svn/ver/245/trunk/Source/Services/YouTube/Generated +END +GTLYouTubePlaylistStatus.h +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubePlaylistStatus.h +END +GTLYouTubeGuideCategoryListResponse.h +K 25 +svn:wc:ra_dav:version-url +V 95 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeGuideCategoryListResponse.h +END +GTLYouTubeSearchResultSnippet.h +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeSearchResultSnippet.h +END +GTLYouTubeVideoRecordingDetails.h +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/245/trunk/Source/Services/YouTube/Generated/GTLYouTubeVideoRecordingDetails.h +END +GTLYouTubeResourceId.m +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeResourceId.m +END +GTLYouTubeVideoCategory.m +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeVideoCategory.m +END +GTLYouTubePlaylistStatus.m +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubePlaylistStatus.m +END +GTLYouTubeGuideCategoryListResponse.m +K 25 +svn:wc:ra_dav:version-url +V 95 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeGuideCategoryListResponse.m +END +GTLYouTubeSearchResultSnippet.m +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeSearchResultSnippet.m +END +GTLYouTubeVideoRecordingDetails.m +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/245/trunk/Source/Services/YouTube/Generated/GTLYouTubeVideoRecordingDetails.m +END +GTLYouTube.h +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/245/trunk/Source/Services/YouTube/Generated/GTLYouTube.h +END +GTLYouTubePlaylistItemContentDetails.h +K 25 +svn:wc:ra_dav:version-url +V 96 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemContentDetails.h +END +GTLYouTubePlaylistItemSnippet.h +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemSnippet.h +END +GTLYouTubePlaylistItemContentDetails.m +K 25 +svn:wc:ra_dav:version-url +V 96 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemContentDetails.m +END +GTLYouTubePageInfo.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubePageInfo.h +END +GTLYouTubePlaylistItemSnippet.m +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemSnippet.m +END +GTLYouTubePlaylistItemListResponse.h +K 25 +svn:wc:ra_dav:version-url +V 94 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemListResponse.h +END +GTLYouTubePageInfo.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubePageInfo.m +END +GTLYouTubeGuideCategorySnippet.h +K 25 +svn:wc:ra_dav:version-url +V 90 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeGuideCategorySnippet.h +END +GTLYouTubePlaylistItemListResponse.m +K 25 +svn:wc:ra_dav:version-url +V 94 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemListResponse.m +END +GTLYouTubePlaylist.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubePlaylist.h +END +GTLYouTubeGuideCategorySnippet.m +K 25 +svn:wc:ra_dav:version-url +V 90 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeGuideCategorySnippet.m +END +GTLYouTubePlaylistSnippet.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubePlaylistSnippet.h +END +GTLQueryYouTube.h +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLQueryYouTube.h +END +GTLYouTubePlaylist.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubePlaylist.m +END +GTLYouTubeVideoCategorySnippet.h +K 25 +svn:wc:ra_dav:version-url +V 90 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeVideoCategorySnippet.h +END +GTLYouTubeChannel.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/245/trunk/Source/Services/YouTube/Generated/GTLYouTubeChannel.h +END +GTLYouTubeVideoSnippet.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeVideoSnippet.h +END +GTLYouTubePlaylistSnippet.m +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubePlaylistSnippet.m +END +GTLQueryYouTube.m +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLQueryYouTube.m +END +GTLYouTubeVideoCategorySnippet.m +K 25 +svn:wc:ra_dav:version-url +V 90 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeVideoCategorySnippet.m +END +GTLYouTubeChannel.m +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/245/trunk/Source/Services/YouTube/Generated/GTLYouTubeChannel.m +END +GTLYouTubeVideoSnippet.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeVideoSnippet.m +END +GTLYouTubeVideoCategoryListResponse.h +K 25 +svn:wc:ra_dav:version-url +V 95 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeVideoCategoryListResponse.h +END +GTLYouTubeSearchListResponse.h +K 25 +svn:wc:ra_dav:version-url +V 88 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeSearchListResponse.h +END +GTLYouTubeThumbnail.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeThumbnail.h +END +GTLYouTubeVideoCategoryListResponse.m +K 25 +svn:wc:ra_dav:version-url +V 95 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeVideoCategoryListResponse.m +END +GTLYouTubeSearchListResponse.m +K 25 +svn:wc:ra_dav:version-url +V 88 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeSearchListResponse.m +END +GTLYouTubeThumbnail.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeThumbnail.m +END +GTLYouTubeActivity.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeActivity.h +END +GTLYouTubeActivity.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeActivity.m +END +GTLYouTubeVideo.h +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/245/trunk/Source/Services/YouTube/Generated/GTLYouTubeVideo.h +END +GTLYouTubeChannelContentDetails.h +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeChannelContentDetails.h +END +GTLYouTubeVideo.m +K 25 +svn:wc:ra_dav:version-url +V 75 +/svn/!svn/ver/245/trunk/Source/Services/YouTube/Generated/GTLYouTubeVideo.m +END +GTLYouTubeChannelSnippet.h +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeChannelSnippet.h +END +GTLYouTubePlaylistListResponse.h +K 25 +svn:wc:ra_dav:version-url +V 90 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubePlaylistListResponse.h +END +GTLYouTubeChannelStatus.h +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/245/trunk/Source/Services/YouTube/Generated/GTLYouTubeChannelStatus.h +END +GTLYouTubeChannelTopicDetails.h +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeChannelTopicDetails.h +END +GTLYouTubeChannelContentDetails.m +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/243/trunk/Source/Services/YouTube/Generated/GTLYouTubeChannelContentDetails.m +END +GTLYouTubeChannelSnippet.m +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeChannelSnippet.m +END +GTLYouTubePlaylistListResponse.m +K 25 +svn:wc:ra_dav:version-url +V 90 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubePlaylistListResponse.m +END +GTLYouTubeChannelStatus.m +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/245/trunk/Source/Services/YouTube/Generated/GTLYouTubeChannelStatus.m +END +GTLYouTubeChannelTopicDetails.m +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeChannelTopicDetails.m +END +GTLYouTubeChannelStatistics.h +K 25 +svn:wc:ra_dav:version-url +V 87 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeChannelStatistics.h +END +GTLYouTubeChannelListResponse.h +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeChannelListResponse.h +END +GTLYouTubeSubscription.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeSubscription.h +END +GTLYouTubeGeoPoint.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/245/trunk/Source/Services/YouTube/Generated/GTLYouTubeGeoPoint.h +END +GTLYouTubeChannelStatistics.m +K 25 +svn:wc:ra_dav:version-url +V 87 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeChannelStatistics.m +END +GTLYouTubeChannelListResponse.m +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeChannelListResponse.m +END +GTLYouTubeGeoPoint.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/245/trunk/Source/Services/YouTube/Generated/GTLYouTubeGeoPoint.m +END +GTLYouTubeSubscription.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeSubscription.m +END +GTLYouTubeGuideCategory.h +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeGuideCategory.h +END +GTLYouTubeActivityContentDetails.h +K 25 +svn:wc:ra_dav:version-url +V 92 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetails.h +END +GTLYouTubeActivitySnippet.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeActivitySnippet.h +END +GTLServiceYouTube.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLServiceYouTube.h +END +GTLYouTubeGuideCategory.m +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeGuideCategory.m +END +GTLYouTubeActivityContentDetails.m +K 25 +svn:wc:ra_dav:version-url +V 92 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetails.m +END +GTLYouTubeSearchResult.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeSearchResult.h +END +GTLYouTubeActivitySnippet.m +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeActivitySnippet.m +END +GTLServiceYouTube.m +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/!svn/ver/245/trunk/Source/Services/YouTube/Generated/GTLServiceYouTube.m +END +GTLYouTubeActivityListResponse.h +K 25 +svn:wc:ra_dav:version-url +V 90 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeActivityListResponse.h +END +GTLYouTubeVideoContentDetails.h +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeVideoContentDetails.h +END +GTLYouTubeSearchResult.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeSearchResult.m +END +GTLYouTubeVideoStatus.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeVideoStatus.h +END +GTLYouTubeVideoTopicDetails.h +K 25 +svn:wc:ra_dav:version-url +V 87 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeVideoTopicDetails.h +END +GTLYouTubeActivityListResponse.m +K 25 +svn:wc:ra_dav:version-url +V 90 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeActivityListResponse.m +END +GTLYouTubeVideoContentDetails.m +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeVideoContentDetails.m +END +GTLYouTubeConstants.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeConstants.h +END +GTLYouTubeVideoStatus.m +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeVideoStatus.m +END +GTLYouTubeVideoTopicDetails.m +K 25 +svn:wc:ra_dav:version-url +V 87 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeVideoTopicDetails.m +END +GTLYouTubePlaylistItem.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubePlaylistItem.h +END +GTLYouTubeVideoListResponse.h +K 25 +svn:wc:ra_dav:version-url +V 87 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeVideoListResponse.h +END +GTLYouTubeConstants.m +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeConstants.m +END +GTLYouTubeVideoStatistics.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeVideoStatistics.h +END +GTLYouTubeVideoPlayer.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeVideoPlayer.h +END +GTLYouTubeSubscriptionContentDetails.h +K 25 +svn:wc:ra_dav:version-url +V 96 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeSubscriptionContentDetails.h +END +GTLYouTubePlaylistItem.m +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubePlaylistItem.m +END +GTLYouTubeVideoStatistics.m +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeVideoStatistics.m +END +GTLYouTubeVideoListResponse.m +K 25 +svn:wc:ra_dav:version-url +V 87 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeVideoListResponse.m +END +GTLYouTubeSubscriptionSnippet.h +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeSubscriptionSnippet.h +END +GTLYouTube_Sources.m +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/!svn/ver/245/trunk/Source/Services/YouTube/Generated/GTLYouTube_Sources.m +END +GTLYouTubeVideoPlayer.m +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeVideoPlayer.m +END +GTLYouTubeSubscriptionContentDetails.m +K 25 +svn:wc:ra_dav:version-url +V 96 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeSubscriptionContentDetails.m +END +GTLYouTubeSubscriptionSnippet.m +K 25 +svn:wc:ra_dav:version-url +V 89 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeSubscriptionSnippet.m +END +GTLYouTubeSubscriptionListResponse.h +K 25 +svn:wc:ra_dav:version-url +V 94 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeSubscriptionListResponse.h +END +GTLYouTubeSubscriptionListResponse.m +K 25 +svn:wc:ra_dav:version-url +V 94 +/svn/!svn/ver/240/trunk/Source/Services/YouTube/Generated/GTLYouTubeSubscriptionListResponse.m +END +GTLYouTubeResourceId.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeResourceId.h +END +GTLYouTubeVideoCategory.h +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/!svn/ver/244/trunk/Source/Services/YouTube/Generated/GTLYouTubeVideoCategory.h +END diff --git a/GTL/Source/Services/YouTube/Generated/.svn/entries b/GTL/Source/Services/YouTube/Generated/.svn/entries new file mode 100644 index 0000000..2b495b5 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/entries @@ -0,0 +1,3360 @@ +10 + +dir +249 +http://google-api-objectivec-client.googlecode.com/svn/trunk/Source/Services/YouTube/Generated +http://google-api-objectivec-client.googlecode.com/svn + + + +2012-11-29T22:37:59.091835Z +245 +grobbins@google.com + + + + + + + + + + + + + + +052f66bb-8366-e9ed-b056-95094e25c79e + +GTLYouTubePlaylistStatus.h +file + + + + +2012-12-09T08:42:31.000000Z +d33bb3261c3cfe83641024af2cdc0479 +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1458 + +GTLYouTubeGuideCategoryListResponse.h +file + + + + +2012-12-09T08:42:31.000000Z +48bdf70846d03c525893daae55371c8c +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2098 + +GTLYouTubeSearchResultSnippet.h +file + + + + +2012-12-09T08:42:31.000000Z +ab35435de5be41395b60f4f60a38710f +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2981 + +GTLYouTubeVideoRecordingDetails.h +file + + + + +2012-12-09T08:42:31.000000Z +bd98091ed50b4447f53c1efad02f1180 +2012-11-29T22:37:59.091835Z +245 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1806 + +GTLYouTubeResourceId.m +file + + + + +2012-12-09T08:42:31.000000Z +b73fbb4cd8d224a1f3d0b7134f8802db +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1265 + +GTLYouTubeVideoCategory.m +file + + + + +2012-12-09T08:42:31.000000Z +0b3a5723902326c6f2a1c4d43b30f2b5 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1592 + +GTLYouTubePlaylistStatus.m +file + + + + +2012-12-09T08:42:31.000000Z +3acbbdd91c3baf65790658dedd387f6d +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1262 + +GTLYouTubeGuideCategoryListResponse.m +file + + + + +2012-12-09T08:42:31.000000Z +904fb33295c414bb1017705808aa226f +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1831 + +GTLYouTubeSearchResultSnippet.m +file + + + + +2012-12-09T08:42:31.000000Z +ae91ba01fe0c4d4d50359230eb04871b +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1936 + +GTLYouTubeVideoRecordingDetails.m +file + + + + +2012-12-09T08:42:31.000000Z +a62011ea70ee23dd3286829de707747f +2012-11-29T22:37:59.091835Z +245 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1360 + +GTLYouTube.h +file + + + + +2012-12-09T08:42:31.000000Z +98d5d232131ca2b71c1f006e096b101a +2012-11-29T22:37:59.091835Z +245 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2784 + +GTLYouTubePlaylistItemContentDetails.h +file + + + + +2012-12-09T08:42:31.000000Z +e28b2a3bb4072976d8f9f0cd7d5dee5a +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2421 + +GTLYouTubePlaylistItemSnippet.h +file + + + + +2012-12-09T08:42:31.000000Z +16c9a6181691cf3164cb5a550282d6de +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3551 + +GTLYouTubePlaylistItemContentDetails.m +file + + + + +2012-12-09T08:42:31.000000Z +8ef48255be42d978e0e7e73d7b14a4f3 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1338 + +GTLYouTubePlaylistItemSnippet.m +file + + + + +2012-12-09T08:42:31.000000Z +5a05c556d6dcc2655e9e517f4cc60929 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2012 + +GTLYouTubePageInfo.h +file + + + + +2012-12-09T08:42:31.000000Z +9c93cf57f41c16026fb6a7ce91fe0cee +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1637 + +GTLYouTubePlaylistItemListResponse.h +file + + + + +2012-12-09T08:42:31.000000Z +83e824ae35453f2440b66e27e4dceb13 +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2443 + +GTLYouTubePageInfo.m +file + + + + +2012-12-09T08:42:31.000000Z +74c10be29ddc7cf377aa7989d62a3898 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1247 + +GTLYouTubeGuideCategorySnippet.h +file + + + + +2012-12-09T08:42:31.000000Z +8a96697e0a040093fb5605cb5e89914a +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1561 + +GTLYouTubePlaylistItemListResponse.m +file + + + + +2012-12-09T08:42:31.000000Z +34b496f1ad85b4f50ad8aa73e51c8c99 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1894 + +GTLYouTubePlaylist.h +file + + + + +2012-12-09T08:42:31.000000Z +f2f969756f46f803df36410163d10f87 +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3089 + +GTLYouTubeGuideCategorySnippet.m +file + + + + +2012-12-09T08:42:31.000000Z +ea33ff4999c95bf404a38cb67872d51a +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1295 + +GTLYouTubePlaylistSnippet.h +file + + + + +2012-12-09T08:42:31.000000Z +4701fbfc61bff6422c003f79bfbd40b8 +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2792 + +GTLQueryYouTube.h +file + + + + +2012-12-09T08:42:31.000000Z +911907dfce9704fb7b8e8b4e21ffadfa +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +34297 + +GTLYouTubePlaylist.m +file + + + + +2012-12-09T08:42:31.000000Z +82d01d10c3b9ad3471e4999a1852dd00 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1602 + +GTLYouTubeVideoCategorySnippet.h +file + + + + +2012-12-09T08:42:31.000000Z +19b62db9adfb1dd14f8d5c627726a682 +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1557 + +GTLYouTubeChannel.h +file + + + + +2012-12-09T08:42:31.000000Z +7a431708345c758fb65947af645788e4 +2012-11-29T22:37:59.091835Z +245 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2671 + +GTLYouTubeVideoSnippet.h +file + + + + +2012-12-09T08:42:31.000000Z +bff9cd3b6fa2eff004f72bf35fbcfd6e +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3058 + +GTLYouTubePlaylistSnippet.m +file + + + + +2012-12-09T08:42:31.000000Z +2b07e49a472aeea71b912da19eefd989 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1904 + +GTLQueryYouTube.m +file + + + + +2012-12-09T08:42:31.000000Z +4ffcdd93e4a2b765d83a4976fcbb0b44 +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +10890 + +GTLYouTubeVideoCategorySnippet.m +file + + + + +2012-12-09T08:42:31.000000Z +410b9c322f063ad8773489597305d803 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1295 + +GTLYouTubeChannel.m +file + + + + +2012-12-09T08:42:31.000000Z +dde606df894ce5a34ff3a7f55a9afbbe +2012-11-29T22:37:59.091835Z +245 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1771 + +GTLYouTubeVideoSnippet.m +file + + + + +2012-12-09T08:42:31.000000Z +426ab8992a0bb45e503aabf57780729e +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2095 + +GTLYouTubeVideoCategoryListResponse.h +file + + + + +2012-12-09T08:42:31.000000Z +fd18233b20b49815b300488ec1b20088 +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2106 + +GTLYouTubeSearchListResponse.h +file + + + + +2012-12-09T08:42:31.000000Z +b492fabc5a1d6d72d03b279b483346be +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2412 + +GTLYouTubeThumbnail.h +file + + + + +2012-12-09T08:42:31.000000Z +ec384008bad0d35263620b827d23da85 +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1405 + +GTLYouTubeVideoCategoryListResponse.m +file + + + + +2012-12-09T08:42:31.000000Z +bfbefd272715bdd19fe1e75b32ec66f9 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1831 + +GTLYouTubeSearchListResponse.m +file + + + + +2012-12-09T08:42:31.000000Z +e1ce868307c2bfa3d9f13530b80bfaa1 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1858 + +GTLYouTubeThumbnail.m +file + + + + +2012-12-09T08:42:31.000000Z +836b62123d4e049d095fd86a5eabbb6d +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1227 + +GTLYouTubeActivity.h +file + + + + +2012-12-09T08:42:31.000000Z +56c9a102d51b6ee920c9768c1b066a9f +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2691 + +GTLYouTubeActivity.m +file + + + + +2012-12-09T08:42:31.000000Z +5f8b2d14b7e575faa25f823c3ec35c12 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1618 + +GTLYouTubeVideo.h +file + + + + +2012-12-09T08:42:31.000000Z +e3802397729a2925bab199e0ef4a6ea2 +2012-11-29T22:37:59.091835Z +245 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3088 + +GTLYouTubeChannelContentDetails.h +file + + + + +2012-12-09T08:42:31.000000Z +cb125e5653d12731a051db01453aa3b7 +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3104 + +GTLYouTubeVideo.m +file + + + + +2012-12-09T08:42:31.000000Z +bcb688d9aa1399c97283833a5194b1d2 +2012-11-29T22:37:59.091835Z +245 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1854 + +GTLYouTubeChannelSnippet.h +file + + + + +2012-12-09T08:42:31.000000Z +468a365e7bf38ea20b745061ae3d63e7 +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2747 + +GTLYouTubePlaylistListResponse.h +file + + + + +2012-12-09T08:42:31.000000Z +cbe7383d200d1ac85a9a41b175231c72 +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2404 + +GTLYouTubeChannelStatus.h +file + + + + +2012-12-09T08:42:31.000000Z +3a1ab78ea0eacce2205f998ec341412c +2012-11-29T22:37:59.091835Z +245 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1426 + +GTLYouTubeChannelTopicDetails.h +file + + + + +2012-12-09T08:42:31.000000Z +3f611bb98842b56e0f0baaa07bfd7e74 +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1571 + +GTLYouTubeChannelContentDetails.m +file + + + + +2012-12-09T08:42:31.000000Z +6a2009199906b36b71ff226ed66364a2 +2012-11-14T23:46:14.437398Z +243 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1672 + +GTLYouTubeChannelSnippet.m +file + + + + +2012-12-09T08:42:31.000000Z +a00927d286bc7c2ddfed68ff5ba9733f +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1896 + +GTLYouTubePlaylistListResponse.m +file + + + + +2012-12-09T08:42:31.000000Z +5b15cf07791d32271159d833ed742512 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1862 + +GTLYouTubeChannelStatus.m +file + + + + +2012-12-09T08:42:31.000000Z +c1dee1bfc2025993a6fad2f59e5ee0fa +2012-11-29T22:37:59.091835Z +245 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1257 + +GTLYouTubeChannelTopicDetails.m +file + + + + +2012-12-09T08:42:31.000000Z +c229f3f867903e05db3f385f5d2f3253 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1475 + +GTLYouTubeChannelStatistics.h +file + + + + +2012-12-09T08:42:31.000000Z +21fcaf29739c82549620418363392fbb +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1882 + +GTLYouTubeChannelListResponse.h +file + + + + +2012-12-09T08:42:31.000000Z +f6c663c0bb7a16de8a406cf3247cb831 +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2395 + +GTLYouTubeSubscription.h +file + + + + +2012-12-09T08:42:31.000000Z +73b9425f12faf552d6fbdc4011fa910e +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2417 + +GTLYouTubeGeoPoint.h +file + + + + +2012-12-09T08:42:31.000000Z +ba17a6f23a8cf5c878b875cc2ed49833 +2012-11-29T22:37:59.091835Z +245 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1618 + +GTLYouTubeChannelStatistics.m +file + + + + +2012-12-09T08:42:31.000000Z +852f5aff3336a83ad684ab2bdd952975 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1316 + +GTLYouTubeChannelListResponse.m +file + + + + +2012-12-09T08:42:31.000000Z +49fc6ed9f6392d3db5be6238f9110097 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1854 + +GTLYouTubeGeoPoint.m +file + + + + +2012-12-09T08:42:31.000000Z +9f5162071aa5f501dee5adc7e16e48cd +2012-11-29T22:37:59.091835Z +245 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1249 + +GTLYouTubeSubscription.m +file + + + + +2012-12-09T08:42:31.000000Z +1a9fdbd921b490288ad848f091d49fa0 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1650 + +GTLYouTubeGuideCategory.h +file + + + + +2012-12-09T08:42:31.000000Z +ce47eed76c7550afa5f05fe665e7b296 +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2243 + +GTLYouTubeActivityContentDetails.h +file + + + + +2012-12-09T08:42:31.000000Z +6ee21becdc2947e672c083d808ff3bab +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +8723 + +GTLYouTubeActivitySnippet.h +file + + + + +2012-12-09T08:42:31.000000Z +603c3e8dea89b04b3f0a4fee3dc35a9f +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3487 + +GTLServiceYouTube.h +file + + + + +2012-12-09T08:42:31.000000Z +11db7fbc100c97e8754ca5e41a52b52d +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2080 + +GTLYouTubeGuideCategory.m +file + + + + +2012-12-09T08:42:31.000000Z +37d47f02104e8af6d6761c6fd5061847 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1592 + +GTLYouTubeActivityContentDetails.m +file + + + + +2012-12-09T08:42:31.000000Z +76959124ec6320aee6062ef770618c5b +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4317 + +GTLYouTubeSearchResult.h +file + + + + +2012-12-09T08:42:31.000000Z +a9e2d388b106ae6a2a0b2a3d8211c586 +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2403 + +GTLYouTubeActivitySnippet.m +file + + + + +2012-12-09T08:42:31.000000Z +675310faaa19b4b5300be3d1dd4b6605 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1928 + +GTLServiceYouTube.m +file + + + + +2012-12-09T08:42:31.000000Z +29848cc4670113d4be3805c926af80fc +2012-11-29T22:37:59.091835Z +245 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +4546 + +GTLYouTubeActivityListResponse.h +file + + + + +2012-12-09T08:42:31.000000Z +2dc7b199fc2f4f10c4208e6e40defad1 +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2416 + +GTLYouTubeVideoContentDetails.h +file + + + + +2012-12-09T08:42:31.000000Z +4974494b7d96c1352321a87682def561 +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3333 + +GTLYouTubeSearchResult.m +file + + + + +2012-12-09T08:42:31.000000Z +ab0685092ac2df7b753f0fda2dbd2dbe +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1618 + +GTLYouTubeVideoStatus.h +file + + + + +2012-12-09T08:42:31.000000Z +b9f5c0172d2b1277eef39ea6523dadab +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1927 + +GTLYouTubeVideoTopicDetails.h +file + + + + +2012-12-09T08:42:31.000000Z +0f7e2526e245bccff48e9bcf99c32b22 +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1559 + +GTLYouTubeActivityListResponse.m +file + + + + +2012-12-09T08:42:31.000000Z +1222b5624effa2ca08180c10e881dc5b +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1862 + +GTLYouTubeVideoContentDetails.m +file + + + + +2012-12-09T08:42:31.000000Z +4766efb04ac0d2ec2b979c4c343d423b +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1851 + +GTLYouTubeConstants.h +file + + + + +2012-12-09T08:42:31.000000Z +b01a52b8c87a46c3a403b3dcb540d42d +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3737 + +GTLYouTubeVideoStatus.m +file + + + + +2012-12-09T08:42:31.000000Z +a67a1fee77d5a3ff73f504b28aa5fa84 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1293 + +GTLYouTubeVideoTopicDetails.m +file + + + + +2012-12-09T08:42:31.000000Z +ef12dd4a84a90a4c9b4f8e095de9e134 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1465 + +GTLYouTubePlaylistItem.h +file + + + + +2012-12-09T08:42:31.000000Z +525ffe4598d61c188240795408a15c38 +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3315 + +GTLYouTubeVideoListResponse.h +file + + + + +2012-12-09T08:42:31.000000Z +3d044cd0c718f6c8d99ecef7c8148348 +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1896 + +GTLYouTubeConstants.m +file + + + + +2012-12-09T08:42:31.000000Z +70dde9e15863a267b29291940d369ad1 +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3144 + +GTLYouTubeVideoStatistics.h +file + + + + +2012-12-09T08:42:31.000000Z +829055f221c9e5c5d03839b2b6e9a47f +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2124 + +GTLYouTubeVideoPlayer.h +file + + + + +2012-12-09T08:42:31.000000Z +b3044f290197b5edcc2750bea9b405aa +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1438 + +GTLYouTubeSubscriptionContentDetails.h +file + + + + +2012-12-09T08:42:31.000000Z +9a560426f0135a5d371ab9dee06ec87a +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1691 + +GTLYouTubePlaylistItem.m +file + + + + +2012-12-09T08:42:31.000000Z +864a335ca330d7027cacd95125fc72c7 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1650 + +GTLYouTubeVideoStatistics.m +file + + + + +2012-12-09T08:42:31.000000Z +8b9b428ec99bbd116400093e586011c0 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1317 + +GTLYouTubeVideoListResponse.m +file + + + + +2012-12-09T08:42:31.000000Z +ccd02b95b63e787f8bf584412306d2fb +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1767 + +GTLYouTubeSubscriptionSnippet.h +file + + + + +2012-12-09T08:42:31.000000Z +5e691bd9b64c924240e6a8f75f67b16a +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +3023 + +GTLYouTube_Sources.m +file + + + + +2012-12-09T08:42:31.000000Z +7ec088af5a225d9553973008b9a1869d +2012-11-29T22:37:59.091835Z +245 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2903 + +GTLYouTubeVideoPlayer.m +file + + + + +2012-12-09T08:42:31.000000Z +264c668315b48443e7287b9614aa204d +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1243 + +GTLYouTubeSubscriptionContentDetails.m +file + + + + +2012-12-09T08:42:31.000000Z +6a77ca791d200288068a0d967dbbffe7 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1337 + +GTLYouTubeSubscriptionSnippet.m +file + + + + +2012-12-09T08:42:31.000000Z +cffd87fd71e9eb187e117377107a3542 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1990 + +GTLYouTubeSubscriptionListResponse.h +file + + + + +2012-12-09T08:42:31.000000Z +f708d81491ba9a1fdf2fd4f00f9ae198 +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2444 + +GTLYouTubeSubscriptionListResponse.m +file + + + + +2012-12-09T08:42:31.000000Z +9507cd56e32a7b1bb8e6a4ca19ab0853 +2012-10-30T02:03:35.056451Z +240 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +1894 + +GTLYouTubeResourceId.h +file + + + + +2012-12-09T08:42:31.000000Z +7a60b5ab95ee7cd55f55714c226e494c +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2127 + +GTLYouTubeVideoCategory.h +file + + + + +2012-12-09T08:42:31.000000Z +47bd58d2bbe6d9e7bd4fed16e23ca68f +2012-11-21T01:36:37.934035Z +244 +grobbins@google.com + + + + + + + + + + + + + + + + + + + + + +2008 + diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLQueryYouTube.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLQueryYouTube.h.svn-base new file mode 100644 index 0000000..830ec75 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLQueryYouTube.h.svn-base @@ -0,0 +1,682 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryYouTube.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLQueryYouTube (21 custom class methods, 27 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLQuery.h" +#else + #import "GTLQuery.h" +#endif + +@class GTLYouTubeActivity; +@class GTLYouTubePlaylist; +@class GTLYouTubePlaylistItem; +@class GTLYouTubeSubscription; +@class GTLYouTubeVideo; + +@interface GTLQueryYouTube : GTLQuery + +// +// Parameters valid on all methods. +// + +// Selector specifying which fields to include in a partial response. +@property (copy) NSString *fields; + +// +// Method-specific parameters; see the comments below for more information. +// +@property (copy) NSString *categoryId; +@property (copy) NSString *channelId; +@property (copy) NSString *forChannelId; +@property (copy) NSString *hl; +@property (copy) NSString *home; +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; +@property (assign) NSUInteger maxResults; +@property (assign) BOOL mine; +@property (copy) NSString *mySubscribers; +@property (copy) NSString *order; +@property (copy) NSString *pageToken; +@property (copy) NSString *part; +@property (copy) NSString *playlistId; +@property (copy) NSString *published; +@property (retain) GTLDateTime *publishedAfter; +@property (retain) GTLDateTime *publishedBefore; +@property (copy) NSString *q; +@property (copy) NSString *regionCode; +@property (copy) NSString *relatedToVideoId; +@property (copy) NSString *topicId; +@property (copy) NSString *type; +@property (copy) NSString *videoCaption; +@property (copy) NSString *videoDefinition; +@property (copy) NSString *videoDimension; +@property (copy) NSString *videoDuration; +@property (copy) NSString *videoLicense; + +#pragma mark - +#pragma mark "activities" methods +// These create a GTLQueryYouTube object. + +// Method: youtube.activities.insert +// Posts a bulletin for a specific channel. (The user submitting the request +// must be authorized to act on the channel's behalf.) +// Required: +// part: The part parameter serves two purposes in this operation. It +// identifies the properties that the write operation will set as well as +// the properties that the API response will include. +// The part names that you can include in the parameter value are snippet +// and contentDetails. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// Fetches a GTLYouTubeActivity. ++ (id)queryForActivitiesInsertWithObject:(GTLYouTubeActivity *)object + part:(NSString *)part; + +// Method: youtube.activities.list +// Returns a list of channel activity events that match the request criteria. +// For example, you can retrieve events associated with a particular channel, +// events associated with the user's subscriptions and Google+ friends, or the +// YouTube home page feed, which is customized for each user. +// Required: +// part: The part parameter specifies a comma-separated list of one or more +// activity resource properties that the API response will include. The part +// names that you can include in the parameter value are id, snippet, and +// contentDetails. +// If the parameter identifies a property that contains child properties, +// the child properties will be included in the response. For example, in a +// activity resource, the snippet property contains other properties that +// identify the type of activity, a display title for the activity, and so +// forth. If you set part=snippet, the API response will also contain all of +// those nested properties. +// Optional: +// channelId: The channelId parameter specifies a unique YouTube channel ID. +// The API will then return a list of that channel's activities. +// home: Set this parameter's value to true to retrieve the activity feed that +// displays on the YouTube home page for the currently authenticated user. +// maxResults: USE_DESCRIPTION --- channels:list:maxResults (0..50, default 5) +// mine: Set this parameter's value to true to retrieve a feed of the +// authenticated user's activities. +// pageToken: USE_DESCRIPTION --- channels:list:pageToken +// publishedAfter: The publishedAfter parameter specifies the earliest date +// and time that an activity could have occurred for that activity to be +// included in the API response. If the parameter value specifies a day, but +// not a time, then any activities that occurred that day will be included +// in the result set. The value is specified in ISO 8601 +// (YYYY-MM-DDThh:mm:ss.sZ) format. +// publishedBefore: The publishedBefore parameter specifies the date and time +// before which an activity must have occurred for that activity to be +// included in the API response. If the parameter value specifies a day, but +// not a time, then any activities that occurred that day will be excluded +// from the result set. The value is specified in ISO 8601 +// (YYYY-MM-DDThh:mm:ss.sZ) format. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeReadonly +// Fetches a GTLYouTubeActivityListResponse. ++ (id)queryForActivitiesListWithPart:(NSString *)part; + +#pragma mark - +#pragma mark "channels" methods +// These create a GTLQueryYouTube object. + +// Method: youtube.channels.list +// Returns a collection of zero or more channel resources that match the request +// criteria. +// Required: +// part: The part parameter specifies a comma-separated list of one or more +// channel resource properties that the API response will include. The part +// names that you can include in the parameter value are id, snippet, +// contentDetails, statistics, and topicDetails. +// If the parameter identifies a property that contains child properties, +// the child properties will be included in the response. For example, in a +// channel resource, the contentDetails property contains other properties, +// such as the uploads properties. As such, if you set part=contentDetails, +// the API response will also contain all of those nested properties. +// Optional: +// categoryId: The categoryId parameter specifies a YouTube guide category, +// thereby requesting YouTube channels associated with that category. +// identifier: The id parameter specifies a comma-separated list of the +// YouTube channel ID(s) for the resource(s) that are being retrieved. In a +// channel resource, the id property specifies the channel's YouTube channel +// ID. +// maxResults: The maxResults parameter specifies the maximum number of items +// that should be returned in the result set. (0..50, default 5) +// mine: Set this parameter's value to true to instruct the API to only return +// channels owned by the authenticated user. +// mySubscribers: Set this parameter's value to true to retrieve a list of +// channels that subscribed to the authenticated user's channel. +// pageToken: The pageToken parameter identifies a specific page in the result +// set that should be returned. In an API response, the nextPageToken and +// prevPageToken properties identify other pages that could be retrieved. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeReadonly +// kGTLAuthScopeYouTubeYoutubepartner +// Fetches a GTLYouTubeChannelListResponse. ++ (id)queryForChannelsListWithPart:(NSString *)part; + +#pragma mark - +#pragma mark "guideCategories" methods +// These create a GTLQueryYouTube object. + +// Method: youtube.guideCategories.list +// Returns a list of categories that can be associated with YouTube channels. +// Required: +// part: The part parameter specifies a comma-separated list of one or more +// guideCategory resource properties that the API response will include. The +// part names that you can include in the parameter value are id and +// snippet. +// If the parameter identifies a property that contains child properties, +// the child properties will be included in the response. For example, in a +// guideCategory resource, the snippet property contains other properties, +// such as the category's title. If you set part=snippet, the API response +// will also contain all of those nested properties. +// Optional: +// hl: The hl parameter specifies the language that will be used for text +// values in the API response. (Default en-US) +// identifier: The id parameter specifies a comma-separated list of the +// YouTube channel category ID(s) for the resource(s) that are being +// retrieved. In a guideCategory resource, the id property specifies the +// YouTube channel category ID. +// regionCode: The regionCode parameter instructs the API to return the list +// of guide categories available in the specified country. The parameter +// value is an ISO 3166-1 alpha-2 country code. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeReadonly +// kGTLAuthScopeYouTubeYoutubepartner +// Fetches a GTLYouTubeGuideCategoryListResponse. ++ (id)queryForGuideCategoriesListWithPart:(NSString *)part; + +#pragma mark - +#pragma mark "playlistItems" methods +// These create a GTLQueryYouTube object. + +// Method: youtube.playlistItems.delete +// Deletes a playlist item. +// Required: +// identifier: The id parameter specifies the YouTube playlist item ID for the +// playlist item that is being deleted. In a playlistItem resource, the id +// property specifies the playlist item's ID. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeYoutubepartner ++ (id)queryForPlaylistItemsDeleteWithIdentifier:(NSString *)identifier; + +// Method: youtube.playlistItems.insert +// Adds a resource to a playlist. +// Required: +// part: The part parameter serves two purposes in this operation. It +// identifies the properties that the write operation will set as well as +// the properties that the API response will include. +// The part names that you can include in the parameter value are snippet +// and contentDetails. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeYoutubepartner +// Fetches a GTLYouTubePlaylistItem. ++ (id)queryForPlaylistItemsInsertWithObject:(GTLYouTubePlaylistItem *)object + part:(NSString *)part; + +// Method: youtube.playlistItems.list +// Returns a collection of playlist items that match the API request parameters. +// You can retrieve all of the playlist items in a specified playlist or +// retrieve one or more playlist items by their unique IDs. +// Required: +// part: The part parameter specifies a comma-separated list of one or more +// playlistItem resource properties that the API response will include. The +// part names that you can include in the parameter value are id, snippet, +// and contentDetails. +// If the parameter identifies a property that contains child properties, +// the child properties will be included in the response. For example, in a +// playlistItem resource, the snippet property contains numerous fields, +// including the title, description, position, and resourceId properties. As +// such, if you set part=snippet, the API response will contain all of those +// properties. +// Optional: +// identifier: The id parameter specifies a comma-separated list of one or +// more unique playlist item IDs. +// maxResults: USE_DESCRIPTION --- channels:list:maxResults (0..50, default 5) +// pageToken: USE_DESCRIPTION --- channels:list:pageToken +// playlistId: The playlistId parameter specifies the unique ID of the +// playlist for which you want to retrieve playlist items. Note that even +// though this is an optional parameter, every request to retrieve playlist +// items must specify a value for either the id parameter or the playlistId +// parameter. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeReadonly +// kGTLAuthScopeYouTubeYoutubepartner +// Fetches a GTLYouTubePlaylistItemListResponse. ++ (id)queryForPlaylistItemsListWithPart:(NSString *)part; + +// Method: youtube.playlistItems.update +// Modifies a playlist item. For example, you could update the item's position +// in the playlist. +// Required: +// part: The part parameter serves two purposes in this operation. It +// identifies the properties that the write operation will set as well as +// the properties that the API response will include. +// The part names that you can include in the parameter value are snippet +// and contentDetails. +// Note that this method will override the existing values for all of the +// mutable properties that are contained in any parts that the parameter +// value specifies. For example, a playlist item can specify a start time +// and end time, which identify the times portion of the video that should +// play when users watch the video in the playlist. If your request is +// updating a playlist item that sets these values, and the request's part +// parameter value includes the contentDetails part, the playlist item's +// start and end times will be updated to whatever value the request body +// specifies. If the request body does not specify values, the existing +// start and end times will be removed and replaced with the default +// settings. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeYoutubepartner +// Fetches a GTLYouTubePlaylistItem. ++ (id)queryForPlaylistItemsUpdateWithObject:(GTLYouTubePlaylistItem *)object + part:(NSString *)part; + +#pragma mark - +#pragma mark "playlists" methods +// These create a GTLQueryYouTube object. + +// Method: youtube.playlists.delete +// Deletes a playlist. +// Required: +// identifier: The id parameter specifies the YouTube playlist ID for the +// playlist that is being deleted. In a playlist resource, the id property +// specifies the playlist's ID. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeYoutubepartner ++ (id)queryForPlaylistsDeleteWithIdentifier:(NSString *)identifier; + +// Method: youtube.playlists.insert +// Creates a playlist. +// Required: +// part: The part parameter serves two purposes in this operation. It +// identifies the properties that the write operation will set as well as +// the properties that the API response will include. +// The part names that you can include in the parameter value are snippet +// and status. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeYoutubepartner +// Fetches a GTLYouTubePlaylist. ++ (id)queryForPlaylistsInsertWithObject:(GTLYouTubePlaylist *)object + part:(NSString *)part; + +// Method: youtube.playlists.list +// Returns a collection of playlists that match the API request parameters. For +// example, you can retrieve all playlists that the authenticated user owns, or +// you can retrieve one or more playlists by their unique IDs. +// Required: +// part: The part parameter specifies a comma-separated list of one or more +// playlist resource properties that the API response will include. The part +// names that you can include in the parameter value are id, snippet, and +// status. +// If the parameter identifies a property that contains child properties, +// the child properties will be included in the response. For example, in a +// playlist resource, the snippet property contains properties like author, +// title, description, tags, and timeCreated. As such, if you set +// part=snippet, the API response will contain all of those properties. +// Optional: +// channelId: This value indicates that the API should only return the +// specified channel's playlists. +// identifier: The id parameter specifies a comma-separated list of the +// YouTube playlist ID(s) for the resource(s) that are being retrieved. In a +// playlist resource, the id property specifies the playlist's YouTube +// playlist ID. +// maxResults: USE_DESCRIPTION --- channels:list:maxResults (0..50, default 5) +// mine: Set this parameter's value to true to instruct the API to only return +// playlists owned by the authenticated user. +// pageToken: USE_DESCRIPTION --- channels:list:pageToken +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeReadonly +// kGTLAuthScopeYouTubeYoutubepartner +// Fetches a GTLYouTubePlaylistListResponse. ++ (id)queryForPlaylistsListWithPart:(NSString *)part; + +// Method: youtube.playlists.update +// Modifies a playlist. For example, you could change a playlist's title, +// description, or privacy status. +// Required: +// part: The part parameter serves two purposes in this operation. It +// identifies the properties that the write operation will set as well as +// the properties that the API response will include. +// The part names that you can include in the parameter value are snippet +// and status. +// Note that this method will override the existing values for all of the +// mutable properties that are contained in any parts that the parameter +// value specifies. For example, a playlist's privacy setting is contained +// in the status part. As such, if your request is updating a private +// playlist, and the request's part parameter value includes the status +// part, the playlist's privacy setting will be updated to whatever value +// the request body specifies. If the request body does not specify a value, +// the existing privacy setting will be removed and the playlist will revert +// to the default privacy setting. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeYoutubepartner +// Fetches a GTLYouTubePlaylist. ++ (id)queryForPlaylistsUpdateWithObject:(GTLYouTubePlaylist *)object + part:(NSString *)part; + +#pragma mark - +#pragma mark "search" methods +// These create a GTLQueryYouTube object. + +// Method: youtube.search.list +// Returns a collection of search results that match the query parameters +// specified in the API request. By default, a search result set identifies +// matching video, channel, and playlist resources, but you can also configure +// queries to only retrieve a specific type of resource. +// Required: +// part: The part parameter specifies a comma-separated list of one or more +// search resource properties that the API response will include. The part +// names that you can include in the parameter value are id and snippet. +// If the parameter identifies a property that contains child properties, +// the child properties will be included in the response. For example, in a +// search result, the snippet property contains other properties that +// identify the result's title, description, and so forth. If you set +// part=snippet, the API response will also contain all of those nested +// properties. +// Optional: +// maxResults: USE_DESCRIPTION --- channels:list:maxResults (0..50, default 5) +// order: The order parameter specifies the method that will be used to order +// resources in the API response. (Default "SEARCH_SORT_RELEVANCE") +// kGTLYouTubeOrderDate: Resources are sorted in reverse chronological +// order based on the date they were created. +// kGTLYouTubeOrderRating: Resources are sorted from highest to lowest +// rating. +// kGTLYouTubeOrderRelevance: Resources are sorted based on their relevance +// to the search query. This is the default value for this parameter. +// kGTLYouTubeOrderViewCount: Resources are sorted from highest to lowest +// number of views. +// pageToken: USE_DESCRIPTION --- channels:list:pageToken +// published: The published parameter indicates that the API response should +// only contain resources created within the specified time period. +// kGTLYouTubePublishedAny: Do not filter results based on their creation +// date. This is the default value. +// kGTLYouTubePublishedThisMonth: Return videos that were uploaded within +// the past month. +// kGTLYouTubePublishedThisWeek: Return videos that were uploaded within +// the past week. +// kGTLYouTubePublishedToday: Return videos that were uploaded today. +// q: The q parameter specifies the query term to search for. +// relatedToVideoId: The relatedToVideoId parameter retrieves a list of videos +// that are related to the video that the parameter value identifies. The +// parameter value must be set to a YouTube video ID and, if you are using +// this parameter, the type parameter must be set to video. +// topicId: The topicId parameter indicates that the API response should only +// contain resources associated with the specified topic. The value +// identifies a Freebase topic ID. +// type: The type parameter restricts a search query to only retrieve a +// particular type of resource. (Default video,channel,playlist) +// videoCaption: The videoCaption parameter indicates whether the API should +// filter video search results based on whether they have captions. +// kGTLYouTubeVideoCaptionAny: Do not filter results based on caption +// availability. +// kGTLYouTubeVideoCaptionClosedCaption: Only include videos that have +// captions. +// kGTLYouTubeVideoCaptionNone: Only include videos that do not have +// captions. +// videoDefinition: The videoDefinition parameter lets you restrict a search +// to only include either high definition (HD) or standard definition (SD) +// videos. HD videos are available for playback in at least 720p, though +// higher resolutions, like 1080p, might also be available. +// kGTLYouTubeVideoDefinitionAny: Return all videos, regardless of their +// resolution. +// kGTLYouTubeVideoDefinitionHigh: Only retrieve HD videos. +// kGTLYouTubeVideoDefinitionStandard: Only retrieve videos in standard +// definition. +// videoDimension: The videoDimension parameter lets you restrict a search to +// only retrieve 2D or 3D videos. +// kGTLYouTubeVideoDimensionX2d: Restrict search results to exclude 3D +// videos. +// kGTLYouTubeVideoDimensionX3d: Restrict search results to only include 3D +// videos. +// kGTLYouTubeVideoDimensionAny: Include both 3D and non-3D videos in +// returned results. This is the default value. +// videoDuration: The videoDuration parameter filters video search results +// based on their duration. +// kGTLYouTubeVideoDurationAny: Do not filter video search results based on +// their duration. This is the default value. +// kGTLYouTubeVideoDurationLong: Only include videos longer than 20 +// minutes. +// kGTLYouTubeVideoDurationMedium: Only include videos that are between +// four and 20 minutes long (inclusive). +// kGTLYouTubeVideoDurationShort: Only include videos that are less than +// four minutes long. +// videoLicense: The videoLicense parameter filters search results to only +// include videos with a particular license. YouTube lets video uploaders +// choose to attach either the Creative Commons license or the standard +// YouTube license to each of their videos. +// kGTLYouTubeVideoLicenseAny: Return all videos, regardless of which +// license they have, that match the query parameters. +// kGTLYouTubeVideoLicenseCreativeCommon: Only return videos that have a +// Creative Commons license. Users can reuse videos with this license in +// other videos that they create. Learn more. +// kGTLYouTubeVideoLicenseYoutube: Only return videos that have the +// standard YouTube license. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeReadonly +// kGTLAuthScopeYouTubeYoutubepartner +// Fetches a GTLYouTubeSearchListResponse. ++ (id)queryForSearchListWithPart:(NSString *)part; + +#pragma mark - +#pragma mark "subscriptions" methods +// These create a GTLQueryYouTube object. + +// Method: youtube.subscriptions.delete +// Deletes a subscription. +// Required: +// identifier: The id parameter specifies the YouTube subscription ID for the +// resource that is being deleted. In a subscription resource, the id +// property specifies the YouTube subscription ID. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeYoutubepartner ++ (id)queryForSubscriptionsDeleteWithIdentifier:(NSString *)identifier; + +// Method: youtube.subscriptions.insert +// Adds a subscription for the authenticated user's channel. +// Required: +// part: The part parameter serves two purposes in this operation. It +// identifies the properties that the write operation will set as well as +// the properties that the API response will include. +// The part names that you can include in the parameter value are snippet +// and contentDetails. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeYoutubepartner +// Fetches a GTLYouTubeSubscription. ++ (id)queryForSubscriptionsInsertWithObject:(GTLYouTubeSubscription *)object + part:(NSString *)part; + +// Method: youtube.subscriptions.list +// Returns subscription resources that match the API request criteria. +// Required: +// part: The part parameter specifies a comma-separated list of one or more +// subscription resource properties that the API response will include. The +// part names that you can include in the parameter value are id, snippet, +// and contentDetails. +// If the parameter identifies a property that contains child properties, +// the child properties will be included in the response. For example, in a +// subscription resource, the snippet property contains other properties, +// such as a display title for the subscription. If you set part=snippet, +// the API response will also contain all of those nested properties. +// Optional: +// channelId: The channelId parameter specifies a YouTube channel ID. The API +// will only return that channel's subscriptions. +// forChannelId: The forChannelId parameter specifies a comma-separated list +// of channel IDs. The API response will then only contain subscriptions +// matching those channels. +// identifier: The id parameter specifies a comma-separated list of the +// YouTube subscription ID(s) for the resource(s) that are being retrieved. +// In a subscription resource, the id property specifies the YouTube +// subscription ID. +// maxResults: USE_DESCRIPTION --- channels:list:maxResults (0..50, default 5) +// mine: Set this parameter's value to true to retrieve a feed of the +// authenticated user's subscriptions. +// order: The order parameter specifies the method that will be used to sort +// resources in the API response. (Default "SUBSCRIPTION_ORDER_RELEVANCE") +// kGTLYouTubeOrderAlphabetical: Sort alphabetically. +// kGTLYouTubeOrderRelevance: Sort by relevance. +// kGTLYouTubeOrderUnread: Sort by order of activity. +// pageToken: USE_DESCRIPTION --- channels:list:pageToken +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeYoutubepartner +// Fetches a GTLYouTubeSubscriptionListResponse. ++ (id)queryForSubscriptionsListWithPart:(NSString *)part; + +#pragma mark - +#pragma mark "videoCategories" methods +// These create a GTLQueryYouTube object. + +// Method: youtube.videoCategories.list +// Returns a list of categories that can be associated with YouTube videos. +// Required: +// part: The part parameter specifies the videoCategory resource parts that +// the API response will include. Supported values are id and snippet. +// Optional: +// hl: The hl parameter specifies the language that should be used for text +// values in the API response. (Default en_US) +// identifier: The id parameter specifies a comma-separated list of video +// category IDs for the resources that you are retrieving. +// regionCode: The regionCode parameter instructs the API to return the list +// of video categories available in the specified country. The parameter +// value is an ISO 3166-1 alpha-2 country code. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeReadonly +// kGTLAuthScopeYouTubeYoutubepartner +// Fetches a GTLYouTubeVideoCategoryListResponse. ++ (id)queryForVideoCategoriesListWithPart:(NSString *)part; + +#pragma mark - +#pragma mark "videos" methods +// These create a GTLQueryYouTube object. + +// Method: youtube.videos.delete +// Deletes a YouTube video. +// Required: +// identifier: The id parameter specifies the YouTube video ID for the +// resource that is being deleted. In a video resource, the id property +// specifies the video's ID. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeYoutubepartner ++ (id)queryForVideosDeleteWithIdentifier:(NSString *)identifier; + +// Method: youtube.videos.insert +// Uploads a video to YouTube and optionally sets the video's metadata. +// Required: +// part: The part parameter serves two purposes in this operation. It +// identifies the properties that the write operation will set as well as +// the properties that the API response will include. +// The part names that you can include in the parameter value are snippet, +// contentDetails, player, statistics, status, and topicDetails. However, +// not all of those parts contain properties that can be set when setting or +// updating a video's metadata. For example, the statistics object +// encapsulates statistics that YouTube calculates for a video and does not +// contain values that you can set or modify. If the parameter value +// specifies a part that does not contain mutable values, that part will +// still be included in the API response. +// Upload Parameters: +// Maximum size: 64GB +// Accepted MIME type(s): application/octet-stream, video/* +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeUpload +// Fetches a GTLYouTubeVideo. ++ (id)queryForVideosInsertWithObject:(GTLYouTubeVideo *)object + part:(NSString *)part + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil; + +// Method: youtube.videos.list +// Returns a list of videos that match the API request parameters. +// Required: +// identifier: The id parameter specifies a comma-separated list of the +// YouTube video ID(s) for the resource(s) that are being retrieved. In a +// video resource, the id property specifies the video's ID. +// part: The part parameter specifies a comma-separated list of one or more +// video resource properties that the API response will include. The part +// names that you can include in the parameter value are id, snippet, +// contentDetails, player, statistics, status, and topicDetails. +// If the parameter identifies a property that contains child properties, +// the child properties will be included in the response. For example, in a +// video resource, the snippet property contains the channelId, title, +// description, tags, and categoryId properties. As such, if you set +// part=snippet, the API response will contain all of those properties. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeReadonly +// kGTLAuthScopeYouTubeYoutubepartner +// Fetches a GTLYouTubeVideoListResponse. ++ (id)queryForVideosListWithIdentifier:(NSString *)identifier + part:(NSString *)part; + +// Method: youtube.videos.update +// Updates a video's metadata. +// Required: +// part: The part parameter serves two purposes in this operation. It +// identifies the properties that the write operation will set as well as +// the properties that the API response will include. +// The part names that you can include in the parameter value are snippet, +// contentDetails, player, statistics, status, and topicDetails. +// Note that this method will override the existing values for all of the +// mutable properties that are contained in any parts that the parameter +// value specifies. For example, a video's privacy setting is contained in +// the status part. As such, if your request is updating a private video, +// and the request's part parameter value includes the status part, the +// video's privacy setting will be updated to whatever value the request +// body specifies. If the request body does not specify a value, the +// existing privacy setting will be removed and the video will revert to the +// default privacy setting. +// In addition, not all of those parts contain properties that can be set +// when setting or updating a video's metadata. For example, the statistics +// object encapsulates statistics that YouTube calculates for a video and +// does not contain values that you can set or modify. If the parameter +// value specifies a part that does not contain mutable values, that part +// will still be included in the API response. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeYoutubepartner +// Fetches a GTLYouTubeVideo. ++ (id)queryForVideosUpdateWithObject:(GTLYouTubeVideo *)object + part:(NSString *)part; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLQueryYouTube.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLQueryYouTube.m.svn-base new file mode 100644 index 0000000..288a5cc --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLQueryYouTube.m.svn-base @@ -0,0 +1,315 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLQueryYouTube.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLQueryYouTube (21 custom class methods, 27 custom properties) + +#import "GTLQueryYouTube.h" + +#import "GTLYouTubeActivity.h" +#import "GTLYouTubeActivityListResponse.h" +#import "GTLYouTubeChannelListResponse.h" +#import "GTLYouTubeGuideCategoryListResponse.h" +#import "GTLYouTubePlaylist.h" +#import "GTLYouTubePlaylistItem.h" +#import "GTLYouTubePlaylistItemListResponse.h" +#import "GTLYouTubePlaylistListResponse.h" +#import "GTLYouTubeSearchListResponse.h" +#import "GTLYouTubeSubscription.h" +#import "GTLYouTubeSubscriptionListResponse.h" +#import "GTLYouTubeVideo.h" +#import "GTLYouTubeVideoCategoryListResponse.h" +#import "GTLYouTubeVideoListResponse.h" + +@implementation GTLQueryYouTube + +@dynamic categoryId, channelId, fields, forChannelId, hl, home, identifier, + maxResults, mine, mySubscribers, order, pageToken, part, playlistId, + published, publishedAfter, publishedBefore, q, regionCode, + relatedToVideoId, topicId, type, videoCaption, videoDefinition, + videoDimension, videoDuration, videoLicense; + ++ (NSDictionary *)parameterNameMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"id" + forKey:@"identifier"]; + return map; +} + +#pragma mark - +#pragma mark "activities" methods +// These create a GTLQueryYouTube object. + ++ (id)queryForActivitiesInsertWithObject:(GTLYouTubeActivity *)object + part:(NSString *)part { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"youtube.activities.insert"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.part = part; + query.expectedObjectClass = [GTLYouTubeActivity class]; + return query; +} + ++ (id)queryForActivitiesListWithPart:(NSString *)part { + NSString *methodName = @"youtube.activities.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubeActivityListResponse class]; + return query; +} + +#pragma mark - +#pragma mark "channels" methods +// These create a GTLQueryYouTube object. + ++ (id)queryForChannelsListWithPart:(NSString *)part { + NSString *methodName = @"youtube.channels.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubeChannelListResponse class]; + return query; +} + +#pragma mark - +#pragma mark "guideCategories" methods +// These create a GTLQueryYouTube object. + ++ (id)queryForGuideCategoriesListWithPart:(NSString *)part { + NSString *methodName = @"youtube.guideCategories.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubeGuideCategoryListResponse class]; + return query; +} + +#pragma mark - +#pragma mark "playlistItems" methods +// These create a GTLQueryYouTube object. + ++ (id)queryForPlaylistItemsDeleteWithIdentifier:(NSString *)identifier { + NSString *methodName = @"youtube.playlistItems.delete"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.identifier = identifier; + return query; +} + ++ (id)queryForPlaylistItemsInsertWithObject:(GTLYouTubePlaylistItem *)object + part:(NSString *)part { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"youtube.playlistItems.insert"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.part = part; + query.expectedObjectClass = [GTLYouTubePlaylistItem class]; + return query; +} + ++ (id)queryForPlaylistItemsListWithPart:(NSString *)part { + NSString *methodName = @"youtube.playlistItems.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubePlaylistItemListResponse class]; + return query; +} + ++ (id)queryForPlaylistItemsUpdateWithObject:(GTLYouTubePlaylistItem *)object + part:(NSString *)part { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"youtube.playlistItems.update"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.part = part; + query.expectedObjectClass = [GTLYouTubePlaylistItem class]; + return query; +} + +#pragma mark - +#pragma mark "playlists" methods +// These create a GTLQueryYouTube object. + ++ (id)queryForPlaylistsDeleteWithIdentifier:(NSString *)identifier { + NSString *methodName = @"youtube.playlists.delete"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.identifier = identifier; + return query; +} + ++ (id)queryForPlaylistsInsertWithObject:(GTLYouTubePlaylist *)object + part:(NSString *)part { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"youtube.playlists.insert"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.part = part; + query.expectedObjectClass = [GTLYouTubePlaylist class]; + return query; +} + ++ (id)queryForPlaylistsListWithPart:(NSString *)part { + NSString *methodName = @"youtube.playlists.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubePlaylistListResponse class]; + return query; +} + ++ (id)queryForPlaylistsUpdateWithObject:(GTLYouTubePlaylist *)object + part:(NSString *)part { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"youtube.playlists.update"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.part = part; + query.expectedObjectClass = [GTLYouTubePlaylist class]; + return query; +} + +#pragma mark - +#pragma mark "search" methods +// These create a GTLQueryYouTube object. + ++ (id)queryForSearchListWithPart:(NSString *)part { + NSString *methodName = @"youtube.search.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubeSearchListResponse class]; + return query; +} + +#pragma mark - +#pragma mark "subscriptions" methods +// These create a GTLQueryYouTube object. + ++ (id)queryForSubscriptionsDeleteWithIdentifier:(NSString *)identifier { + NSString *methodName = @"youtube.subscriptions.delete"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.identifier = identifier; + return query; +} + ++ (id)queryForSubscriptionsInsertWithObject:(GTLYouTubeSubscription *)object + part:(NSString *)part { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"youtube.subscriptions.insert"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.part = part; + query.expectedObjectClass = [GTLYouTubeSubscription class]; + return query; +} + ++ (id)queryForSubscriptionsListWithPart:(NSString *)part { + NSString *methodName = @"youtube.subscriptions.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubeSubscriptionListResponse class]; + return query; +} + +#pragma mark - +#pragma mark "videoCategories" methods +// These create a GTLQueryYouTube object. + ++ (id)queryForVideoCategoriesListWithPart:(NSString *)part { + NSString *methodName = @"youtube.videoCategories.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubeVideoCategoryListResponse class]; + return query; +} + +#pragma mark - +#pragma mark "videos" methods +// These create a GTLQueryYouTube object. + ++ (id)queryForVideosDeleteWithIdentifier:(NSString *)identifier { + NSString *methodName = @"youtube.videos.delete"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.identifier = identifier; + return query; +} + ++ (id)queryForVideosInsertWithObject:(GTLYouTubeVideo *)object + part:(NSString *)part + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"youtube.videos.insert"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.part = part; + query.uploadParameters = uploadParametersOrNil; + query.expectedObjectClass = [GTLYouTubeVideo class]; + return query; +} + ++ (id)queryForVideosListWithIdentifier:(NSString *)identifier + part:(NSString *)part { + NSString *methodName = @"youtube.videos.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.identifier = identifier; + query.part = part; + query.expectedObjectClass = [GTLYouTubeVideoListResponse class]; + return query; +} + ++ (id)queryForVideosUpdateWithObject:(GTLYouTubeVideo *)object + part:(NSString *)part { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"youtube.videos.update"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.part = part; + query.expectedObjectClass = [GTLYouTubeVideo class]; + return query; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLServiceYouTube.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLServiceYouTube.h.svn-base new file mode 100644 index 0000000..72958f9 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLServiceYouTube.h.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceYouTube.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLServiceYouTube (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLService.h" +#else + #import "GTLService.h" +#endif + +@interface GTLServiceYouTube : GTLService + +// No new methods + +// Clients should create a standard query with any of the class methods in +// GTLQueryYouTube.h. The query can the be sent with GTLService's execute +// methods, +// +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// completionHandler:(void (^)(GTLServiceTicket *ticket, +// id object, NSError *error))handler; +// or +// - (GTLServiceTicket *)executeQuery:(GTLQuery *)query +// delegate:(id)delegate +// didFinishSelector:(SEL)finishedSelector; +// +// where finishedSelector has a signature of: +// +// - (void)serviceTicket:(GTLServiceTicket *)ticket +// finishedWithObject:(id)object +// error:(NSError *)error; +// +// The object passed to the completion handler or delegate method +// is a subclass of GTLObject, determined by the query method executed. + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLServiceYouTube.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLServiceYouTube.m.svn-base new file mode 100644 index 0000000..f416dac --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLServiceYouTube.m.svn-base @@ -0,0 +1,106 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLServiceYouTube.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLServiceYouTube (0 custom class methods, 0 custom properties) + +#import "GTLYouTube.h" + +@implementation GTLServiceYouTube + +#if DEBUG +// Method compiled in debug builds just to check that all the needed support +// classes are present at link time. ++ (NSArray *)checkClasses { + NSArray *classes = [NSArray arrayWithObjects: + [GTLQueryYouTube class], + [GTLYouTubeActivity class], + [GTLYouTubeActivityContentDetails class], + [GTLYouTubeActivityListResponse class], + [GTLYouTubeActivitySnippet class], + [GTLYouTubeChannel class], + [GTLYouTubeChannelContentDetails class], + [GTLYouTubeChannelListResponse class], + [GTLYouTubeChannelSnippet class], + [GTLYouTubeChannelStatistics class], + [GTLYouTubeChannelStatus class], + [GTLYouTubeChannelTopicDetails class], + [GTLYouTubeGeoPoint class], + [GTLYouTubeGuideCategory class], + [GTLYouTubeGuideCategoryListResponse class], + [GTLYouTubeGuideCategorySnippet class], + [GTLYouTubePageInfo class], + [GTLYouTubePlaylist class], + [GTLYouTubePlaylistItem class], + [GTLYouTubePlaylistItemContentDetails class], + [GTLYouTubePlaylistItemListResponse class], + [GTLYouTubePlaylistItemSnippet class], + [GTLYouTubePlaylistListResponse class], + [GTLYouTubePlaylistSnippet class], + [GTLYouTubePlaylistStatus class], + [GTLYouTubeResourceId class], + [GTLYouTubeSearchListResponse class], + [GTLYouTubeSearchResult class], + [GTLYouTubeSearchResultSnippet class], + [GTLYouTubeSubscription class], + [GTLYouTubeSubscriptionContentDetails class], + [GTLYouTubeSubscriptionListResponse class], + [GTLYouTubeSubscriptionSnippet class], + [GTLYouTubeThumbnail class], + [GTLYouTubeVideo class], + [GTLYouTubeVideoCategory class], + [GTLYouTubeVideoCategoryListResponse class], + [GTLYouTubeVideoCategorySnippet class], + [GTLYouTubeVideoContentDetails class], + [GTLYouTubeVideoListResponse class], + [GTLYouTubeVideoPlayer class], + [GTLYouTubeVideoRecordingDetails class], + [GTLYouTubeVideoSnippet class], + [GTLYouTubeVideoStatistics class], + [GTLYouTubeVideoStatus class], + [GTLYouTubeVideoTopicDetails class], + nil]; + return classes; +} +#endif // DEBUG + +- (id)init { + self = [super init]; + if (self) { + // Version from discovery. + self.apiVersion = @"v3"; + + // From discovery. Where to send JSON-RPC. + // Turn off prettyPrint for this service to save bandwidth (especially on + // mobile). The fetcher logging will pretty print. + self.rpcURL = [NSURL URLWithString:@"https://www.googleapis.com/rpc?prettyPrint=false"]; + self.rpcUploadURL = [NSURL URLWithString:@"https://www.googleapis.com/upload/rpc?uploadType=resumable&prettyPrint=false"]; + } + return self; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTube.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTube.h.svn-base new file mode 100644 index 0000000..e2a7b2d --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTube.h.svn-base @@ -0,0 +1,78 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTube.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube + +#import "GTLYouTubeConstants.h" + +#import "GTLYouTubeActivity.h" +#import "GTLYouTubeActivityContentDetails.h" +#import "GTLYouTubeActivityListResponse.h" +#import "GTLYouTubeActivitySnippet.h" +#import "GTLYouTubeChannel.h" +#import "GTLYouTubeChannelContentDetails.h" +#import "GTLYouTubeChannelListResponse.h" +#import "GTLYouTubeChannelSnippet.h" +#import "GTLYouTubeChannelStatistics.h" +#import "GTLYouTubeChannelStatus.h" +#import "GTLYouTubeChannelTopicDetails.h" +#import "GTLYouTubeGeoPoint.h" +#import "GTLYouTubeGuideCategory.h" +#import "GTLYouTubeGuideCategoryListResponse.h" +#import "GTLYouTubeGuideCategorySnippet.h" +#import "GTLYouTubePageInfo.h" +#import "GTLYouTubePlaylist.h" +#import "GTLYouTubePlaylistItem.h" +#import "GTLYouTubePlaylistItemContentDetails.h" +#import "GTLYouTubePlaylistItemListResponse.h" +#import "GTLYouTubePlaylistItemSnippet.h" +#import "GTLYouTubePlaylistListResponse.h" +#import "GTLYouTubePlaylistSnippet.h" +#import "GTLYouTubePlaylistStatus.h" +#import "GTLYouTubeResourceId.h" +#import "GTLYouTubeSearchListResponse.h" +#import "GTLYouTubeSearchResult.h" +#import "GTLYouTubeSearchResultSnippet.h" +#import "GTLYouTubeSubscription.h" +#import "GTLYouTubeSubscriptionContentDetails.h" +#import "GTLYouTubeSubscriptionListResponse.h" +#import "GTLYouTubeSubscriptionSnippet.h" +#import "GTLYouTubeThumbnail.h" +#import "GTLYouTubeVideo.h" +#import "GTLYouTubeVideoCategory.h" +#import "GTLYouTubeVideoCategoryListResponse.h" +#import "GTLYouTubeVideoCategorySnippet.h" +#import "GTLYouTubeVideoContentDetails.h" +#import "GTLYouTubeVideoListResponse.h" +#import "GTLYouTubeVideoPlayer.h" +#import "GTLYouTubeVideoRecordingDetails.h" +#import "GTLYouTubeVideoSnippet.h" +#import "GTLYouTubeVideoStatistics.h" +#import "GTLYouTubeVideoStatus.h" +#import "GTLYouTubeVideoTopicDetails.h" + +#import "GTLQueryYouTube.h" +#import "GTLServiceYouTube.h" diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeActivity.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeActivity.h.svn-base new file mode 100644 index 0000000..06702ff --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeActivity.h.svn-base @@ -0,0 +1,75 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeActivity.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeActivity (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeActivityContentDetails; +@class GTLYouTubeActivitySnippet; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivity +// + +// An activity resource contains information about an action that a particular +// channel, or user, has taken on YouTube. The actions reported in activity +// feeds include rating a video, sharing a video, marking a video as a favorite, +// commenting on a video, uploading a video, and so forth. Each activity +// resource identifies the type of action, the channel associated with the +// action, and the resource(s) associated with the action, such as the video +// that was rated or uploaded. + +@interface GTLYouTubeActivity : GTLObject + +// The contentDetails object contains information about the content associated +// with the activity. For example, if the snippet.type value is videoRated, then +// the contentDetails object's content identifies the rated video. +@property (retain) GTLYouTubeActivityContentDetails *contentDetails; + +// The ETag of the activity resource. +@property (copy) NSString *ETag; + +// The ID that YouTube uses to uniquely identify the activity. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The type of the API resource. For activity resources, the value will be +// youtube#activity. +@property (copy) NSString *kind; + +// The snippet object contains basic details about the activity, including the +// activity's type and group ID. +@property (retain) GTLYouTubeActivitySnippet *snippet; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeActivity.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeActivity.m.svn-base new file mode 100644 index 0000000..9e1d095 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeActivity.m.svn-base @@ -0,0 +1,57 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeActivity.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeActivity (0 custom class methods, 5 custom properties) + +#import "GTLYouTubeActivity.h" + +#import "GTLYouTubeActivityContentDetails.h" +#import "GTLYouTubeActivitySnippet.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivity +// + +@implementation GTLYouTubeActivity +@dynamic contentDetails, ETag, identifier, kind, snippet; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#activity"]; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeActivityContentDetails.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeActivityContentDetails.h.svn-base new file mode 100644 index 0000000..09fed2a --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeActivityContentDetails.h.svn-base @@ -0,0 +1,256 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeActivityContentDetails.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeActivityContentDetails (0 custom class methods, 9 custom properties) +// GTLYouTubeActivityContentDetailsBulletin (0 custom class methods, 1 custom properties) +// GTLYouTubeActivityContentDetailsComment (0 custom class methods, 1 custom properties) +// GTLYouTubeActivityContentDetailsFavorite (0 custom class methods, 1 custom properties) +// GTLYouTubeActivityContentDetailsLike (0 custom class methods, 1 custom properties) +// GTLYouTubeActivityContentDetailsPlaylistItem (0 custom class methods, 3 custom properties) +// GTLYouTubeActivityContentDetailsRecommendation (0 custom class methods, 3 custom properties) +// GTLYouTubeActivityContentDetailsSocial (0 custom class methods, 5 custom properties) +// GTLYouTubeActivityContentDetailsSubscription (0 custom class methods, 1 custom properties) +// GTLYouTubeActivityContentDetailsUpload (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeActivityContentDetailsBulletin; +@class GTLYouTubeActivityContentDetailsComment; +@class GTLYouTubeActivityContentDetailsFavorite; +@class GTLYouTubeActivityContentDetailsLike; +@class GTLYouTubeActivityContentDetailsPlaylistItem; +@class GTLYouTubeActivityContentDetailsRecommendation; +@class GTLYouTubeActivityContentDetailsSocial; +@class GTLYouTubeActivityContentDetailsSubscription; +@class GTLYouTubeActivityContentDetailsUpload; +@class GTLYouTubeResourceId; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivityContentDetails +// + +// Details about the content of an activity: the video that was shared, the +// channel that was subscribed to, etc. + +@interface GTLYouTubeActivityContentDetails : GTLObject + +// The bulletin object contains details about a channel bulletin post. This +// object is only present if the snippet.type is bulletin. +@property (retain) GTLYouTubeActivityContentDetailsBulletin *bulletin; + +// The comment object contains information about a resource that received a +// comment. This property is only present if the snippet.type is comment. +@property (retain) GTLYouTubeActivityContentDetailsComment *comment; + +// The favorite object contains information about a video that was marked as a +// favorite video. This property is only present if the snippet.type is +// favorite. +@property (retain) GTLYouTubeActivityContentDetailsFavorite *favorite; + +// The like object contains information about a resource that received a +// positive (like) rating. This property is only present if the snippet.type is +// like. +@property (retain) GTLYouTubeActivityContentDetailsLike *like; + +// The playlistItem object contains information about a new playlist item. This +// property is only present if the snippet.type is playlistItem. +@property (retain) GTLYouTubeActivityContentDetailsPlaylistItem *playlistItem; + +// The recommendation object contains information about a recommended resource. +// This property is only present if the snippet.type is recommendation. +@property (retain) GTLYouTubeActivityContentDetailsRecommendation *recommendation; + +// The social object contains details about a social network post. This property +// is only present if the snippet.type is social. +@property (retain) GTLYouTubeActivityContentDetailsSocial *social; + +// The subscription object contains information about a channel that a user +// subscribed to. This property is only present if the snippet.type is +// subscription. +@property (retain) GTLYouTubeActivityContentDetailsSubscription *subscription; + +// The upload object contains information about the uploaded video. This +// property is only present if the snippet.type is upload. +@property (retain) GTLYouTubeActivityContentDetailsUpload *upload; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivityContentDetailsBulletin +// + +@interface GTLYouTubeActivityContentDetailsBulletin : GTLObject + +// The resourceId object contains information that identifies the resource +// associated with a bulletin post. +@property (retain) GTLYouTubeResourceId *resourceId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivityContentDetailsComment +// + +@interface GTLYouTubeActivityContentDetailsComment : GTLObject + +// The resourceId object contains information that identifies the resource +// associated with the comment. +@property (retain) GTLYouTubeResourceId *resourceId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivityContentDetailsFavorite +// + +@interface GTLYouTubeActivityContentDetailsFavorite : GTLObject + +// The resourceId object contains information that identifies the resource that +// was marked as a favorite. +@property (retain) GTLYouTubeResourceId *resourceId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivityContentDetailsLike +// + +@interface GTLYouTubeActivityContentDetailsLike : GTLObject + +// The resourceId object contains information that identifies the rated +// resource. +@property (retain) GTLYouTubeResourceId *resourceId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivityContentDetailsPlaylistItem +// + +@interface GTLYouTubeActivityContentDetailsPlaylistItem : GTLObject + +// The value that YouTube uses to uniquely identify the playlist. +@property (copy) NSString *playlistId; + +// ID of the item within the playlist. +@property (copy) NSString *playlistItemId; + +// The resourceId object contains information about the resource that was added +// to the playlist. +@property (retain) GTLYouTubeResourceId *resourceId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivityContentDetailsRecommendation +// + +@interface GTLYouTubeActivityContentDetailsRecommendation : GTLObject + +// The reason that the resource is recommended to the user. +@property (copy) NSString *reason; + +// The resourceId object contains information that identifies the recommended +// resource. +@property (retain) GTLYouTubeResourceId *resourceId; + +// The seedResourceId object contains information about the resource that caused +// the recommendation. +@property (retain) GTLYouTubeResourceId *seedResourceId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivityContentDetailsSocial +// + +@interface GTLYouTubeActivityContentDetailsSocial : GTLObject + +// The author of the social network post. +@property (copy) NSString *author; + +// An image of the post's author. +@property (copy) NSString *imageUrl; + +// The URL of the social network post. +@property (copy) NSString *referenceUrl; + +// The resourceId object encapsulates information that identifies the resource +// associated with a social network post. +@property (retain) GTLYouTubeResourceId *resourceId; + +// The name of the social network. +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivityContentDetailsSubscription +// + +@interface GTLYouTubeActivityContentDetailsSubscription : GTLObject + +// The resourceId object contains information that identifies the resource that +// the user subscribed to. +@property (retain) GTLYouTubeResourceId *resourceId; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivityContentDetailsUpload +// + +@interface GTLYouTubeActivityContentDetailsUpload : GTLObject + +// The ID that YouTube uses to uniquely identify the uploaded video. +@property (copy) NSString *videoId; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeActivityContentDetails.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeActivityContentDetails.m.svn-base new file mode 100644 index 0000000..24743f6 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeActivityContentDetails.m.svn-base @@ -0,0 +1,142 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeActivityContentDetails.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeActivityContentDetails (0 custom class methods, 9 custom properties) +// GTLYouTubeActivityContentDetailsBulletin (0 custom class methods, 1 custom properties) +// GTLYouTubeActivityContentDetailsComment (0 custom class methods, 1 custom properties) +// GTLYouTubeActivityContentDetailsFavorite (0 custom class methods, 1 custom properties) +// GTLYouTubeActivityContentDetailsLike (0 custom class methods, 1 custom properties) +// GTLYouTubeActivityContentDetailsPlaylistItem (0 custom class methods, 3 custom properties) +// GTLYouTubeActivityContentDetailsRecommendation (0 custom class methods, 3 custom properties) +// GTLYouTubeActivityContentDetailsSocial (0 custom class methods, 5 custom properties) +// GTLYouTubeActivityContentDetailsSubscription (0 custom class methods, 1 custom properties) +// GTLYouTubeActivityContentDetailsUpload (0 custom class methods, 1 custom properties) + +#import "GTLYouTubeActivityContentDetails.h" + +#import "GTLYouTubeResourceId.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivityContentDetails +// + +@implementation GTLYouTubeActivityContentDetails +@dynamic bulletin, comment, favorite, like, playlistItem, recommendation, + social, subscription, upload; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivityContentDetailsBulletin +// + +@implementation GTLYouTubeActivityContentDetailsBulletin +@dynamic resourceId; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivityContentDetailsComment +// + +@implementation GTLYouTubeActivityContentDetailsComment +@dynamic resourceId; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivityContentDetailsFavorite +// + +@implementation GTLYouTubeActivityContentDetailsFavorite +@dynamic resourceId; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivityContentDetailsLike +// + +@implementation GTLYouTubeActivityContentDetailsLike +@dynamic resourceId; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivityContentDetailsPlaylistItem +// + +@implementation GTLYouTubeActivityContentDetailsPlaylistItem +@dynamic playlistId, playlistItemId, resourceId; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivityContentDetailsRecommendation +// + +@implementation GTLYouTubeActivityContentDetailsRecommendation +@dynamic reason, resourceId, seedResourceId; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivityContentDetailsSocial +// + +@implementation GTLYouTubeActivityContentDetailsSocial +@dynamic author, imageUrl, referenceUrl, resourceId, type; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivityContentDetailsSubscription +// + +@implementation GTLYouTubeActivityContentDetailsSubscription +@dynamic resourceId; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivityContentDetailsUpload +// + +@implementation GTLYouTubeActivityContentDetailsUpload +@dynamic videoId; +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeActivityListResponse.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeActivityListResponse.h.svn-base new file mode 100644 index 0000000..36580db --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeActivityListResponse.h.svn-base @@ -0,0 +1,74 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeActivityListResponse.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeActivityListResponse (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeActivity; +@class GTLYouTubePageInfo; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivityListResponse +// + +// A paginated list of activities returned as a response to +// youtube.activities.list calls. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLYouTubeActivityListResponse : GTLCollectionObject + +// The ETag of the response. +@property (copy) NSString *ETag; + +// A list of activities, or events, that match the request criteria. +@property (retain) NSArray *items; // of GTLYouTubeActivity + +// The type of the API response. For this operation, the value will be +// youtube#activityListResponse. +@property (copy) NSString *kind; + +// The token that can be used as the value of the pageToken parameter to +// retrieve the next page in the result set. +@property (copy) NSString *nextPageToken; + +// The pageInfo object encapsulates paging information for the result set. +@property (retain) GTLYouTubePageInfo *pageInfo; + +// The token that can be used as the value of the pageToken parameter to +// retrieve the previous page in the result set. +@property (copy) NSString *prevPageToken; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeActivityListResponse.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeActivityListResponse.m.svn-base new file mode 100644 index 0000000..8e72487 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeActivityListResponse.m.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeActivityListResponse.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeActivityListResponse (0 custom class methods, 6 custom properties) + +#import "GTLYouTubeActivityListResponse.h" + +#import "GTLYouTubeActivity.h" +#import "GTLYouTubePageInfo.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivityListResponse +// + +@implementation GTLYouTubeActivityListResponse +@dynamic ETag, items, kind, nextPageToken, pageInfo, prevPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLYouTubeActivity class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#activityListResponse"]; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeActivitySnippet.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeActivitySnippet.h.svn-base new file mode 100644 index 0000000..0169597 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeActivitySnippet.h.svn-base @@ -0,0 +1,96 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeActivitySnippet.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeActivitySnippet (0 custom class methods, 7 custom properties) +// GTLYouTubeActivitySnippetThumbnails (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeActivitySnippetThumbnails; +@class GTLYouTubeThumbnail; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivitySnippet +// + +// Basic details about an activity, including title, description, thumbnails, +// activity type and group. + +@interface GTLYouTubeActivitySnippet : GTLObject + +// The ID that YouTube uses to uniquely identify the channel associated with the +// activity. +@property (copy) NSString *channelId; + +// The description of the resource primarily associated with the activity. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The group ID associated with the activity. A group ID identifies user events +// that are associated with the same user and resource. For example, if a user +// rates a video and marks the same video as a favorite, the entries for those +// events would have the same group ID in the user's activity feed. In your user +// interface, you can avoid repetition by grouping events with the same groupId +// value. +@property (copy) NSString *groupId; + +// The date and time that the activity occurred. The value is specified in ISO +// 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +@property (retain) GTLDateTime *publishedAt; + +// A map of thumbnail images associated with the resource that is primarily +// associated with the activity. For each object in the map, the key is the name +// of the thumbnail image, and the value is an object that contains other +// information about the thumbnail. +@property (retain) GTLYouTubeActivitySnippetThumbnails *thumbnails; + +// The title of the resource primarily associated with the activity. +@property (copy) NSString *title; + +// The type of activity that the resource describes. +@property (copy) NSString *type; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivitySnippetThumbnails +// + +@interface GTLYouTubeActivitySnippetThumbnails : GTLObject +// This object is documented as having more properties that are +// GTLYouTubeThumbnail. Use -additionalJSONKeys and -additionalPropertyForName: +// to get the list of properties and then fetch them; or -additionalProperties +// to fetch them all at once. +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeActivitySnippet.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeActivitySnippet.m.svn-base new file mode 100644 index 0000000..ddf0b0f --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeActivitySnippet.m.svn-base @@ -0,0 +1,66 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeActivitySnippet.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeActivitySnippet (0 custom class methods, 7 custom properties) +// GTLYouTubeActivitySnippetThumbnails (0 custom class methods, 0 custom properties) + +#import "GTLYouTubeActivitySnippet.h" + +#import "GTLYouTubeThumbnail.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivitySnippet +// + +@implementation GTLYouTubeActivitySnippet +@dynamic channelId, descriptionProperty, groupId, publishedAt, thumbnails, + title, type; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeActivitySnippetThumbnails +// + +@implementation GTLYouTubeActivitySnippetThumbnails + ++ (Class)classForAdditionalProperties { + return [GTLYouTubeThumbnail class]; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannel.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannel.h.svn-base new file mode 100644 index 0000000..f93cdef --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannel.h.svn-base @@ -0,0 +1,82 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeChannel.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeChannel (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeChannelContentDetails; +@class GTLYouTubeChannelSnippet; +@class GTLYouTubeChannelStatistics; +@class GTLYouTubeChannelStatus; +@class GTLYouTubeChannelTopicDetails; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannel +// + +// A channel resource contains information about a YouTube channel. + +@interface GTLYouTubeChannel : GTLObject + +// The contentDetails object encapsulates information about the channel's +// content. +@property (retain) GTLYouTubeChannelContentDetails *contentDetails; + +// The ETag for the channel resource. +@property (copy) NSString *ETag; + +// The ID that YouTube uses to uniquely identify the channel. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The type of the API resource. For channel resources, the value will be +// youtube#channel. +@property (copy) NSString *kind; + +// The snippet object contains basic details about the channel, such as its +// title, description, and thumbnail images. +@property (retain) GTLYouTubeChannelSnippet *snippet; + +// The statistics object encapsulates statistics for the channel. +@property (retain) GTLYouTubeChannelStatistics *statistics; + +// The status object encapsulates information about the privacy status of the +// channel. +@property (retain) GTLYouTubeChannelStatus *status; + +// The topicDetails object encapsulates information about Freebase topics +// associated with the channel. +@property (retain) GTLYouTubeChannelTopicDetails *topicDetails; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannel.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannel.m.svn-base new file mode 100644 index 0000000..724e1b7 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannel.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeChannel.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeChannel (0 custom class methods, 8 custom properties) + +#import "GTLYouTubeChannel.h" + +#import "GTLYouTubeChannelContentDetails.h" +#import "GTLYouTubeChannelSnippet.h" +#import "GTLYouTubeChannelStatistics.h" +#import "GTLYouTubeChannelStatus.h" +#import "GTLYouTubeChannelTopicDetails.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannel +// + +@implementation GTLYouTubeChannel +@dynamic contentDetails, ETag, identifier, kind, snippet, statistics, status, + topicDetails; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#channel"]; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelContentDetails.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelContentDetails.h.svn-base new file mode 100644 index 0000000..6d28752 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelContentDetails.h.svn-base @@ -0,0 +1,88 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeChannelContentDetails.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeChannelContentDetails (0 custom class methods, 1 custom properties) +// GTLYouTubeChannelContentDetailsRelatedPlaylists (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeChannelContentDetailsRelatedPlaylists; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannelContentDetails +// + +// Details about the content of a channel. + +@interface GTLYouTubeChannelContentDetails : GTLObject + +// The relatedPlaylists object is a map that identifies playlists associated +// with the channel, such as the channel's uploaded videos or favorite videos. +// You can retrieve any of these playlists using the playlists.list method. +@property (retain) GTLYouTubeChannelContentDetailsRelatedPlaylists *relatedPlaylists; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannelContentDetailsRelatedPlaylists +// + +@interface GTLYouTubeChannelContentDetailsRelatedPlaylists : GTLObject + +// The ID of the playlist that contains the channel's favorite videos. Use the +// playlistItems.insert and playlistItems.delete to add or remove items from +// that list. +@property (copy) NSString *favorites; + +// The ID of the playlist that contains the channel's liked videos. Use the +// playlistItems.insert and playlistItems.delete to add or remove items from +// that list. +@property (copy) NSString *likes; + +// The ID of the playlist that contains the channel's uploaded videos. Use the +// videos.insert method to upload new videos and the videos.delete method to +// delete previously uploaded videos. +@property (copy) NSString *uploads; + +// The ID of the playlist that contains the channel's watch history. Use the +// playlistItems.insert and playlistItems.delete to add or remove items from +// that list. +@property (copy) NSString *watchHistory; + +// The ID of the channel's watch later playlist. Use the playlistItems.insert +// and playlistItems.delete to add or remove items from that list. +@property (copy) NSString *watchLater; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelContentDetails.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelContentDetails.m.svn-base new file mode 100644 index 0000000..8600fb3 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelContentDetails.m.svn-base @@ -0,0 +1,51 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeChannelContentDetails.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeChannelContentDetails (0 custom class methods, 1 custom properties) +// GTLYouTubeChannelContentDetailsRelatedPlaylists (0 custom class methods, 5 custom properties) + +#import "GTLYouTubeChannelContentDetails.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannelContentDetails +// + +@implementation GTLYouTubeChannelContentDetails +@dynamic relatedPlaylists; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannelContentDetailsRelatedPlaylists +// + +@implementation GTLYouTubeChannelContentDetailsRelatedPlaylists +@dynamic favorites, likes, uploads, watchHistory, watchLater; +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelListResponse.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelListResponse.h.svn-base new file mode 100644 index 0000000..f5d9c24 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelListResponse.h.svn-base @@ -0,0 +1,74 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeChannelListResponse.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeChannelListResponse (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeChannel; +@class GTLYouTubePageInfo; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannelListResponse +// + +// A paginated list of channels returned as the response to a +// youtube.channels.list call. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLYouTubeChannelListResponse : GTLCollectionObject + +// The ETag for the response. +@property (copy) NSString *ETag; + +// A list of channels that match the request criteria. +@property (retain) NSArray *items; // of GTLYouTubeChannel + +// The type of the API response. For this operation, the value will be +// youtube#channelListResponse. +@property (copy) NSString *kind; + +// The token that can be used as the value of the pageToken parameter to +// retrieve the next page in the result set. +@property (copy) NSString *nextPageToken; + +// The pageInfo object encapsulates paging information for the result set. +@property (retain) GTLYouTubePageInfo *pageInfo; + +// The token that can be used as the value of the pageToken parameter to +// retrieve the previous page in the result set. +@property (copy) NSString *prevPageToken; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelListResponse.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelListResponse.m.svn-base new file mode 100644 index 0000000..a16bf84 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelListResponse.m.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeChannelListResponse.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeChannelListResponse (0 custom class methods, 6 custom properties) + +#import "GTLYouTubeChannelListResponse.h" + +#import "GTLYouTubeChannel.h" +#import "GTLYouTubePageInfo.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannelListResponse +// + +@implementation GTLYouTubeChannelListResponse +@dynamic ETag, items, kind, nextPageToken, pageInfo, prevPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLYouTubeChannel class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#channelListResponse"]; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelSnippet.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelSnippet.h.svn-base new file mode 100644 index 0000000..d2c8ea9 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelSnippet.h.svn-base @@ -0,0 +1,82 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeChannelSnippet.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeChannelSnippet (0 custom class methods, 5 custom properties) +// GTLYouTubeChannelSnippetThumbnails (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeChannelSnippetThumbnails; +@class GTLYouTubeThumbnail; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannelSnippet +// + +// Basic details about a channel, including title, description and thumbnails. + +@interface GTLYouTubeChannelSnippet : GTLObject + +// The ID that YouTube uses to uniquely identify the channel. +@property (copy) NSString *channelId; + +// The channel's description. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The date and time that the channel was created. The value is specified in ISO +// 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +@property (retain) GTLDateTime *publishedAt; + +// A map of thumbnail images associated with the channel. For each object in the +// map, the key is the name of the thumbnail image, and the value is an object +// that contains other information about the thumbnail. +@property (retain) GTLYouTubeChannelSnippetThumbnails *thumbnails; + +// The channel's title. +@property (copy) NSString *title; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannelSnippetThumbnails +// + +@interface GTLYouTubeChannelSnippetThumbnails : GTLObject +// This object is documented as having more properties that are +// GTLYouTubeThumbnail. Use -additionalJSONKeys and -additionalPropertyForName: +// to get the list of properties and then fetch them; or -additionalProperties +// to fetch them all at once. +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelSnippet.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelSnippet.m.svn-base new file mode 100644 index 0000000..af3846d --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelSnippet.m.svn-base @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeChannelSnippet.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeChannelSnippet (0 custom class methods, 5 custom properties) +// GTLYouTubeChannelSnippetThumbnails (0 custom class methods, 0 custom properties) + +#import "GTLYouTubeChannelSnippet.h" + +#import "GTLYouTubeThumbnail.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannelSnippet +// + +@implementation GTLYouTubeChannelSnippet +@dynamic channelId, descriptionProperty, publishedAt, thumbnails, title; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannelSnippetThumbnails +// + +@implementation GTLYouTubeChannelSnippetThumbnails + ++ (Class)classForAdditionalProperties { + return [GTLYouTubeThumbnail class]; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelStatistics.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelStatistics.h.svn-base new file mode 100644 index 0000000..b8d55c5 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelStatistics.h.svn-base @@ -0,0 +1,59 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeChannelStatistics.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeChannelStatistics (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannelStatistics +// + +// Statistics about a channel: number of subscribers, number of videos in the +// channel, etc. + +@interface GTLYouTubeChannelStatistics : GTLObject + +// The number of comments for the channel. +@property (retain) NSNumber *commentCount; // unsignedLongLongValue + +// The number of subscribers that the channel has. +@property (retain) NSNumber *subscriberCount; // unsignedLongLongValue + +// The number of videos uploaded to the channel. +@property (retain) NSNumber *videoCount; // unsignedLongLongValue + +// The number of times the channel has been viewed. +@property (retain) NSNumber *viewCount; // unsignedLongLongValue + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelStatistics.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelStatistics.m.svn-base new file mode 100644 index 0000000..73f61fe --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelStatistics.m.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeChannelStatistics.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeChannelStatistics (0 custom class methods, 4 custom properties) + +#import "GTLYouTubeChannelStatistics.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannelStatistics +// + +@implementation GTLYouTubeChannelStatistics +@dynamic commentCount, subscriberCount, videoCount, viewCount; +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelStatus.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelStatus.h.svn-base new file mode 100644 index 0000000..083fd79 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelStatus.h.svn-base @@ -0,0 +1,49 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeChannelStatus.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeChannelStatus (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannelStatus +// + +// JSON template for the status part of a channel. + +@interface GTLYouTubeChannelStatus : GTLObject + +// Privacy status of the channel. +@property (copy) NSString *privacyStatus; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelStatus.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelStatus.m.svn-base new file mode 100644 index 0000000..6c1b9a7 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelStatus.m.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeChannelStatus.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeChannelStatus (0 custom class methods, 1 custom properties) + +#import "GTLYouTubeChannelStatus.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannelStatus +// + +@implementation GTLYouTubeChannelStatus +@dynamic privacyStatus; +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelTopicDetails.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelTopicDetails.h.svn-base new file mode 100644 index 0000000..9ca26ac --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelTopicDetails.h.svn-base @@ -0,0 +1,50 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeChannelTopicDetails.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeChannelTopicDetails (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannelTopicDetails +// + +// Freebase topic information related to the channel. + +@interface GTLYouTubeChannelTopicDetails : GTLObject + +// A list of Freebase topic IDs associated with the channel. You can retrieve +// information about each topic using the Freebase Topic API. +@property (retain) NSArray *topicIds; // of NSString + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelTopicDetails.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelTopicDetails.m.svn-base new file mode 100644 index 0000000..7519abb --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeChannelTopicDetails.m.svn-base @@ -0,0 +1,48 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeChannelTopicDetails.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeChannelTopicDetails (0 custom class methods, 1 custom properties) + +#import "GTLYouTubeChannelTopicDetails.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannelTopicDetails +// + +@implementation GTLYouTubeChannelTopicDetails +@dynamic topicIds; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[NSString class] + forKey:@"topicIds"]; + return map; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeConstants.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeConstants.h.svn-base new file mode 100644 index 0000000..4549cb5 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeConstants.h.svn-base @@ -0,0 +1,85 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeConstants.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube + +#import + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLDefines.h" +#else + #import "GTLDefines.h" +#endif + +// Authorization scope +// Manage your YouTube account +GTL_EXTERN NSString * const kGTLAuthScopeYouTube; // "https://www.googleapis.com/auth/youtube" +// View your YouTube account +GTL_EXTERN NSString * const kGTLAuthScopeYouTubeReadonly; // "https://www.googleapis.com/auth/youtube.readonly" +// Manage your YouTube videos +GTL_EXTERN NSString * const kGTLAuthScopeYouTubeUpload; // "https://www.googleapis.com/auth/youtube.upload" +// View and manage your assets and associated content on YouTube +GTL_EXTERN NSString * const kGTLAuthScopeYouTubeYoutubepartner; // "https://www.googleapis.com/auth/youtubepartner" + +// Order +GTL_EXTERN NSString * const kGTLYouTubeOrderAlphabetical; // "alphabetical" +GTL_EXTERN NSString * const kGTLYouTubeOrderDate; // "date" +GTL_EXTERN NSString * const kGTLYouTubeOrderRating; // "rating" +GTL_EXTERN NSString * const kGTLYouTubeOrderRelevance; // "relevance" +GTL_EXTERN NSString * const kGTLYouTubeOrderUnread; // "unread" +GTL_EXTERN NSString * const kGTLYouTubeOrderViewCount; // "viewCount" + +// Published +GTL_EXTERN NSString * const kGTLYouTubePublishedAny; // "any" +GTL_EXTERN NSString * const kGTLYouTubePublishedThisMonth; // "thisMonth" +GTL_EXTERN NSString * const kGTLYouTubePublishedThisWeek; // "thisWeek" +GTL_EXTERN NSString * const kGTLYouTubePublishedToday; // "today" + +// VideoCaption +GTL_EXTERN NSString * const kGTLYouTubeVideoCaptionAny; // "any" +GTL_EXTERN NSString * const kGTLYouTubeVideoCaptionClosedCaption; // "closedCaption" +GTL_EXTERN NSString * const kGTLYouTubeVideoCaptionNone; // "none" + +// VideoDefinition +GTL_EXTERN NSString * const kGTLYouTubeVideoDefinitionAny; // "any" +GTL_EXTERN NSString * const kGTLYouTubeVideoDefinitionHigh; // "high" +GTL_EXTERN NSString * const kGTLYouTubeVideoDefinitionStandard; // "standard" + +// VideoDimension +GTL_EXTERN NSString * const kGTLYouTubeVideoDimensionAny; // "any" +GTL_EXTERN NSString * const kGTLYouTubeVideoDimensionX2d; // "2d" +GTL_EXTERN NSString * const kGTLYouTubeVideoDimensionX3d; // "3d" + +// VideoDuration +GTL_EXTERN NSString * const kGTLYouTubeVideoDurationAny; // "any" +GTL_EXTERN NSString * const kGTLYouTubeVideoDurationLong; // "long" +GTL_EXTERN NSString * const kGTLYouTubeVideoDurationMedium; // "medium" +GTL_EXTERN NSString * const kGTLYouTubeVideoDurationShort; // "short" + +// VideoLicense +GTL_EXTERN NSString * const kGTLYouTubeVideoLicenseAny; // "any" +GTL_EXTERN NSString * const kGTLYouTubeVideoLicenseCreativeCommon; // "creativeCommon" +GTL_EXTERN NSString * const kGTLYouTubeVideoLicenseYoutube; // "youtube" diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeConstants.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeConstants.m.svn-base new file mode 100644 index 0000000..31f6def --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeConstants.m.svn-base @@ -0,0 +1,75 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeConstants.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube + +#import "GTLYouTubeConstants.h" + +// Authorization scope +NSString * const kGTLAuthScopeYouTube = @"https://www.googleapis.com/auth/youtube"; +NSString * const kGTLAuthScopeYouTubeReadonly = @"https://www.googleapis.com/auth/youtube.readonly"; +NSString * const kGTLAuthScopeYouTubeUpload = @"https://www.googleapis.com/auth/youtube.upload"; +NSString * const kGTLAuthScopeYouTubeYoutubepartner = @"https://www.googleapis.com/auth/youtubepartner"; + +// Order +NSString * const kGTLYouTubeOrderAlphabetical = @"alphabetical"; +NSString * const kGTLYouTubeOrderDate = @"date"; +NSString * const kGTLYouTubeOrderRating = @"rating"; +NSString * const kGTLYouTubeOrderRelevance = @"relevance"; +NSString * const kGTLYouTubeOrderUnread = @"unread"; +NSString * const kGTLYouTubeOrderViewCount = @"viewCount"; + +// Published +NSString * const kGTLYouTubePublishedAny = @"any"; +NSString * const kGTLYouTubePublishedThisMonth = @"thisMonth"; +NSString * const kGTLYouTubePublishedThisWeek = @"thisWeek"; +NSString * const kGTLYouTubePublishedToday = @"today"; + +// VideoCaption +NSString * const kGTLYouTubeVideoCaptionAny = @"any"; +NSString * const kGTLYouTubeVideoCaptionClosedCaption = @"closedCaption"; +NSString * const kGTLYouTubeVideoCaptionNone = @"none"; + +// VideoDefinition +NSString * const kGTLYouTubeVideoDefinitionAny = @"any"; +NSString * const kGTLYouTubeVideoDefinitionHigh = @"high"; +NSString * const kGTLYouTubeVideoDefinitionStandard = @"standard"; + +// VideoDimension +NSString * const kGTLYouTubeVideoDimensionAny = @"any"; +NSString * const kGTLYouTubeVideoDimensionX2d = @"2d"; +NSString * const kGTLYouTubeVideoDimensionX3d = @"3d"; + +// VideoDuration +NSString * const kGTLYouTubeVideoDurationAny = @"any"; +NSString * const kGTLYouTubeVideoDurationLong = @"long"; +NSString * const kGTLYouTubeVideoDurationMedium = @"medium"; +NSString * const kGTLYouTubeVideoDurationShort = @"short"; + +// VideoLicense +NSString * const kGTLYouTubeVideoLicenseAny = @"any"; +NSString * const kGTLYouTubeVideoLicenseCreativeCommon = @"creativeCommon"; +NSString * const kGTLYouTubeVideoLicenseYoutube = @"youtube"; diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeGeoPoint.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeGeoPoint.h.svn-base new file mode 100644 index 0000000..940b566 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeGeoPoint.h.svn-base @@ -0,0 +1,55 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeGeoPoint.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeGeoPoint (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeGeoPoint +// + +// A geoPoint holds geo location information associated with a YouTube resource. + +@interface GTLYouTubeGeoPoint : GTLObject + +// Altitude above the Earth, in meters. +@property (retain) NSNumber *elevation; // doubleValue + +// Latitude in degrees. +@property (retain) NSNumber *latitude; // doubleValue + +// Longitude in degrees. +@property (retain) NSNumber *longitude; // doubleValue + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeGeoPoint.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeGeoPoint.m.svn-base new file mode 100644 index 0000000..9efa1de --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeGeoPoint.m.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeGeoPoint.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeGeoPoint (0 custom class methods, 3 custom properties) + +#import "GTLYouTubeGeoPoint.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeGeoPoint +// + +@implementation GTLYouTubeGeoPoint +@dynamic elevation, latitude, longitude; +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeGuideCategory.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeGuideCategory.h.svn-base new file mode 100644 index 0000000..be87b1d --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeGuideCategory.h.svn-base @@ -0,0 +1,67 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeGuideCategory.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeGuideCategory (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeGuideCategorySnippet; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeGuideCategory +// + +// A guideCategory resource identifies a category that YouTube algorithmically +// assigns based on a channel's content or other indicators, such as the +// channel's popularity. The list is similar to video categories, with the +// difference being that a video's uploader can assign a video category but only +// YouTube can assign a channel category. + +@interface GTLYouTubeGuideCategory : GTLObject + +// The ETag of the guideCategory resource. +@property (copy) NSString *ETag; + +// The ID that YouTube uses to uniquely identify the guide category. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The type of the API resource. For guideCategory resources, the value will be +// youtube#guideCategory/code>. +@property (copy) NSString *kind; + +// The snippet object contains basic details about the category, such as its +// title. +@property (retain) GTLYouTubeGuideCategorySnippet *snippet; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeGuideCategory.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeGuideCategory.m.svn-base new file mode 100644 index 0000000..306a484 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeGuideCategory.m.svn-base @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeGuideCategory.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeGuideCategory (0 custom class methods, 4 custom properties) + +#import "GTLYouTubeGuideCategory.h" + +#import "GTLYouTubeGuideCategorySnippet.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeGuideCategory +// + +@implementation GTLYouTubeGuideCategory +@dynamic ETag, identifier, kind, snippet; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#guideCategory"]; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeGuideCategoryListResponse.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeGuideCategoryListResponse.h.svn-base new file mode 100644 index 0000000..785e5f1 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeGuideCategoryListResponse.h.svn-base @@ -0,0 +1,64 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeGuideCategoryListResponse.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeGuideCategoryListResponse (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeGuideCategory; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeGuideCategoryListResponse +// + +// A paginated list of guide categories returned as the response to a +// youtube.guideCategories.list call. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLYouTubeGuideCategoryListResponse : GTLCollectionObject + +// The ETag of the response. +@property (copy) NSString *ETag; + +// A list of categories that can be associated with YouTube channels. In this +// map, the category ID is the map key, and its value is the corresponding +// guideCategory resource. +@property (retain) NSArray *items; // of GTLYouTubeGuideCategory + +// The type of the API response. For this operation, the value will be +// youtube#guideCategoryListResponse. +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeGuideCategoryListResponse.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeGuideCategoryListResponse.m.svn-base new file mode 100644 index 0000000..4c4b8a7 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeGuideCategoryListResponse.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeGuideCategoryListResponse.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeGuideCategoryListResponse (0 custom class methods, 3 custom properties) + +#import "GTLYouTubeGuideCategoryListResponse.h" + +#import "GTLYouTubeGuideCategory.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeGuideCategoryListResponse +// + +@implementation GTLYouTubeGuideCategoryListResponse +@dynamic ETag, items, kind; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLYouTubeGuideCategory class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#guideCategoryListResponse"]; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeGuideCategorySnippet.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeGuideCategorySnippet.h.svn-base new file mode 100644 index 0000000..f7d8b39 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeGuideCategorySnippet.h.svn-base @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeGuideCategorySnippet.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeGuideCategorySnippet (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeGuideCategorySnippet +// + +// Basic details about a guide category. + +@interface GTLYouTubeGuideCategorySnippet : GTLObject + +// The ID that YouTube uses to uniquely identify the channel publishing the +// guide category. +@property (copy) NSString *channelId; + +// The category's title. +@property (copy) NSString *title; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeGuideCategorySnippet.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeGuideCategorySnippet.m.svn-base new file mode 100644 index 0000000..7099625 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeGuideCategorySnippet.m.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeGuideCategorySnippet.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeGuideCategorySnippet (0 custom class methods, 2 custom properties) + +#import "GTLYouTubeGuideCategorySnippet.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeGuideCategorySnippet +// + +@implementation GTLYouTubeGuideCategorySnippet +@dynamic channelId, title; +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePageInfo.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePageInfo.h.svn-base new file mode 100644 index 0000000..84e6a00 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePageInfo.h.svn-base @@ -0,0 +1,53 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubePageInfo.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubePageInfo (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePageInfo +// + +// Paging details for lists of resources, including total number of items +// available and number of resources returned in a single page. + +@interface GTLYouTubePageInfo : GTLObject + +// The number of results included in the API response. +@property (retain) NSNumber *resultsPerPage; // intValue + +// The total number of results in the result set. +@property (retain) NSNumber *totalResults; // intValue + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePageInfo.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePageInfo.m.svn-base new file mode 100644 index 0000000..dfd0538 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePageInfo.m.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubePageInfo.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubePageInfo (0 custom class methods, 2 custom properties) + +#import "GTLYouTubePageInfo.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePageInfo +// + +@implementation GTLYouTubePageInfo +@dynamic resultsPerPage, totalResults; +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylist.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylist.h.svn-base new file mode 100644 index 0000000..729e68d --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylist.h.svn-base @@ -0,0 +1,84 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubePlaylist.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubePlaylist (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubePlaylistSnippet; +@class GTLYouTubePlaylistStatus; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePlaylist +// + +// A playlist resource represents a YouTube playlist. A playlist is a collection +// of videos that can be viewed sequentially and shared with other users. A +// playlist can contain up to 200 videos, and YouTube does not limit the number +// of playlists that each user creates. By default, playlists are publicly +// visible to other users, but playlists can be public or private. +// YouTube also uses playlists to identify special collections of videos for a +// channel, such as: +// - uploaded videos +// - favorite videos +// - positively rated (liked) videos +// - watch history +// - watch later To be more specific, these lists are associated with a channel, +// which is a collection of a person, group, or company's videos, playlists, and +// other YouTube information. You can retrieve the playlist IDs for each of +// these lists from the channel resource for a given channel. +// You can then use the playlistItems.list method to retrieve any of those +// lists. You can also add or remove items from those lists by calling the +// playlistItems.insert and playlistItems.delete methods. + +@interface GTLYouTubePlaylist : GTLObject + +// The ETag for the playlist resource. +@property (copy) NSString *ETag; + +// The ID that YouTube uses to uniquely identify the playlist. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The type of the API resource. For video resources, the value will be +// youtube#playlist. +@property (copy) NSString *kind; + +// The snippet object contains basic details about the playlist, such as its +// title and description. +@property (retain) GTLYouTubePlaylistSnippet *snippet; + +// The status object contains status information for the playlist. +@property (retain) GTLYouTubePlaylistStatus *status; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylist.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylist.m.svn-base new file mode 100644 index 0000000..fc8124d --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylist.m.svn-base @@ -0,0 +1,57 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubePlaylist.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubePlaylist (0 custom class methods, 5 custom properties) + +#import "GTLYouTubePlaylist.h" + +#import "GTLYouTubePlaylistSnippet.h" +#import "GTLYouTubePlaylistStatus.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePlaylist +// + +@implementation GTLYouTubePlaylist +@dynamic ETag, identifier, kind, snippet, status; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#playlist"]; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistItem.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistItem.h.svn-base new file mode 100644 index 0000000..a8f708f --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistItem.h.svn-base @@ -0,0 +1,86 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubePlaylistItem.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubePlaylistItem (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubePlaylistItemContentDetails; +@class GTLYouTubePlaylistItemSnippet; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePlaylistItem +// + +// A playlistItem resource identifies another resource, such as a video, that is +// included in a playlist. In addition, the playlistItem resource contains +// details about the included resource that pertain specifically to how that +// resource is used in that playlist. +// YouTube uses playlists to identify special collections of videos for a +// channel, such as: +// - uploaded videos +// - favorite videos +// - positively rated (liked) videos +// - watch history +// - watch later To be more specific, these lists are associated with a channel, +// which is a collection of a person, group, or company's videos, playlists, and +// other YouTube information. +// You can retrieve the playlist IDs for each of these lists from the channel +// resource for a given channel. You can then use the playlistItems.list method +// to retrieve any of those lists. You can also add or remove items from those +// lists by calling the playlistItems.insert and playlistItems.delete methods. +// For example, if a user gives a positive rating to a video, you would insert +// that video into the liked videos playlist for that user's channel. + +@interface GTLYouTubePlaylistItem : GTLObject + +// The contentDetails object is included in the resource if the included item is +// a YouTube video. The object contains additional information about the video. +@property (retain) GTLYouTubePlaylistItemContentDetails *contentDetails; + +// The ETag for the playlist item resource. +@property (copy) NSString *ETag; + +// The ID that YouTube uses to uniquely identify the playlist item. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The type of the API resource. For playlist item resources, the value will be +// youtube#playlistItem. +@property (copy) NSString *kind; + +// The snippet object contains basic details about the playlist item, such as +// its title and position in the playlist. +@property (retain) GTLYouTubePlaylistItemSnippet *snippet; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistItem.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistItem.m.svn-base new file mode 100644 index 0000000..c9fa1c5 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistItem.m.svn-base @@ -0,0 +1,57 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubePlaylistItem.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubePlaylistItem (0 custom class methods, 5 custom properties) + +#import "GTLYouTubePlaylistItem.h" + +#import "GTLYouTubePlaylistItemContentDetails.h" +#import "GTLYouTubePlaylistItemSnippet.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePlaylistItem +// + +@implementation GTLYouTubePlaylistItem +@dynamic contentDetails, ETag, identifier, kind, snippet; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#playlistItem"]; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistItemContentDetails.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistItemContentDetails.h.svn-base new file mode 100644 index 0000000..de193d4 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistItemContentDetails.h.svn-base @@ -0,0 +1,66 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubePlaylistItemContentDetails.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubePlaylistItemContentDetails (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePlaylistItemContentDetails +// + +// Details about the content of a playlist item, such as the video or the video +// fragment start and end time included in the playlist. + +@interface GTLYouTubePlaylistItemContentDetails : GTLObject + +// The time, measured in seconds from the start of the video, when the video +// should stop playing. (The playlist owner can specify the times when the video +// should start and stop playing when the video is played in the context of the +// playlist.) By default, assume that the video.endTime is the end of the video. +@property (copy) NSString *endAt; + +// A user-generated note for this item. +@property (copy) NSString *note; + +// The time, measured in seconds from the start of the video, when the video +// should start playing. (The playlist owner can specify the times when the +// video should start and stop playing when the video is played in the context +// of the playlist.) The default value is 0. +@property (copy) NSString *startAt; + +// The ID that YouTube uses to uniquely identify a video. To retrieve the video +// resource, set the id query parameter to this value in your API request. +@property (copy) NSString *videoId; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistItemContentDetails.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistItemContentDetails.m.svn-base new file mode 100644 index 0000000..7367fb7 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistItemContentDetails.m.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubePlaylistItemContentDetails.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubePlaylistItemContentDetails (0 custom class methods, 4 custom properties) + +#import "GTLYouTubePlaylistItemContentDetails.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePlaylistItemContentDetails +// + +@implementation GTLYouTubePlaylistItemContentDetails +@dynamic endAt, note, startAt, videoId; +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistItemListResponse.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistItemListResponse.h.svn-base new file mode 100644 index 0000000..bd04940 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistItemListResponse.h.svn-base @@ -0,0 +1,74 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubePlaylistItemListResponse.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubePlaylistItemListResponse (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubePageInfo; +@class GTLYouTubePlaylistItem; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePlaylistItemListResponse +// + +// A paginated list of playlist items returned as the response to a +// youtube.playlistItems.list call. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLYouTubePlaylistItemListResponse : GTLCollectionObject + +// The ETag for the response. +@property (copy) NSString *ETag; + +// A list of playlist items that match the request criteria. +@property (retain) NSArray *items; // of GTLYouTubePlaylistItem + +// The type of the API response. For this operation, the value will be +// youtube#playlistItemListResponse. +@property (copy) NSString *kind; + +// A token that can be used as the value of the pageToken parameter to retrieve +// the next page in the result set. +@property (copy) NSString *nextPageToken; + +// The pageInfo object encapsulates paging information for the result set. +@property (retain) GTLYouTubePageInfo *pageInfo; + +// A token that can be used as the value of the pageToken parameter to retrieve +// the previous page in the result set. +@property (copy) NSString *prevPageToken; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistItemListResponse.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistItemListResponse.m.svn-base new file mode 100644 index 0000000..404f31d --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistItemListResponse.m.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubePlaylistItemListResponse.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubePlaylistItemListResponse (0 custom class methods, 6 custom properties) + +#import "GTLYouTubePlaylistItemListResponse.h" + +#import "GTLYouTubePageInfo.h" +#import "GTLYouTubePlaylistItem.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePlaylistItemListResponse +// + +@implementation GTLYouTubePlaylistItemListResponse +@dynamic ETag, items, kind, nextPageToken, pageInfo, prevPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLYouTubePlaylistItem class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#playlistItemListResponse"]; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistItemSnippet.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistItemSnippet.h.svn-base new file mode 100644 index 0000000..fb1b023 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistItemSnippet.h.svn-base @@ -0,0 +1,99 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubePlaylistItemSnippet.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubePlaylistItemSnippet (0 custom class methods, 8 custom properties) +// GTLYouTubePlaylistItemSnippetThumbnails (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubePlaylistItemSnippetThumbnails; +@class GTLYouTubeResourceId; +@class GTLYouTubeThumbnail; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePlaylistItemSnippet +// + +// Basic details about an item included in a playlist, including title, +// description, thumbnails, playlist the item is part of and position of the +// item inside the playlist. + +@interface GTLYouTubePlaylistItemSnippet : GTLObject + +// The ID that YouTube uses to uniquely identify the user that added the item to +// the playlist. +@property (copy) NSString *channelId; + +// The item's description. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The ID that YouTube uses to uniquely identify the playlist that the playlist +// item is in. +@property (copy) NSString *playlistId; + +// The order in which the item appears in the playlist. The value uses a +// zero-based index, so the first item has a position of 0, the second item has +// a position of 1, and so forth. +@property (retain) NSNumber *position; // unsignedIntValue + +// The date and time that the item was added to the playlist. The value is +// specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +@property (retain) GTLDateTime *publishedAt; + +// The id object contains information that can be used to uniquely identify the +// resource that is included in the playlist as the playlist item. +@property (retain) GTLYouTubeResourceId *resourceId; + +// A map of thumbnail images associated with the playlist item. For each object +// in the map, the key is the name of the thumbnail image, and the value is an +// object that contains other information about the thumbnail. +@property (retain) GTLYouTubePlaylistItemSnippetThumbnails *thumbnails; + +// The item's title. +@property (copy) NSString *title; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePlaylistItemSnippetThumbnails +// + +@interface GTLYouTubePlaylistItemSnippetThumbnails : GTLObject +// This object is documented as having more properties that are +// GTLYouTubeThumbnail. Use -additionalJSONKeys and -additionalPropertyForName: +// to get the list of properties and then fetch them; or -additionalProperties +// to fetch them all at once. +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistItemSnippet.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistItemSnippet.m.svn-base new file mode 100644 index 0000000..2aadbd8 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistItemSnippet.m.svn-base @@ -0,0 +1,67 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubePlaylistItemSnippet.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubePlaylistItemSnippet (0 custom class methods, 8 custom properties) +// GTLYouTubePlaylistItemSnippetThumbnails (0 custom class methods, 0 custom properties) + +#import "GTLYouTubePlaylistItemSnippet.h" + +#import "GTLYouTubeResourceId.h" +#import "GTLYouTubeThumbnail.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePlaylistItemSnippet +// + +@implementation GTLYouTubePlaylistItemSnippet +@dynamic channelId, descriptionProperty, playlistId, position, publishedAt, + resourceId, thumbnails, title; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePlaylistItemSnippetThumbnails +// + +@implementation GTLYouTubePlaylistItemSnippetThumbnails + ++ (Class)classForAdditionalProperties { + return [GTLYouTubeThumbnail class]; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistListResponse.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistListResponse.h.svn-base new file mode 100644 index 0000000..9ba1a92 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistListResponse.h.svn-base @@ -0,0 +1,74 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubePlaylistListResponse.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubePlaylistListResponse (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubePageInfo; +@class GTLYouTubePlaylist; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePlaylistListResponse +// + +// A paginated list of playlists returned as the response to a +// youtube.playlists.list call. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLYouTubePlaylistListResponse : GTLCollectionObject + +// The ETag of the response. +@property (copy) NSString *ETag; + +// A list of playlists that match the request criteria. +@property (retain) NSArray *items; // of GTLYouTubePlaylist + +// The type of the API response. For this operation, the value will be +// youtube#playlistListResponse. +@property (copy) NSString *kind; + +// The token that can be used as the value of the pageToken parameter to +// retrieve the next page in the result set. +@property (copy) NSString *nextPageToken; + +// The pageInfo object encapsulates paging information for the result set. +@property (retain) GTLYouTubePageInfo *pageInfo; + +// The token that can be used as the value of the pageToken parameter to +// retrieve the previous page in the result set. +@property (copy) NSString *prevPageToken; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistListResponse.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistListResponse.m.svn-base new file mode 100644 index 0000000..1d60995 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistListResponse.m.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubePlaylistListResponse.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubePlaylistListResponse (0 custom class methods, 6 custom properties) + +#import "GTLYouTubePlaylistListResponse.h" + +#import "GTLYouTubePageInfo.h" +#import "GTLYouTubePlaylist.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePlaylistListResponse +// + +@implementation GTLYouTubePlaylistListResponse +@dynamic ETag, items, kind, nextPageToken, pageInfo, prevPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLYouTubePlaylist class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#playlistListResponse"]; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistSnippet.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistSnippet.h.svn-base new file mode 100644 index 0000000..2b77f4e --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistSnippet.h.svn-base @@ -0,0 +1,83 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubePlaylistSnippet.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubePlaylistSnippet (0 custom class methods, 5 custom properties) +// GTLYouTubePlaylistSnippetThumbnails (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubePlaylistSnippetThumbnails; +@class GTLYouTubeThumbnail; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePlaylistSnippet +// + +// Basic details about a playlist, including title, description and thumbnails. + +@interface GTLYouTubePlaylistSnippet : GTLObject + +// The ID that YouTube uses to uniquely identify the channel that published the +// playlist. +@property (copy) NSString *channelId; + +// The playlist's description. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The date and time that the playlist was created. The value is specified in +// ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +@property (retain) GTLDateTime *publishedAt; + +// A map of thumbnail images associated with the playlist. For each object in +// the map, the key is the name of the thumbnail image, and the value is an +// object that contains other information about the thumbnail. +@property (retain) GTLYouTubePlaylistSnippetThumbnails *thumbnails; + +// The playlist's title. +@property (copy) NSString *title; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePlaylistSnippetThumbnails +// + +@interface GTLYouTubePlaylistSnippetThumbnails : GTLObject +// This object is documented as having more properties that are +// GTLYouTubeThumbnail. Use -additionalJSONKeys and -additionalPropertyForName: +// to get the list of properties and then fetch them; or -additionalProperties +// to fetch them all at once. +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistSnippet.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistSnippet.m.svn-base new file mode 100644 index 0000000..3088045 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistSnippet.m.svn-base @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubePlaylistSnippet.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubePlaylistSnippet (0 custom class methods, 5 custom properties) +// GTLYouTubePlaylistSnippetThumbnails (0 custom class methods, 0 custom properties) + +#import "GTLYouTubePlaylistSnippet.h" + +#import "GTLYouTubeThumbnail.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePlaylistSnippet +// + +@implementation GTLYouTubePlaylistSnippet +@dynamic channelId, descriptionProperty, publishedAt, thumbnails, title; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePlaylistSnippetThumbnails +// + +@implementation GTLYouTubePlaylistSnippetThumbnails + ++ (Class)classForAdditionalProperties { + return [GTLYouTubeThumbnail class]; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistStatus.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistStatus.h.svn-base new file mode 100644 index 0000000..abafd02 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistStatus.h.svn-base @@ -0,0 +1,49 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubePlaylistStatus.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubePlaylistStatus (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePlaylistStatus +// + +// The status details of a playlist describes whether the playlist is private. + +@interface GTLYouTubePlaylistStatus : GTLObject + +// The playlist's privacy status. +@property (copy) NSString *privacyStatus; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistStatus.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistStatus.m.svn-base new file mode 100644 index 0000000..94392d3 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubePlaylistStatus.m.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubePlaylistStatus.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubePlaylistStatus (0 custom class methods, 1 custom properties) + +#import "GTLYouTubePlaylistStatus.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePlaylistStatus +// + +@implementation GTLYouTubePlaylistStatus +@dynamic privacyStatus; +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeResourceId.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeResourceId.h.svn-base new file mode 100644 index 0000000..e42ade4 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeResourceId.h.svn-base @@ -0,0 +1,64 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeResourceId.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeResourceId (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeResourceId +// + +// A resource id is a generic reference that points to another YouTube resource. + +@interface GTLYouTubeResourceId : GTLObject + +// The ID that YouTube uses to uniquely identify the referred resource, if that +// resource is a channel. This property is only present if the resourceId.kind +// value is youtube#channel. +@property (copy) NSString *channelId; + +// The kind, or type, of the referred resource. +@property (copy) NSString *kind; + +// The ID that YouTube uses to uniquely identify the referred resource, if that +// resource is a playlist. This property is only present if the resourceId.kind +// value is youtube#playlist. +@property (copy) NSString *playlistId; + +// The ID that YouTube uses to uniquely identify the referred resource, if that +// resource is a video. This property is only present if the resourceId.kind +// value is youtube#video. +@property (copy) NSString *videoId; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeResourceId.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeResourceId.m.svn-base new file mode 100644 index 0000000..9297972 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeResourceId.m.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeResourceId.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeResourceId (0 custom class methods, 4 custom properties) + +#import "GTLYouTubeResourceId.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeResourceId +// + +@implementation GTLYouTubeResourceId +@dynamic channelId, kind, playlistId, videoId; +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSearchListResponse.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSearchListResponse.h.svn-base new file mode 100644 index 0000000..d73dfb0 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSearchListResponse.h.svn-base @@ -0,0 +1,75 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeSearchListResponse.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeSearchListResponse (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubePageInfo; +@class GTLYouTubeSearchResult; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeSearchListResponse +// + +// A paginated list of search results returned as the response to a +// youtube.search.list call. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLYouTubeSearchListResponse : GTLCollectionObject + +// The ETag for the response. +@property (copy) NSString *ETag; + +// A list of results that match the search criteria. +@property (retain) NSArray *items; // of GTLYouTubeSearchResult + +// The type of the API response. For this operation, the value will be +// youtube#searchListResponse. +@property (copy) NSString *kind; + +// The token that can be used as the value of the pageToken parameter to +// retrieve the next page in the result set. +@property (copy) NSString *nextPageToken; + +// The pageInfo object encapsulates paging information for the search result +// set. +@property (retain) GTLYouTubePageInfo *pageInfo; + +// The token that can be used as the value of the pageToken parameter to +// retrieve the previous page in the result set. +@property (copy) NSString *prevPageToken; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSearchListResponse.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSearchListResponse.m.svn-base new file mode 100644 index 0000000..bfac236 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSearchListResponse.m.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeSearchListResponse.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeSearchListResponse (0 custom class methods, 6 custom properties) + +#import "GTLYouTubeSearchListResponse.h" + +#import "GTLYouTubePageInfo.h" +#import "GTLYouTubeSearchResult.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeSearchListResponse +// + +@implementation GTLYouTubeSearchListResponse +@dynamic ETag, items, kind, nextPageToken, pageInfo, prevPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLYouTubeSearchResult class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#searchListResponse"]; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSearchResult.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSearchResult.h.svn-base new file mode 100644 index 0000000..4dcd086 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSearchResult.h.svn-base @@ -0,0 +1,70 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeSearchResult.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeSearchResult (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeResourceId; +@class GTLYouTubeSearchResultSnippet; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeSearchResult +// + +// A search result contains information about a YouTube video, channel, or +// playlist that matches the search parameters specified in an API request. +// While a search result points to a uniquely identifiable resource, like a +// video, it does not have its own persistent data. + +@interface GTLYouTubeSearchResult : GTLObject + +// The ETag of the search result. +@property (copy) NSString *ETag; + +// The id object contains information that can be used to uniquely identify the +// resource that matches the search request. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (retain) GTLYouTubeResourceId *identifier; + +// The type of the API response. For this resource, the value will be +// youtube#searchResult. +@property (copy) NSString *kind; + +// The snippet object contains basic details about a search result, such as its +// title or description. For example, if the search result is a video, then the +// title will be the video's title and the description will be the video's +// description. +@property (retain) GTLYouTubeSearchResultSnippet *snippet; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSearchResult.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSearchResult.m.svn-base new file mode 100644 index 0000000..329cea9 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSearchResult.m.svn-base @@ -0,0 +1,57 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeSearchResult.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeSearchResult (0 custom class methods, 4 custom properties) + +#import "GTLYouTubeSearchResult.h" + +#import "GTLYouTubeResourceId.h" +#import "GTLYouTubeSearchResultSnippet.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeSearchResult +// + +@implementation GTLYouTubeSearchResult +@dynamic ETag, identifier, kind, snippet; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#searchResult"]; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSearchResultSnippet.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSearchResultSnippet.h.svn-base new file mode 100644 index 0000000..677f43c --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSearchResultSnippet.h.svn-base @@ -0,0 +1,84 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeSearchResultSnippet.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeSearchResultSnippet (0 custom class methods, 5 custom properties) +// GTLYouTubeSearchResultSnippetThumbnails (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeSearchResultSnippetThumbnails; +@class GTLYouTubeThumbnail; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeSearchResultSnippet +// + +// Basic details about a search result, including title, description and +// thumbnails of the item referenced by the search result. + +@interface GTLYouTubeSearchResultSnippet : GTLObject + +// The value that YouTube uses to uniquely identify the channel that published +// the resource that the search result identifies. +@property (copy) NSString *channelId; + +// A description of the search result. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The creation date and time of the resource that the search result identifies. +// The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +@property (retain) GTLDateTime *publishedAt; + +// A map of thumbnail images associated with the search result. For each object +// in the map, the key is the name of the thumbnail image, and the value is an +// object that contains other information about the thumbnail. +@property (retain) GTLYouTubeSearchResultSnippetThumbnails *thumbnails; + +// The title to display for the search result. +@property (copy) NSString *title; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeSearchResultSnippetThumbnails +// + +@interface GTLYouTubeSearchResultSnippetThumbnails : GTLObject +// This object is documented as having more properties that are +// GTLYouTubeThumbnail. Use -additionalJSONKeys and -additionalPropertyForName: +// to get the list of properties and then fetch them; or -additionalProperties +// to fetch them all at once. +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSearchResultSnippet.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSearchResultSnippet.m.svn-base new file mode 100644 index 0000000..473a5ae --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSearchResultSnippet.m.svn-base @@ -0,0 +1,65 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeSearchResultSnippet.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeSearchResultSnippet (0 custom class methods, 5 custom properties) +// GTLYouTubeSearchResultSnippetThumbnails (0 custom class methods, 0 custom properties) + +#import "GTLYouTubeSearchResultSnippet.h" + +#import "GTLYouTubeThumbnail.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeSearchResultSnippet +// + +@implementation GTLYouTubeSearchResultSnippet +@dynamic channelId, descriptionProperty, publishedAt, thumbnails, title; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeSearchResultSnippetThumbnails +// + +@implementation GTLYouTubeSearchResultSnippetThumbnails + ++ (Class)classForAdditionalProperties { + return [GTLYouTubeThumbnail class]; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSubscription.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSubscription.h.svn-base new file mode 100644 index 0000000..55e9832 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSubscription.h.svn-base @@ -0,0 +1,70 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeSubscription.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeSubscription (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeSubscriptionContentDetails; +@class GTLYouTubeSubscriptionSnippet; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeSubscription +// + +// A subscription resource contains information about a YouTube user +// subscription. A subscription notifies a user when new videos are added to a +// channel or when another user takes one of several actions on YouTube, such as +// uploading a video, rating a video, or commenting on a video. + +@interface GTLYouTubeSubscription : GTLObject + +// The contentDetails object contains basic statistics about the subscription. +@property (retain) GTLYouTubeSubscriptionContentDetails *contentDetails; + +// The ETag of the subscription resource. +@property (copy) NSString *ETag; + +// The ID that YouTube uses to uniquely identify the subscription. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The type of the API resource. For subscription resources, the value will be +// youtube#subscription. +@property (copy) NSString *kind; + +// The snippet object contains basic details about the subscription, including +// its title and the channel that the user subscribed to. +@property (retain) GTLYouTubeSubscriptionSnippet *snippet; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSubscription.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSubscription.m.svn-base new file mode 100644 index 0000000..02c71b6 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSubscription.m.svn-base @@ -0,0 +1,57 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeSubscription.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeSubscription (0 custom class methods, 5 custom properties) + +#import "GTLYouTubeSubscription.h" + +#import "GTLYouTubeSubscriptionContentDetails.h" +#import "GTLYouTubeSubscriptionSnippet.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeSubscription +// + +@implementation GTLYouTubeSubscription +@dynamic contentDetails, ETag, identifier, kind, snippet; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#subscription"]; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSubscriptionContentDetails.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSubscriptionContentDetails.h.svn-base new file mode 100644 index 0000000..bc65c26 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSubscriptionContentDetails.h.svn-base @@ -0,0 +1,52 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeSubscriptionContentDetails.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeSubscriptionContentDetails (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeSubscriptionContentDetails +// + +// Details about the content to witch a subscription refers. + +@interface GTLYouTubeSubscriptionContentDetails : GTLObject + +// The number of new items in the subscription since its content was last read. +@property (retain) NSNumber *newItemCount; // unsignedIntValue + +// The approximate number of items that the subscription points to. +@property (retain) NSNumber *totalItemCount; // unsignedIntValue + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSubscriptionContentDetails.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSubscriptionContentDetails.m.svn-base new file mode 100644 index 0000000..f09c7da --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSubscriptionContentDetails.m.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeSubscriptionContentDetails.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeSubscriptionContentDetails (0 custom class methods, 2 custom properties) + +#import "GTLYouTubeSubscriptionContentDetails.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeSubscriptionContentDetails +// + +@implementation GTLYouTubeSubscriptionContentDetails +@dynamic newItemCount, totalItemCount; +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSubscriptionListResponse.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSubscriptionListResponse.h.svn-base new file mode 100644 index 0000000..f2db28e --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSubscriptionListResponse.h.svn-base @@ -0,0 +1,74 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeSubscriptionListResponse.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeSubscriptionListResponse (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubePageInfo; +@class GTLYouTubeSubscription; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeSubscriptionListResponse +// + +// A paginated list of subscriptions returned as the response to a +// youtube.subscriptions.list call. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLYouTubeSubscriptionListResponse : GTLCollectionObject + +// The ETag of the response. +@property (copy) NSString *ETag; + +// A list of subscriptions that match the request criteria. +@property (retain) NSArray *items; // of GTLYouTubeSubscription + +// The type of the API response. For this operation, the value will be +// youtube#subscriptionListResponse. +@property (copy) NSString *kind; + +// The token that can be used as the value of the pageToken parameter to +// retrieve the next page in the result set. +@property (copy) NSString *nextPageToken; + +// The pageInfo object encapsulates paging information for the result set. +@property (retain) GTLYouTubePageInfo *pageInfo; + +// The token that can be used as the value of the pageToken parameter to +// retrieve the previous page in the result set. +@property (copy) NSString *prevPageToken; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSubscriptionListResponse.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSubscriptionListResponse.m.svn-base new file mode 100644 index 0000000..1e1dae3 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSubscriptionListResponse.m.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeSubscriptionListResponse.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeSubscriptionListResponse (0 custom class methods, 6 custom properties) + +#import "GTLYouTubeSubscriptionListResponse.h" + +#import "GTLYouTubePageInfo.h" +#import "GTLYouTubeSubscription.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeSubscriptionListResponse +// + +@implementation GTLYouTubeSubscriptionListResponse +@dynamic ETag, items, kind, nextPageToken, pageInfo, prevPageToken; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLYouTubeSubscription class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#subscriptionListResponse"]; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSubscriptionSnippet.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSubscriptionSnippet.h.svn-base new file mode 100644 index 0000000..f539cc3 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSubscriptionSnippet.h.svn-base @@ -0,0 +1,88 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeSubscriptionSnippet.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeSubscriptionSnippet (0 custom class methods, 6 custom properties) +// GTLYouTubeSubscriptionSnippetThumbnails (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeResourceId; +@class GTLYouTubeSubscriptionSnippetThumbnails; +@class GTLYouTubeThumbnail; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeSubscriptionSnippet +// + +// Basic details about a subscription, including title, description and +// thumbnails of the subscribed item. + +@interface GTLYouTubeSubscriptionSnippet : GTLObject + +// The ID that YouTube uses to uniquely identify the subscriber's channel. +@property (copy) NSString *channelId; + +// The subscription's details. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (copy) NSString *descriptionProperty; + +// The date and time that the subscription was created. The value is specified +// in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +@property (retain) GTLDateTime *publishedAt; + +// The id object contains information about the channel that the user subscribed +// to. +@property (retain) GTLYouTubeResourceId *resourceId; + +// A map of thumbnail images associated with the subscription. For each object +// in the map, the key is the name of the thumbnail image, and the value is an +// object that contains other information about the thumbnail. +@property (retain) GTLYouTubeSubscriptionSnippetThumbnails *thumbnails; + +// The subscription's title. +@property (copy) NSString *title; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeSubscriptionSnippetThumbnails +// + +@interface GTLYouTubeSubscriptionSnippetThumbnails : GTLObject +// This object is documented as having more properties that are +// GTLYouTubeThumbnail. Use -additionalJSONKeys and -additionalPropertyForName: +// to get the list of properties and then fetch them; or -additionalProperties +// to fetch them all at once. +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSubscriptionSnippet.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSubscriptionSnippet.m.svn-base new file mode 100644 index 0000000..f05d9f7 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeSubscriptionSnippet.m.svn-base @@ -0,0 +1,67 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeSubscriptionSnippet.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeSubscriptionSnippet (0 custom class methods, 6 custom properties) +// GTLYouTubeSubscriptionSnippetThumbnails (0 custom class methods, 0 custom properties) + +#import "GTLYouTubeSubscriptionSnippet.h" + +#import "GTLYouTubeResourceId.h" +#import "GTLYouTubeThumbnail.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeSubscriptionSnippet +// + +@implementation GTLYouTubeSubscriptionSnippet +@dynamic channelId, descriptionProperty, publishedAt, resourceId, thumbnails, + title; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"description" + forKey:@"descriptionProperty"]; + return map; +} + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeSubscriptionSnippetThumbnails +// + +@implementation GTLYouTubeSubscriptionSnippetThumbnails + ++ (Class)classForAdditionalProperties { + return [GTLYouTubeThumbnail class]; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeThumbnail.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeThumbnail.h.svn-base new file mode 100644 index 0000000..678ac37 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeThumbnail.h.svn-base @@ -0,0 +1,49 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeThumbnail.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeThumbnail (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeThumbnail +// + +// A thumbnail is an image representing a YouTube resource. + +@interface GTLYouTubeThumbnail : GTLObject + +// The thumbnail image's URL. +@property (copy) NSString *url; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeThumbnail.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeThumbnail.m.svn-base new file mode 100644 index 0000000..c1f77fa --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeThumbnail.m.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeThumbnail.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeThumbnail (0 custom class methods, 1 custom properties) + +#import "GTLYouTubeThumbnail.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeThumbnail +// + +@implementation GTLYouTubeThumbnail +@dynamic url; +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideo.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideo.h.svn-base new file mode 100644 index 0000000..5226cb3 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideo.h.svn-base @@ -0,0 +1,92 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeVideo.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeVideo (0 custom class methods, 10 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeVideoContentDetails; +@class GTLYouTubeVideoPlayer; +@class GTLYouTubeVideoRecordingDetails; +@class GTLYouTubeVideoSnippet; +@class GTLYouTubeVideoStatistics; +@class GTLYouTubeVideoStatus; +@class GTLYouTubeVideoTopicDetails; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeVideo +// + +// A video resource represents a YouTube video. + +@interface GTLYouTubeVideo : GTLObject + +// The contentDetails object contains information about the video content, +// including the length of the video and its aspect ratio. +@property (retain) GTLYouTubeVideoContentDetails *contentDetails; + +// The ETag of the video resource. +@property (copy) NSString *ETag; + +// The ID that YouTube uses to uniquely identify the video. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The type of the API resource. For video resources, the value will be +// youtube#video. +@property (copy) NSString *kind; + +// The player object contains information that you would use to play the video +// in an embedded player. +@property (retain) GTLYouTubeVideoPlayer *player; + +// The recordingDetails object encapsulates information about the location, date +// and address where the video was recorded. +@property (retain) GTLYouTubeVideoRecordingDetails *recordingDetails; + +// The snippet object contains basic details about the video, such as its title, +// description, and category. +@property (retain) GTLYouTubeVideoSnippet *snippet; + +// The statistics object contains statistics about the video. +@property (retain) GTLYouTubeVideoStatistics *statistics; + +// The status object contains information about the video's uploading, +// processing, and privacy statuses. +@property (retain) GTLYouTubeVideoStatus *status; + +// The topicDetails object encapsulates information about Freebase topics +// associated with the video. +@property (retain) GTLYouTubeVideoTopicDetails *topicDetails; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideo.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideo.m.svn-base new file mode 100644 index 0000000..55591c8 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideo.m.svn-base @@ -0,0 +1,63 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeVideo.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeVideo (0 custom class methods, 10 custom properties) + +#import "GTLYouTubeVideo.h" + +#import "GTLYouTubeVideoContentDetails.h" +#import "GTLYouTubeVideoPlayer.h" +#import "GTLYouTubeVideoRecordingDetails.h" +#import "GTLYouTubeVideoSnippet.h" +#import "GTLYouTubeVideoStatistics.h" +#import "GTLYouTubeVideoStatus.h" +#import "GTLYouTubeVideoTopicDetails.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeVideo +// + +@implementation GTLYouTubeVideo +@dynamic contentDetails, ETag, identifier, kind, player, recordingDetails, + snippet, statistics, status, topicDetails; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#video"]; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoCategory.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoCategory.h.svn-base new file mode 100644 index 0000000..f900211 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoCategory.h.svn-base @@ -0,0 +1,64 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeVideoCategory.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeVideoCategory (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeVideoCategorySnippet; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeVideoCategory +// + +// A videoCategory resource identifies a category that has been or could be +// associated with uploaded videos. + +@interface GTLYouTubeVideoCategory : GTLObject + +// The ETag of the videoCategory resource. +@property (copy) NSString *ETag; + +// The ID that YouTube uses to uniquely identify the video category. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (copy) NSString *identifier; + +// The type of the API resource. For video category resources, the value will be +// youtube#videoCategory. +@property (copy) NSString *kind; + +// The snippet object contains basic details about the video category, including +// its title. +@property (retain) GTLYouTubeVideoCategorySnippet *snippet; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoCategory.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoCategory.m.svn-base new file mode 100644 index 0000000..7ecba4b --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoCategory.m.svn-base @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeVideoCategory.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeVideoCategory (0 custom class methods, 4 custom properties) + +#import "GTLYouTubeVideoCategory.h" + +#import "GTLYouTubeVideoCategorySnippet.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeVideoCategory +// + +@implementation GTLYouTubeVideoCategory +@dynamic ETag, identifier, kind, snippet; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + @"etag", @"ETag", + @"id", @"identifier", + nil]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#videoCategory"]; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoCategoryListResponse.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoCategoryListResponse.h.svn-base new file mode 100644 index 0000000..7d073ee --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoCategoryListResponse.h.svn-base @@ -0,0 +1,64 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeVideoCategoryListResponse.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeVideoCategoryListResponse (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeVideoCategory; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeVideoCategoryListResponse +// + +// A paginated list of video categories returned as the response to a +// youtube.videoCategory.list call. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLYouTubeVideoCategoryListResponse : GTLCollectionObject + +// The ETag of the response. +@property (copy) NSString *ETag; + +// A list of video categories that can be associated with YouTube videos. In +// this map, the video category ID is the map key, and its value is the +// corresponding videoCategory resource. +@property (retain) NSArray *items; // of GTLYouTubeVideoCategory + +// The type of the API response. For this operation, the value will be +// youtube#videoCategoryListResponse. +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoCategoryListResponse.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoCategoryListResponse.m.svn-base new file mode 100644 index 0000000..53ce7fe --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoCategoryListResponse.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeVideoCategoryListResponse.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeVideoCategoryListResponse (0 custom class methods, 3 custom properties) + +#import "GTLYouTubeVideoCategoryListResponse.h" + +#import "GTLYouTubeVideoCategory.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeVideoCategoryListResponse +// + +@implementation GTLYouTubeVideoCategoryListResponse +@dynamic ETag, items, kind; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLYouTubeVideoCategory class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#videoCategoryListResponse"]; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoCategorySnippet.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoCategorySnippet.h.svn-base new file mode 100644 index 0000000..d0d8cd3 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoCategorySnippet.h.svn-base @@ -0,0 +1,52 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeVideoCategorySnippet.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeVideoCategorySnippet (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeVideoCategorySnippet +// + +// Basic details about a video category, such as its localized title. + +@interface GTLYouTubeVideoCategorySnippet : GTLObject + +// The YouTube channel that created the video category. +@property (copy) NSString *channelId; + +// The video category's title. +@property (copy) NSString *title; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoCategorySnippet.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoCategorySnippet.m.svn-base new file mode 100644 index 0000000..05759a4 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoCategorySnippet.m.svn-base @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeVideoCategorySnippet.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeVideoCategorySnippet (0 custom class methods, 2 custom properties) + +#import "GTLYouTubeVideoCategorySnippet.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeVideoCategorySnippet +// + +@implementation GTLYouTubeVideoCategorySnippet +@dynamic channelId, title; +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoContentDetails.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoContentDetails.h.svn-base new file mode 100644 index 0000000..0ee5a87 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoContentDetails.h.svn-base @@ -0,0 +1,86 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeVideoContentDetails.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeVideoContentDetails (0 custom class methods, 2 custom properties) +// GTLYouTubeVideoContentDetailsRegionRestriction (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeVideoContentDetailsRegionRestriction; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeVideoContentDetails +// + +// Details about the media content of a YouTube video. + +@interface GTLYouTubeVideoContentDetails : GTLObject + +// The length of the video. The tag value is an ISO 8601 duration in the format +// PT#M#S, in which the letters PT indicate that the value specifies a period of +// time, and the letters M and S refer to length in minutes and seconds, +// respectively. The # characters preceding the M and S letters are both +// integers that specify the number of minutes (or seconds) of the video. For +// example, a value of PT15M51S indicates that the video is 15 minutes and 51 +// seconds long. +@property (copy) NSString *duration; + +// The regionRestriction object contains information about the countries where a +// video is (or is not) viewable. The object will contain either the +// contentDetails.regionRestriction.allowed property or the +// contentDetails.regionRestriction.blocked property. +@property (retain) GTLYouTubeVideoContentDetailsRegionRestriction *regionRestriction; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeVideoContentDetailsRegionRestriction +// + +@interface GTLYouTubeVideoContentDetailsRegionRestriction : GTLObject + +// A list of region codes that identify countries where the video is viewable. +// If this property is present and a country is not listed in its value, then +// the video is blocked from appearing in that country. If this property is +// present and contains an empty list, the video is blocked in all countries. +@property (retain) NSArray *allowed; // of NSString + +// A list of region codes that identify countries where the video is blocked. If +// this property is present and a country is not listed in its value, then the +// video is viewable in that country. If this property is present and contains +// an empty list, the video is viewable in all countries. +@property (retain) NSArray *blocked; // of NSString + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoContentDetails.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoContentDetails.m.svn-base new file mode 100644 index 0000000..9b37b5e --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoContentDetails.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeVideoContentDetails.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeVideoContentDetails (0 custom class methods, 2 custom properties) +// GTLYouTubeVideoContentDetailsRegionRestriction (0 custom class methods, 2 custom properties) + +#import "GTLYouTubeVideoContentDetails.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeVideoContentDetails +// + +@implementation GTLYouTubeVideoContentDetails +@dynamic duration, regionRestriction; +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeVideoContentDetailsRegionRestriction +// + +@implementation GTLYouTubeVideoContentDetailsRegionRestriction +@dynamic allowed, blocked; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString class], @"allowed", + [NSString class], @"blocked", + nil]; + return map; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoListResponse.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoListResponse.h.svn-base new file mode 100644 index 0000000..231e87c --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoListResponse.h.svn-base @@ -0,0 +1,62 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeVideoListResponse.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeVideoListResponse (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeVideo; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeVideoListResponse +// + +// A paginated list of videos returned as the response to a youtube.videos.list +// call. + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLYouTubeVideoListResponse : GTLCollectionObject + +// The ETag of the response. +@property (copy) NSString *ETag; + +// A list of videos that match the request criteria. +@property (retain) NSArray *items; // of GTLYouTubeVideo + +// The type of the API response. For this operation, the value will be +// youtube#videoListResponse. +@property (copy) NSString *kind; + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoListResponse.m.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoListResponse.m.svn-base new file mode 100644 index 0000000..47278c4 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoListResponse.m.svn-base @@ -0,0 +1,61 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeVideoListResponse.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeVideoListResponse (0 custom class methods, 3 custom properties) + +#import "GTLYouTubeVideoListResponse.h" + +#import "GTLYouTubeVideo.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeVideoListResponse +// + +@implementation GTLYouTubeVideoListResponse +@dynamic ETag, items, kind; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:@"etag" + forKey:@"ETag"]; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = + [NSDictionary dictionaryWithObject:[GTLYouTubeVideo class] + forKey:@"items"]; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#videoListResponse"]; +} + +@end diff --git a/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoPlayer.h.svn-base b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoPlayer.h.svn-base new file mode 100644 index 0000000..e90b990 --- /dev/null +++ b/GTL/Source/Services/YouTube/Generated/.svn/text-base/GTLYouTubeVideoPlayer.h.svn-base @@ -0,0 +1,49 @@ +/* Copyright (c) 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeVideoPlayer.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube +// Classes: +// GTLYouTubeVideoPlayer (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeVideoPlayer +// + +// Player to be used for a video playback. + +@interface GTLYouTubeVideoPlayer : GTLObject + +// An